工单删除

highway
wws 1 year ago
parent cf46950dbb
commit 6b7447c037

@ -840,7 +840,7 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
ProWetMaterialPlan plan = proWetMaterialPlanMapper.selectProWetMaterialPlanByWorkId(data.getWorkorderId()); ProWetMaterialPlan plan = proWetMaterialPlanMapper.selectProWetMaterialPlanByWorkId(data.getWorkorderId());
if (plan != null) { if (plan != null) {
if (plan.getSyncFlag().equals("Y")) { if (plan.getSyncFlag().equals("Y")) {
throw new ServiceException("工单下湿料计划已下发,不允许删除!"); throw new RuntimeException("工单下湿料计划已下发,不允许删除!");
} }
} }
} }
@ -858,7 +858,7 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
childOrder.setUpdateBy(SecurityContextHolder.getUserName()); childOrder.setUpdateBy(SecurityContextHolder.getUserName());
childOrder.setUpdateTime(DateUtils.getNowDate()); childOrder.setUpdateTime(DateUtils.getNowDate());
parentOrder.setQuantity(parentOrder.getQuantity()-data.getQuantitySplit()); // parentOrder.setQuantity(parentOrder.getQuantity()-data.getQuantitySplit());
parentOrder.setQuantitySplit(parentOrder.getQuantitySplit()-data.getQuantitySplit()); parentOrder.setQuantitySplit(parentOrder.getQuantitySplit()-data.getQuantitySplit());
parentOrder.setUpdateBy(SecurityContextHolder.getUserName()); parentOrder.setUpdateBy(SecurityContextHolder.getUserName());
parentOrder.setUpdateTime(DateUtils.getNowDate()); parentOrder.setUpdateTime(DateUtils.getNowDate());

@ -96,10 +96,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where equipment_type_code = 'equ_type_lg' and equipment_id = #{bucketId} where equipment_type_code = 'equ_type_lg' and equipment_id = #{bucketId}
</select> </select>
<select id="selectProWetMaterialPlanByWorkId" resultType="com.op.plan.domain.ProWetMaterialPlan"> <select id="selectProWetMaterialPlanByWorkId" resultMap="ProWetMaterialPlanResult">
select id, factory_code, plan_time, sync_flag, create_by, create_time, update_by, update_time, <include refid="selectProWetMaterialPlanVo"/>
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 id = (select TOP 1 wet_material_plan_id from pro_wet_material_plan_detail where id = (select TOP 1 wet_material_plan_id from pro_wet_material_plan_detail
where workorder_id = #{workorderId} and del_flag = '0') and sync_flag = 'Y' and del_flag = '0' where workorder_id = #{workorderId} and del_flag = '0') and sync_flag = 'Y' and del_flag = '0'
</select> </select>

Loading…
Cancel
Save