Commit 7ef57d203209953cc8f0165cd264a34c10da5c73

Authored by youxiw2000
1 parent 93eb74ba

m

Showing 41 changed files with 1260 additions and 214 deletions
... ... @@ -214,6 +214,11 @@
214 214 <artifactId>trash-unit</artifactId>
215 215 <version>${trash.version}</version>
216 216 </dependency>
  217 + <dependency>
  218 + <groupId>com.trash</groupId>
  219 + <artifactId>trash-garbage</artifactId>
  220 + <version>${trash.version}</version>
  221 + </dependency>
217 222 </dependencies>
218 223 </dependencyManagement>
219 224  
... ...
trash-activiti/src/main/java/com/trash/activiti/controller/HistoryFormDataCoroller.java
... ... @@ -3,9 +3,13 @@ package com.trash.activiti.controller;
3 3 import com.trash.common.core.domain.AjaxResult;
4 4 import com.trash.activiti.service.IFormHistoryDataService;
5 5  
  6 +import java.util.Map;
  7 +
6 8 import org.springframework.beans.factory.annotation.Autowired;
7 9 import org.springframework.web.bind.annotation.GetMapping;
8 10 import org.springframework.web.bind.annotation.PathVariable;
  11 +import org.springframework.web.bind.annotation.PostMapping;
  12 +import org.springframework.web.bind.annotation.RequestBody;
9 13 import org.springframework.web.bind.annotation.RestController;
10 14  
11 15 @RestController
... ... @@ -18,4 +22,12 @@ public class HistoryFormDataCoroller {
18 22 return AjaxResult.success(formHistoryDataService.historyDataShow(instanceId));
19 23  
20 24 }
  25 +
  26 + @PostMapping(value = "historyFromData/historyFromDataByTime")
  27 + public AjaxResult historyFromDataByTime(@RequestBody Map<String,String> map) {
  28 +
  29 + return AjaxResult.success(formHistoryDataService.historyFromDataByTime(map));
  30 +
  31 + }
  32 +
21 33 }
... ...
trash-activiti/src/main/java/com/trash/activiti/mapper/ActWorkflowFormDataMapper.java
... ... @@ -2,6 +2,7 @@ package com.trash.activiti.mapper;
2 2  
3 3 import java.util.Date;
4 4 import java.util.List;
  5 +import java.util.Map;
5 6  
6 7 import org.apache.ibatis.annotations.Param;
7 8  
... ... @@ -85,4 +86,5 @@ public interface ActWorkflowFormDataMapper
85 86 int deleteActWorkflowFormDataByIds(Long[] ids);
86 87  
87 88 List<ActWorkflowFormData> selectActWorkFlowFormDataListByUser(@Param("username") String username);
  89 + List<ActWorkflowFormData> selectNewActWorkflowFormDataByBusinessKey(Map<String,String> map);
88 90 }
... ...
trash-activiti/src/main/java/com/trash/activiti/service/IFormHistoryDataService.java
1 1 package com.trash.activiti.service;
2 2  
3 3 import java.util.List;
  4 +import java.util.Map;
4 5  
5 6 import com.trash.activiti.domain.ActWorkflowFormData;
6 7 import com.trash.activiti.domain.dto.HistoryDataDTO;
... ... @@ -14,4 +15,6 @@ import com.trash.activiti.domain.dto.HistoryDataDTO;
14 15 public interface IFormHistoryDataService {
15 16  
16 17 List<ActWorkflowFormData> historyDataShow(String instanceId);
  18 +
  19 + List<ActWorkflowFormData> historyFromDataByTime(Map<String,String> map);
17 20 }
... ...
trash-activiti/src/main/java/com/trash/activiti/service/impl/FormHistoryDataServiceImpl.java
... ... @@ -11,11 +11,14 @@ import org.springframework.stereotype.Service;
11 11 import com.trash.activiti.domain.ActWorkflowFormData;
12 12 import com.trash.activiti.domain.dto.HistoryDataDTO;
13 13 import com.trash.activiti.domain.dto.HistoryFormDataDTO;
  14 +import com.trash.activiti.mapper.ActWorkflowFormDataMapper;
14 15 import com.trash.activiti.service.IActWorkflowFormDataService;
15 16 import com.trash.activiti.service.IFormHistoryDataService;
  17 +import com.trash.common.utils.DateUtils;
16 18  
17 19 import java.text.SimpleDateFormat;
18 20 import java.util.*;
  21 +import java.util.stream.Collector;
19 22 import java.util.stream.Collectors;
20 23  
21 24 /**
... ... @@ -29,7 +32,10 @@ public class FormHistoryDataServiceImpl implements IFormHistoryDataService {
29 32 @Autowired
30 33 private IActWorkflowFormDataService actWorkflowFormDataService;
31 34  
32   -
  35 + @Autowired
  36 + private ActWorkflowFormDataMapper formDataMapper;
  37 +
  38 +
33 39 private final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
34 40  
35 41  
... ... @@ -127,6 +133,51 @@ public class FormHistoryDataServiceImpl implements IFormHistoryDataService {
127 133 return returnHistoryFromDataDTOS;
128 134 }
129 135  
  136 +
  137 + @Override
  138 + public List<ActWorkflowFormData> historyFromDataByTime(Map<String,String> map) {
  139 + List<ActWorkflowFormData> returnHistoryFromDataDTOS=new ArrayList<>();
  140 + List<ActWorkflowFormData> actWorkflowFormData=new ArrayList<>();
  141 +
  142 + String businessKey = map.get("businessKey");
  143 +
  144 +
  145 +
  146 + actWorkflowFormData = formDataMapper.selectNewActWorkflowFormDataByBusinessKey(map);
  147 +
  148 +
  149 +
  150 +
  151 + for(int i =0;i<actWorkflowFormData.size();i++){
  152 + if(i == actWorkflowFormData.size()-1){
  153 + returnHistoryFromDataDTOS.add(actWorkflowFormData.get(i));
  154 + continue;
  155 + }
  156 +
  157 + ActWorkflowFormData one = actWorkflowFormData.get(i);
  158 + ActWorkflowFormData two = actWorkflowFormData.get(i+1);
  159 +
  160 + if(one.getCreateBy().equals(two.getCreateBy()) && one.getCreateTime().getTime() == two.getCreateTime().getTime()){
  161 +
  162 + String twoValue = two.getControlValue() == null ? "" : "," + two.getControlValue();
  163 +
  164 + one.setControlValue(one.getControlValue() + twoValue);
  165 +
  166 + returnHistoryFromDataDTOS.add(one);
  167 + i+=1;
  168 + continue;
  169 + }
  170 +
  171 + returnHistoryFromDataDTOS.add(one);
  172 + }
  173 +
  174 +
  175 +
  176 + returnHistoryFromDataDTOS = returnHistoryFromDataDTOS.stream().sorted((x,y) -> x.getCreateTime().compareTo(y.getCreateTime())).collect(Collectors.toList());
  177 +
130 178  
  179 + return returnHistoryFromDataDTOS;
  180 + }
  181 +
131 182  
132 183 }
... ...
trash-activiti/src/main/resources/mapper/activiti/ActWorkflowFormDataMapper.xml
... ... @@ -44,6 +44,16 @@
44 44 order by create_time DESC
45 45 </select>
46 46  
  47 + <select id="selectNewActWorkflowFormDataByBusinessKey" parameterType="Map" resultMap="ActWorkflowFormDataResult">
  48 + select * from act_workflow_formdata where id in(
  49 + select max(id) from act_workflow_formdata where
  50 + business_key = #{businessKey}
  51 + and create_time BETWEEN #{createTime} and #{updateTime}
  52 + GROUP BY control_id)
  53 + </select>
  54 +
  55 +
  56 +
47 57 <select id="selectActWorkFlowFormDataListByUser" parameterType="string" resultMap="ActWorkflowFormDataResult">
48 58 select * from act_workflow_formdata where id in (
49 59 select max(id)from act_workflow_formdata
... ... @@ -61,6 +71,7 @@
61 71 <if test="controlValue != null">control_value,</if>
62 72 <if test="taskNodeName != null">task_node_name,</if>
63 73 <if test="createBy != null">create_by,</if>
  74 + <if test="createName != null">create_name,</if>
64 75 <if test="createTime != null">create_time,</if>
65 76 </trim>
66 77 <trim prefix="values (" suffix=")" suffixOverrides=",">
... ... @@ -71,6 +82,7 @@
71 82 <if test="controlValue != null">#{controlValue},</if>
72 83 <if test="taskNodeName != null">#{taskNodeName},</if>
73 84 <if test="createBy != null">#{createBy},</if>
  85 + <if test="createName != null">create_name,</if>
74 86 <if test="createTime != null">#{createTime},</if>
75 87 </trim>
76 88 </insert>
... ...
trash-admin/pom.xml
... ... @@ -90,11 +90,10 @@
90 90 <groupId>com.trash</groupId>
91 91 <artifactId>trash-unit</artifactId>
92 92 </dependency>
93   - <dependency>
  93 + <!-- <dependency>
94 94 <groupId>com.trash</groupId>
95 95 <artifactId>trash-garbage</artifactId>
96   - <version>3.2.0</version>
97   - </dependency>
  96 + </dependency> -->
98 97 </dependencies>
99 98  
100 99 <build>
... ...
trash-admin/src/main/resources/application-dev.yml
... ... @@ -32,10 +32,10 @@ spring:
32 32 druid:
33 33 # 主库数据源
34 34 master:
35   - url: jdbc:mysql://localhost:3306/trash?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true
36   -# url: jdbc:mysql://192.168.168.141:3306/trash?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true
  35 + #url: jdbc:mysql://localhost:3306/trash?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true
  36 + url: jdbc:mysql://192.168.168.141:3306/trash?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true
37 37 username: root
38   - password: guzijian
  38 + password: root
39 39 # 从库数据源
40 40 slave:
41 41 # 从数据源开关/默认关闭
... ...
trash-common/pom.xml
... ... @@ -124,13 +124,12 @@
124 124 <artifactId>esdk-obs-java</artifactId>
125 125 <version>[3.20.6.1,)</version>
126 126 </dependency>
127   - <!-- mybatis-plus 增强CRUD -->
  127 + <!-- mybatis-plus 增强CRUD -->
128 128 <dependency>
129 129 <groupId>com.baomidou</groupId>
130 130 <artifactId>mybatis-plus-boot-starter</artifactId>
131 131 <version>3.4.1</version>
132 132 </dependency>
133   -
134 133 </dependencies>
135 134  
136 135 </project>
137 136 \ No newline at end of file
... ...
trash-common/src/main/java/com/trash/common/utils/RemoteServerUtils.java
1 1 package com.trash.common.utils;
2 2  
  3 +import java.io.IOException;
3 4 import java.util.HashMap;
4 5 import java.util.List;
5 6 import java.util.Map;
... ... @@ -44,7 +45,7 @@ public class RemoteServerUtils {
44 45 public static String TruckInfo = "/api/gpsservice/cs/basevehicle/";
45 46 public static String EarthSitesInfo = "/api/siteservice/cs/earthsites/";
46 47  
47   - public static String EarthSitesList = "//api/siteservice/cs/earthsites/ledger/list";
  48 + public static String EarthSitesList = "/api/siteservice/cs/earthsites/ledger/list";
48 49  
49 50 public static String ConstructionInfo = "/api/siteservice/cs/constructionsites/";
50 51  
... ... @@ -756,7 +757,44 @@ public class RemoteServerUtils {
756 757 }
757 758 }
758 759  
  760 +
  761 +
  762 + static String upUrl = "https://cszgf.tyykj.com:37251/";
759 763  
  764 + public static boolean updateUpCase(Map map){
  765 + if(okHttpClient == null){
  766 + okHttpClient = new OkHttpClient.Builder()
  767 + .connectTimeout(20, TimeUnit.SECONDS)
  768 + .writeTimeout(20, TimeUnit.SECONDS)
  769 + .readTimeout(30, TimeUnit.SECONDS)
  770 + .build();
  771 + }
  772 +
  773 +
  774 + String param = JSON.toJSON(map).toString();
  775 +
  776 + RequestBody body = RequestBody.create(MediaType.parse("application/json"), param );
  777 +
  778 + Request request = new Request.Builder().url(upUrl + "api/thirdApi/query/callback").addHeader("Authorization",getUpUser()).post(body).build();
  779 +
  780 + okhttp3.Response response;
  781 + String result;
  782 + try {
  783 + response = okHttpClient.newCall(request).execute();
  784 +
  785 + result = response.body().string();
  786 + JSONObject json = JSON.parseObject(result);
  787 + if(json.getBoolean("success")){
  788 + return json.getBoolean("success");
  789 + }
  790 + } catch (IOException e) {
  791 + // TODO Auto-generated catch block
  792 + e.printStackTrace();
  793 + }
  794 +
  795 + return false;
  796 +
  797 + }
760 798  
761 799 public static String getUpUser(){
762 800 if(okHttpClient == null){
... ... @@ -776,7 +814,7 @@ public class RemoteServerUtils {
776 814  
777 815 RequestBody body = RequestBody.create(MediaType.parse("application/json"), param );
778 816  
779   - Request request = new Request.Builder().url("https://cszgf.tyykj.com:37251/api/thirdApi/basic/token").post(body).build();
  817 + Request request = new Request.Builder().url(upUrl + "api/thirdApi/basic/token").post(body).build();
780 818  
781 819  
782 820 try {
... ... @@ -799,6 +837,136 @@ public class RemoteServerUtils {
799 837 return null;
800 838 }
801 839  
  840 + public static JSONArray getUpArea() {
  841 + if(okHttpClient == null){
  842 + okHttpClient = new OkHttpClient.Builder()
  843 + .connectTimeout(20, TimeUnit.SECONDS)
  844 + .writeTimeout(20, TimeUnit.SECONDS)
  845 + .readTimeout(30, TimeUnit.SECONDS)
  846 + .build();
  847 + }
  848 +
  849 +
  850 + Map map = new HashMap<>();
  851 +
  852 +
  853 + String param = JSON.toJSON(map).toString();
  854 +
  855 + RequestBody body = RequestBody.create(MediaType.parse("application/json"), param );
  856 +
  857 + Request request = new Request.Builder().url(upUrl + "api/thirdApi/basic/areaList").addHeader("Authorization",getUpUser()).post(body).build();
  858 +
  859 +
  860 + try {
  861 + okhttp3.Response response = okHttpClient.newCall(request).execute();
  862 + String result = response.body().string();
  863 +
  864 + if(result != null){
  865 + JSONObject json = JSON.parseObject(result);
  866 + if( json.getBoolean("success")){
  867 + return json.getJSONArray("data");
  868 + }
  869 + }
  870 +
  871 + }catch (Exception e) {
  872 + e.printStackTrace();
  873 +
  874 + }
  875 + return null;
  876 + }
  877 +
  878 + public static boolean insertUpCase(Map params) {
  879 + if(okHttpClient == null){
  880 + okHttpClient = new OkHttpClient.Builder()
  881 + .connectTimeout(20, TimeUnit.SECONDS)
  882 + .writeTimeout(20, TimeUnit.SECONDS)
  883 + .readTimeout(30, TimeUnit.SECONDS)
  884 + .build();
  885 + }
  886 +
  887 +
  888 + Map map = new HashMap<>();
  889 +
  890 +
  891 + String param = JSON.toJSON(params).toString();
  892 +
  893 + RequestBody body = RequestBody.create(MediaType.parse("application/json"), param );
  894 +
  895 + Request request = new Request.Builder().url(upUrl + "api/thirdApi/push/acceptEvt").addHeader("Authorization",getUpUser()).post(body).build();
  896 +
  897 +
  898 + try {
  899 + okhttp3.Response response = okHttpClient.newCall(request).execute();
  900 + String result = response.body().string();
  901 +
  902 + if(result != null){
  903 + JSONObject json = JSON.parseObject(result);
  904 + return json.getBoolean("success");
  905 + }
  906 +
  907 + }catch (Exception e) {
  908 + e.printStackTrace();
  909 +
  910 + }
  911 + return false;
  912 + }
  913 +
  914 +
  915 +
  916 +
  917 + public static JSONObject getUpClass() {
  918 + if(okHttpClient == null){
  919 + okHttpClient = new OkHttpClient.Builder()
  920 + .connectTimeout(20, TimeUnit.SECONDS)
  921 + .writeTimeout(20, TimeUnit.SECONDS)
  922 + .readTimeout(30, TimeUnit.SECONDS)
  923 + .build();
  924 + }
  925 +
  926 +
  927 + Map map = new HashMap<>();
  928 +
  929 + map.put("industryType", "01");
  930 +
  931 + String param = JSON.toJSON(map).toString();
  932 +
  933 + RequestBody body = RequestBody.create(MediaType.parse("application/json"), param );
  934 +
  935 + Request request = new Request.Builder().url(upUrl + "api/thirdApi/basic/classList").addHeader("Authorization",getUpUser()).post(body).build();
  936 +
  937 +
  938 + try {
  939 + okhttp3.Response response = okHttpClient.newCall(request).execute();
  940 + String result = response.body().string();
  941 +
  942 + if(result != null){
  943 + JSONObject json = JSON.parseObject(result);
  944 + if(json.getBoolean("success")){
  945 +
  946 + for(Object object : json.getJSONArray("data")){
  947 + JSONObject jsonObj = (JSONObject) object;
  948 +
  949 +
  950 + if(jsonObj.getString("name").equals("")){
  951 +
  952 + }
  953 +
  954 +
  955 + }
  956 +
  957 +
  958 + }
  959 + }else{
  960 + return null;
  961 + }
  962 +
  963 + }catch (Exception e) {
  964 + e.printStackTrace();
  965 + return null;
  966 + }
  967 + return null;
  968 + }
  969 +
802 970 public static JSONArray getCaseList(){
803 971 if(okHttpClient == null){
804 972 okHttpClient = new OkHttpClient.Builder()
... ... @@ -816,7 +984,7 @@ public class RemoteServerUtils {
816 984  
817 985 RequestBody body = RequestBody.create(MediaType.parse("application/json"), param );
818 986  
819   - Request request = new Request.Builder().url("https://cszgf.tyykj.com:37251/api/thirdApi/query/dispatchEvtList").addHeader("Authorization",getUpUser()).post(body).build();
  987 + Request request = new Request.Builder().url(upUrl + "api/thirdApi/query/dispatchEvtList").addHeader("Authorization",getUpUser()).post(body).build();
820 988  
821 989  
822 990 try {
... ... @@ -846,4 +1014,7 @@ public class RemoteServerUtils {
846 1014 }
847 1015  
848 1016  
  1017 +
  1018 +
  1019 +
849 1020 }
... ...
trash-framework/pom.xml
... ... @@ -34,8 +34,7 @@
34 34 <groupId>com.alibaba</groupId>
35 35 <artifactId>druid-spring-boot-starter</artifactId>
36 36 </dependency>
37   - <!-- https://mvnrepository.com/artifact/org.mybatis.spring.boot/mybatis-spring-boot-starter -->
38   - <dependency>
  37 + <dependency>
39 38 <groupId>org.mybatis.spring.boot</groupId>
40 39 <artifactId>mybatis-spring-boot-starter</artifactId>
41 40 <version>2.3.1</version>
... ...
trash-garbage/pom.xml
... ... @@ -21,10 +21,6 @@
21 21 </dependency>
22 22 <dependency>
23 23 <groupId>com.trash</groupId>
24   - <artifactId>trash-activiti</artifactId>
25   - </dependency>
26   - <dependency>
27   - <groupId>com.trash</groupId>
28 24 <artifactId>trash-framework</artifactId>
29 25 </dependency>
30 26 <dependency>
... ...
trash-garbage/src/main/java/com/trash/garbage/custom/BizException.java
... ... @@ -11,7 +11,33 @@ public class BizException extends RuntimeException{
11 11 private String msg;
12 12 private ResultCode code;
13 13  
14   - public BizException(ResultCode code, String msg){
  14 +
  15 +
  16 + public String getMsg() {
  17 + return msg;
  18 + }
  19 +
  20 +
  21 +
  22 + public void setMsg(String msg) {
  23 + this.msg = msg;
  24 + }
  25 +
  26 +
  27 +
  28 + public ResultCode getCode() {
  29 + return code;
  30 + }
  31 +
  32 +
  33 +
  34 + public void setCode(ResultCode code) {
  35 + this.code = code;
  36 + }
  37 +
  38 +
  39 +
  40 + public BizException(ResultCode code, String msg){
15 41 this.msg = msg;
16 42 this.code = code;
17 43 }
... ...
trash-garbage/src/main/java/com/trash/garbage/global/Result.java
... ... @@ -22,8 +22,58 @@ public class Result&lt;T extends Object&gt; {
22 22 private T data ;
23 23  
24 24 private Result() {}
  25 +
  26 +
25 27  
26   - /** 成功静态方法 */
  28 + public Boolean getSuccess() {
  29 + return success;
  30 + }
  31 +
  32 +
  33 +
  34 + public void setSuccess(Boolean success) {
  35 + this.success = success;
  36 + }
  37 +
  38 +
  39 +
  40 + public Integer getCode() {
  41 + return code;
  42 + }
  43 +
  44 +
  45 +
  46 + public void setCode(Integer code) {
  47 + this.code = code;
  48 + }
  49 +
  50 +
  51 +
  52 + public String getMsg() {
  53 + return msg;
  54 + }
  55 +
  56 +
  57 +
  58 + public void setMsg(String msg) {
  59 + this.msg = msg;
  60 + }
  61 +
  62 +
  63 +
  64 + public T getData() {
  65 + return data;
  66 + }
  67 +
  68 +
  69 +
  70 + public void setData(T data) {
  71 + this.data = data;
  72 + }
  73 +
  74 +
  75 +
  76 + /** 成功静态方法 */
27 77 public static Result OK() {
28 78 Result r = new Result();
29 79 r.setSuccess(true);
... ...
trash-garbage/src/main/java/com/trash/garbage/pojo/domain/GarAddress.java
... ... @@ -133,4 +133,82 @@ public class GarAddress implements Serializable {
133 133 sb.append("]");
134 134 return sb.toString();
135 135 }
  136 +
  137 + public String getGarAddressId() {
  138 + return garAddressId;
  139 + }
  140 +
  141 + public void setGarAddressId(String garAddressId) {
  142 + this.garAddressId = garAddressId;
  143 + }
  144 +
  145 + public String getGarUserId() {
  146 + return garUserId;
  147 + }
  148 +
  149 + public void setGarUserId(String garUserId) {
  150 + this.garUserId = garUserId;
  151 + }
  152 +
  153 + public String getGarUserAddress() {
  154 + return garUserAddress;
  155 + }
  156 +
  157 + public void setGarUserAddress(String garUserAddress) {
  158 + this.garUserAddress = garUserAddress;
  159 + }
  160 +
  161 + public Integer getGarUserDefault() {
  162 + return garUserDefault;
  163 + }
  164 +
  165 + public void setGarUserDefault(Integer garUserDefault) {
  166 + this.garUserDefault = garUserDefault;
  167 + }
  168 +
  169 + public Date getGarCreateTime() {
  170 + return garCreateTime;
  171 + }
  172 +
  173 + public void setGarCreateTime(Date garCreateTime) {
  174 + this.garCreateTime = garCreateTime;
  175 + }
  176 +
  177 + public Date getGarUpdateTime() {
  178 + return garUpdateTime;
  179 + }
  180 +
  181 + public void setGarUpdateTime(Date garUpdateTime) {
  182 + this.garUpdateTime = garUpdateTime;
  183 + }
  184 +
  185 + public String getGarUserContactName() {
  186 + return garUserContactName;
  187 + }
  188 +
  189 + public void setGarUserContactName(String garUserContactName) {
  190 + this.garUserContactName = garUserContactName;
  191 + }
  192 +
  193 + public String getGarUserContactTel() {
  194 + return garUserContactTel;
  195 + }
  196 +
  197 + public void setGarUserContactTel(String garUserContactTel) {
  198 + this.garUserContactTel = garUserContactTel;
  199 + }
  200 +
  201 + public String getGarRemark() {
  202 + return garRemark;
  203 + }
  204 +
  205 + public void setGarRemark(String garRemark) {
  206 + this.garRemark = garRemark;
  207 + }
  208 +
  209 + public static long getSerialversionuid() {
  210 + return serialVersionUID;
  211 + }
  212 +
  213 +
136 214 }
... ...
trash-garbage/src/main/java/com/trash/garbage/pojo/domain/GarUser.java
... ... @@ -130,4 +130,82 @@ public class GarUser implements Serializable {
130 130 return sb.toString();
131 131 }
132 132  
  133 + public String getGarUserId() {
  134 + return garUserId;
  135 + }
  136 +
  137 + public void setGarUserId(String garUserId) {
  138 + this.garUserId = garUserId;
  139 + }
  140 +
  141 + public String getGarUserTel() {
  142 + return garUserTel;
  143 + }
  144 +
  145 + public void setGarUserTel(String garUserTel) {
  146 + this.garUserTel = garUserTel;
  147 + }
  148 +
  149 + public String getGarUserName() {
  150 + return garUserName;
  151 + }
  152 +
  153 + public void setGarUserName(String garUserName) {
  154 + this.garUserName = garUserName;
  155 + }
  156 +
  157 + public String getGarUserType() {
  158 + return garUserType;
  159 + }
  160 +
  161 + public void setGarUserType(String garUserType) {
  162 + this.garUserType = garUserType;
  163 + }
  164 +
  165 + public String getGarUserCarNum() {
  166 + return garUserCarNum;
  167 + }
  168 +
  169 + public void setGarUserCarNum(String garUserCarNum) {
  170 + this.garUserCarNum = garUserCarNum;
  171 + }
  172 +
  173 + public Integer getGarUserDelFlag() {
  174 + return garUserDelFlag;
  175 + }
  176 +
  177 + public void setGarUserDelFlag(Integer garUserDelFlag) {
  178 + this.garUserDelFlag = garUserDelFlag;
  179 + }
  180 +
  181 + public Date getGarCreateTime() {
  182 + return garCreateTime;
  183 + }
  184 +
  185 + public void setGarCreateTime(Date garCreateTime) {
  186 + this.garCreateTime = garCreateTime;
  187 + }
  188 +
  189 + public Date getGarUpdateTime() {
  190 + return garUpdateTime;
  191 + }
  192 +
  193 + public void setGarUpdateTime(Date garUpdateTime) {
  194 + this.garUpdateTime = garUpdateTime;
  195 + }
  196 +
  197 + public String getGarRemark() {
  198 + return garRemark;
  199 + }
  200 +
  201 + public void setGarRemark(String garRemark) {
  202 + this.garRemark = garRemark;
  203 + }
  204 +
  205 + public static long getSerialversionuid() {
  206 + return serialVersionUID;
  207 + }
  208 +
  209 +
  210 +
133 211 }
134 212 \ No newline at end of file
... ...
trash-garbage/src/main/java/com/trash/garbage/service/impl/GarUserServiceImpl.java
... ... @@ -231,6 +231,39 @@ public class GarUserServiceImpl extends ServiceImpl&lt;GarUserMapper, GarUser&gt;
231 231 return new String(cipher.doFinal(encrypData), "UTF-8");
232 232 }
233 233  
  234 + public WxConfig getWxConfig() {
  235 + return wxConfig;
  236 + }
  237 +
  238 + public void setWxConfig(WxConfig wxConfig) {
  239 + this.wxConfig = wxConfig;
  240 + }
  241 +
  242 + public GarAddressService getGarAddressService() {
  243 + return garAddressService;
  244 + }
  245 +
  246 + public void setGarAddressService(GarAddressService garAddressService) {
  247 + this.garAddressService = garAddressService;
  248 + }
  249 +
  250 + public RedisCache getRedisCache() {
  251 + return redisCache;
  252 + }
  253 +
  254 + public void setRedisCache(RedisCache redisCache) {
  255 + this.redisCache = redisCache;
  256 + }
  257 +
  258 + public TokenService getTokenService() {
  259 + return tokenService;
  260 + }
  261 +
  262 + public void setTokenService(TokenService tokenService) {
  263 + this.tokenService = tokenService;
  264 + }
  265 +
  266 +
234 267  
235 268 }
236 269  
... ...
trash-garbage/src/main/java/com/trash/garbage/utils/JwtUtils.java
... ... @@ -46,7 +46,7 @@ public class JwtUtils {
46 46 .parseClaimsJws(token);
47 47 claims = claimsJws.getBody();
48 48 } catch (Exception e) {
49   - log.info("token:{},反解析报错:{}",token,e.getMessage());
  49 +
50 50 return null;
51 51 }
52 52 return (String)claims.get("userId");
... ...
trash-quartz/src/main/java/com/trash/quartz/task/DriverTask.java
... ... @@ -12,6 +12,7 @@ import java.util.Date;
12 12 import java.util.HashMap;
13 13 import java.util.List;
14 14 import java.util.Map;
  15 +import java.util.stream.Collectors;
15 16  
16 17 import org.springframework.beans.BeansException;
17 18 import org.springframework.beans.factory.annotation.Autowired;
... ... @@ -34,6 +35,8 @@ import com.trash.business.service.ISupervisionThreestepService;
34 35 import com.trash.business.service.ISupervisionTrackService;
35 36 import com.trash.business.service.ITruckActivateService;
36 37 import com.trash.business.service.ITruckCreditService;
  38 +import com.trash.caseOffline.domain.CaseOffline;
  39 +import com.trash.caseOffline.mapper.CaseOfflineMapper;
37 40 import com.trash.casefile.domain.KafkaCompensation;
38 41 import com.trash.casefile.domain.ViolationCaseFile;
39 42 import com.trash.casefile.kafka.Consumer;
... ... @@ -46,7 +49,9 @@ import com.trash.common.utils.LogUtils;
46 49 import com.trash.common.utils.RemoteServerUtils;
47 50 import com.trash.common.utils.file.FileUploadUtils;
48 51 import com.trash.common.utils.spring.SpringUtils;
  52 +import com.trash.office.domain.LogisticsManagement;
49 53 import com.trash.office.domain.UploadFile;
  54 +import com.trash.office.mapper.LogisticsManagementMapper;
50 55 import com.trash.office.mapper.UploadFileMapper;
51 56 import com.trash.workflow.service.IWorkflowService;
52 57  
... ... @@ -73,6 +78,10 @@ public class DriverTask {
73 78  
74 79 JSONArray array = RemoteServerUtils.getCaseList();
75 80  
  81 + Map map = new HashMap<>();
  82 + List<String> ids = new ArrayList<String>();
  83 +
  84 +
76 85 if(array != null && array.size() > 0){
77 86 for(Object object:array){
78 87 JSONObject json = (JSONObject) object;
... ... @@ -97,12 +106,21 @@ public class DriverTask {
97 106  
98 107  
99 108 SpringUtils.getBean(ViolationCaseFileMapper.class).insertViolationCaseFile(caseFile);
  109 +
  110 + ids.add(caseFile.getId());
  111 +
100 112 } catch (BeansException e) {
101 113 // TODO Auto-generated catch block
102 114 e.printStackTrace();
103 115 }
104 116  
105 117 }
  118 +
  119 + map.put("taskIds", ids);
  120 + map.put("taskType", "Q2");
  121 +
  122 + RemoteServerUtils.updateUpCase(map);
  123 +
106 124 }
107 125  
108 126  
... ... @@ -157,7 +175,105 @@ public class DriverTask {
157 175 paramsMap.put("type_" + i + "_season", arr[i * 3 + 1]);
158 176 paramsMap.put("type_" + i + "_pect", arr[i * 3 + 2]);
159 177 }
160   -
  178 +
  179 + try{
  180 +
  181 + int type = 5;
  182 + LogisticsManagement logisticsManagement= new LogisticsManagement();
  183 +
  184 + Date d = new Date();
  185 +
  186 + d.setMonth(d.getMonth() - (Integer.parseInt(paramsMap.get("type_" + type + "_season")) * 3));
  187 + d.setDate(0);
  188 + d.setHours(23);
  189 + d.setMinutes(59);
  190 + d.setSeconds(59);
  191 +
  192 + logisticsManagement.setCreateTime(d);
  193 +
  194 + List<LogisticsManagement> logs = SpringUtils.getBean(LogisticsManagementMapper.class).selectLogisticsManagementList(logisticsManagement);
  195 +
  196 + Collections.shuffle(logs);
  197 +
  198 + double pect = Double.parseDouble(paramsMap.get("type_" + type + "_pect")) / 100;
  199 +
  200 + logs = logs.subList(0, (int) (logs.size() * pect));
  201 +
  202 + for(LogisticsManagement l:logs){
  203 +
  204 + String title =(l.getType().equals("0") ? "用章申请" : l.getType().equals("1") ? "物品申请" : "采购申请");
  205 +
  206 + insertData(l.getId() + "", title, type, "综合管理部", l.getDeptName());
  207 + }
  208 +
  209 + }catch(Exception e){
  210 + e.printStackTrace();
  211 + }
  212 +
  213 + try{
  214 +
  215 + int type = 6;
  216 + CaseOffline caseOffline= new CaseOffline();
  217 +
  218 + Date d = new Date();
  219 +
  220 + d.setMonth(d.getMonth() - (Integer.parseInt(paramsMap.get("type_" + type + "_season")) * 3));
  221 + d.setDate(0);
  222 + d.setHours(23);
  223 + d.setMinutes(59);
  224 + d.setSeconds(59);
  225 +
  226 + caseOffline.setCreateTime(d);
  227 +
  228 + List<CaseOffline> logs = SpringUtils.getBean(CaseOfflineMapper.class).selectCaseOfflineList(caseOffline);
  229 +
  230 + Collections.shuffle(logs);
  231 +
  232 + double pect = Double.parseDouble(paramsMap.get("type_" + type + "_pect")) / 100;
  233 +
  234 + logs = logs.subList(0, (int) (logs.size() * pect));
  235 +
  236 + for(CaseOffline l:logs){
  237 + insertData(l.getId() + "", "电子交办案卷:" + l.getSiteName(), type, "治理事务部", l.getLocationDec());
  238 + }
  239 +
  240 + }catch(Exception e){
  241 + e.printStackTrace();
  242 + }
  243 +
  244 + try{
  245 +
  246 + int type = 7;
  247 + ViolationCaseFile caseOffline= new ViolationCaseFile();
  248 +
  249 + Date d = new Date();
  250 +
  251 + d.setMonth(d.getMonth() - (Integer.parseInt(paramsMap.get("type_" + type + "_season")) * 3));
  252 + d.setDate(0);
  253 + d.setHours(23);
  254 + d.setMinutes(59);
  255 + d.setSeconds(59);
  256 +
  257 + caseOffline.setCreateTime(d);
  258 +
  259 + List<ViolationCaseFile> logs = SpringUtils.getBean(ViolationCaseFileMapper.class).selectViolationCaseFileList(caseOffline);
  260 +
  261 + Collections.shuffle(logs);
  262 +
  263 + double pect = Double.parseDouble(paramsMap.get("type_" + type + "_pect")) / 100;
  264 +
  265 + logs = logs.subList(0, (int) (logs.size() * pect));
  266 +
  267 + for(ViolationCaseFile l:logs){
  268 + insertData(l.getId() + "", "违规案卷:" + l.getProjectName(), type, "科技信息部", l.getOwningRegion());
  269 + }
  270 +
  271 + }catch(Exception e){
  272 + e.printStackTrace();
  273 + }
  274 +
  275 +
  276 +
161 277 JSONArray areas = redisCache.getCacheObject("areaList");
162 278  
163 279 Gson g = new Gson();
... ... @@ -261,12 +377,39 @@ public class DriverTask {
261 377 }
262 378 }
263 379 }
  380 +
  381 +
264 382 }
265 383  
266 384 public List ShuffleData(Gson g, JSONArray array, int type) {
267 385 List<JSONObject> list = g.fromJson(array.toJSONString(), new TypeToken<List<JSONObject>>() {
268 386 }.getType());
269   -
  387 +
  388 + Date d = new Date();
  389 +
  390 + d.setMonth(d.getMonth() - (Integer.parseInt(paramsMap.get("type_" + type + "_season")) * 3));
  391 + d.setDate(0);
  392 + d.setHours(23);
  393 + d.setMinutes(59);
  394 + d.setSeconds(59);
  395 +
  396 + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  397 + try{
  398 + list = list.parallelStream().filter(p->{
  399 + if(p.getString("createAt") == null)
  400 + return false;
  401 + try {
  402 + return d.getTime() < simpleDateFormat.parse(p.getString("createAt")).getTime();
  403 + } catch (ParseException e) {
  404 + // TODO Auto-generated catch block
  405 + e.printStackTrace();
  406 + }
  407 + return false;
  408 + }).collect(Collectors.toList());
  409 + }catch(Exception e){
  410 + e.printStackTrace();
  411 + }
  412 +
270 413 Collections.shuffle(list);
271 414  
272 415 double pect = Double.parseDouble(paramsMap.get("type_" + type + "_pect")) / 100;
... ...
trash-ui/src/api/activiti/historyFormdata.js
... ... @@ -6,3 +6,11 @@ export function historyFromData(instanceId) {
6 6 method: 'get'
7 7 })
8 8 }
  9 +
  10 +export function historyFromDataByTime(data) {
  11 + return request({
  12 + url: '/historyFromData/historyFromDataByTime',
  13 + method: 'post',
  14 + data:data
  15 + })
  16 +}
... ...
trash-ui/src/api/taskhismethod.js
... ... @@ -189,20 +189,6 @@ export default {
189 189 return;
190 190 }
191 191  
192   - if (this.definitionKey.indexOf("supervision") > -1) {
193   - const params = {
194   - id: row.businessKey.split(":")[1],
195   - }
196   - getSupervision(params).then(res => {
197   - if (res.result == null) {
198   - this.$message.error("获取纪检督察详情失败!请重试")
199   - return;
200   - }
201   - this.supervisionData = res.result;
202   - this.supervisionOpen = true;
203   - })
204   - return;
205   - }
206 192  
207 193 if(this.definitionKey == "workflow_company"){
208 194 this.company = true;
... ... @@ -216,7 +202,35 @@ export default {
216 202 this.driver = true;
217 203 return;
218 204 }
  205 + if (this.definitionKey.indexOf("supervision") > -1) {
  206 + getTrack(row.businessKey.split(":")[1]).then(res => {
  207 + this.businessKey = res.data.objectId;
  208 +
  209 + if(res.data.type == 0){
  210 + this.construct = true;
  211 + }else if(res.data.type == 1){
  212 + this.earthsites = true;
  213 + }else if(res.data.type == 2){
  214 + this.company = true;
  215 + }else if(res.data.type == 3){
  216 + this.contract = true;
  217 + }else if(res.data.type == 4){
  218 + this.vehicle = true;
  219 + }else if(type == 5){
  220 + this.idInfo = row.businessKey.substring(row.businessKey.lastIndexOf(":") + 1);
  221 + this.logisticsInfoOpen = true;
  222 + }else if(type == 6){
  223 + this.caseOffline = true;
  224 + return;
  225 + }else if(type == 7){
  226 + this.violationCaseFile = true;
  227 + this.videoSrc1 = [];
  228 + this.slides1 = [];
  229 + }
219 230  
  231 + })
  232 + return;
  233 + }
220 234 },
221 235 },
222 236 }
... ...
trash-ui/src/api/taskmethod.js
... ... @@ -10,6 +10,7 @@ import {activeThreestep} from &quot;@/api/business/threestep&quot;;
10 10 import {getToken} from "@/utils/auth";
11 11 import {addReplyApprovalProcess} from "@/api/casefile/replyApprovalProcess";
12 12 import {updateHandleAffairs} from "@/api/office/handle";
  13 +import { listTrack, getTrack} from "@/api/business/track";
13 14  
14 15 export default {
15 16 methods: {
... ... @@ -275,17 +276,31 @@ export default {
275 276 return;
276 277 }
277 278 if (this.definitionKey.indexOf("supervision") > -1) {
278   - console.log(row)
279   - const params = {
280   - id: row.businessKey.split(":")[1],
281   - }
282   - getSupervision(params).then(res => {
283   - if (res.result == null) {
284   - this.$message.error("获取纪检督察详情失败!请重试")
  279 + getTrack(row.businessKey.split(":")[1]).then(res => {
  280 + this.businessKey = res.data.objectId;
  281 +
  282 + if(res.data.type == 0){
  283 + this.construct = true;
  284 + }else if(res.data.type == 1){
  285 + this.earthsites = true;
  286 + }else if(res.data.type == 2){
  287 + this.company = true;
  288 + }else if(res.data.type == 3){
  289 + this.contract = true;
  290 + }else if(res.data.type == 4){
  291 + this.vehicle = true;
  292 + }else if(type == 5){
  293 + this.idInfo = row.businessKey.substring(row.businessKey.lastIndexOf(":") + 1);
  294 + this.logisticsInfoOpen = true;
  295 + }else if(type == 6){
  296 + this.caseOffline = true;
285 297 return;
  298 + }else if(type == 7){
  299 + this.violationCaseFile = true;
  300 + this.videoSrc1 = [];
  301 + this.slides1 = [];
286 302 }
287   - this.supervisionData = res.result;
288   - this.supervisionOpen = true;
  303 +
289 304 })
290 305 return;
291 306 }
... ... @@ -524,7 +539,7 @@ export default {
524 539 this.definitionKey == "workflow_vehicle" ||
525 540 this.definitionKey == "workflow_earthsites" ||
526 541 this.definitionKey == "workflow_conract" ||
527   - this.definitionKey == "workflow_constructsite_edit" ||
  542 + this.definitionKey == "workflow_constructsite_edit" ||
528 543 this.definitionKey == "workflow_earthsites_edit") {
529 544 formDataSave(this.id, this.form.formData).then(response => {
530 545 this.msgSuccess("审批成功");
... ...
trash-ui/src/api/track.js
1   -import { listTrack, getTrack, delTrack, addTrack, updateTrack, exportTrack,getSettings,saveSettings } from "@/api/business/track";
  1 +import {
  2 + listTrack,
  3 + getTrack,
  4 + delTrack,
  5 + addTrack,
  6 + updateTrack,
  7 + exportTrack,
  8 + getSettings,
  9 + saveSettings
  10 +} from "@/api/business/track";
2 11  
  12 +import companyInfo from "@/views/activiti/task/companyInfo";
3 13  
4   - import companyInfo from "@/views/activiti/task/companyInfo";
  14 +import logisticsInfo from "@/views/office/logistics/logisticsInfo";
  15 +
  16 +import violationCaseFileInfo from "@/views/casefile/violationCaseFile/violationCaseFileInfo";
  17 +import caseOfflineInfo from "@/views/caseOffline/caseOffline/caseOfflineInfo";
  18 +
  19 +import {historyFromDataByTime} from '@/api/activiti/historyFormdata'
5 20  
6 21 export default {
7 22 name: "Track",
8   -
9 23 components: {
10 24 companyInfo,
  25 + logisticsInfo,
  26 + violationCaseFileInfo,
  27 + caseOfflineInfo
11 28 },
12 29 data() {
13 30 return {
... ... @@ -29,7 +46,11 @@ export default {
29 46 title: "",
30 47 // 是否显示弹出层
31 48 open: false,
32   - settings:null,
  49 + info0: false,
  50 + info1: false,
  51 + info2: false,
  52 + info3: false,
  53 + settings: null,
33 54 // 查询参数
34 55 queryParams: {
35 56 pageNum: 1,
... ... @@ -39,67 +60,172 @@ export default {
39 60 place: null,
40 61 status: null,
41 62 objectId: null,
42   - type:0
  63 + type: 0
43 64 },
44 65 // 表单参数
45 66 form: {},
46   - activeIndex:"0",
  67 + activeIndex: "0",
47 68 // 表单校验
48 69 rules: {
49   - type: [
50   - { required: true, message: "类型不能为空", trigger: "change" }
51   - ],
  70 + type: [{
  71 + required: true,
  72 + message: "类型不能为空",
  73 + trigger: "change"
  74 + }],
52 75 },
53   - settingsOpen:false,
54   - infoDialog:false,
55   - objectId:null,
56   - objectType:null,
57   - id:null,
  76 + settingsOpen: false,
  77 + infoDialog: false,
  78 + objectId: null,
  79 + objectType: null,
  80 + id: null,
  81 + object:null,
  82 + tableShow:false,
  83 + formData:null,
  84 + errorDialog:false,
  85 + errorTableShow:false,
  86 + workflowType: [
  87 + "supervision-gongdi",
  88 + "supervision_xnc",
  89 + "supervision_company",
  90 + "supervision_contract",
  91 + "supervision_company",
  92 + "supervision_contract",
  93 + "supervision_anjuan",
  94 + "supervision_casefile"
  95 + ],
58 96 };
59 97 },
60 98 created() {
61 99 this.getList();
62 100 },
63 101 methods: {
64   - getInfo(type,objectId,id){
  102 + printBody(tag){
  103 +
  104 + let body = document.body;
  105 +
  106 + document.body.innerHTML = document.getElementById(tag).innerHTML;
  107 +
  108 + window.print();
  109 +
  110 + window.location.reload();
  111 + },
  112 +
  113 + showErrorTable(obj){
  114 + this.object = obj;
  115 +
  116 +
  117 + let data = {
  118 + createTime:obj.createTime,
  119 + updateTime:obj.updateTime,
  120 + businessKey:this.workflowType[obj.type] +":"+obj.id,
  121 + }
  122 +
  123 + historyFromDataByTime(data).then(res=>{
  124 + this.formData = res.data;
  125 +
  126 + this.errorTableShow = true;
  127 + });
  128 +
  129 + },
  130 + showTable(obj){
  131 + this.object = obj;
  132 + let data = {
  133 + createTime:obj.createTime,
  134 + updateTime:obj.updateTime,
  135 + businessKey:"workflow_supervision:" + obj.id
  136 + }
  137 +
  138 + historyFromDataByTime(data).then(res=>{
  139 + this.formData = res.data;
  140 + this.tableShow = true;
  141 + });
65 142  
  143 + },
  144 + getInfo(type, objectId, id,obj) {
  145 + this.object = obj;
66 146 this.objectId = objectId;
67 147 this.id = id;
  148 + this.infoDialog = true;
68 149  
69   - if(type == 0){
  150 + if (type == 0) {
70 151 this.objectType = 2;
71   - this.infoDialog = true;
72   - }else if(type == 1){
73   - this.objectType = 3;
74   - this.infoDialog = true;
75   - }else if(type == 2){
76   - this.objectType = 0;
77   - this.infoDialog = true;
78   - }else if(type == 3){
79   - this.objectType = 4;
80   - this.infoDialog = true;
81   - }else if(type == 4){
82   - this.objectType = 1;
83   - this.infoDialog = true;
84   - }else if(type == 5){
85   - }else if(type == 6){
86   - }else if(type == 7){
  152 + this.info0 = true;
  153 + } else if (type == 1) {
  154 + this.objectType = 3;
  155 + this.info0 = true;
  156 + } else if (type == 2) {
  157 + this.objectType = 0;
  158 + this.info0 = true;
  159 + } else if (type == 3) {
  160 + this.objectType = 4;
  161 + this.info0 = true;
  162 + } else if (type == 4) {
  163 + this.objectType = 1;
  164 + this.info0 = true;
  165 + } else if (type == 5) {
  166 + this.info1 = true;
  167 + } else if (type == 6) {
  168 +
  169 + this.info2 = true;
  170 + } else if (type == 7) {
  171 + this.info3 = true;
  172 +
  173 + }
  174 +
  175 + },
  176 + getStatusName(value){
  177 + if(value == 0){
  178 + return "已提交";
  179 + }else if(value == 1){
  180 + return "通过";
  181 + }else if(value == 2){
  182 + return "审批驳回";
  183 + }else if(value == 3){
  184 + return "督办中";
  185 + }else if(value == 4){
  186 + return "已回复";
  187 + }else if(value == 5){
  188 + return "督办异常-驳回";
87 189 }
  190 + },
  191 + dialogClose() {
  192 +
  193 + this.infoDialog = false;
  194 + this.info0 = false;
  195 + this.info1 = false;
  196 + this.info2 = false;
  197 + this.info3 = false;
  198 + this.getList();
88 199  
89 200 },
90   - update(state){
91   - updateTrack({id:this.id,status:state}).then(res=>{
92   - console.log(res);
  201 + update(state) {
  202 + let data = {
  203 + id: this.id,
  204 + status: state
  205 + };
  206 + if(state == 3){
  207 + data.title = this.form.title;
  208 + data.endTime = this.form.endTime;
  209 + }
  210 +
  211 + updateTrack(data).then(res => {
  212 + if (res.code == 200) {
  213 + this.$message(res.message);
  214 + this.infoDialog = false;
  215 + this.errorDialog = false;
  216 +
  217 + this.getList();
  218 + }
93 219 });
94 220 },
95 221  
96   - saveSettings(){
97   - saveSettings(this.settings).then(res=>{
98   - if(res.code==200){
  222 + saveSettings() {
  223 + saveSettings(this.settings).then(res => {
  224 + if (res.code == 200) {
99 225  
100   - this.$message("保存成功");
101   - }
102   - this.settingsOpen = false;
  226 + this.$message("保存成功");
  227 + }
  228 + this.settingsOpen = false;
103 229 });
104 230 },
105 231 /** 查询跟踪监督列表 */
... ... @@ -145,8 +271,8 @@ export default {
145 271 this.handleQuery();
146 272 },
147 273  
148   - handleSelect(value){
149   - if(value == 99){
  274 + handleSelect(value) {
  275 + if (value == 99) {
150 276 getSettings().then(response => {
151 277 this.settings = response.data;
152 278 this.settingsOpen = true;
... ... @@ -163,7 +289,7 @@ export default {
163 289 // 多选框选中数据
164 290 handleSelectionChange(selection) {
165 291 this.ids = selection.map(item => item.id)
166   - this.single = selection.length!==1
  292 + this.single = selection.length !== 1
167 293 this.multiple = !selection.length
168 294 },
169 295 /** 新增按钮操作 */
... ... @@ -206,28 +332,28 @@ export default {
206 332 handleDelete(row) {
207 333 const ids = row.id || this.ids;
208 334 this.$confirm('是否确认删除跟踪监督编号为"' + ids + '"的数据项?', "警告", {
209   - confirmButtonText: "确定",
210   - cancelButtonText: "取消",
211   - type: "warning"
212   - }).then(function() {
213   - return delTrack(ids);
214   - }).then(() => {
215   - this.getList();
216   - this.msgSuccess("删除成功");
217   - })
  335 + confirmButtonText: "确定",
  336 + cancelButtonText: "取消",
  337 + type: "warning"
  338 + }).then(function() {
  339 + return delTrack(ids);
  340 + }).then(() => {
  341 + this.getList();
  342 + this.msgSuccess("删除成功");
  343 + })
218 344 },
219 345 /** 导出按钮操作 */
220 346 handleExport() {
221 347 const queryParams = this.queryParams;
222 348 this.$confirm('是否确认导出所有跟踪监督数据项?', "警告", {
223   - confirmButtonText: "确定",
224   - cancelButtonText: "取消",
225   - type: "warning"
226   - }).then(function() {
227   - return exportTrack(queryParams);
228   - }).then(response => {
229   - this.download(response.msg);
230   - })
  349 + confirmButtonText: "确定",
  350 + cancelButtonText: "取消",
  351 + type: "warning"
  352 + }).then(function() {
  353 + return exportTrack(queryParams);
  354 + }).then(response => {
  355 + this.download(response.msg);
  356 + })
231 357 }
232 358 }
233 359 };
... ...
trash-ui/src/api/vio_casefile_info.js
... ... @@ -48,7 +48,7 @@ export default {
48 48 let files = JSON.stringify(response.data.uploadFiles);
49 49 this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name"));
50 50 this.fileEntityList.map(item => {
51   - if (item.url.indexOf(".jpg") > -1 || item.url.indexOf(".png") > -1 || item.url.indexOf(".jpeg") > -1 || item.url.indexOf(".jpg") > -1) {
  51 + if (item.url.indexOf(".jpg") > -1 || item.url.indexOf(".png") > -1 || item.url.indexOf(".jpeg") > -1) {
52 52 this.slide1.push(process.env.VUE_APP_BASE_API + item.url);
53 53 }
54 54 if (item.url.indexOf(".mp4") > -1 || item.url.indexOf(".avi") > -1) {
... ... @@ -62,15 +62,7 @@ export default {
62 62 historyFromData("workflow_casefile" + ":" + id).then(response => {
63 63 let newRep = [];
64 64  
65   - if(response.data.length - array.length == 2){
66   - let obj = response.data[response.data.length -1];
67   - let data = {
68   - reply:obj.controlValue,
69   - replyPeople:obj.createBy,
70   - replyTime:obj.createTime
71   - };
72   - newRep.push(data);
73   - }
  65 +
74 66  
75 67  
76 68 let obj = response.data[0];
... ... @@ -80,7 +72,7 @@ export default {
80 72 replyPeople:obj.createBy,
81 73 replyTime:obj.createTime
82 74 };
83   -
  75 +
84 76 newRep.push(data);
85 77 }
86 78  
... ... @@ -88,7 +80,15 @@ export default {
88 80 newRep.push(array[j]);
89 81 }
90 82  
91   -
  83 + if(response.data.length - array.length == 2){
  84 + let obj = response.data[response.data.length -1];
  85 + let data = {
  86 + reply:obj.controlValue,
  87 + replyPeople:obj.createBy,
  88 + replyTime:obj.createTime
  89 + };
  90 + newRep.push(data);
  91 + }
92 92  
93 93 this.replyApprovalProcessList = newRep;
94 94 this.$forceUpdate();
... ... @@ -105,7 +105,15 @@ export default {
105 105 const a = document.createElement('a')
106 106 a.setAttribute('download', name)
107 107 a.setAttribute('target', '_blank')
108   - a.setAttribute('href', process.env.VUE_APP_BASE_API + url);
  108 +
  109 + if(url.startsWith("http")){
  110 +
  111 + a.setAttribute('href', url);
  112 + }else{
  113 +
  114 + a.setAttribute('href', process.env.VUE_APP_BASE_API + url);
  115 + }
  116 +
109 117 a.click()
110 118 },
111 119 openImage(path) {
... ... @@ -117,6 +125,11 @@ export default {
117 125 }
118 126 },
119 127 downloadFile(path) {
  128 + debugger;
  129 + if(path.startsWith("http")){
  130 + window.location.href = path;
  131 + return;
  132 + }
120 133 window.location.href = process.env.VUE_APP_BASE_API + "/business/threestep/download?path=" + encodeURI(path);
121 134 },
122 135 showFile(path) {
... ...
trash-ui/src/api/vio_warning_info.js
... ... @@ -62,16 +62,7 @@ export default {
62 62 historyFromData("violation_warning" + ":" + id).then(response => {
63 63 let newRep = [];
64 64  
65   - if(response.data.length - array.length == 2){
66   - let obj = response.data[response.data.length -1];
67   - let data = {
68   - reply:obj.controlValue,
69   - replyPeople:obj.createBy,
70   - replyTime:obj.createTime
71   - };
72   - newRep.push(data);
73   - }
74   -
  65 +
75 66 let obj = response.data[0];
76 67 if(obj){
77 68 let data = {
... ... @@ -87,7 +78,16 @@ export default {
87 78 for(let j in array){
88 79 newRep.push(array[j]);
89 80 }
90   -
  81 + if(response.data.length - array.length == 2){
  82 + let obj = response.data[response.data.length -1];
  83 + let data = {
  84 + reply:obj.controlValue,
  85 + replyPeople:obj.createBy,
  86 + replyTime:obj.createTime
  87 + };
  88 + newRep.push(data);
  89 + }
  90 +
91 91 this.replyApprovalProcessList = newRep;
92 92 this.$forceUpdate();
93 93 });
... ...
trash-ui/src/views/business/track/index.vue
... ... @@ -89,7 +89,7 @@
89 89 <el-table-column label="序号" align="center" type="index" />
90 90 <el-table-column label="督查事项" align="center" prop="title">
91 91 <template slot-scope="scope">
92   - <a @click="getInfo(scope.row.type,scope.row.objectId,scope.row.id);">{{ (scope.row.title)}}</a>
  92 + <a @click="getInfo(scope.row.type,scope.row.objectId,scope.row.id,scope.row);">{{ (scope.row.title)}}</a>
93 93 </template>
94 94 </el-table-column>
95 95 <el-table-column label="所属区域" align="center" prop="place" />
... ... @@ -105,7 +105,15 @@
105 105 </el-table-column>
106 106 <el-table-column label="督察结果" align="center" prop="status" >
107 107 <template slot-scope="scope">
108   - <span>{{ (scope.row.status == 1 ? "审批通过" : "")}}</span>
  108 + <span>
  109 + {{ getStatusName(scope.row.status)}}
  110 + </span>
  111 +
  112 + <el-button v-if="scope.row.status == 1" @click="showTable(scope.row)">督查情况表</el-button>
  113 +
  114 + <el-button v-if="scope.row.status == 4" @click="showErrorTable(scope.row)">整改交办单</el-button>
  115 +
  116 +
109 117 </template>
110 118 </el-table-column>
111 119 </el-table>
... ... @@ -117,13 +125,112 @@
117 125 :limit.sync="queryParams.pageSize"
118 126 @pagination="getList"
119 127 />
  128 + <el-dialog title="" :visible.sync="tableShow" width="800px" append-to-body v-if="formData && tableShow" >
  129 + <el-button @click="printBody('table');" :style="{'display':hide}">打印</el-button>
  130 +
  131 + <div id="table">
  132 + <el-row class="bd_bottom bd_top" >
  133 + <el-col :span="24" class="bd_left bd_right bd_padding" style="text-align: center;font-weight: bold;">督查情况表</el-col>
  134 + </el-row>
  135 + <el-row class="bd_bottom" >
  136 + <el-col :span="6" class="bd_left bd_right bd_padding">督查情况</el-col>
  137 + <el-col :span="18" class="bd_right bd_padding">{{formData[0].controlValue}}</el-col>
  138 + </el-row>
  139 + <el-row class="bd_bottom" >
  140 + <el-col :span="6" class="bd_left bd_right bd_padding">督查人员</el-col>
  141 + <el-col :span="6" class="bd_right bd_padding">{{formData[0].createBy}}</el-col>
  142 + <el-col :span="6" class="bd_right bd_padding ">督查时间</el-col>
  143 + <el-col :span="6" class="bd_right bd_padding">{{object.createTime}}</el-col>
  144 + </el-row>
  145 + <el-row class="bd_bottom" >
  146 + <el-col :span="6" class="bd_left bd_right bd_padding">领导意见</el-col>
  147 + <el-col :span="18" class="bd_right bd_padding bd_right ">{{formData[1].controlValue}}</el-col>
  148 + </el-row>
  149 + <el-row class="bd_bottom" >
  150 + <el-col :span="6" class="bd_left bd_right bd_padding">领导签名</el-col>
  151 + <el-col :span="6" class="bd_right bd_padding">{{formData[1].createBy}}</el-col>
  152 + <el-col :span="6" class="bd_right bd_padding">时间</el-col>
  153 + <el-col :span="6" class="bd_right bd_padding">{{object.updateTime}}</el-col>
  154 + </el-row>
  155 + </div>
  156 + </el-dialog>
  157 +
  158 + <el-dialog title="详情" :visible.sync="infoDialog" width="1500px" append-to-body :before-close="dialogClose">
  159 + <companyInfo :businessKey="objectId" :businessType="objectType" v-if="info0"/>
  160 + <logisticsInfo :idInfo="objectId" v-if="info1"/>
  161 + <caseOfflineInfo :businessKey="objectId" v-if="info2"/>
  162 + <violationCaseFileInfo :idInfo="objectId" v-if="info3" />
  163 +
  164 +
  165 + <div slot="footer" class="dialog-footer" v-if="object">
  166 + <el-button type="success" @click="update(0)" :disabled="object.status != -1 && object.status != 2 && object.status != 5">督察通过</el-button>
  167 + <el-button type="danger" @click="errorDialog = true;" :disabled="object.status != -1 && object.status != 2 && object.status != 5">督察异常</el-button>
  168 + </div>
  169 + </el-dialog>
  170 +
  171 + <el-dialog title="" :visible.sync="errorTableShow" width="800px" append-to-body v-if="formData && errorTableShow" >
  172 + <el-button @click="printBody('table1');" :style="{'display':hide}">打印</el-button>
120 173  
121   - <el-dialog title="详情" :visible.sync="infoDialog" width="1500px" append-to-body>
122   - <companyInfo :businessKey="objectId" :businessType="objectType" v-if="infoDialog"/>
  174 + <div id="table1">
  175 + <el-row class="bd_bottom bd_top" >
  176 + <el-col :span="24" class="bd_left bd_right bd_padding" style="text-align: center;font-weight: bold;">整改交办单</el-col>
  177 + </el-row>
  178 + <el-row class="bd_bottom" >
  179 + <el-col :span="6" class="bd_left bd_right bd_padding">督查情况</el-col>
  180 + <el-col :span="18" class="bd_right bd_padding">{{formData[0].controlValue}}</el-col>
  181 + </el-row>
  182 + <el-row class="bd_bottom" >
  183 + <el-col :span="6" class="bd_left bd_right bd_padding">责任部门</el-col>
  184 + <el-col :span="6" class="bd_right bd_padding">{{formData[0].createBy}}</el-col>
  185 + <el-col :span="6" class="bd_right bd_padding ">回复期限</el-col>
  186 + <el-col :span="6" class="bd_right bd_padding">{{formData[0].controlValue.split("回复期限:")[1]}}</el-col>
  187 + </el-row>
123 188  
  189 + <el-row class="bd_bottom" >
  190 + <el-col :span="6" class="bd_left bd_right bd_padding">部门处理回复</el-col>
  191 + <el-col :span="18" class="bd_right bd_padding bd_right ">{{formData[1].controlValue}}</el-col>
  192 + </el-row>
  193 + <el-row class="bd_bottom" >
  194 + <el-col :span="6" class="bd_left bd_right bd_padding">部门负责人</el-col>
  195 + <el-col :span="6" class="bd_right bd_padding">{{formData[1].createBy}}</el-col>
  196 + <el-col :span="6" class="bd_right bd_padding">回复时间</el-col>
  197 + <el-col :span="6" class="bd_right bd_padding">{{formData[1].createTime}}</el-col>
  198 + </el-row>
  199 + <el-row class="bd_bottom" >
  200 + <el-col :span="6" class="bd_left bd_right bd_padding">纪检意见</el-col>
  201 + <el-col :span="18" class="bd_right bd_padding bd_right ">{{formData[2].controlValue}}</el-col>
  202 + </el-row>
  203 + <el-row class="bd_bottom" >
  204 + <el-col :span="6" class="bd_left bd_right bd_padding">纪检人员</el-col>
  205 + <el-col :span="6" class="bd_right bd_padding">{{formData[2].createBy}}</el-col>
  206 + <el-col :span="6" class="bd_right bd_padding">时间</el-col>
  207 + <el-col :span="6" class="bd_right bd_padding">{{formData[2].createTime}}</el-col>
  208 + </el-row>
  209 + <el-row class="bd_bottom" >
  210 + <el-col :span="6" class="bd_left bd_right bd_padding">领导意见</el-col>
  211 + <el-col :span="18" class="bd_right bd_padding bd_right ">{{formData[3].controlValue}}</el-col>
  212 + </el-row>
  213 + <el-row class="bd_bottom" >
  214 + <el-col :span="6" class="bd_left bd_right bd_padding">领导签名</el-col>
  215 + <el-col :span="6" class="bd_right bd_padding">{{formData[3].createBy}}</el-col>
  216 + <el-col :span="6" class="bd_right bd_padding">时间</el-col>
  217 + <el-col :span="6" class="bd_right bd_padding">{{formData[3].createTime}}</el-col>
  218 + </el-row>
  219 + </div>
  220 + </el-dialog>
  221 +
  222 +
  223 + <el-dialog title="纪检异常交办" :visible.sync="errorDialog" width="500px" append-to-body v-loading="loading">
  224 +
  225 + <el-input type="textarea" rows="4" v-model="form.title" placeholder="交办缘由" />
  226 +
  227 + <el-input v-model="form.endTime" placeholder="天" type="number"
  228 + oninput="if(value){value=value.replace(/[^\d]/g,'')} if(value<=1){value=1} if(value>365){value=365}"/>
  229 +
  230 + </el-form>
124 231 <div slot="footer" class="dialog-footer">
125   - <el-button type="success" @click="update(0)">督察通过</el-button>
126   - <el-button type="danger" @click="update(3)">督察异常</el-button>
  232 + <el-button type="primary" @click="update(3)">保存</el-button>
  233 + <el-button @click="errorDialog = false;">退出</el-button>
127 234 </div>
128 235 </el-dialog>
129 236  
... ... @@ -329,3 +436,26 @@
329 436  
330 437  
331 438 <script src="../../../api/track.js" />
  439 +
  440 +<style>
  441 + .bd_padding{
  442 + font-size: 14px;
  443 + padding:10px;
  444 + }
  445 +
  446 + .bd_right {
  447 + border-right: 1px solid black;
  448 + }
  449 +
  450 + .bd_left {
  451 + border-left: 1px solid black;
  452 + }
  453 +
  454 + .bd_top {
  455 + border-top: 1px solid black;
  456 + }
  457 +
  458 + .bd_bottom {
  459 + border-bottom: 1px solid black;
  460 + }
  461 +</style>
... ...
trash-ui/vue.config.js
... ... @@ -8,7 +8,7 @@ function resolve(dir) {
8 8  
9 9 const name = defaultSettings.title || 'WorkFlowSystem' // 标题
10 10  
11   -const port = process.env.port || process.env.npm_config_port || 80 // 端口
  11 +const port = process.env.port || process.env.npm_config_port || 8081 // 端口
12 12  
13 13 // vue.config.js 配置说明
14 14 //官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
... ...
trash-workFlow/src/main/java/com/trash/business/domain/SupervisionTrack.java
... ... @@ -43,7 +43,21 @@ public class SupervisionTrack extends BaseEntity
43 43 /** 基础数据ID */
44 44 @Excel(name = "基础数据ID")
45 45 private String objectId;
  46 +
  47 + String endTime;
46 48  
  49 + @Override
  50 + public String getEndTime() {
  51 + // TODO Auto-generated method stub
  52 + return super.getEndTime();
  53 + }
  54 +
  55 + @Override
  56 + public void setEndTime(String endTime) {
  57 + // TODO Auto-generated method stub
  58 + super.setEndTime(endTime);
  59 + }
  60 +
47 61 public void setId(Long id)
48 62 {
49 63 this.id = id;
... ...
trash-workFlow/src/main/java/com/trash/business/service/impl/SupervisionTrackServiceImpl.java
... ... @@ -144,33 +144,35 @@ public class SupervisionTrackServiceImpl implements ISupervisionTrackService
144 144 int i = supervisionTrackMapper.updateSupervisionTrack(supervisionTrack);
145 145  
146 146 if(i == 1){
147   - supervisionTrack = supervisionTrackMapper.selectSupervisionTrackById(supervisionTrack.getId());
  147 + SupervisionTrack st = supervisionTrackMapper.selectSupervisionTrackById(supervisionTrack.getId());
148 148  
149 149  
150 150 Map data = new HashMap<>();
151 151  
152   - data.put("id", supervisionTrack.getId() + "");
  152 + data.put("id", st.getId() + "");
153 153  
154 154 if(supervisionTrack.getStatus() == 0){
155 155 map.put("type", workflow_supervision);
156 156 data.put("startTime", sdf.format(new Date()));
157 157 data.put("endTime", data.get("startTime"));
158 158 data.put("type", "督查通过");
159   - data.put("title", "督查通过:" + supervisionTrack.getTitle());
160   - data.put("reason", "督查通过:" + supervisionTrack.getTitle());
  159 +
  160 +
  161 + data.put("title", st.getTitle() + ",督查通过");
  162 + data.put("reason", st.getTitle()+ ",督查通过");
161 163 }else{
162   - map.put("type", workflow[supervisionTrack.getType()]);
  164 + map.put("type", workflow[st.getType()]);
163 165  
164 166 Date date = new Date();
165 167  
166 168 data.put("startTime", sdf.format(date));
167 169  
168   - date.setDate(date.getDate() + Integer.parseInt(getTimeOutParams()[supervisionTrack.getType()*3]));
  170 + date.setDate(date.getDate() + Integer.parseInt(supervisionTrack.getEndTime()));
169 171  
170 172 data.put("type", "督查异常");
171 173 data.put("endTime", sdf.format(date));
172   - data.put("title", "督查异常:" + supervisionTrack.getTitle());
173   - data.put("reason", "督查异常:" + supervisionTrack.getTitle());
  174 + data.put("title", st.getTitle() + ",督查异常" );
  175 + data.put("reason", "交办缘由:"+supervisionTrack.getTitle()+" 回复期限:"+supervisionTrack.getEndTime()+"天");
174 176 }
175 177  
176 178  
... ...
trash-workFlow/src/main/java/com/trash/casefile/controller/ViolationCaseFileController.java
... ... @@ -52,8 +52,8 @@ public class ViolationCaseFileController extends BaseController {
52 52 @GetMapping("/list")
53 53 public TableDataInfo list(ViolationCaseFile violationCaseFile) {
54 54 startPage();
55   -
56   - return getDataTable(violationCaseFileService.selectViolationCaseFileList(violationCaseFile));
  55 + List<ViolationCaseFile> list = violationCaseFileService.selectViolationCaseFileList(violationCaseFile);
  56 + return getDataTable(list);
57 57 }
58 58  
59 59 /**
... ... @@ -65,7 +65,7 @@ public class ViolationCaseFileController extends BaseController {
65 65 List<ViolationCaseFile> list = violationCaseFileService.selectViolationCaseFileList(violationCaseFile);
66 66  
67 67 for (int i = 0; i < list.size(); i++) {
68   - list.get(i).setId((long) i + 1);
  68 + list.get(i).setId((i + 1)+"");
69 69 }
70 70 ExcelUtil<ViolationCaseFile> util = new ExcelUtil<ViolationCaseFile>(ViolationCaseFile.class);
71 71 return util.exportExcel(list, "平台违规案卷数据");
... ... @@ -75,7 +75,7 @@ public class ViolationCaseFileController extends BaseController {
75 75 * 获取平台违规案卷详细信息
76 76 */
77 77 @GetMapping(value = "/{id}")
78   - public AjaxResult getInfo(@PathVariable("id") Long id) {
  78 + public AjaxResult getInfo(@PathVariable("id") String id) {
79 79 return AjaxResult.success(violationCaseFileService.selectViolationCaseFileById(id));
80 80 }
81 81  
... ... @@ -87,7 +87,13 @@ public class ViolationCaseFileController extends BaseController {
87 87 @RepeatSubmit
88 88 public AjaxResult add(@RequestParam(value = "fileList") MultipartFile[] files, ViolationCaseFile violationCaseFile)
89 89 throws IOException {
90   - return toAjax(violationCaseFileService.insertViolationCaseFile(files, violationCaseFile));
  90 +
  91 +
  92 + int i = violationCaseFileService.insertViolationCaseFile(files, violationCaseFile);
  93 + if(i==2){
  94 + return AjaxResult.error("上报综管失败");
  95 + }
  96 + return toAjax(i);
91 97 }
92 98  
93 99 /**
... ... @@ -191,7 +197,7 @@ public class ViolationCaseFileController extends BaseController {
191 197 */
192 198 @Log(title = "平台违规案卷", businessType = BusinessType.DELETE)
193 199 @DeleteMapping("/{ids}")
194   - public AjaxResult remove(@PathVariable Long[] ids) throws IOException {
  200 + public AjaxResult remove(@PathVariable String[] ids) throws IOException {
195 201 return toAjax(violationCaseFileService.deleteViolationCaseFileByIds(ids));
196 202 }
197 203 }
... ...
trash-workFlow/src/main/java/com/trash/casefile/domain/ViolationCaseFile.java
... ... @@ -24,7 +24,7 @@ public class ViolationCaseFile extends BaseEntity
24 24  
25 25 /** $column.columnComment */
26 26 @Excel(name = "序号")
27   - private Long id;
  27 + private String id;
28 28  
29 29 /** 案卷编号 */
30 30 private String number;
... ... @@ -96,18 +96,14 @@ public class ViolationCaseFile extends BaseEntity
96 96 }
97 97  
98 98 public ViolationCaseFile(JSONObject json) {
99   - this.id = json.getLong("taskId");
  99 + this.id = json.getString("taskId");
100 100 this.number = json.getString("evtId");
101 101 this.setCreateBy(json.getString("reporter"));
102 102  
103   - SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy");
104   -
105   - try {
106   - this.createTime = sdf.parse(json.getString("reportTime"));
107   - } catch (ParseException e) {
108   - this.createTime = new Date();
109   - e.printStackTrace();
110   - }
  103 + Date d = new Date(json.getString("reportTime"));
  104 +
  105 + this.createTime = d;
  106 +
111 107  
112 108 this.projectName = json.getString("caseClassName");
113 109  
... ... @@ -117,7 +113,6 @@ public class ViolationCaseFile extends BaseEntity
117 113  
118 114 this.needUpload = 1;
119 115  
120   -
121 116 }
122 117  
123 118 public short getNeedUpload() {
... ... @@ -172,12 +167,12 @@ public class ViolationCaseFile extends BaseEntity
172 167 this.abbreviation = abbreviation;
173 168 }
174 169  
175   - public void setId(Long id)
  170 + public void setId(String id)
176 171 {
177 172 this.id = id;
178 173 }
179 174  
180   - public Long getId()
  175 + public String getId()
181 176 {
182 177 return id;
183 178 }
... ...
trash-workFlow/src/main/java/com/trash/casefile/mapper/ViolationCaseFileMapper.java
... ... @@ -18,7 +18,7 @@ public interface ViolationCaseFileMapper
18 18 * @param id 平台违规案卷ID
19 19 * @return 平台违规案卷
20 20 */
21   - ViolationCaseFile selectViolationCaseFileById(Long id);
  21 + ViolationCaseFile selectViolationCaseFileById(String id);
22 22  
23 23 /**
24 24 * 查询平台违规案卷列表
... ... @@ -52,7 +52,7 @@ public interface ViolationCaseFileMapper
52 52 * @param id 平台违规案卷ID
53 53 * @return 结果
54 54 */
55   - int deleteViolationCaseFileById(Long id);
  55 + int deleteViolationCaseFileById(String id);
56 56  
57 57 /**
58 58 * 批量删除平台违规案卷
... ... @@ -60,6 +60,6 @@ public interface ViolationCaseFileMapper
60 60 * @param ids 需要删除的数据ID
61 61 * @return 结果
62 62 */
63   - int deleteViolationCaseFileByIds(Long[] ids);
  63 + int deleteViolationCaseFileByIds(String[] ids);
64 64  
65 65 }
... ...
trash-workFlow/src/main/java/com/trash/casefile/service/IViolationCaseFileService.java
... ... @@ -20,7 +20,7 @@ public interface IViolationCaseFileService
20 20 * @param id 平台违规案卷ID
21 21 * @return 平台违规案卷
22 22 */
23   - ViolationCaseFileVo selectViolationCaseFileById(Long id);
  23 + ViolationCaseFileVo selectViolationCaseFileById(String id);
24 24  
25 25 /**
26 26 * 查询平台违规案卷列表
... ... @@ -54,7 +54,7 @@ public interface IViolationCaseFileService
54 54 * @param ids 需要删除的平台违规案卷ID
55 55 * @return 结果
56 56 */
57   - int deleteViolationCaseFileByIds(Long[] ids) throws IOException;
  57 + int deleteViolationCaseFileByIds(String[] ids) throws IOException;
58 58  
59 59 /**
60 60 * 删除平台违规案卷信息
... ... @@ -62,7 +62,7 @@ public interface IViolationCaseFileService
62 62 * @param id 平台违规案卷ID
63 63 * @return 结果
64 64 */
65   - int deleteViolationCaseFileById(Long id);
  65 + int deleteViolationCaseFileById(String id);
66 66  
67 67 void updateViolationCaseFile(ViolationCaseFile caseOffline);
68 68 }
... ...
trash-workFlow/src/main/java/com/trash/casefile/service/impl/ViolationCaseFileServiceImpl.java
... ... @@ -2,27 +2,29 @@ package com.trash.casefile.service.impl;
2 2  
3 3 import java.io.IOException;
4 4 import java.sql.Date;
  5 +import java.text.SimpleDateFormat;
5 6 import java.util.ArrayList;
  7 +import java.util.HashMap;
6 8 import java.util.List;
  9 +import java.util.Map;
7 10 import java.util.stream.Collectors;
8 11  
9   -import com.alibaba.fastjson.JSONArray;
10   -import com.alibaba.fastjson.JSONObject;
11   -import com.trash.common.core.redis.RedisCache;
12   -import com.trash.common.utils.StringUtils;
13 12 import org.springframework.beans.factory.annotation.Autowired;
14 13 import org.springframework.stereotype.Service;
15 14 import org.springframework.transaction.annotation.Transactional;
16 15 import org.springframework.web.multipart.MultipartFile;
17 16  
  17 +import com.alibaba.fastjson.JSONArray;
  18 +import com.alibaba.fastjson.JSONObject;
18 19 import com.trash.casefile.domain.ViolationCaseFile;
19   -import com.trash.casefile.domain.ViolationWarningInformation;
20 20 import com.trash.casefile.domain.vo.ViolationCaseFileVo;
21 21 import com.trash.casefile.mapper.ViolationCaseFileMapper;
22 22 import com.trash.casefile.service.IViolationCaseFileService;
  23 +import com.trash.common.core.redis.RedisCache;
23 24 import com.trash.common.utils.DateUtils;
24 25 import com.trash.common.utils.RemoteServerUtils;
25 26 import com.trash.common.utils.SecurityUtils;
  27 +import com.trash.common.utils.StringUtils;
26 28 import com.trash.common.utils.file.FileUploadUtils;
27 29 import com.trash.office.domain.UploadFile;
28 30 import com.trash.office.mapper.UploadFileMapper;
... ... @@ -54,7 +56,7 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService
54 56 * @return 平台违规案卷
55 57 */
56 58 @Override
57   - public ViolationCaseFileVo selectViolationCaseFileById(Long id)
  59 + public ViolationCaseFileVo selectViolationCaseFileById(String id)
58 60 {
59 61 ViolationCaseFileVo violationCaseFileVo = new ViolationCaseFileVo();
60 62 violationCaseFileVo.setViolationCaseFile(violationCaseFileMapper.selectViolationCaseFileById(id));
... ... @@ -190,22 +192,91 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService
190 192 }
191 193 }
192 194  
193   - System.out.print(violationCaseFile.getViolationObjectType().equals("2"));
194 195 if(violationCaseFile.getViolationObjectType().equals("2")) {
195 196 violationCaseFile.setProjectName(violationCaseFile.getCompanyName());
196 197 }
197 198  
198 199 Integer result = violationCaseFileMapper.insertViolationCaseFile(violationCaseFile);
  200 +
  201 + List<Map<String,String>> upfiles = new ArrayList();
199 202 //文件上传
200 203 for (MultipartFile file : files) {
201 204 UploadFile uploadFile = new UploadFile();
202 205 uploadFile.setTableName("violation_case_file");
203 206 uploadFile.setTableNumber(violationCaseFile.getId().toString());
204 207 uploadFile.setFileName(file.getOriginalFilename());
205   - uploadFile.setFilePath(FileUploadUtils.uploadFile(file));
  208 + String path = FileUploadUtils.uploadFile(file);
  209 + uploadFile.setFilePath(path);
206 210 uploadFileMapper.insertUploadFile(uploadFile);
  211 +
  212 +
  213 + if(violationCaseFile.getNeedUpload() == 1){
  214 + Map map = new HashMap();
  215 +
  216 + if(file.getOriginalFilename().toUpperCase().endsWith("JPG")
  217 + || file.getOriginalFilename().toUpperCase().endsWith("PNG")
  218 + || file.getOriginalFilename().toUpperCase().endsWith("JPEG")){
  219 + map.put("attchType", 0);
  220 + }else if(file.getOriginalFilename().toUpperCase().endsWith("MP3")){
  221 + map.put("attchType", 1);
  222 + }else if(file.getOriginalFilename().toUpperCase().endsWith("MP4") || file.getOriginalFilename().toUpperCase().endsWith("AVI")){
  223 + map.put("attchType", 2);
  224 + }
  225 +
  226 + map.put("attchFileName", file.getOriginalFilename());
  227 + map.put("attchFilePath", "http://101.95.0.106:10001/workflow" + path);
  228 +
  229 +
  230 + upfiles.add(map);
  231 +
  232 + }
  233 +
207 234 }
208 235  
  236 + if(violationCaseFile.getNeedUpload() == 1){
  237 +
  238 + Map params = new HashMap<>();
  239 +
  240 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  241 +
  242 +
  243 + JSONArray array = RemoteServerUtils.getUpArea();
  244 +
  245 + for(Object object:array){
  246 + JSONObject json = (JSONObject) object;
  247 +
  248 + if(json.getString("areaName").equals(violationCaseFile.getOwningRegion())){
  249 +
  250 + params.put("areaCode",json.getString("areaCode"));
  251 + break;
  252 + }
  253 +
  254 + }
  255 +
  256 +
  257 + JSONObject classObj = RemoteServerUtils.getUpClass();
  258 +
  259 +
  260 + params.put("areaName",violationCaseFile.getOwningRegion());
  261 + params.put("caseSource","01");
  262 + params.put("caseClassId","1712034951982526466");
  263 + params.put("position","未填写");
  264 + params.put("questionDesc",violationCaseFile.getDescribe());
  265 + params.put("reportTime",sdf.format(new java.util.Date()));
  266 + params.put("reporter",SecurityUtils.getUsername());
  267 + params.put("thirdCaseId",violationCaseFile.getId());
  268 + params.put("geoX",0);
  269 + params.put("geoY",0);
  270 + params.put("attchList",upfiles);
  271 + if(!RemoteServerUtils.insertUpCase(params)){
  272 + violationCaseFileMapper.deleteViolationCaseFileById(violationCaseFile.getId());
  273 + return 2;
  274 + }
  275 +
  276 + return result;
  277 + }
  278 +
  279 +
209 280 int i = 0;
210 281 //根据发送对象判断流程
211 282 if(violationCaseFile.getSendObject().equals("区管理部门")){
... ... @@ -220,6 +291,7 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService
220 291 i = 2;
221 292 }
222 293  
  294 +
223 295 WorkflowService.createCaseFile(violationCaseFile,i);
224 296  
225 297 return result;
... ... @@ -286,7 +358,7 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService
286 358 * @return 结果
287 359 */
288 360 @Override
289   - public int deleteViolationCaseFileByIds(Long[] ids) throws IOException
  361 + public int deleteViolationCaseFileByIds(String[] ids) throws IOException
290 362 {
291 363 return violationCaseFileMapper.deleteViolationCaseFileByIds(ids);
292 364 }
... ... @@ -298,7 +370,7 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService
298 370 * @return 结果
299 371 */
300 372 @Override
301   - public int deleteViolationCaseFileById(Long id)
  373 + public int deleteViolationCaseFileById(String id)
302 374 {
303 375 return violationCaseFileMapper.deleteViolationCaseFileById(id);
304 376 }
... ...
trash-workFlow/src/main/java/com/trash/workflow/listener/SupervisionListener.java
1 1 package com.trash.workflow.listener;
2 2  
  3 +import com.trash.business.domain.SupervisionTrack;
  4 +import com.trash.business.mapper.SupervisionTrackMapper;
  5 +import com.trash.casefile.service.IViolationCaseFileService;
3 6 import com.trash.common.utils.RemoteServerUtils;
  7 +import com.trash.common.utils.spring.SpringUtils;
4 8 import com.trash.workflow.service.IWorkflowService;
5 9 import org.activiti.engine.delegate.DelegateExecution;
6 10 import org.activiti.engine.delegate.ExecutionListener;
... ... @@ -8,6 +12,7 @@ import org.activiti.engine.delegate.Expression;
8 12 import org.springframework.beans.factory.annotation.Autowired;
9 13  
10 14 import java.util.ArrayList;
  15 +import java.util.Date;
11 16 import java.util.HashMap;
12 17 import java.util.List;
13 18 import java.util.Map;
... ... @@ -26,25 +31,17 @@ public class SupervisionListener implements ExecutionListener {
26 31  
27 32 List<Map> maps = new ArrayList<Map>();
28 33  
29   - Map<String,Object> map = new HashMap<>();
  34 +
  35 + SupervisionTrack supervisionTrack = new SupervisionTrack();
30 36  
31   - map.put("id", delegateExecution.getProcessInstanceBusinessKey().split(":")[1]);
32   - map.put("supervisionResult", 2);
33   - if(delegateExecution.getProcessDefinitionId().contains("gongdi")){
34   - map.put("type",0);
35   - }else if(delegateExecution.getProcessInstanceBusinessKey().contains("xnc")){
36   - map.put("type",1);
37   - }else if (delegateExecution.getProcessInstanceBusinessKey().contains("anjuan")){//案卷暂时不用
38   - map.put("type",3);
39   - }else{
40   - map.put("type",2);
41   - }
42   -
43   - maps.add(map);
  37 + supervisionTrack.setId(Long.parseLong(delegateExecution.getProcessInstanceBusinessKey().split(":")[1]));
  38 + supervisionTrack.setStatus(Integer.parseInt(state.getValue(delegateExecution).toString()));
  39 + supervisionTrack.setUpdateTime(new Date());
44 40  
45   - Object obj = RemoteServerUtils.UpdateSupervisionStatus(maps);
  41 + SpringUtils.getBean(SupervisionTrackMapper.class).updateSupervisionTrack(supervisionTrack);
  42 +
46 43  
47   - workflowUtils.sendDataToHisTory(delegateExecution, state,String.valueOf(obj));
  44 + workflowUtils.sendDataToHisTory(delegateExecution, state,null);
48 45  
49 46  
50 47 System.out.println("纪检督察流程状态更新 更新ID:" + delegateExecution.getProcessInstanceBusinessKey() + "状态:" + state.getValue(delegateExecution).toString());
... ...
trash-workFlow/src/main/java/com/trash/workflow/listener/casefileListener.java
... ... @@ -25,7 +25,7 @@ public class casefileListener implements ExecutionListener {
25 25  
26 26 ViolationCaseFile caseOffline = new ViolationCaseFile();
27 27  
28   - caseOffline.setId(Long.parseLong(delegateExecution.getProcessInstanceBusinessKey().split(":")[1]));
  28 + caseOffline.setId(delegateExecution.getProcessInstanceBusinessKey().split(":")[1]);
29 29  
30 30 caseOffline.setStatus(Integer.parseInt(state.getValue(delegateExecution).toString()));
31 31  
... ...
trash-workFlow/src/main/java/com/trash/workflow/service/impl/WorkflowServiceImpl.java
... ... @@ -178,6 +178,7 @@ public class WorkflowServiceImpl implements IWorkflowService {
178 178 workflow.setState("0");
179 179 workflow.setCreateTime(new Date());
180 180 workflow.setCreateBy(user.getUserName());
  181 + workflow.setCreateName(user.getUserName());
181 182  
182 183 awf = insertAwf(user,workflow);
183 184  
... ... @@ -200,7 +201,7 @@ public class WorkflowServiceImpl implements IWorkflowService {
200 201  
201 202 if(user == null){
202 203 user = new SysUser();
203   - user.setUserName("定时器");
  204 + user.setUserName("长沙市建筑垃圾智慧监管平台");
204 205 }
205 206  
206 207 ActWorkflowFormData awf;
... ...
trash-workFlow/src/main/resources/mapper/SupervisionTrackMapper.xml
... ... @@ -72,17 +72,9 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
72 72 <update id="updateSupervisionTrack" parameterType="SupervisionTrack">
73 73 update supervision_track
74 74 <trim prefix="SET" suffixOverrides=",">
75   - <if test="type != null">type = #{type},</if>
76   - <if test="title != null">title = #{title},</if>
77   - <if test="dept != null">dept = #{dept},</if>
78   - <if test="place != null">place = #{place},</if>
79   - <if test="createBy != null">create_by = #{createBy},</if>
80   - <if test="createTime != null">create_time = #{createTime},</if>
81 75 <if test="updateTime != null">update_time = #{updateTime},</if>
82 76 <if test="updateBy != null">update_by = #{updateBy},</if>
83   - <if test="attach != null">attach = #{attach},</if>
84 77 <if test="status != null">status = #{status},</if>
85   - <if test="objectId != null">object_id = #{objectId},</if>
86 78 </trim>
87 79 where id = #{id}
88 80 </update>
... ...
trash-workFlow/src/main/resources/mapper/caseOffline/CaseOfflineMapper.xml
... ... @@ -43,6 +43,8 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
43 43 #{name}
44 44 </foreach>
45 45 </if>
  46 +
  47 + <if test="createTime != null "> and create_time > #{createTime}</if>
46 48 </where>
47 49 </select>
48 50  
... ...
trash-workFlow/src/main/resources/mapper/casefile/ViolationCaseFileMapper.xml
... ... @@ -50,7 +50,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
50 50 <if test="receiveStatus != null "> and receive_status = #{receiveStatus}</if>
51 51 <if test="readBy != null and readBy != ''"> and read_by = #{readBy}</if>
52 52 <if test="readTime != null "> and read_time = #{readTime}</if>
53   - <if test="createTime != null "> and DATE_FORMAT(create_time,("%y%m%d")) = DATE_FORMAT(#{createTime},("%y%m%d"))</if>
  53 + <if test="createTime != null "> and create_time > #{createTime}</if>
54 54 <if test="startTime != null "> and create_time between #{startTime} and #{endTime}</if>
55 55 <if test="names != null ">
56 56 and project_name in
... ... @@ -59,6 +59,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
59 59 </foreach>
60 60 </if>
61 61 </where>
  62 + or need_upload = 1
62 63 order by create_time desc
63 64 </select>
64 65  
... ... @@ -70,7 +71,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
70 71 </where>
71 72 </select>
72 73  
73   - <select id="selectViolationCaseFileById" parameterType="Long" resultMap="violationCaseFileResult">
  74 + <select id="selectViolationCaseFileById" parameterType="String" resultMap="violationCaseFileResult">
74 75 <include refid="selectViolationCaseFileVo"/>
75 76 where id = #{id}
76 77 </select>
... ... @@ -78,7 +79,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
78 79 <insert id="insertViolationCaseFile" parameterType="ViolationCaseFile" useGeneratedKeys="true" keyProperty="id">
79 80 insert into casefile_violation
80 81 <trim prefix="(" suffix=")" suffixOverrides=",">
81   - <if test="id != null">`id`,</if>
  82 + <if test="id != null and id != ''">`id`,</if>
82 83 create_time,
83 84 <if test="number != null">`number`,</if>
84 85 <if test="violationObjectType != null">violation_object_type,</if>
... ... @@ -100,7 +101,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
100 101  
101 102 </trim>
102 103 <trim prefix="values (" suffix=")" suffixOverrides=",">
103   - <if test="id != null">#{id},</if>
  104 + <if test="id != null and id != ''">#{id},</if>
104 105 now(),
105 106 <if test="number != null">#{number},</if>
106 107 <if test="violationObjectType != null">#{violationObjectType},</if>
... ... @@ -118,7 +119,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
118 119 <if test="readBy != null">#{readBy},</if>
119 120 <if test="readTime != null">#{readTime},</if>
120 121 <if test="abbreviation != null">#{abbreviation},</if>
121   - <if test="needUpload != null">need_upload = #{needUpload},</if>
  122 + <if test="needUpload != null">#{needUpload},</if>
122 123 </trim>
123 124 </insert>
124 125  
... ... @@ -147,7 +148,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
147 148 where id = #{id}
148 149 </update>
149 150  
150   - <delete id="deleteViolationCaseFileById" parameterType="Long">
  151 + <delete id="deleteViolationCaseFileById" parameterType="String">
151 152 delete from casefile_violation where id = #{id}
152 153 </delete>
153 154  
... ...
trash-workFlow/src/main/resources/mapper/office/LogisticsManagementMapper.xml
... ... @@ -45,6 +45,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
45 45 <if test="goodsName != null and goodsName != ''"> and goods_name like concat('%', #{goodsName}, '%')</if>
46 46 <if test="quantity != null "> and quantity = #{quantity}</if>
47 47 <if test="status != null "> and status = #{status}</if>
  48 + <if test="createTime != null "> and create_time > #{createTime}</if>
48 49 </where>
49 50 </select>
50 51  
... ...