chen 2 yıl önce
ebeveyn
işleme
09db164d1e

+ 42 - 0
src/main/java/org/jeecg/modules/appInterface/controller/FbsWorkingStatisticsController.java

@@ -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);
 

+ 15 - 0
src/main/java/org/jeecg/modules/appInterface/entity/FbsWorkingStatistics.java

@@ -3,6 +3,8 @@ package org.jeecg.modules.appInterface.entity;
 import java.io.Serializable;
 import java.math.BigDecimal;
 import java.util.Date;
+import java.util.List;
+
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
@@ -213,4 +215,17 @@ public class FbsWorkingStatistics implements Serializable {
 	@TableField(exist = false)
 	private String workReportingActivities;//报工活动
 
+	@TableField(exist = false)
+	private BigDecimal latestCompletedQuantity;//派工单完成数量
+
+	@TableField(exist = false)
+	private String fbsWorkshopDispatchListState;//派工单状态
+
+	@TableField(exist = false)
+	private String sapState;//派工单sap状态
+
+	@TableField(exist = false)
+	private String isWorkState;//是否完工
+	@TableField(exist = false)
+	private List<String> stateList;
 }

+ 3 - 0
src/main/java/org/jeecg/modules/appInterface/mapper/xml/FbsWorkingStatisticsMapper.xml

@@ -231,6 +231,9 @@
             max( fws.final_time ) as finalTime,
             sum( fws.working_hours ) as workingHours,
             fwdl.number_of_tasks,
+            fwdl.latest_completed_quantity,
+            fwdl.state,
+            fwdl.sap_state,
             (fwdl.number_of_tasks * IFNULL( ftpi.standard_working_hours, 0 )) AS standardWorkingHoursProcess,
             ROUND((fwdl.number_of_tasks * IFNULL( ftpi.standard_working_hours, 0 ))/sum( fws.working_hours )*100,0) AS efficiency
         FROM

+ 1 - 1
src/main/resources/application.yml

@@ -1,6 +1,6 @@
 spring:
   profiles:
-    active: prodnew
+    active: test
   devtools:
     restart:
       enabled: true