|
@@ -15,7 +15,9 @@ import cn.ezhizao.framework.web.page.TableDataInfo;
|
|
|
import cn.ezhizao.project.business.domain.*;
|
|
|
import cn.ezhizao.project.business.service.*;
|
|
|
import cn.ezhizao.project.system.service.ISysDeptService;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import org.apache.poi.ss.formula.functions.T;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
@@ -73,6 +75,12 @@ public class BizTechnologicalAmendController extends BaseController {
|
|
|
@Resource
|
|
|
private IBizLotWasteService bizLotWasteService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private IBizTechnologicalWasteRecyclingService bizTechnologicalWasteRecyclingService;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private IBizTechnologicalWasteRecyclingDetailService bizTechnologicalWasteRecyclingDetailService;
|
|
|
+
|
|
|
@Resource
|
|
|
private IBizProductionPlanDetailSubDetailService bizProductionPlanDetailSubDetailService;
|
|
|
|
|
@@ -94,13 +102,30 @@ public class BizTechnologicalAmendController extends BaseController {
|
|
|
/**
|
|
|
* 查询工序数据
|
|
|
*/
|
|
|
- @PreAuthorize("@ss.hasPermi('business:amend:processList')")
|
|
|
@GetMapping("/processList")
|
|
|
public TableDataInfo processList(BizProcess process) throws NoSuchFieldException, IllegalAccessException {
|
|
|
+ startPage();
|
|
|
return getDataTable(bizProcessService.getList(process));
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 查询工序数据
|
|
|
+ */
|
|
|
+ @GetMapping("/standardProcess/{processId}")
|
|
|
+ public TableDataInfo standardProcess(@PathVariable("processId") Long processId) throws NoSuchFieldException, IllegalAccessException {
|
|
|
+ BizTechnologicalAmend amend = bizTechnologicalAmendService.getById(processId);
|
|
|
+
|
|
|
+ return getDataTable(bizTechnologicalProcessDetailService.getProcessDetailsByTechnicalProcessId(amend.getTechnologicalProcessId()));
|
|
|
+ }
|
|
|
|
|
|
+ /**
|
|
|
+ * 查询批次信息
|
|
|
+ *
|
|
|
+ * @param lotCode
|
|
|
+ * @return
|
|
|
+ * @throws NoSuchFieldException
|
|
|
+ * @throws IllegalAccessException
|
|
|
+ */
|
|
|
@GetMapping("/lotParticulars/{lotCode}")
|
|
|
public AjaxResult lotParticulars(@PathVariable("lotCode") String lotCode) throws NoSuchFieldException, IllegalAccessException {
|
|
|
//根据查询批次信息
|
|
@@ -112,7 +137,7 @@ public class BizTechnologicalAmendController extends BaseController {
|
|
|
throw new RuntimeException("批次信息异常!");
|
|
|
}
|
|
|
//查询批废
|
|
|
- BizLotWaste lotWaste= bizLotWasteService.query().eq("lot_id",lot.getId()).eq("deleted",0).one();
|
|
|
+ BizLotWaste lotWaste = bizLotWasteService.query().eq("lot_id", lot.getId()).eq("deleted", 0).one();
|
|
|
lot.setLotWaste(lotWaste);
|
|
|
//查询计划单信息
|
|
|
lot.setProductionPlanDetail(bizProductionPlanDetailService.getById(lot.getProductionPlanDetailId()));
|
|
@@ -143,7 +168,8 @@ public class BizTechnologicalAmendController extends BaseController {
|
|
|
//设置furnaceNoInfo
|
|
|
lot.setFurnaceNoInfo(bizFurnaceNoInfoService.getList(furnaceNoInfo).size() > 0 ? bizFurnaceNoInfoService.getList(furnaceNoInfo).get(0) : new BizFurnaceNoInfo());
|
|
|
lot.getProductionPlanDetail().setRequisitionDepartmentName(sysDeptService.selectDeptById(daywork.getDeptId()).getDeptName());
|
|
|
- lot = getLot(lot);
|
|
|
+ //查询工序信息
|
|
|
+ lot = selectProcess(lot);
|
|
|
|
|
|
return success(lot);
|
|
|
}
|
|
@@ -151,78 +177,133 @@ public class BizTechnologicalAmendController extends BaseController {
|
|
|
/**
|
|
|
* 查询工序信息
|
|
|
*/
|
|
|
- private BizLot getLot(BizLot lot) throws NoSuchFieldException, IllegalAccessException {
|
|
|
+ private BizLot selectProcess(BizLot lot) throws NoSuchFieldException, IllegalAccessException {
|
|
|
|
|
|
BizTechnologicalProcessDetail processDetail = new BizTechnologicalProcessDetail();
|
|
|
+ List<BizTechnologicalProcessDetail> processDetailList = new ArrayList<>();
|
|
|
|
|
|
//是否单批单改
|
|
|
if (lot.getIsAmend() == 1) {
|
|
|
-
|
|
|
+ //查询更改后的数据
|
|
|
+ BizTechnologicalAmendDetail amendDetail = new BizTechnologicalAmendDetail();
|
|
|
+ amendDetail.setTechnologicalAmendId(lot.getTechnologicalProcessId());
|
|
|
+ List<BizTechnologicalAmendDetail> amendDetailList = bizTechnologicalAmendDetailService.getList(amendDetail);
|
|
|
+
|
|
|
+ for (BizTechnologicalAmendDetail item : amendDetailList) {
|
|
|
+ BizTechnologicalProcessDetail process = new BizTechnologicalProcessDetail();
|
|
|
+ process.setProcessId(item.getProcessId());
|
|
|
+ process.setProcessStepNumber(item.getProcessStepNumber());
|
|
|
+ process.setProcessCode(item.getProcessCode());
|
|
|
+ process.setProcessAlias(item.getProcessAlias());
|
|
|
+ process.setProcessKey(item.getProcessKey());
|
|
|
+ process.setProductShaftCategory(item.getProductShaftCategory());
|
|
|
+ process.setProductShaftCategoryName(item.getProductShaftCategoryName());
|
|
|
+ process.setTechnologicalProcessId(item.getTechnologicalAmendId());
|
|
|
+ process.setProductId(item.getProductId());
|
|
|
+ process.setProductDescription(item.getProductDescription());
|
|
|
+ processDetailList.add(process);
|
|
|
+ }
|
|
|
} else if (lot.getIsWasteRecycling() == 1) { //是否废品回用
|
|
|
-
|
|
|
+ BizTechnologicalWasteRecyclingDetail wasteRecyclingDetail = new BizTechnologicalWasteRecyclingDetail();
|
|
|
+ wasteRecyclingDetail.setTechnologicalWasteRecyclingId(lot.getTechnologicalProcessId());
|
|
|
+ List<BizTechnologicalWasteRecyclingDetail> processList = bizTechnologicalWasteRecyclingDetailService.getList(wasteRecyclingDetail);
|
|
|
+
|
|
|
+ for (BizTechnologicalWasteRecyclingDetail item : processList) {
|
|
|
+ BizTechnologicalProcessDetail process = new BizTechnologicalProcessDetail();
|
|
|
+ process.setProcessId(item.getProcessId());
|
|
|
+ process.setProcessStepNumber(item.getProcessStepNumber());
|
|
|
+ process.setProcessCode(item.getProcessCode());
|
|
|
+ process.setProcessAlias(item.getProcessAlias());
|
|
|
+ process.setProcessKey(item.getProcessKey());
|
|
|
+ process.setProductShaftCategory(item.getProductShaftCategory());
|
|
|
+ process.setProductShaftCategoryName(item.getProductShaftCategoryName());
|
|
|
+ process.setTechnologicalProcessId(item.getTechnologicalWasteRecyclingId());
|
|
|
+ process.setProductId(item.getProductId());
|
|
|
+ process.setProductDescription(item.getProductDescription());
|
|
|
+ processDetailList.add(process);
|
|
|
+ }
|
|
|
} else {
|
|
|
//查询工序信息
|
|
|
processDetail.setTechnologicalProcessId(lot.getTechnologicalProcessId());
|
|
|
- List<BizTechnologicalProcessDetail> processDetailList = bizTechnologicalProcessDetailService.query().eq("technological_process_id", lot.getTechnologicalProcessId()).list();
|
|
|
- //查询报工信息
|
|
|
- BizDayworkItem item = new BizDayworkItem();
|
|
|
- item.setDayworkId(lot.getDaywork().getId());
|
|
|
- List<BizDayworkItem> dayworkItems = bizDayworkItemService.selectList(item);
|
|
|
-
|
|
|
- for (BizTechnologicalProcessDetail t : processDetailList) {
|
|
|
- //给备料赋值,备料没有废品,默认完成
|
|
|
- if (processDetailList.get(0).getProcessId().equals(t.getProcessId())) {
|
|
|
- t.setInvestNum(lot.getProductionQuantity());
|
|
|
- t.setAbandonNum(0);
|
|
|
- t.setQualifiedNum(lot.getProductionQuantity());
|
|
|
- t.setStatus("2");
|
|
|
+ processDetailList = bizTechnologicalProcessDetailService.getProcessDetailsByTechnicalProcessId(lot.getTechnologicalProcessId());
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ //查询报工信息
|
|
|
+ lot.setTechnologicalProcessDetailList(selectDayworkItem(processDetailList, lot));
|
|
|
+ return lot;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询报工信息
|
|
|
+ *
|
|
|
+ * @param processDetailList
|
|
|
+ * @param lot
|
|
|
+ */
|
|
|
+ private List<BizTechnologicalProcessDetail> selectDayworkItem(List<BizTechnologicalProcessDetail> processDetailList, BizLot lot) {
|
|
|
+ //查询报工信息
|
|
|
+ BizDayworkItem item = new BizDayworkItem();
|
|
|
+ item.setDayworkId(lot.getDaywork().getId());
|
|
|
+ List<BizDayworkItem> dayworkItems = bizDayworkItemService.selectList(item);
|
|
|
+
|
|
|
+ for (BizTechnologicalProcessDetail t : processDetailList) {
|
|
|
+ //给备料赋值,备料没有废品,默认完成
|
|
|
+ if (processDetailList.get(0).getProcessId().equals(t.getProcessId())) {
|
|
|
+ t.setInvestNum(lot.getProductionQuantity());
|
|
|
+ t.setAbandonNum(0);
|
|
|
+ t.setQualifiedNum(lot.getProductionQuantity());
|
|
|
+ t.setStatus("2");
|
|
|
+ }
|
|
|
+ for (BizDayworkItem d : dayworkItems) {
|
|
|
+
|
|
|
+ //如果是单批单改只查询FormDayworkItemId为0的数据
|
|
|
+ if (lot.getIsAmend() == 1 && d.getFormDayworkItemId() == 0) {
|
|
|
+ continue;
|
|
|
}
|
|
|
- for (BizDayworkItem d : dayworkItems) {
|
|
|
- //根据工序判断,查询每道工序的报工信息
|
|
|
- if (t.getProcessId().equals(d.getProcessId())) {
|
|
|
- //查询状态为完成货工序已完成的状态,计算合格量,废品,投入量
|
|
|
- if(d.getStatus().equals("2")||d.getStatus().equals("3")){
|
|
|
- if(d.getRejectNum()!=null){
|
|
|
- t.setAbandonNum(t.getAbandonNum()==null?d.getRejectNum():t.getAbandonNum() + d.getRejectNum());
|
|
|
- }else {
|
|
|
- t.setAbandonNum(0);
|
|
|
- }
|
|
|
- t.setQualifiedNum(t.getQualifiedNum()==null?d.getQualifiedNum():t.getQualifiedNum() + d.getQualifiedNum());
|
|
|
- t.setInvestNum(d.getProdNum());
|
|
|
- }
|
|
|
- //未开始时合格量默,废品默认为0
|
|
|
- if (d.getStatus().equals("0")) {
|
|
|
- t.setAbandonNum(0);
|
|
|
- t.setQualifiedNum(0);
|
|
|
- t.setInvestNum(d.getProdNum());
|
|
|
- //设置状态为未开始
|
|
|
- t.setStatus("0");
|
|
|
- } else if (d.getStatus().equals("1") || d.getStatus().equals("2")) {
|
|
|
- //设置状态为进行中
|
|
|
- t.setInvestNum(d.getProdNum());
|
|
|
- t.setStatus("1");
|
|
|
+
|
|
|
+ //根据工序判断,查询每道工序的报工信息
|
|
|
+ if (t.getProcessId().equals(d.getProcessId())) {
|
|
|
+ //查询状态为完成货工序已完成的状态,计算合格量,废品,投入量
|
|
|
+ if (d.getStatus().equals("2") || d.getStatus().equals("3")) {
|
|
|
+ if (d.getRejectNum() != null) {
|
|
|
+ t.setAbandonNum(t.getAbandonNum() == null ? d.getRejectNum() : t.getAbandonNum() + d.getRejectNum());
|
|
|
} else {
|
|
|
- //设置状态为已完成
|
|
|
- t.setStatus("2");
|
|
|
+ t.setAbandonNum(0);
|
|
|
}
|
|
|
- //设置当前批次状态,当第一道序(不包括备料)状态为未开始时批次状态为未开始
|
|
|
- if(processDetailList.get(1).getProcessId().equals(t.getProcessId())&&d.getStatus().equals("0")){
|
|
|
- lot.getDaywork().setStatus(0);
|
|
|
- } else if(processDetailList.get(processDetailList.size() - 1).getProcessId().equals(d.getProcessId())){
|
|
|
- //最后一道工序如果状态为不是"未开始,进行中,已完成"当前批次已完成
|
|
|
- if(!d.getStatus().equals("1")&&!d.getStatus().equals("2")&&!d.getStatus().equals("0")){
|
|
|
- lot.getDaywork().setStatus(2);
|
|
|
- }
|
|
|
- }else{
|
|
|
- //当前批次已完成
|
|
|
- lot.getDaywork().setStatus(1);
|
|
|
+ t.setQualifiedNum(t.getQualifiedNum() == null ? d.getQualifiedNum() : t.getQualifiedNum() + d.getQualifiedNum());
|
|
|
+ t.setInvestNum(d.getProdNum());
|
|
|
+ }
|
|
|
+ //未开始时合格量默,废品默认为0
|
|
|
+ if (d.getStatus().equals("0")) {
|
|
|
+ t.setAbandonNum(0);
|
|
|
+ t.setQualifiedNum(0);
|
|
|
+ t.setInvestNum(d.getProdNum());
|
|
|
+ //设置状态为未开始
|
|
|
+ t.setStatus("0");
|
|
|
+ } else if (d.getStatus().equals("1") || d.getStatus().equals("2")) {
|
|
|
+ //设置状态为进行中
|
|
|
+ t.setInvestNum(d.getProdNum());
|
|
|
+ t.setStatus("1");
|
|
|
+ } else {
|
|
|
+ //设置状态为已完成
|
|
|
+ t.setStatus("2");
|
|
|
+ }
|
|
|
+ //设置当前批次状态,当第一道序(不包括备料)状态为未开始时批次状态为未开始
|
|
|
+ if (processDetailList.get(1).getProcessId().equals(t.getProcessId()) && d.getStatus().equals("0")) {
|
|
|
+ lot.getDaywork().setStatus(0);
|
|
|
+ } else if (processDetailList.get(processDetailList.size() - 1).getProcessId().equals(d.getProcessId())) {
|
|
|
+ //最后一道工序如果状态为不是"未开始,进行中,已完成"当前批次已完成
|
|
|
+ if (!d.getStatus().equals("1") && !d.getStatus().equals("2") && !d.getStatus().equals("0")) {
|
|
|
+ lot.getDaywork().setStatus(2);
|
|
|
}
|
|
|
+ } else {
|
|
|
+ //当前批次进行中
|
|
|
+ lot.getDaywork().setStatus(1);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- lot.setTechnologicalProcessDetailList(processDetailList);
|
|
|
}
|
|
|
- return lot;
|
|
|
+ return processDetailList;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -244,17 +325,33 @@ public class BizTechnologicalAmendController extends BaseController {
|
|
|
@Log(title = "修改后工艺", businessType = BusinessType.INSERT)
|
|
|
@PostMapping("/addAmend/{lotId}")
|
|
|
@Transactional
|
|
|
- public AjaxResult addAmend(@PathVariable("lotId") Long lotId, @RequestBody List<BizProcess> processList) {
|
|
|
+ public AjaxResult addAmend(@PathVariable("lotId") Long lotId, @RequestBody List<BizTechnologicalProcessDetail> detailList) {
|
|
|
//根据id查询批次信息
|
|
|
BizLot lot = bizLotService.getById(lotId);
|
|
|
-
|
|
|
BizTechnologicalProcess technologicalProcess = new BizTechnologicalProcess();
|
|
|
+
|
|
|
+ int num = 0;//修改过的次数
|
|
|
+
|
|
|
//是否进行过单批单改
|
|
|
if (lot.getIsAmend() == 1) {
|
|
|
+ //查询单批单改信息
|
|
|
BizTechnologicalAmend technologicalAmend = bizTechnologicalAmendService.getById(lot.getTechnologicalProcessId());
|
|
|
+
|
|
|
+ //先将lot的工艺id设置为原始工艺id,为了给新改的原始工艺赋值
|
|
|
+ lot.setTechnologicalProcessId(technologicalAmend.getTechnologicalProcessId());
|
|
|
+ //查询修改过几次
|
|
|
+ List<BizTechnologicalAmend> list = bizTechnologicalAmendService.selectUpdateList(lot.getId());
|
|
|
+ num = list.size();
|
|
|
+ //设为停用
|
|
|
+ technologicalAmend.setIsStop(1);
|
|
|
+ bizTechnologicalAmendService.saveOrUpdate(technologicalAmend);
|
|
|
+ //查询原始工艺信息
|
|
|
technologicalProcess = bizTechnologicalProcessService.getById(technologicalAmend.getTechnologicalProcessId());
|
|
|
+ } else if (lot.getIsWasteRecycling() == 1) { //是否废品回用
|
|
|
+
|
|
|
} else {
|
|
|
- technologicalProcess = bizTechnologicalProcessService.getById(lot.getTechnologicalProcessId());
|
|
|
+ BizTechnologicalWasteRecycling wasteRecycling = bizTechnologicalWasteRecyclingService.getById(lot.getTechnologicalProcessId());
|
|
|
+ technologicalProcess = bizTechnologicalProcessService.getById(wasteRecycling.getTechnologicalProcessId());
|
|
|
}
|
|
|
|
|
|
//新增修改后工艺信息
|
|
@@ -265,6 +362,7 @@ public class BizTechnologicalAmendController extends BaseController {
|
|
|
amend.setProductionPlanId(lot.getProductionPlanId());
|
|
|
amend.setProductionPlanDetailId(lot.getProductionPlanDetailId());
|
|
|
amend.setProductId(lot.getProductId());
|
|
|
+ amend.setAmendmentVersions(num + 1);//设置版本号为修改次数+1
|
|
|
amend.setTechnologicalProcessId(lot.getTechnologicalProcessId());
|
|
|
amend.setTechnologyVersion(lot.getTechnologyVersion());
|
|
|
amend.setProductDrawingNumber(technologicalProcess.getProductDrawingNumber());
|
|
@@ -276,32 +374,88 @@ public class BizTechnologicalAmendController extends BaseController {
|
|
|
bizTechnologicalAmendService.save(amend);
|
|
|
|
|
|
List<BizTechnologicalAmendDetail> amendDetailList = new ArrayList<>();
|
|
|
- int num = 1100;//新增工序排序值
|
|
|
- //新增工序信息
|
|
|
- for (BizProcess process : processList) {
|
|
|
+
|
|
|
+ for (BizTechnologicalProcessDetail detail : detailList) {
|
|
|
BizTechnologicalAmendDetail amendDetail = new BizTechnologicalAmendDetail();
|
|
|
amendDetail.setTechnologicalAmendId(amend.getId());
|
|
|
amendDetail.setTenantId(amend.getTenantId());
|
|
|
amendDetail.setTechnologyVersion(amend.getTechnologyVersion());
|
|
|
amendDetail.setProductId(amend.getProductId());
|
|
|
amendDetail.setProductCode(amend.getProductCode());
|
|
|
- amendDetail.setProcessStepNumber(Integer.toString(num));
|
|
|
- amendDetail.setProcessId(process.getId());
|
|
|
- amendDetail.setProcessKey(process.getProcessKey());
|
|
|
- amendDetail.setProcessCode(process.getProcessCode());
|
|
|
- amendDetail.setProcessAlias(process.getProcessAlias());
|
|
|
+ amendDetail.setProcessStepNumber(detail.getProcessStepNumber());
|
|
|
+ amendDetail.setProcessId(detail.getProcessId());
|
|
|
+ amendDetail.setProcessKey(detail.getProcessKey());
|
|
|
+ amendDetail.setProcessCode(detail.getProcessCode());
|
|
|
+ amendDetail.setProcessAlias(detail.getProcessAlias());
|
|
|
amendDetail.setProductShaftCategory(amend.getProductShaftCategory());
|
|
|
amendDetail.setProductShaftCategoryName(amend.getProductShaftCategoryName());
|
|
|
amendDetail.setProductDescription(amend.getProductDescription());
|
|
|
amendDetailList.add(amendDetail);
|
|
|
}
|
|
|
|
|
|
+// 使用新方式,暂时注释
|
|
|
+// int num = 1100;//新增工序排序值
|
|
|
+// //新增工序信息
|
|
|
+// for (BizProcess process : processList) {
|
|
|
+// BizTechnologicalAmendDetail amendDetail = new BizTechnologicalAmendDetail();
|
|
|
+// amendDetail.setTechnologicalAmendId(amend.getId());
|
|
|
+// amendDetail.setTenantId(amend.getTenantId());
|
|
|
+// amendDetail.setTechnologyVersion(amend.getTechnologyVersion());
|
|
|
+// amendDetail.setProductId(amend.getProductId());
|
|
|
+// amendDetail.setProductCode(amend.getProductCode());
|
|
|
+// amendDetail.setProcessStepNumber(Integer.toString(num));
|
|
|
+// amendDetail.setProcessId(process.getId());
|
|
|
+// amendDetail.setProcessKey(process.getProcessKey());
|
|
|
+// amendDetail.setProcessCode(process.getProcessCode());
|
|
|
+// amendDetail.setProcessAlias(process.getProcessAlias());
|
|
|
+// amendDetail.setProductShaftCategory(amend.getProductShaftCategory());
|
|
|
+// amendDetail.setProductShaftCategoryName(amend.getProductShaftCategoryName());
|
|
|
+// amendDetail.setProductDescription(amend.getProductDescription());
|
|
|
+// amendDetailList.add(amendDetail);
|
|
|
+// }
|
|
|
+ updateDayworkItem(lotId, amend.getId());
|
|
|
+
|
|
|
//修改批次工艺信息
|
|
|
lot.setTechnologicalProcessId(amend.getId());
|
|
|
lot.setIsAmend(1);
|
|
|
return success(bizTechnologicalAmendDetailService.saveBatch(amendDetailList) && bizLotService.updateById(lot));
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 修改报工信息,将原先的报工信息复制出来
|
|
|
+ *
|
|
|
+ * @param lotId
|
|
|
+ */
|
|
|
+ private void updateDayworkItem(Long lotId, Long amendId) {
|
|
|
+ //查询Daywork数据
|
|
|
+ BizDaywork daywork = bizDayworkService.query().eq("lot_id", lotId).one();
|
|
|
+ if (daywork != null) {
|
|
|
+ //设置批次工艺信息
|
|
|
+ daywork.setTechnologicalProcessId(amendId);
|
|
|
+ //修改报工
|
|
|
+ bizDayworkService.saveOrUpdate(daywork);
|
|
|
+ //查询DayworkItem数据
|
|
|
+ List<BizDayworkItem> dayworkItemList = bizDayworkItemService.getList(new BizDayworkItem().setDayworkId(daywork.getId()));
|
|
|
+ //新增DayworkItem数据
|
|
|
+ List<BizDayworkItem> newDayworkItemList = new ArrayList<>();
|
|
|
+ for (BizDayworkItem dayworkItem : dayworkItemList) {
|
|
|
+ //查询工序信息
|
|
|
+ if (!dayworkItem.getStatus().equals("0")) {
|
|
|
+ BizDayworkItem newDayworkItem = dayworkItem;
|
|
|
+ newDayworkItem.setFormDayworkItemId(dayworkItem.getId());
|
|
|
+ newDayworkItem.setTechnologicalProcessId(amendId);
|
|
|
+ newDayworkItem.setId(null);
|
|
|
+ //新增报工信息
|
|
|
+ newDayworkItemList.add(newDayworkItem);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (newDayworkItemList.size() > 0) {
|
|
|
+ //插入报工信息
|
|
|
+ bizDayworkItemService.saveBatch(newDayworkItemList);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 获取修改后工艺详细信息
|
|
|
*/
|