diff --git a/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpBomController.java b/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpBomController.java index 215cdb14..2abf2cee 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpBomController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpBomController.java @@ -13,6 +13,7 @@ import com.ruoyi.erp.domain.*; import com.ruoyi.erp.service.IErpBomService; import com.ruoyi.process.general.service.IProcessService; import com.ruoyi.system.service.ISysRoleService; +import io.swagger.models.auth.In; import org.activiti.engine.RuntimeService; import org.activiti.engine.TaskService; import org.activiti.engine.runtime.ProcessInstance; @@ -23,6 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; +import org.springframework.transaction.annotation.Transactional; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; @@ -142,7 +144,18 @@ public class ErpBomController extends BaseController return getDataTable(list); } - + /** + * 查询生产订单bom所有阶列表 + */ + @Transactional(rollbackFor = Exception.class) + @PostMapping("/makeOrderAllList") + @ResponseBody + public TableDataInfo makeOrderAllList(@RequestBody String[] materialNos) + { + startPage(); + List list = erpBomService.selectMakeOrderErpBomAllLevelList(materialNos); + return getDataTable(list); + } /** * 导出bom列表 @@ -442,15 +455,15 @@ public class ErpBomController extends BaseController List bom1list = new ArrayList<>(); List bom2list = new ArrayList<>(); for (ErpBom erpBom3:list){ - Double useNum1 = erpBom3.getUseNum(); + Integer useNum1 = erpBom3.getUseNum(); if (useNum1==null){ - useNum1 = 0.00; + useNum1 = 0; } String bom1 = erpBom3.getMaterialNo()+"-"+erpBom3.getMaterialName()+"-"+ useNum1; for (ErpBom erpBom4:list1){ - Double useNum2 = erpBom4.getUseNum(); + Integer useNum2 = erpBom4.getUseNum(); if (useNum2==null){ - useNum2 = 0.00; + useNum2 = 0; } String bom2 = erpBom4.getMaterialNo()+"-"+erpBom4.getMaterialName()+"-"+ useNum2; if (bom1.equals(bom2)){