提交 91f394cd authored 作者: ozoz's avatar ozoz

feat(screen): 自核查大屏统计

上级 823beac9
package com.tykj.dev.device.confirmcheck.service; package com.tykj.dev.device.confirmcheck.service;
import com.tykj.dev.config.domin.CheckUnitInfo;
import java.util.List;
/** /**
* 装备大屏-核查相关service * 装备大屏-核查相关service
* *
...@@ -8,5 +12,6 @@ package com.tykj.dev.device.confirmcheck.service; ...@@ -8,5 +12,6 @@ package com.tykj.dev.device.confirmcheck.service;
**/ **/
public interface CheckScreenService { public interface CheckScreenService {
List<CheckUnitInfo> statMapData();
} }
...@@ -36,7 +36,7 @@ public class CheckScreenServiceImpl implements CheckScreenService { ...@@ -36,7 +36,7 @@ public class CheckScreenServiceImpl implements CheckScreenService {
@Autowired @Autowired
private DeviceCheckStatDao statDao; private DeviceCheckStatDao statDao;
public void statMapData() { public List<CheckUnitInfo> statMapData() {
PredicateBuilder<DeviceCheckStat> and = Specifications.and(); PredicateBuilder<DeviceCheckStat> and = Specifications.and();
...@@ -71,6 +71,7 @@ public class CheckScreenServiceImpl implements CheckScreenService { ...@@ -71,6 +71,7 @@ public class CheckScreenServiceImpl implements CheckScreenService {
} }
} }
return rs;
} }
......
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>equip</artifactId>
<groupId>com.tykj</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>dev-screen</artifactId>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>com.tykj</groupId>
<artifactId>dev-user</artifactId>
</dependency>
<dependency>
<groupId>com.tykj.dev</groupId>
<artifactId>config</artifactId>
</dependency>
<dependency>
<groupId>com.tykj</groupId>
<artifactId>dev-confirmcheck</artifactId>
</dependency>
<dependency>
<groupId>com.tykj</groupId>
<artifactId>dev-user</artifactId>
</dependency>
<dependency>
<groupId>com.tykj.dev</groupId>
<artifactId>misc</artifactId>
</dependency>
<dependency>
<groupId>com.tykj.dev</groupId>
<artifactId>config</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
package com.tykj.dev.device.screen;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* @author ozoz
* @date 2022/11/22
**/
@SpringBootApplication(scanBasePackages = {
"com.tykj.dev.device.*"
})
public class ScreenApp {
public static void main(String[] args) {
}
}
package com.tykj.dev.device.screen.subject.service;
import com.tykj.dev.config.domin.CheckUnitInfo;
import com.tykj.dev.device.confirmcheck.service.CheckScreenService;
import com.tykj.dev.device.selfcheck.service.SelfCheckBillService;
import com.tykj.dev.device.user.subject.dao.RegionDataDao;
import com.tykj.dev.device.user.subject.dao.UnitsDao;
import com.tykj.dev.device.user.subject.entity.RegionData;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* @author ozoz
* @date 2022/11/22
**/
@Component
@Slf4j
public class CheckMapTask {
private final static String ZJ_ID = "8017d86d-cf3c-1fe3-90ea-f8a8333a2254";
@Autowired
private UnitsDao unitsDao;
@Autowired
private RegionDataDao regionDataDao;
@Autowired
private CheckScreenService checkScreenService;
@Autowired
private SelfCheckBillService selfCheckBillService;
public void init() {
// 查到了所有市的信息
List<RegionData> shis = regionDataDao.findAllByParentId(ZJ_ID);
shis.forEach(o -> o.setRegionDatas(regionDataDao.findAllByParentId(o.getRegionId())));
List<CheckUnitInfo> checkUnitInfos = checkScreenService.statMapData();
List<CheckUnitInfo> selfExamination = selfCheckBillService.selectNoFinSh2Weeks();
}
}
...@@ -75,4 +75,6 @@ public interface UnitsDao extends JpaRepository<Units, Integer>, JpaSpecificatio ...@@ -75,4 +75,6 @@ public interface UnitsDao extends JpaRepository<Units, Integer>, JpaSpecificatio
List<Units> findByTypeAndEscrow(int type, int escrow); List<Units> findByTypeAndEscrow(int type, int escrow);
List<Units> findAllByNameLike(String unitName);
} }
...@@ -8,6 +8,8 @@ import lombok.NoArgsConstructor; ...@@ -8,6 +8,8 @@ import lombok.NoArgsConstructor;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Id; import javax.persistence.Id;
import javax.persistence.Table; import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;
@Table(name = "region_data") @Table(name = "region_data")
...@@ -44,5 +46,8 @@ public class RegionData { ...@@ -44,5 +46,8 @@ public class RegionData {
*/ */
private String parentId; private String parentId;
@Transient
private List<RegionData> regionDatas;
} }
package com.tykj.dev.device.user.util; package com.tykj.dev.device.user.util;
import com.tykj.dev.device.user.subject.dao.RegionDataDao; import com.tykj.dev.device.user.subject.dao.RegionDataDao;
import com.tykj.dev.device.user.subject.dao.UnitsDao;
import com.tykj.dev.device.user.subject.entity.RegionData;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.List;
/** /**
* @author ozoz * @author ozoz
* @date 2022/11/21 * @date 2022/11/21
...@@ -17,10 +21,18 @@ public class RegionUtil { ...@@ -17,10 +21,18 @@ public class RegionUtil {
private final static String ZJ_ID = "8017d86d-cf3c-1fe3-90ea-f8a8333a2254"; private final static String ZJ_ID = "8017d86d-cf3c-1fe3-90ea-f8a8333a2254";
@Autowired
private UnitsDao unitsDao;
@Autowired @Autowired
private RegionDataDao regionDataDao; private RegionDataDao regionDataDao;
public void initRegion() { public void initRegion() {
// regionDataDao.find // 查到了所有市的信息
List<RegionData> shis = regionDataDao.findAllByParentId(ZJ_ID);
shis.forEach(o -> o.setRegionDatas(regionDataDao.findAllByParentId(o.getRegionId())));
} }
} }
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
<module>dev-questionbank</module> <module>dev-questionbank</module>
<module>dev-zxing</module> <module>dev-zxing</module>
<module>dev-readmachine</module> <module>dev-readmachine</module>
<module>dev-screen</module>
</modules> </modules>
<properties> <properties>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论