Sfoglia il codice sorgente

Merge branch 'master' of http://47.100.37.243:10080/wutt/manHourHousekeeper

ggooalice 2 anni fa
parent
commit
e93b7293a5

+ 7 - 6
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/DepartmentServiceImpl.java

@@ -417,14 +417,14 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
             resultMap.put("totalCostMoney", totalCostMoney);
             resultMap.put("costList", list);
             if(functionCostList.size()==0){
-                resultMap.put("totalCostMoney",null);
+                resultMap.put("totalCostMoney",new BigDecimal(0));
                 list.forEach(li->{
-                    li.setCostMoney(null);
+                    li.setCostMoney(new BigDecimal(0));
                 });
             }
             if(functionTimeList.size()==0){
                 list.forEach(li->{
-                    li.setCostTime(null);
+                    li.setCostTime(0.0);
                 });
             }
             httpRespMsg.data = resultMap;
@@ -530,11 +530,11 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
             finalMap.put("list", finalList);
             finalMap.put("userList", userList);
             if(functionCostList.size()==0){
-                finalMap.put("totalCostMoney",null);
+                finalMap.put("totalCostMoney",new BigDecimal(0));
                 finalList.forEach(li->{
                     List<Map<String,Object>> mapList= (List<Map<String, Object>>) li.get("project");
                     mapList.forEach(ml->{
-                        ml.put("money",null);
+                        ml.put("money",0);
                     });
                 });
             }
@@ -542,7 +542,7 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
                 finalList.forEach(li->{
                     List<Map<String,Object>> mapList= (List<Map<String, Object>>) li.get("project");
                     mapList.forEach(ml->{
-                        ml.put("time",null);
+                        ml.put("time",0);
                     });
                 });
             }
@@ -1003,6 +1003,7 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
             String resp = ExcelUtil.exportGeneralExcelByTitleAndList(fileName , dataList, path);
             httpRespMsg.data = resp;
         } catch (NullPointerException e) {
+            e.printStackTrace();
             httpRespMsg.setError("验证失败");
             return httpRespMsg;
         }

+ 21 - 21
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java

@@ -1085,14 +1085,14 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 resultMap.put("costList", retList);
                 resultMap.put("totalMoneyCost", totalMoneyCost);
                 if(functionCostList.size()==0){
-                    resultMap.put("totalCostMoney",null);
+                    resultMap.put("totalCostMoney",new BigDecimal(0));
                     list.forEach(li->{
-                        li.put("costMoney",null);
+                        li.put("costMoney",new BigDecimal(0));
                     });
                 }
                 if(functionTimeList.size()==0){
                     retList.forEach(li->{
-                        li.put("cost",null);
+                        li.put("cost",0.0);
                     });
                 }
                 httpRespMsg.data = resultMap;
@@ -1114,14 +1114,14 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 resultMap.put("costList", list);
                 resultMap.put("totalMoneyCost", totalMoneyCost);
                 if(functionCostList.size()==0){
-                    resultMap.put("totalCostMoney",null);
+                    resultMap.put("totalCostMoney",new BigDecimal(0));
                     list.forEach(li->{
-                        li.put("costMoney",null);
+                        li.put("costMoney",new BigDecimal(0));
                     });
                 }
                 if(functionTimeList.size()==0){
                     list.forEach(li->{
-                        li.put("cost",null);
+                        li.put("cost",0.0);
                     });
                 }
                 httpRespMsg.data = resultMap;
@@ -4760,14 +4760,14 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 resultMap.put("costList", retList);
                 resultMap.put("totalMoneyCost", totalMoneyCost);
                 if(functionCostList.size()==0){
-                    resultMap.put("totalCostMoney",null);
+                    resultMap.put("totalCostMoney",new BigDecimal(0));
                     retList.forEach(li->{
-                        li.put("costMoney",null);
+                        li.put("costMoney",new BigDecimal(0));
                     });
                 }
                 if(functionTimeList.size()==0){
                     retList.forEach(li->{
-                        li.put("cost",null);
+                        li.put("cost",0.0);
                     });
                 }
                 httpRespMsg.data = resultMap;
@@ -4789,14 +4789,14 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 resultMap.put("costList", list);
                 resultMap.put("totalMoneyCost", totalMoneyCost);
                 if(functionCostList.size()==0){
-                    resultMap.put("totalCostMoney",null);
+                    resultMap.put("totalCostMoney",new BigDecimal(0));
                     list.forEach(li->{
-                        li.put("costMoney",null);
+                        li.put("costMoney",new BigDecimal(0));
                     });
                 }
                 if(functionTimeList.size()==0){
                     list.forEach(li->{
-                        li.put("cost",null);
+                        li.put("cost",0.0);
                     });
                 }
                 httpRespMsg.data = resultMap;
@@ -5558,14 +5558,14 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 resultMap.put("costList", retList);
                 resultMap.put("totalMoneyCost", totalMoneyCost);
                 if(functionCostList.size()==0){
-                    resultMap.put("totalCostMoney",null);
+                    resultMap.put("totalCostMoney",new BigDecimal(0));
                     list.forEach(li->{
-                        li.put("costMoney",null);
+                        li.put("costMoney",new BigDecimal(0));
                     });
                 }
                 if(functionTimeList.size()==0){
                     retList.forEach(li->{
-                        li.put("cost",null);
+                        li.put("cost",0.0);
                     });
                 }
                 httpRespMsg.data = resultMap;
@@ -5587,14 +5587,14 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 resultMap.put("costList", list);
                 resultMap.put("totalMoneyCost", totalMoneyCost);
                 if(functionCostList.size()==0){
-                    resultMap.put("totalCostMoney",null);
+                    resultMap.put("totalCostMoney",new BigDecimal(0));
                     list.forEach(li->{
-                        li.put("costMoney",null);
+                        li.put("costMoney",new BigDecimal(0));
                     });
                 }
                 if(functionTimeList.size()==0){
                     list.forEach(li->{
-                        li.put("cost",null);
+                        li.put("cost",0.0);
                     });
                 }
                 httpRespMsg.data = resultMap;
@@ -5891,11 +5891,11 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         finalMap.put("totalCostMoney", totalCostMoney);
         finalMap.put("list", list);
         if(functionCostList.size()==0){
-            finalMap.put("totalCostMoney",null);
+            finalMap.put("totalCostMoney",new BigDecimal(0));
             list.forEach(li->{
                 List<Map<String,Object>> mapList= (List<Map<String, Object>>) li.get("name");
                 mapList.forEach(ml->{
-                    ml.put("costMoney",null);
+                    ml.put("costMoney",new BigDecimal(0));
                 });
             });
         }
@@ -5903,7 +5903,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             list.forEach(li->{
                 List<Map<String,Object>> mapList= (List<Map<String, Object>>) li.get("name");
                 mapList.forEach(ml->{
-                    ml.put("cost",null);
+                    ml.put("cost",0.0);
                 });
             });
         }

+ 2 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ProjectMapper.xml

@@ -824,14 +824,14 @@
                 select us.name as userName,dp2.department_name as departmentName,COUNT(rp.state=0 or null) as num
                 from department dp
                 left join user us on dp.manager_id=us.id
-                left join report rp on rp.audit_deptid=us.manage_dept_id and rp.create_date between #{startDate} and #{endDate} and rp.audit_deptid !=0
+                left join report rp on rp.audit_deptid=us.manage_dept_id and rp.create_date between #{startDate} and #{endDate} and rp.audit_deptid !=0 and rp.is_dept_audit=1
                 left join department dp2 on dp2.department_id=dp.department_id
             </when>
             <otherwise>
                 select us.name as userName,dp.department_name as departmentName,COUNT(rp.state=0 or null) as num
                 from project_auditor pa
                 left join user us on pa.auditor_id=us.id
-                left join report rp on rp.project_auditor_id=us.id and pa.project_id=rp.project_id and rp.create_date between #{startDate} and #{endDate}
+                left join report rp on rp.project_auditor_id=us.id and pa.project_id=rp.project_id and rp.create_date between #{startDate} and #{endDate} and rp.is_dept_audit=0
                 left join department dp on dp.department_id=us.department_id
             </otherwise>
         </choose>

+ 8 - 1
fhKeeper/formulahousekeeper/timesheet_h5/public/index.html

@@ -36,9 +36,16 @@
             return flag;
         }
         var urls = window.location.href
-        console.log(urls, '当前的页面地址')
+
+        // 尝试定向回去, 不行要删除
+        if(urls.indexOf('jsapi/init') != '-1') {
+            location.href = urls.split('jsapi/init')[0]
+        }
+        // 尝试定向回去, 不行要删除
+
         var flag = IsPC(); //true为PC端,false为手机端
         if(flag) {
+            console.log('触发')
             // 当前地址为工时管家移动端就跳转到工时管家官网
             if(urls.indexOf('mobworktime.ttkuaiban') != '-1') {
                 location.href = 'https://worktime.ttkuaiban.com';