Browse Source

[fix]

工程管理 bom信息
新增查询生产订单bom所有阶controller接口;
修改bom信息一阶对比方法中用量赋值语句类型为Integer;
dev
王晓迪 2 weeks ago
parent
commit
3ba4bec17a
  1. 23
      ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpBomController.java

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

Loading…
Cancel
Save