|
@@ -28,6 +28,7 @@ import org.jeecg.modules.cost.entity.*;
|
|
import org.jeecg.modules.cost.service.*;
|
|
import org.jeecg.modules.cost.service.*;
|
|
import org.jeecg.modules.cost.vo.SyCostAllocationPage;
|
|
import org.jeecg.modules.cost.vo.SyCostAllocationPage;
|
|
import org.jeecg.modules.demo.test.entity.JoaDemo;
|
|
import org.jeecg.modules.demo.test.entity.JoaDemo;
|
|
|
|
+import org.jeecg.modules.report.entity.AccessorItem;
|
|
import org.jeecg.modules.report.entity.FabricLoss;
|
|
import org.jeecg.modules.report.entity.FabricLoss;
|
|
import org.jeecg.modules.report.entity.SyFabricLossReport;
|
|
import org.jeecg.modules.report.entity.SyFabricLossReport;
|
|
import org.jeecg.modules.report.mapper.FabricLossMapper;
|
|
import org.jeecg.modules.report.mapper.FabricLossMapper;
|
|
@@ -87,6 +88,8 @@ public class SyCostAllocationController {
|
|
CommonController commonController;
|
|
CommonController commonController;
|
|
@Autowired
|
|
@Autowired
|
|
private IFabricLossService fabricLossService;
|
|
private IFabricLossService fabricLossService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private FabricLossMapper fabricLossMapper;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 分页列表查询
|
|
* 分页列表查询
|
|
@@ -126,10 +129,18 @@ public class SyCostAllocationController {
|
|
throw new JeecgBootException("计划号不能为空!");
|
|
throw new JeecgBootException("计划号不能为空!");
|
|
}
|
|
}
|
|
if(type.equals("query")){
|
|
if(type.equals("query")){
|
|
|
|
+ // 销售订单附件
|
|
|
|
+ List<AccessorItem> accessorItemList = new ArrayList<>();
|
|
List<SyCostJson> list = syCostAllocationService.queryByCostJson(plannum,0,1);
|
|
List<SyCostJson> list = syCostAllocationService.queryByCostJson(plannum,0,1);
|
|
if(list.size()>0){
|
|
if(list.size()>0){
|
|
syCostAllocation = JSON.parseObject(JSON.toJSONString(list.get(0).getCostInfo()), SyCostAllocation.class);
|
|
syCostAllocation = JSON.parseObject(JSON.toJSONString(list.get(0).getCostInfo()), SyCostAllocation.class);
|
|
syCostAllocation.setAttachs(list.get(0).getAttachs());
|
|
syCostAllocation.setAttachs(list.get(0).getAttachs());
|
|
|
|
+
|
|
|
|
+ if (org.jeecg.modules.system.util.oConvertUtils.isNotEmpty(syCostAllocation.getGarmentContractno())) {
|
|
|
|
+ accessorItemList = fabricLossMapper.getSoAccList(Arrays.asList(syCostAllocation.getGarmentContractno().split(",")));
|
|
|
|
+ accessorItemList.forEach(e -> e.setFileurl("/report/FabricLoss/getFile?fileId=" + e.getCFileId() + "&filename=" + e.getFilename()));
|
|
|
|
+ }
|
|
|
|
+ syCostAllocation.setAccessorItemList(accessorItemList);
|
|
Result.OK(syCostAllocation);
|
|
Result.OK(syCostAllocation);
|
|
}else {
|
|
}else {
|
|
syCostAllocation=syCostAllocationService.queryByPlanNum(plannum,type);
|
|
syCostAllocation=syCostAllocationService.queryByPlanNum(plannum,type);
|