|
@@ -1,5 +1,6 @@
|
|
|
package org.jeecg.modules.documents.costLossReview.controller;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import io.swagger.annotations.Api;
|
|
@@ -17,10 +18,13 @@ import org.jeecg.modules.documents.orderData.service.ISyOrderDataService;
|
|
|
import org.jeecg.modules.report.entity.FabricLoss;
|
|
|
import org.jeecg.modules.report.entity.SyFabricLossReport;
|
|
|
import org.jeecg.modules.report.service.ISyFabricLossReportService;
|
|
|
+import org.jeecg.modules.syPlanStatistics.entity.SyPlanStatistics;
|
|
|
+import org.jeecg.modules.syPlanStatistics.service.ISyPlanStatisticsService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
+import java.sql.Wrapper;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
@@ -32,6 +36,8 @@ import java.util.List;
|
|
|
public class SyCostLossReviewController extends JeecgController<SyOrderData, ISyOrderDataService> {
|
|
|
@Autowired
|
|
|
private ISyCostLossReviewService syCostLossReviewService;
|
|
|
+ @Autowired
|
|
|
+ private ISyPlanStatisticsService syPlanStatisticsService;
|
|
|
@Autowired
|
|
|
private ISyFabricLossReportService syFabricLossReportService;
|
|
|
|
|
@@ -52,7 +58,7 @@ public class SyCostLossReviewController extends JeecgController<SyOrderData, ISy
|
|
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
|
HttpServletRequest req) {
|
|
|
Page<SyCostLossReview> page = new Page<SyCostLossReview>(pageNo, pageSize);
|
|
|
- List<String> sumList = new ArrayList<>();
|
|
|
+ List<String> sumList = null;
|
|
|
if(syCostLossReview.getPlanNo()=="" || syCostLossReview.getPlanNo()==null){
|
|
|
if(syCostLossReview.getFstatus()!=null && syCostLossReview.getFstatus()!=""){
|
|
|
List<String> list= syCostLossReviewService.queryCodeByfstatus(syCostLossReview.getFstatus());
|
|
@@ -86,7 +92,7 @@ public class SyCostLossReviewController extends JeecgController<SyOrderData, ISy
|
|
|
syCostLossReview.setSumList(sumList);
|
|
|
}
|
|
|
|
|
|
- IPage<SyCostLossReview> pageList = syCostLossReviewService.querylist(syCostLossReview,page);
|
|
|
+ IPage<SyCostLossReview> pageList = syCostLossReviewService.querylist(syCostLossReview,sumList,page);
|
|
|
for (SyCostLossReview sy:pageList.getRecords()) {
|
|
|
//赋值制单人
|
|
|
List<String> list=syCostLossReviewService.queryMakerByplanNo(sy.getPlanNo());
|
|
@@ -121,6 +127,14 @@ public class SyCostLossReviewController extends JeecgController<SyOrderData, ISy
|
|
|
sy.setCstatus(c.getCstatus());
|
|
|
}
|
|
|
|
|
|
+ QueryWrapper wrapper = new QueryWrapper();
|
|
|
+ wrapper.eq("plan_num",sy.getPlanNo());
|
|
|
+ List<SyPlanStatistics> planStatistics =syPlanStatisticsService.list(wrapper);
|
|
|
+ if(planStatistics!=null && planStatistics.size()>0){
|
|
|
+ sy.setPlanMan(planStatistics.get(0).getPlanMan());
|
|
|
+ sy.setRemarks(planStatistics.get(0).getRemarks());
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
return Result.OK(pageList);
|
|
|
}
|