|
@@ -1210,6 +1210,11 @@ public class FbsWorkingStatisticsController {
|
|
|
if(StringUtils.isNotBlank(fbsTechnologicalProcessItemName)){
|
|
|
fbsWorkingStatistics.setFbsTechnologicalProcessItemName(null);
|
|
|
}
|
|
|
+ //多选状态
|
|
|
+ List<String> stateString=fbsWorkingStatistics.getStateList();
|
|
|
+ if(stateString!=null){
|
|
|
+ fbsWorkingStatistics.setStateList(null);
|
|
|
+ }
|
|
|
QueryWrapper<FbsWorkingStatistics> queryWrapper = QueryGenerator.initQueryWrapper(fbsWorkingStatistics, req.getParameterMap());
|
|
|
queryWrapper.eq("fws.del_flag","0");
|
|
|
queryWrapper.groupBy("fwdl.cost_item_code","fwdl.project_name","ftp.memo","fws.order_number","fws.materiel_code","fws.materiel_name","fws.fbs_technological_process_item_id","fws.fbs_technological_process_item_name");
|
|
@@ -1243,10 +1248,47 @@ public class FbsWorkingStatisticsController {
|
|
|
if(StringUtils.isNotBlank(orderNumber)){
|
|
|
queryWrapper.lambda().like(FbsWorkingStatistics::getOrderNumber,orderNumber);
|
|
|
}
|
|
|
+ if(stateString!=null){
|
|
|
+ queryWrapper.apply("(1=1 ");
|
|
|
+ int i=0;
|
|
|
+ for(String sta:stateString){
|
|
|
+ if(i>0){
|
|
|
+ queryWrapper.or();
|
|
|
+ }
|
|
|
+ if(sta.equals("0")||sta.equals("1")||sta.equals("2")){
|
|
|
+ queryWrapper.eq("fwdl.state",sta);
|
|
|
+ }
|
|
|
+ if(sta.equals("4")){
|
|
|
+ queryWrapper.eq("(fwdl.state","3");
|
|
|
+ queryWrapper.apply("fwdl.latest_completed_quantity <> fwdl.number_of_tasks)");
|
|
|
+ }
|
|
|
+ if(sta.equals("3")){
|
|
|
+ queryWrapper.eq("(fwdl.state","3");
|
|
|
+ queryWrapper.apply("fwdl.latest_completed_quantity = fwdl.number_of_tasks)");
|
|
|
+ }
|
|
|
+ i++;
|
|
|
+ }
|
|
|
+ queryWrapper.apply("1=1 )");
|
|
|
+ }
|
|
|
queryWrapper.orderByAsc("ftpi.sort");
|
|
|
Page<FbsWorkingStatistics> page = new Page<FbsWorkingStatistics>(pageNo, pageSize);
|
|
|
IPage<FbsWorkingStatistics> pageList = fbsWorkingStatisticsService.getEfficiencyReport(page, queryWrapper);
|
|
|
|
|
|
+ //获取工单完工情况
|
|
|
+// if(pageList.getRecords()!=null&&pageList.getRecords().size()>0){
|
|
|
+// for(FbsWorkingStatistics fbsWorkingStatistics1:pageList.getRecords()){
|
|
|
+// if(fbsWorkingStatistics1.getLatestCompletedQuantity()!=null){
|
|
|
+// if((fbsWorkingStatistics1.getNumberOfTasks().doubleValue()==fbsWorkingStatistics1.getLatestCompletedQuantity().doubleValue()&&fbsWorkingStatistics1.getFbsWorkshopDispatchListState().equals("3"))||fbsWorkingStatistics1.getSapState().equals("REL CNF")){
|
|
|
+// fbsWorkingStatistics1.setIsWorkState("已完工");
|
|
|
+// }else{
|
|
|
+// fbsWorkingStatistics1.setIsWorkState("未完工");
|
|
|
+// }
|
|
|
+// }else{
|
|
|
+// fbsWorkingStatistics1.setIsWorkState("未完工");
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+
|
|
|
result.setSuccess(true);
|
|
|
result.setResult(pageList);
|
|
|
|