浏览代码

Merge branch 'master' of http://101.36.160.140:21044/csc/csc-szls-business

shengyang000 3 年之前
父节点
当前提交
bc03d43fc6

+ 31 - 9
src/main/java/com/unissoft/mapper/ProcessAuditMapper.xml

@@ -45,15 +45,37 @@
45 45
     </select>
46 46
 
47 47
     <select id="getCurrentMonthData" resultType="com.unissoft.model.ProcessAudit">
48
-        SELECT
49
-        <include refid="Base_Column_List"/>
50
-        FROM
51
-        process_audit
52
-        WHERE
53
-        to_people is not null and
54
-        audit_state is not null and
55
-        end_date is not null and
56
-        DATE_FORMAT(`apply_time`, '%Y%m') = DATE_FORMAT(CURDATE(), '%Y%m')
48
+      SELECT
49
+	p.id,
50
+	p.main_id,
51
+	p.sub_id,
52
+	p.sub_data,
53
+	p.audit_state,
54
+	p.operation_time,
55
+	p.type,
56
+	p.house_id,
57
+	p.depot_id,
58
+	p.from_people,
59
+	p.to_people,
60
+	p.result,
61
+	p.apply_people,
62
+	p.audit_time,
63
+	p.process_id,
64
+	p.ongoing_step,
65
+	p.apply_time,
66
+	p.work_name,
67
+	p.start_date,
68
+	p.end_date,
69
+	p.to_page
70
+FROM
71
+	process_audit p
72
+LEFT JOIN basics_depot b ON p.depot_id = b.d_id
73
+WHERE
74
+	b.p_belonging = 0
75
+AND p.to_people IS NOT NULL
76
+AND p.audit_state IS NOT NULL
77
+AND p.end_date IS NOT NULL
78
+AND DATE_FORMAT(p.apply_time, '%Y%m') = DATE_FORMAT(CURDATE(), '%Y%m')
57 79
     </select>
58 80
 
59 81
 </mapper>

+ 15 - 12
src/main/java/com/unissoft/ventilation/service/impl/ProcessAuditServiceImpl.java

@@ -205,7 +205,7 @@ public class ProcessAuditServiceImpl extends ServiceImpl<ProcessAuditMapper, Pro
205 205
                 sysNoticeVO.setOrgName(userInfo.getDepotName());//申请人
206 206
                 sysNoticeVO.setApplyDept(userInfo.getDepartmentName());//申请部门
207 207
                 sysNoticeVO.setCreateBy(applyPeople);
208
-                sysNoticeVO.setContent(userInfo.getDepotName()+"-"+houseName+"-"+"审批");
208
+                sysNoticeVO.setContent(userInfo.getDepotName()+"-"+houseName+"-"+"审批");
209 209
             }
210 210
             sendNoticeVO.setSysNoticeVO(sysNoticeVO);
211 211
         }
@@ -518,8 +518,8 @@ public class ProcessAuditServiceImpl extends ServiceImpl<ProcessAuditMapper, Pro
518 518
                  /**
519 519
                   *  发送通知数据给下一审批人
520 520
                   */
521
-                 sysNoticeVO.setContent(userInfo.getDepotName()+"-"+houseName+"-"+"审批通过");
522
-                 sysNoticeVO.setNoticeType(30);//申请的时候推送  通知类型:10系统、20待办、30审批通过、40审批不通过、50警告
521
+                 sysNoticeVO.setContent(userInfo.getDepotName()+"-"+houseName+"-"+"审批");
522
+                 sysNoticeVO.setNoticeType(InformModel.TONGGUO.getcode());//申请的时候推送  通知类型:10系统、20待办、30审批通过、40审批不通过、50警告
523 523
                 //获取下一审批人的信息
524 524
                  ResponseEntity<String> userInfos1 = restTemplate.getForEntity(MyConstant.SYSTEM_USER + toPeople, String.class);
525 525
                  if(null != userInfos1 && null != userInfos1.getBody()){
@@ -528,8 +528,8 @@ public class ProcessAuditServiceImpl extends ServiceImpl<ProcessAuditMapper, Pro
528 528
                      users.put(toPeople, userInfo1.getuName());
529 529
                  }
530 530
              }else{//不通过 发送数据给申请人
531
-             	sysNoticeVO.setContent(userInfo.getDepotName()+"-"+houseName+"-"+"审批不通过");
532
-                 sysNoticeVO.setNoticeType(40);//申请的时候推送  通知类型:10系统、20待办、30审批通过、40审批不通过、50警告
531
+             	 sysNoticeVO.setContent(userInfo.getDepotName()+"-"+houseName+"-"+"审批不通过");
532
+                 sysNoticeVO.setNoticeType(InformModel.BUTONGGUO.getcode());//申请的时候推送  通知类型:10系统、20待办、30审批通过、40审批不通过、50警告
533 533
                  users.put(processAudit.getApplyPeople(), userInfo.getuName());
534 534
              }
535 535
          } else {
@@ -898,6 +898,15 @@ public class ProcessAuditServiceImpl extends ServiceImpl<ProcessAuditMapper, Pro
898 898
         Page<ProcessAudit> pageInfo = processAuditMapper.selectPage(page, ew);
899 899
         if (pageInfo.getTotal() > 0) {
900 900
             for (ProcessAudit processAudit : pageInfo.getRecords()) {
901
+            	//赋值最新的状态
902
+            	QueryWrapper<ProcessAudit> ew1 = new QueryWrapper<>();
903
+            	ew1.eq("process_id", processAudit.getProcessId());
904
+            	ew1.eq("result", 1);//第一条数据
905
+            	List<ProcessAudit> list = processAuditMapper.selectList(ew1);
906
+            	if(list.size()>0){
907
+            		processAudit.setAuditState(list.get(0).getAuditState());
908
+            	}
909
+            	
901 910
                 //根据仓房id获取仓房名称
902 911
             	if(null != processAudit.getHouseId()){
903 912
             		ResponseEntity<String> forEntity = restTemplate.getForEntity(MyConstant.SYSTEM_WAREHOUSE + processAudit.getHouseId(), String.class);
@@ -1289,7 +1298,7 @@ public class ProcessAuditServiceImpl extends ServiceImpl<ProcessAuditMapper, Pro
1289 1298
                  /**
1290 1299
                   *  发送通知数据给下一审批人
1291 1300
                   */
1292
-                 sysNoticeVO.setContent(userInfo.getDepotName()+"-"+houseName+"-"+"审批通过");
1301
+                 sysNoticeVO.setContent(userInfo.getDepotName()+"-"+houseName+"-"+"审批");
1293 1302
                  sysNoticeVO.setNoticeType(InformModel.TONGGUO.getcode());//申请的时候推送  通知类型:10系统、20待办、30审批通过、40审批不通过、50警告
1294 1303
                 //获取下一审批人的信息
1295 1304
                  ResponseEntity<String> userInfos1 = restTemplate.getForEntity(MyConstant.SYSTEM_USER + toPeople, String.class);
@@ -1513,12 +1522,6 @@ public class ProcessAuditServiceImpl extends ServiceImpl<ProcessAuditMapper, Pro
1513 1522
                        			}
1514 1523
                        		}else{
1515 1524
                        			item.setAuditState(audit.getAuditState());
1516
-                       			/*if(audit.getAuditState() == null){
1517
-                       				item.setAuditState(0);
1518
-                       			}else{
1519
-                       				
1520
-                       			}*/
1521
-                       			
1522 1525
                        		}
1523 1526
                				
1524 1527
                			}