过程检验检验结果二次确认逻辑

master
zhaoxiaolin 1 year ago
parent 5e5d280962
commit b6b83b4c2a

@ -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) {

@ -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<QcCheckReportIncome> 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));
}
}

@ -301,4 +301,16 @@ public class QcCheckTaskIncomeController extends BaseController {
public List<QcCheckTaskIncome> getBatchList(@RequestBody QcCheckTaskIncome qcCheckTaskIncome) {
return qcCheckTaskIncomeService.getBatchList(qcCheckTaskIncome);
}
/**
*
* @param
* @return
*/
@GetMapping("/getCkeckProjectXJList")
public TableDataInfo getCkeckProjectXJList(QcCheckTaskIncome qcCheckTaskIncome) {
startPage();
List<QcCheckTaskIncome> list = qcCheckTaskIncomeService.getCkeckProjectXJList(qcCheckTaskIncome);
return getDataTable(list);
}
}

@ -128,6 +128,79 @@ public class QcCheckReportIncome extends BaseEntity {
private String createTimeStr;
private List<BaseFile> files;
private List<String> 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<String> getFileUrls() {
return fileUrls;

@ -98,6 +98,15 @@ public class QcCheckTaskDetail extends BaseEntity {
private String checkType;
private String fileListStr;
private List<BaseFile> files;
private List<String> fileUrls;
public List<String> getFileUrls() {
return fileUrls;
}
public void setFileUrls(List<String> fileUrls) {
this.fileUrls = fileUrls;
}
@Override
public String getRemark() {

@ -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;

@ -150,6 +150,42 @@ public class QcCheckTaskProduce extends BaseEntity {
private String checkName;
private List<QcStaticTable> checkInfos;
private List<QcCheckTaskDefect> 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<QcCheckTaskDefect> getDefects() {
return defects;

@ -73,4 +73,12 @@ public interface QcCheckReportIncomeMapper {
List<QcCheckTaskDetail> getCkeckProjectList(QcCheckTaskDetail qcCheckTaskDetail);
QcCheckTaskProduce getTopInfo(QcCheckTaskProduce qcCheckTaskProduce);
QcCheckReportIncome getTaskInfo(QcCheckReportIncome qcCheckReportIncome);
int submitConfirm(QcCheckReportIncome qcCheckReportIncome);
QcCheckReportIncome getXJTaskInfo(QcCheckReportIncome qcCheckReportIncome);
QcCheckReportIncome getLastXJTaskInfo(QcCheckReportIncome qcCheckReportIncome);
}

@ -98,4 +98,8 @@ public interface QcCheckTaskIncomeMapper {
List<QcCheckTaskDefect> getDefectType(QcCheckTaskDetail qcCheckTaskDetail);
QcCheckTaskIncome getTaskInfo(String recordId);
int deleteQcCheckTaskDefects(String belongId);
List<QcCheckTaskIncome> getCkeckTaskXJList(QcCheckTaskIncome qcCheckTaskIncome);
}

@ -71,4 +71,8 @@ public interface IQcCheckReportProduceService {
List<QcCheckTaskDetail> getCkeckProjectList(QcCheckTaskDetail qcCheckTaskDetail);
QcCheckTaskProduce getProduceReportXJ(QcCheckTaskProduce qcCheckTaskProduce);
QcCheckReportIncome getTaskInfo(QcCheckReportIncome qcCheckReportIncome);
int submitConfirm(QcCheckReportIncome qcCheckReportIncome);
}

@ -87,4 +87,6 @@ public interface IQcCheckTaskIncomeService {
List<QcCheckTaskIncome> getBatchList(QcCheckTaskIncome qcCheckTaskIncome);
List<QcCheckTaskIncome> getProductWorkOrder(QcCheckTaskIncome qcCheckTaskIncome);
List<QcCheckTaskIncome> getCkeckProjectXJList(QcCheckTaskIncome qcCheckTaskIncome);
}

@ -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;
}
}

@ -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<QcCheckTaskDetail> getCkeckProjectList(QcCheckTaskDetail qcCheckTaskDetail) {
return qcCheckTaskIncomeMapper.getCkeckProjectList(qcCheckTaskDetail);
List<QcCheckTaskDetail> dtos = qcCheckTaskIncomeMapper.getCkeckProjectList(qcCheckTaskDetail);
for(QcCheckTaskDetail detail:dtos){
List<BaseFile> files = qmsFileMapper.getBaseFileBatch(detail.getRecordId());
if (!CollectionUtils.isEmpty(files)) {
List<String> 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<QcCheckTaskIncome> getCkeckProjectXJList(QcCheckTaskIncome qcCheckTaskIncome) {
List<QcCheckTaskIncome> dtos = qcCheckTaskIncomeMapper.getCkeckTaskXJList(qcCheckTaskIncome);
for(QcCheckTaskIncome dto:dtos){
//不良分类
QcCheckTaskDefect defectqo = new QcCheckTaskDefect();
defectqo.setBelongTo(dto.getRecordId());
List<QcCheckTaskDefect> defects = qcCheckTaskDefectMapper.selectQcCheckTaskDefectList(defectqo);
if(!CollectionUtils.isEmpty(defects)){
List<String> names = defects.stream().map(QcCheckTaskDefect::getDefectSubclass).collect(Collectors.toList());
dto.setNoOkQualityNames(names.toString());
List<BigDecimal> vals = defects.stream().map(QcCheckTaskDefect::getNoOkQuality).collect(Collectors.toList());
dto.setNoOkQualityVals(vals.toString());
}
//检测项列表
QcCheckTaskDetail detailqo = new QcCheckTaskDetail();
detailqo.setBelongTo(dto.getRecordId());
List<QcCheckTaskDetail> qcCheckTaskDetails = qcCheckTaskDetailMapper.selectQcCheckTaskDetailList(detailqo);
if(!CollectionUtils.isEmpty(qcCheckTaskDetails)){
for(QcCheckTaskDetail qcCheckTaskDetail:qcCheckTaskDetails){
List<BaseFile> files = qmsFileMapper.getBaseFileBatch(qcCheckTaskDetail.getRecordId());
if (!CollectionUtils.isEmpty(files)) {
List<String> 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);

@ -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<BaseFile> files = qmsFileMapper.getBaseFileBatch(detail.getRecordId());
if (!CollectionUtils.isEmpty(files)) {
List<String> pics = files.stream().map(BaseFile::getFileAddress).collect(Collectors.toList());
String picurls = pics.stream().collect(Collectors.joining(","));
project.setColumn080090(project.getColumn080090()+":"+picurls);
}
List<BaseFile> files = qmsFileMapper.getBaseFileBatch(detail.getRecordId());
if (!CollectionUtils.isEmpty(files)) {
List<String> 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<String> 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<String> 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<String> 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<String> 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<String> 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<String> 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<String> 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<String> 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<String> 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<String> 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<String> 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")?"✓":"✘");

@ -36,14 +36,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="sampleQuality" column="sample_quality" />
<result property="checkName" column="check_name" />
<result property="checkType" column="check_type"/>
<result property="reason" column="reason" />
<result property="productType" column="product_type"/>
</resultMap>
<sql id="selectQcCheckReportIncomeVo">
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
</sql>
<select id="selectQcCheckReportIncomeList" parameterType="QcCheckReportIncome" resultMap="QcCheckReportIncomeResult">
@ -164,9 +166,58 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
) t
left join pro_order_workorder pow on pow.workorder_code = t.orderNo
left join base_equipment be on be.equipment_code = pow.workorder_name
where pow.del_flag = '0' and be.del_flag ='0'
</select>
<insert id="insertQcCheckReportIncome" parameterType="QcCheckReportIncome">
<select id="getTaskInfo" resultType="com.op.quality.domain.QcCheckReportIncome">
select record_id recordId, check_no checkNo, income_batch_no incomeBatchNo,
order_no orderNo, material_code materialCode, material_name materialName,
quality, unit, supplier_code supplierCode, supplier_name supplierName,
income_time incomeTime, check_loc checkLoc, check_status checkStatus,
check_man_code checkManCode, check_man_name checkManName, check_time checkTime,
check_result checkResult,create_by createBy, create_time createTime,
check_type checkType,sample_quality sampleQuality,noOk_quality noOkQuality,
reason,product_type productType,
confirm,
confirm_man_code confirmManCode,
confirm_man_name confirmManName,
confirm_remark confirmRemark,
confirm_time confirmTime
from qc_check_task where record_id = #{recordId}
</select>
<select id="getXJTaskInfo" resultType="com.op.quality.domain.QcCheckReportIncome">
SELECT
c.check_type checkType,
c.quality,
c.unit,
c.order_no orderNo,
c.supplier_name supplierName,
c.supplier_code supplierCode,
c.material_name materialName,
c.material_code materialCode,
c.income_time incomeTime
FROM
qc_check_task c
where c.check_type='checkTypeSCXJ' and c.order_no = #{orderNo}
GROUP BY
c.order_no,c.supplier_name,c.supplier_code,c.material_name,
c.material_code,c.income_time,
c.check_type,
c.quality,c.unit
</select>
<select id="getLastXJTaskInfo" resultType="com.op.quality.domain.QcCheckReportIncome">
SELECT
top 1
c.confirm,
c.confirm_man_code confirmManCode,
c.confirm_man_name confirmManName,
c.confirm_remark confirmRemark,
c.confirm_time confirmTime
FROM
qc_check_task c
where c.check_type='checkTypeSCXJ' and c.order_no = #{orderNo}
order by c.create_time desc
</select>
<insert id="insertQcCheckReportIncome" parameterType="QcCheckReportIncome">
insert into qc_check_task
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="recordId != null">record_id,</if>
@ -263,8 +314,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
where record_id = #{recordId}
</update>
<update id="submitConfirm">
update qc_check_task
set confirm = #{confirm},
confirm_man_code = #{confirmManCode},
confirm_man_name = #{confirmManName},
confirm_remark = #{confirmRemark},
confirm_time = #{confirmTime}
<where>
<if test="recordId != null">
and record_id = #{recordId}
</if>
<if test="orderNo != null">
and order_no = #{orderNo}
</if>
</where>
</update>
<delete id="deleteQcCheckReportIncomeByRecordId" parameterType="String">
<delete id="deleteQcCheckReportIncomeByRecordId" parameterType="String">
delete from qc_check_task where record_id = #{recordId}
</delete>

@ -54,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
<if test="attr4 != null and attr4 != ''"> and attr4 = #{attr4}</if>
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
and del_flag = '0'
</where>
</select>

@ -311,6 +311,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{recordId}
</foreach>
</delete>
<delete id="deleteQcCheckTaskDefects">
delete from qc_check_task_defect where belong_to = #{belongId}
</delete>
<select id="selectQcCheckTaskCheckNoByRecordIds" parameterType="String" resultMap="QcCheckTaskIncomeResult">
select check_no from qc_check_task where record_id in
@ -364,8 +367,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join pro_order_workorder pow on pow.workorder_code = qct.order_no
where qct.record_id = #{recordId}
</select>
<select id="getCkeckTaskXJList" resultType="com.op.quality.domain.QcCheckTaskIncome">
select
record_id recordId,
check_no checkNo,
income_batch_no incomeBatchNo,
check_status checkStatus,
check_man_code checkManCode,
check_man_name checkManName,
check_time checkTime,
check_result checkResult,
create_time createTime,
check_loc checkLoc,
sample_quality sampleQuality
from qc_check_task
where del_flag = '0' and check_type = 'checkTypeSCXJ' and order_no = #{orderNo}
</select>
<insert id="addCheckUsers">
<insert id="addCheckUsers">
insert into qc_check_task_user(
record_id,belong_to,check_no,
check_man_code,check_man_name,

@ -37,7 +37,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="checkName" column="check_name" />
<result property="checkType" column="check_type"/>
<result property="noOkQuality" column="noOk_quality"/>
<result property="reason" column="reason" />
<result property="productType" column="product_type" />
</resultMap>
<resultMap type="QcCheckReportIncome" id="QcCheckReportIncomeResult">
@ -73,6 +74,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="checkName" column="check_name" />
<result property="checkType" column="check_type"/>
<result property="createTimeStr" column="createTimeStr" />
<result property="confirm" column="confirm" />
<result property="confirmManCode" column="confirm_man_code" />
<result property="confirmManName" column="confirm_man_name" />
<result property="confirmManName" column="confirm_remark" />
</resultMap>
<sql id="selectQcCheckTaskProduceVo">
@ -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
</sql>
@ -205,6 +210,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="delFlag != null">del_flag,</if>
<if test="checkType != null">check_type,</if>
<if test="typeCode != null">type_code,</if>
<if test="reason != null">reason,</if>
<if test="productType != null">product_type,</if>
<if test="confirmManCode != null">confirm_man_code,</if>
<if test="confirmManName != null">confirm_man_name,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="recordId != null">#{recordId},</if>
@ -242,6 +251,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="delFlag != null">#{delFlag},</if>
<if test="checkType != null">#{checkType},</if>
<if test="typeCode != null">#{typeCode},</if>
<if test="reason != null">#{reason},</if>
<if test="productType != null">#{productType},</if>
<if test="confirmManCode != null">#{confirmManCode},</if>
<if test="confirmManName != null">#{confirmManName},</if>
</trim>
</insert>
@ -280,6 +293,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="factoryCode != null and factoryCode != ''">factory_code = #{factoryCode},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="reason != null">reason = #{reason},</if>
<if test="productType != null">product_type = #{productType},</if>
<if test="confirmManCode != null">confirm_man_code = #{confirmManCode},</if>
<if test="confirmManName != null">confirm_man_name = #{confirmManName},</if>
</trim>
where record_id = #{recordId}
</update>
@ -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
<where>
<if test="checkNo != null and checkNo != ''"> and qct.check_no = #{checkNo}</if>
@ -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
<where>
<if test="checkNo != null and checkNo != ''"> and qct.check_no = #{checkNo}</if>
@ -355,7 +374,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and qct.check_type = 'checkTypeSCXJ'
</where>
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
<if test="checkType != null ">

Loading…
Cancel
Save