|
|
|
@ -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()));
|
|
|
|
|
// 料罐编码
|
|
|
|
|