计划模块(成品订单导入)

highway
wws 1 year ago
parent 1a5a014965
commit 2d6950544f

@ -102,4 +102,11 @@ public interface ProWetMaterialPlanDetailMapper {
* @param workorderId
*/
void deleteProWetMaterialPlanDetailByWorkId(String workorderId);
/**
* 湿wetMaterialPlanId湿
* @param wetMaterialPlanId
* @return
*/
ProWetMaterialPlan selectProWetMaterialPlanById(String wetMaterialPlanId);
}

@ -417,32 +417,21 @@ public class ProOrderServiceImpl implements IProOrderService {
for (int i = 0; i < orderList.size(); i++) {
// 当前行操作
boolean checkOnly = false;
boolean checkPlan = false;
List<ProOrderWorkorder> workOrderList = proOrderWorkorderMapper.selectWorkOrderByOrderCode(orderList.get(i).getOrderCode());
// 遍历查询工单是否已下达-下达则不允许编辑更新
for (ProOrderWorkorder workOrder : workOrderList) {
// 如果工单已经下达
if (!workOrder.getStatus().equals("w0")) {
// 如果工单已生产
if (!(workOrder.getStatus().equals("w0") || workOrder.getStatus().equals("w1"))) {
checkEdit = true;
checkOnly = true;
}
// 如果工单已有湿料计划
ProWetMaterialPlanDetail detail = proWetMaterialPlanDetailMapper.selectProWetMaterialPlanDetailByWorkId(workOrder.getWorkorderId());
if (detail != null){
checkEdit = true;
checkPlan = true;
}
}
// 组装工单已下达反馈信息
if (checkOnly) {
errMsg.append("第" + (i + 1) + "行:" + "订单号为:" + orderList.get(i).getOrderCode() + ",该订单下工单已派工,不允许更新;" + "<br/>");
}
// 组装已有湿料计划反馈信息
if (checkPlan) {
errMsg.append("第" + (i + 1) + "行:" + "订单号为:" + orderList.get(i).getOrderCode() + ",该订单下工单已有湿料计划,不允许更新;" + "<br/>");
errMsg.append("第" + (i + 1) + "行:" + "订单号为:" + orderList.get(i).getOrderCode() + ",该订单下工单已生产,不允许更新;" + "<br/>");
}
}

@ -109,6 +109,13 @@
where workorder_id = #{id}
</select>
<select id="selectProWetMaterialPlanById" resultType="com.op.plan.domain.ProWetMaterialPlan">
select id, factory_code, plan_time, sync_flag, create_by, create_time, update_by, update_time,
order_type, prod_code, prod_desc, prod_source, quantity, unit, atrr1, atrr2, atrr3, status,
prod_type, plan_code, shift_id, shift_desc from pro_wet_material_plan
where wet_material_plan_id = #{wetMaterialPlanId}
</select>
<insert id="insertProWetMaterialPlanDetail" parameterType="ProWetMaterialPlanDetail">
insert into pro_wet_material_plan_detail
<trim prefix="(" suffix=")" suffixOverrides=",">

Loading…
Cancel
Save