|
|
@@ -1,38 +1,21 @@
|
|
1
|
1
|
package com.unissoft.ventilation.service.impl;
|
|
2
|
2
|
|
|
3
|
3
|
import com.alibaba.fastjson.JSON;
|
|
4
|
|
-import com.unissoft.model.BasicsWarehouse;
|
|
5
|
|
-import com.unissoft.model.ProcessAudit;
|
|
6
|
|
-import com.unissoft.model.ProcessBasis;
|
|
7
|
|
-import com.unissoft.model.ProcessBasisSon;
|
|
8
|
|
-import com.unissoft.model.ProcessMain;
|
|
9
|
|
-import com.unissoft.model.ProcessSub;
|
|
10
|
|
-import com.unissoft.model.SysUserPO;
|
|
11
|
|
-import com.unissoft.result.PageParam;
|
|
12
|
|
-import com.unissoft.MyConstant;
|
|
13
|
|
-import com.unissoft.dto.ProcessToBeDone;
|
|
14
|
|
-import com.unissoft.mapper.ProcessAuditMapper;
|
|
15
|
|
-import com.unissoft.mapper.ProcessBasisMapper;
|
|
16
|
|
-import com.unissoft.mapper.ProcessBasisSonMapper;
|
|
17
|
|
-import com.unissoft.mapper.ProcessMainMapper;
|
|
18
|
|
-import com.unissoft.mapper.ProcessSubMapper;
|
|
19
|
|
-import com.unissoft.ventilation.service.ProcessAuditService;
|
|
20
|
|
-import com.unissoft.ventilation.service.ProcessBasisService;
|
|
21
|
4
|
import com.alibaba.fastjson.JSONArray;
|
|
22
|
5
|
import com.alibaba.fastjson.JSONObject;
|
|
23
|
6
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
24
|
7
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
25
|
8
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
26
|
9
|
import com.google.common.collect.Maps;
|
|
27
|
|
-
|
|
28
|
|
-import java.text.SimpleDateFormat;
|
|
29
|
|
-import java.util.ArrayList;
|
|
30
|
|
-import java.util.Date;
|
|
31
|
|
-import java.util.HashMap;
|
|
32
|
|
-import java.util.List;
|
|
33
|
|
-import java.util.Map;
|
|
34
|
|
-import java.util.UUID;
|
|
35
|
|
-
|
|
|
10
|
+import com.unissoft.MyConstant;
|
|
|
11
|
+import com.unissoft.dto.ProcessToBeDone;
|
|
|
12
|
+import com.unissoft.feign.SystemFeign;
|
|
|
13
|
+import com.unissoft.mapper.*;
|
|
|
14
|
+import com.unissoft.model.*;
|
|
|
15
|
+import com.unissoft.result.PageParam;
|
|
|
16
|
+import com.unissoft.ventilation.service.ProcessAuditService;
|
|
|
17
|
+import com.unissoft.ventilation.service.ProcessBasisService;
|
|
|
18
|
+import com.unissoft.vo.ProcessToBeDoneVO;
|
|
36
|
19
|
import org.apache.commons.lang.StringUtils;
|
|
37
|
20
|
import org.json.JSONException;
|
|
38
|
21
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -40,6 +23,9 @@ import org.springframework.http.ResponseEntity;
|
|
40
|
23
|
import org.springframework.stereotype.Service;
|
|
41
|
24
|
import org.springframework.web.client.RestTemplate;
|
|
42
|
25
|
|
|
|
26
|
+import java.text.SimpleDateFormat;
|
|
|
27
|
+import java.util.*;
|
|
|
28
|
+
|
|
43
|
29
|
/**
|
|
44
|
30
|
* <p>
|
|
45
|
31
|
* 服务实现类
|
|
|
@@ -72,6 +58,9 @@ public class ProcessAuditServiceImpl extends ServiceImpl<ProcessAuditMapper, Pro
|
|
72
|
58
|
@Autowired
|
|
73
|
59
|
private RestTemplate restTemplate;
|
|
74
|
60
|
|
|
|
61
|
+ @Autowired
|
|
|
62
|
+ private SystemFeign systemFeign;
|
|
|
63
|
+
|
|
75
|
64
|
|
|
76
|
65
|
@Override
|
|
77
|
66
|
public void add(String parameter) {
|
|
|
@@ -610,44 +599,49 @@ public class ProcessAuditServiceImpl extends ServiceImpl<ProcessAuditMapper, Pro
|
|
610
|
599
|
|
|
611
|
600
|
|
|
612
|
601
|
@Override
|
|
613
|
|
- public void toBeDone(ProcessToBeDone processToBeDone) {
|
|
614
|
|
- // TODO Auto-generated method stub
|
|
615
|
|
- ProcessAudit processAudit = new ProcessAudit();
|
|
616
|
|
- if (null != processToBeDone) {
|
|
617
|
|
- processAudit.setResult(1);//是首条记录
|
|
618
|
|
- processAudit.setAuditState(0);//提交待审批
|
|
619
|
|
- // 获得SimpleDateFormat类
|
|
620
|
|
- SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
621
|
|
- processAudit.setApplyTime(sf.format(new Date()));//申请时间
|
|
622
|
|
-
|
|
623
|
|
- if (null != processToBeDone.getHouseId()) {//仓id
|
|
624
|
|
- processAudit.setHouseId(processToBeDone.getHouseId());
|
|
625
|
|
- }
|
|
626
|
|
- if (null != processToBeDone.getDepotId()) {//库id
|
|
627
|
|
- processAudit.setDepotId(processToBeDone.getDepotId());
|
|
628
|
|
- }
|
|
629
|
|
- if (null != processToBeDone.getType()) {//类型(例如:tf)
|
|
630
|
|
- processAudit.setType(processToBeDone.getType());
|
|
631
|
|
- }
|
|
632
|
|
- if (null != processToBeDone.getUserId()) {//待办人员ID
|
|
633
|
|
- processAudit.setToPeople(processToBeDone.getUserId());
|
|
634
|
|
- }
|
|
635
|
|
- if (null != processToBeDone.getTitle()) {//流程名称,如 科长每2周粮情检查
|
|
636
|
|
- processAudit.setWorkName(processToBeDone.getTitle());
|
|
637
|
|
- }
|
|
638
|
|
- if (null != processToBeDone.getStartDate()) {//办理开始时间
|
|
639
|
|
- processAudit.setStartDate(processToBeDone.getStartDate());
|
|
640
|
|
- }
|
|
641
|
|
- if (null != processToBeDone.getEndDate()) {//办理结束时间
|
|
642
|
|
- processAudit.setEndDate(processToBeDone.getEndDate());
|
|
643
|
|
- }
|
|
644
|
|
- if (null != processToBeDone.getToPage()) {//办理页面url
|
|
645
|
|
- processAudit.setToPage(processToBeDone.getToPage());
|
|
646
|
|
- }
|
|
647
|
|
- processAuditMapper.insert(processAudit);
|
|
648
|
|
- }
|
|
|
602
|
+ public void toBeDone(ProcessToBeDone processToBeDone) {//systemFeign
|
|
|
603
|
+
|
|
|
604
|
+
|
|
649
|
605
|
}
|
|
650
|
606
|
|
|
|
607
|
+ private void toBeDone(ProcessToBeDoneVO toBeDoneVO) {
|
|
|
608
|
+ // TODO Auto-generated method stub
|
|
|
609
|
+ ProcessAudit processAudit = new ProcessAudit();
|
|
|
610
|
+ if(null != toBeDoneVO){
|
|
|
611
|
+ processAudit.setResult(1);//是首条记录
|
|
|
612
|
+ processAudit.setAuditState(0);//提交待审批
|
|
|
613
|
+ // 获得SimpleDateFormat类
|
|
|
614
|
+ SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
615
|
+ processAudit.setApplyTime(sf.format(new Date()));//申请时间
|
|
|
616
|
+
|
|
|
617
|
+ if(null != toBeDoneVO.getHouseId()){//仓id
|
|
|
618
|
+ processAudit.setHouseId(toBeDoneVO.getHouseId());
|
|
|
619
|
+ }
|
|
|
620
|
+ if(null != toBeDoneVO.getDepotId()){//库id
|
|
|
621
|
+ processAudit.setDepotId(toBeDoneVO.getDepotId());
|
|
|
622
|
+ }
|
|
|
623
|
+ if(null != toBeDoneVO.getType()){//类型(例如:tf)
|
|
|
624
|
+ processAudit.setType(toBeDoneVO.getType());
|
|
|
625
|
+ }
|
|
|
626
|
+ if(null != toBeDoneVO.getUserId()){//待办人员ID
|
|
|
627
|
+ processAudit.setToPeople(toBeDoneVO.getUserId());
|
|
|
628
|
+ }
|
|
|
629
|
+ if(null != toBeDoneVO.getTitle()){//流程名称,如 科长每2周粮情检查
|
|
|
630
|
+ processAudit.setWorkName(toBeDoneVO.getTitle());
|
|
|
631
|
+ }
|
|
|
632
|
+ if(null != toBeDoneVO.getStartDate()){//办理开始时间
|
|
|
633
|
+ processAudit.setStartDate(toBeDoneVO.getStartDate());
|
|
|
634
|
+ }
|
|
|
635
|
+ if(null != toBeDoneVO.getEndDate()){//办理结束时间
|
|
|
636
|
+ processAudit.setEndDate(toBeDoneVO.getEndDate());
|
|
|
637
|
+ }
|
|
|
638
|
+ if(null != toBeDoneVO.getToPage()){//办理页面url
|
|
|
639
|
+ processAudit.setToPage(toBeDoneVO.getToPage());
|
|
|
640
|
+ }
|
|
|
641
|
+ processAuditMapper.insert(processAudit);
|
|
|
642
|
+ }
|
|
|
643
|
+ }
|
|
|
644
|
+
|
|
651
|
645
|
|
|
652
|
646
|
@Override
|
|
653
|
647
|
public void haveDone(Integer id) {
|