质量看板接口

master
zhaoxiaolin 1 year ago
parent a4c58a143c
commit 5f03c120b6

@ -73,6 +73,7 @@ public interface RemoteSapService {
public R sapBackflushMP(List<SapBackflushMPQuery> sapBackflushMPQueryList); public R sapBackflushMP(List<SapBackflushMPQuery> sapBackflushMPQueryList);
/**订单物料领料过账、原材料补料、订单物料退料过账接口MB1A**/ /**订单物料领料过账、原材料补料、订单物料退料过账接口MB1A**/
@PostMapping("/sap/sapMaterialPosting")
public R sapMaterialPosting(@RequestBody List<SapMaterialPosting> sapMaterialPostingList); public R sapMaterialPosting(@RequestBody List<SapMaterialPosting> sapMaterialPostingList);
/**智慧工厂储位信息*/ /**智慧工厂储位信息*/

@ -43,8 +43,8 @@ public class MesPrepareServiceImpl implements IMesPrepareService {
protected Logger logger = LoggerFactory.getLogger(getClass()); protected Logger logger = LoggerFactory.getLogger(getClass());
@Autowired @Autowired
private MesPrepareMapper mesPrepareMapper; private MesPrepareMapper mesPrepareMapper;
@Autowired // @Autowired
private RemoteSapService remoteSapService; // private RemoteSapService remoteSapService;
@Autowired @Autowired
private RemoteUserService remoteUserService; private RemoteUserService remoteUserService;
@Autowired @Autowired

@ -73,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mpd.status, mpd.status,
mpd.fund_quanlity fundQuanlity, mpd.fund_quanlity fundQuanlity,
mpd.factory_code factoryCode, mpd.factory_code factoryCode,
mpd.recoil,
ow.product_date productDate ow.product_date productDate
from pro_order_workorder ow from pro_order_workorder ow
left join mes_prepare mp on ow.workorder_code = mp.workorder_code left join mes_prepare mp on ow.workorder_code = mp.workorder_code

@ -214,11 +214,11 @@ public class QuaController extends BaseController {
* *
*/ */
@PostMapping(value = "commitCheckResults") @PostMapping(value = "commitCheckResults")
public AjaxResult commitCheckResults(@RequestBody List<QcCheckTaskDetail> qcCheckTaskDetails) { public AjaxResult commitCheckResults(@RequestBody QcCheckTaskIncome qcCheckTaskIncome) {
if(CollectionUtils.isEmpty(qcCheckTaskDetails)){ if(CollectionUtils.isEmpty(qcCheckTaskIncome.getQcCheckTaskDetails())){
return error("[List<QcCheckTaskDetail>]不能为空"); return error("[List<QcCheckTaskDetail>]不能为空");
} }
return success(qcCheckTaskIncomeService.commitCheckResults(qcCheckTaskDetails)); return success(qcCheckTaskIncomeService.commitCheckResults(qcCheckTaskIncome));
} }
/** /**
* *

@ -2,6 +2,8 @@ package com.op.quality.domain;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
@ -127,6 +129,52 @@ public class QcCheckTaskIncome extends BaseEntity {
private String qualityStatus; private String qualityStatus;
private String batchCode; private String batchCode;
private String batchId; private String batchId;
private List<QcCheckTaskDetail> qcCheckTaskDetails;
private BigDecimal sampleQuality;
private BigDecimal aNoOkquality;
private BigDecimal bNoOkquality;
private BigDecimal cNoOkquality;
public BigDecimal getSampleQuality() {
return sampleQuality;
}
public void setSampleQuality(BigDecimal sampleQuality) {
this.sampleQuality = sampleQuality;
}
public BigDecimal getaNoOkquality() {
return aNoOkquality;
}
public void setaNoOkquality(BigDecimal aNoOkquality) {
this.aNoOkquality = aNoOkquality;
}
public void setbNoOkquality(BigDecimal bNoOkquality) {
this.bNoOkquality = bNoOkquality;
}
public void setcNoOkquality(BigDecimal cNoOkquality) {
this.cNoOkquality = cNoOkquality;
}
public BigDecimal getbNoOkquality() {
return bNoOkquality;
}
public BigDecimal getcNoOkquality() {
return cNoOkquality;
}
public List<QcCheckTaskDetail> getQcCheckTaskDetails() {
return qcCheckTaskDetails;
}
public void setQcCheckTaskDetails(List<QcCheckTaskDetail> qcCheckTaskDetails) {
this.qcCheckTaskDetails = qcCheckTaskDetails;
}
public String getBatchCode() { public String getBatchCode() {
return batchCode; return batchCode;

@ -76,7 +76,7 @@ public interface IQcCheckTaskIncomeService {
int commitCheckResult(QcCheckTaskIncome qcCheckTaskIncome); int commitCheckResult(QcCheckTaskIncome qcCheckTaskIncome);
int commitCheckResults(List<QcCheckTaskDetail> details); int commitCheckResults(QcCheckTaskIncome qcCheckTaskIncome);
List<QcDefectType> getDefectList(QcDefectType qcDefectType); List<QcDefectType> getDefectList(QcDefectType qcDefectType);

@ -1,5 +1,6 @@
package com.op.quality.service.impl; package com.op.quality.service.impl;
import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@ -8,6 +9,7 @@ import com.alibaba.fastjson2.JSONArray;
import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder; import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
import com.op.common.core.utils.DateUtils; import com.op.common.core.utils.DateUtils;
import com.op.common.core.utils.StringUtils;
import com.op.common.core.utils.uuid.IdUtils; import com.op.common.core.utils.uuid.IdUtils;
import com.op.common.security.utils.SecurityUtils; import com.op.common.security.utils.SecurityUtils;
import com.op.quality.domain.*; import com.op.quality.domain.*;
@ -240,6 +242,20 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
String key = "#header.poolName"; String key = "#header.poolName";
String factoryCode = request.getHeader(key.substring(8)).replace("ds_",""); String factoryCode = request.getHeader(key.substring(8)).replace("ds_","");
BigDecimal noOkQquality = new BigDecimal("0");
if(qcCheckTaskIncome.getaNoOkquality()!=null){
noOkQquality.add(qcCheckTaskIncome.getaNoOkquality());
}
if(qcCheckTaskIncome.getbNoOkquality()!=null){
noOkQquality.add(qcCheckTaskIncome.getbNoOkquality());
}
if(qcCheckTaskIncome.getcNoOkquality()!=null){
noOkQquality.add(qcCheckTaskIncome.getcNoOkquality());
}
if(qcCheckTaskIncome.getNoOkQuality()==null){
qcCheckTaskIncome.setNoOkQuality(noOkQquality);
}
//遍历检测项目 //遍历检测项目
List<String> projects= qcCheckTaskDetailMapper.getProjectStatus(qcCheckTaskIncome.getRecordId()); List<String> projects= qcCheckTaskDetailMapper.getProjectStatus(qcCheckTaskIncome.getRecordId());
String result = "N"; String result = "N";
@ -322,7 +338,8 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
} }
@Override @Override
public int commitCheckResults(List<QcCheckTaskDetail> details) { public int commitCheckResults(QcCheckTaskIncome qcCheckTaskIncome) {
List<QcCheckTaskDetail> details = qcCheckTaskIncome.getQcCheckTaskDetails();
DynamicDataSourceContextHolder.push(details.get(0).getFactoryCode()); DynamicDataSourceContextHolder.push(details.get(0).getFactoryCode());
Date nowTime = DateUtils.getNowDate(); Date nowTime = DateUtils.getNowDate();
String factoryCode = details.get(0).getFactoryCode(); String factoryCode = details.get(0).getFactoryCode();
@ -347,6 +364,20 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
qcCheckTask.setUpdateTime(nowTime); qcCheckTask.setUpdateTime(nowTime);
qcCheckTask.setCheckTime(nowTime); qcCheckTask.setCheckTime(nowTime);
qcCheckTask.setCheckResult(result);//检验结果Y合格 N不合格 qcCheckTask.setCheckResult(result);//检验结果Y合格 N不合格
BigDecimal noOkQquality = new BigDecimal("0");
if(qcCheckTaskIncome.getaNoOkquality()!=null){
noOkQquality.add(qcCheckTaskIncome.getaNoOkquality());
}
if(qcCheckTaskIncome.getbNoOkquality()!=null){
noOkQquality.add(qcCheckTaskIncome.getbNoOkquality());
}
if(qcCheckTaskIncome.getcNoOkquality()!=null){
noOkQquality.add(qcCheckTaskIncome.getcNoOkquality());
}
if(qcCheckTask.getNoOkQuality()==null){
qcCheckTask.setNoOkQuality(noOkQquality);
}
qcCheckTask.setSampleQuality(qcCheckTaskIncome.getSampleQuality());
/**qc_check_task**/ /**qc_check_task**/
n = qcCheckTaskIncomeMapper.updateQcCheckTask(qcCheckTask); n = qcCheckTaskIncomeMapper.updateQcCheckTask(qcCheckTask);
logger.info("qc_check_task:"+n); logger.info("qc_check_task:"+n);

@ -260,6 +260,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="factoryCode != null and factoryCode != ''">factory_code = #{factoryCode},</if> <if test="factoryCode != null and factoryCode != ''">factory_code = #{factoryCode},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if> <if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="checkType != null">check_type = #{checkType},</if> <if test="checkType != null">check_type = #{checkType},</if>
<if test="sampleQuality != null">sample_quality = #{sampleQuality},</if>
<if test="noOkQuality != null">noOk_quality = #{noOkQuality},</if>
</trim> </trim>
where record_id = #{recordId} where record_id = #{recordId}
</update> </update>
@ -268,6 +271,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
set set
check_status = #{checkStatus}, check_status = #{checkStatus},
<if test="checkTime != null">check_time = #{checkTime},</if> <if test="checkTime != null">check_time = #{checkTime},</if>
<if test="sampleQuality != null">sample_quality = #{sampleQuality},</if>
<if test="noOkQuality != null">noOk_quality = #{noOkQuality},</if>
<if test="aNoOkquality != null">aNoOkquality = #{aNoOkquality},</if>
<if test="bNoOkquality != null">bNoOkquality = #{bNoOkquality},</if>
<if test="cNoOkquality != null">cNoOkquality = #{cNoOkquality},</if>
check_result = #{checkResult}, check_result = #{checkResult},
update_by = #{updateBy}, update_by = #{updateBy},
update_time = #{updateTime} update_time = #{updateTime}

@ -221,6 +221,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
<if test="factoryCode != null and factoryCode != ''">factory_code = #{factoryCode},</if> <if test="factoryCode != null and factoryCode != ''">factory_code = #{factoryCode},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if> <if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="sampleQuality != null">sample_quality = #{sampleQuality},</if>
</trim> </trim>
where record_id = #{recordId} where record_id = #{recordId}
</update> </update>

@ -194,6 +194,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
<if test="factoryCode != null and factoryCode != ''">factory_code = #{factoryCode},</if> <if test="factoryCode != null and factoryCode != ''">factory_code = #{factoryCode},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if> <if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="sampleQuality != null">sample_quality = #{sampleQuality},</if>
<if test="noOkQuality != null">noOk_quality = #{noOkQuality},</if>
<if test="aNoOkquality != null">aNoOkquality = #{aNoOkquality},</if>
<if test="bNoOkquality != null">bNoOkquality = #{bNoOkquality},</if>
<if test="cNoOkquality != null">cNoOkquality = #{cNoOkquality},</if>
</trim> </trim>
where record_id = #{recordId} where record_id = #{recordId}
</update> </update>

Loading…
Cancel
Save