湿料计划管理(修改init)

highway
wws 1 year ago
parent 605717dd11
commit a64043c4ce

@ -5,6 +5,7 @@ import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.op.mes.domain.ProOrderWorkorder; import com.op.mes.domain.ProOrderWorkorder;
import com.op.mes.domain.ProWetMaterialPlanDetail;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import com.op.common.log.annotation.Log; import com.op.common.log.annotation.Log;
@ -29,6 +30,17 @@ public class ProWetMaterialPlanController extends BaseController {
@Autowired @Autowired
private IProWetMaterialPlanService proWetMaterialPlanService; private IProWetMaterialPlanService proWetMaterialPlanService;
/**
* 湿-
*
* @param detailList
* @return
*/
@PutMapping("/updatePlanDetail")
public AjaxResult updateWetMaterialPlanDetail(@RequestBody List<ProWetMaterialPlanDetail> detailList) {
return proWetMaterialPlanService.updateWetMaterialPlanDetail(detailList);
}
/** /**
* id湿list * id湿list
* *

@ -6,6 +6,7 @@ import java.util.List;
import com.op.common.core.web.domain.AjaxResult; import com.op.common.core.web.domain.AjaxResult;
import com.op.mes.domain.ProOrderWorkorder; import com.op.mes.domain.ProOrderWorkorder;
import com.op.mes.domain.ProWetMaterialPlan; import com.op.mes.domain.ProWetMaterialPlan;
import com.op.mes.domain.ProWetMaterialPlanDetail;
/** /**
* 湿Service * 湿Service
@ -107,4 +108,12 @@ public interface IProWetMaterialPlanService {
* @return * @return
*/ */
AjaxResult getWetMaterialPlanDetailListById(String id); AjaxResult getWetMaterialPlanDetailListById(String id);
/**
* 湿-
*
* @param detailList
* @return
*/
AjaxResult updateWetMaterialPlanDetail(List<ProWetMaterialPlanDetail> detailList);
} }

@ -227,6 +227,33 @@ public class ProWetMaterialPlanServiceImpl implements IProWetMaterialPlanService
return success(detailList); return success(detailList);
} }
/**
* 湿-
*
* @param detailList
* @return
*/
@Override
@DS("#header.poolName")
@Transactional
public AjaxResult updateWetMaterialPlanDetail(List<ProWetMaterialPlanDetail> detailList) {
// 获取该计划详情下的主计划信息
ProWetMaterialPlan proWetMaterialPlan = proWetMaterialPlanMapper.selectProWetMaterialPlanById(detailList.get(0).getWetMaterialPlanId());
// 更新主计划信息
// 更新人
proWetMaterialPlan.setUpdateBy(SecurityContextHolder.getUserName());
// 更新时间
proWetMaterialPlan.setUpdateTime(DateUtils.getNowDate());
// 更新至数据库
proWetMaterialPlanMapper.updateProWetMaterialPlan(proWetMaterialPlan);
// 循环将详情信息更新至数据库
for (int i = 0; i < detailList.size(); i++) {
proWetMaterialPlanDetailMapper.updateProWetMaterialPlanDetail(detailList.get(i));
}
return success();
}
/** /**
* 湿 * 湿
* *

Loading…
Cancel
Save