From 3ba4bec17a14724ca4c8034235c6d8a87b56db02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=99=93=E8=BF=AA?= <2596750866@qq.com> Date: Fri, 15 Nov 2024 09:51:36 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=20=E5=B7=A5=E7=A8=8B=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?bom=E4=BF=A1=E6=81=AF=20=E6=96=B0=E5=A2=9E=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E7=94=9F=E4=BA=A7=E8=AE=A2=E5=8D=95bom=E6=89=80=E6=9C=89?= =?UTF-8?q?=E9=98=B6controller=E6=8E=A5=E5=8F=A3=EF=BC=9B=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9bom=E4=BF=A1=E6=81=AF=E4=B8=80=E9=98=B6=E5=AF=B9?= =?UTF-8?q?=E6=AF=94=E6=96=B9=E6=B3=95=E4=B8=AD=E7=94=A8=E9=87=8F=E8=B5=8B?= =?UTF-8?q?=E5=80=BC=E8=AF=AD=E5=8F=A5=E7=B1=BB=E5=9E=8B=E4=B8=BAInteger?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../erp/controller/ErpBomController.java | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) 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)){