Commit 83a1049e1c045bcf2f252018faab16f36997ede7

Authored by 陈强
1 parent 83b2d59f

CPS相关实体类、服务、接口添加

Showing 93 changed files with 4369 additions and 5 deletions
  1 +/target/
  2 +/src/test/
  3 +/logs/
  4 +/.idea/
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 <version>1.0.0-SNAPSHOT</version> 9 <version>1.0.0-SNAPSHOT</version>
10 <packaging>jar</packaging> 10 <packaging>jar</packaging>
11 <name>qx-apaas-sync</name> 11 <name>qx-apaas-sync</name>
12 - <description>简道云 -> 启效 独立同步工具(无中间件依赖,java -jar 运行)</description> 12 + <description>changan-custom,合肥长安自定义工程,负责相关三方系统对接,驾驶舱接口数据查询</description>
13 13
14 <parent> 14 <parent>
15 <groupId>org.springframework.boot</groupId> 15 <groupId>org.springframework.boot</groupId>
@@ -25,13 +25,64 @@ @@ -25,13 +25,64 @@
25 <fastjson.version>2.0.6</fastjson.version> 25 <fastjson.version>2.0.6</fastjson.version>
26 <httpclient.version>4.5.14</httpclient.version> 26 <httpclient.version>4.5.14</httpclient.version>
27 <poi.version>4.1.2</poi.version> 27 <poi.version>4.1.2</poi.version>
  28 + <commons.collections4.version>4.4</commons.collections4.version>
  29 + <maven.test.skip>true</maven.test.skip>
28 </properties> 30 </properties>
29 31
30 <dependencies> 32 <dependencies>
31 - <!-- Web:提供内嵌 Tomcat 容器 + Spring MVC(REST 触发接口),非外部中间件 -->  
32 <dependency> 33 <dependency>
33 - <groupId>org.springframework.boot</groupId>  
34 - <artifactId>spring-boot-starter-web</artifactId> 34 + <groupId>com.qgutech.qgyun.framework</groupId>
  35 + <artifactId>qgyun-core-mybatis</artifactId>
  36 + <version>2.1.5-SNAPSHOT</version>
  37 + <exclusions>
  38 + <exclusion>
  39 + <groupId>com.qgutech.qgyun.framework</groupId>
  40 + <artifactId>qgyun-core-starter-redis</artifactId>
  41 + </exclusion>
  42 + </exclusions>
  43 + </dependency>
  44 +
  45 + <dependency>
  46 + <groupId>com.qgutech.qgyun.framework</groupId>
  47 + <artifactId>qgyun-core-starter-web</artifactId>
  48 + <version>2.1.5-SNAPSHOT</version>
  49 + <exclusions>
  50 + <exclusion>
  51 + <artifactId>asm</artifactId>
  52 + <groupId>org.ow2.asm</groupId>
  53 + </exclusion>
  54 + </exclusions>
  55 + </dependency>
  56 + <dependency>
  57 + <groupId>mysql</groupId>
  58 + <artifactId>mysql-connector-java</artifactId>
  59 + <version>8.0.24</version>
  60 + </dependency>
  61 + <dependency>
  62 + <groupId>com.alibaba</groupId>
  63 + <artifactId>druid-spring-boot-starter</artifactId>
  64 + <version>1.1.10</version>
  65 + </dependency>
  66 + <dependency>
  67 + <groupId>com.alibaba</groupId>
  68 + <artifactId>fastjson</artifactId>
  69 + <version>2.0.6</version>
  70 + </dependency>
  71 + <dependency>
  72 + <groupId>com.google.code.gson</groupId>
  73 + <artifactId>gson</artifactId>
  74 + <version>2.8.5</version>
  75 + </dependency>
  76 +
  77 + <!-- ================= Apache Commons(原框架传递引入) ================= -->
  78 + <dependency>
  79 + <groupId>org.apache.commons</groupId>
  80 + <artifactId>commons-lang3</artifactId>
  81 + </dependency>
  82 + <dependency>
  83 + <groupId>org.apache.commons</groupId>
  84 + <artifactId>commons-collections4</artifactId>
  85 + <version>${commons.collections4.version}</version>
35 </dependency> 86 </dependency>
36 87
37 <!-- JSON 处理 --> 88 <!-- JSON 处理 -->
@@ -70,6 +121,18 @@ @@ -70,6 +121,18 @@
70 <scope>provided</scope> 121 <scope>provided</scope>
71 </dependency> 122 </dependency>
72 123
  124 + <dependency>
  125 + <groupId>commons-io</groupId>
  126 + <artifactId>commons-io</artifactId>
  127 + <version>2.4</version>
  128 + </dependency>
  129 +
  130 + <dependency>
  131 + <groupId>javax.mail</groupId>
  132 + <artifactId>mail</artifactId>
  133 + <version>1.4.7</version>
  134 + </dependency>
  135 +
73 <!-- 测试 --> 136 <!-- 测试 -->
74 <dependency> 137 <dependency>
75 <groupId>org.springframework.boot</groupId> 138 <groupId>org.springframework.boot</groupId>
@@ -78,6 +141,17 @@ @@ -78,6 +141,17 @@
78 </dependency> 141 </dependency>
79 </dependencies> 142 </dependencies>
80 143
  144 + <repositories>
  145 + <repository>
  146 + <id>spring-milestones</id>
  147 + <name>Spring Milestones</name>
  148 + <url>https://repo.spring.io/milestone</url>
  149 + <snapshots>
  150 + <enabled>false</enabled>
  151 + </snapshots>
  152 + </repository>
  153 + </repositories>
  154 +
81 <build> 155 <build>
82 <plugins> 156 <plugins>
83 <plugin> 157 <plugin>
@@ -2,13 +2,17 @@ package com.qgutech.qgyun.apaas.sync; @@ -2,13 +2,17 @@ package com.qgutech.qgyun.apaas.sync;
2 2
3 import org.springframework.boot.SpringApplication; 3 import org.springframework.boot.SpringApplication;
4 import org.springframework.boot.autoconfigure.SpringBootApplication; 4 import org.springframework.boot.autoconfigure.SpringBootApplication;
  5 +import org.springframework.scheduling.annotation.EnableScheduling;
  6 +import tk.mybatis.spring.annotation.MapperScan;
5 7
6 /** 8 /**
7 * 简道云 -> 启效 独立同步工具启动类。 9 * 简道云 -> 启效 独立同步工具启动类。
8 * <p> 10 * <p>
9 * 无中间件依赖:单 jar(内嵌 Tomcat)+ 仅 Java 环境即可运行。配置在 application.yml(jdy-sync.*)。 11 * 无中间件依赖:单 jar(内嵌 Tomcat)+ 仅 Java 环境即可运行。配置在 application.yml(jdy-sync.*)。
10 */ 12 */
11 -@SpringBootApplication 13 +@SpringBootApplication(scanBasePackages = "com.qgutech")
  14 +@MapperScan({"com.qgutech.qgyun.apaas.sync.**.mapper"})
  15 +@EnableScheduling
12 public class QxApaasSyncApplication { 16 public class QxApaasSyncApplication {
13 17
14 public static void main(String[] args) { 18 public static void main(String[] args) {
  1 +package com.qgutech.qgyun.apaas.sync.base;
  2 +
  3 +public enum BoErrorCode {
  4 + SYSTEM_EXCEPTION("系统异常"),
  5 + DATA_ERROR("数据异常"),
  6 + PARAM_ERROR("参数异常"),
  7 + USER_NOT_EXIST("用户不存在");
  8 +
  9 + private final String text;
  10 +
  11 + BoErrorCode(String text) {
  12 + this.text = text;
  13 + }
  14 +
  15 + public String getText() {
  16 + return text;
  17 + }
  18 +}
  1 +package com.qgutech.qgyun.apaas.sync.base;
  2 +
  3 +import com.qgutech.qgyun.framework.common.exception.BaseException;
  4 +
  5 +public class BoException extends BaseException {
  6 + public BoException(String errorCode, String message) {
  7 + super(errorCode, message);
  8 + }
  9 +
  10 + public BoException(String errorCode, String message, Throwable cause) {
  11 + super(errorCode, message, cause);
  12 + }
  13 +
  14 + public BoException(BoErrorCode boErrorCode) {
  15 + this(boErrorCode.name(), boErrorCode.getText());
  16 + }
  17 +
  18 + public BoException(BoErrorCode boErrorCode, String message) {
  19 + this(boErrorCode.name(), message);
  20 + }
  21 +}
  1 +package com.qgutech.qgyun.apaas.sync.config;
  2 +
  3 +import org.springframework.beans.factory.annotation.Value;
  4 +import org.springframework.boot.web.servlet.FilterRegistrationBean;
  5 +import org.springframework.context.annotation.Bean;
  6 +import org.springframework.context.annotation.Configuration;
  7 +import org.springframework.web.cors.CorsConfiguration;
  8 +import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
  9 +import org.springframework.web.filter.CorsFilter;
  10 +
  11 +@Configuration
  12 +public class CorsConfig {
  13 +
  14 + @Value("${qgyun.cors.allowedOrigin:*}")
  15 + private String allowedOrigin;
  16 +
  17 + @Bean
  18 + public FilterRegistrationBean corsFilter() {
  19 + UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
  20 + CorsConfiguration config = new CorsConfiguration();
  21 + config.setAllowCredentials(true);
  22 + config.addAllowedOrigin(allowedOrigin);
  23 + config.addAllowedHeader("*");
  24 + config.addAllowedMethod("*");
  25 + source.registerCorsConfiguration("/**", config);
  26 + FilterRegistrationBean bean = new FilterRegistrationBean(new CorsFilter(source));
  27 + bean.setOrder(0);
  28 + return bean;
  29 + }
  30 +}
  1 +package com.qgutech.qgyun.apaas.sync.constant;
  2 +
  3 +public interface Constant {
  4 +
  5 + String SUCCESS = "SUCCESS";
  6 + String ERROR = "ERROR";
  7 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.controller;
  2 +
  3 +import com.qgutech.qgyun.apaas.sync.cps.dto.AbImprovementSummaryDTO;
  4 +import com.qgutech.qgyun.apaas.sync.cps.model.AbImprovement;
  5 +import com.qgutech.qgyun.apaas.sync.cps.service.AbImprovementService;
  6 +import com.qgutech.qgyun.framework.common.result.JsonResult;
  7 +import lombok.extern.slf4j.Slf4j;
  8 +import org.springframework.web.bind.annotation.GetMapping;
  9 +import org.springframework.web.bind.annotation.RequestMapping;
  10 +import org.springframework.web.bind.annotation.RequestParam;
  11 +import org.springframework.web.bind.annotation.RestController;
  12 +
  13 +import javax.annotation.Resource;
  14 +import java.util.List;
  15 +
  16 +/**
  17 + * AB类改善接�?
  18 + */
  19 +@Slf4j
  20 +@RestController
  21 +@RequestMapping("/abImprovement")
  22 +public class AbImprovementController {
  23 +
  24 + @Resource
  25 + private AbImprovementService abImprovementService;
  26 +
  27 + /**
  28 + * 获取所有AB类改善列�?
  29 + *
  30 + * @return
  31 + */
  32 + @GetMapping("/list/all")
  33 + public JsonResult listAll() {
  34 + List<AbImprovement> abImprovementList = abImprovementService.listAll();
  35 + return new JsonResult<>(true, "成功", abImprovementList);
  36 + }
  37 +
  38 + /**
  39 + * 根据年份查询AB类改善汇总(按单位车间分组)
  40 + * <p>
  41 + * 年份为空时默认查询当前年
  42 + *
  43 + * @param year 年份,格式:yyyy,可为空
  44 + * @return AB类改善汇总列表
  45 + */
  46 + @GetMapping("/summary/year")
  47 + public JsonResult summaryByYear(@RequestParam(required = false) String year) {
  48 + List<AbImprovementSummaryDTO> summaryList = abImprovementService.summaryByYear(year);
  49 + return new JsonResult<>(true, "成功", summaryList);
  50 + }
  51 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.controller;
  2 +
  3 +import com.qgutech.qgyun.apaas.sync.cps.model.Area;
  4 +import com.qgutech.qgyun.apaas.sync.cps.service.AreaService;
  5 +import com.qgutech.qgyun.framework.common.result.JsonResult;
  6 +import lombok.extern.slf4j.Slf4j;
  7 +import org.springframework.web.bind.annotation.GetMapping;
  8 +import org.springframework.web.bind.annotation.RequestMapping;
  9 +import org.springframework.web.bind.annotation.RestController;
  10 +
  11 +import javax.annotation.Resource;
  12 +import java.util.List;
  13 +
  14 +/**
  15 + * 区域信息接口
  16 + */
  17 +@Slf4j
  18 +@RestController
  19 +@RequestMapping("/area")
  20 +public class AreaController {
  21 +
  22 + @Resource
  23 + private AreaService areaService;
  24 +
  25 + /**
  26 + * 获取所有区域信息列�?
  27 + *
  28 + * @return
  29 + */
  30 + @GetMapping("/list/all")
  31 + public JsonResult listAll() {
  32 + List<Area> areaList = areaService.listAll();
  33 + return new JsonResult<>(true, "成功", areaList);
  34 + }
  35 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.controller;
  2 +
  3 +import com.qgutech.qgyun.apaas.sync.cps.dto.CImprovementSummaryDTO;
  4 +import com.qgutech.qgyun.apaas.sync.cps.model.CImprovement;
  5 +import com.qgutech.qgyun.apaas.sync.cps.service.CImprovementService;
  6 +import com.qgutech.qgyun.framework.common.result.JsonResult;
  7 +import lombok.extern.slf4j.Slf4j;
  8 +import org.springframework.web.bind.annotation.GetMapping;
  9 +import org.springframework.web.bind.annotation.RequestMapping;
  10 +import org.springframework.web.bind.annotation.RequestParam;
  11 +import org.springframework.web.bind.annotation.RestController;
  12 +
  13 +import javax.annotation.Resource;
  14 +import java.util.List;
  15 +
  16 +/**
  17 + * C类改善接口
  18 + */
  19 +@Slf4j
  20 +@RestController
  21 +@RequestMapping("/cImprovement")
  22 +public class CImprovementController {
  23 +
  24 + @Resource
  25 + private CImprovementService cImprovementService;
  26 +
  27 + /**
  28 + * 获取所有C类改善列表
  29 + *
  30 + * @return
  31 + */
  32 + @GetMapping("/list/all")
  33 + public JsonResult listAll() {
  34 + List<CImprovement> cImprovementList = cImprovementService.listAll();
  35 + return new JsonResult<>(true, "成功", cImprovementList);
  36 + }
  37 +
  38 + /**
  39 + * 根据年份和季度查询C类改善发起率汇总(按单位车间分组)
  40 + * <p>
  41 + * 年份为空时默认查询当前年,季度必传
  42 + *
  43 + * @param year 年份,格式:yyyy,可为空
  44 + * @param quarter 季度枚举值(#1#-#4#),必传
  45 + * @return 单位车间C类改善发起率信息列表(含目标值)
  46 + */
  47 + @GetMapping("/summary/quarter")
  48 + public JsonResult summaryByQuarter(@RequestParam(required = false) String year,
  49 + @RequestParam String quarter) {
  50 + List<CImprovementSummaryDTO> summaryList = cImprovementService.summaryByYearAndQuarter(year, quarter);
  51 + return new JsonResult<>(true, "成功", summaryList);
  52 + }
  53 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.controller;
  2 +
  3 +import com.qgutech.qgyun.apaas.sync.cps.model.CpsProblem;
  4 +import com.qgutech.qgyun.apaas.sync.cps.service.CpsProblemService;
  5 +import com.qgutech.qgyun.framework.common.result.JsonResult;
  6 +import lombok.extern.slf4j.Slf4j;
  7 +import org.springframework.web.bind.annotation.GetMapping;
  8 +import org.springframework.web.bind.annotation.RequestMapping;
  9 +import org.springframework.web.bind.annotation.RestController;
  10 +
  11 +import javax.annotation.Resource;
  12 +import java.util.List;
  13 +
  14 +/**
  15 + * CPS问题接口
  16 + */
  17 +@Slf4j
  18 +@RestController
  19 +@RequestMapping("/cpsProblem")
  20 +public class CpsProblemController {
  21 +
  22 + @Resource
  23 + private CpsProblemService cpsProblemService;
  24 +
  25 + /**
  26 + * 获取所有CPS问题列表
  27 + *
  28 + * @return
  29 + */
  30 + @GetMapping("/list/all")
  31 + public JsonResult listAll() {
  32 + List<CpsProblem> cpsProblemList = cpsProblemService.listAll();
  33 + return new JsonResult<>(true, "成功", cpsProblemList);
  34 + }
  35 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.controller;
  2 +
  3 +import com.qgutech.qgyun.apaas.sync.cps.model.Personnel;
  4 +import com.qgutech.qgyun.apaas.sync.cps.service.PersonnelService;
  5 +import com.qgutech.qgyun.framework.common.result.JsonResult;
  6 +import lombok.extern.slf4j.Slf4j;
  7 +import org.springframework.web.bind.annotation.GetMapping;
  8 +import org.springframework.web.bind.annotation.RequestMapping;
  9 +import org.springframework.web.bind.annotation.RestController;
  10 +
  11 +import javax.annotation.Resource;
  12 +import java.util.List;
  13 +
  14 +/**
  15 + * 人员信息接口
  16 + */
  17 +@Slf4j
  18 +@RestController
  19 +@RequestMapping("/personnel")
  20 +public class PersonnelController {
  21 +
  22 + @Resource
  23 + private PersonnelService personnelService;
  24 +
  25 + /**
  26 + * 获取所有人员信息列�?
  27 + *
  28 + * @return
  29 + */
  30 + @GetMapping("/list/all")
  31 + public JsonResult listAll() {
  32 + List<Personnel> personnelList = personnelService.listAll();
  33 + return new JsonResult<>(true, "成功", personnelList);
  34 + }
  35 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.controller;
  2 +
  3 +import com.qgutech.qgyun.apaas.sync.cps.model.PjoBatch;
  4 +import com.qgutech.qgyun.apaas.sync.cps.service.PjoBatchService;
  5 +import com.qgutech.qgyun.framework.common.result.JsonResult;
  6 +import lombok.extern.slf4j.Slf4j;
  7 +import org.springframework.web.bind.annotation.GetMapping;
  8 +import org.springframework.web.bind.annotation.RequestMapping;
  9 +import org.springframework.web.bind.annotation.RestController;
  10 +
  11 +import javax.annotation.Resource;
  12 +import java.util.List;
  13 +
  14 +/**
  15 + * PjoBatch接口
  16 + */
  17 +@Slf4j
  18 +@RestController
  19 +@RequestMapping("/pjoBatch")
  20 +public class PjoBatchController {
  21 +
  22 + @Resource
  23 + private PjoBatchService pjoBatchService;
  24 +
  25 + /**
  26 + * 获取所有PjoBatch列表
  27 + *
  28 + * @return
  29 + */
  30 + @GetMapping("/list/all")
  31 + public JsonResult listAll() {
  32 + List<PjoBatch> pjoBatchList = pjoBatchService.listAll();
  33 + return new JsonResult<>(true, "成功", pjoBatchList);
  34 + }
  35 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.controller;
  2 +
  3 +import com.qgutech.qgyun.apaas.sync.cps.model.PjoExec;
  4 +import com.qgutech.qgyun.apaas.sync.cps.service.PjoExecService;
  5 +import com.qgutech.qgyun.framework.common.result.JsonResult;
  6 +import lombok.extern.slf4j.Slf4j;
  7 +import org.springframework.web.bind.annotation.GetMapping;
  8 +import org.springframework.web.bind.annotation.RequestMapping;
  9 +import org.springframework.web.bind.annotation.RestController;
  10 +
  11 +import javax.annotation.Resource;
  12 +import java.util.List;
  13 +
  14 +/**
  15 + * PjoExec接口
  16 + */
  17 +@Slf4j
  18 +@RestController
  19 +@RequestMapping("/pjoExec")
  20 +public class PjoExecController {
  21 +
  22 + @Resource
  23 + private PjoExecService pjoExecService;
  24 +
  25 + /**
  26 + * 获取所有PjoExec列表
  27 + *
  28 + * @return
  29 + */
  30 + @GetMapping("/list/all")
  31 + public JsonResult listAll() {
  32 + List<PjoExec> pjoExecList = pjoExecService.listAll();
  33 + return new JsonResult<>(true, "成功", pjoExecList);
  34 + }
  35 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.controller;
  2 +
  3 +import com.qgutech.qgyun.apaas.sync.cps.model.PjoWorkstationExec;
  4 +import com.qgutech.qgyun.apaas.sync.cps.service.PjoWorkstationExecService;
  5 +import com.qgutech.qgyun.framework.common.result.JsonResult;
  6 +import lombok.extern.slf4j.Slf4j;
  7 +import org.springframework.web.bind.annotation.GetMapping;
  8 +import org.springframework.web.bind.annotation.RequestMapping;
  9 +import org.springframework.web.bind.annotation.RestController;
  10 +
  11 +import javax.annotation.Resource;
  12 +import java.util.List;
  13 +
  14 +/**
  15 + * PjoWorkstationExec接口
  16 + */
  17 +@Slf4j
  18 +@RestController
  19 +@RequestMapping("/pjoWorkstationExec")
  20 +public class PjoWorkstationExecController {
  21 +
  22 + @Resource
  23 + private PjoWorkstationExecService pjoWorkstationExecService;
  24 +
  25 + /**
  26 + * 获取所有PjoWorkstationExec列表
  27 + *
  28 + * @return
  29 + */
  30 + @GetMapping("/list/all")
  31 + public JsonResult listAll() {
  32 + List<PjoWorkstationExec> pjoWorkstationExecList = pjoWorkstationExecService.listAll();
  33 + return new JsonResult<>(true, "成功", pjoWorkstationExecList);
  34 + }
  35 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.controller;
  2 +
  3 +import com.qgutech.qgyun.apaas.sync.cps.model.ProcessConfirmExec;
  4 +import com.qgutech.qgyun.apaas.sync.cps.service.ProcessConfirmExecService;
  5 +import com.qgutech.qgyun.framework.common.result.JsonResult;
  6 +import lombok.extern.slf4j.Slf4j;
  7 +import org.springframework.web.bind.annotation.GetMapping;
  8 +import org.springframework.web.bind.annotation.RequestMapping;
  9 +import org.springframework.web.bind.annotation.RestController;
  10 +
  11 +import javax.annotation.Resource;
  12 +import java.util.List;
  13 +
  14 +/**
  15 + * ProcessConfirmExec接口
  16 + */
  17 +@Slf4j
  18 +@RestController
  19 +@RequestMapping("/processConfirmExec")
  20 +public class ProcessConfirmExecController {
  21 +
  22 + @Resource
  23 + private ProcessConfirmExecService processConfirmExecService;
  24 +
  25 + /**
  26 + * 获取所有ProcessConfirmExec列表
  27 + *
  28 + * @return
  29 + */
  30 + @GetMapping("/list/all")
  31 + public JsonResult listAll() {
  32 + List<ProcessConfirmExec> processConfirmExecList = processConfirmExecService.listAll();
  33 + return new JsonResult<>(true, "成功", processConfirmExecList);
  34 + }
  35 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.controller;
  2 +
  3 +import com.qgutech.qgyun.apaas.sync.cps.model.ProcessConfirmPersonnel;
  4 +import com.qgutech.qgyun.apaas.sync.cps.service.ProcessConfirmPersonnelService;
  5 +import com.qgutech.qgyun.framework.common.result.JsonResult;
  6 +import lombok.extern.slf4j.Slf4j;
  7 +import org.springframework.web.bind.annotation.GetMapping;
  8 +import org.springframework.web.bind.annotation.RequestMapping;
  9 +import org.springframework.web.bind.annotation.RestController;
  10 +
  11 +import javax.annotation.Resource;
  12 +import java.util.List;
  13 +
  14 +/**
  15 + * ProcessConfirmPersonnel接口
  16 + */
  17 +@Slf4j
  18 +@RestController
  19 +@RequestMapping("/processConfirmPersonnel")
  20 +public class ProcessConfirmPersonnelController {
  21 +
  22 + @Resource
  23 + private ProcessConfirmPersonnelService processConfirmPersonnelService;
  24 +
  25 + /**
  26 + * 获取所有ProcessConfirmPersonnel列表
  27 + *
  28 + * @return
  29 + */
  30 + @GetMapping("/list/all")
  31 + public JsonResult listAll() {
  32 + List<ProcessConfirmPersonnel> processConfirmPersonnelList = processConfirmPersonnelService.listAll();
  33 + return new JsonResult<>(true, "成功", processConfirmPersonnelList);
  34 + }
  35 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.controller;
  2 +
  3 +import com.qgutech.qgyun.apaas.sync.cps.model.QuarterPersonnel;
  4 +import com.qgutech.qgyun.apaas.sync.cps.service.QuarterPersonnelService;
  5 +import com.qgutech.qgyun.framework.common.result.JsonResult;
  6 +import lombok.extern.slf4j.Slf4j;
  7 +import org.springframework.web.bind.annotation.GetMapping;
  8 +import org.springframework.web.bind.annotation.RequestMapping;
  9 +import org.springframework.web.bind.annotation.RestController;
  10 +
  11 +import javax.annotation.Resource;
  12 +import java.util.List;
  13 +
  14 +/**
  15 + * QuarterPersonnel接口
  16 + */
  17 +@Slf4j
  18 +@RestController
  19 +@RequestMapping("/quarterPersonnel")
  20 +public class QuarterPersonnelController {
  21 +
  22 + @Resource
  23 + private QuarterPersonnelService quarterPersonnelService;
  24 +
  25 + /**
  26 + * 获取所有QuarterPersonnel列表
  27 + *
  28 + * @return
  29 + */
  30 + @GetMapping("/list/all")
  31 + public JsonResult listAll() {
  32 + List<QuarterPersonnel> quarterPersonnelList = quarterPersonnelService.listAll();
  33 + return new JsonResult<>(true, "成功", quarterPersonnelList);
  34 + }
  35 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.controller;
  2 +
  3 +import com.qgutech.qgyun.apaas.sync.cps.model.RoomGroup;
  4 +import com.qgutech.qgyun.apaas.sync.cps.service.RoomGroupService;
  5 +import com.qgutech.qgyun.framework.common.result.JsonResult;
  6 +import lombok.extern.slf4j.Slf4j;
  7 +import org.springframework.web.bind.annotation.GetMapping;
  8 +import org.springframework.web.bind.annotation.RequestMapping;
  9 +import org.springframework.web.bind.annotation.RestController;
  10 +
  11 +import javax.annotation.Resource;
  12 +import java.util.List;
  13 +
  14 +/**
  15 + * 室组信息接口
  16 + */
  17 +@Slf4j
  18 +@RestController
  19 +@RequestMapping("/roomGroup")
  20 +public class RoomGroupController {
  21 +
  22 + @Resource
  23 + private RoomGroupService roomGroupService;
  24 +
  25 + /**
  26 + * 获取所有室组信息列�?
  27 + *
  28 + * @return
  29 + */
  30 + @GetMapping("/list/all")
  31 + public JsonResult listAll() {
  32 + List<RoomGroup> roomGroupList = roomGroupService.listAll();
  33 + return new JsonResult<>(true, "成功", roomGroupList);
  34 + }
  35 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.controller;
  2 +
  3 +import com.qgutech.qgyun.apaas.sync.cps.model.Shift;
  4 +import com.qgutech.qgyun.apaas.sync.cps.service.ShiftService;
  5 +import com.qgutech.qgyun.framework.common.result.JsonResult;
  6 +import lombok.extern.slf4j.Slf4j;
  7 +import org.springframework.web.bind.annotation.GetMapping;
  8 +import org.springframework.web.bind.annotation.RequestMapping;
  9 +import org.springframework.web.bind.annotation.RestController;
  10 +
  11 +import javax.annotation.Resource;
  12 +import java.util.List;
  13 +
  14 +/**
  15 + * 班次信息接口
  16 + */
  17 +@Slf4j
  18 +@RestController
  19 +@RequestMapping("/shift")
  20 +public class ShiftController {
  21 +
  22 + @Resource
  23 + private ShiftService shiftService;
  24 +
  25 + /**
  26 + * 获取所有班次信息列�?
  27 + *
  28 + * @return
  29 + */
  30 + @GetMapping("/list/all")
  31 + public JsonResult listAll() {
  32 + List<Shift> shiftList = shiftService.listAll();
  33 + return new JsonResult<>(true, "成功", shiftList);
  34 + }
  35 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.controller;
  2 +
  3 +import com.qgutech.qgyun.apaas.sync.cps.model.StdActivityCase;
  4 +import com.qgutech.qgyun.apaas.sync.cps.service.StdActivityCaseService;
  5 +import com.qgutech.qgyun.framework.common.result.JsonResult;
  6 +import lombok.extern.slf4j.Slf4j;
  7 +import org.springframework.web.bind.annotation.GetMapping;
  8 +import org.springframework.web.bind.annotation.RequestMapping;
  9 +import org.springframework.web.bind.annotation.RestController;
  10 +
  11 +import javax.annotation.Resource;
  12 +import java.util.List;
  13 +
  14 +/**
  15 + * StdActivityCase接口
  16 + */
  17 +@Slf4j
  18 +@RestController
  19 +@RequestMapping("/stdActivityCase")
  20 +public class StdActivityCaseController {
  21 +
  22 + @Resource
  23 + private StdActivityCaseService stdActivityCaseService;
  24 +
  25 + /**
  26 + * 获取所有StdActivityCase列表
  27 + *
  28 + * @return
  29 + */
  30 + @GetMapping("/list/all")
  31 + public JsonResult listAll() {
  32 + List<StdActivityCase> stdActivityCaseList = stdActivityCaseService.listAll();
  33 + return new JsonResult<>(true, "成功", stdActivityCaseList);
  34 + }
  35 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.controller;
  2 +
  3 +import com.qgutech.qgyun.apaas.sync.cps.model.Team;
  4 +import com.qgutech.qgyun.apaas.sync.cps.service.TeamService;
  5 +import com.qgutech.qgyun.framework.common.result.JsonResult;
  6 +import lombok.extern.slf4j.Slf4j;
  7 +import org.springframework.web.bind.annotation.GetMapping;
  8 +import org.springframework.web.bind.annotation.RequestMapping;
  9 +import org.springframework.web.bind.annotation.RestController;
  10 +
  11 +import javax.annotation.Resource;
  12 +import java.util.List;
  13 +
  14 +/**
  15 + * 班组信息接口
  16 + */
  17 +@Slf4j
  18 +@RestController
  19 +@RequestMapping("/team")
  20 +public class TeamController {
  21 +
  22 + @Resource
  23 + private TeamService teamService;
  24 +
  25 + /**
  26 + * 获取所有班组信息列�?
  27 + *
  28 + * @return
  29 + */
  30 + @GetMapping("/list/all")
  31 + public JsonResult listAll() {
  32 + List<Team> teamList = teamService.listAll();
  33 + return new JsonResult<>(true, "成功", teamList);
  34 + }
  35 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.controller;
  2 +
  3 +import com.qgutech.qgyun.apaas.sync.cps.model.Workshop;
  4 +import com.qgutech.qgyun.apaas.sync.cps.service.WorkshopService;
  5 +import com.qgutech.qgyun.framework.common.result.JsonResult;
  6 +import lombok.extern.slf4j.Slf4j;
  7 +import org.springframework.web.bind.annotation.GetMapping;
  8 +import org.springframework.web.bind.annotation.RequestMapping;
  9 +import org.springframework.web.bind.annotation.RestController;
  10 +
  11 +import javax.annotation.Resource;
  12 +import java.util.List;
  13 +
  14 +/**
  15 + * 单位(车间)信息接口
  16 + *
  17 + * @Author cq
  18 + * @Since 2026-09-21
  19 + */
  20 +@Slf4j
  21 +@RestController
  22 +@RequestMapping("/workshop")
  23 +public class WorkshopController {
  24 +
  25 +
  26 + @Resource
  27 + private WorkshopService workshopService;
  28 +
  29 + /**
  30 + * 获取所有单位车间信息列表
  31 + *
  32 + * @return
  33 + */
  34 + @GetMapping("/list/all")
  35 + public JsonResult listAll() {
  36 + List<Workshop> workshopList = workshopService.listAll();
  37 + return new JsonResult<>(true, "成功", workshopList);
  38 + }
  39 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.controller;
  2 +
  3 +import com.qgutech.qgyun.apaas.sync.cps.model.Workstation;
  4 +import com.qgutech.qgyun.apaas.sync.cps.service.WorkstationService;
  5 +import com.qgutech.qgyun.framework.common.result.JsonResult;
  6 +import lombok.extern.slf4j.Slf4j;
  7 +import org.springframework.web.bind.annotation.GetMapping;
  8 +import org.springframework.web.bind.annotation.RequestMapping;
  9 +import org.springframework.web.bind.annotation.RestController;
  10 +
  11 +import javax.annotation.Resource;
  12 +import java.util.List;
  13 +
  14 +/**
  15 + * 工位信息接口
  16 + */
  17 +@Slf4j
  18 +@RestController
  19 +@RequestMapping("/workstation")
  20 +public class WorkstationController {
  21 +
  22 + @Resource
  23 + private WorkstationService workstationService;
  24 +
  25 + /**
  26 + * 获取所有工位信息列�?
  27 + *
  28 + * @return
  29 + */
  30 + @GetMapping("/list/all")
  31 + public JsonResult listAll() {
  32 + List<Workstation> workstationList = workstationService.listAll();
  33 + return new JsonResult<>(true, "成功", workstationList);
  34 + }
  35 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.controller;
  2 +
  3 +import com.qgutech.qgyun.apaas.sync.cps.model.XtLine;
  4 +import com.qgutech.qgyun.apaas.sync.cps.service.XtLineService;
  5 +import com.qgutech.qgyun.framework.common.result.JsonResult;
  6 +import lombok.extern.slf4j.Slf4j;
  7 +import org.springframework.web.bind.annotation.GetMapping;
  8 +import org.springframework.web.bind.annotation.RequestMapping;
  9 +import org.springframework.web.bind.annotation.RestController;
  10 +
  11 +import javax.annotation.Resource;
  12 +import java.util.List;
  13 +
  14 +/**
  15 + * 线体信息接口
  16 + */
  17 +@Slf4j
  18 +@RestController
  19 +@RequestMapping("/xtLine")
  20 +public class XtLineController {
  21 +
  22 + @Resource
  23 + private XtLineService xtLineService;
  24 +
  25 + /**
  26 + * 获取所有线体信息列�?
  27 + *
  28 + * @return
  29 + */
  30 + @GetMapping("/list/all")
  31 + public JsonResult listAll() {
  32 + List<XtLine> xtLineList = xtLineService.listAll();
  33 + return new JsonResult<>(true, "成功", xtLineList);
  34 + }
  35 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.dto;
  2 +
  3 +import lombok.Getter;
  4 +import lombok.Setter;
  5 +import lombok.ToString;
  6 +
  7 +import java.io.Serializable;
  8 +
  9 +/**
  10 + * AB类改善汇总结果
  11 + */
  12 +@Getter
  13 +@Setter
  14 +@ToString
  15 +public class AbImprovementSummaryDTO implements Serializable {
  16 +
  17 + private static final long serialVersionUID = 1L;
  18 +
  19 + /**
  20 + * 单位车间编码
  21 + */
  22 + private String dwcj;
  23 +
  24 + /**
  25 + * 单位车间名称
  26 + */
  27 + private String dwcjName;
  28 + /**
  29 + * 单位车间编号
  30 + */
  31 + private String dwcjCode;
  32 +
  33 + /**
  34 + * 年份
  35 + */
  36 + private String year;
  37 +
  38 + /**
  39 + * 节约价值汇总
  40 + */
  41 + private Double totalQnjyjz;
  42 +
  43 + /**
  44 + * 目标值
  45 + */
  46 + private Double mb;
  47 +
  48 + /**
  49 + * 完成率(%)
  50 + */
  51 + private Double completionRate;
  52 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.dto;
  2 +
  3 +import io.swagger.annotations.ApiModel;
  4 +import io.swagger.annotations.ApiModelProperty;
  5 +import lombok.Getter;
  6 +import lombok.Setter;
  7 +import lombok.ToString;
  8 +
  9 +import java.io.Serializable;
  10 +
  11 +/**
  12 + * C类改善汇总结果(按室组维度分组)
  13 + */
  14 +@Getter
  15 +@Setter
  16 +@ToString
  17 +@ApiModel(value = "CImprovementSummary", description = "C类改善汇总结果")
  18 +public class CImprovementSummaryDTO implements Serializable {
  19 +
  20 + private static final long serialVersionUID = 1L;
  21 +
  22 + /**
  23 + * 室组编码
  24 + */
  25 + @ApiModelProperty(value = "室组编码")
  26 + private String szxx;
  27 +
  28 + /**
  29 + * 室组名称
  30 + */
  31 + @ApiModelProperty(value = "室组名称")
  32 + private String szmc;
  33 +
  34 + /**
  35 + * 所属单位车间编码
  36 + */
  37 + @ApiModelProperty(value = "所属单位车间编码")
  38 + private String dwcj;
  39 +
  40 + /**
  41 + * 所属单位车间名称
  42 + */
  43 + @ApiModelProperty(value = "所属单位车间名称")
  44 + private String dwcjName;
  45 +
  46 + /**
  47 + * 年份
  48 + */
  49 + @ApiModelProperty(value = "年份")
  50 + private String year;
  51 +
  52 + /**
  53 + * 季度
  54 + */
  55 + @ApiModelProperty(value = "季度")
  56 + private String quarter;
  57 +
  58 + /**
  59 + * 季度描述
  60 + */
  61 + @ApiModelProperty(value = "季度描述")
  62 + private String quarterDesc;
  63 +
  64 + /**
  65 + * 室组总人数
  66 + */
  67 + @ApiModelProperty(value = "室组总人数")
  68 + private Integer totalPersonnel;
  69 +
  70 + /**
  71 + * 有C类改善记录的人数(同一人多条记录算一次)
  72 + */
  73 + @ApiModelProperty(value = "有C类改善记录的人数")
  74 + private Integer improvementPersonnel;
  75 +
  76 + /**
  77 + * C类改善发起率(%)
  78 + */
  79 + @ApiModelProperty(value = "C类改善发起率(%)")
  80 + private Double improvementRate;
  81 +
  82 + /**
  83 + * 目标值
  84 + */
  85 + @ApiModelProperty(value = "目标值")
  86 + private Double mb;
  87 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.enums;
  2 +
  3 +import lombok.Getter;
  4 +
  5 +/**
  6 + * 季度枚举
  7 + */
  8 +@Getter
  9 +public enum QuarterEnum {
  10 +
  11 + /**
  12 + * 第一季度
  13 + */
  14 + Q1("#1#", "第一季度", "01-01", "03-31"),
  15 +
  16 + /**
  17 + * 第二季度
  18 + */
  19 + Q2("#2#", "第二季度", "04-01", "06-30"),
  20 +
  21 + /**
  22 + * 第三季度
  23 + */
  24 + Q3("#3#", "第三季度", "07-01", "09-30"),
  25 +
  26 + /**
  27 + * 第四季度
  28 + */
  29 + Q4("#4#", "第四季度", "10-01", "12-31");
  30 +
  31 + /**
  32 + * 数据库存储的值
  33 + */
  34 + private final String code;
  35 +
  36 + /**
  37 + * 中文描述
  38 + */
  39 + private final String desc;
  40 +
  41 + /**
  42 + * 季度开始日期(MM-dd)
  43 + */
  44 + private final String startDate;
  45 +
  46 + /**
  47 + * 季度结束日期(MM-dd)
  48 + */
  49 + private final String endDate;
  50 +
  51 + QuarterEnum(String code, String desc, String startDate, String endDate) {
  52 + this.code = code;
  53 + this.desc = desc;
  54 + this.startDate = startDate;
  55 + this.endDate = endDate;
  56 + }
  57 +
  58 + /**
  59 + * 根据code获取枚举
  60 + *
  61 + * @param code 数据库存储的值
  62 + * @return 枚举实例,未找到返回 null
  63 + */
  64 + public static QuarterEnum fromCode(String code) {
  65 + if (code == null) {
  66 + return null;
  67 + }
  68 + for (QuarterEnum quarter : values()) {
  69 + if (quarter.code.equals(code)) {
  70 + return quarter;
  71 + }
  72 + }
  73 + return null;
  74 + }
  75 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.enums;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonValue;
  4 +import lombok.Getter;
  5 +
  6 +/**
  7 + * 车间状态枚举
  8 + * <p>
  9 + * 数据库字段 ieiblp 存储编号:1-草稿,2-启用,3-停用
  10 + * 返回给前端时转换为中文描述
  11 + */
  12 +@Getter
  13 +public enum WorkshopStatusEnum {
  14 +
  15 + /**
  16 + * 草稿
  17 + */
  18 + DRAFT("#1#", "草稿"),
  19 +
  20 + /**
  21 + * 启用
  22 + */
  23 + ENABLED("#2#", "启用"),
  24 +
  25 + /**
  26 + * 停用
  27 + */
  28 + DISABLED("#3#", "停用");
  29 +
  30 + /**
  31 + * 数据库中存储的编号
  32 + */
  33 + private final String code;
  34 +
  35 + /**
  36 + * 中文描述,返回给前端显示
  37 + */
  38 + @JsonValue
  39 + private final String desc;
  40 +
  41 + WorkshopStatusEnum(String code, String desc) {
  42 + this.code = code;
  43 + this.desc = desc;
  44 + }
  45 +
  46 + /**
  47 + * 根据编号获取枚举
  48 + *
  49 + * @param code 编号
  50 + * @return 枚举实例,未找到返回 null
  51 + */
  52 + public static WorkshopStatusEnum fromCode(String code) {
  53 + if (code == null) {
  54 + return null;
  55 + }
  56 + for (WorkshopStatusEnum status : values()) {
  57 + if (status.code.equals(code)) {
  58 + return status;
  59 + }
  60 + }
  61 + return null;
  62 + }
  63 +
  64 + /**
  65 + * 根据编号获取中文描述
  66 + *
  67 + * @param code 编号
  68 + * @return 中文描述,未找到返回原编号
  69 + */
  70 + public static String getDescByCode(String code) {
  71 + WorkshopStatusEnum status = fromCode(code);
  72 + return status != null ? status.getDesc() : code;
  73 + }
  74 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.mapper;
  2 +
  3 +import com.qgutech.qgyun.framework.database.mybatis.registermapper.QguBaseMapper;
  4 +import com.qgutech.qgyun.apaas.sync.cps.model.AbImprovement;
  5 +
  6 +public interface AbImprovementMapper extends QguBaseMapper<AbImprovement> {
  7 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.mapper;
  2 +
  3 +import com.qgutech.qgyun.framework.database.mybatis.registermapper.QguBaseMapper;
  4 +import com.qgutech.qgyun.apaas.sync.cps.model.AbImprovementTarget;
  5 +
  6 +public interface AbImprovementTargetMapper extends QguBaseMapper<AbImprovementTarget> {
  7 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.mapper;
  2 +
  3 +import com.qgutech.qgyun.framework.database.mybatis.registermapper.QguBaseMapper;
  4 +import com.qgutech.qgyun.apaas.sync.cps.model.Area;
  5 +
  6 +public interface AreaMapper extends QguBaseMapper<Area> {
  7 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.mapper;
  2 +
  3 +import com.qgutech.qgyun.framework.database.mybatis.registermapper.QguBaseMapper;
  4 +import com.qgutech.qgyun.apaas.sync.cps.model.CImprovement;
  5 +
  6 +public interface CImprovementMapper extends QguBaseMapper<CImprovement> {
  7 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.mapper;
  2 +
  3 +import com.qgutech.qgyun.framework.database.mybatis.registermapper.QguBaseMapper;
  4 +import com.qgutech.qgyun.apaas.sync.cps.model.CImprovementTarget;
  5 +
  6 +public interface CImprovementTargetMapper extends QguBaseMapper<CImprovementTarget> {
  7 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.mapper;
  2 +
  3 +import com.qgutech.qgyun.framework.database.mybatis.registermapper.QguBaseMapper;
  4 +import com.qgutech.qgyun.apaas.sync.cps.model.CpsProblem;
  5 +
  6 +public interface CpsProblemMapper extends QguBaseMapper<CpsProblem> {
  7 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.mapper;
  2 +
  3 +import com.qgutech.qgyun.framework.database.mybatis.registermapper.QguBaseMapper;
  4 +import com.qgutech.qgyun.apaas.sync.cps.model.Personnel;
  5 +
  6 +public interface PersonnelMapper extends QguBaseMapper<Personnel> {
  7 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.mapper;
  2 +
  3 +import com.qgutech.qgyun.framework.database.mybatis.registermapper.QguBaseMapper;
  4 +import com.qgutech.qgyun.apaas.sync.cps.model.PjoBatch;
  5 +
  6 +public interface PjoBatchMapper extends QguBaseMapper<PjoBatch> {
  7 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.mapper;
  2 +
  3 +import com.qgutech.qgyun.framework.database.mybatis.registermapper.QguBaseMapper;
  4 +import com.qgutech.qgyun.apaas.sync.cps.model.PjoExec;
  5 +
  6 +public interface PjoExecMapper extends QguBaseMapper<PjoExec> {
  7 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.mapper;
  2 +
  3 +import com.qgutech.qgyun.framework.database.mybatis.registermapper.QguBaseMapper;
  4 +import com.qgutech.qgyun.apaas.sync.cps.model.PjoWorkstationExec;
  5 +
  6 +public interface PjoWorkstationExecMapper extends QguBaseMapper<PjoWorkstationExec> {
  7 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.mapper;
  2 +
  3 +import com.qgutech.qgyun.framework.database.mybatis.registermapper.QguBaseMapper;
  4 +import com.qgutech.qgyun.apaas.sync.cps.model.ProcessConfirmExec;
  5 +
  6 +public interface ProcessConfirmExecMapper extends QguBaseMapper<ProcessConfirmExec> {
  7 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.mapper;
  2 +
  3 +import com.qgutech.qgyun.framework.database.mybatis.registermapper.QguBaseMapper;
  4 +import com.qgutech.qgyun.apaas.sync.cps.model.ProcessConfirmPersonnel;
  5 +
  6 +public interface ProcessConfirmPersonnelMapper extends QguBaseMapper<ProcessConfirmPersonnel> {
  7 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.mapper;
  2 +
  3 +import com.qgutech.qgyun.framework.database.mybatis.registermapper.QguBaseMapper;
  4 +import com.qgutech.qgyun.apaas.sync.cps.model.QuarterPersonnel;
  5 +
  6 +public interface QuarterPersonnelMapper extends QguBaseMapper<QuarterPersonnel> {
  7 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.mapper;
  2 +
  3 +import com.qgutech.qgyun.framework.database.mybatis.registermapper.QguBaseMapper;
  4 +import com.qgutech.qgyun.apaas.sync.cps.model.RoomGroup;
  5 +
  6 +public interface RoomGroupMapper extends QguBaseMapper<RoomGroup> {
  7 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.mapper;
  2 +
  3 +import com.qgutech.qgyun.framework.database.mybatis.registermapper.QguBaseMapper;
  4 +import com.qgutech.qgyun.apaas.sync.cps.model.Shift;
  5 +
  6 +public interface ShiftMapper extends QguBaseMapper<Shift> {
  7 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.mapper;
  2 +
  3 +import com.qgutech.qgyun.framework.database.mybatis.registermapper.QguBaseMapper;
  4 +import com.qgutech.qgyun.apaas.sync.cps.model.StdActivityCase;
  5 +
  6 +public interface StdActivityCaseMapper extends QguBaseMapper<StdActivityCase> {
  7 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.mapper;
  2 +
  3 +import com.qgutech.qgyun.framework.database.mybatis.registermapper.QguBaseMapper;
  4 +import com.qgutech.qgyun.apaas.sync.cps.model.Team;
  5 +
  6 +public interface TeamMapper extends QguBaseMapper<Team> {
  7 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.mapper;
  2 +
  3 +import com.qgutech.qgyun.apaas.sync.cps.model.Workshop;
  4 +import com.qgutech.qgyun.framework.database.mybatis.registermapper.QguBaseMapper;
  5 +
  6 +public interface WorkshopMapper extends QguBaseMapper<Workshop> {
  7 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.mapper;
  2 +
  3 +import com.qgutech.qgyun.apaas.sync.cps.model.Workstation;
  4 +import com.qgutech.qgyun.framework.database.mybatis.registermapper.QguBaseMapper;
  5 +
  6 +public interface WorkstationMapper extends QguBaseMapper<Workstation> {
  7 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.mapper;
  2 +
  3 +import com.qgutech.qgyun.framework.database.mybatis.registermapper.QguBaseMapper;
  4 +import com.qgutech.qgyun.apaas.sync.cps.model.XtLine;
  5 +
  6 +public interface XtLineMapper extends QguBaseMapper<XtLine> {
  7 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.model;
  2 +
  3 +import com.qgutech.qgyun.framework.database.model.BaseCorpModel;
  4 +import io.swagger.annotations.ApiModel;
  5 +import io.swagger.annotations.ApiModelProperty;
  6 +import lombok.Getter;
  7 +import lombok.Setter;
  8 +import lombok.ToString;
  9 +
  10 +import javax.persistence.Table;
  11 +import javax.persistence.Transient;
  12 +import java.util.Date;
  13 +
  14 +/**
  15 + * AB类改善
  16 + */
  17 +@Getter
  18 +@Setter
  19 +@ToString
  20 +@Table(name = "t_auto_hfca_ixzvok_sfikan")
  21 +public class AbImprovement extends BaseCorpModel {
  22 +
  23 + public static final String DWCJ = "dwcj";
  24 + public static final String SQRQ = "sqrq";
  25 +
  26 + /*
  27 + * 流程实例名称
  28 + */
  29 + private String lcslmc;
  30 +
  31 + /*
  32 + * 单位车间
  33 + */
  34 + private String dwcj;
  35 +
  36 + /*
  37 + * 申请人
  38 + */
  39 + private String sqr;
  40 +
  41 + /*
  42 + * 申请部门
  43 + */
  44 + private String sqbm;
  45 +
  46 + /*
  47 + * 申请日期
  48 + */
  49 + private Date sqrq;
  50 +
  51 + /*
  52 + * 立项人
  53 + */
  54 + private String lxr;
  55 +
  56 + /*
  57 + * 全年节约价值
  58 + */
  59 + private Double qnjyjz;
  60 +
  61 + /*
  62 + * 改善类型
  63 + */
  64 + private String gslx;
  65 +
  66 + /*
  67 + * 团队人数
  68 + */
  69 + private Double tdrs;
  70 +
  71 + /**********非持久化字段*********/
  72 + //单位车间名称
  73 + @Transient
  74 + private String dwcjName;
  75 + //目标值
  76 + @Transient
  77 + private Double mb;
  78 + //年份-yyyy
  79 + @Transient
  80 + private String year;
  81 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.model;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonFormat;
  4 +import com.qgutech.qgyun.framework.database.model.BaseCorpModel;
  5 +import lombok.Getter;
  6 +import lombok.Setter;
  7 +import lombok.ToString;
  8 +import org.springframework.format.annotation.DateTimeFormat;
  9 +
  10 +import javax.persistence.Table;
  11 +import java.util.Date;
  12 +
  13 +/**
  14 + * AB类改善目标
  15 + */
  16 +@Getter
  17 +@Setter
  18 +@ToString
  19 +@Table(name = "t_auto_hfca_ixzvok_dwmonj")
  20 +public class AbImprovementTarget extends BaseCorpModel {
  21 +
  22 + public static final String DWCJ = "dwcj";
  23 + public static final String YEAR = "year";
  24 +
  25 + /*
  26 + * 年份
  27 + */
  28 + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  29 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  30 + private Date year;
  31 +
  32 + /*
  33 + * 单位车间
  34 + */
  35 + private String dwcj;
  36 +
  37 + /*
  38 + * 目标值
  39 + */
  40 + private Double mb;
  41 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.model;
  2 +
  3 +import com.qgutech.qgyun.framework.database.model.BaseCorpModel;
  4 +import io.swagger.annotations.ApiModel;
  5 +import io.swagger.annotations.ApiModelProperty;
  6 +import lombok.Getter;
  7 +import lombok.Setter;
  8 +import lombok.ToString;
  9 +
  10 +import javax.persistence.Table;
  11 +
  12 +/**
  13 + * 区域信息
  14 + */
  15 +@Getter
  16 +@Setter
  17 +@ToString
  18 +@ApiModel(value = "Area", description = "区域信息")
  19 +@Table(name = "t_auto_hfca_ixzvok_cnfeci")
  20 +public class Area extends BaseCorpModel {
  21 +
  22 + @ApiModelProperty(value = "区域名称")
  23 + private String qymc;
  24 +
  25 + @ApiModelProperty(value = "区域编号")
  26 + private String qybh;
  27 +
  28 + @ApiModelProperty(value = "区域负责人")
  29 + private String qyfzr;
  30 +
  31 + @ApiModelProperty(value = "所属车间")
  32 + private String sscj;
  33 +
  34 + @ApiModelProperty(value = "所属室组")
  35 + private String sssz;
  36 +
  37 + @ApiModelProperty(value = "所属组织")
  38 + private String sszz;
  39 +
  40 + @ApiModelProperty(value = "状态")
  41 + private String zt;
  42 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.model;
  2 +
  3 +import com.qgutech.qgyun.framework.database.model.BaseCorpModel;
  4 +import io.swagger.annotations.ApiModel;
  5 +import io.swagger.annotations.ApiModelProperty;
  6 +import lombok.Getter;
  7 +import lombok.Setter;
  8 +import lombok.ToString;
  9 +
  10 +import javax.persistence.Table;
  11 +
  12 +/**
  13 + * C类改善
  14 + */
  15 +@Getter
  16 +@Setter
  17 +@ToString
  18 +@ApiModel(value = "CImprovement", description = "C类改善")
  19 +@Table(name = "t_auto_hfca_ixzvok_clgsgl")
  20 +public class CImprovement extends BaseCorpModel {
  21 +
  22 + @ApiModelProperty(value = "yh")
  23 + private String yh;
  24 +
  25 + /*
  26 + * 员工号
  27 + */
  28 + private String ygh;
  29 +
  30 + /*
  31 + * 来源问题记录id
  32 + */
  33 + private String lywt;
  34 +
  35 + /*
  36 + * 问题编号
  37 + */
  38 + private String wtbh;
  39 +
  40 + /*
  41 + * 部门id
  42 + */
  43 + private String bm;
  44 +
  45 + @ApiModelProperty(value = "szqymc")
  46 + private String szqymc;
  47 +
  48 + /*
  49 + *是否问题类改善
  50 + */
  51 + private Boolean sfwtlg;
  52 +
  53 + /*
  54 + * 是否是车间班组
  55 + */
  56 + private Boolean sfscjb;
  57 +
  58 + /*
  59 + * 班组信息id
  60 + */
  61 + private String bz;
  62 +
  63 + /*
  64 + * 改善名称
  65 + */
  66 + private String gsmc;
  67 +
  68 + /*
  69 + * 区长确认-组织用户id
  70 + */
  71 + private String qzqr;
  72 +
  73 + /*
  74 + *改善员确认-组织用户id
  75 + */
  76 + private String gsyqr;
  77 +
  78 + /*
  79 + * 是否推送优秀案例
  80 + */
  81 + private Boolean sftsyxal;
  82 +
  83 + /*
  84 + * 状态
  85 + */
  86 + private String zt;
  87 +
  88 + /*
  89 + * 问题说明
  90 + */
  91 + private String wtsm;
  92 +
  93 + /*
  94 + * 改善后效果
  95 + */
  96 + private String gshxg;
  97 +
  98 + /*
  99 + * 发起人
  100 + */
  101 + private String fqr;
  102 +
  103 + /*
  104 + * 室组信息id
  105 + */
  106 + private String szmc;
  107 +
  108 + @ApiModelProperty(value = "流程实例ID")
  109 + private String processInstanceId;
  110 +
  111 + @ApiModelProperty(value = "审批状态")
  112 + private String approvalStatus;
  113 +
  114 + /*
  115 + * 是否推送金点子
  116 + */
  117 + private Boolean sftsjdz;
  118 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.model;
  2 +
  3 +
  4 +import com.fasterxml.jackson.annotation.JsonFormat;
  5 +import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
  6 +import com.fasterxml.jackson.databind.annotation.JsonSerialize;
  7 +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
  8 +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
  9 +import com.qgutech.qgyun.framework.database.model.BaseCorpModel;
  10 +import lombok.Getter;
  11 +import lombok.Setter;
  12 +import lombok.ToString;
  13 +import org.springframework.format.annotation.DateTimeFormat;
  14 +
  15 +import javax.persistence.Table;
  16 +import java.time.LocalDateTime;
  17 +import java.util.Date;
  18 +
  19 +/**
  20 + * C类改善目标
  21 + */
  22 +@Getter
  23 +@Setter
  24 +@ToString
  25 +@Table(name = "t_auto_hfca_ixzvok_jhzvno")
  26 +public class CImprovementTarget extends BaseCorpModel {
  27 +
  28 + /*
  29 + * 年份
  30 + */
  31 + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  32 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  33 + private Date year;
  34 +
  35 + /*
  36 + * 单位车间
  37 + */
  38 + private String dwcj;
  39 +
  40 + /*
  41 + * 室组
  42 + */
  43 + private String szxx;
  44 +
  45 + /*
  46 + * 目标值
  47 + */
  48 + private Double mb;
  49 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.model;
  2 +
  3 +import com.qgutech.qgyun.framework.database.model.BaseCorpModel;
  4 +import io.swagger.annotations.ApiModel;
  5 +import io.swagger.annotations.ApiModelProperty;
  6 +import lombok.Getter;
  7 +import lombok.Setter;
  8 +import lombok.ToString;
  9 +
  10 +import javax.persistence.Table;
  11 +import java.util.Date;
  12 +
  13 +/**
  14 + * CPS体系问题记录信息
  15 + */
  16 +@Getter
  17 +@Setter
  18 +@ToString
  19 +@ApiModel(value = "CpsProblem", description = "CPS体系问题记录信息")
  20 +@Table(name = "t_auto_hfca_ixzvok_cpstxw")
  21 +public class CpsProblem extends BaseCorpModel {
  22 +
  23 + @ApiModelProperty(value = "问题编号")
  24 + private String wtbh;
  25 +
  26 + @ApiModelProperty(value = "问题来源")
  27 + private String wtly;
  28 +
  29 + @ApiModelProperty(value = "问题提出人")
  30 + private String wttcr;
  31 +
  32 + @ApiModelProperty(value = "工作单位")
  33 + private String gzdw;
  34 +
  35 + @ApiModelProperty(value = "所在区域名称")
  36 + private String szqymc;
  37 +
  38 + @ApiModelProperty(value = "人员类别")
  39 + private String rylb;
  40 +
  41 + @ApiModelProperty(value = "问题描述")
  42 + private String wtms;
  43 +
  44 + @ApiModelProperty(value = "问题单位")
  45 + private String wtdw;
  46 +
  47 + @ApiModelProperty(value = "问题附件")
  48 + private String wtfj;
  49 +
  50 + @ApiModelProperty(value = "问题所属板块")
  51 + private String wtssbk;
  52 +
  53 + @ApiModelProperty(value = "问题类别")
  54 + private String wtlb;
  55 +
  56 + @ApiModelProperty(value = "问题性质")
  57 + private String wtxz;
  58 +
  59 + @ApiModelProperty(value = "sfl")
  60 + private String sfl;
  61 +
  62 + @ApiModelProperty(value = "问题是否关闭")
  63 + private Boolean wtsfgb;
  64 +
  65 + @ApiModelProperty(value = "室组")
  66 + private String sz;
  67 +
  68 + @ApiModelProperty(value = "mbghlk")
  69 + private String mbghlk;
  70 +
  71 + @ApiModelProperty(value = "问题处理方式")
  72 + private String wtclfs;
  73 +
  74 + @ApiModelProperty(value = "tntpvy")
  75 + private Date tntpvy;
  76 +
  77 + @ApiModelProperty(value = "gzap")
  78 + private String gzap;
  79 +
  80 + @ApiModelProperty(value = "wtsjz")
  81 + private String wtsjz;
  82 +
  83 + @ApiModelProperty(value = "wtjjcs")
  84 + private String wtjjcs;
  85 +
  86 + @ApiModelProperty(value = "wtzghfj")
  87 + private String wtzghfj;
  88 +
  89 + @ApiModelProperty(value = "wtclr")
  90 + private String wtclr;
  91 +
  92 + @ApiModelProperty(value = "wtclzt")
  93 + private String wtclzt;
  94 +
  95 + @ApiModelProperty(value = "lywt")
  96 + private String lywt;
  97 +
  98 + @ApiModelProperty(value = "zcwt")
  99 + private String zcwt;
  100 +
  101 + @ApiModelProperty(value = "区域")
  102 + private String qy;
  103 +
  104 + @ApiModelProperty(value = "班组")
  105 + private String bz;
  106 +
  107 + @ApiModelProperty(value = "lylx")
  108 + private String lylx;
  109 +
  110 + @ApiModelProperty(value = "jhjjsj")
  111 + private Date jhjjsj;
  112 +
  113 + @ApiModelProperty(value = "wtclfs2")
  114 + private String wtclfs2;
  115 +
  116 + @ApiModelProperty(value = "gzap2")
  117 + private String gzap2;
  118 +
  119 + @ApiModelProperty(value = "wtsjz2")
  120 + private String wtsjz2;
  121 +
  122 + @ApiModelProperty(value = "wtclfs3")
  123 + private String wtclfs3;
  124 +
  125 + @ApiModelProperty(value = "gzap3")
  126 + private String gzap3;
  127 +
  128 + @ApiModelProperty(value = "wtsjz3")
  129 + private String wtsjz3;
  130 +
  131 + @ApiModelProperty(value = "流程实例ID")
  132 + private String processInstanceId;
  133 +
  134 + @ApiModelProperty(value = "审批状态")
  135 + private String approvalStatus;
  136 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.model;
  2 +
  3 +import com.qgutech.qgyun.framework.database.model.BaseCorpModel;
  4 +import io.swagger.annotations.ApiModel;
  5 +import io.swagger.annotations.ApiModelProperty;
  6 +import lombok.Getter;
  7 +import lombok.Setter;
  8 +import lombok.ToString;
  9 +
  10 +import javax.persistence.Table;
  11 +
  12 +/**
  13 + * 人员信息
  14 + */
  15 +@Getter
  16 +@Setter
  17 +@ToString
  18 +@ApiModel(value = "Personnel", description = "人员信息")
  19 +@Table(name = "t_auto_hfca_ixzvok_bzcygl")
  20 +public class Personnel extends BaseCorpModel {
  21 +
  22 + @ApiModelProperty(value = "所属班组")
  23 + private String ssbz;
  24 +
  25 + @ApiModelProperty(value = "姓名")
  26 + private String xm;
  27 +
  28 + @ApiModelProperty(value = "人员")
  29 + private String ry;
  30 +
  31 + @ApiModelProperty(value = "所属部门")
  32 + private String ssbm;
  33 +
  34 + @ApiModelProperty(value = "工号")
  35 + private String gh;
  36 +
  37 + @ApiModelProperty(value = "所属单位")
  38 + private String ssdw;
  39 +
  40 + @ApiModelProperty(value = "所属室组")
  41 + private String sssz;
  42 +
  43 + @ApiModelProperty(value = "所属区域")
  44 + private String ssqy;
  45 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.model;
  2 +
  3 +import com.qgutech.qgyun.framework.database.model.BaseCorpModel;
  4 +import io.swagger.annotations.ApiModel;
  5 +import io.swagger.annotations.ApiModelProperty;
  6 +import lombok.Getter;
  7 +import lombok.Setter;
  8 +import lombok.ToString;
  9 +
  10 +import javax.persistence.Table;
  11 +import java.util.Date;
  12 +
  13 +/**
  14 + * PJO计划批次信息
  15 + */
  16 +@Getter
  17 +@Setter
  18 +@ToString
  19 +@ApiModel(value = "PjoBatch", description = "PJO计划批次信息")
  20 +@Table(name = "t_auto_hfca_ixzvok_ouziyg")
  21 +public class PjoBatch extends BaseCorpModel {
  22 +
  23 + @ApiModelProperty(value = "批次编号")
  24 + private String pcbh;
  25 +
  26 + @ApiModelProperty(value = "批次执行人")
  27 + private String pczxr;
  28 +
  29 + @ApiModelProperty(value = "批次执行开始日期")
  30 + private Date pczxksrq;
  31 +
  32 + @ApiModelProperty(value = "批次执行结束日期")
  33 + private Date pczxjsrq;
  34 +
  35 + @ApiModelProperty(value = "执行区域")
  36 + private String zxqy;
  37 +
  38 + @ApiModelProperty(value = "状态")
  39 + private String zt;
  40 +
  41 + @ApiModelProperty(value = "批次名称")
  42 + private String pcmc;
  43 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.model;
  2 +
  3 +import com.qgutech.qgyun.framework.database.model.BaseCorpModel;
  4 +import io.swagger.annotations.ApiModel;
  5 +import io.swagger.annotations.ApiModelProperty;
  6 +import lombok.Getter;
  7 +import lombok.Setter;
  8 +import lombok.ToString;
  9 +
  10 +import javax.persistence.Table;
  11 +import java.util.Date;
  12 +
  13 +/**
  14 + * PJO计划执行信息
  15 + */
  16 +@Getter
  17 +@Setter
  18 +@ToString
  19 +@ApiModel(value = "PjoExec", description = "PJO计划执行信息")
  20 +@Table(name = "t_auto_hfca_ixzvok_wmkgsv")
  21 +public class PjoExec extends BaseCorpModel {
  22 +
  23 + @ApiModelProperty(value = "当日生产班次")
  24 + private String drscbc;
  25 +
  26 + @ApiModelProperty(value = "qkxdwk")
  27 + private Date qkxdwk;
  28 +
  29 + @ApiModelProperty(value = "PJO执行人")
  30 + private String pjozxr;
  31 +
  32 + @ApiModelProperty(value = "PJO批次")
  33 + private String pjopc;
  34 +
  35 + @ApiModelProperty(value = "车间")
  36 + private String cj;
  37 +
  38 + @ApiModelProperty(value = "产线")
  39 + private String cx;
  40 +
  41 + @ApiModelProperty(value = "CPS区域")
  42 + private String cpsqy;
  43 +
  44 + @ApiModelProperty(value = "班组")
  45 + private String bz;
  46 +
  47 + @ApiModelProperty(value = "PJO观察人姓名")
  48 + private String pjogcrxm;
  49 +
  50 + @ApiModelProperty(value = "工位信息")
  51 + private String gwxx;
  52 +
  53 + @ApiModelProperty(value = "所属批次")
  54 + private String sspc;
  55 +
  56 + @ApiModelProperty(value = "工位性质")
  57 + private String gwxz;
  58 +
  59 + @ApiModelProperty(value = "PJO是否正常开展")
  60 + private Boolean pjosfzckz;
  61 +
  62 + @ApiModelProperty(value = "gchtxzyyc")
  63 + private String gchtxzyyc;
  64 +
  65 + @ApiModelProperty(value = "gchtxcyyc")
  66 + private String gchtxcyyc;
  67 +
  68 + @ApiModelProperty(value = "gcdwt")
  69 + private String gcdwt;
  70 +
  71 + @ApiModelProperty(value = "gcgjjh")
  72 + private String gcgjjh;
  73 +
  74 + @ApiModelProperty(value = "lfwkuc")
  75 + private String lfwkuc;
  76 +
  77 + @ApiModelProperty(value = "zyczdwt")
  78 + private String zyczdwt;
  79 +
  80 + @ApiModelProperty(value = "zdbgwdgsjy")
  81 + private String zdbgwdgsjy;
  82 +
  83 + @ApiModelProperty(value = "lvqwyc")
  84 + private String lvqwyc;
  85 +
  86 + @ApiModelProperty(value = "zyqm")
  87 + private String zyqm;
  88 +
  89 + @ApiModelProperty(value = "zysfyjy")
  90 + private Boolean zysfyjy;
  91 +
  92 + @ApiModelProperty(value = "cyjy")
  93 + private String cyjy;
  94 +
  95 + @ApiModelProperty(value = "zyjy")
  96 + private String zyjy;
  97 +
  98 + @ApiModelProperty(value = "状态")
  99 + private String zt;
  100 +
  101 + @ApiModelProperty(value = "区域")
  102 + private String qy;
  103 +
  104 + @ApiModelProperty(value = "gwxx2")
  105 + private String gwxx2;
  106 +
  107 + @ApiModelProperty(value = "zyqmb")
  108 + private String zyqmb;
  109 +
  110 + @ApiModelProperty(value = "gwzx1")
  111 + private String gwzx1;
  112 +
  113 + @ApiModelProperty(value = "gwzx2")
  114 + private String gwzx2;
  115 +
  116 + @ApiModelProperty(value = "线体")
  117 + private String xt;
  118 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.model;
  2 +
  3 +import com.qgutech.qgyun.framework.database.model.BaseCorpModel;
  4 +import io.swagger.annotations.ApiModel;
  5 +import io.swagger.annotations.ApiModelProperty;
  6 +import lombok.Getter;
  7 +import lombok.Setter;
  8 +import lombok.ToString;
  9 +
  10 +import javax.persistence.Table;
  11 +
  12 +/**
  13 + * PJO计划工位执行情况信息
  14 + */
  15 +@Getter
  16 +@Setter
  17 +@ToString
  18 +@ApiModel(value = "PjoWorkstationExec", description = "PJO计划工位执行情况信息")
  19 +@Table(name = "t_auto_hfca_ixzvok_kjpssd")
  20 +public class PjoWorkstationExec extends BaseCorpModel {
  21 +
  22 + @ApiModelProperty(value = "工位状态")
  23 + private String gwzt;
  24 +
  25 + @ApiModelProperty(value = "PJO批次")
  26 + private String pjopc;
  27 +
  28 + @ApiModelProperty(value = "工位")
  29 + private String gw;
  30 +
  31 + @ApiModelProperty(value = "clbcfl")
  32 + private Double clbcfl;
  33 +
  34 + @ApiModelProperty(value = "工位名称")
  35 + private String gwmc;
  36 +
  37 + @ApiModelProperty(value = "工位编号")
  38 + private String gwbh;
  39 +
  40 + @ApiModelProperty(value = "所属车间")
  41 + private String sscj;
  42 +
  43 + @ApiModelProperty(value = "所属区域")
  44 + private String ssqy;
  45 +
  46 + @ApiModelProperty(value = "工位执行所属班组")
  47 + private String gwzxssbz;
  48 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.model;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonFormat;
  4 +import com.qgutech.qgyun.framework.database.model.BaseCorpModel;
  5 +import io.swagger.annotations.ApiModel;
  6 +import io.swagger.annotations.ApiModelProperty;
  7 +import lombok.Getter;
  8 +import lombok.Setter;
  9 +import lombok.ToString;
  10 +import org.springframework.format.annotation.DateTimeFormat;
  11 +
  12 +import javax.persistence.Table;
  13 +import java.util.Date;
  14 +
  15 +/**
  16 + * 过程确认计划执行记录信息
  17 + */
  18 +@Getter
  19 +@Setter
  20 +@ToString
  21 +@ApiModel(value = "ProcessConfirmExec", description = "过程确认计划执行记录信息")
  22 +@Table(name = "t_auto_hfca_ixzvok_gcqrjhzx")
  23 +public class ProcessConfirmExec extends BaseCorpModel {
  24 +
  25 + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  26 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  27 + @ApiModelProperty(value = "活动执行日期")
  28 + private Date hdzxrq;
  29 +
  30 + @ApiModelProperty(value = "过程确认计划人员")
  31 + private String gcqrjhry;
  32 +
  33 + @ApiModelProperty(value = "执行人员")
  34 + private String zxry;
  35 +
  36 + @ApiModelProperty(value = "工号")
  37 + private String gh;
  38 +
  39 + @ApiModelProperty(value = "人员类别")
  40 + private String rylb;
  41 +
  42 + @ApiModelProperty(value = "单位")
  43 + private String dw;
  44 +
  45 + @ApiModelProperty(value = "室组")
  46 + private String sz;
  47 +
  48 + @ApiModelProperty(value = "区域")
  49 + private String qy;
  50 +
  51 + @ApiModelProperty(value = "班组")
  52 + private String bz;
  53 +
  54 + @ApiModelProperty(value = "线体")
  55 + private String xt;
  56 +
  57 + @ApiModelProperty(value = "班次")
  58 + private String bc;
  59 +
  60 + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  61 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  62 + @ApiModelProperty(value = "过期时间")
  63 + private Date gqsj;
  64 +
  65 + @ApiModelProperty(value = "状态")
  66 + private String zt;
  67 +
  68 + @ApiModelProperty(value = "是否已执行")
  69 + private Boolean sfyzx;
  70 +
  71 + @ApiModelProperty(value = "未执行原因说明")
  72 + private String wzxyysm;
  73 +
  74 + @ApiModelProperty(value = "是否发现问题")
  75 + private Boolean sffxwt;
  76 +
  77 + @ApiModelProperty(value = "未执行原因")
  78 + private String wzxyys;
  79 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.model;
  2 +
  3 +import com.qgutech.qgyun.framework.database.model.BaseCorpModel;
  4 +import io.swagger.annotations.ApiModel;
  5 +import io.swagger.annotations.ApiModelProperty;
  6 +import lombok.Getter;
  7 +import lombok.Setter;
  8 +import lombok.ToString;
  9 +
  10 +import javax.persistence.Table;
  11 +import java.util.Date;
  12 +
  13 +/**
  14 + * 过程确认维护人员信息
  15 + */
  16 +@Getter
  17 +@Setter
  18 +@ToString
  19 +@ApiModel(value = "ProcessConfirmPersonnel", description = "过程确认维护人员信息")
  20 +@Table(name = "t_auto_hfca_ixzvok_gcjhrywh")
  21 +public class ProcessConfirmPersonnel extends BaseCorpModel {
  22 +
  23 + @ApiModelProperty(value = "活动执行日期")
  24 + private Date hdzxrq;
  25 +
  26 + @ApiModelProperty(value = "执行人员")
  27 + private String zxry;
  28 +
  29 + @ApiModelProperty(value = "活动执行人姓名")
  30 + private String hdzxrxm;
  31 +
  32 + @ApiModelProperty(value = "工号")
  33 + private String gh;
  34 +
  35 + @ApiModelProperty(value = "工作单位")
  36 + private String gzdw;
  37 +
  38 + @ApiModelProperty(value = "人员类别")
  39 + private String rylb;
  40 +
  41 + @ApiModelProperty(value = "所在区域名称")
  42 + private String szqymc;
  43 +
  44 + @ApiModelProperty(value = "班组")
  45 + private String bz;
  46 +
  47 + @ApiModelProperty(value = "线体")
  48 + private String xt;
  49 +
  50 + @ApiModelProperty(value = "班次")
  51 + private String bc;
  52 +
  53 + @ApiModelProperty(value = "过期时间")
  54 + private Date gqsj;
  55 +
  56 + @ApiModelProperty(value = "状态")
  57 + private String zt;
  58 +
  59 + @ApiModelProperty(value = "过程执行")
  60 + private String gczx;
  61 +
  62 + @ApiModelProperty(value = "未执行原因")
  63 + private String wzxyy;
  64 +
  65 + @ApiModelProperty(value = "是否发现问题")
  66 + private Boolean sffxwt;
  67 +
  68 + @ApiModelProperty(value = "单位名称")
  69 + private String dwmc;
  70 +
  71 + @ApiModelProperty(value = "单位编号")
  72 + private String dwbh;
  73 +
  74 + @ApiModelProperty(value = "单位负责人")
  75 + private String dwfzr;
  76 +
  77 + @ApiModelProperty(value = "人员")
  78 + private String ry;
  79 +
  80 + @ApiModelProperty(value = "人员所属单位")
  81 + private String ryssdw;
  82 +
  83 + @ApiModelProperty(value = "所属室组")
  84 + private String sssz;
  85 +
  86 + @ApiModelProperty(value = "所属班组")
  87 + private String ssbz;
  88 +
  89 + @ApiModelProperty(value = "室组")
  90 + private String sz;
  91 +
  92 + @ApiModelProperty(value = "区域")
  93 + private String qy;
  94 +
  95 + @ApiModelProperty(value = "所属区域")
  96 + private String ssqy;
  97 +
  98 + @ApiModelProperty(value = "eaohkg")
  99 + private String eaohkg;
  100 +
  101 + @ApiModelProperty(value = "过程确认计划人员")
  102 + private String gcqrjhry;
  103 +
  104 + @ApiModelProperty(value = "单位")
  105 + private String dw;
  106 +
  107 + @ApiModelProperty(value = "所属单位")
  108 + private String ssdw;
  109 +
  110 + @ApiModelProperty(value = "所属线体")
  111 + private String ssxt;
  112 +
  113 + @ApiModelProperty(value = "人员姓名")
  114 + private String ryxm;
  115 +
  116 + @ApiModelProperty(value = "是否已执行")
  117 + private Boolean sfyzx;
  118 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.model;
  2 +
  3 +import com.qgutech.qgyun.framework.database.model.BaseCorpModel;
  4 +import io.swagger.annotations.ApiModel;
  5 +import io.swagger.annotations.ApiModelProperty;
  6 +import lombok.Getter;
  7 +import lombok.Setter;
  8 +import lombok.ToString;
  9 +
  10 +import javax.persistence.Table;
  11 +
  12 +/**
  13 + * 季度人员信息
  14 + */
  15 +@Getter
  16 +@Setter
  17 +@ToString
  18 +@ApiModel(value = "QuarterPersonnel", description = "季度人员信息")
  19 +@Table(name = "t_auto_hfca_ixzvok_wltctp")
  20 +public class QuarterPersonnel extends BaseCorpModel {
  21 +
  22 + @ApiModelProperty(value = "季度信息")
  23 + private String jdxx;
  24 +
  25 + @ApiModelProperty(value = "员工人员")
  26 + private String yhry;
  27 +
  28 + @ApiModelProperty(value = "人员工号")
  29 + private String rygh;
  30 +
  31 + @ApiModelProperty(value = "所在单位")
  32 + private String shdw;
  33 +
  34 + @ApiModelProperty(value = "所在室组")
  35 + private String shsz;
  36 +
  37 + @ApiModelProperty(value = "所属区域")
  38 + private String ssqy;
  39 +
  40 + @ApiModelProperty(value = "所属班组")
  41 + private String ssbz;
  42 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.model;
  2 +
  3 +import com.qgutech.qgyun.framework.database.model.BaseCorpModel;
  4 +import io.swagger.annotations.ApiModel;
  5 +import io.swagger.annotations.ApiModelProperty;
  6 +import lombok.Getter;
  7 +import lombok.Setter;
  8 +import lombok.ToString;
  9 +
  10 +import javax.persistence.Table;
  11 +
  12 +/**
  13 + * 室组信息
  14 + */
  15 +@Getter
  16 +@Setter
  17 +@ToString
  18 +@ApiModel(value = "RoomGroup", description = "室组信息")
  19 +@Table(name = "t_auto_hfca_ixzvok_efawtt")
  20 +public class RoomGroup extends BaseCorpModel {
  21 +
  22 + @ApiModelProperty(value = "室组名称")
  23 + private String szmc;
  24 +
  25 + @ApiModelProperty(value = "室组编号")
  26 + private String szbh;
  27 +
  28 + @ApiModelProperty(value = "室组负责人")
  29 + private String szfzr;
  30 +
  31 + @ApiModelProperty(value = "所属单位")
  32 + private String ssdw;
  33 +
  34 + @ApiModelProperty(value = "所属组织")
  35 + private String sszz;
  36 +
  37 + @ApiModelProperty(value = "状态")
  38 + private String zt;
  39 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.model;
  2 +
  3 +import com.qgutech.qgyun.framework.database.model.BaseCorpModel;
  4 +import io.swagger.annotations.ApiModel;
  5 +import io.swagger.annotations.ApiModelProperty;
  6 +import lombok.Getter;
  7 +import lombok.Setter;
  8 +import lombok.ToString;
  9 +
  10 +import javax.persistence.Table;
  11 +
  12 +/**
  13 + * 班次信息
  14 + */
  15 +@Getter
  16 +@Setter
  17 +@ToString
  18 +@ApiModel(value = "Shift", description = "班次信息")
  19 +@Table(name = "t_auto_hfca_ixzvok_usnoxx")
  20 +public class Shift extends BaseCorpModel {
  21 +
  22 + @ApiModelProperty(value = "班次名称")
  23 + private String bcmc;
  24 +
  25 + @ApiModelProperty(value = "班次编号")
  26 + private String bcbh;
  27 +
  28 + @ApiModelProperty(value = "班次类型")
  29 + private String bclx;
  30 +
  31 + @ApiModelProperty(value = "状态")
  32 + private String zt;
  33 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.model;
  2 +
  3 +import com.qgutech.qgyun.framework.database.model.BaseCorpModel;
  4 +import io.swagger.annotations.ApiModel;
  5 +import io.swagger.annotations.ApiModelProperty;
  6 +import lombok.Getter;
  7 +import lombok.Setter;
  8 +import lombok.ToString;
  9 +
  10 +import javax.persistence.Table;
  11 +
  12 +/**
  13 + * 标准活动优秀案例
  14 + */
  15 +@Getter
  16 +@Setter
  17 +@ToString
  18 +@ApiModel(value = "StdActivityCase", description = "标准活动优秀案例")
  19 +@Table(name = "t_auto_hfca_ixzvok_bzhdyx")
  20 +public class StdActivityCase extends BaseCorpModel {
  21 +
  22 + @ApiModelProperty(value = "hdzxr")
  23 + private String hdzxr;
  24 +
  25 + @ApiModelProperty(value = "ygbh")
  26 + private String ygbh;
  27 +
  28 + @ApiModelProperty(value = "gzdw")
  29 + private String gzdw;
  30 +
  31 + @ApiModelProperty(value = "szqymc")
  32 + private String szqymc;
  33 +
  34 + @ApiModelProperty(value = "xt")
  35 + private String xt;
  36 +
  37 + @ApiModelProperty(value = "wtbm")
  38 + private String wtbm;
  39 +
  40 + @ApiModelProperty(value = "tjalfj")
  41 + private String tjalfj;
  42 +
  43 + @ApiModelProperty(value = "qz")
  44 + private String qz;
  45 +
  46 + @ApiModelProperty(value = "bdwcps")
  47 + private String bdwcps;
  48 +
  49 + @ApiModelProperty(value = "dwldsh")
  50 + private String dwldsh;
  51 +
  52 + @ApiModelProperty(value = "_c_sftscp")
  53 + private String cSftscp;
  54 +
  55 + @ApiModelProperty(value = "sftscp")
  56 + private Boolean sftscp;
  57 +
  58 + @ApiModelProperty(value = "sz")
  59 + private String sz;
  60 +
  61 + @ApiModelProperty(value = "bdwcpstxy")
  62 + private String bdwcpstxy;
  63 +
  64 + @ApiModelProperty(value = "sftscps")
  65 + private String sftscps;
  66 +
  67 + @ApiModelProperty(value = "zt")
  68 + private String zt;
  69 +
  70 + @ApiModelProperty(value = "流程实例ID")
  71 + private String processInstanceId;
  72 +
  73 + @ApiModelProperty(value = "审批状态")
  74 + private String approvalStatus;
  75 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.model;
  2 +
  3 +import com.qgutech.qgyun.framework.database.model.BaseCorpModel;
  4 +import io.swagger.annotations.ApiModel;
  5 +import io.swagger.annotations.ApiModelProperty;
  6 +import lombok.Getter;
  7 +import lombok.Setter;
  8 +import lombok.ToString;
  9 +
  10 +import javax.persistence.Table;
  11 +
  12 +/**
  13 + * 班组信息
  14 + */
  15 +@Getter
  16 +@Setter
  17 +@ToString
  18 +@ApiModel(value = "Team", description = "班组信息")
  19 +@Table(name = "t_auto_hfca_ixzvok_bzxxgl")
  20 +public class Team extends BaseCorpModel {
  21 +
  22 + @ApiModelProperty(value = "班组名称")
  23 + private String bzmc;
  24 +
  25 + @ApiModelProperty(value = "班组编号")
  26 + private String bzbh;
  27 +
  28 + @ApiModelProperty(value = "班组负责人")
  29 + private String bzfzr;
  30 +
  31 + @ApiModelProperty(value = "所属区域")
  32 + private String ssqy;
  33 +
  34 + @ApiModelProperty(value = "班次")
  35 + private String bc;
  36 +
  37 + @ApiModelProperty(value = "iytfgx")
  38 + private String iytfgx;
  39 +
  40 + @ApiModelProperty(value = "班组成员")
  41 + private String bzcy;
  42 +
  43 + @ApiModelProperty(value = "所属组织")
  44 + private String sszz;
  45 +
  46 + @ApiModelProperty(value = "状态")
  47 + private String zt;
  48 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.model;
  2 +
  3 +import com.qgutech.qgyun.apaas.sync.cps.enums.WorkshopStatusEnum;
  4 +import com.qgutech.qgyun.framework.database.model.BaseCorpModel;
  5 +import io.swagger.annotations.ApiModelProperty;
  6 +import lombok.Getter;
  7 +import lombok.Setter;
  8 +import lombok.ToString;
  9 +
  10 +import javax.persistence.Table;
  11 +import javax.persistence.Transient;
  12 +
  13 +/**
  14 + * 单位(车间)信息
  15 + */
  16 +@Getter
  17 +@Setter
  18 +@ToString
  19 +@Table(name = "t_auto_hfca_ixzvok_phwifn")
  20 +public class Workshop extends BaseCorpModel {
  21 +
  22 + /**
  23 + * 单位名称
  24 + */
  25 + private String dwmc;
  26 +
  27 + @ApiModelProperty(value = "单位编号")
  28 + private String dwbh;
  29 +
  30 + @ApiModelProperty(value = "所属线体")
  31 + private String ssxt;
  32 +
  33 + @ApiModelProperty(value = "单位负责人")
  34 + private String dwfzr;
  35 +
  36 + @ApiModelProperty(value = "所属组织")
  37 + private String sszz;
  38 +
  39 + /**
  40 + * 状态-#1#:草稿;#2#:启用;#3#:停用;
  41 + */
  42 + @ApiModelProperty(value = "状态", hidden = true)
  43 + private String ieiblp;
  44 +
  45 + /**
  46 + * 状态中文描述(非数据库字段,用于前端展示)
  47 + */
  48 + @Transient
  49 + @ApiModelProperty(value = "状态描述")
  50 + private String statusDesc;
  51 +
  52 + /**
  53 + * 获取状态中文描述
  54 + *
  55 + * @return 状态中文描述
  56 + */
  57 + public String getStatusDesc() {
  58 + return WorkshopStatusEnum.getDescByCode(this.ieiblp);
  59 + }
  60 +
  61 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.model;
  2 +
  3 +import com.qgutech.qgyun.framework.database.model.BaseCorpModel;
  4 +import io.swagger.annotations.ApiModel;
  5 +import io.swagger.annotations.ApiModelProperty;
  6 +import lombok.Getter;
  7 +import lombok.Setter;
  8 +import lombok.ToString;
  9 +
  10 +import javax.persistence.Table;
  11 +
  12 +/**
  13 + * 工位信息
  14 + */
  15 +@Getter
  16 +@Setter
  17 +@ToString
  18 +@ApiModel(value = "Workstation", description = "工位信息")
  19 +@Table(name = "t_auto_hfca_ixzvok_jtcffk")
  20 +public class Workstation extends BaseCorpModel {
  21 +
  22 + @ApiModelProperty(value = "工位名称")
  23 + private String gwmc;
  24 +
  25 + @ApiModelProperty(value = "工位编号")
  26 + private String gwbh;
  27 +
  28 + @ApiModelProperty(value = "工位性质")
  29 + private String gwxz;
  30 +
  31 + @ApiModelProperty(value = "所属区域")
  32 + private String ssqy;
  33 +
  34 + @ApiModelProperty(value = "所属班组")
  35 + private String ssbz;
  36 +
  37 + @ApiModelProperty(value = "所属车间")
  38 + private String sscj;
  39 +
  40 + @ApiModelProperty(value = "所属室组")
  41 + private String ssqz;
  42 +
  43 + @ApiModelProperty(value = "状态")
  44 + private String zt;
  45 +
  46 + @ApiModelProperty(value = "线体")
  47 + private String xt;
  48 +
  49 + @ApiModelProperty(value = "byiwiz")
  50 + private String byiwiz;
  51 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.model;
  2 +
  3 +import com.qgutech.qgyun.framework.database.model.BaseCorpModel;
  4 +import io.swagger.annotations.ApiModel;
  5 +import io.swagger.annotations.ApiModelProperty;
  6 +import lombok.Getter;
  7 +import lombok.Setter;
  8 +import lombok.ToString;
  9 +
  10 +import javax.persistence.Table;
  11 +
  12 +/**
  13 + * 线体信息
  14 + */
  15 +@Getter
  16 +@Setter
  17 +@ToString
  18 +@ApiModel(value = "XtLine", description = "线体信息")
  19 +@Table(name = "t_auto_hfca_ixzvok_umsoxi")
  20 +public class XtLine extends BaseCorpModel {
  21 +
  22 + @ApiModelProperty(value = "线体名称")
  23 + private String xtmc;
  24 +
  25 + @ApiModelProperty(value = "线体编号")
  26 + private String xtbh;
  27 +
  28 + @ApiModelProperty(value = "线体负责人")
  29 + private String xtfzr;
  30 +
  31 + @ApiModelProperty(value = "amoigs")
  32 + private String amoigs;
  33 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.service;
  2 +
  3 +import com.qgutech.qgyun.apaas.sync.utils.DateDealUtils;
  4 +import com.qgutech.qgyun.framework.database.mybatis.service.BaseServiceImpl;
  5 +import com.qgutech.qgyun.apaas.sync.base.BoErrorCode;
  6 +import com.qgutech.qgyun.apaas.sync.base.BoException;
  7 +import com.qgutech.qgyun.apaas.sync.cps.dto.AbImprovementSummaryDTO;
  8 +import com.qgutech.qgyun.apaas.sync.cps.mapper.AbImprovementMapper;
  9 +import com.qgutech.qgyun.apaas.sync.cps.mapper.AbImprovementTargetMapper;
  10 +import com.qgutech.qgyun.apaas.sync.cps.model.AbImprovement;
  11 +import com.qgutech.qgyun.apaas.sync.cps.model.AbImprovementTarget;
  12 +import com.qgutech.qgyun.apaas.sync.cps.model.Workshop;
  13 +import org.apache.commons.collections4.CollectionUtils;
  14 +import org.apache.commons.lang3.StringUtils;
  15 +import org.springframework.stereotype.Service;
  16 +import org.springframework.transaction.annotation.Transactional;
  17 +import org.springframework.util.Assert;
  18 +import tk.mybatis.mapper.entity.Example;
  19 +
  20 +import javax.annotation.Resource;
  21 +import java.text.ParseException;
  22 +import java.text.SimpleDateFormat;
  23 +import java.util.*;
  24 +import java.util.stream.Collectors;
  25 +
  26 +/**
  27 + * AbImprovement 服务
  28 + */
  29 +@Service
  30 +public class AbImprovementService extends BaseServiceImpl<AbImprovement> {
  31 +
  32 + @Resource
  33 + private AbImprovementMapper abImprovementMapper;
  34 +
  35 + @Resource
  36 + private AbImprovementTargetService abImprovementTargetService;
  37 +
  38 + @Resource
  39 + private WorkshopService workshopService;
  40 +
  41 + @Transactional(readOnly = true)
  42 + public AbImprovement getById(String id) {
  43 + Assert.hasLength(id, "id is empty!");
  44 +
  45 + Example example = new Example(entityClass);
  46 + example.createCriteria().andEqualTo(AbImprovement.ID, id);
  47 + AbImprovement abImprovement = abImprovementMapper.selectOneByExample(example);
  48 + if (null == abImprovement) {
  49 + throw new BoException(BoErrorCode.DATA_ERROR);
  50 + }
  51 + return abImprovement;
  52 + }
  53 +
  54 + @Transactional(readOnly = true)
  55 + public List<AbImprovement> listByIds(Collection<String> ids) {
  56 + Assert.notEmpty(ids, "ids is empty!");
  57 +
  58 + Example example = new Example(entityClass);
  59 + example.createCriteria().andIn(AbImprovement.ID, ids);
  60 + List<AbImprovement> abImprovementList = abImprovementMapper.selectByExample(example);
  61 + if (CollectionUtils.isEmpty(abImprovementList)) {
  62 + return new ArrayList<>(0);
  63 + }
  64 + return abImprovementList;
  65 + }
  66 +
  67 + @Transactional(readOnly = true)
  68 + public Map<String, AbImprovement> mapByIds(Collection<String> ids) {
  69 + Assert.notEmpty(ids, "ids is empty!");
  70 +
  71 + List<AbImprovement> abImprovementList = listByIds(ids);
  72 + if (CollectionUtils.isEmpty(abImprovementList)) {
  73 + return new HashMap<>(0);
  74 + }
  75 +
  76 + return abImprovementList.stream().collect(Collectors.toMap(AbImprovement::getId, abImprovement -> abImprovement));
  77 + }
  78 +
  79 + @Transactional(readOnly = true)
  80 + public List<AbImprovement> listAll() {
  81 +
  82 + return abImprovementMapper.selectAll();
  83 + }
  84 +
  85 + /**
  86 + * 根据年份查询AB类改善汇总(按单位车间分组)
  87 + * <p>
  88 + * 年份为空时默认查询当前年
  89 + *
  90 + * @param year 年份,格式:yyyy,可为空
  91 + * @return AB类改善汇总列表
  92 + */
  93 + @Transactional(readOnly = true)
  94 + public List<AbImprovementSummaryDTO> summaryByYear(String year) {
  95 + // 1. 处理年份参数,为空时默认为当前年
  96 + String queryYear = StringUtils.isBlank(year) ? String.valueOf(Calendar.getInstance().get(Calendar.YEAR)) : year;
  97 + Assert.isTrue(queryYear.matches("\\d{4}"), "year format must be yyyy!");
  98 +
  99 + // 2. 计算年份的开始时间和结束时间
  100 + Date startTime = DateDealUtils.parseYearStartTime(queryYear);
  101 + Date endTime = DateDealUtils.parseYearEndTime(queryYear);
  102 +
  103 + // 3. 查询该年份的所有AB类改善记录
  104 + Example example = new Example(AbImprovement.class);
  105 + example.createCriteria()
  106 + .andBetween(AbImprovement.CREATED_AT, startTime, endTime);
  107 + List<AbImprovement> abImprovementList = abImprovementMapper.selectByExample(example);
  108 +
  109 + if (CollectionUtils.isEmpty(abImprovementList)) {
  110 + return new ArrayList<>(0);
  111 + }
  112 +
  113 + // 4. 按单位车间(dwcj存Workshop主键id)分组,汇总节约价值(qnjyjz为空按0计入,避免丢失单位)
  114 + Map<String, Double> dwcjSummaryMap = abImprovementList.stream()
  115 + .filter(item -> item.getDwcj() != null)
  116 + .collect(Collectors.groupingBy(
  117 + AbImprovement::getDwcj,
  118 + Collectors.summingDouble(item -> item.getQnjyjz() == null ? 0.0D : item.getQnjyjz())
  119 + ));
  120 +
  121 + if (dwcjSummaryMap.isEmpty()) {
  122 + return new ArrayList<>(0);
  123 + }
  124 +
  125 + // 5. 查询该年份的AB类目标信息
  126 + List<AbImprovementTarget> targetList = abImprovementTargetService.listByYear(queryYear);
  127 +
  128 + // 构建目标值映射Map:dwcj -> mb
  129 + Map<String, Double> targetMap = new HashMap<>();
  130 + if (CollectionUtils.isNotEmpty(targetList)) {
  131 + targetMap = targetList.stream()
  132 + .filter(item -> item.getDwcj() != null && item.getMb() != null)
  133 + .collect(Collectors.toMap(
  134 + AbImprovementTarget::getDwcj,
  135 + AbImprovementTarget::getMb,
  136 + (v1, v2) -> v1
  137 + ));
  138 + }
  139 +
  140 + // 6. 根据分组得到的单位车间id集合,查询单位车间详细信息
  141 + Set<String> dwcjIds = dwcjSummaryMap.keySet();
  142 + Map<String, Workshop> workshopMap = workshopService.mapByIds(dwcjIds);
  143 +
  144 + // 7. 组装汇总结果(每个单位车间一条记录)
  145 + Map<String, Double> finalTargetMap = targetMap;
  146 + return dwcjSummaryMap.entrySet().stream()
  147 + .map(entry -> {
  148 + String dwcj = entry.getKey();
  149 + AbImprovementSummaryDTO dto = new AbImprovementSummaryDTO();
  150 + dto.setDwcj(dwcj);
  151 + dto.setYear(queryYear);
  152 + dto.setTotalQnjyjz(entry.getValue());
  153 + dto.setMb(finalTargetMap.get(dwcj));
  154 + // 设置单位车间名称
  155 + Workshop workshop = workshopMap.get(dwcj);
  156 + if (workshop != null) {
  157 + dto.setDwcjName(workshop.getDwmc());
  158 + dto.setDwcjCode(workshop.getDwbh());
  159 + }
  160 + // 计算完成率
  161 + if (dto.getMb() != null && dto.getMb() > 0) {
  162 + dto.setCompletionRate(Math.round(entry.getValue() / dto.getMb() * 10000) / 100.0);
  163 + }
  164 + return dto;
  165 + })
  166 + .collect(Collectors.toList());
  167 + }
  168 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.service;
  2 +
  3 +import com.qgutech.qgyun.apaas.sync.cps.mapper.AbImprovementTargetMapper;
  4 +import com.qgutech.qgyun.apaas.sync.cps.model.AbImprovement;
  5 +import com.qgutech.qgyun.apaas.sync.cps.model.AbImprovementTarget;
  6 +import com.qgutech.qgyun.apaas.sync.utils.DateDealUtils;
  7 +import com.qgutech.qgyun.framework.database.mybatis.service.BaseServiceImpl;
  8 +import org.apache.commons.collections4.CollectionUtils;
  9 +import org.apache.commons.lang3.StringUtils;
  10 +import org.springframework.stereotype.Service;
  11 +import org.springframework.transaction.annotation.Transactional;
  12 +import org.springframework.util.Assert;
  13 +import tk.mybatis.mapper.entity.Example;
  14 +
  15 +import javax.annotation.Resource;
  16 +import java.util.ArrayList;
  17 +import java.util.Calendar;
  18 +import java.util.Date;
  19 +import java.util.List;
  20 +
  21 +/**
  22 + * AbImprovementTarget 服务
  23 + */
  24 +@Service
  25 +public class AbImprovementTargetService extends BaseServiceImpl<AbImprovementTarget> {
  26 +
  27 + @Resource
  28 + private AbImprovementTargetMapper abImprovementTargetMapper;
  29 +
  30 +
  31 + @Transactional(readOnly = true)
  32 + public List<AbImprovementTarget> listByYear(String year) {
  33 + // 1. 处理年份参数,为空时默认为当前年
  34 + String queryYear = StringUtils.isBlank(year) ? String.valueOf(Calendar.getInstance().get(Calendar.YEAR)) : year;
  35 + Assert.isTrue(queryYear.matches("\\d{4}"), "year format must be yyyy!");
  36 +
  37 + // 2. 计算年份的开始时间和结束时间
  38 + Date startTime = DateDealUtils.parseYearStartTime(queryYear);
  39 + Date endTime = DateDealUtils.parseYearEndTime(queryYear);
  40 +
  41 + // 5. 查询该年份的AB类目标信息
  42 + Example targetExample = new Example(entityClass);
  43 + targetExample.createCriteria()
  44 + .andBetween(AbImprovementTarget.YEAR, startTime, endTime);
  45 + List<AbImprovementTarget> targetList = abImprovementTargetMapper.selectByExample(targetExample);
  46 + if (CollectionUtils.isEmpty(targetList)) {
  47 + return new ArrayList<>(0);
  48 + }
  49 + return targetList;
  50 + }
  51 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.service;
  2 +
  3 +import com.qgutech.qgyun.framework.database.mybatis.service.BaseServiceImpl;
  4 +import com.qgutech.qgyun.apaas.sync.base.BoErrorCode;
  5 +import com.qgutech.qgyun.apaas.sync.base.BoException;
  6 +import com.qgutech.qgyun.apaas.sync.cps.mapper.AreaMapper;
  7 +import com.qgutech.qgyun.apaas.sync.cps.model.Area;
  8 +import org.apache.commons.collections4.CollectionUtils;
  9 +import org.springframework.stereotype.Service;
  10 +import org.springframework.transaction.annotation.Transactional;
  11 +import org.springframework.util.Assert;
  12 +import tk.mybatis.mapper.entity.Example;
  13 +
  14 +import javax.annotation.Resource;
  15 +import java.util.*;
  16 +import java.util.stream.Collectors;
  17 +
  18 +/**
  19 + * Area 服务
  20 + */
  21 +@Service
  22 +public class AreaService extends BaseServiceImpl<Area> {
  23 +
  24 + @Resource
  25 + private AreaMapper areaMapper;
  26 +
  27 + @Transactional(readOnly = true)
  28 + public Area getById(String id) {
  29 + Assert.hasLength(id, "id is empty!");
  30 +
  31 + Example example = new Example(entityClass);
  32 + example.createCriteria().andEqualTo(Area.ID, id);
  33 + Area area = areaMapper.selectOneByExample(example);
  34 + if (null == area) {
  35 + throw new BoException(BoErrorCode.DATA_ERROR);
  36 + }
  37 + return area;
  38 + }
  39 +
  40 + @Transactional(readOnly = true)
  41 + public List<Area> listByIds(Collection<String> ids) {
  42 + Assert.notEmpty(ids, "ids is empty!");
  43 +
  44 + Example example = new Example(entityClass);
  45 + example.createCriteria().andIn(Area.ID, ids);
  46 + List<Area> areaList = areaMapper.selectByExample(example);
  47 + if (CollectionUtils.isEmpty(areaList)) {
  48 + return new ArrayList<>(0);
  49 + }
  50 + return areaList;
  51 + }
  52 +
  53 + @Transactional(readOnly = true)
  54 + public Map<String, Area> mapByIds(Collection<String> ids) {
  55 + Assert.notEmpty(ids, "ids is empty!");
  56 +
  57 + List<Area> areaList = listByIds(ids);
  58 + if (CollectionUtils.isEmpty(areaList)) {
  59 + return new HashMap<>(0);
  60 + }
  61 +
  62 + return areaList.stream().collect(Collectors.toMap(Area::getId, area -> area));
  63 + }
  64 +
  65 + @Transactional(readOnly = true)
  66 + public List<Area> listAll() {
  67 +
  68 + return areaMapper.selectAll();
  69 + }
  70 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.service;
  2 +
  3 +import com.qgutech.qgyun.framework.database.mybatis.service.BaseServiceImpl;
  4 +import com.qgutech.qgyun.apaas.sync.base.BoErrorCode;
  5 +import com.qgutech.qgyun.apaas.sync.base.BoException;
  6 +import com.qgutech.qgyun.apaas.sync.cps.dto.CImprovementSummaryDTO;
  7 +import com.qgutech.qgyun.apaas.sync.cps.enums.QuarterEnum;
  8 +import com.qgutech.qgyun.apaas.sync.cps.mapper.CImprovementMapper;
  9 +import com.qgutech.qgyun.apaas.sync.cps.mapper.CImprovementTargetMapper;
  10 +import com.qgutech.qgyun.apaas.sync.cps.model.CImprovement;
  11 +import com.qgutech.qgyun.apaas.sync.cps.model.CImprovementTarget;
  12 +import com.qgutech.qgyun.apaas.sync.cps.model.QuarterPersonnel;
  13 +import com.qgutech.qgyun.apaas.sync.cps.model.RoomGroup;
  14 +import com.qgutech.qgyun.apaas.sync.cps.model.Workshop;
  15 +import org.apache.commons.collections4.CollectionUtils;
  16 +import org.apache.commons.lang3.StringUtils;
  17 +import org.springframework.stereotype.Service;
  18 +import org.springframework.transaction.annotation.Transactional;
  19 +import org.springframework.util.Assert;
  20 +import tk.mybatis.mapper.entity.Example;
  21 +
  22 +import javax.annotation.Resource;
  23 +import java.text.ParseException;
  24 +import java.text.SimpleDateFormat;
  25 +import java.util.*;
  26 +import java.util.stream.Collectors;
  27 +
  28 +/**
  29 + * CImprovement 服务
  30 + */
  31 +@Service
  32 +public class CImprovementService extends BaseServiceImpl<CImprovement> {
  33 +
  34 + @Resource
  35 + private CImprovementMapper cImprovementMapper;
  36 +
  37 + @Resource
  38 + private CImprovementTargetMapper cImprovementTargetMapper;
  39 +
  40 + @Resource
  41 + private QuarterPersonnelService quarterPersonnelService;
  42 +
  43 + @Resource
  44 + private RoomGroupService roomGroupService;
  45 +
  46 + @Resource
  47 + private WorkshopService workshopService;
  48 +
  49 + @Transactional(readOnly = true)
  50 + public CImprovement getById(String id) {
  51 + Assert.hasLength(id, "id is empty!");
  52 +
  53 + Example example = new Example(entityClass);
  54 + example.createCriteria().andEqualTo(CImprovement.ID, id);
  55 + CImprovement cImprovement = cImprovementMapper.selectOneByExample(example);
  56 + if (null == cImprovement) {
  57 + throw new BoException(BoErrorCode.DATA_ERROR);
  58 + }
  59 + return cImprovement;
  60 + }
  61 +
  62 + @Transactional(readOnly = true)
  63 + public List<CImprovement> listByIds(Collection<String> ids) {
  64 + Assert.notEmpty(ids, "ids is empty!");
  65 +
  66 + Example example = new Example(entityClass);
  67 + example.createCriteria().andIn(CImprovement.ID, ids);
  68 + List<CImprovement> cImprovementList = cImprovementMapper.selectByExample(example);
  69 + if (CollectionUtils.isEmpty(cImprovementList)) {
  70 + return new ArrayList<>(0);
  71 + }
  72 + return cImprovementList;
  73 + }
  74 +
  75 + @Transactional(readOnly = true)
  76 + public Map<String, CImprovement> mapByIds(Collection<String> ids) {
  77 + Assert.notEmpty(ids, "ids is empty!");
  78 +
  79 + List<CImprovement> cImprovementList = listByIds(ids);
  80 + if (CollectionUtils.isEmpty(cImprovementList)) {
  81 + return new HashMap<>(0);
  82 + }
  83 +
  84 + return cImprovementList.stream().collect(Collectors.toMap(CImprovement::getId, cImprovement -> cImprovement));
  85 + }
  86 +
  87 + @Transactional(readOnly = true)
  88 + public List<CImprovement> listAll() {
  89 +
  90 + return cImprovementMapper.selectAll();
  91 + }
  92 +
  93 + /**
  94 + * 根据年份和季度查询C类改善汇总(按单位车间分组)
  95 + * <p>
  96 + * 年份为空时默认查询当前年,季度必传
  97 + *
  98 + * @param year 年份,格式:yyyy,可为空
  99 + * @param quarter 季度枚举值(#1#-#4#),必传
  100 + * @return C类改善汇总列表
  101 + */
  102 + @Transactional(readOnly = true)
  103 + public List<CImprovementSummaryDTO> summaryByYearAndQuarter(String year, String quarter) {
  104 + // 1. 校验季度参数
  105 + Assert.hasLength(quarter, "quarter is empty!");
  106 + QuarterEnum quarterEnum = QuarterEnum.fromCode(quarter);
  107 + Assert.notNull(quarterEnum, "quarter format is invalid!");
  108 +
  109 + // 2. 处理年份参数,为空时默认为当前年
  110 + String queryYear = StringUtils.isBlank(year) ? String.valueOf(Calendar.getInstance().get(Calendar.YEAR)) : year;
  111 + Assert.isTrue(queryYear.matches("\\d{4}"), "year format must be yyyy!");
  112 +
  113 + // 3. 计算季度的开始时间和结束时间
  114 + Date startTime = parseQuarterStartTime(queryYear, quarterEnum);
  115 + Date endTime = parseQuarterEndTime(queryYear, quarterEnum);
  116 +
  117 + // 4. 查询该季度时间范围内的C类改善记录
  118 + Example example = new Example(CImprovement.class);
  119 + example.createCriteria()
  120 + .andBetween("createTime", startTime, endTime);
  121 + List<CImprovement> cImprovementList = cImprovementMapper.selectByExample(example);
  122 +
  123 + // 5. 查询该年份季度的季度人员信息
  124 + Date yearStartTime = parseYearStartTime(queryYear);
  125 + List<QuarterPersonnel> quarterPersonnelList = quarterPersonnelService.listByYearAndQuarter(yearStartTime, quarter);
  126 +
  127 + if (CollectionUtils.isEmpty(quarterPersonnelList)) {
  128 + return new ArrayList<>(0);
  129 + }
  130 +
  131 + // 6. 构建人员工号到季度人员信息的映射
  132 + Map<String, QuarterPersonnel> personnelMap = quarterPersonnelList.stream()
  133 + .filter(item -> item.getRygh() != null)
  134 + .collect(Collectors.toMap(
  135 + QuarterPersonnel::getRygh,
  136 + item -> item,
  137 + (v1, v2) -> v1
  138 + ));
  139 +
  140 + // 7. 按室组分组统计总人数
  141 + Map<String, Long> roomGroupPersonnelCountMap = quarterPersonnelList.stream()
  142 + .filter(item -> item.getShsz() != null)
  143 + .collect(Collectors.groupingBy(
  144 + QuarterPersonnel::getShsz,
  145 + Collectors.counting()
  146 + ));
  147 +
  148 + // 8. 统计每个室组有C类改善记录的人数(同一人多条记录算一次)
  149 + // 先获取有改善记录的发起人工号集合
  150 + Set<String> improvementFqrSet = cImprovementList.stream()
  151 + .filter(item -> item.getFqr() != null)
  152 + .map(CImprovement::getFqr)
  153 + .collect(Collectors.toSet());
  154 +
  155 + // 按室组统计有改善记录的人数
  156 + Map<String, Set<String>> roomGroupImprovementPersonnelMap = new HashMap<>();
  157 + for (String fqr : improvementFqrSet) {
  158 + QuarterPersonnel personnel = personnelMap.get(fqr);
  159 + if (personnel != null && personnel.getShsz() != null) {
  160 + roomGroupImprovementPersonnelMap.computeIfAbsent(personnel.getShsz(), k -> new HashSet<>()).add(fqr);
  161 + }
  162 + }
  163 +
  164 + // 9. 查询该年份的C类目标信息(按室组维度)
  165 + Example targetExample = new Example(CImprovementTarget.class);
  166 + targetExample.createCriteria()
  167 + .andEqualTo("year", yearStartTime);
  168 + List<CImprovementTarget> targetList = cImprovementTargetMapper.selectByExample(targetExample);
  169 +
  170 + // 构建目标值映射Map:szxx(室组) -> mb
  171 + Map<String, Double> targetMap = new HashMap<>();
  172 + if (CollectionUtils.isNotEmpty(targetList)) {
  173 + targetMap = targetList.stream()
  174 + .filter(item -> item.getSzxx() != null && item.getMb() != null)
  175 + .collect(Collectors.toMap(
  176 + CImprovementTarget::getSzxx,
  177 + CImprovementTarget::getMb,
  178 + (v1, v2) -> v1
  179 + ));
  180 + }
  181 +
  182 + // 10. 查询室组详细信息(室组名称、所属单位)
  183 + Set<String> roomGroupIds = roomGroupPersonnelCountMap.keySet();
  184 + Map<String, RoomGroup> roomGroupMap = new HashMap<>();
  185 + if (CollectionUtils.isNotEmpty(roomGroupIds)) {
  186 + roomGroupMap = roomGroupService.mapByIds(roomGroupIds);
  187 + }
  188 +
  189 + // 11. 根据室组所属单位查询单位车间详细信息
  190 + Set<String> dwcjIds = roomGroupMap.values().stream()
  191 + .map(RoomGroup::getSsdw)
  192 + .filter(Objects::nonNull)
  193 + .collect(Collectors.toSet());
  194 + Map<String, Workshop> workshopMap = new HashMap<>();
  195 + if (CollectionUtils.isNotEmpty(dwcjIds)) {
  196 + workshopMap = workshopService.mapByIds(dwcjIds);
  197 + }
  198 +
  199 + // 12. 组装汇总结果(按室组维度)
  200 + Map<String, Double> finalTargetMap = targetMap;
  201 + Map<String, RoomGroup> finalRoomGroupMap = roomGroupMap;
  202 + Map<String, Workshop> finalWorkshopMap = workshopMap;
  203 + String finalQueryYear = queryYear;
  204 + return roomGroupPersonnelCountMap.entrySet().stream()
  205 + .map(entry -> {
  206 + String szxx = entry.getKey();
  207 + int totalPersonnel = entry.getValue().intValue();
  208 + int improvementPersonnel = roomGroupImprovementPersonnelMap.getOrDefault(szxx, Collections.emptySet()).size();
  209 +
  210 + CImprovementSummaryDTO dto = new CImprovementSummaryDTO();
  211 + dto.setSzxx(szxx);
  212 + dto.setYear(finalQueryYear);
  213 + dto.setQuarter(quarter);
  214 + dto.setQuarterDesc(quarterEnum.getDesc());
  215 + dto.setTotalPersonnel(totalPersonnel);
  216 + dto.setImprovementPersonnel(improvementPersonnel);
  217 + // 目标值按室组维度匹配
  218 + dto.setMb(finalTargetMap.get(szxx));
  219 +
  220 + // 设置室组名称及所属单位车间信息
  221 + RoomGroup roomGroup = finalRoomGroupMap.get(szxx);
  222 + if (roomGroup != null) {
  223 + dto.setSzmc(roomGroup.getSzmc());
  224 + String dwcj = roomGroup.getSsdw();
  225 + dto.setDwcj(dwcj);
  226 + Workshop workshop = finalWorkshopMap.get(dwcj);
  227 + if (workshop != null) {
  228 + dto.setDwcjName(workshop.getDwmc());
  229 + }
  230 + }
  231 +
  232 + // 计算发起率
  233 + if (totalPersonnel > 0) {
  234 + dto.setImprovementRate(Math.round((double) improvementPersonnel / totalPersonnel * 10000) / 100.0);
  235 + }
  236 +
  237 + return dto;
  238 + })
  239 + .collect(Collectors.toList());
  240 + }
  241 +
  242 + /**
  243 + * 解析年份开始时间
  244 + */
  245 + private Date parseYearStartTime(String year) {
  246 + try {
  247 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  248 + return sdf.parse(year + "-01-01 00:00:00");
  249 + } catch (ParseException e) {
  250 + throw new BoException(BoErrorCode.PARAM_ERROR, "年份格式错误");
  251 + }
  252 + }
  253 +
  254 + /**
  255 + * 解析季度开始时间
  256 + */
  257 + private Date parseQuarterStartTime(String year, QuarterEnum quarter) {
  258 + try {
  259 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  260 + return sdf.parse(year + "-" + quarter.getStartDate() + " 00:00:00");
  261 + } catch (ParseException e) {
  262 + throw new BoException(BoErrorCode.PARAM_ERROR, "季度日期格式错误");
  263 + }
  264 + }
  265 +
  266 + /**
  267 + * 解析季度结束时间
  268 + */
  269 + private Date parseQuarterEndTime(String year, QuarterEnum quarter) {
  270 + try {
  271 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  272 + return sdf.parse(year + "-" + quarter.getEndDate() + " 23:59:59");
  273 + } catch (ParseException e) {
  274 + throw new BoException(BoErrorCode.PARAM_ERROR, "季度日期格式错误");
  275 + }
  276 + }
  277 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.service;
  2 +
  3 +import com.qgutech.qgyun.framework.database.mybatis.service.BaseServiceImpl;
  4 +import com.qgutech.qgyun.apaas.sync.base.BoErrorCode;
  5 +import com.qgutech.qgyun.apaas.sync.base.BoException;
  6 +import com.qgutech.qgyun.apaas.sync.cps.mapper.CpsProblemMapper;
  7 +import com.qgutech.qgyun.apaas.sync.cps.model.CpsProblem;
  8 +import org.apache.commons.collections4.CollectionUtils;
  9 +import org.springframework.stereotype.Service;
  10 +import org.springframework.transaction.annotation.Transactional;
  11 +import org.springframework.util.Assert;
  12 +import tk.mybatis.mapper.entity.Example;
  13 +
  14 +import javax.annotation.Resource;
  15 +import java.util.*;
  16 +import java.util.stream.Collectors;
  17 +
  18 +/**
  19 + * CpsProblem 服务
  20 + */
  21 +@Service
  22 +public class CpsProblemService extends BaseServiceImpl<CpsProblem> {
  23 +
  24 + @Resource
  25 + private CpsProblemMapper cpsProblemMapper;
  26 +
  27 + @Transactional(readOnly = true)
  28 + public CpsProblem getById(String id) {
  29 + Assert.hasLength(id, "id is empty!");
  30 +
  31 + Example example = new Example(entityClass);
  32 + example.createCriteria().andEqualTo(CpsProblem.ID, id);
  33 + CpsProblem cpsProblem = cpsProblemMapper.selectOneByExample(example);
  34 + if (null == cpsProblem) {
  35 + throw new BoException(BoErrorCode.DATA_ERROR);
  36 + }
  37 + return cpsProblem;
  38 + }
  39 +
  40 + @Transactional(readOnly = true)
  41 + public List<CpsProblem> listByIds(Collection<String> ids) {
  42 + Assert.notEmpty(ids, "ids is empty!");
  43 +
  44 + Example example = new Example(entityClass);
  45 + example.createCriteria().andIn(CpsProblem.ID, ids);
  46 + List<CpsProblem> cpsProblemList = cpsProblemMapper.selectByExample(example);
  47 + if (CollectionUtils.isEmpty(cpsProblemList)) {
  48 + return new ArrayList<>(0);
  49 + }
  50 + return cpsProblemList;
  51 + }
  52 +
  53 + @Transactional(readOnly = true)
  54 + public Map<String, CpsProblem> mapByIds(Collection<String> ids) {
  55 + Assert.notEmpty(ids, "ids is empty!");
  56 +
  57 + List<CpsProblem> cpsProblemList = listByIds(ids);
  58 + if (CollectionUtils.isEmpty(cpsProblemList)) {
  59 + return new HashMap<>(0);
  60 + }
  61 +
  62 + return cpsProblemList.stream().collect(Collectors.toMap(CpsProblem::getId, cpsProblem -> cpsProblem));
  63 + }
  64 +
  65 + @Transactional(readOnly = true)
  66 + public List<CpsProblem> listAll() {
  67 +
  68 + return cpsProblemMapper.selectAll();
  69 + }
  70 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.service;
  2 +
  3 +import com.qgutech.qgyun.framework.database.mybatis.service.BaseServiceImpl;
  4 +import com.qgutech.qgyun.apaas.sync.base.BoErrorCode;
  5 +import com.qgutech.qgyun.apaas.sync.base.BoException;
  6 +import com.qgutech.qgyun.apaas.sync.cps.mapper.PersonnelMapper;
  7 +import com.qgutech.qgyun.apaas.sync.cps.model.Personnel;
  8 +import org.apache.commons.collections4.CollectionUtils;
  9 +import org.springframework.stereotype.Service;
  10 +import org.springframework.transaction.annotation.Transactional;
  11 +import org.springframework.util.Assert;
  12 +import tk.mybatis.mapper.entity.Example;
  13 +
  14 +import javax.annotation.Resource;
  15 +import java.util.*;
  16 +import java.util.stream.Collectors;
  17 +
  18 +/**
  19 + * Personnel 服务
  20 + */
  21 +@Service
  22 +public class PersonnelService extends BaseServiceImpl<Personnel> {
  23 +
  24 + @Resource
  25 + private PersonnelMapper personnelMapper;
  26 +
  27 + @Transactional(readOnly = true)
  28 + public Personnel getById(String id) {
  29 + Assert.hasLength(id, "id is empty!");
  30 +
  31 + Example example = new Example(entityClass);
  32 + example.createCriteria().andEqualTo(Personnel.ID, id);
  33 + Personnel personnel = personnelMapper.selectOneByExample(example);
  34 + if (null == personnel) {
  35 + throw new BoException(BoErrorCode.DATA_ERROR);
  36 + }
  37 + return personnel;
  38 + }
  39 +
  40 + @Transactional(readOnly = true)
  41 + public List<Personnel> listByIds(Collection<String> ids) {
  42 + Assert.notEmpty(ids, "ids is empty!");
  43 +
  44 + Example example = new Example(entityClass);
  45 + example.createCriteria().andIn(Personnel.ID, ids);
  46 + List<Personnel> personnelList = personnelMapper.selectByExample(example);
  47 + if (CollectionUtils.isEmpty(personnelList)) {
  48 + return new ArrayList<>(0);
  49 + }
  50 + return personnelList;
  51 + }
  52 +
  53 + @Transactional(readOnly = true)
  54 + public Map<String, Personnel> mapByIds(Collection<String> ids) {
  55 + Assert.notEmpty(ids, "ids is empty!");
  56 +
  57 + List<Personnel> personnelList = listByIds(ids);
  58 + if (CollectionUtils.isEmpty(personnelList)) {
  59 + return new HashMap<>(0);
  60 + }
  61 +
  62 + return personnelList.stream().collect(Collectors.toMap(Personnel::getId, personnel -> personnel));
  63 + }
  64 +
  65 + @Transactional(readOnly = true)
  66 + public List<Personnel> listAll() {
  67 +
  68 + return personnelMapper.selectAll();
  69 + }
  70 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.service;
  2 +
  3 +import com.qgutech.qgyun.framework.database.mybatis.service.BaseServiceImpl;
  4 +import com.qgutech.qgyun.apaas.sync.base.BoErrorCode;
  5 +import com.qgutech.qgyun.apaas.sync.base.BoException;
  6 +import com.qgutech.qgyun.apaas.sync.cps.mapper.PjoBatchMapper;
  7 +import com.qgutech.qgyun.apaas.sync.cps.model.PjoBatch;
  8 +import org.apache.commons.collections4.CollectionUtils;
  9 +import org.springframework.stereotype.Service;
  10 +import org.springframework.transaction.annotation.Transactional;
  11 +import org.springframework.util.Assert;
  12 +import tk.mybatis.mapper.entity.Example;
  13 +
  14 +import javax.annotation.Resource;
  15 +import java.util.*;
  16 +import java.util.stream.Collectors;
  17 +
  18 +/**
  19 + * PjoBatch 服务
  20 + */
  21 +@Service
  22 +public class PjoBatchService extends BaseServiceImpl<PjoBatch> {
  23 +
  24 + @Resource
  25 + private PjoBatchMapper pjoBatchMapper;
  26 +
  27 + @Transactional(readOnly = true)
  28 + public PjoBatch getById(String id) {
  29 + Assert.hasLength(id, "id is empty!");
  30 +
  31 + Example example = new Example(entityClass);
  32 + example.createCriteria().andEqualTo(PjoBatch.ID, id);
  33 + PjoBatch pjoBatch = pjoBatchMapper.selectOneByExample(example);
  34 + if (null == pjoBatch) {
  35 + throw new BoException(BoErrorCode.DATA_ERROR);
  36 + }
  37 + return pjoBatch;
  38 + }
  39 +
  40 + @Transactional(readOnly = true)
  41 + public List<PjoBatch> listByIds(Collection<String> ids) {
  42 + Assert.notEmpty(ids, "ids is empty!");
  43 +
  44 + Example example = new Example(entityClass);
  45 + example.createCriteria().andIn(PjoBatch.ID, ids);
  46 + List<PjoBatch> pjoBatchList = pjoBatchMapper.selectByExample(example);
  47 + if (CollectionUtils.isEmpty(pjoBatchList)) {
  48 + return new ArrayList<>(0);
  49 + }
  50 + return pjoBatchList;
  51 + }
  52 +
  53 + @Transactional(readOnly = true)
  54 + public Map<String, PjoBatch> mapByIds(Collection<String> ids) {
  55 + Assert.notEmpty(ids, "ids is empty!");
  56 +
  57 + List<PjoBatch> pjoBatchList = listByIds(ids);
  58 + if (CollectionUtils.isEmpty(pjoBatchList)) {
  59 + return new HashMap<>(0);
  60 + }
  61 +
  62 + return pjoBatchList.stream().collect(Collectors.toMap(PjoBatch::getId, pjoBatch -> pjoBatch));
  63 + }
  64 +
  65 + @Transactional(readOnly = true)
  66 + public List<PjoBatch> listAll() {
  67 +
  68 + return pjoBatchMapper.selectAll();
  69 + }
  70 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.service;
  2 +
  3 +import com.qgutech.qgyun.framework.database.mybatis.service.BaseServiceImpl;
  4 +import com.qgutech.qgyun.apaas.sync.base.BoErrorCode;
  5 +import com.qgutech.qgyun.apaas.sync.base.BoException;
  6 +import com.qgutech.qgyun.apaas.sync.cps.mapper.PjoExecMapper;
  7 +import com.qgutech.qgyun.apaas.sync.cps.model.PjoExec;
  8 +import org.apache.commons.collections4.CollectionUtils;
  9 +import org.springframework.stereotype.Service;
  10 +import org.springframework.transaction.annotation.Transactional;
  11 +import org.springframework.util.Assert;
  12 +import tk.mybatis.mapper.entity.Example;
  13 +
  14 +import javax.annotation.Resource;
  15 +import java.util.*;
  16 +import java.util.stream.Collectors;
  17 +
  18 +/**
  19 + * PjoExec 服务
  20 + */
  21 +@Service
  22 +public class PjoExecService extends BaseServiceImpl<PjoExec> {
  23 +
  24 + @Resource
  25 + private PjoExecMapper pjoExecMapper;
  26 +
  27 + @Transactional(readOnly = true)
  28 + public PjoExec getById(String id) {
  29 + Assert.hasLength(id, "id is empty!");
  30 +
  31 + Example example = new Example(entityClass);
  32 + example.createCriteria().andEqualTo(PjoExec.ID, id);
  33 + PjoExec pjoExec = pjoExecMapper.selectOneByExample(example);
  34 + if (null == pjoExec) {
  35 + throw new BoException(BoErrorCode.DATA_ERROR);
  36 + }
  37 + return pjoExec;
  38 + }
  39 +
  40 + @Transactional(readOnly = true)
  41 + public List<PjoExec> listByIds(Collection<String> ids) {
  42 + Assert.notEmpty(ids, "ids is empty!");
  43 +
  44 + Example example = new Example(entityClass);
  45 + example.createCriteria().andIn(PjoExec.ID, ids);
  46 + List<PjoExec> pjoExecList = pjoExecMapper.selectByExample(example);
  47 + if (CollectionUtils.isEmpty(pjoExecList)) {
  48 + return new ArrayList<>(0);
  49 + }
  50 + return pjoExecList;
  51 + }
  52 +
  53 + @Transactional(readOnly = true)
  54 + public Map<String, PjoExec> mapByIds(Collection<String> ids) {
  55 + Assert.notEmpty(ids, "ids is empty!");
  56 +
  57 + List<PjoExec> pjoExecList = listByIds(ids);
  58 + if (CollectionUtils.isEmpty(pjoExecList)) {
  59 + return new HashMap<>(0);
  60 + }
  61 +
  62 + return pjoExecList.stream().collect(Collectors.toMap(PjoExec::getId, pjoExec -> pjoExec));
  63 + }
  64 +
  65 + @Transactional(readOnly = true)
  66 + public List<PjoExec> listAll() {
  67 +
  68 + return pjoExecMapper.selectAll();
  69 + }
  70 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.service;
  2 +
  3 +import com.qgutech.qgyun.framework.database.mybatis.service.BaseServiceImpl;
  4 +import com.qgutech.qgyun.apaas.sync.base.BoErrorCode;
  5 +import com.qgutech.qgyun.apaas.sync.base.BoException;
  6 +import com.qgutech.qgyun.apaas.sync.cps.mapper.PjoWorkstationExecMapper;
  7 +import com.qgutech.qgyun.apaas.sync.cps.model.PjoWorkstationExec;
  8 +import org.apache.commons.collections4.CollectionUtils;
  9 +import org.springframework.stereotype.Service;
  10 +import org.springframework.transaction.annotation.Transactional;
  11 +import org.springframework.util.Assert;
  12 +import tk.mybatis.mapper.entity.Example;
  13 +
  14 +import javax.annotation.Resource;
  15 +import java.util.*;
  16 +import java.util.stream.Collectors;
  17 +
  18 +/**
  19 + * PjoWorkstationExec 服务
  20 + */
  21 +@Service
  22 +public class PjoWorkstationExecService extends BaseServiceImpl<PjoWorkstationExec> {
  23 +
  24 + @Resource
  25 + private PjoWorkstationExecMapper pjoWorkstationExecMapper;
  26 +
  27 + @Transactional(readOnly = true)
  28 + public PjoWorkstationExec getById(String id) {
  29 + Assert.hasLength(id, "id is empty!");
  30 +
  31 + Example example = new Example(entityClass);
  32 + example.createCriteria().andEqualTo(PjoWorkstationExec.ID, id);
  33 + PjoWorkstationExec pjoWorkstationExec = pjoWorkstationExecMapper.selectOneByExample(example);
  34 + if (null == pjoWorkstationExec) {
  35 + throw new BoException(BoErrorCode.DATA_ERROR);
  36 + }
  37 + return pjoWorkstationExec;
  38 + }
  39 +
  40 + @Transactional(readOnly = true)
  41 + public List<PjoWorkstationExec> listByIds(Collection<String> ids) {
  42 + Assert.notEmpty(ids, "ids is empty!");
  43 +
  44 + Example example = new Example(entityClass);
  45 + example.createCriteria().andIn(PjoWorkstationExec.ID, ids);
  46 + List<PjoWorkstationExec> pjoWorkstationExecList = pjoWorkstationExecMapper.selectByExample(example);
  47 + if (CollectionUtils.isEmpty(pjoWorkstationExecList)) {
  48 + return new ArrayList<>(0);
  49 + }
  50 + return pjoWorkstationExecList;
  51 + }
  52 +
  53 + @Transactional(readOnly = true)
  54 + public Map<String, PjoWorkstationExec> mapByIds(Collection<String> ids) {
  55 + Assert.notEmpty(ids, "ids is empty!");
  56 +
  57 + List<PjoWorkstationExec> pjoWorkstationExecList = listByIds(ids);
  58 + if (CollectionUtils.isEmpty(pjoWorkstationExecList)) {
  59 + return new HashMap<>(0);
  60 + }
  61 +
  62 + return pjoWorkstationExecList.stream().collect(Collectors.toMap(PjoWorkstationExec::getId, pjoWorkstationExec -> pjoWorkstationExec));
  63 + }
  64 +
  65 + @Transactional(readOnly = true)
  66 + public List<PjoWorkstationExec> listAll() {
  67 +
  68 + return pjoWorkstationExecMapper.selectAll();
  69 + }
  70 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.service;
  2 +
  3 +import com.qgutech.qgyun.framework.database.mybatis.service.BaseServiceImpl;
  4 +import com.qgutech.qgyun.apaas.sync.base.BoErrorCode;
  5 +import com.qgutech.qgyun.apaas.sync.base.BoException;
  6 +import com.qgutech.qgyun.apaas.sync.cps.mapper.ProcessConfirmExecMapper;
  7 +import com.qgutech.qgyun.apaas.sync.cps.model.ProcessConfirmExec;
  8 +import org.apache.commons.collections4.CollectionUtils;
  9 +import org.springframework.stereotype.Service;
  10 +import org.springframework.transaction.annotation.Transactional;
  11 +import org.springframework.util.Assert;
  12 +import tk.mybatis.mapper.entity.Example;
  13 +
  14 +import javax.annotation.Resource;
  15 +import java.util.*;
  16 +import java.util.stream.Collectors;
  17 +
  18 +/**
  19 + * ProcessConfirmExec 服务
  20 + */
  21 +@Service
  22 +public class ProcessConfirmExecService extends BaseServiceImpl<ProcessConfirmExec> {
  23 +
  24 + @Resource
  25 + private ProcessConfirmExecMapper processConfirmExecMapper;
  26 +
  27 + @Transactional(readOnly = true)
  28 + public ProcessConfirmExec getById(String id) {
  29 + Assert.hasLength(id, "id is empty!");
  30 +
  31 + Example example = new Example(entityClass);
  32 + example.createCriteria().andEqualTo(ProcessConfirmExec.ID, id);
  33 + ProcessConfirmExec processConfirmExec = processConfirmExecMapper.selectOneByExample(example);
  34 + if (null == processConfirmExec) {
  35 + throw new BoException(BoErrorCode.DATA_ERROR);
  36 + }
  37 + return processConfirmExec;
  38 + }
  39 +
  40 + @Transactional(readOnly = true)
  41 + public List<ProcessConfirmExec> listByIds(Collection<String> ids) {
  42 + Assert.notEmpty(ids, "ids is empty!");
  43 +
  44 + Example example = new Example(entityClass);
  45 + example.createCriteria().andIn(ProcessConfirmExec.ID, ids);
  46 + List<ProcessConfirmExec> processConfirmExecList = processConfirmExecMapper.selectByExample(example);
  47 + if (CollectionUtils.isEmpty(processConfirmExecList)) {
  48 + return new ArrayList<>(0);
  49 + }
  50 + return processConfirmExecList;
  51 + }
  52 +
  53 + @Transactional(readOnly = true)
  54 + public Map<String, ProcessConfirmExec> mapByIds(Collection<String> ids) {
  55 + Assert.notEmpty(ids, "ids is empty!");
  56 +
  57 + List<ProcessConfirmExec> processConfirmExecList = listByIds(ids);
  58 + if (CollectionUtils.isEmpty(processConfirmExecList)) {
  59 + return new HashMap<>(0);
  60 + }
  61 +
  62 + return processConfirmExecList.stream().collect(Collectors.toMap(ProcessConfirmExec::getId, processConfirmExec -> processConfirmExec));
  63 + }
  64 +
  65 + @Transactional(readOnly = true)
  66 + public List<ProcessConfirmExec> listAll() {
  67 +
  68 + return processConfirmExecMapper.selectAll();
  69 + }
  70 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.service;
  2 +
  3 +import com.qgutech.qgyun.framework.database.mybatis.service.BaseServiceImpl;
  4 +import com.qgutech.qgyun.apaas.sync.base.BoErrorCode;
  5 +import com.qgutech.qgyun.apaas.sync.base.BoException;
  6 +import com.qgutech.qgyun.apaas.sync.cps.mapper.ProcessConfirmPersonnelMapper;
  7 +import com.qgutech.qgyun.apaas.sync.cps.model.ProcessConfirmPersonnel;
  8 +import org.apache.commons.collections4.CollectionUtils;
  9 +import org.springframework.stereotype.Service;
  10 +import org.springframework.transaction.annotation.Transactional;
  11 +import org.springframework.util.Assert;
  12 +import tk.mybatis.mapper.entity.Example;
  13 +
  14 +import javax.annotation.Resource;
  15 +import java.util.*;
  16 +import java.util.stream.Collectors;
  17 +
  18 +/**
  19 + * ProcessConfirmPersonnel 服务
  20 + */
  21 +@Service
  22 +public class ProcessConfirmPersonnelService extends BaseServiceImpl<ProcessConfirmPersonnel> {
  23 +
  24 + @Resource
  25 + private ProcessConfirmPersonnelMapper processConfirmPersonnelMapper;
  26 +
  27 + @Transactional(readOnly = true)
  28 + public ProcessConfirmPersonnel getById(String id) {
  29 + Assert.hasLength(id, "id is empty!");
  30 +
  31 + Example example = new Example(entityClass);
  32 + example.createCriteria().andEqualTo(ProcessConfirmPersonnel.ID, id);
  33 + ProcessConfirmPersonnel processConfirmPersonnel = processConfirmPersonnelMapper.selectOneByExample(example);
  34 + if (null == processConfirmPersonnel) {
  35 + throw new BoException(BoErrorCode.DATA_ERROR);
  36 + }
  37 + return processConfirmPersonnel;
  38 + }
  39 +
  40 + @Transactional(readOnly = true)
  41 + public List<ProcessConfirmPersonnel> listByIds(Collection<String> ids) {
  42 + Assert.notEmpty(ids, "ids is empty!");
  43 +
  44 + Example example = new Example(entityClass);
  45 + example.createCriteria().andIn(ProcessConfirmPersonnel.ID, ids);
  46 + List<ProcessConfirmPersonnel> processConfirmPersonnelList = processConfirmPersonnelMapper.selectByExample(example);
  47 + if (CollectionUtils.isEmpty(processConfirmPersonnelList)) {
  48 + return new ArrayList<>(0);
  49 + }
  50 + return processConfirmPersonnelList;
  51 + }
  52 +
  53 + @Transactional(readOnly = true)
  54 + public Map<String, ProcessConfirmPersonnel> mapByIds(Collection<String> ids) {
  55 + Assert.notEmpty(ids, "ids is empty!");
  56 +
  57 + List<ProcessConfirmPersonnel> processConfirmPersonnelList = listByIds(ids);
  58 + if (CollectionUtils.isEmpty(processConfirmPersonnelList)) {
  59 + return new HashMap<>(0);
  60 + }
  61 +
  62 + return processConfirmPersonnelList.stream().collect(Collectors.toMap(ProcessConfirmPersonnel::getId, processConfirmPersonnel -> processConfirmPersonnel));
  63 + }
  64 +
  65 + @Transactional(readOnly = true)
  66 + public List<ProcessConfirmPersonnel> listAll() {
  67 +
  68 + return processConfirmPersonnelMapper.selectAll();
  69 + }
  70 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.service;
  2 +
  3 +import com.qgutech.qgyun.framework.database.mybatis.service.BaseServiceImpl;
  4 +import com.qgutech.qgyun.apaas.sync.base.BoErrorCode;
  5 +import com.qgutech.qgyun.apaas.sync.base.BoException;
  6 +import com.qgutech.qgyun.apaas.sync.cps.mapper.QuarterPersonnelMapper;
  7 +import com.qgutech.qgyun.apaas.sync.cps.model.QuarterPersonnel;
  8 +import org.apache.commons.collections4.CollectionUtils;
  9 +import org.springframework.stereotype.Service;
  10 +import org.springframework.transaction.annotation.Transactional;
  11 +import org.springframework.util.Assert;
  12 +import tk.mybatis.mapper.entity.Example;
  13 +
  14 +import javax.annotation.Resource;
  15 +import java.util.*;
  16 +import java.util.stream.Collectors;
  17 +
  18 +/**
  19 + * QuarterPersonnel 服务
  20 + */
  21 +@Service
  22 +public class QuarterPersonnelService extends BaseServiceImpl<QuarterPersonnel> {
  23 +
  24 + @Resource
  25 + private QuarterPersonnelMapper quarterPersonnelMapper;
  26 +
  27 + @Transactional(readOnly = true)
  28 + public QuarterPersonnel getById(String id) {
  29 + Assert.hasLength(id, "id is empty!");
  30 +
  31 + Example example = new Example(entityClass);
  32 + example.createCriteria().andEqualTo(QuarterPersonnel.ID, id);
  33 + QuarterPersonnel quarterPersonnel = quarterPersonnelMapper.selectOneByExample(example);
  34 + if (null == quarterPersonnel) {
  35 + throw new BoException(BoErrorCode.DATA_ERROR);
  36 + }
  37 + return quarterPersonnel;
  38 + }
  39 +
  40 + @Transactional(readOnly = true)
  41 + public List<QuarterPersonnel> listByIds(Collection<String> ids) {
  42 + Assert.notEmpty(ids, "ids is empty!");
  43 +
  44 + Example example = new Example(entityClass);
  45 + example.createCriteria().andIn(QuarterPersonnel.ID, ids);
  46 + List<QuarterPersonnel> quarterPersonnelList = quarterPersonnelMapper.selectByExample(example);
  47 + if (CollectionUtils.isEmpty(quarterPersonnelList)) {
  48 + return new ArrayList<>(0);
  49 + }
  50 + return quarterPersonnelList;
  51 + }
  52 +
  53 + @Transactional(readOnly = true)
  54 + public Map<String, QuarterPersonnel> mapByIds(Collection<String> ids) {
  55 + Assert.notEmpty(ids, "ids is empty!");
  56 +
  57 + List<QuarterPersonnel> quarterPersonnelList = listByIds(ids);
  58 + if (CollectionUtils.isEmpty(quarterPersonnelList)) {
  59 + return new HashMap<>(0);
  60 + }
  61 +
  62 + return quarterPersonnelList.stream().collect(Collectors.toMap(QuarterPersonnel::getId, quarterPersonnel -> quarterPersonnel));
  63 + }
  64 +
  65 + @Transactional(readOnly = true)
  66 + public List<QuarterPersonnel> listAll() {
  67 +
  68 + return quarterPersonnelMapper.selectAll();
  69 + }
  70 +
  71 + /**
  72 + * 根据年份和季度查询季度人员信息
  73 + *
  74 + * @param yearStartTime 年份开始时间
  75 + * @param quarter 季度枚举值(#1#-#4#)
  76 + * @return 季度人员信息列表
  77 + */
  78 + @Transactional(readOnly = true)
  79 + public List<QuarterPersonnel> listByYearAndQuarter(Date yearStartTime, String quarter) {
  80 + Assert.notNull(yearStartTime, "year is empty!");
  81 + Assert.hasLength(quarter, "quarter is empty!");
  82 +
  83 + Example example = new Example(entityClass);
  84 + example.createCriteria()
  85 + .andEqualTo("year", yearStartTime)
  86 + .andEqualTo("jdxx", quarter);
  87 + List<QuarterPersonnel> quarterPersonnelList = quarterPersonnelMapper.selectByExample(example);
  88 + if (CollectionUtils.isEmpty(quarterPersonnelList)) {
  89 + return new ArrayList<>(0);
  90 + }
  91 + return quarterPersonnelList;
  92 + }
  93 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.service;
  2 +
  3 +import com.qgutech.qgyun.framework.database.mybatis.service.BaseServiceImpl;
  4 +import com.qgutech.qgyun.apaas.sync.base.BoErrorCode;
  5 +import com.qgutech.qgyun.apaas.sync.base.BoException;
  6 +import com.qgutech.qgyun.apaas.sync.cps.mapper.RoomGroupMapper;
  7 +import com.qgutech.qgyun.apaas.sync.cps.model.RoomGroup;
  8 +import org.apache.commons.collections4.CollectionUtils;
  9 +import org.springframework.stereotype.Service;
  10 +import org.springframework.transaction.annotation.Transactional;
  11 +import org.springframework.util.Assert;
  12 +import tk.mybatis.mapper.entity.Example;
  13 +
  14 +import javax.annotation.Resource;
  15 +import java.util.*;
  16 +import java.util.stream.Collectors;
  17 +
  18 +/**
  19 + * RoomGroup 服务
  20 + */
  21 +@Service
  22 +public class RoomGroupService extends BaseServiceImpl<RoomGroup> {
  23 +
  24 + @Resource
  25 + private RoomGroupMapper roomGroupMapper;
  26 +
  27 + @Transactional(readOnly = true)
  28 + public RoomGroup getById(String id) {
  29 + Assert.hasLength(id, "id is empty!");
  30 +
  31 + Example example = new Example(entityClass);
  32 + example.createCriteria().andEqualTo(RoomGroup.ID, id);
  33 + RoomGroup roomGroup = roomGroupMapper.selectOneByExample(example);
  34 + if (null == roomGroup) {
  35 + throw new BoException(BoErrorCode.DATA_ERROR);
  36 + }
  37 + return roomGroup;
  38 + }
  39 +
  40 + @Transactional(readOnly = true)
  41 + public List<RoomGroup> listByIds(Collection<String> ids) {
  42 + Assert.notEmpty(ids, "ids is empty!");
  43 +
  44 + Example example = new Example(entityClass);
  45 + example.createCriteria().andIn(RoomGroup.ID, ids);
  46 + List<RoomGroup> roomGroupList = roomGroupMapper.selectByExample(example);
  47 + if (CollectionUtils.isEmpty(roomGroupList)) {
  48 + return new ArrayList<>(0);
  49 + }
  50 + return roomGroupList;
  51 + }
  52 +
  53 + @Transactional(readOnly = true)
  54 + public Map<String, RoomGroup> mapByIds(Collection<String> ids) {
  55 + Assert.notEmpty(ids, "ids is empty!");
  56 +
  57 + List<RoomGroup> roomGroupList = listByIds(ids);
  58 + if (CollectionUtils.isEmpty(roomGroupList)) {
  59 + return new HashMap<>(0);
  60 + }
  61 +
  62 + return roomGroupList.stream().collect(Collectors.toMap(RoomGroup::getId, roomGroup -> roomGroup));
  63 + }
  64 +
  65 + @Transactional(readOnly = true)
  66 + public List<RoomGroup> listAll() {
  67 +
  68 + return roomGroupMapper.selectAll();
  69 + }
  70 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.service;
  2 +
  3 +import com.qgutech.qgyun.framework.database.mybatis.service.BaseServiceImpl;
  4 +import com.qgutech.qgyun.apaas.sync.base.BoErrorCode;
  5 +import com.qgutech.qgyun.apaas.sync.base.BoException;
  6 +import com.qgutech.qgyun.apaas.sync.cps.mapper.ShiftMapper;
  7 +import com.qgutech.qgyun.apaas.sync.cps.model.Shift;
  8 +import org.apache.commons.collections4.CollectionUtils;
  9 +import org.springframework.stereotype.Service;
  10 +import org.springframework.transaction.annotation.Transactional;
  11 +import org.springframework.util.Assert;
  12 +import tk.mybatis.mapper.entity.Example;
  13 +
  14 +import javax.annotation.Resource;
  15 +import java.util.*;
  16 +import java.util.stream.Collectors;
  17 +
  18 +/**
  19 + * Shift 服务
  20 + */
  21 +@Service
  22 +public class ShiftService extends BaseServiceImpl<Shift> {
  23 +
  24 + @Resource
  25 + private ShiftMapper shiftMapper;
  26 +
  27 + @Transactional(readOnly = true)
  28 + public Shift getById(String id) {
  29 + Assert.hasLength(id, "id is empty!");
  30 +
  31 + Example example = new Example(entityClass);
  32 + example.createCriteria().andEqualTo(Shift.ID, id);
  33 + Shift shift = shiftMapper.selectOneByExample(example);
  34 + if (null == shift) {
  35 + throw new BoException(BoErrorCode.DATA_ERROR);
  36 + }
  37 + return shift;
  38 + }
  39 +
  40 + @Transactional(readOnly = true)
  41 + public List<Shift> listByIds(Collection<String> ids) {
  42 + Assert.notEmpty(ids, "ids is empty!");
  43 +
  44 + Example example = new Example(entityClass);
  45 + example.createCriteria().andIn(Shift.ID, ids);
  46 + List<Shift> shiftList = shiftMapper.selectByExample(example);
  47 + if (CollectionUtils.isEmpty(shiftList)) {
  48 + return new ArrayList<>(0);
  49 + }
  50 + return shiftList;
  51 + }
  52 +
  53 + @Transactional(readOnly = true)
  54 + public Map<String, Shift> mapByIds(Collection<String> ids) {
  55 + Assert.notEmpty(ids, "ids is empty!");
  56 +
  57 + List<Shift> shiftList = listByIds(ids);
  58 + if (CollectionUtils.isEmpty(shiftList)) {
  59 + return new HashMap<>(0);
  60 + }
  61 +
  62 + return shiftList.stream().collect(Collectors.toMap(Shift::getId, shift -> shift));
  63 + }
  64 +
  65 + @Transactional(readOnly = true)
  66 + public List<Shift> listAll() {
  67 +
  68 + return shiftMapper.selectAll();
  69 + }
  70 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.service;
  2 +
  3 +import com.qgutech.qgyun.framework.database.mybatis.service.BaseServiceImpl;
  4 +import com.qgutech.qgyun.apaas.sync.base.BoErrorCode;
  5 +import com.qgutech.qgyun.apaas.sync.base.BoException;
  6 +import com.qgutech.qgyun.apaas.sync.cps.mapper.StdActivityCaseMapper;
  7 +import com.qgutech.qgyun.apaas.sync.cps.model.StdActivityCase;
  8 +import org.apache.commons.collections4.CollectionUtils;
  9 +import org.springframework.stereotype.Service;
  10 +import org.springframework.transaction.annotation.Transactional;
  11 +import org.springframework.util.Assert;
  12 +import tk.mybatis.mapper.entity.Example;
  13 +
  14 +import javax.annotation.Resource;
  15 +import java.util.*;
  16 +import java.util.stream.Collectors;
  17 +
  18 +/**
  19 + * StdActivityCase 服务
  20 + */
  21 +@Service
  22 +public class StdActivityCaseService extends BaseServiceImpl<StdActivityCase> {
  23 +
  24 + @Resource
  25 + private StdActivityCaseMapper stdActivityCaseMapper;
  26 +
  27 + @Transactional(readOnly = true)
  28 + public StdActivityCase getById(String id) {
  29 + Assert.hasLength(id, "id is empty!");
  30 +
  31 + Example example = new Example(entityClass);
  32 + example.createCriteria().andEqualTo(StdActivityCase.ID, id);
  33 + StdActivityCase stdActivityCase = stdActivityCaseMapper.selectOneByExample(example);
  34 + if (null == stdActivityCase) {
  35 + throw new BoException(BoErrorCode.DATA_ERROR);
  36 + }
  37 + return stdActivityCase;
  38 + }
  39 +
  40 + @Transactional(readOnly = true)
  41 + public List<StdActivityCase> listByIds(Collection<String> ids) {
  42 + Assert.notEmpty(ids, "ids is empty!");
  43 +
  44 + Example example = new Example(entityClass);
  45 + example.createCriteria().andIn(StdActivityCase.ID, ids);
  46 + List<StdActivityCase> stdActivityCaseList = stdActivityCaseMapper.selectByExample(example);
  47 + if (CollectionUtils.isEmpty(stdActivityCaseList)) {
  48 + return new ArrayList<>(0);
  49 + }
  50 + return stdActivityCaseList;
  51 + }
  52 +
  53 + @Transactional(readOnly = true)
  54 + public Map<String, StdActivityCase> mapByIds(Collection<String> ids) {
  55 + Assert.notEmpty(ids, "ids is empty!");
  56 +
  57 + List<StdActivityCase> stdActivityCaseList = listByIds(ids);
  58 + if (CollectionUtils.isEmpty(stdActivityCaseList)) {
  59 + return new HashMap<>(0);
  60 + }
  61 +
  62 + return stdActivityCaseList.stream().collect(Collectors.toMap(StdActivityCase::getId, stdActivityCase -> stdActivityCase));
  63 + }
  64 +
  65 + @Transactional(readOnly = true)
  66 + public List<StdActivityCase> listAll() {
  67 +
  68 + return stdActivityCaseMapper.selectAll();
  69 + }
  70 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.service;
  2 +
  3 +import com.qgutech.qgyun.framework.database.mybatis.service.BaseServiceImpl;
  4 +import com.qgutech.qgyun.apaas.sync.base.BoErrorCode;
  5 +import com.qgutech.qgyun.apaas.sync.base.BoException;
  6 +import com.qgutech.qgyun.apaas.sync.cps.mapper.TeamMapper;
  7 +import com.qgutech.qgyun.apaas.sync.cps.model.Team;
  8 +import org.apache.commons.collections4.CollectionUtils;
  9 +import org.springframework.stereotype.Service;
  10 +import org.springframework.transaction.annotation.Transactional;
  11 +import org.springframework.util.Assert;
  12 +import tk.mybatis.mapper.entity.Example;
  13 +
  14 +import javax.annotation.Resource;
  15 +import java.util.*;
  16 +import java.util.stream.Collectors;
  17 +
  18 +/**
  19 + * Team 服务
  20 + */
  21 +@Service
  22 +public class TeamService extends BaseServiceImpl<Team> {
  23 +
  24 + @Resource
  25 + private TeamMapper teamMapper;
  26 +
  27 + @Transactional(readOnly = true)
  28 + public Team getById(String id) {
  29 + Assert.hasLength(id, "id is empty!");
  30 +
  31 + Example example = new Example(entityClass);
  32 + example.createCriteria().andEqualTo(Team.ID, id);
  33 + Team team = teamMapper.selectOneByExample(example);
  34 + if (null == team) {
  35 + throw new BoException(BoErrorCode.DATA_ERROR);
  36 + }
  37 + return team;
  38 + }
  39 +
  40 + @Transactional(readOnly = true)
  41 + public List<Team> listByIds(Collection<String> ids) {
  42 + Assert.notEmpty(ids, "ids is empty!");
  43 +
  44 + Example example = new Example(entityClass);
  45 + example.createCriteria().andIn(Team.ID, ids);
  46 + List<Team> teamList = teamMapper.selectByExample(example);
  47 + if (CollectionUtils.isEmpty(teamList)) {
  48 + return new ArrayList<>(0);
  49 + }
  50 + return teamList;
  51 + }
  52 +
  53 + @Transactional(readOnly = true)
  54 + public Map<String, Team> mapByIds(Collection<String> ids) {
  55 + Assert.notEmpty(ids, "ids is empty!");
  56 +
  57 + List<Team> teamList = listByIds(ids);
  58 + if (CollectionUtils.isEmpty(teamList)) {
  59 + return new HashMap<>(0);
  60 + }
  61 +
  62 + return teamList.stream().collect(Collectors.toMap(Team::getId, team -> team));
  63 + }
  64 +
  65 + @Transactional(readOnly = true)
  66 + public List<Team> listAll() {
  67 +
  68 + return teamMapper.selectAll();
  69 + }
  70 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.service;
  2 +
  3 +import com.qgutech.qgyun.apaas.sync.base.BoErrorCode;
  4 +import com.qgutech.qgyun.apaas.sync.base.BoException;
  5 +import com.qgutech.qgyun.apaas.sync.cps.mapper.WorkshopMapper;
  6 +import com.qgutech.qgyun.apaas.sync.cps.model.Workshop;
  7 +import com.qgutech.qgyun.framework.database.mybatis.service.BaseServiceImpl;
  8 +import org.apache.commons.collections4.CollectionUtils;
  9 +import org.springframework.stereotype.Service;
  10 +import org.springframework.transaction.annotation.Transactional;
  11 +import org.springframework.util.Assert;
  12 +import tk.mybatis.mapper.entity.Example;
  13 +
  14 +import javax.annotation.Resource;
  15 +import java.util.*;
  16 +import java.util.stream.Collectors;
  17 +
  18 +/**
  19 + * 单位(车间)信息服务
  20 + */
  21 +@Service
  22 +public class WorkshopService extends BaseServiceImpl<Workshop> {
  23 +
  24 + @Resource
  25 + private WorkshopMapper workshopMapper;
  26 +
  27 + @Transactional(readOnly = true)
  28 + public Workshop getById(String id) {
  29 + Assert.hasLength(id, "id is empty!");
  30 +
  31 + Example example = new Example(entityClass);
  32 + example.createCriteria().andEqualTo(Workshop.ID, id);
  33 + Workshop workshop = workshopMapper.selectOneByExample(example);
  34 + if (null == workshop) {
  35 + throw new BoException(BoErrorCode.DATA_ERROR);
  36 + }
  37 + return workshop;
  38 + }
  39 +
  40 + @Transactional(readOnly = true)
  41 + public List<Workshop> listByIds(Collection<String> ids) {
  42 + Assert.notEmpty(ids, "ids is empty!");
  43 +
  44 + Example example = new Example(entityClass);
  45 + example.createCriteria().andIn(Workshop.ID, ids);
  46 + List<Workshop> workshopList = workshopMapper.selectByExample(example);
  47 + if (CollectionUtils.isEmpty(workshopList)) {
  48 + return new ArrayList<>(0);
  49 + }
  50 + return workshopList;
  51 + }
  52 +
  53 + @Transactional(readOnly = true)
  54 + public Map<String, Workshop> mapByIds(Collection<String> ids) {
  55 + Assert.notEmpty(ids, "ids is empty!");
  56 +
  57 + List<Workshop> workshopList = listByIds(ids);
  58 + if (CollectionUtils.isEmpty(workshopList)) {
  59 + return new HashMap<>(0);
  60 + }
  61 +
  62 + return workshopList.stream().collect(Collectors.toMap(Workshop::getId, workshop -> workshop));
  63 + }
  64 +
  65 + @Transactional(readOnly = true)
  66 + public List<Workshop> listAll() {
  67 +
  68 + return workshopMapper.selectAll();
  69 + }
  70 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.service;
  2 +
  3 +import com.qgutech.qgyun.apaas.sync.base.BoErrorCode;
  4 +import com.qgutech.qgyun.apaas.sync.base.BoException;
  5 +import com.qgutech.qgyun.apaas.sync.cps.mapper.WorkstationMapper;
  6 +import com.qgutech.qgyun.apaas.sync.cps.model.Workstation;
  7 +import com.qgutech.qgyun.framework.database.mybatis.service.BaseServiceImpl;
  8 +import org.apache.commons.collections4.CollectionUtils;
  9 +import org.springframework.stereotype.Service;
  10 +import org.springframework.transaction.annotation.Transactional;
  11 +import org.springframework.util.Assert;
  12 +import tk.mybatis.mapper.entity.Example;
  13 +
  14 +import javax.annotation.Resource;
  15 +import java.util.*;
  16 +import java.util.stream.Collectors;
  17 +
  18 +/**
  19 + * Workstation 服务
  20 + */
  21 +@Service
  22 +public class WorkstationService extends BaseServiceImpl<Workstation> {
  23 +
  24 + @Resource
  25 + private WorkstationMapper workstationMapper;
  26 +
  27 + @Transactional(readOnly = true)
  28 + public Workstation getById(String id) {
  29 + Assert.hasLength(id, "id is empty!");
  30 +
  31 + Example example = new Example(entityClass);
  32 + example.createCriteria().andEqualTo(Workstation.ID, id);
  33 + Workstation workstation = workstationMapper.selectOneByExample(example);
  34 + if (null == workstation) {
  35 + throw new BoException(BoErrorCode.DATA_ERROR);
  36 + }
  37 + return workstation;
  38 + }
  39 +
  40 + @Transactional(readOnly = true)
  41 + public List<Workstation> listByIds(Collection<String> ids) {
  42 + Assert.notEmpty(ids, "ids is empty!");
  43 +
  44 + Example example = new Example(entityClass);
  45 + example.createCriteria().andIn(Workstation.ID, ids);
  46 + List<Workstation> workstationList = workstationMapper.selectByExample(example);
  47 + if (CollectionUtils.isEmpty(workstationList)) {
  48 + return new ArrayList<>(0);
  49 + }
  50 + return workstationList;
  51 + }
  52 +
  53 + @Transactional(readOnly = true)
  54 + public Map<String, Workstation> mapByIds(Collection<String> ids) {
  55 + Assert.notEmpty(ids, "ids is empty!");
  56 +
  57 + List<Workstation> workstationList = listByIds(ids);
  58 + if (CollectionUtils.isEmpty(workstationList)) {
  59 + return new HashMap<>(0);
  60 + }
  61 +
  62 + return workstationList.stream().collect(Collectors.toMap(Workstation::getId, workstation -> workstation));
  63 + }
  64 +
  65 + @Transactional(readOnly = true)
  66 + public List<Workstation> listAll() {
  67 +
  68 + return workstationMapper.selectAll();
  69 + }
  70 +}
  1 +package com.qgutech.qgyun.apaas.sync.cps.service;
  2 +
  3 +import com.qgutech.qgyun.framework.database.mybatis.service.BaseServiceImpl;
  4 +import com.qgutech.qgyun.apaas.sync.base.BoErrorCode;
  5 +import com.qgutech.qgyun.apaas.sync.base.BoException;
  6 +import com.qgutech.qgyun.apaas.sync.cps.mapper.XtLineMapper;
  7 +import com.qgutech.qgyun.apaas.sync.cps.model.XtLine;
  8 +import org.apache.commons.collections4.CollectionUtils;
  9 +import org.springframework.stereotype.Service;
  10 +import org.springframework.transaction.annotation.Transactional;
  11 +import org.springframework.util.Assert;
  12 +import tk.mybatis.mapper.entity.Example;
  13 +
  14 +import javax.annotation.Resource;
  15 +import java.util.*;
  16 +import java.util.stream.Collectors;
  17 +
  18 +/**
  19 + * XtLine 服务
  20 + */
  21 +@Service
  22 +public class XtLineService extends BaseServiceImpl<XtLine> {
  23 +
  24 + @Resource
  25 + private XtLineMapper xtLineMapper;
  26 +
  27 + @Transactional(readOnly = true)
  28 + public XtLine getById(String id) {
  29 + Assert.hasLength(id, "id is empty!");
  30 +
  31 + Example example = new Example(entityClass);
  32 + example.createCriteria().andEqualTo(XtLine.ID, id);
  33 + XtLine xtLine = xtLineMapper.selectOneByExample(example);
  34 + if (null == xtLine) {
  35 + throw new BoException(BoErrorCode.DATA_ERROR);
  36 + }
  37 + return xtLine;
  38 + }
  39 +
  40 + @Transactional(readOnly = true)
  41 + public List<XtLine> listByIds(Collection<String> ids) {
  42 + Assert.notEmpty(ids, "ids is empty!");
  43 +
  44 + Example example = new Example(entityClass);
  45 + example.createCriteria().andIn(XtLine.ID, ids);
  46 + List<XtLine> xtLineList = xtLineMapper.selectByExample(example);
  47 + if (CollectionUtils.isEmpty(xtLineList)) {
  48 + return new ArrayList<>(0);
  49 + }
  50 + return xtLineList;
  51 + }
  52 +
  53 + @Transactional(readOnly = true)
  54 + public Map<String, XtLine> mapByIds(Collection<String> ids) {
  55 + Assert.notEmpty(ids, "ids is empty!");
  56 +
  57 + List<XtLine> xtLineList = listByIds(ids);
  58 + if (CollectionUtils.isEmpty(xtLineList)) {
  59 + return new HashMap<>(0);
  60 + }
  61 +
  62 + return xtLineList.stream().collect(Collectors.toMap(XtLine::getId, xtLine -> xtLine));
  63 + }
  64 +
  65 + @Transactional(readOnly = true)
  66 + public List<XtLine> listAll() {
  67 +
  68 + return xtLineMapper.selectAll();
  69 + }
  70 +}
  1 +package com.qgutech.qgyun.apaas.sync.filter;
  2 +
  3 +import com.qgutech.qgyun.framework.common.context.ContextHandler;
  4 +import lombok.extern.slf4j.Slf4j;
  5 +import org.apache.commons.lang3.StringUtils;
  6 +import org.springframework.beans.factory.annotation.Value;
  7 +import org.springframework.core.annotation.Order;
  8 +import org.springframework.stereotype.Component;
  9 +
  10 +import javax.servlet.Filter;
  11 +import javax.servlet.FilterChain;
  12 +import javax.servlet.FilterConfig;
  13 +import javax.servlet.ServletException;
  14 +import javax.servlet.ServletRequest;
  15 +import javax.servlet.ServletResponse;
  16 +import javax.servlet.annotation.WebFilter;
  17 +import javax.servlet.http.HttpServletRequest;
  18 +import javax.servlet.http.HttpServletResponse;
  19 +import java.io.IOException;
  20 +
  21 +@Slf4j
  22 +@Component
  23 +@WebFilter(urlPatterns = {"/*"})
  24 +@Order(value = 1)
  25 +public class ExecutionContextFilter implements Filter {
  26 + @Value("${qx-apaas-sync.env:dev}")
  27 + private String env;
  28 +
  29 + @Override
  30 + public void init(FilterConfig filterConfig) throws ServletException {
  31 + }
  32 +
  33 + @Override
  34 + public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain chain) throws IOException, ServletException {
  35 + HttpServletRequest request = (HttpServletRequest) servletRequest;
  36 + HttpServletResponse response = (HttpServletResponse) servletResponse;
  37 + String userId = request.getParameter("userId");
  38 +
  39 + ContextHandler.setCorpCode("hfca");
  40 + ContextHandler.setUserId("");
  41 + if (StringUtils.isNotBlank(userId)) {
  42 + ContextHandler.setUserId(userId);
  43 + }
  44 +
  45 + chain.doFilter(request, response);
  46 + }
  47 +
  48 + @Override
  49 + public void destroy() {
  50 + }
  51 +}
  1 +package com.qgutech.qgyun.apaas.sync.filter;
  2 +
  3 +import com.qgutech.qgyun.framework.common.context.ContextHandler;
  4 +import lombok.extern.slf4j.Slf4j;
  5 +import org.apache.commons.lang3.StringUtils;
  6 +import org.springframework.web.servlet.HandlerInterceptor;
  7 +import org.springframework.web.servlet.ModelAndView;
  8 +
  9 +import javax.servlet.http.HttpServletRequest;
  10 +import javax.servlet.http.HttpServletResponse;
  11 +
  12 +@Slf4j
  13 +public class MyInterceptor implements HandlerInterceptor {
  14 +
  15 + @Override
  16 + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
  17 + if (StringUtils.isBlank(ContextHandler.getUserId())) {
  18 + String userId = request.getParameter("userId");
  19 + if (StringUtils.isNotBlank(userId)) {
  20 + ContextHandler.setUserId(userId);
  21 + }
  22 + }
  23 + return true;
  24 + }
  25 +
  26 + @Override
  27 + public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception {
  28 + }
  29 +
  30 + @Override
  31 + public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {
  32 + }
  33 +}
  1 +package com.qgutech.qgyun.apaas.sync.filter;
  2 +
  3 +import org.springframework.context.annotation.Configuration;
  4 +import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
  5 +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
  6 +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
  7 +
  8 +@Configuration
  9 +public class WebConfig implements WebMvcConfigurer {
  10 +
  11 + @Override
  12 + public void addInterceptors(InterceptorRegistry registry) {
  13 + registry.addInterceptor(new MyInterceptor()).addPathPatterns("/**").excludePathPatterns("/static/**");
  14 + }
  15 +
  16 + @Override
  17 + public void addResourceHandlers(ResourceHandlerRegistry registry) {
  18 + registry.addResourceHandler("swagger-ui.html")
  19 + .addResourceLocations("classpath:/META-INF/resources/");
  20 + registry.addResourceHandler("/webjars/**")
  21 + .addResourceLocations("classpath:/META-INF/resources/webjars/");
  22 + }
  23 +}
  1 +package com.qgutech.qgyun.apaas.sync.utils;
  2 +
  3 +import com.qgutech.qgyun.apaas.sync.base.BoErrorCode;
  4 +import com.qgutech.qgyun.apaas.sync.base.BoException;
  5 +
  6 +import java.text.ParseException;
  7 +import java.text.SimpleDateFormat;
  8 +import java.util.Date;
  9 +
  10 +public class DateDealUtils {
  11 +
  12 + /**
  13 + * 解析年份开始时间
  14 + */
  15 + public static Date parseYearStartTime(String year) {
  16 + try {
  17 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  18 + return sdf.parse(year + "-01-01 00:00:00");
  19 + } catch (ParseException e) {
  20 + throw new BoException(BoErrorCode.PARAM_ERROR, "年份格式错误");
  21 + }
  22 + }
  23 +
  24 + /**
  25 + * 解析年份结束时间
  26 + */
  27 + public static Date parseYearEndTime(String year) {
  28 + try {
  29 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  30 + return sdf.parse(year + "-12-31 23:59:59");
  31 + } catch (ParseException e) {
  32 + throw new BoException(BoErrorCode.PARAM_ERROR, "年份格式错误");
  33 + }
  34 + }
  35 +}
@@ -4,6 +4,35 @@ server: @@ -4,6 +4,35 @@ server:
4 spring: 4 spring:
5 application: 5 application:
6 name: qx-apaas-sync 6 name: qx-apaas-sync
  7 + datasource:
  8 + url: jdbc:mysql://10.9.0.128:3306/qixiao-apaas?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8
  9 + username: guohao
  10 + password: Guohao@2026.com
  11 + type: com.alibaba.druid.pool.DruidDataSource
  12 + driver-class-name: com.mysql.jdbc.Driver
  13 + initialSize: 5
  14 + minIdle: 5
  15 + maxActive: 20
  16 + maxWait: 60000
  17 + filters: stat,wall,log4j
  18 + useGlobalDataSourceStat: true
  19 +
  20 +mybatis:
  21 + type-aliases-package: com.qgutech.qgyun.apaas.sync.cps.model
  22 + handler:
  23 + enable: true
  24 + rootPath: com/qgutech
  25 + locationPattern: /**/cenum
  26 +mapper:
  27 + enumAsSimpleType: true
  28 +
  29 +busi.base:
  30 + cropCode: hfca
  31 + createBy: admin
  32 + superAdminId: admin
  33 +
  34 +qx-apaas-sync:
  35 + env: dev
7 36
8 logging: 37 logging:
9 path: ./logs 38 path: ./logs