|
|
@ -220,13 +220,40 @@ public class ProWetMaterialPlanServiceImpl implements IProWetMaterialPlanService
|
|
|
|
public AjaxResult getWetMaterialPlanDetailListById(String id) {
|
|
|
|
public AjaxResult getWetMaterialPlanDetailListById(String id) {
|
|
|
|
List<ProWetMaterialPlanDetail> detailList = proWetMaterialPlanDetailMapper.selectProWetMaterialPlanDetailListById(id);
|
|
|
|
List<ProWetMaterialPlanDetail> detailList = proWetMaterialPlanDetailMapper.selectProWetMaterialPlanDetailListById(id);
|
|
|
|
// 获取班次名称和料罐名称
|
|
|
|
// 获取班次名称和料罐名称
|
|
|
|
for (int i = 0;i < detailList.size();i++){
|
|
|
|
for (int i = 0; i < detailList.size(); i++) {
|
|
|
|
detailList.get(i).setShiftDesc(proWetMaterialPlanMapper.selectShiftById(String.valueOf(detailList.get(i).getShiftId())));
|
|
|
|
detailList.get(i).setShiftDesc(proWetMaterialPlanMapper.selectShiftById(String.valueOf(detailList.get(i).getShiftId())));
|
|
|
|
detailList.get(i).setBucketName(proWetMaterialPlanMapper.selectBucketNameById(detailList.get(i).getBucketId()));
|
|
|
|
detailList.get(i).setBucketName(proWetMaterialPlanMapper.selectBucketNameById(detailList.get(i).getBucketId()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
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();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 创建湿料(主)计划
|
|
|
|
* 创建湿料(主)计划
|
|
|
|
*
|
|
|
|
*
|
|
|
|