|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package com.op.plan.service.impl;
|
|
|
|
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
@ -112,8 +113,22 @@ public class ProWetMaterialPlanServiceImpl implements IProWetMaterialPlanService
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
@DS("#header.poolName")
|
|
|
|
|
public int deleteProWetMaterialPlanByIds(String[] ids) {
|
|
|
|
|
return proWetMaterialPlanMapper.deleteProWetMaterialPlanByIds(ids);
|
|
|
|
|
public AjaxResult deleteProWetMaterialPlanByIds(String[] ids) {
|
|
|
|
|
// 已下发计划不允许删除
|
|
|
|
|
for (String id : ids) {
|
|
|
|
|
ProWetMaterialPlan plan = proWetMaterialPlanMapper.selectProWetMaterialPlanById(id);
|
|
|
|
|
if (plan.getSyncFlag().equals("Y")){
|
|
|
|
|
SimpleDateFormat formatDate = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
return error("日期为"+formatDate.format(plan.getPlanTime())+"的计划已下发,不允许删除!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
for (String id : ids) {
|
|
|
|
|
// 删除主计划
|
|
|
|
|
proWetMaterialPlanMapper.deleteProWetMaterialPlanById(id);
|
|
|
|
|
// 删除计划详情
|
|
|
|
|
proWetMaterialPlanDetailMapper.deleteProWetMaterialPlanDetailByPlanId(id);
|
|
|
|
|
}
|
|
|
|
|
return success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|