计划模块(工单管理湿料检验+打印功能字段显示BUG解决)

highway
wws 1 year ago
parent 73ed0f121c
commit 38f48e54bc

@ -123,4 +123,10 @@ public interface ProWetMaterialPlanMapper {
*/ */
String selectBucketNameById(String bucketId); String selectBucketNameById(String bucketId);
/**
* id湿
* @param workorderId
* @return
*/
ProWetMaterialPlan selectProWetMaterialPlanByWorkId(String workorderId);
} }

@ -55,6 +55,8 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
private ProWetMaterialPlanDetailMapper proWetMaterialPlanDetailMapper; private ProWetMaterialPlanDetailMapper proWetMaterialPlanDetailMapper;
@Autowired @Autowired
private RemoteSapService remoteSapService; private RemoteSapService remoteSapService;
@Autowired
private ProWetMaterialPlanMapper proWetMaterialPlanMapper;
/** /**
* *
@ -697,6 +699,13 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
if (!(proOrderWorkorder.getStatus().equals("w0") || proOrderWorkorder.getStatus().equals("w1"))) { if (!(proOrderWorkorder.getStatus().equals("w0") || proOrderWorkorder.getStatus().equals("w1"))) {
return error("工单已生产,不可变更!"); return error("工单已生产,不可变更!");
} }
// 白坯工单所在湿料计划下发不允许变更
if (proOrderWorkorder.getProdType().equals("white")) {
ProWetMaterialPlan plan = proWetMaterialPlanMapper.selectProWetMaterialPlanByWorkId(proOrderWorkorder.getWorkorderId());
if (plan != null) {
return error("工单所在湿料计划已下发,不允许变更!");
}
}
return success(); return success();
} }
@ -726,6 +735,7 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
List<ProOrderWorkorder> proOrderWorkorderList = new ArrayList<ProOrderWorkorder>(); List<ProOrderWorkorder> proOrderWorkorderList = new ArrayList<ProOrderWorkorder>();
// 查询该工单信息 // 查询该工单信息
ProOrderWorkorder proOrderWorkorder = proOrderWorkorderMapper.selectWorkOrderByCode(code); ProOrderWorkorder proOrderWorkorder = proOrderWorkorderMapper.selectWorkOrderByCode(code);
formatProOrderWorkorder(proOrderWorkorder);
proOrderWorkorderList.add(proOrderWorkorder); proOrderWorkorderList.add(proOrderWorkorder);
boolean flag = true; boolean flag = true;
@ -736,6 +746,7 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
while (flag) { while (flag) {
ProOrderWorkorder workorder = proOrderWorkorderMapper.selectWorkOrderByCode(tempCode.toString()); ProOrderWorkorder workorder = proOrderWorkorderMapper.selectWorkOrderByCode(tempCode.toString());
if (workorder != null) { if (workorder != null) {
formatProOrderWorkorder(workorder);
proOrderWorkorderList.add(workorder); proOrderWorkorderList.add(workorder);
tempCode.setLength(0); tempCode.setLength(0);
tempCode.append(workorder.getParentOrder()); tempCode.append(workorder.getParentOrder());

@ -92,6 +92,14 @@ 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, 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 id = (select wet_material_plan_id from pro_wet_material_plan_detail
where workorder_id = #{workorderId}) and sync_flag = 'Y'
</select>
<insert id="insertProWetMaterialPlan" parameterType="ProWetMaterialPlan"> <insert id="insertProWetMaterialPlan" parameterType="ProWetMaterialPlan">
insert into pro_wet_material_plan insert into pro_wet_material_plan
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">

Loading…
Cancel
Save