From b6b83b4c2a2ddeecc2ec9719762d42a1b08d4987 Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Tue, 23 Jan 2024 13:45:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=87=E7=A8=8B=E6=A3=80=E9=AA=8C=E6=A3=80?= =?UTF-8?q?=E9=AA=8C=E7=BB=93=E6=9E=9C=E4=BA=8C=E6=AC=A1=E7=A1=AE=E8=AE=A4?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../op/open/service/impl/OpenServiceImpl.java | 4 +- .../QcCheckReportProduceController.java | 47 ++++++----- .../QcCheckTaskIncomeController.java | 12 +++ .../quality/domain/QcCheckReportIncome.java | 73 ++++++++++++++++++ .../op/quality/domain/QcCheckTaskDetail.java | 9 +++ .../op/quality/domain/QcCheckTaskIncome.java | 18 +++++ .../op/quality/domain/QcCheckTaskProduce.java | 36 +++++++++ .../mapper/QcCheckReportIncomeMapper.java | 8 ++ .../mapper/QcCheckTaskIncomeMapper.java | 4 + .../service/IQcCheckReportProduceService.java | 4 + .../service/IQcCheckTaskIncomeService.java | 2 + .../impl/QcCheckReportProduceServiceImpl.java | 49 ++++++++++++ .../impl/QcCheckTaskIncomeServiceImpl.java | 55 ++++++++++++- .../impl/QcStaticTableServiceImpl.java | 34 ++++---- .../quality/QcCheckReportIncomeMapper.xml | 77 +++++++++++++++++-- .../quality/QcCheckTaskDetailMapper.xml | 1 + .../quality/QcCheckTaskIncomeMapper.xml | 21 ++++- .../quality/QcCheckTaskProduceMapper.xml | 30 ++++++-- 18 files changed, 434 insertions(+), 50 deletions(-) diff --git a/op-modules/op-open/src/main/java/com/op/open/service/impl/OpenServiceImpl.java b/op-modules/op-open/src/main/java/com/op/open/service/impl/OpenServiceImpl.java index 3ea5f3e6..6a7938b0 100644 --- a/op-modules/op-open/src/main/java/com/op/open/service/impl/OpenServiceImpl.java +++ b/op-modules/op-open/src/main/java/com/op/open/service/impl/OpenServiceImpl.java @@ -359,6 +359,7 @@ public class OpenServiceImpl implements OpenService { user.setCreateTime(nowDate); } } + /**qc_check_task_user**/ int m = openMapper.addCheckUsers(users); logger.info("检查人新增" + m + "成功"); @@ -381,7 +382,6 @@ public class OpenServiceImpl implements OpenService { } /**qc_check_task**/ - qcCheckTaskProduce.setRecordId(beLongId); qcCheckTaskProduce.setFactoryCode(factoryCode); qcCheckTaskProduce.setCreateTime(nowDate); @@ -389,6 +389,8 @@ public class OpenServiceImpl implements OpenService { qcCheckTaskProduce.setIncomeTime(qcCheckTaskProduce.getProduceDate()); qcCheckTaskProduce.setSupplierCode(qcCheckTaskProduce.getCarCode()); qcCheckTaskProduce.setSupplierName(qcCheckTaskProduce.getCarName()); + qcCheckTaskProduce.setCheckManName(null); + qcCheckTaskProduce.setCheckManCode(null); openMapper.insertQcCheckTaskProduce(qcCheckTaskProduce); /**qc_check_task_detail**/ for (QcCheckTaskDetailDTO item : items) { diff --git a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckReportProduceController.java b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckReportProduceController.java index aa9aafc6..1f35b6ca 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckReportProduceController.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckReportProduceController.java @@ -40,15 +40,15 @@ public class QcCheckReportProduceController extends BaseController { @GetMapping("/list") public TableDataInfo list(QcCheckReportIncome qcCheckReportIncome) { - //默认时间范围T 00:00:00~T+1 00:00:00 - if(StringUtils.isEmpty(qcCheckReportIncome.getCheckTimeStart())){ - qcCheckReportIncome.setCheckTimeStart(DateUtils.getDate()+" 00:00:00");//start - LocalDate date = LocalDate.now(); - LocalDate dateEnd = date.plusDays(1); - DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd"); - String dateEndStr = dtf.format(dateEnd)+" 00:00:00"; - qcCheckReportIncome.setCheckTimeEnd(dateEndStr);//end - } +// //默认时间范围T 00:00:00~T+1 00:00:00 +// if(StringUtils.isEmpty(qcCheckReportIncome.getCheckTimeStart())){ +// qcCheckReportIncome.setCheckTimeStart(DateUtils.getDate()+" 00:00:00");//start +// LocalDate date = LocalDate.now(); +// LocalDate dateEnd = date.plusDays(1); +// DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd"); +// String dateEndStr = dtf.format(dateEnd)+" 00:00:00"; +// qcCheckReportIncome.setCheckTimeEnd(dateEndStr);//end +// } startPage(); List list = qcCheckReportProduceService.selectQcCheckReportIncomeList(qcCheckReportIncome); @@ -63,15 +63,15 @@ public class QcCheckReportProduceController extends BaseController { @PostMapping("/export") public void export(HttpServletResponse response, QcCheckReportIncome qcCheckReportIncome) { - //默认时间范围T 00:00:00~T+1 00:00:00 - if(StringUtils.isEmpty(qcCheckReportIncome.getIncomeTimeStart())){ - qcCheckReportIncome.setIncomeTimeStart(DateUtils.getDate()+" 00:00:00");//start - LocalDate date = LocalDate.now(); - LocalDate dateEnd = date.plusDays(1); - DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd"); - String dateEndStr = dtf.format(dateEnd)+" 00:00:00"; - qcCheckReportIncome.setIncomeTimeEnd(dateEndStr);//end - } +// //默认时间范围T 00:00:00~T+1 00:00:00 +// if(StringUtils.isEmpty(qcCheckReportIncome.getIncomeTimeStart())){ +// qcCheckReportIncome.setIncomeTimeStart(DateUtils.getDate()+" 00:00:00");//start +// LocalDate date = LocalDate.now(); +// LocalDate dateEnd = date.plusDays(1); +// DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd"); +// String dateEndStr = dtf.format(dateEnd)+" 00:00:00"; +// qcCheckReportIncome.setIncomeTimeEnd(dateEndStr);//end +// } // if(StringUtils.isEmpty(qcCheckReportIncome.getCheckTimeStart())){ // qcCheckReportIncome.setCheckTimeStart(qcCheckReportIncome.getIncomeTimeStart());//start @@ -181,4 +181,15 @@ public class QcCheckReportProduceController extends BaseController { QcCheckTaskProduce dto = qcCheckReportProduceService.getProduceReportXJ(qcCheckTaskProduce); return dto; } + // 生产过程报告任务详情 + @PostMapping("/getTaskInfo") + public QcCheckReportIncome getTaskInfo(@RequestBody QcCheckReportIncome qcCheckReportIncome) { + QcCheckReportIncome dto = qcCheckReportProduceService.getTaskInfo(qcCheckReportIncome); + return dto; + } + + @PostMapping("/submitConfirm") + public AjaxResult submitConfirm(@RequestBody QcCheckReportIncome qcCheckReportIncome) { + return toAjax(qcCheckReportProduceService.submitConfirm(qcCheckReportIncome)); + } } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskIncomeController.java b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskIncomeController.java index a5deccda..c86a2a3f 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskIncomeController.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskIncomeController.java @@ -301,4 +301,16 @@ public class QcCheckTaskIncomeController extends BaseController { public List getBatchList(@RequestBody QcCheckTaskIncome qcCheckTaskIncome) { return qcCheckTaskIncomeService.getBatchList(qcCheckTaskIncome); } + + /** + * 订单巡检任务专用列表 + * @param + * @return + */ + @GetMapping("/getCkeckProjectXJList") + public TableDataInfo getCkeckProjectXJList(QcCheckTaskIncome qcCheckTaskIncome) { + startPage(); + List list = qcCheckTaskIncomeService.getCkeckProjectXJList(qcCheckTaskIncome); + return getDataTable(list); + } } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckReportIncome.java b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckReportIncome.java index d90f8ec5..4303edf4 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckReportIncome.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckReportIncome.java @@ -128,6 +128,79 @@ public class QcCheckReportIncome extends BaseEntity { private String createTimeStr; private List files; private List fileUrls; + private String reason; + private String productType; + private String confirm; + private String confirmManCode; + private String confirmManName; + private String confirmRemark; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date confirmTime; + private Boolean myself; + + public Boolean getMyself() { + return myself; + } + + public void setMyself(Boolean myself) { + this.myself = myself; + } + + public Date getConfirmTime() { + return confirmTime; + } + + public void setConfirmTime(Date confirmTime) { + this.confirmTime = confirmTime; + } + + public String getConfirmRemark() { + return confirmRemark; + } + + public void setConfirmRemark(String confirmRemark) { + this.confirmRemark = confirmRemark; + } + + public String getConfirm() { + return confirm; + } + + public void setConfirm(String confirm) { + this.confirm = confirm; + } + + public String getConfirmManCode() { + return confirmManCode; + } + + public void setConfirmManCode(String confirmManCode) { + this.confirmManCode = confirmManCode; + } + + public String getConfirmManName() { + return confirmManName; + } + + public void setConfirmManName(String confirmManName) { + this.confirmManName = confirmManName; + } + + public String getReason() { + return reason; + } + + public void setReason(String reason) { + this.reason = reason; + } + + public String getProductType() { + return productType; + } + + public void setProductType(String productType) { + this.productType = productType; + } public List getFileUrls() { return fileUrls; diff --git a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskDetail.java b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskDetail.java index 67d5a108..ee082dcd 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskDetail.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskDetail.java @@ -98,6 +98,15 @@ public class QcCheckTaskDetail extends BaseEntity { private String checkType; private String fileListStr; private List files; + private List fileUrls; + + public List getFileUrls() { + return fileUrls; + } + + public void setFileUrls(List fileUrls) { + this.fileUrls = fileUrls; + } @Override public String getRemark() { diff --git a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskIncome.java b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskIncome.java index e51f28c6..9f10f97e 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskIncome.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskIncome.java @@ -142,6 +142,24 @@ public class QcCheckTaskIncome extends BaseEntity { private String remark; private String belongTo; private String oldBelongTo; + private String noOkQualityNames; + private String noOkQualityVals; + + public String getNoOkQualityNames() { + return noOkQualityNames; + } + + public void setNoOkQualityNames(String noOkQualityNames) { + this.noOkQualityNames = noOkQualityNames; + } + + public String getNoOkQualityVals() { + return noOkQualityVals; + } + + public void setNoOkQualityVals(String noOkQualityVals) { + this.noOkQualityVals = noOkQualityVals; + } public String getOldBelongTo() { return oldBelongTo; diff --git a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskProduce.java b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskProduce.java index 120227d3..1daa776a 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskProduce.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskProduce.java @@ -150,6 +150,42 @@ public class QcCheckTaskProduce extends BaseEntity { private String checkName; private List checkInfos; private List defects; + private String reason; + private String productType; + private String confirmManCode; + private String confirmManName; + + public String getConfirmManCode() { + return confirmManCode; + } + + public void setConfirmManCode(String confirmManCode) { + this.confirmManCode = confirmManCode; + } + + public String getConfirmManName() { + return confirmManName; + } + + public void setConfirmManName(String confirmManName) { + this.confirmManName = confirmManName; + } + + public String getReason() { + return reason; + } + + public void setReason(String reason) { + this.reason = reason; + } + + public String getProductType() { + return productType; + } + + public void setProductType(String productType) { + this.productType = productType; + } public List getDefects() { return defects; diff --git a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckReportIncomeMapper.java b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckReportIncomeMapper.java index f70f798a..4d022ac7 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckReportIncomeMapper.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckReportIncomeMapper.java @@ -73,4 +73,12 @@ public interface QcCheckReportIncomeMapper { List getCkeckProjectList(QcCheckTaskDetail qcCheckTaskDetail); QcCheckTaskProduce getTopInfo(QcCheckTaskProduce qcCheckTaskProduce); + + QcCheckReportIncome getTaskInfo(QcCheckReportIncome qcCheckReportIncome); + + int submitConfirm(QcCheckReportIncome qcCheckReportIncome); + + QcCheckReportIncome getXJTaskInfo(QcCheckReportIncome qcCheckReportIncome); + + QcCheckReportIncome getLastXJTaskInfo(QcCheckReportIncome qcCheckReportIncome); } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTaskIncomeMapper.java b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTaskIncomeMapper.java index 264f19ab..be6d5fd6 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTaskIncomeMapper.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTaskIncomeMapper.java @@ -98,4 +98,8 @@ public interface QcCheckTaskIncomeMapper { List getDefectType(QcCheckTaskDetail qcCheckTaskDetail); QcCheckTaskIncome getTaskInfo(String recordId); + + int deleteQcCheckTaskDefects(String belongId); + + List getCkeckTaskXJList(QcCheckTaskIncome qcCheckTaskIncome); } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckReportProduceService.java b/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckReportProduceService.java index 587c4f61..eb82803e 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckReportProduceService.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckReportProduceService.java @@ -71,4 +71,8 @@ public interface IQcCheckReportProduceService { List getCkeckProjectList(QcCheckTaskDetail qcCheckTaskDetail); QcCheckTaskProduce getProduceReportXJ(QcCheckTaskProduce qcCheckTaskProduce); + + QcCheckReportIncome getTaskInfo(QcCheckReportIncome qcCheckReportIncome); + + int submitConfirm(QcCheckReportIncome qcCheckReportIncome); } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskIncomeService.java b/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskIncomeService.java index 981fb81d..48a1a7be 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskIncomeService.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskIncomeService.java @@ -87,4 +87,6 @@ public interface IQcCheckTaskIncomeService { List getBatchList(QcCheckTaskIncome qcCheckTaskIncome); List getProductWorkOrder(QcCheckTaskIncome qcCheckTaskIncome); + + List getCkeckProjectXJList(QcCheckTaskIncome qcCheckTaskIncome); } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckReportProduceServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckReportProduceServiceImpl.java index 9e36663d..69576ee2 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckReportProduceServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckReportProduceServiceImpl.java @@ -9,6 +9,8 @@ import com.op.quality.mapper.*; import com.op.quality.service.IQcCheckReportProduceService; import com.op.quality.service.IQcStaticTableService; import com.op.system.api.domain.SysUser; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; @@ -27,6 +29,7 @@ import java.util.List; */ @Service public class QcCheckReportProduceServiceImpl implements IQcCheckReportProduceService { + protected Logger logger = LoggerFactory.getLogger(getClass()); @Autowired private QcCheckReportIncomeMapper qcCheckReportIncomeMapper; @Autowired @@ -209,4 +212,50 @@ public class QcCheckReportProduceServiceImpl implements IQcCheckReportProduceSer return produce; } + @Override + @DS("#header.poolName") + public QcCheckReportIncome getTaskInfo(QcCheckReportIncome qcCheckReportIncome) { + QcCheckReportIncome taskInfo = null; + if("checkTypeSC".equals(qcCheckReportIncome.getCheckType())){ + taskInfo = qcCheckReportIncomeMapper.getTaskInfo(qcCheckReportIncome); + + }else if("checkTypeSCXJ".equals(qcCheckReportIncome.getCheckType())){ + taskInfo = qcCheckReportIncomeMapper.getXJTaskInfo(qcCheckReportIncome); + //最后一条巡检记录得确认人当最终确认人 + QcCheckReportIncome lastData = qcCheckReportIncomeMapper.getLastXJTaskInfo(qcCheckReportIncome); + if(lastData!=null ){ + taskInfo.setConfirmManCode(lastData.getConfirmManCode()); + taskInfo.setConfirmManName(lastData.getConfirmManName()); + taskInfo.setConfirm(lastData.getConfirm()); + taskInfo.setConfirmTime(lastData.getConfirmTime()); + taskInfo.setConfirmRemark(lastData.getConfirmRemark()); + } + if(SecurityUtils.getUsername().equals(taskInfo.getConfirmManCode())){ + taskInfo.setMyself(true); + }else{ + taskInfo.setMyself(false); + } + } + + return taskInfo; + } + + @Override + @DS("#header.poolName") + public int submitConfirm(QcCheckReportIncome qcCheckReportIncome) { + Date nowTime = DateUtils.getNowDate(); + String nowManCode = SecurityUtils.getUsername(); + String nowManName = SecurityUtils.getLoginUser().getSysUser().getNickName(); + if("checkTypeSC".equals(qcCheckReportIncome.getCheckType())||"checkTypeSCXJ".equals(qcCheckReportIncome.getCheckType())){ + qcCheckReportIncome.setConfirmManCode(nowManCode); + qcCheckReportIncome.setConfirmManName(nowManName); + qcCheckReportIncome.setConfirmTime(nowTime); + /**qc_check_task**/ + int n = qcCheckReportIncomeMapper.submitConfirm(qcCheckReportIncome); + logger.info("qc_check_task:【二次确认】"+qcCheckReportIncome.getCheckType()+":"+n); + return n; + } + return 0; + } + } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java index f2a06539..3a3b68c8 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java @@ -2,6 +2,8 @@ package com.op.quality.service.impl; import java.math.BigDecimal; import java.util.*; +import java.util.stream.Collectors; + import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONArray; import com.baomidou.dynamic.datasource.annotation.DS; @@ -80,6 +82,9 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService { @Autowired private QcSampleRuleMapper qcSampleRuleMapper; + @Autowired + private QcCheckTaskDefectMapper qcCheckTaskDefectMapper; + /** * 查询来料检验 * @@ -351,7 +356,16 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService { @Override @DS("#header.poolName") public List getCkeckProjectList(QcCheckTaskDetail qcCheckTaskDetail) { - return qcCheckTaskIncomeMapper.getCkeckProjectList(qcCheckTaskDetail); + List dtos = qcCheckTaskIncomeMapper.getCkeckProjectList(qcCheckTaskDetail); + for(QcCheckTaskDetail detail:dtos){ + List files = qmsFileMapper.getBaseFileBatch(detail.getRecordId()); + if (!CollectionUtils.isEmpty(files)) { + List urls = files.stream().map(BaseFile::getFileAddress).collect(Collectors.toList()); + detail.setFiles(files); + detail.setFileUrls(urls); + } + } + return dtos; } @Override @@ -518,6 +532,41 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService { return dtos; } + @Override + @DS("#header.poolName") + public List getCkeckProjectXJList(QcCheckTaskIncome qcCheckTaskIncome) { + List dtos = qcCheckTaskIncomeMapper.getCkeckTaskXJList(qcCheckTaskIncome); + for(QcCheckTaskIncome dto:dtos){ + //不良分类 + QcCheckTaskDefect defectqo = new QcCheckTaskDefect(); + defectqo.setBelongTo(dto.getRecordId()); + List defects = qcCheckTaskDefectMapper.selectQcCheckTaskDefectList(defectqo); + if(!CollectionUtils.isEmpty(defects)){ + List names = defects.stream().map(QcCheckTaskDefect::getDefectSubclass).collect(Collectors.toList()); + dto.setNoOkQualityNames(names.toString()); + List vals = defects.stream().map(QcCheckTaskDefect::getNoOkQuality).collect(Collectors.toList()); + dto.setNoOkQualityVals(vals.toString()); + } + + //检测项列表 + QcCheckTaskDetail detailqo = new QcCheckTaskDetail(); + detailqo.setBelongTo(dto.getRecordId()); + List qcCheckTaskDetails = qcCheckTaskDetailMapper.selectQcCheckTaskDetailList(detailqo); + if(!CollectionUtils.isEmpty(qcCheckTaskDetails)){ + for(QcCheckTaskDetail qcCheckTaskDetail:qcCheckTaskDetails){ + List files = qmsFileMapper.getBaseFileBatch(qcCheckTaskDetail.getRecordId()); + if (!CollectionUtils.isEmpty(files)) { + List urls = files.stream().map(BaseFile::getFileAddress).collect(Collectors.toList()); + qcCheckTaskDetail.setFiles(files); + qcCheckTaskDetail.setFileUrls(urls); + } + } + dto.setQcCheckTaskDetails(qcCheckTaskDetails); + } + } + return dtos; + } + @Override @Transactional(rollbackFor = Exception.class) public int commitCheckResults(QcCheckTaskIncome qcCheckTaskIncome) { @@ -591,8 +640,8 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService { logger.info("更新qc_check_task_detail:"+n); /**qc_check_task_defect**/ - //qcCheckTaskIncomeMapper.deleteQcCheckTaskDefects() - //////////////////////////// + n=qcCheckTaskIncomeMapper.deleteQcCheckTaskDefects(belongId); + logger.info("清理qc_check_task_defect:"+n); n= qcCheckTaskIncomeMapper.addQcCheckTaskDefects(defects); logger.info("qc_check_task_defect:"+n); diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcStaticTableServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcStaticTableServiceImpl.java index 64b14b6e..88661d28 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcStaticTableServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcStaticTableServiceImpl.java @@ -178,12 +178,12 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService { QcStaticTable detail = detailMap.get(keystr); if(detail!=null&&StringUtils.isNotBlank(detail.getRemark())){ project.setColumn080090(detail.getRemark()); - List files = qmsFileMapper.getBaseFileBatch(detail.getRecordId()); - if (!CollectionUtils.isEmpty(files)) { - List pics = files.stream().map(BaseFile::getFileAddress).collect(Collectors.toList()); - String picurls = pics.stream().collect(Collectors.joining(",")); - project.setColumn080090(project.getColumn080090()+":"+picurls); - } + List files = qmsFileMapper.getBaseFileBatch(detail.getRecordId()); + if (!CollectionUtils.isEmpty(files)) { + List pics = files.stream().map(BaseFile::getFileAddress).collect(Collectors.toList()); + String picurls = pics.stream().collect(Collectors.joining(",")); + project.setColumn080090(project.getColumn080090()+","+picurls); + } }else if(detail!=null&&StringUtils.isNotBlank(detail.getStatus())){ project.setColumn080090(detail.getStatus().equals("Y")?"✓":"✘"); }else{ @@ -198,7 +198,7 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService { if (!CollectionUtils.isEmpty(files)) { List pics = files.stream().map(BaseFile::getFileAddress).collect(Collectors.toList()); String picurls = pics.stream().collect(Collectors.joining(",")); - project.setColumn090100(project.getColumn090100()+":"+picurls); + project.setColumn090100(project.getColumn090100()+","+picurls); } }else if(detail!=null&&StringUtils.isNotBlank(detail.getStatus())){ project.setColumn090100(detail.getStatus().equals("Y")?"✓":"✘"); @@ -214,7 +214,7 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService { if (!CollectionUtils.isEmpty(files)) { List pics = files.stream().map(BaseFile::getFileAddress).collect(Collectors.toList()); String picurls = pics.stream().collect(Collectors.joining(",")); - project.setColumn100110(project.getColumn100110()+":"+picurls); + project.setColumn100110(project.getColumn100110()+","+picurls); } }else if(detail!=null&&StringUtils.isNotBlank(detail.getStatus())){ project.setColumn100110(detail.getStatus().equals("Y")?"✓":"✘"); @@ -230,7 +230,7 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService { if (!CollectionUtils.isEmpty(files)) { List pics = files.stream().map(BaseFile::getFileAddress).collect(Collectors.toList()); String picurls = pics.stream().collect(Collectors.joining(",")); - project.setColumn110120(project.getColumn110120()+":"+picurls); + project.setColumn110120(project.getColumn110120()+","+picurls); } }else if(detail!=null&&detail!=null && StringUtils.isNotBlank(detail.getStatus())){ project.setColumn110120(detail.getStatus().equals("Y")?"✓":"✘"); @@ -246,7 +246,7 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService { if (!CollectionUtils.isEmpty(files)) { List pics = files.stream().map(BaseFile::getFileAddress).collect(Collectors.toList()); String picurls = pics.stream().collect(Collectors.joining(",")); - project.setColumn123133(project.getColumn123133()+":"+picurls); + project.setColumn123133(project.getColumn123133()+","+picurls); } }else if(detail!=null && StringUtils.isNotBlank(detail.getStatus())){ project.setColumn123133(detail.getStatus().equals("Y")?"✓":"✘"); @@ -262,7 +262,7 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService { if (!CollectionUtils.isEmpty(files)) { List pics = files.stream().map(BaseFile::getFileAddress).collect(Collectors.toList()); String picurls = pics.stream().collect(Collectors.joining(",")); - project.setColumn133143(project.getColumn133143()+":"+picurls); + project.setColumn133143(project.getColumn133143()+","+picurls); } }else if(detail!=null && StringUtils.isNotBlank(detail.getStatus())){ project.setColumn133143(detail.getStatus().equals("Y")?"✓":"✘"); @@ -278,7 +278,7 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService { if (!CollectionUtils.isEmpty(files)) { List pics = files.stream().map(BaseFile::getFileAddress).collect(Collectors.toList()); String picurls = pics.stream().collect(Collectors.joining(",")); - project.setColumn143153(project.getColumn143153()+":"+picurls); + project.setColumn143153(project.getColumn143153()+","+picurls); } }else if(detail!=null && StringUtils.isNotBlank(detail.getStatus())){ project.setColumn143153(detail.getStatus().equals("Y")?"✓":"✘"); @@ -294,7 +294,7 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService { if (!CollectionUtils.isEmpty(files)) { List pics = files.stream().map(BaseFile::getFileAddress).collect(Collectors.toList()); String picurls = pics.stream().collect(Collectors.joining(",")); - project.setColumn153163(project.getColumn153163()+":"+picurls); + project.setColumn153163(project.getColumn153163()+","+picurls); } }else if(detail!=null && StringUtils.isNotBlank(detail.getStatus())){ project.setColumn153163(detail.getStatus().equals("Y")?"✓":"✘"); @@ -310,7 +310,7 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService { if (!CollectionUtils.isEmpty(files)) { List pics = files.stream().map(BaseFile::getFileAddress).collect(Collectors.toList()); String picurls = pics.stream().collect(Collectors.joining(",")); - project.setColumn163173(project.getColumn163173()+":"+picurls); + project.setColumn163173(project.getColumn163173()+","+picurls); } }else if(detail!=null && StringUtils.isNotBlank(detail.getStatus())){ project.setColumn163173(detail.getStatus().equals("Y")?"✓":"✘"); @@ -326,7 +326,7 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService { if (!CollectionUtils.isEmpty(files)) { List pics = files.stream().map(BaseFile::getFileAddress).collect(Collectors.toList()); String picurls = pics.stream().collect(Collectors.joining(",")); - project.setColumn180190(project.getColumn180190()+":"+picurls); + project.setColumn180190(project.getColumn180190()+","+picurls); } }else if(detail!=null && StringUtils.isNotBlank(detail.getStatus())){ project.setColumn180190(detail.getStatus().equals("Y")?"✓":"✘"); @@ -342,7 +342,7 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService { if (!CollectionUtils.isEmpty(files)) { List pics = files.stream().map(BaseFile::getFileAddress).collect(Collectors.toList()); String picurls = pics.stream().collect(Collectors.joining(",")); - project.setColumn190200(project.getColumn190200()+":"+picurls); + project.setColumn190200(project.getColumn190200()+","+picurls); } }else if(detail!=null && StringUtils.isNotBlank(detail.getStatus())){ project.setColumn190200(detail.getStatus().equals("Y")?"✓":"✘"); @@ -358,7 +358,7 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService { if (!CollectionUtils.isEmpty(files)) { List pics = files.stream().map(BaseFile::getFileAddress).collect(Collectors.toList()); String picurls = pics.stream().collect(Collectors.joining(",")); - project.setColumn080090(project.getColumn080090()+":"+picurls); + project.setColumn200210(project.getColumn200210()+","+picurls); } }else if(detail!=null && StringUtils.isNotBlank(detail.getStatus())){ project.setColumn200210(detail.getStatus().equals("Y")?"✓":"✘"); diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckReportIncomeMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckReportIncomeMapper.xml index 0895a836..10a5874f 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckReportIncomeMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckReportIncomeMapper.xml @@ -36,14 +36,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + + select record_id, check_no, income_batch_no, order_no, material_code, material_name, quality, unit, supplier_code, supplier_name, income_time, check_loc, check_status, check_man_code, check_man_name,sample_quality, check_time, check_result, status, check_type, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, - factory_code, del_flag from qc_check_task + factory_code, del_flag,reason,product_type + from qc_check_task - - + + + + insert into qc_check_task record_id, @@ -263,8 +314,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where record_id = #{recordId} + + update qc_check_task + set confirm = #{confirm}, + confirm_man_code = #{confirmManCode}, + confirm_man_name = #{confirmManName}, + confirm_remark = #{confirmRemark}, + confirm_time = #{confirmTime} + + + and record_id = #{recordId} + + + and order_no = #{orderNo} + + + - + delete from qc_check_task where record_id = #{recordId} diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskDetailMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskDetailMapper.xml index 9b3b4783..90388610 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskDetailMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskDetailMapper.xml @@ -54,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and attr3 = #{attr3} and attr4 = #{attr4} and factory_code = #{factoryCode} + and del_flag = '0' diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskIncomeMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskIncomeMapper.xml index 5f753bf0..49734a0d 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskIncomeMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskIncomeMapper.xml @@ -311,6 +311,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{recordId} + + delete from qc_check_task_defect where belong_to = #{belongId} + + - + insert into qc_check_task_user( record_id,belong_to,check_no, check_man_code,check_man_name, diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskProduceMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskProduceMapper.xml index 61b02ebd..824b38a1 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskProduceMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskProduceMapper.xml @@ -37,7 +37,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + + @@ -73,6 +74,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + @@ -81,7 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" check_man_code, check_man_name, check_time, check_result, status, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, factory_code, del_flag , check_type,sample_quality,noOk_quality, - aNoOkquality,bNoOkquality,cNoOkquality + aNoOkquality,bNoOkquality,cNoOkquality,reason,product_type from qc_check_task @@ -205,6 +210,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" del_flag, check_type, type_code, + reason, + product_type, + confirm_man_code, + confirm_man_name, #{recordId}, @@ -242,6 +251,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{delFlag}, #{checkType}, #{typeCode}, + #{reason}, + #{productType}, + #{confirmManCode}, + #{confirmManName}, @@ -280,6 +293,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update_time = #{updateTime}, factory_code = #{factoryCode}, del_flag = #{delFlag}, + reason = #{reason}, + product_type = #{productType}, + confirm_man_code = #{confirmManCode}, + confirm_man_name = #{confirmManName}, where record_id = #{recordId} @@ -307,7 +324,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" qct.order_no, qct.material_code, qct.material_name, qct.quality, qct.unit, qct.supplier_code, qct.supplier_name, qct.income_time, qct.check_loc, qct.check_status, qct.check_time, qct.check_result, qct.check_type,'首件检验' check_name, - CONVERT(varchar(10),qct.create_time, 120) createTimeStr + CONVERT(varchar(10),qct.create_time, 120) createTimeStr, + qct.confirm,qct.confirm_man_name from qc_check_task qct and qct.check_no = #{checkNo} @@ -333,7 +351,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" '','','', qct.order_no, qct.material_code, qct.material_name, qct.quality, qct.unit, qct.supplier_code, qct.supplier_name, qct.income_time,'','', - '','', qct.check_type,'巡检检验' check_name,CONVERT(varchar(10),qct.create_time, 120) createTimeStr + '','', qct.check_type,'巡检检验' check_name,CONVERT(varchar(10),qct.create_time, 120) createTimeStr, + qct.confirm,qct.confirm_man_name from qc_check_task qct and qct.check_no = #{checkNo} @@ -355,7 +374,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and qct.check_type = 'checkTypeSCXJ' GROUP BY qct.order_no, qct.material_code, qct.material_name, qct.quality, qct.unit, - qct.supplier_code, qct.supplier_name, qct.income_time, qct.check_type,CONVERT(varchar(10),qct.create_time, 120) + qct.supplier_code, qct.supplier_name, qct.income_time, qct.check_type,CONVERT(varchar(10),qct.create_time, 120), + qct.confirm,qct.confirm_man_name ) t where 1=1