质量任务接口修改2

master
zhaoxiaolin 1 year ago
parent dda4c9595c
commit 58d80d29c8

@ -82,4 +82,6 @@ public interface QcCheckUnqualifiedMapper {
int updateWorkOrderBatchStatus(QcCheckTaskIncome qcCheckTaskIncome);
List<QcCheckTaskIncome> getProductWorkOrder(QcCheckTaskIncome qcCheckTaskIncome);
void updatePutStatus(QcCheckTaskIncome qcCheckTaskIncome);
}

@ -5,14 +5,14 @@ import com.op.quality.domain.QcCheckTaskUser;
/**
* --Service
*
*
* @author Open Platform
* @date 2023-12-22
*/
public interface IQcCheckTaskUserService {
/**
* --
*
*
* @param recordId --
* @return --
*/
@ -20,7 +20,7 @@ public interface IQcCheckTaskUserService {
/**
* --
*
*
* @param qcCheckTaskUser --
* @return --
*/
@ -28,7 +28,7 @@ public interface IQcCheckTaskUserService {
/**
* --
*
*
* @param qcCheckTaskUser --
* @return
*/
@ -36,7 +36,7 @@ public interface IQcCheckTaskUserService {
/**
* --
*
*
* @param qcCheckTaskUser --
* @return
*/
@ -44,7 +44,7 @@ public interface IQcCheckTaskUserService {
/**
* --
*
*
* @param recordIds --
* @return
*/
@ -54,7 +54,7 @@ public interface IQcCheckTaskUserService {
/**
* --
*
*
* @param recordId --
* @return
*/
@ -68,4 +68,6 @@ public interface IQcCheckTaskUserService {
*
*/
public QcCheckTaskUser selectQcCheckTaskUserByBelongTo(String belongTo);
public int insertQcCheckTaskUserPDA(List<QcCheckTaskUser> qcCheckTaskUserList);
}

@ -168,7 +168,7 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
qcCheckTaskUserList.add(qcCheckTaskUser);
}
//检验人插入
qcCheckTaskUserService.insertQcCheckTaskUserList(qcCheckTaskUserList);
qcCheckTaskUserService.insertQcCheckTaskUserPDA(qcCheckTaskUserList);
}else{//上位机触发
qcCheckTaskIncome.setCheckManName("");
qcCheckTaskIncome.setCheckManCode("");
@ -608,7 +608,9 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
qcCheckTaskIncome.setStatus("2");
qcCheckUnqualifiedMapper.updateWorkOrderBatchStatus(qcCheckTaskIncome);
}else if("product".equals(qcCheckTaskIncome.getTypeCode())){
/**wms_product_put-->check_status->1**/
qcCheckTaskIncome.setStatus("2");
qcCheckUnqualifiedMapper.updatePutStatus(qcCheckTaskIncome);
}
//不合格处理

@ -132,20 +132,23 @@ public class QcCheckTaskUserServiceImpl implements IQcCheckTaskUserService {
@Override
@DS("#header.poolName")
public int insertQcCheckTaskUserList(List<QcCheckTaskUser> qcCheckTaskUserList) {
//获取当前所选工厂
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String key = "#header.poolName";
String factoryCode = request.getHeader(key.substring(8)).replace("ds_","");
return this.insertTaskUsers(qcCheckTaskUserList,factoryCode);
}
@Override
public int insertQcCheckTaskUserPDA(List<QcCheckTaskUser> qcCheckTaskUserList) {
DynamicDataSourceContextHolder.push("ds_"+qcCheckTaskUserList.get(0).getFactoryCode());
String factoryCode= qcCheckTaskUserList.get(0).getFactoryCode();
return this.insertTaskUsers(qcCheckTaskUserList,factoryCode);
}
private int insertTaskUsers(List<QcCheckTaskUser> qcCheckTaskUserList,String factoryCode){
if (CollectionUtils.isEmpty(qcCheckTaskUserList)){
return 0;
}
String factoryCode = "";
if(StringUtils.isNotBlank(qcCheckTaskUserList.get(0).getFactoryCode())){
DynamicDataSourceContextHolder.push("ds_"+qcCheckTaskUserList.get(0).getFactoryCode());
factoryCode= qcCheckTaskUserList.get(0).getFactoryCode();
}else{
//获取当前所选工厂
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String key = "#header.poolName";
factoryCode = request.getHeader(key.substring(8)).replace("ds_","");
}
//遍历赋值
Date nowTime = DateUtils.getNowDate();
for (QcCheckTaskUser qcCheckTaskUser : qcCheckTaskUserList){
@ -162,4 +165,6 @@ public class QcCheckTaskUserServiceImpl implements IQcCheckTaskUserService {
public QcCheckTaskUser selectQcCheckTaskUserByBelongTo(String belongTo) {
return qcCheckTaskUserMapper.selectQcCheckTaskUserByBelongTo(belongTo);
}
}

@ -118,17 +118,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by product_date desc
</select>
<select id="getProductWorkOrder" resultType="com.op.quality.domain.QcCheckTaskIncome">
select work_order orderNo,
product_name materialName,
product_code materialCode,
batch_number incomeBatchNo,
plan_quantity quality,
status,
create_time incomeTime
from wms_product_put
select wpp.work_order orderNo,
wpp.product_name materialName,
wpp.product_code materialCode,
wpp.batch_number incomeBatchNo,
wpp.plan_quantity quality,
wpp.unit_of_measure unit,
wpp.status,
wpp.create_time incomeTime,
mrw.workorder_code workorderCode
from wms_product_put wpp
left join mes_report_work mrw on wpp.work_order = mrw.report_code
where 1=1
<if test="orderNo != null">and work_order like concat like ('%',#{orderNo})</if>
order by create_time desc
<if test="orderNo != null">and wpp.work_order like concat like ('%',#{orderNo})</if>
order by wpp.create_time desc
</select>
<insert id="insertQcCheckUnqualified" parameterType="QcCheckUnqualified">
@ -203,6 +206,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateWorkOrderBatchStatus">
update pro_order_workorder_batch set qc_status = #{status} where batch_code = #{incomeBatchNo}
</update>
<update id="updatePutStatus">
update wms_product_put set check_status = #{status} where batch_number = #{incomeBatchNo}
</update>
<delete id="deleteQcCheckUnqualifiedById" parameterType="String">
delete from qc_check_unqualified where id = #{id}

Loading…
Cancel
Save