巡检触发逻辑变更

master
zhaoxiaolin 1 year ago
parent f9cb4a5c1d
commit 52f2be01fd

@ -88,9 +88,7 @@ public class OpenController extends BaseController {
/**创建生产过程(烘房 首检)检验*/
@PostMapping(value = "/createCheckProduceTask")
public AjaxResult createCheckProduceTask(@RequestBody QcCheckTaskProduceDTO qcCheckTaskProduce) {
if(StringUtils.isBlank(qcCheckTaskProduce.getIncomeBatchNo())){
return error("[IncomeBatchNo]不能为空");
}
if(StringUtils.isBlank(qcCheckTaskProduce.getOrderNo())){
return error("[orderNo]不能为空");
@ -105,7 +103,7 @@ public class OpenController extends BaseController {
}
if(StringUtils.isBlank(qcCheckTaskProduce.getCheckType())){
return error("[checkType:produce]不能为空");
return error("[checkType]不能为空");
}
if(StringUtils.isBlank(qcCheckTaskProduce.getFactoryCode())){
@ -116,7 +114,6 @@ public class OpenController extends BaseController {
return success(openService.insertQcCheckTaskProduce(qcCheckTaskProduce));
}
/**
* ZL0010-
* CQ OEMCM LLLB 01MATNR MAKTX suppliernum

@ -108,9 +108,7 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
String createBy = SecurityUtils.getUsername();
Date nowDate= DateUtils.getNowDate();
//获取当前所选工厂
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String key = "#header.poolName";
String factoryCode = request.getHeader(key.substring(8)).replace("ds_","");
String factoryCode = qcCheckTaskIncome.getFactoryCode();
qcCheckTaskIncome.setCheckNo(bpDD+liushuiStr);

@ -215,7 +215,7 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService
int m=qcCheckTaskIncomeMapper.addCheckUsers(users);
logger.info("检查人新增"+m+"成功");
}
/**qc_check_task**/
qcCheckTaskProduceMapper.insertQcCheckTaskProduce(qcCheckTaskProduce);
/**qc_check_task_detail**/
@ -343,6 +343,7 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService
List<QcCheckTaskProduce> works = qcCheckTaskProduceMapper.getOrderWorks(qoWork);
for(QcCheckTaskProduce productTask:works){
productTask.setCheckType("checkTypeSCXJ");//过程检验-巡检
productTask.setOrderNo(productTask.getWorkorderCode());
Date nowTime = DateUtils.getNowDate();
Date startTime = productTask.getCreateTime();

@ -110,33 +110,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where type_code = #{typeCode} and del_flag='0'
</select>
<select id="getOrderWorks" resultType="com.op.quality.domain.QcCheckTaskProduce">
select pow.factory_code factoryCode,
powb.batch_code incomeBatchNo,
powb.qc_status,
pow.workorder_code workorderCode,
pow.product_code materialCode,
pow.product_name materialName,
pow.quantity_split quality,
pow.unit,
e.workshop_code supplierCode,
e.workshop_name supplierName,
pow.product_date incomeTime,
task.createTime,
task.order_no orderNo,
task.check_loc checkLoc
from pro_order_workorder pow
left join pro_order_workorder_batch powb on powb.workorder_id = pow.workorder_id
left join base_equipment e on e.equipment_code = pow.workorder_name
left join (
select max(create_time) createTime,income_batch_no,order_no,check_loc
from qc_check_task
where type_code = 'produce'
select qct.factory_code factoryCode,
qct.order_no workorderCode,
qct.material_code materialCode,
qct.material_name materialName,
qct.quality,
qct.unit,
qct.supplier_code supplierCode,
qct.supplier_name supplierName,
qct.income_time incomeTime,
max(qct.create_time) createTime,
qct.check_loc checkLoc
from qc_check_task qct
left join pro_order_workorder pow on qct.order_no = pow.workorder_code
where check_type = 'checkTypeSCXJ'
and CONVERT(varchar(10),income_time, 120) = CONVERT(varchar(10),GETDATE(), 120)
GROUP BY income_batch_no,order_no,check_loc
) task on task.income_batch_no = powb.batch_code
where pow.status = 'w2' and pow.parent_order = '0' and pow.del_flag ='0'
and powb.del_flag = '0' and pow.product_date >= '2023-12-22'
and task.createTime is not null
and pow.status = 'w2'
group by qct.factory_code,
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
</select>
<insert id="insertQcCheckTaskProduce" parameterType="QcCheckTaskProduce">

Loading…
Cancel
Save