|
@@ -23,6 +23,7 @@ import org.jeecg.common.api.vo.Result;
|
|
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
|
|
import org.jeecg.common.exception.JeecgBootException;
|
|
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
|
+import org.jeecg.common.system.vo.DictModel;
|
|
|
import org.jeecg.common.system.vo.LoginUser;
|
|
|
import org.jeecg.common.util.DateUtils;
|
|
|
import org.jeecg.common.util.oConvertUtils;
|
|
@@ -38,6 +39,7 @@ import org.jeecg.modules.report.service.IFabricLossService;
|
|
|
import org.jeecg.modules.report.service.ISyFabricLossReportService;
|
|
|
import org.jeecg.modules.scas.entity.SyCostAllocationSummary;
|
|
|
import org.jeecg.modules.system.controller.CommonController;
|
|
|
+import org.jeecg.modules.system.service.impl.SysDictServiceImpl;
|
|
|
import org.jeecgframework.poi.excel.ExcelExportUtil;
|
|
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
|
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
|
@@ -93,6 +95,8 @@ public class SyCostAllocationController {
|
|
|
private IFabricLossService fabricLossService;
|
|
|
@Autowired
|
|
|
private FabricLossMapper fabricLossMapper;
|
|
|
+ @Autowired
|
|
|
+ private SysDictServiceImpl sysDictService;
|
|
|
|
|
|
/**
|
|
|
* 分页列表查询
|
|
@@ -131,6 +135,16 @@ public class SyCostAllocationController {
|
|
|
if (oConvertUtils.isEmpty(plannum)) {
|
|
|
throw new JeecgBootException("计划号不能为空!");
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ List<DictModel> dictModels=sysDictService.queryDictItemsByCode("Related_units");
|
|
|
+ List<String> strings=new ArrayList<>();
|
|
|
+ for (DictModel model : dictModels){
|
|
|
+ String account= model.getValue().split("-")[0];
|
|
|
+ String ccuscode= model.getValue().split("-")[1];
|
|
|
+ strings.add(ccuscode);
|
|
|
+ }
|
|
|
+
|
|
|
if(type.equals("query")){
|
|
|
// 销售订单附件
|
|
|
List<AccessorItem> accessorItemList = new ArrayList<>();
|
|
@@ -165,13 +179,13 @@ public class SyCostAllocationController {
|
|
|
syCostAllocation.setAccessorItemList(accessorItemList);
|
|
|
Result.OK(syCostAllocation);
|
|
|
}else {
|
|
|
- syCostAllocation=syCostAllocationService.queryByPlanNum(plannum,type);
|
|
|
+ syCostAllocation=syCostAllocationService.queryByPlanNum(plannum,type,strings);
|
|
|
if(syCostAllocation==null){
|
|
|
return result.error500("找不到对应计划单号!!!");
|
|
|
}
|
|
|
}
|
|
|
}else if(type.equals("queryNew")){
|
|
|
- syCostAllocation=syCostAllocationService.queryByPlanNum(plannum,type);
|
|
|
+ syCostAllocation=syCostAllocationService.queryByPlanNum(plannum,type,strings);
|
|
|
if(syCostAllocation==null){
|
|
|
return result.error500("找不到对应计划单号!!!");
|
|
|
}
|