Min 10 months ago
parent
commit
d355e95814

+ 5 - 3
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/controller/WxCorpInfoController.java

@@ -366,9 +366,11 @@ public class WxCorpInfoController {
                     }
                     if(title.getJSONObject(0).getString("text").contains("单价")){
                         if(control.equals("Number")){
-                            Double new_money = value.getDouble("new_number");
-                            plan.setMoneyOfJob(new BigDecimal(new_money));
-                            price=new BigDecimal(new_money);
+                            if(!value.getString("new_number").equals("")){
+                                Double new_money = value.getDouble("new_number");
+                                plan.setMoneyOfJob(new BigDecimal(new_money==null?0:new_money));
+                                price=new BigDecimal(new_money);
+                            }
                         }
                     }
                     if(title.getJSONObject(0).getString("text").contains("结算总额")){

+ 5 - 3
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/task/TimingTask.java

@@ -507,9 +507,11 @@ public class TimingTask {
                     }
                     if(title.getJSONObject(0).getString("text").contains("单价")){
                         if(control.equals("Number")){
-                            Double new_money = value.getDouble("new_number");
-                            plan.setMoneyOfJob(new BigDecimal(new_money));
-                            price=new BigDecimal(new_money);
+                            if(!value.getString("new_number").equals("")){
+                                Double new_money = value.getDouble("new_number");
+                                plan.setMoneyOfJob(new BigDecimal(new_money==null?0:new_money));
+                                price=new BigDecimal(new_money);
+                            }
                         }
                     }
                     if(title.getJSONObject(0).getString("text").contains("结算总额")){

+ 5 - 3
fhKeeper/formulahousekeeper/management-workshop/src/main/resources/mapper/ReportMapper.xml

@@ -244,16 +244,17 @@
     </select>
 
     <select id="getPersonWorkHoursWagesWithNotReport" resultType="java.util.Map">
-        select ppt.total_progress AS progress,DATE_FORMAT(r.create_date,'%Y%m%d') AS createDate,pp.name AS procedureName,(CASE  WHEN pp.check_type=0 THEN '自检' WHEN pp.check_type=1 THEN '互检' ELSE '专检' END) AS checkType,
+        select ppt.total_progress AS progress,pp.name AS procedureName,(CASE  WHEN pp.check_type=0 THEN '自检' WHEN pp.check_type=1 THEN '互检' ELSE '专检' END) AS checkType,
         p.name AS productName,DATE_FORMAT(plan.start_date,'%Y%m%d') AS planStartDate,DATE_FORMAT(plan.end_date,'%Y%m%d') AS planEndDate ,
         plan.task_change_notice_num AS taskName,plan.plan_type AS planType,plan.product_scheduling_num
         FROM prod_procedure_team ppt2
         LEFT JOIN plan_procedure_total ppt ON ppt.id=ppt2.plan_procedure_id
         LEFT JOIN plan ON plan.id=ppt.plan_id
-        LEFT JOIN report r ON r.user_procedure_team_id=ppt2.id
+        LEFT JOIN (SELECT SUM(working_time) AS sumReport,user_procedure_team_id,create_date FROM report GROUP BY user_procedure_team_id,create_date) AS r ON r.user_procedure_team_id=ppt2.id  AND r.create_date=ppt2.distribute_date
         LEFT JOIN prod_procedure pp ON ppt.prod_procedure_id=pp.id
         LEFT JOIN product p ON p.id=plan.product_id
-        WHERE ppt2.company_id=#{companyId} and r.id is null
+        WHERE ppt2.company_id=#{companyId}
+        AND r.sumReport &lt; ppt2.work_time
         <if test="date!=null and date!=''">
             and ppt2.distribute_date=#{date}
         </if>
@@ -270,6 +271,7 @@
         <if test="startDate!=null and endDate!=null">
             and ppt2.distribute_date between #{startDate} and #{endDate}
         </if>
+        GROUP BY ppt2.id
     </select>
 
     <select id="getPersonWorkHoursWagesWithHasReport" resultType="java.util.Map">