湿料计划模块(计划修改逻辑-有计划已接料则主计划不可修改)、订单管理模块(工单产品类型未加入问题解决)

highway
wws 1 year ago
parent 7247067a17
commit a6acdae5c9

@ -30,6 +30,16 @@ public class ProWetMaterialPlanController extends BaseController {
@Autowired
private IProWetMaterialPlanService proWetMaterialPlanService;
/**
* id
* @param id
* @return
*/
@GetMapping("/checkChangePlan/{id}")
public AjaxResult checkChangePlan(@PathVariable("id") String id){
return proWetMaterialPlanService.checkChangePlan(id);
}
/**
* 湿-
*

@ -76,4 +76,11 @@ public interface ProWetMaterialPlanDetailMapper {
* @return
*/
ProWetMaterialPlanDetail selectProWetMaterialPlanDetailByWorkId(String id);
/**
* id湿list
* @param id
* @return
*/
List<ProWetMaterialPlanDetail> selectProWetMaterialPlanDetailByOrderId(String id);
}

@ -116,4 +116,12 @@ public interface IProWetMaterialPlanService {
* @return
*/
AjaxResult updateWetMaterialPlanDetail(List<ProWetMaterialPlanDetail> detailList);
/**
* id
*
* @param id
* @return
*/
AjaxResult checkChangePlan(String id);
}

@ -411,6 +411,8 @@ public class ProOrderServiceImpl implements IProOrderService {
proOrderWorkorder.setUnit(proOrder.getUnit());
// 已拆分数量
proOrderWorkorder.setQuantitySplit(Long.valueOf(proOrder.getAtrr1()));
// 设置工单产品类型
proOrderWorkorder.setProdType(proOrder.getOrderType());
return proOrderWorkorder;
}

@ -6,10 +6,8 @@ import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.common.core.context.SecurityContextHolder;
import com.op.common.core.utils.DateUtils;
import com.op.common.core.utils.uuid.IdUtils;
import com.op.common.core.utils.uuid.UUID;
import com.op.common.core.web.domain.AjaxResult;
import com.op.plan.domain.*;
import com.op.plan.mapper.ProOrderMapper;
import com.op.plan.mapper.ProOrderWorkorderMapper;
import com.op.plan.mapper.ProWetMaterialPlanDetailMapper;
import org.springframework.beans.factory.annotation.Autowired;
@ -251,6 +249,22 @@ public class ProWetMaterialPlanServiceImpl implements IProWetMaterialPlanService
return success();
}
/**
* id
*
* @param id
* @return
*/
@Override
@DS("#header.poolName")
public AjaxResult checkChangePlan(String id) {
List<ProWetMaterialPlanDetail> list = proWetMaterialPlanDetailMapper.selectProWetMaterialPlanDetailByOrderId(id);
if (list.size()>0){
return error(500,"计划已接料!不可修改!");
}
return success();
}
/**
* 湿
*
@ -275,8 +289,8 @@ public class ProWetMaterialPlanServiceImpl implements IProWetMaterialPlanService
//proWetMaterialPlan.setFactoryCode(proOrderWorkorder.getFactoryCode());
// 计划日期
proWetMaterialPlan.setPlanTime(proOrderWorkorder.getPlanTime());
// 同步状态(1已同步0未同步)
proWetMaterialPlan.setSyncFlag("0");
// 同步状态(Y已同步N未同步)
proWetMaterialPlan.setSyncFlag("N");
// 计划编码
proWetMaterialPlan.setProdCode("PC" + DateUtils.parseDateToStr(DateUtils.YYYYMMDDHHMMSSsss, DateUtils.getNowDate()));
// 创建主键id
@ -303,8 +317,8 @@ public class ProWetMaterialPlanServiceImpl implements IProWetMaterialPlanService
detail.setWetMaterialPlanId(id);
// 工单id
detail.setWorkorderId(workorder.getWorkorderId());
// 接料状态(1已接料0未接料)
detail.setStatus("0");
// 接料状态(Y已接料N未接料)
detail.setStatus("N");
// 料罐id
detail.setBucketId(String.valueOf(workorder.getBucketId()));
// 料罐编码

@ -77,6 +77,12 @@
where workorder_id = #{id}
</select>
<select id="selectProWetMaterialPlanDetailByOrderId"
resultType="com.op.plan.domain.ProWetMaterialPlanDetail">
<include refid="selectProWetMaterialPlanDetailVo"/>
where wet_material_plan_id = #{id} and status = 'Y'
</select>
<insert id="insertProWetMaterialPlanDetail" parameterType="ProWetMaterialPlanDetail">
insert into pro_wet_material_plan_detail
<trim prefix="(" suffix=")" suffixOverrides=",">

Loading…
Cancel
Save