|
@@ -1,10 +1,11 @@
|
|
|
package com.xlht.xlhtproject.service.impl;
|
|
|
|
|
|
-import com.xlht.xlhtproject.domain.ChartBasic;
|
|
|
-import com.xlht.xlhtproject.domain.SmartAdd;
|
|
|
-import com.xlht.xlhtproject.domain.TShuju1;
|
|
|
+import com.xlht.xlhtproject.domain.*;
|
|
|
import com.xlht.xlhtproject.enums.BusinessEnum;
|
|
|
import com.xlht.xlhtproject.mapper.TShuju1Mapper;
|
|
|
+import com.xlht.xlhtproject.mapper.TTbXieMapper;
|
|
|
+import com.xlht.xlhtproject.mapper.ZAssayMapper;
|
|
|
+import com.xlht.xlhtproject.mapper.ZAssayResultMapper;
|
|
|
import com.xlht.xlhtproject.service.IFrontService;
|
|
|
import com.xlht.xlhtproject.utils.DateUtils;
|
|
|
import com.xlht.xlhtproject.utils.StringUtils;
|
|
@@ -15,6 +16,8 @@ import org.springframework.stereotype.Service;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
+import static com.xlht.xlhtproject.enums.MyConstants.LONG_1;
|
|
|
+
|
|
|
@Service
|
|
|
@Slf4j
|
|
|
public class FrontServiceImpl implements IFrontService {
|
|
@@ -22,6 +25,14 @@ public class FrontServiceImpl implements IFrontService {
|
|
|
@Autowired
|
|
|
private TShuju1Mapper shuju1Mapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private TTbXieMapper xieMapper;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ZAssayMapper zAssayMapper;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ZAssayResultMapper zAssayResultMapper;
|
|
|
|
|
|
@Override
|
|
|
public SmartAdd smartAddDataInfo() {
|
|
@@ -107,4 +118,20 @@ public class FrontServiceImpl implements IFrontService {
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public HomeCountInfo homeCountInfo() {
|
|
|
+ HomeCountInfo build = HomeCountInfo.builder().build();
|
|
|
+ //获取化验状态
|
|
|
+ TTbXie tTbXie = this.xieMapper.selectTTbXieByID(LONG_1);
|
|
|
+ if(!Objects.isNull(tTbXie))
|
|
|
+ build.setStatus(tTbXie.getJqrZhuantai());
|
|
|
+ //获取累计运行天数 定义:只要某天有化验,那么就算累计加一天
|
|
|
+ build.setDays(this.zAssayMapper.selectDistinctDays());
|
|
|
+ //获取累计化验轮次
|
|
|
+ build.setCounts(this.zAssayMapper.selectCount());
|
|
|
+ //获取累计化验次数
|
|
|
+ build.setTotals(this.zAssayResultMapper.selectCount());
|
|
|
+ return build;
|
|
|
+ }
|
|
|
}
|