Merge remote-tracking branch 'origin/master'

master
mengjiao 9 months ago
commit 90b4eac108

@ -480,6 +480,7 @@ public class MesReportWorkServiceImpl implements IMesReportWorkService {
}
@Override
@DS("#header.poolName")
public LineChartDto getMonthProData(MesReportProduction mesReportProduction) {
LineChartDto lineChartDto = new LineChartDto();

@ -294,7 +294,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sum(mrw.quantity) quantity
from(
select
product_name+CONVERT(varchar(10),feedback_time, 120) nameDate,
CONVERT(varchar(10),feedback_time, 120) nameDate,
product_code productCode,
product_name productName,
CONVERT(varchar(10),feedback_time, 120) feedbackTime,
@ -726,7 +726,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
be.equipment_name machineName
from pro_order_workorder pow
left join base_equipment be on be.equipment_code = pow.workorder_name
where pow.product_date = #{productDate} and pow.parent_order = '0' and pow.del_flag='0' and pow.workorder_name is not null
where CONVERT(varchar(10),pow.product_date, 120) = #{productDate} and pow.parent_order = '0' and pow.del_flag='0' and pow.workorder_name is not null
GROUP BY pow.workorder_name,be.equipment_name
) t
order by t.quantitySplit desc
@ -736,7 +736,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sum(pow.quantity_split) quantitySplit,
pow.product_name productName
from pro_order_workorder pow
where pow.product_date = CONVERT(DATE, GETDATE()) and pow.parent_order = '0' and pow.del_flag='0'
where CONVERT(varchar(10),pow.product_date, 120) = CONVERT(DATE, GETDATE()) and pow.parent_order = '0' and pow.del_flag='0'
GROUP BY pow.product_code,pow.product_name
</select>

@ -195,9 +195,9 @@ public class QuaController extends BaseController {
if(StringUtils.isBlank(qcCheckTaskIncome.getUpdateByName())){
return error("[updateByName]不能为空");
}
if(StringUtils.isBlank(qcCheckTaskIncome.getCheckResult())){
return error("[checkResult]不能为空");
}
// if(StringUtils.isBlank(qcCheckTaskIncome.getCheckResult())){
// return error("[checkResult]不能为空");
// }
return toAjax(qcCheckTaskIncomeService.commitCheckResults(qcCheckTaskIncome));
}
/**

@ -29,6 +29,7 @@ public class QcCheckTaskIncome extends BaseEntity {
*/
@Excel(name = "检验任务编号")
private String checkNo;
private String orderCode;
private String workorderCode;
private String workorderCodeSap;
@ -198,6 +199,14 @@ public class QcCheckTaskIncome extends BaseEntity {
private String materialFrom;//物料来源
private String startOA;//发起oa 1是 0否
public String getOrderCode() {
return orderCode;
}
public void setOrderCode(String orderCode) {
this.orderCode = orderCode;
}
public String getStartOA() {
return startOA;
}

@ -122,6 +122,24 @@ public class QcCheckUnqualified extends BaseEntity {
private String oaFactory;//oa厂区
private String czbjr;//仓储报检人
private String qczg;//QC主管
private String user;
private String sqr;
public String getSqr() {
return sqr;
}
public void setSqr(String sqr) {
this.sqr = sqr;
}
public String getUser() {
return user;
}
public void setUser(String user) {
this.user = user;
}
public String getQczg() {
return qczg;

@ -16,17 +16,13 @@ import com.op.common.core.web.domain.AjaxResult;
import com.op.common.security.utils.SecurityUtils;
import com.op.quality.domain.*;
import com.op.quality.mapper.*;
import com.op.quality.service.IQcCheckTaskDefectService;
import com.op.quality.service.IQcCheckTaskProduceService;
import com.op.quality.service.IQcCheckTaskUserService;
import com.op.system.api.RemoteOpenService;
import com.op.quality.service.*;
import com.op.system.api.domain.SysUser;
import com.op.system.api.domain.quality.QcUserMaterialDTO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.op.quality.service.IQcCheckTaskIncomeService;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.web.context.request.RequestContextHolder;
@ -70,8 +66,8 @@ public class QcCheckTaskIncomeServiceImpl<QcCheckUnqualifiedService> implements
@Autowired
private IQcCheckTaskUserService qcCheckTaskUserService;
@Autowired
private RemoteOpenService remoteOpenService;
// @Autowired
// private RemoteOpenService remoteOpenService;
@Autowired
private QMSFileMapper qmsFileMapper;
@ -85,8 +81,8 @@ public class QcCheckTaskIncomeServiceImpl<QcCheckUnqualifiedService> implements
@Autowired
private QcCheckTaskDefectMapper qcCheckTaskDefectMapper;
// @Autowired
// private QcCheckUnqualifiedService qcCheckUnqualifiedService;
@Autowired
private IQcCheckUnqualifiedService qcCheckUnqualifiedService;
/**
*
@ -447,11 +443,11 @@ public class QcCheckTaskIncomeServiceImpl<QcCheckUnqualifiedService> implements
qcCheckTaskProduce.setCheckTime(DateUtils.getNowDate());
qcCheckTaskProduce.setCheckManCode(SecurityUtils.getUsername());
n = qcCheckTaskProduceMapper.updateQcCheckTaskProduce(qcCheckTaskProduce);
/**pro_order_workorder_batch-->qc_status->2**/
qcCheckTaskIncome.setStatus("2");
qcCheckUnqualifiedMapper.updateWorkOrderBatchStatus(qcCheckTaskIncome);
/**pro_order_workorder_batch-->首检qc_status->2**/
if("checkTypeSC".equals(qcCheckTaskIncome.getCheckType())){
qcCheckTaskIncome.setStatus("2");
qcCheckUnqualifiedMapper.updateWorkOrderBatchStatus(qcCheckTaskIncome);
}
}else if("product".equals(qcCheckTaskIncome.getTypeCode())){
QcCheckTaskWarehousing warehousing = new QcCheckTaskWarehousing();
warehousing.setCheckStatus("2");
@ -598,14 +594,22 @@ public class QcCheckTaskIncomeServiceImpl<QcCheckUnqualifiedService> implements
String checkType = qcCheckTaskIncome.getCheckType();
qcCheckTaskIncome.setFactoryCode(qcCheckTaskIncome.getFactoryCode().replace("ds_",""));
//默认合格
String result = "Y";
for(QcCheckTaskDetail detail:details){
if("N".equals(detail.getStatus())){
result = "N";//不合格
break;
String result=null;
if(StringUtils.isBlank(qcCheckTaskIncome.getCheckResult())){
result = "Y";
for(QcCheckTaskDetail detail:details){
if("N".equals(detail.getStatus())){
result = "N";//不合格
break;
}
}
}else{
//有最终判定的情况
result = qcCheckTaskIncome.getCheckResult();
}
int n = 0;
QcCheckTaskIncome qcCheckTask = new QcCheckTaskIncome();
qcCheckTask.setUpdateBy(updateBy);
@ -613,6 +617,7 @@ public class QcCheckTaskIncomeServiceImpl<QcCheckUnqualifiedService> implements
qcCheckTask.setCheckStatus("2");//检测状态0待检测1检测中2检测完成
qcCheckTask.setUpdateTime(nowTime);
qcCheckTask.setCheckTime(nowTime);
qcCheckTask.setRemark(qcCheckTaskIncome.getRemark());
qcCheckTask.setCheckResult(result);//检验结果Y合格 N不合格
qcCheckTask.setIncomeBatchNo(qcCheckTaskIncome.getIncomeBatchNo());
BigDecimal noOkQquality = new BigDecimal("0");
@ -690,6 +695,7 @@ public class QcCheckTaskIncomeServiceImpl<QcCheckUnqualifiedService> implements
if("checkTypeSC".equals(qcCheckTaskIncome.getCheckType())){
/**pro_order_workorder_batch-->qc_status->2**/
qcCheckTaskIncome.setStatus("2");
qcCheckTaskIncome.setCheckResult(result);
qcCheckUnqualifiedMapper.updateWorkOrderBatchStatus(qcCheckTaskIncome);
}
if("checkTypeSC".equals(qcCheckTaskIncome.getCheckType())&&"N".equals(result)){
@ -732,8 +738,48 @@ public class QcCheckTaskIncomeServiceImpl<QcCheckUnqualifiedService> implements
unqualified.setType(checkType);
n = qcCheckUnqualifiedMapper.insertQcCheckUnqualified(unqualified);
logger.info("qc_check_unqualified:" + n);
//qcCheckUnqualifiedService.updateQcCheckUnqualified(qcCheckUnqualified);
if("1".equals(qcCheckTaskIncome.getStartOA())){
unqualified.setTypeCode(qcCheckTaskIncome.getTypeCode());
//不合格描述
unqualified.setRemark(qcCheckTaskIncome.getRemark());
//厂区(小榄固定值)
unqualified.setOaFactory("0");
//来料类别
unqualified.setMaterialType(qcCheckTaskIncome.getMaterialType());
//物料来源
unqualified.setMaterialFrom(qcCheckTaskIncome.getMaterialFrom());
//物料编号
unqualified.setMaterialCode(qcCheckTaskIncome.getMaterialCode());
//物料名称
unqualified.setMaterialName(qcCheckTaskIncome.getMaterialName());
//供应商编码
unqualified.setSupplierCode(qcCheckTaskIncome.getSupplierCode());
//供应商名称
unqualified.setSupplierName(qcCheckTaskIncome.getSupplierName());
//供应商名称
unqualified.setSupplierName(qcCheckTaskIncome.getSupplierName());
//生产批号
unqualified.setIncomeBatchNo(qcCheckTaskIncome.getIncomeBatchNo());
//来料数量
unqualified.setQuality(qcCheckTaskIncome.getQuality().toString());
//来料单位
unqualified.setUnit(qcCheckTaskIncome.getUnit());
//检验编号
unqualified.setCheckNo(qcCheckTaskIncome.getCheckNo());
//仓储报检人-李爱娟
unqualified.setCzbjr("284");
//物料类别
unqualified.setMaterialType(qcCheckTaskIncome.getMaterialType());
//物料来源
unqualified.setMaterialFrom(qcCheckTaskIncome.getMaterialFrom());
//QC主管-朱继新
unqualified.setQczg("660");
//申请人-朱继新
unqualified.setSqr("660");
unqualified.setUser("660");
qcCheckUnqualifiedService.updateQcCheckUnqualified(unqualified);
}
}
return 1 ;
}

@ -164,39 +164,33 @@ public class QcCheckUnqualifiedServiceImpl implements IQcCheckUnqualifiedService
}
/*OA
* CQ OEMCM LLLB 01MATNR MAKTX suppliernum
* SQR CQ OEMCM LLLB 01MATNR MAKTX suppliernum
* supplier CHARG comeQty DW testDate JYBH
* BJY OEMWLLY ZCF ZCOEMCM OEM
* memo PZGLBZG QC
* {"requestName":"ZL0010-来料检验不合格控制流程",
* "mainObject":"{\"SQR\":\"13127\",\"CQ\":0,\"LLLB\":0,\"MATNR\":\"000000040000015062\",
* \"MAKTX\":\"榄菊加大盘强力型蚊香(60装)现货纸箱(2201)\",\"suppliernum\":\"0000102951\",
* \"supplier\":\"广东高顺印刷包装有限公司\",\"CHARG\":\"null\",\"comeQty\":\"1117\",
* \"DW\":\"ST\",\"JYBH\":\"202404180042\",\"BJY\":\"202404180042\",\"WLLY\":\"2\",
* \"memo\":\"不合格\",\"PZGLBZG\":\"不合格\"}","user":"999999","requestLevel":0,"workflowId":26235}
*/
private AjaxResult createLLOA(QcCheckUnqualified task){
//QcCheckTaskIncome detailInfo = qcCheckTaskIncomeMapper.getTaskInfo(task.getTaskId());
//发起来料检验OA流程
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("user",SecurityUtils.getUsername());//提交人工号
paramMap.put("user",task.getUser());//提交人工号
paramMap.put("requestLevel",0);//流程紧急度
paramMap.put("requestName","ZL0010-来料检验不合格控制流程");//流程名称
paramMap.put("workflowId",26235);//该流程对应的唯- workFlowld
StringBuffer mainObject = new StringBuffer();
// mainObject.append("{");
// mainObject.append("CQ:"+task.getOaFactory());//厂区
// mainObject.append(",LLLB:"+task.getMaterialType());//来料类别【0、1】
// mainObject.append(",MATNR:"+task.getMaterialCode());//物料编码
// mainObject.append(",MAKTX"+task.getMaterialName());//物料名称
// mainObject.append(",suppliernum"+task.getSupplierCode());//供应商编码
// mainObject.append(",supplier"+task.getSupplierName());//供应商名称
// mainObject.append(",CHARG:"+task.getIncomeBatchNo());//生产批号
// mainObject.append(",comeQty:"+task.getQuality()+"\"");//来料数量
// mainObject.append(",DW:"+task.getUnit()+"\"");//来料单位
// mainObject.append(",JYBH:"+task.getCheckNo());//检验编码
// mainObject.append(",BJY:"+task.getCheckNo());//仓储报检人
// mainObject.append(",WLLY:"+task.getMaterialFrom());//物料来源
// mainObject.append(",memo:"+task.getRemark());//不合格描述
// mainObject.append(",PZGLBZG:"+task.getRemark());//qc主管
mainObject.append("\"CQ\":"+task.getOaFactory());//厂区
mainObject.append("\"LLLB\":"+task.getMaterialType());//来料类别【0、1】
mainObject.append("{");
mainObject.append("\"SQR\":"+"\""+task.getSqr()+"\"");//申请人
mainObject.append(",\"CQ\":"+task.getOaFactory());//厂区
mainObject.append(",\"LLLB\":"+task.getMaterialType());//来料类别【0、1】
mainObject.append(",\"MATNR\":"+"\""+task.getMaterialCode()+"\"");//物料编码
mainObject.append(",\"MAKTX\":"+"\""+task.getMaterialName()+"\"");//物料名称
mainObject.append(",\"suppliernum\":"+"\""+task.getSupplierCode()+"\"");//供应商编码
@ -205,10 +199,10 @@ public class QcCheckUnqualifiedServiceImpl implements IQcCheckUnqualifiedService
mainObject.append(",\"comeQty\":"+"\""+task.getQuality()+"\"");//来料数量
mainObject.append(",\"DW\":"+"\""+task.getUnit()+"\"");//来料单位
mainObject.append(",\"JYBH\":"+"\""+task.getCheckNo()+"\"");//检验编码
mainObject.append(",\"BJY\":"+"\""+task.getCheckNo()+"\"");//仓储报检人
mainObject.append(",\"BJY\":"+"\""+task.getCzbjr()+"\"");//仓储报检人
mainObject.append(",\"WLLY\":"+"\""+task.getMaterialFrom()+"\"");//物料来源
mainObject.append(",\"memo\":"+"\""+task.getRemark()+"\"");//不合格描述
mainObject.append(",\"PZGLBZG\":"+"\""+task.getRemark()+"\"");//qc主管
mainObject.append(",\"PZGLBZG\":"+"\""+task.getQczg()+"\"");//qc主管
mainObject.append("}");
paramMap.put("mainObject",mainObject.toString());

@ -138,7 +138,7 @@ public class QcProCheckServiceImpl implements QcProCheckService {
@Override
public QcCheckTaskIncome getCheckTaskDetailList(QcCheckTaskDetail qcCheckTaskDetail) {
DynamicDataSourceContextHolder.push(qcCheckTaskDetail.getFactoryCode());
QcCheckTaskIncome dto = new QcCheckTaskIncome();
QcCheckTaskIncome dto = qcCheckTaskIncomeMapper.getTaskInfo(qcCheckTaskDetail.getBelongTo());
List<QcCheckTaskDetail> qcCheckTaskDetails = qcCheckTaskIncomeMapper.getCkeckProjectList(qcCheckTaskDetail);
/**qc_check_task_defect**/
Map<String,QcCheckTaskDefect> defectMap = qcCheckTaskDefectMapper.getDefectMap(qcCheckTaskDetail);

@ -304,6 +304,7 @@
<if test="bNoOkquality != null">bNoOkquality = #{bNoOkquality},</if>
<if test="cNoOkquality != null">cNoOkquality = #{cNoOkquality},</if>
<if test="incomeBatchNo != null">income_batch_no = #{incomeBatchNo},</if>
<if test="remark != null">remark = #{remark},</if>
check_result = #{checkResult},
update_by = #{updateBy},
update_time = #{updateTime}
@ -398,7 +399,8 @@
qct.check_time checkTime,
qct.check_result checkResult,
qct.income_time incomeTime,
qct.check_loc checkLoc
qct.check_loc checkLoc,
qct.remark
from qc_check_task qct
left join pro_order_workorder pow on pow.workorder_code = qct.order_no
where qct.record_id = #{recordId}

@ -284,7 +284,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where order_no = #{orderNo}
</update>
<update id="updateWorkOrderBatchStatus">
update pro_order_workorder_batch set qc_status = #{status} where batch_code = #{incomeBatchNo}
update pro_order_workorder_batch
set qc_status = #{status}
<if test="checkResult != null">
,qc_result = #{checkResult}
</if>
where batch_code = #{incomeBatchNo} and del_flag ='0'
and workorder_id in(select workorder_id from pro_order_workorder pow
where pow.belong_work_order = #{orderCode} and del_flag = '0')
</update>
<update id="updatePutStatus">
update wms_product_put set check_status = #{status} where batch_number = #{incomeBatchNo}

Loading…
Cancel
Save