Commit ad7d65b05b19a6457f44da1ff840498a7b2e5251

Authored by 陈强
1 parent 156803a0

CPS体系驾驶舱-新增停线记录、停线工位、板块信息相关接口、实体类

Showing 26 changed files with 1830 additions and 0 deletions
  1 +package com.qgutech.qgyun.apaas.sync.cps.controller;
  2 +
  3 +import com.qgutech.qgyun.apaas.sync.cps.model.BlockInfo;
  4 +import com.qgutech.qgyun.apaas.sync.cps.service.BlockInfoService;
  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("/blockInfo")
  20 +public class BlockInfoController {
  21 +
  22 + @Resource
  23 + private BlockInfoService blockInfoService;
  24 +
  25 + /**
  26 + * 获取所有板块信息列表
  27 + *
  28 + * @return
  29 + */
  30 + @GetMapping("/list/all")
  31 + public JsonResult listAll() {
  32 + List<BlockInfo> blockInfoList = blockInfoService.listAll();
  33 + return new JsonResult<>(true, "成功", blockInfoList);
  34 + }
  35 +}
... ...
  1 +package com.qgutech.qgyun.apaas.sync.cps.controller;
  2 +
  3 +import com.qgutech.qgyun.apaas.sync.cps.model.ProcessConfirmTeamPlan;
  4 +import com.qgutech.qgyun.apaas.sync.cps.service.ProcessConfirmTeamPlanService;
  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("/processConfirmTeamPlan")
  20 +public class ProcessConfirmTeamPlanController {
  21 +
  22 + @Resource
  23 + private ProcessConfirmTeamPlanService processConfirmTeamPlanService;
  24 +
  25 + /**
  26 + * 获取所有过程确认班组计划列表
  27 + *
  28 + * @return
  29 + */
  30 + @GetMapping("/list/all")
  31 + public JsonResult listAll() {
  32 + List<ProcessConfirmTeamPlan> processConfirmTeamPlanList = processConfirmTeamPlanService.listAll();
  33 + return new JsonResult<>(true, "成功", processConfirmTeamPlanList);
  34 + }
  35 +}
... ...
  1 +package com.qgutech.qgyun.apaas.sync.cps.controller;
  2 +
  3 +import com.qgutech.qgyun.apaas.sync.cps.dto.StopRecordDailySummaryDTO;
  4 +import com.qgutech.qgyun.apaas.sync.cps.dto.StopRecordDetailSummaryDTO;
  5 +import com.qgutech.qgyun.apaas.sync.cps.model.StopRecord;
  6 +import com.qgutech.qgyun.apaas.sync.cps.service.StopRecordService;
  7 +import com.qgutech.qgyun.framework.common.result.JsonResult;
  8 +import lombok.extern.slf4j.Slf4j;
  9 +import org.springframework.web.bind.annotation.GetMapping;
  10 +import org.springframework.web.bind.annotation.RequestMapping;
  11 +import org.springframework.web.bind.annotation.RequestParam;
  12 +import org.springframework.web.bind.annotation.RestController;
  13 +
  14 +import javax.annotation.Resource;
  15 +import java.util.List;
  16 +
  17 +/**
  18 + * 停线记录信息接口
  19 + */
  20 +@Slf4j
  21 +@RestController
  22 +@RequestMapping("/stopRecord")
  23 +public class StopRecordController {
  24 +
  25 + @Resource
  26 + private StopRecordService stopRecordService;
  27 +
  28 + /**
  29 + * 获取所有停线记录信息列表
  30 + *
  31 + * @return
  32 + */
  33 + @GetMapping("/list/all")
  34 + public JsonResult listAll() {
  35 + List<StopRecord> stopRecordList = stopRecordService.listAll();
  36 + return new JsonResult<>(true, "成功", stopRecordList);
  37 + }
  38 +
  39 + /**
  40 + * 按天汇总统计停线时长
  41 + * <p>
  42 + * 根据线体、班次、区域、板块条件筛选停线记录,按天分组汇总停线时长
  43 + *
  44 + * @param xtxx 线体信息,可为空
  45 + * @param bcxx 班次信息,可为空
  46 + * @param txqyxx 停线区域信息,可为空
  47 + * @param txbkxx 停线板块信息,可为空
  48 + * @param year 年份,必填
  49 + * @param month 月份(1-12),必填
  50 + * @return 按天汇总的停线时长列表
  51 + */
  52 + @GetMapping("/summary/daily")
  53 + public JsonResult summaryDailyByMonth(@RequestParam(required = false) String xtxx,
  54 + @RequestParam(required = false) String bcxx,
  55 + @RequestParam(required = false) String txqyxx,
  56 + @RequestParam(required = false) String txbkxx,
  57 + @RequestParam String year,
  58 + @RequestParam Integer month) {
  59 + List<StopRecordDailySummaryDTO> list = stopRecordService.summaryDailyByMonth(xtxx, bcxx, txqyxx, txbkxx, year, month);
  60 + return new JsonResult<>(true, "成功", list);
  61 + }
  62 +
  63 + /**
  64 + * 按工位汇总统计停线时长并返回明细
  65 + * <p>
  66 + * 根据线体、班次、区域、板块条件筛选停线记录,加上指定日期,
  67 + * 返回满足条件的所有停线记录列表,并按工位汇总停线时长(降序)
  68 + *
  69 + * @param xtxx 线体信息,可为空
  70 + * @param bcxx 班次信息,可为空
  71 + * @param txqyxx 停线区域信息,可为空
  72 + * @param txbkxx 停线板块信息,可为空
  73 + * @param date 指定日期(yyyy-MM-dd),可为空,为空时不限定日期
  74 + * @return 停线记录明细 + 工位汇总结果
  75 + */
  76 + @GetMapping("/summary/workstation")
  77 + public JsonResult summaryByWorkstation(@RequestParam(required = false) String xtxx,
  78 + @RequestParam(required = false) String bcxx,
  79 + @RequestParam(required = false) String txqyxx,
  80 + @RequestParam(required = false) String txbkxx,
  81 + @RequestParam(required = false) String date) {
  82 + StopRecordDetailSummaryDTO result = stopRecordService.summaryByWorkstation(xtxx, bcxx, txqyxx, txbkxx, date);
  83 + return new JsonResult<>(true, "成功", result);
  84 + }
  85 +}
... ...
  1 +package com.qgutech.qgyun.apaas.sync.cps.controller;
  2 +
  3 +import com.qgutech.qgyun.apaas.sync.cps.model.StopWorkstation;
  4 +import com.qgutech.qgyun.apaas.sync.cps.service.StopWorkstationService;
  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("/stopWorkstation")
  20 +public class StopWorkstationController {
  21 +
  22 + @Resource
  23 + private StopWorkstationService stopWorkstationService;
  24 +
  25 + /**
  26 + * 获取所有停线工位信息列表
  27 + *
  28 + * @return
  29 + */
  30 + @GetMapping("/list/all")
  31 + public JsonResult listAll() {
  32 + List<StopWorkstation> stopWorkstationList = stopWorkstationService.listAll();
  33 + return new JsonResult<>(true, "成功", stopWorkstationList);
  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 AbImprovementDeptSummaryDTO implements Serializable {
  16 +
  17 + private static final long serialVersionUID = 1L;
  18 +
  19 + /**
  20 + * 单位(组织架构ID)
  21 + */
  22 + private String dwxx;
  23 +
  24 + /**
  25 + * 单位名称
  26 + */
  27 + private String dwxxName;
  28 +
  29 + /**
  30 + * 申请部门(组织架构ID)
  31 + */
  32 + private String sqbm;
  33 +
  34 + /**
  35 + * 申请部门名称
  36 + */
  37 + private String sqbmName;
  38 +
  39 + /**
  40 + * 申请部门编号
  41 + */
  42 + private String sqbmCode;
  43 +
  44 + /**
  45 + * 年份
  46 + */
  47 + private String year;
  48 +
  49 + /**
  50 + * 节约价值汇总
  51 + */
  52 + private Double totalQnjyjz;
  53 +
  54 + /**
  55 + * 目标值
  56 + */
  57 + private Double mb;
  58 +
  59 + /**
  60 + * 完成率(%)
  61 + */
  62 + private Double completionRate;
  63 +}
... ...
  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 + * 停线记录按天汇总结果
  11 + */
  12 +@Getter
  13 +@Setter
  14 +@ToString
  15 +public class StopRecordDailySummaryDTO implements Serializable {
  16 +
  17 + private static final long serialVersionUID = 1L;
  18 +
  19 + /*
  20 + * 日期(yyyy-MM-dd)
  21 + */
  22 + private String date;
  23 +
  24 + /*
  25 + * 当日停线时长总计(分钟)
  26 + */
  27 + private Double totalTxsc;
  28 +
  29 + /*
  30 + * 当日停线记录数
  31 + */
  32 + private Integer totalCount;
  33 +}
... ...
  1 +package com.qgutech.qgyun.apaas.sync.cps.dto;
  2 +
  3 +import com.qgutech.qgyun.apaas.sync.cps.model.StopRecord;
  4 +import lombok.Getter;
  5 +import lombok.Setter;
  6 +import lombok.ToString;
  7 +
  8 +import java.io.Serializable;
  9 +import java.util.ArrayList;
  10 +import java.util.List;
  11 +
  12 +/**
  13 + * 停线记录明细 + 工位汇总结果
  14 + * <p>
  15 + * 返回满足条件的所有停线记录列表,以及按工位汇总的停线时长(按停线时长降序)
  16 + */
  17 +@Getter
  18 +@Setter
  19 +@ToString
  20 +public class StopRecordDetailSummaryDTO implements Serializable {
  21 +
  22 + private static final long serialVersionUID = 1L;
  23 +
  24 + /*
  25 + * 满足条件的所有停线记录列表
  26 + */
  27 + private List<StopRecord> records = new ArrayList<>();
  28 +
  29 + /*
  30 + * 各工位停线时长汇总(按停线时长降序)
  31 + */
  32 + private List<StopRecordWorkstationSummaryDTO> workstationSummary = new ArrayList<>();
  33 +}
... ...
  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 + * 停线记录按工位汇总结果
  11 + */
  12 +@Getter
  13 +@Setter
  14 +@ToString
  15 +public class StopRecordWorkstationSummaryDTO implements Serializable {
  16 +
  17 + private static final long serialVersionUID = 1L;
  18 +
  19 + /*
  20 + * 工位id
  21 + */
  22 + private String txgwxx;
  23 +
  24 + /*
  25 + * 工位名称
  26 + */
  27 + private String gwmc;
  28 +
  29 + /*
  30 + * 工位编号
  31 + */
  32 + private String gwbh;
  33 +
  34 + /*
  35 + * 该工位停线时长总计(分钟)
  36 + */
  37 + private Double totalTxsc;
  38 +
  39 + /*
  40 + * 该工位停线记录数
  41 + */
  42 + private Integer totalCount;
  43 +}
... ...
  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.BlockInfo;
  5 +
  6 +public interface BlockInfoMapper extends QguBaseMapper<BlockInfo> {
  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.ProcessConfirmTeamPlan;
  5 +
  6 +public interface ProcessConfirmTeamPlanMapper extends QguBaseMapper<ProcessConfirmTeamPlan> {
  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.StopRecord;
  5 +
  6 +public interface StopRecordMapper extends QguBaseMapper<StopRecord> {
  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.StopWorkstation;
  5 +
  6 +public interface StopWorkstationMapper extends QguBaseMapper<StopWorkstation> {
  7 +}
... ...
  1 +package com.qgutech.qgyun.apaas.sync.cps.model;
  2 +
  3 +import com.qgutech.qgyun.framework.database.model.BaseCorpModel;
  4 +import lombok.Getter;
  5 +import lombok.Setter;
  6 +import lombok.ToString;
  7 +
  8 +import javax.persistence.Table;
  9 +
  10 +/**
  11 + * 板块信息
  12 + */
  13 +@Getter
  14 +@Setter
  15 +@ToString
  16 +@Table(name = "t_auto_hfca_dnxpkp_bkxxxx")
  17 +public class BlockInfo extends BaseCorpModel {
  18 +
  19 + /*
  20 + * 名称
  21 + */
  22 + private String mc;
  23 +
  24 + /*
  25 + * 编码
  26 + */
  27 + private String bm;
  28 +
  29 + /*
  30 + * 序号
  31 + */
  32 + private String xh;
  33 +
  34 + /*
  35 + * 牵头单位
  36 + */
  37 + private String qtdw;
  38 +
  39 + /*
  40 + * 牵头单位负责人
  41 + */
  42 + private String qtdwfzr;
  43 +}
... ...
... ... @@ -25,6 +25,8 @@ public class ProcessConfirmExec extends BaseCorpModel {
25 25 public static final String SFYZX = "sfyzx";
26 26 public static final String ZT = "zt";
27 27 public static final String GCQRJHRY = "gcqrjhry";
  28 + public static final String ZXRY = "zxry";
  29 + public static final String BC = "bc";
28 30
29 31 /*
30 32 * 活动执行日期
... ...
  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 + * 过程确认班组计划
  15 + */
  16 +@Getter
  17 +@Setter
  18 +@ToString
  19 +@Table(name = "t_auto_hfca_ixzvok_ewpiwz")
  20 +public class ProcessConfirmTeamPlan extends BaseCorpModel {
  21 +
  22 + public static final String JHRQ = "jhrq";
  23 + public static final String ZXR = "zxr";
  24 + public static final String BCXX = "bcxx";
  25 + public static final String ZT = "zt";
  26 + public static final String SFFXWT = "sffxwt";
  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 jhrq;
  34 +
  35 + /*
  36 + * 执行人
  37 + */
  38 + private String zxr;
  39 +
  40 + /*
  41 + * 单位信息
  42 + */
  43 + private String dwxx;
  44 +
  45 + /*
  46 + * 线体信息
  47 + */
  48 + private String xtxx;
  49 +
  50 + /*
  51 + * 室组信息
  52 + */
  53 + private String szxx;
  54 +
  55 + /*
  56 + * 区域信息
  57 + */
  58 + private String qyxx;
  59 +
  60 + /*
  61 + * 计划走访班组
  62 + */
  63 + private String jhzfbz;
  64 + /*
  65 + * 计划走访工位
  66 + */
  67 + private String jhzfgw;
  68 +
  69 + /*
  70 + * 状态
  71 + */
  72 + private String zt;
  73 +
  74 + /*
  75 + * 是否发现问题
  76 + */
  77 + private Boolean sffxwt;
  78 +
  79 + /*
  80 + * 班次信息
  81 + */
  82 + private String bcxx;
  83 +}
... ...
  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 + * 停线记录信息
  15 + */
  16 +@Getter
  17 +@Setter
  18 +@ToString
  19 +@Table(name = "t_auto_hfca_zlujkl_tiemuz")
  20 +public class StopRecord extends BaseCorpModel {
  21 +
  22 + public static final String XTXX = "xtxx";
  23 + public static final String BCXX = "bcxx";
  24 + public static final String TXQYXX = "txqyxx";
  25 + public static final String TXBKXX = "txbkxx";
  26 + public static final String START_TIME = "startTime";
  27 + public static final String TXGWXX = "txgwxx";
  28 + public static final String TXSC = "txsc";
  29 +
  30 + /*
  31 + * 成员信息
  32 + */
  33 + private String cyxx;
  34 +
  35 + /*
  36 + * 线体信息
  37 + */
  38 + private String xtxx;
  39 +
  40 + /*
  41 + * 班次信息
  42 + */
  43 + private String bcxx;
  44 +
  45 + /*
  46 + * 停线区域信息
  47 + */
  48 + private String txqyxx;
  49 +
  50 + /*
  51 + * 停线班组信息
  52 + */
  53 + private String txbzxx;
  54 +
  55 + /*
  56 + * 停线工位信息
  57 + */
  58 + private String txgwxx;
  59 +
  60 + /*
  61 + * 工位性质
  62 + */
  63 + private String gwxz;
  64 +
  65 + /*
  66 + * 停线开始时间
  67 + */
  68 + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  69 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  70 + private Date startTime;
  71 +
  72 + /*
  73 + * 停线结束时间
  74 + */
  75 + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  76 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  77 + private Date endTime;
  78 +
  79 + /*
  80 + * 停线时长
  81 + */
  82 + private Double txsc;
  83 +
  84 + /*
  85 + * 停线板块信息
  86 + */
  87 + private String txbkxx;
  88 +
  89 + /*
  90 + * 停线分类信息
  91 + */
  92 + private String txflxx;
  93 +
  94 + /*
  95 + * 停线描述
  96 + */
  97 + private String txms;
  98 +
  99 + /*
  100 + * 切换系统备选组
  101 + */
  102 + private String qgxtbxz;
  103 +
  104 + /*
  105 + * 本班停线工艺原因
  106 + */
  107 + private String bsbqgxyy;
  108 +
  109 + /*
  110 + * 责任板块负责人
  111 + */
  112 + private String zrbkfzr;
  113 +
  114 + /*
  115 + * 停线问题回复
  116 + */
  117 + private String txwthf;
  118 +
  119 + /*
  120 + * 设备台账信息
  121 + */
  122 + private String sbtzxx;
  123 +
  124 + /*
  125 + * 设备编码
  126 + */
  127 + private String sbbm;
  128 +
  129 + /*
  130 + * 设备名称
  131 + */
  132 + private String sbmc;
  133 +
  134 + /*
  135 + * 设备故障类型
  136 + */
  137 + private String sbgzlx;
  138 +
  139 + /*
  140 + * 设备故障是否重复
  141 + */
  142 + private Boolean sbgzsfcf;
  143 +
  144 + /*
  145 + * 设备故障业务板块
  146 + */
  147 + private String sbgzywbz;
  148 +
  149 + /*
  150 + * 设备故障类型附件
  151 + */
  152 + private String sbgzlxfj;
  153 +
  154 + /*
  155 + * 设备故障原因
  156 + */
  157 + private String sbgzyy;
  158 +
  159 + /*
  160 + * 设备临时措施
  161 + */
  162 + private String sblscs;
  163 +
  164 + /*
  165 + * 设备应急措施
  166 + */
  167 + private String sbyjcs;
  168 +
  169 + /*
  170 + * 设备更换备件
  171 + */
  172 + private String sbghbj;
  173 +
  174 + /*
  175 + * 填报人员
  176 + */
  177 + private String tbry;
  178 +
  179 + /*
  180 + * 填报人员工号
  181 + */
  182 + private String tbrygh;
  183 +
  184 + /*
  185 + * 处置人员
  186 + */
  187 + private String czry;
  188 +
  189 + /*
  190 + * 处置人员工号
  191 + */
  192 + private String czrygh;
  193 +
  194 + /*
  195 + * 遗留问题处理方案
  196 + */
  197 + private String ylwtclfa;
  198 +}
... ...
  1 +package com.qgutech.qgyun.apaas.sync.cps.model;
  2 +
  3 +import com.qgutech.qgyun.framework.database.model.BaseCorpModel;
  4 +import lombok.Getter;
  5 +import lombok.Setter;
  6 +import lombok.ToString;
  7 +
  8 +import javax.persistence.Table;
  9 +
  10 +/**
  11 + * 停线工位信息
  12 + */
  13 +@Getter
  14 +@Setter
  15 +@ToString
  16 +@Table(name = "t_auto_hfca_zlujkl_tvulwx")
  17 +public class StopWorkstation extends BaseCorpModel {
  18 +
  19 + /*
  20 + * 线体信息
  21 + */
  22 + private String xtxx;
  23 +
  24 + /*
  25 + * 区域信息
  26 + */
  27 + private String qyxx;
  28 +
  29 + /*
  30 + * 班组信息
  31 + */
  32 + private String bzxx;
  33 +
  34 + /*
  35 + * 工位名称
  36 + */
  37 + private String gwmc;
  38 +
  39 + /*
  40 + * 工位编号
  41 + */
  42 + private String gwbh;
  43 +
  44 + /*
  45 + * 工位性质
  46 + */
  47 + private String gwxz;
  48 +}
... ...
  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.BlockInfoMapper;
  7 +import com.qgutech.qgyun.apaas.sync.cps.model.BlockInfo;
  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 com.qgutech.qgyun.apaas.sync.utils.CorpExample;
  13 +import tk.mybatis.mapper.entity.Example;
  14 +
  15 +import javax.annotation.Resource;
  16 +import java.util.*;
  17 +import java.util.stream.Collectors;
  18 +
  19 +/**
  20 + * BlockInfo 服务
  21 + */
  22 +@Service
  23 +public class BlockInfoService extends BaseServiceImpl<BlockInfo> {
  24 +
  25 + @Resource
  26 + private BlockInfoMapper blockInfoMapper;
  27 +
  28 + @Transactional(readOnly = true)
  29 + public BlockInfo getById(String id) {
  30 + Assert.hasLength(id, "id is empty!");
  31 +
  32 + Example example = new Example(entityClass);
  33 + CorpExample.criteria(example).andEqualTo(BlockInfo.ID, id);
  34 + BlockInfo blockInfo = blockInfoMapper.selectOneByExample(example);
  35 + if (null == blockInfo) {
  36 + throw new BoException(BoErrorCode.DATA_ERROR);
  37 + }
  38 + return blockInfo;
  39 + }
  40 +
  41 + @Transactional(readOnly = true)
  42 + public List<BlockInfo> listByIds(Collection<String> ids) {
  43 + Assert.notEmpty(ids, "ids is empty!");
  44 +
  45 + Example example = new Example(entityClass);
  46 + CorpExample.criteria(example).andIn(BlockInfo.ID, ids);
  47 + List<BlockInfo> blockInfoList = blockInfoMapper.selectByExample(example);
  48 + if (CollectionUtils.isEmpty(blockInfoList)) {
  49 + return new ArrayList<>(0);
  50 + }
  51 + return blockInfoList;
  52 + }
  53 +
  54 + @Transactional(readOnly = true)
  55 + public Map<String, BlockInfo> mapByIds(Collection<String> ids) {
  56 + Assert.notEmpty(ids, "ids is empty!");
  57 +
  58 + List<BlockInfo> blockInfoList = listByIds(ids);
  59 + if (CollectionUtils.isEmpty(blockInfoList)) {
  60 + return new HashMap<>(0);
  61 + }
  62 +
  63 + return blockInfoList.stream().collect(Collectors.toMap(BlockInfo::getId, blockInfo -> blockInfo));
  64 + }
  65 +
  66 + @Transactional(readOnly = true)
  67 + public List<BlockInfo> listAll() {
  68 +
  69 + Example example = CorpExample.ofCorp(entityClass);
  70 + return blockInfoMapper.selectByExample(example);
  71 + }
  72 +}
... ...
... ... @@ -709,6 +709,60 @@ public class ProcessConfirmExecService extends BaseServiceImpl<ProcessConfirmExe
709 709 }
710 710
711 711 /**
  712 + * 根据执行人集合、活动执行日期范围批量查询过程确认执行记录
  713 + *
  714 + * @param zxryIds 执行人ID集合
  715 + * @param start 活动执行日期开始时间
  716 + * @param end 活动执行日期结束时间
  717 + * @return 过程确认执行记录列表
  718 + */
  719 + @Transactional(readOnly = true)
  720 + public List<ProcessConfirmExec> listByZxryIdsAndHdzxrqRange(Collection<String> zxryIds, Date start, Date end) {
  721 + Assert.notEmpty(zxryIds, "zxryIds is empty!");
  722 + Assert.notNull(start, "start is empty!");
  723 + Assert.notNull(end, "end is empty!");
  724 +
  725 + Example example = new Example(entityClass);
  726 + CorpExample.criteria(example)
  727 + .andIn(ProcessConfirmExec.ZXRY, zxryIds)
  728 + .andBetween(ProcessConfirmExec.HDZXRQ, start, end);
  729 + List<ProcessConfirmExec> list = processConfirmExecMapper.selectByExample(example);
  730 + if (CollectionUtils.isEmpty(list)) {
  731 + return new ArrayList<>(0);
  732 + }
  733 + return list;
  734 + }
  735 +
  736 + /**
  737 + * 根据执行人、活动执行日期范围和班次查询过程确认执行记录
  738 + *
  739 + * @param zxry 执行人ID
  740 + * @param start 活动执行日期开始时间
  741 + * @param end 活动执行日期结束时间
  742 + * @param bc 班次信息
  743 + * @return 过程确认执行记录列表
  744 + */
  745 + @Transactional(readOnly = true)
  746 + public List<ProcessConfirmExec> listByZxryAndHdzxrqAndBc(String zxry, Date start, Date end, String bc) {
  747 + Assert.hasLength(zxry, "zxry is empty!");
  748 + Assert.notNull(start, "start is empty!");
  749 + Assert.notNull(end, "end is empty!");
  750 +
  751 + Example example = new Example(entityClass);
  752 + Example.Criteria criteria = CorpExample.criteria(example)
  753 + .andEqualTo(ProcessConfirmExec.ZXRY, zxry)
  754 + .andBetween(ProcessConfirmExec.HDZXRQ, start, end);
  755 + if (StringUtils.isNotBlank(bc)) {
  756 + criteria.andEqualTo(ProcessConfirmExec.BC, bc);
  757 + }
  758 + List<ProcessConfirmExec> list = processConfirmExecMapper.selectByExample(example);
  759 + if (CollectionUtils.isEmpty(list)) {
  760 + return new ArrayList<>(0);
  761 + }
  762 + return list;
  763 + }
  764 +
  765 + /**
712 766 * 保留两位小数,四舍五入
713 767 */
714 768 private double round2(double value) {
... ...
  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.enums.GcqrZtEnum;
  7 +import com.qgutech.qgyun.apaas.sync.cps.mapper.ProcessConfirmTeamPlanMapper;
  8 +import com.qgutech.qgyun.apaas.sync.cps.model.ProcessConfirmExec;
  9 +import com.qgutech.qgyun.apaas.sync.cps.model.ProcessConfirmTeamPlan;
  10 +import lombok.extern.slf4j.Slf4j;
  11 +import org.apache.commons.collections4.CollectionUtils;
  12 +import org.apache.commons.lang3.StringUtils;
  13 +import org.springframework.stereotype.Service;
  14 +import org.springframework.transaction.annotation.Transactional;
  15 +import org.springframework.util.Assert;
  16 +import com.qgutech.qgyun.apaas.sync.utils.CorpExample;
  17 +import tk.mybatis.mapper.entity.Example;
  18 +
  19 +import javax.annotation.Resource;
  20 +import java.util.*;
  21 +import java.util.stream.Collectors;
  22 +
  23 +/**
  24 + * ProcessConfirmTeamPlan 服务
  25 + */
  26 +@Slf4j
  27 +@Service
  28 +public class ProcessConfirmTeamPlanService extends BaseServiceImpl<ProcessConfirmTeamPlan> {
  29 +
  30 + @Resource
  31 + private ProcessConfirmTeamPlanMapper processConfirmTeamPlanMapper;
  32 +
  33 + @Resource
  34 + private ProcessConfirmExecService processConfirmExecService;
  35 +
  36 + @Transactional(readOnly = true)
  37 + public ProcessConfirmTeamPlan getById(String id) {
  38 + Assert.hasLength(id, "id is empty!");
  39 +
  40 + Example example = new Example(entityClass);
  41 + CorpExample.criteria(example).andEqualTo(ProcessConfirmTeamPlan.ID, id);
  42 + ProcessConfirmTeamPlan processConfirmTeamPlan = processConfirmTeamPlanMapper.selectOneByExample(example);
  43 + if (null == processConfirmTeamPlan) {
  44 + throw new BoException(BoErrorCode.DATA_ERROR);
  45 + }
  46 + return processConfirmTeamPlan;
  47 + }
  48 +
  49 + @Transactional(readOnly = true)
  50 + public List<ProcessConfirmTeamPlan> listByIds(Collection<String> ids) {
  51 + Assert.notEmpty(ids, "ids is empty!");
  52 +
  53 + Example example = new Example(entityClass);
  54 + CorpExample.criteria(example).andIn(ProcessConfirmTeamPlan.ID, ids);
  55 + List<ProcessConfirmTeamPlan> processConfirmTeamPlanList = processConfirmTeamPlanMapper.selectByExample(example);
  56 + if (CollectionUtils.isEmpty(processConfirmTeamPlanList)) {
  57 + return new ArrayList<>(0);
  58 + }
  59 + return processConfirmTeamPlanList;
  60 + }
  61 +
  62 + @Transactional(readOnly = true)
  63 + public Map<String, ProcessConfirmTeamPlan> mapByIds(Collection<String> ids) {
  64 + Assert.notEmpty(ids, "ids is empty!");
  65 +
  66 + List<ProcessConfirmTeamPlan> processConfirmTeamPlanList = listByIds(ids);
  67 + if (CollectionUtils.isEmpty(processConfirmTeamPlanList)) {
  68 + return new HashMap<>(0);
  69 + }
  70 +
  71 + return processConfirmTeamPlanList.stream().collect(Collectors.toMap(ProcessConfirmTeamPlan::getId, processConfirmTeamPlan -> processConfirmTeamPlan));
  72 + }
  73 +
  74 + @Transactional(readOnly = true)
  75 + public List<ProcessConfirmTeamPlan> listAll() {
  76 +
  77 + Example example = CorpExample.ofCorp(entityClass);
  78 + return processConfirmTeamPlanMapper.selectByExample(example);
  79 + }
  80 +
  81 + /**
  82 + * 查询计划日期在指定范围内且状态为待确认的过程确认班组计划记录
  83 + *
  84 + * @param start 计划日期开始时间
  85 + * @param end 计划日期结束时间
  86 + * @return 待确认的过程确认班组计划列表
  87 + */
  88 + @Transactional(readOnly = true)
  89 + public List<ProcessConfirmTeamPlan> listPendingByJhrqRange(Date start, Date end) {
  90 + Assert.notNull(start, "start is empty!");
  91 + Assert.notNull(end, "end is empty!");
  92 +
  93 + Example example = new Example(entityClass);
  94 + CorpExample.criteria(example)
  95 + .andBetween(ProcessConfirmTeamPlan.JHRQ, start, end)
  96 + .andEqualTo(ProcessConfirmTeamPlan.ZT, GcqrZtEnum.DAIQUEREN.getCode());
  97 + List<ProcessConfirmTeamPlan> list = processConfirmTeamPlanMapper.selectByExample(example);
  98 + if (CollectionUtils.isEmpty(list)) {
  99 + return new ArrayList<>(0);
  100 + }
  101 + return list;
  102 + }
  103 +
  104 + /**
  105 + * 批量更新过程确认班组计划记录
  106 + *
  107 + * @param list 待更新的记录列表
  108 + */
  109 + @Transactional
  110 + public void batchUpdate(List<ProcessConfirmTeamPlan> list) {
  111 + if (CollectionUtils.isEmpty(list)) {
  112 + return;
  113 + }
  114 + for (ProcessConfirmTeamPlan item : list) {
  115 + processConfirmTeamPlanMapper.updateByPrimaryKeySelective(item);
  116 + }
  117 + }
  118 +
  119 + /**
  120 + * 同步过程确认班组计划状态
  121 + * <p>
  122 + * 业务规则:
  123 + * <ul>
  124 + * <li>查询当前时间前两天时间范围内的计划日期在这范围内的并且状态为待确认的过程确认班组计划记录;</li>
  125 + * <li>根据获取的记录列表的执行人和计划日期和班次信息到过程确认计划执行(ProcessConfirmExec)表中查询对应记录;</li>
  126 + * <li>若无对应记录,则更新过程确认班组计划记录为已逾期;</li>
  127 + * <li>若有记录,记录状态为待确认的不做更新;</li>
  128 + * <li>若记录为未执行,则更新班组计划记录为未执行;</li>
  129 + * <li>若记录为已执行,则更新班组计划记录为已执行;</li>
  130 + * <li>若记录为已逾期,则更新班组计划记录为已逾期;</li>
  131 + * <li>若记录是否发现问题为是,则更新班组计划记录是否发现问题为是。</li>
  132 + * </ul>
  133 + *
  134 + * @return 更新记录数
  135 + */
  136 + @Transactional
  137 + public int syncTeamPlanStatus() {
  138 + // 1. 计算前两天的时间范围(前天 00:00:00 ~ 昨天 23:59:59)
  139 + Calendar cal = Calendar.getInstance();
  140 + cal.add(Calendar.DAY_OF_MONTH, -2);
  141 + cal.set(Calendar.HOUR_OF_DAY, 0);
  142 + cal.set(Calendar.MINUTE, 0);
  143 + cal.set(Calendar.SECOND, 0);
  144 + cal.set(Calendar.MILLISECOND, 0);
  145 + Date start = cal.getTime();
  146 +
  147 + cal.add(Calendar.DAY_OF_MONTH, 1);
  148 + cal.set(Calendar.HOUR_OF_DAY, 23);
  149 + cal.set(Calendar.MINUTE, 59);
  150 + cal.set(Calendar.SECOND, 59);
  151 + cal.set(Calendar.MILLISECOND, 999);
  152 + Date end = cal.getTime();
  153 +
  154 + // 2. 查询计划日期在范围内且状态为待确认的过程确认班组计划记录
  155 + List<ProcessConfirmTeamPlan> pendingList = listPendingByJhrqRange(start, end);
  156 + if (CollectionUtils.isEmpty(pendingList)) {
  157 + log.info("同步过程确认班组计划状态完成,无待确认记录");
  158 + return 0;
  159 + }
  160 +
  161 + // 3. 提取所有执行人ID,批量查询过程确认执行记录(避免循环查询数据库)
  162 + Set<String> zxrIds = pendingList.stream()
  163 + .map(ProcessConfirmTeamPlan::getZxr)
  164 + .filter(StringUtils::isNotBlank)
  165 + .collect(Collectors.toSet());
  166 + if (CollectionUtils.isEmpty(zxrIds)) {
  167 + log.info("同步过程确认班组计划状态完成,待确认记录执行人均为空");
  168 + return 0;
  169 + }
  170 +
  171 + // 批量查询执行人对应的过程确认执行记录(时间范围与班组计划一致)
  172 + List<ProcessConfirmExec> execList = processConfirmExecService.listByZxryIdsAndHdzxrqRange(zxrIds, start, end);
  173 +
  174 + // 4. 构建执行人+日期+班次 -> 执行记录 的映射,用于快速匹配
  175 + // key: zxr + "_" + jhrq(yyyy-MM-dd) + "_" + bcxx
  176 + Map<String, ProcessConfirmExec> execMap = buildExecMap(execList);
  177 +
  178 + // 5. 遍历每条班组计划,匹配执行记录并更新状态
  179 + List<ProcessConfirmTeamPlan> toUpdateList = new ArrayList<>();
  180 + for (ProcessConfirmTeamPlan plan : pendingList) {
  181 + String zxr = plan.getZxr();
  182 + Date jhrq = plan.getJhrq();
  183 + String bcxx = plan.getBcxx();
  184 + if (StringUtils.isBlank(zxr) || jhrq == null) {
  185 + continue;
  186 + }
  187 +
  188 + String key = buildExecKey(zxr, jhrq, bcxx);
  189 + ProcessConfirmExec exec = execMap.get(key);
  190 +
  191 + if (exec == null) {
  192 + // 无对应记录,更新为已逾期
  193 + plan.setZt(GcqrZtEnum.YIYUQI.getCode());
  194 + toUpdateList.add(plan);
  195 + } else {
  196 + String execZt = exec.getZt();
  197 +
  198 + // 记录状态为待确认的不做更新
  199 + if (GcqrZtEnum.DAIQUEREN.getCode().equals(execZt)) {
  200 + continue;
  201 + }
  202 +
  203 + // 根据执行记录状态更新班组计划状态
  204 + if (GcqrZtEnum.WEIZHIXING.getCode().equals(execZt)) {
  205 + plan.setZt(GcqrZtEnum.WEIZHIXING.getCode());
  206 + } else if (GcqrZtEnum.YIZHIXING.getCode().equals(execZt)) {
  207 + plan.setZt(GcqrZtEnum.YIZHIXING.getCode());
  208 + } else if (GcqrZtEnum.YIYUQI.getCode().equals(execZt)) {
  209 + plan.setZt(GcqrZtEnum.YIYUQI.getCode());
  210 + }
  211 +
  212 + // 若记录是否发现问题为是,则更新班组计划记录是否发现问题为是
  213 + if (Boolean.TRUE.equals(exec.getSffxwt())) {
  214 + plan.setSffxwt(Boolean.TRUE);
  215 + }
  216 +
  217 + toUpdateList.add(plan);
  218 + }
  219 + }
  220 +
  221 + // 6. 批量更新
  222 + if (CollectionUtils.isNotEmpty(toUpdateList)) {
  223 + batchUpdate(toUpdateList);
  224 + }
  225 +
  226 + log.info("同步过程确认班组计划状态完成,共处理 {} 条待确认记录,更新 {} 条",
  227 + pendingList.size(), toUpdateList.size());
  228 + return toUpdateList.size();
  229 + }
  230 +
  231 + /**
  232 + * 构建执行记录映射,key: zxr + "_" + jhrq(yyyy-MM-dd) + "_" + bcxx
  233 + */
  234 + private Map<String, ProcessConfirmExec> buildExecMap(List<ProcessConfirmExec> execList) {
  235 + if (CollectionUtils.isEmpty(execList)) {
  236 + return new HashMap<>(0);
  237 + }
  238 + Map<String, ProcessConfirmExec> map = new HashMap<>();
  239 + for (ProcessConfirmExec exec : execList) {
  240 + String key = buildExecKey(exec.getZxry(), exec.getHdzxrq(), exec.getBc());
  241 + // 若同一key存在多条记录,保留第一条(与原有逻辑一致)
  242 + map.putIfAbsent(key, exec);
  243 + }
  244 + return map;
  245 + }
  246 +
  247 + /**
  248 + * 构建执行记录匹配key
  249 + */
  250 + private String buildExecKey(String zxr, Date jhrq, String bcxx) {
  251 + String dateStr = "";
  252 + if (jhrq != null) {
  253 + Calendar cal = Calendar.getInstance();
  254 + cal.setTime(jhrq);
  255 + dateStr = String.format("%d-%02d-%02d",
  256 + cal.get(Calendar.YEAR),
  257 + cal.get(Calendar.MONTH) + 1,
  258 + cal.get(Calendar.DAY_OF_MONTH));
  259 + }
  260 + return zxr + "_" + dateStr + "_" + (bcxx == null ? "" : bcxx);
  261 + }
  262 +}
... ...
  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.StopRecordDailySummaryDTO;
  7 +import com.qgutech.qgyun.apaas.sync.cps.dto.StopRecordDetailSummaryDTO;
  8 +import com.qgutech.qgyun.apaas.sync.cps.dto.StopRecordWorkstationSummaryDTO;
  9 +import com.qgutech.qgyun.apaas.sync.cps.mapper.StopRecordMapper;
  10 +import com.qgutech.qgyun.apaas.sync.cps.model.StopRecord;
  11 +import com.qgutech.qgyun.apaas.sync.cps.model.StopWorkstation;
  12 +import org.apache.commons.collections4.CollectionUtils;
  13 +import org.apache.commons.lang3.StringUtils;
  14 +import org.springframework.stereotype.Service;
  15 +import org.springframework.transaction.annotation.Transactional;
  16 +import org.springframework.util.Assert;
  17 +import com.qgutech.qgyun.apaas.sync.utils.CorpExample;
  18 +import tk.mybatis.mapper.entity.Example;
  19 +
  20 +import javax.annotation.Resource;
  21 +import java.text.SimpleDateFormat;
  22 +import java.util.*;
  23 +import java.util.stream.Collectors;
  24 +
  25 +/**
  26 + * StopRecord 服务
  27 + */
  28 +@Service
  29 +public class StopRecordService extends BaseServiceImpl<StopRecord> {
  30 +
  31 + @Resource
  32 + private StopRecordMapper stopRecordMapper;
  33 +
  34 + @Resource
  35 + private StopWorkstationService stopWorkstationService;
  36 +
  37 + @Transactional(readOnly = true)
  38 + public StopRecord getById(String id) {
  39 + Assert.hasLength(id, "id is empty!");
  40 +
  41 + Example example = new Example(entityClass);
  42 + CorpExample.criteria(example).andEqualTo(StopRecord.ID, id);
  43 + StopRecord stopRecord = stopRecordMapper.selectOneByExample(example);
  44 + if (null == stopRecord) {
  45 + throw new BoException(BoErrorCode.DATA_ERROR);
  46 + }
  47 + return stopRecord;
  48 + }
  49 +
  50 + @Transactional(readOnly = true)
  51 + public List<StopRecord> listByIds(Collection<String> ids) {
  52 + Assert.notEmpty(ids, "ids is empty!");
  53 +
  54 + Example example = new Example(entityClass);
  55 + CorpExample.criteria(example).andIn(StopRecord.ID, ids);
  56 + List<StopRecord> stopRecordList = stopRecordMapper.selectByExample(example);
  57 + if (CollectionUtils.isEmpty(stopRecordList)) {
  58 + return new ArrayList<>(0);
  59 + }
  60 + return stopRecordList;
  61 + }
  62 +
  63 + @Transactional(readOnly = true)
  64 + public Map<String, StopRecord> mapByIds(Collection<String> ids) {
  65 + Assert.notEmpty(ids, "ids is empty!");
  66 +
  67 + List<StopRecord> stopRecordList = listByIds(ids);
  68 + if (CollectionUtils.isEmpty(stopRecordList)) {
  69 + return new HashMap<>(0);
  70 + }
  71 +
  72 + return stopRecordList.stream().collect(Collectors.toMap(StopRecord::getId, stopRecord -> stopRecord));
  73 + }
  74 +
  75 + @Transactional(readOnly = true)
  76 + public List<StopRecord> listAll() {
  77 +
  78 + Example example = CorpExample.ofCorp(entityClass);
  79 + return stopRecordMapper.selectByExample(example);
  80 + }
  81 +
  82 + /**
  83 + * 根据条件查询停线记录列表
  84 + *
  85 + * @param xtxx 线体信息,可为空
  86 + * @param bcxx 班次信息,可为空
  87 + * @param txqyxx 停线区域信息,可为空
  88 + * @param txbkxx 停线板块信息,可为空
  89 + * @param start 停线开始时间范围-开始
  90 + * @param end 停线开始时间范围-结束
  91 + * @return 停线记录列表
  92 + */
  93 + @Transactional(readOnly = true)
  94 + public List<StopRecord> listByCondition(String xtxx, String bcxx, String txqyxx, String txbkxx,
  95 + Date start, Date end) {
  96 + Example example = new Example(entityClass);
  97 + Example.Criteria criteria = CorpExample.criteria(example);
  98 + if (StringUtils.isNotBlank(xtxx)) {
  99 + criteria.andEqualTo(StopRecord.XTXX, xtxx);
  100 + }
  101 + if (StringUtils.isNotBlank(bcxx)) {
  102 + criteria.andEqualTo(StopRecord.BCXX, bcxx);
  103 + }
  104 + if (StringUtils.isNotBlank(txqyxx)) {
  105 + criteria.andEqualTo(StopRecord.TXQYXX, txqyxx);
  106 + }
  107 + if (StringUtils.isNotBlank(txbkxx)) {
  108 + criteria.andEqualTo(StopRecord.TXBKXX, txbkxx);
  109 + }
  110 + if (start != null && end != null) {
  111 + criteria.andBetween(StopRecord.START_TIME, start, end);
  112 + }
  113 + List<StopRecord> list = stopRecordMapper.selectByExample(example);
  114 + if (CollectionUtils.isEmpty(list)) {
  115 + return new ArrayList<>(0);
  116 + }
  117 + return list;
  118 + }
  119 +
  120 + /**
  121 + * 按天汇总统计停线时长
  122 + * <p>
  123 + * 根据线体、班次、区域、板块条件筛选停线记录,按天分组汇总停线时长
  124 + *
  125 + * @param xtxx 线体信息,可为空
  126 + * @param bcxx 班次信息,可为空
  127 + * @param txqyxx 停线区域信息,可为空
  128 + * @param txbkxx 停线板块信息,可为空
  129 + * @param year 年份,必填
  130 + * @param month 月份(1-12),必填
  131 + * @return 按天汇总的停线时长列表
  132 + */
  133 + @Transactional(readOnly = true)
  134 + public List<StopRecordDailySummaryDTO> summaryDailyByMonth(String xtxx, String bcxx, String txqyxx,
  135 + String txbkxx, String year, Integer month) {
  136 + Assert.hasLength(year, "year is empty!");
  137 + Assert.notNull(month, "month is empty!");
  138 + Assert.isTrue(month >= 1 && month <= 12, "month must be between 1 and 12!");
  139 +
  140 + // 计算月份时间范围
  141 + Calendar cal = Calendar.getInstance();
  142 + cal.set(Calendar.YEAR, Integer.parseInt(year));
  143 + cal.set(Calendar.MONTH, month - 1);
  144 + cal.set(Calendar.DAY_OF_MONTH, 1);
  145 + cal.set(Calendar.HOUR_OF_DAY, 0);
  146 + cal.set(Calendar.MINUTE, 0);
  147 + cal.set(Calendar.SECOND, 0);
  148 + cal.set(Calendar.MILLISECOND, 0);
  149 + Date start = cal.getTime();
  150 +
  151 + cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));
  152 + cal.set(Calendar.HOUR_OF_DAY, 23);
  153 + cal.set(Calendar.MINUTE, 59);
  154 + cal.set(Calendar.SECOND, 59);
  155 + cal.set(Calendar.MILLISECOND, 999);
  156 + Date end = cal.getTime();
  157 +
  158 + // 查询该月份内满足条件的停线记录
  159 + List<StopRecord> list = listByCondition(xtxx, bcxx, txqyxx, txbkxx, start, end);
  160 + if (CollectionUtils.isEmpty(list)) {
  161 + return new ArrayList<>(0);
  162 + }
  163 +
  164 + // 按天分组汇总停线时长
  165 + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
  166 + Map<String, List<StopRecord>> dailyMap = list.stream()
  167 + .filter(item -> item.getStartTime() != null)
  168 + .collect(Collectors.groupingBy(item -> dateFormat.format(item.getStartTime())));
  169 +
  170 + List<StopRecordDailySummaryDTO> resultList = new ArrayList<>();
  171 + for (Map.Entry<String, List<StopRecord>> entry : dailyMap.entrySet()) {
  172 + List<StopRecord> dailyList = entry.getValue();
  173 +
  174 + StopRecordDailySummaryDTO dto = new StopRecordDailySummaryDTO();
  175 + dto.setDate(entry.getKey());
  176 + dto.setTotalCount(dailyList.size());
  177 +
  178 + // 计算当日总停线时长(txsc 为 null 时按 0 计)
  179 + double totalTxsc = dailyList.stream()
  180 + .mapToDouble(item -> item.getTxsc() == null ? 0.0 : item.getTxsc())
  181 + .sum();
  182 + dto.setTotalTxsc(totalTxsc);
  183 +
  184 + resultList.add(dto);
  185 + }
  186 +
  187 + // 按日期升序排列
  188 + resultList.sort(Comparator.comparing(StopRecordDailySummaryDTO::getDate));
  189 + return resultList;
  190 + }
  191 +
  192 + /**
  193 + * 按工位汇总统计停线时长并返回明细
  194 + * <p>
  195 + * 根据线体、班次、区域、板块条件筛选停线记录,加上指定日期,
  196 + * 返回满足条件的所有停线记录列表,并按工位汇总停线时长(按停线时长降序排列)
  197 + *
  198 + * @param xtxx 线体信息,可为空
  199 + * @param bcxx 班次信息,可为空
  200 + * @param txqyxx 停线区域信息,可为空
  201 + * @param txbkxx 停线板块信息,可为空
  202 + * @param date 指定日期(yyyy-MM-dd),可为空,为空时不限定日期
  203 + * @return 停线记录明细 + 工位汇总结果
  204 + */
  205 + @Transactional(readOnly = true)
  206 + public StopRecordDetailSummaryDTO summaryByWorkstation(String xtxx, String bcxx, String txqyxx,
  207 + String txbkxx, String date) {
  208 + StopRecordDetailSummaryDTO result = new StopRecordDetailSummaryDTO();
  209 +
  210 + // 解析指定日期为当天时间范围
  211 + Date start = null;
  212 + Date end = null;
  213 + if (StringUtils.isNotBlank(date)) {
  214 + try {
  215 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
  216 + Calendar cal = Calendar.getInstance();
  217 + cal.setTime(sdf.parse(date));
  218 + cal.set(Calendar.HOUR_OF_DAY, 0);
  219 + cal.set(Calendar.MINUTE, 0);
  220 + cal.set(Calendar.SECOND, 0);
  221 + cal.set(Calendar.MILLISECOND, 0);
  222 + start = cal.getTime();
  223 +
  224 + cal.set(Calendar.HOUR_OF_DAY, 23);
  225 + cal.set(Calendar.MINUTE, 59);
  226 + cal.set(Calendar.SECOND, 59);
  227 + cal.set(Calendar.MILLISECOND, 999);
  228 + end = cal.getTime();
  229 + } catch (Exception e) {
  230 + throw new BoException(BoErrorCode.PARAM_ERROR, "日期格式错误,应为 yyyy-MM-dd");
  231 + }
  232 + }
  233 +
  234 + // 查询满足条件的停线记录
  235 + List<StopRecord> list = listByCondition(xtxx, bcxx, txqyxx, txbkxx, start, end);
  236 + if (CollectionUtils.isEmpty(list)) {
  237 + return result;
  238 + }
  239 +
  240 + // 满足条件的所有停线记录列表
  241 + result.setRecords(list);
  242 + // 各工位停线时长汇总(降序)
  243 + result.setWorkstationSummary(buildWorkstationSummary(list));
  244 + return result;
  245 + }
  246 +
  247 + /**
  248 + * 按工位汇总停线时长(按停线时长降序排列)
  249 + *
  250 + * @param list 停线记录列表
  251 + * @return 工位汇总列表
  252 + */
  253 + private List<StopRecordWorkstationSummaryDTO> buildWorkstationSummary(List<StopRecord> list) {
  254 + // 批量查询工位信息,避免循环查库
  255 + Set<String> workstationIds = list.stream()
  256 + .map(StopRecord::getTxgwxx)
  257 + .filter(StringUtils::isNotBlank)
  258 + .collect(Collectors.toSet());
  259 + Map<String, StopWorkstation> workstationMap = CollectionUtils.isEmpty(workstationIds)
  260 + ? new HashMap<>(0) : stopWorkstationService.mapByIds(workstationIds);
  261 +
  262 + // 按工位分组汇总
  263 + Map<String, List<StopRecord>> workstationGroup = list.stream()
  264 + .filter(item -> StringUtils.isNotBlank(item.getTxgwxx()))
  265 + .collect(Collectors.groupingBy(StopRecord::getTxgwxx));
  266 +
  267 + List<StopRecordWorkstationSummaryDTO> resultList = new ArrayList<>();
  268 + for (Map.Entry<String, List<StopRecord>> entry : workstationGroup.entrySet()) {
  269 + String txgwxx = entry.getKey();
  270 + List<StopRecord> wsList = entry.getValue();
  271 +
  272 + StopRecordWorkstationSummaryDTO dto = new StopRecordWorkstationSummaryDTO();
  273 + dto.setTxgwxx(txgwxx);
  274 + dto.setTotalCount(wsList.size());
  275 +
  276 + double totalTxsc = wsList.stream()
  277 + .mapToDouble(item -> item.getTxsc() == null ? 0.0 : item.getTxsc())
  278 + .sum();
  279 + dto.setTotalTxsc(totalTxsc);
  280 +
  281 + // 设置工位名称和编号
  282 + StopWorkstation workstation = workstationMap.get(txgwxx);
  283 + if (workstation != null) {
  284 + dto.setGwmc(workstation.getGwmc());
  285 + dto.setGwbh(workstation.getGwbh());
  286 + }
  287 +
  288 + resultList.add(dto);
  289 + }
  290 +
  291 + // 按停线时长降序排列
  292 + resultList.sort(Comparator.comparing(StopRecordWorkstationSummaryDTO::getTotalTxsc,
  293 + Comparator.nullsLast(Comparator.reverseOrder())));
  294 + return resultList;
  295 + }
  296 +}
... ...
  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.StopWorkstationMapper;
  7 +import com.qgutech.qgyun.apaas.sync.cps.model.StopWorkstation;
  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 com.qgutech.qgyun.apaas.sync.utils.CorpExample;
  13 +import tk.mybatis.mapper.entity.Example;
  14 +
  15 +import javax.annotation.Resource;
  16 +import java.util.*;
  17 +import java.util.stream.Collectors;
  18 +
  19 +/**
  20 + * StopWorkstation 服务
  21 + */
  22 +@Service
  23 +public class StopWorkstationService extends BaseServiceImpl<StopWorkstation> {
  24 +
  25 + @Resource
  26 + private StopWorkstationMapper stopWorkstationMapper;
  27 +
  28 + @Transactional(readOnly = true)
  29 + public StopWorkstation getById(String id) {
  30 + Assert.hasLength(id, "id is empty!");
  31 +
  32 + Example example = new Example(entityClass);
  33 + CorpExample.criteria(example).andEqualTo(StopWorkstation.ID, id);
  34 + StopWorkstation stopWorkstation = stopWorkstationMapper.selectOneByExample(example);
  35 + if (null == stopWorkstation) {
  36 + throw new BoException(BoErrorCode.DATA_ERROR);
  37 + }
  38 + return stopWorkstation;
  39 + }
  40 +
  41 + @Transactional(readOnly = true)
  42 + public List<StopWorkstation> listByIds(Collection<String> ids) {
  43 + Assert.notEmpty(ids, "ids is empty!");
  44 +
  45 + Example example = new Example(entityClass);
  46 + CorpExample.criteria(example).andIn(StopWorkstation.ID, ids);
  47 + List<StopWorkstation> stopWorkstationList = stopWorkstationMapper.selectByExample(example);
  48 + if (CollectionUtils.isEmpty(stopWorkstationList)) {
  49 + return new ArrayList<>(0);
  50 + }
  51 + return stopWorkstationList;
  52 + }
  53 +
  54 + @Transactional(readOnly = true)
  55 + public Map<String, StopWorkstation> mapByIds(Collection<String> ids) {
  56 + Assert.notEmpty(ids, "ids is empty!");
  57 +
  58 + List<StopWorkstation> stopWorkstationList = listByIds(ids);
  59 + if (CollectionUtils.isEmpty(stopWorkstationList)) {
  60 + return new HashMap<>(0);
  61 + }
  62 +
  63 + return stopWorkstationList.stream().collect(Collectors.toMap(StopWorkstation::getId, stopWorkstation -> stopWorkstation));
  64 + }
  65 +
  66 + @Transactional(readOnly = true)
  67 + public List<StopWorkstation> listAll() {
  68 +
  69 + Example example = CorpExample.ofCorp(entityClass);
  70 + return stopWorkstationMapper.selectByExample(example);
  71 + }
  72 +}
... ...
1 1 package com.qgutech.qgyun.apaas.sync.cps.task;
2 2
3 3 import com.qgutech.qgyun.apaas.sync.cps.service.ProcessConfirmExecService;
  4 +import com.qgutech.qgyun.apaas.sync.cps.service.ProcessConfirmTeamPlanService;
4 5 import lombok.extern.slf4j.Slf4j;
5 6 import org.springframework.scheduling.annotation.Scheduled;
6 7 import org.springframework.stereotype.Service;
... ... @@ -19,6 +20,9 @@ public class CpsScheduledTask {
19 20 @Resource
20 21 private ProcessConfirmExecService processConfirmExecService;
21 22
  23 + @Resource
  24 + private ProcessConfirmTeamPlanService processConfirmTeamPlanService;
  25 +
22 26 /**
23 27 * 根据每日考勤记录自动生成过程确认计划
24 28 * 定时任务执行-每隔30分钟执行一次
... ... @@ -33,4 +37,19 @@ public class CpsScheduledTask {
33 37 log.error("定时任务[根据每日考勤记录自动生成过程确认计划]执行异常", e);
34 38 }
35 39 }
  40 +
  41 + /**
  42 + * 同步过程确认班组计划状态
  43 + * 定时任务执行-每天凌晨2点执行
  44 + */
  45 + @Scheduled(cron = "0 0 2 * * ?")
  46 + public void syncProcessConfirmTeamPlanStatus() {
  47 + try {
  48 + int count = processConfirmTeamPlanService.syncTeamPlanStatus();
  49 + log.info("定时任务[同步过程确认班组计划状态]执行完成,更新 {} 条", count);
  50 + } catch (Exception e) {
  51 + e.printStackTrace();
  52 + log.error("定时任务[同步过程确认班组计划状态]执行异常", e);
  53 + }
  54 + }
36 55 }
... ...
... ... @@ -34,6 +34,10 @@
34 34 - [7.4 获取所有启用的区域列表](#74-获取所有启用的区域列表)
35 35 - [7.5 获取所有启用的班组列表](#75-获取所有启用的班组列表)
36 36 - [7.6 获取所有启用的班次列表](#76-获取所有启用的班次列表)
  37 +- [8. 停线记录接口](#8-停线记录接口)
  38 + - [8.1 获取所有停线记录列表 🆕新增](#81-获取所有停线记录列表)
  39 + - [8.2 按月份汇总统计每天的停线时长 🆕新增](#82-按月份汇总统计每天的停线时长)
  40 + - [8.3 按工位汇总统计停线时长并返回明细 🆕新增](#83-按工位汇总统计停线时长并返回明细)
37 41
38 42 ---
39 43
... ... @@ -47,6 +51,9 @@
47 51 | ✏️ | [2.2](#22-根据年份和季度查询c类改善发起率汇总) | `GET /cImprovement/summary/quarter` | 接口更新 | 统计维度由「室组」调整为「单位车间」(按季度人员所在单位 shdw 分组),目标值改按单位车间 dwcj 匹配,返回字段以 dwcj/dwcjName/dwcjCode 为主 |
48 52 | 🆕 | [2.3](#23-根据年份季度和单位车间查询c类改善发起率汇总) | `GET /cImprovement/summary/workshop` | 新增接口 | 按单位 + 季度查询,统计指定单位车间下各室组的 C 类改善发起率(即原 2.2 的室组维度逻辑,目标值按室组 szxx 匹配) |
49 53 | 🆕 | [4.4](#44-根据条件查询过程确认执行记录对应的问题记录明细列表) | `GET /processConfirmExec/list/problem` | 新增接口 | 入参同 [4.3](#43-根据条件查询过程确认执行记录明细列表) 但去掉状态 zt,返回这些执行记录来源发现的 CPS 问题记录明细 |
  54 +| 🆕 | [8.1](#81-获取所有停线记录列表) | `GET /stopRecord/list/all` | 新增接口 | 获取当前企业下所有停线记录信息列表 |
  55 +| 🆕 | [8.2](#82-按月份汇总统计每天的停线时长) | `GET /stopRecord/summary/daily` | 新增接口 | 按线体、班次、区域、板块、年月(1-12)筛选停线记录,按天汇总每天的停线时长,结果按日期升序 |
  56 +| 🆕 | [8.3](#83-按工位汇总统计停线时长并返回明细) | `GET /stopRecord/summary/workstation` | 新增接口 | 在 8.2 条件基础上加指定日期,返回满足条件的停线记录列表,并按工位汇总停线时长(降序) |
50 57
51 58 > 编号调整说明:因 2.3 新增了「按单位车间查室组」接口,原「2.3 根据年份、季度、室组id查询C类改善记录详情」顺延为 **2.4**(接口路径与内容未变)。
52 59
... ... @@ -2275,3 +2282,184 @@ uat3环境: https://uat3.qgutech.com/fkyycustom
2275 2282 "errCode": null
2276 2283 }
2277 2284 ```
  2285 +
  2286 +---
  2287 +
  2288 +## 8. 停线记录接口
  2289 +
  2290 +### 8.1 获取所有停线记录列表 🆕新增
  2291 +
  2292 +**接口路径:** `GET /stopRecord/list/all`
  2293 +
  2294 +**接口说明:** 获取当前企业下所有停线记录信息列表。
  2295 +
  2296 +**请求参数:** 无
  2297 +
  2298 +**响应数据:** `List<StopRecord>`
  2299 +
  2300 +**响应字段说明:**
  2301 +
  2302 +| 字段 | 类型 | 说明 |
  2303 +|------|------|------|
  2304 +| id | String | 记录ID |
  2305 +| cyxx | String | 成员信息 |
  2306 +| xtxx | String | 线体信息 |
  2307 +| bcxx | String | 班次信息 |
  2308 +| txqyxx | String | 停线区域信息 |
  2309 +| txbzxx | String | 停线班组信息 |
  2310 +| txgwxx | String | 停线工位信息 |
  2311 +| gwxz | String | 工位性质 |
  2312 +| startTime | String | 停线开始时间(yyyy-MM-dd HH:mm:ss) |
  2313 +| endTime | String | 停线结束时间(yyyy-MM-dd HH:mm:ss) |
  2314 +| txsc | Double | 停线时长(分钟) |
  2315 +| txbkxx | String | 停线板块信息 |
  2316 +| txflxx | String | 停线分类信息 |
  2317 +| txms | String | 停线描述 |
  2318 +
  2319 +**响应示例:**
  2320 +
  2321 +```json
  2322 +{
  2323 + "success": true,
  2324 + "data": [
  2325 + {
  2326 + "id": "SR20260901001",
  2327 + "corpCode": "qgutech",
  2328 + "xtxx": "XT001",
  2329 + "bcxx": "BC001",
  2330 + "txqyxx": "QY001",
  2331 + "txgwxx": "GW001",
  2332 + "startTime": "2026-09-01 08:30:00",
  2333 + "endTime": "2026-09-01 09:00:00",
  2334 + "txsc": 30.0,
  2335 + "txbkxx": "BK001"
  2336 + }
  2337 + ],
  2338 + "msg": "成功",
  2339 + "errCode": null
  2340 +}
  2341 +```
  2342 +
  2343 +---
  2344 +
  2345 +### 8.2 按月份汇总统计每天的停线时长 🆕新增
  2346 +
  2347 +**接口路径:** `GET /stopRecord/summary/daily`
  2348 +
  2349 +**接口说明:** 根据线体、班次、区域、板块条件筛选指定年月(1-12 月)范围内的停线记录,按天分组汇总每天的停线时长与记录数,结果按日期升序排列。
  2350 +
  2351 +**请求参数:**
  2352 +
  2353 +| 参数名 | 类型 | 必传 | 说明 |
  2354 +|--------|------|------|------|
  2355 +| xtxx | String | 否 | 线体信息(线体id),为空则不限定 |
  2356 +| bcxx | String | 否 | 班次信息(班次id),为空则不限定 |
  2357 +| txqyxx | String | 否 | 停线区域信息(区域id),为空则不限定 |
  2358 +| txbkxx | String | 否 | 停线板块信息(板块id),为空则不限定 |
  2359 +| year | String | 是 | 年份,如 2026 |
  2360 +| month | Integer | 是 | 月份(1-12) |
  2361 +
  2362 +**响应数据:** `List<StopRecordDailySummaryDTO>`
  2363 +
  2364 +**响应字段说明:**
  2365 +
  2366 +| 字段 | 类型 | 说明 |
  2367 +|------|------|------|
  2368 +| date | String | 日期(yyyy-MM-dd) |
  2369 +| totalTxsc | Double | 当日停线时长总计(分钟),单条记录 txsc 为 null 时按 0 计 |
  2370 +| totalCount | Integer | 当日停线记录数 |
  2371 +
  2372 +**响应示例:**
  2373 +
  2374 +```json
  2375 +{
  2376 + "success": true,
  2377 + "data": [
  2378 + {
  2379 + "date": "2026-09-01",
  2380 + "totalTxsc": 120.5,
  2381 + "totalCount": 3
  2382 + },
  2383 + {
  2384 + "date": "2026-09-02",
  2385 + "totalTxsc": 60.0,
  2386 + "totalCount": 1
  2387 + }
  2388 + ],
  2389 + "msg": "成功",
  2390 + "errCode": null
  2391 +}
  2392 +```
  2393 +
  2394 +---
  2395 +
  2396 +### 8.3 按工位汇总统计停线时长并返回明细 🆕新增
  2397 +
  2398 +**接口路径:** `GET /stopRecord/summary/workstation`
  2399 +
  2400 +**接口说明:** 在 [8.2](#82-按月份汇总统计每天的停线时长) 相同的线体、班次、区域、板块条件基础上,加上指定日期,返回满足条件的所有停线记录列表,并按工位汇总停线时长(关联停线工位信息补充工位名称与编号),汇总结果按停线时长降序排列。`date` 为空时不限定日期。
  2401 +
  2402 +**请求参数:**
  2403 +
  2404 +| 参数名 | 类型 | 必传 | 说明 |
  2405 +|--------|------|------|------|
  2406 +| xtxx | String | 否 | 线体信息(线体id),为空则不限定 |
  2407 +| bcxx | String | 否 | 班次信息(班次id),为空则不限定 |
  2408 +| txqyxx | String | 否 | 停线区域信息(区域id),为空则不限定 |
  2409 +| txbkxx | String | 否 | 停线板块信息(板块id),为空则不限定 |
  2410 +| date | String | 否 | 指定日期,格式:yyyy-MM-dd,为空时不限定日期 |
  2411 +
  2412 +**响应数据:** `StopRecordDetailSummaryDTO`
  2413 +
  2414 +**响应字段说明:**
  2415 +
  2416 +| 字段 | 类型 | 说明 |
  2417 +|------|------|------|
  2418 +| records | Array | 满足条件的所有停线记录列表(结构同 [8.1](#81-获取所有停线记录列表) 的 StopRecord) |
  2419 +| workstationSummary | Array | 各工位停线时长汇总(按停线时长降序) |
  2420 +| workstationSummary[].txgwxx | String | 工位id |
  2421 +| workstationSummary[].gwmc | String | 工位名称(关联停线工位信息) |
  2422 +| workstationSummary[].gwbh | String | 工位编号(关联停线工位信息) |
  2423 +| workstationSummary[].totalTxsc | Double | 该工位停线时长总计(分钟) |
  2424 +| workstationSummary[].totalCount | Integer | 该工位停线记录数 |
  2425 +
  2426 +**响应示例:**
  2427 +
  2428 +```json
  2429 +{
  2430 + "success": true,
  2431 + "data": {
  2432 + "records": [
  2433 + {
  2434 + "id": "SR20260901001",
  2435 + "xtxx": "XT001",
  2436 + "bcxx": "BC001",
  2437 + "txqyxx": "QY001",
  2438 + "txgwxx": "GW001",
  2439 + "startTime": "2026-09-01 08:30:00",
  2440 + "endTime": "2026-09-01 10:00:00",
  2441 + "txsc": 90.0,
  2442 + "txbkxx": "BK001"
  2443 + }
  2444 + ],
  2445 + "workstationSummary": [
  2446 + {
  2447 + "txgwxx": "GW001",
  2448 + "gwmc": "焊接工位",
  2449 + "gwbh": "01",
  2450 + "totalTxsc": 90.0,
  2451 + "totalCount": 1
  2452 + },
  2453 + {
  2454 + "txgwxx": "GW002",
  2455 + "gwmc": "装配工位",
  2456 + "gwbh": "02",
  2457 + "totalTxsc": 30.0,
  2458 + "totalCount": 1
  2459 + }
  2460 + ]
  2461 + },
  2462 + "msg": "成功",
  2463 + "errCode": null
  2464 +}
  2465 +```
... ...
No preview for this file type
... ... @@ -550,3 +550,106 @@ CREATE TABLE `t_auto_hfca_ixzvok_bzhdyx`
550 550 `approval_status` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
551 551 PRIMARY KEY (`id`)
552 552 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  553 +
  554 +--过程确认班组计划
  555 +CREATE TABLE `t_auto_hfca_ixzvok_ewpiwz`
  556 +(
  557 + `id` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID',
  558 + `corp_code` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT '公司编号',
  559 + `created_at` datetime(3) NOT NULL COMMENT '创建时间',
  560 + `created_by` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人ID',
  561 + `updated_at` datetime(3) NOT NULL COMMENT '最后更新时间',
  562 + `updated_by` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT '最后更新人',
  563 + `jhrq` datetime(3) DEFAULT NULL,
  564 + `zxr` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  565 + `dwxx` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  566 + `xtxx` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  567 + `szxx` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  568 + `qyxx` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  569 + `jhzfbz` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  570 + `zt` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  571 + `sffxwt` tinyint(1) DEFAULT NULL,
  572 + `bcxx` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  573 + PRIMARY KEY (`id`)
  574 +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  575 +
  576 +--停线工位信息
  577 +CREATE TABLE `t_auto_hfca_zlujkl_tvulwx`
  578 +(
  579 + `id` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID',
  580 + `corp_code` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT '公司编号',
  581 + `created_at` datetime(3) NOT NULL COMMENT '创建时间',
  582 + `created_by` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人ID',
  583 + `updated_at` datetime(3) NOT NULL COMMENT '最后更新时间',
  584 + `updated_by` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT '最后更新人',
  585 + `xtxx` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  586 + `qyxx` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  587 + `bzxx` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  588 + `gwmc` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  589 + `gwbh` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  590 + `gwxz` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  591 + PRIMARY KEY (`id`)
  592 +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  593 +
  594 +--停线记录信息
  595 +CREATE TABLE `t_auto_hfca_zlujkl_tiemuz`
  596 +(
  597 + `id` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID',
  598 + `corp_code` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT '公司编号',
  599 + `created_at` datetime(3) NOT NULL COMMENT '创建时间',
  600 + `created_by` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人ID',
  601 + `updated_at` datetime(3) NOT NULL COMMENT '最后更新时间',
  602 + `updated_by` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT '最后更新人',
  603 + `cyxx` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  604 + `xtxx` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  605 + `bcxx` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  606 + `txqyxx` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  607 + `txbzxx` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  608 + `txgwxx` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  609 + `gwxz` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  610 + `start_time` datetime(3) DEFAULT NULL,
  611 + `end_time` datetime(3) DEFAULT NULL,
  612 + `txsc` double (21,6) DEFAULT NULL,
  613 + `txbkxx` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  614 + `txflxx` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  615 + `txms` varchar(500) COLLATE utf8mb4_general_ci DEFAULT NULL,
  616 + `qgxtbxz` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  617 + `bsbqgxyy` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  618 + `zrbkfzr` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  619 + `txwthf` varchar(500) COLLATE utf8mb4_general_ci DEFAULT NULL,
  620 + `sbtzxx` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  621 + `sbbm` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  622 + `sbmc` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  623 + `sbgzlx` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  624 + `sbgzsfcf` tinyint(1) DEFAULT NULL,
  625 + `sbgzywbz` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  626 + `sbgzlxfj` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  627 + `sbgzyy` varchar(500) COLLATE utf8mb4_general_ci DEFAULT NULL,
  628 + `sblscs` varchar(500) COLLATE utf8mb4_general_ci DEFAULT NULL,
  629 + `sbyjcs` varchar(500) COLLATE utf8mb4_general_ci DEFAULT NULL,
  630 + `sbghbj` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  631 + `tbry` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  632 + `tbrygh` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  633 + `czry` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  634 + `czrygh` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  635 + `ylwtclfa` varchar(500) COLLATE utf8mb4_general_ci DEFAULT NULL,
  636 + PRIMARY KEY (`id`)
  637 +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  638 +
  639 +
  640 +--板块信息
  641 +CREATE TABLE `t_auto_hfca_dnxpkp_bkxxxx`
  642 +(
  643 + `id` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID',
  644 + `corp_code` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT '公司编号',
  645 + `created_at` datetime(3) NOT NULL COMMENT '创建时间',
  646 + `created_by` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人ID',
  647 + `updated_at` datetime(3) NOT NULL COMMENT '最后更新时间',
  648 + `updated_by` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT '最后更新人',
  649 + `mc` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  650 + `bm` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  651 + `xh` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  652 + `qtdw` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  653 + `qtdwfzr` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  654 + PRIMARY KEY (`id`)
  655 +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
... ...