gaodd пре 4 година
родитељ
комит
acf42ed7f0

+ 22 - 0
src/main/java/com/unissoft/mapper/ProcessAuditMapper.java

@@ -0,0 +1,22 @@
1
+package com.unissoft.mapper;
2
+
3
+import com.unissoft.model.ProcessAudit;
4
+
5
+import java.util.List;
6
+
7
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
8
+
9
+/**
10
+ * <p>
11
+ * 流程审批表 Mapper 接口
12
+ * </p>
13
+ *
14
+ * @author My sunShine
15
+ * @since 2021-04-06
16
+ */
17
+public interface ProcessAuditMapper extends BaseMapper<ProcessAudit> {
18
+
19
+	 List<ProcessAudit> getToBeDone(List<Integer> list);
20
+
21
+	 List<ProcessAudit> getCurrentMonthData();
22
+}

+ 82 - 0
src/main/java/com/unissoft/mapper/ProcessAuditMapper.xml

@@ -0,0 +1,82 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.unissoft.mapper.ProcessAuditMapper">
4
+
5
+    <!-- 通用查询映射结果 -->
6
+    <resultMap id="BaseResultMap" type="com.unissoft.model.ProcessAudit">
7
+        <id column="id" property="id" />
8
+        <result column="main_id" property="mainId" />
9
+        <result column="sub_id" property="subId" />
10
+        <result column="sub_data" property="subData" />
11
+        <result column="audit_state" property="auditState" />
12
+        <result column="operation_time" property="operationTime" />
13
+        <result column="type" property="type" />
14
+        <result column="house_id" property="houseId" />
15
+        <result column="depot_id" property="depotId" />
16
+        <result column="from_people" property="fromPeople" />
17
+        <result column="to_people" property="toPeople" />
18
+        <result column="result" property="result" />
19
+        <result column="apply_people" property="applyPeople" />
20
+        <result column="audit_time" property="auditTime" />
21
+        <result column="process_id" property="processId" />
22
+        <result column="ongoing_step" property="ongoingStep" />
23
+        <result column="is_audit" property="isAudit" />
24
+        <result column="apply_time" property="applyTime" />
25
+        <result column="work_name" property="workName" />
26
+        <result column="start_date" property="startDate" />
27
+        <result column="end_date" property="endDate" />
28
+        <result column="to_page" property="toPage" />
29
+    </resultMap>
30
+
31
+    <!-- 通用查询结果列 -->
32
+    <sql id="Base_Column_List">
33
+        id, main_id, sub_id, sub_data, audit_state, operation_time, type, house_id, depot_id, from_people, to_people, result, apply_people, audit_time, process_id, ongoing_step, is_audit, apply_time, work_name, start_date, end_date, to_page
34
+    </sql>
35
+    
36
+     <select id="getToBeDone" parameterType="list" resultType="com.unissoft.model.ProcessAudit">
37
+        select
38
+        <include refid="Base_Column_List"/>
39
+        from process_audit pa
40
+        <where>
41
+            pa.audit_state = 0 and
42
+            <foreach item="item" collection="list" separator=" or " open="(" close=")" index="">
43
+                pa.id=#{item, jdbcType=NUMERIC}
44
+            </foreach>
45
+        </where>
46
+    </select>
47
+
48
+    <select id="getCurrentMonthData" resultType="com.unissoft.model.ProcessAudit">
49
+      SELECT
50
+	p.id,
51
+	p.main_id,
52
+	p.sub_id,
53
+	p.sub_data,
54
+	p.audit_state,
55
+	p.operation_time,
56
+	p.type,
57
+	p.house_id,
58
+	p.depot_id,
59
+	p.from_people,
60
+	p.to_people,
61
+	p.result,
62
+	p.apply_people,
63
+	p.audit_time,
64
+	p.process_id,
65
+	p.ongoing_step,
66
+	p.apply_time,
67
+	p.work_name,
68
+	p.start_date,
69
+	p.end_date,
70
+	p.to_page
71
+FROM
72
+	process_audit p
73
+LEFT JOIN basics_depot b ON p.depot_id = b.d_id
74
+WHERE
75
+	b.p_belonging = 0
76
+AND p.to_people IS NOT NULL
77
+AND p.audit_state IS NOT NULL
78
+AND p.end_date IS NOT NULL
79
+AND DATE_FORMAT(p.apply_time, '%Y%m') = DATE_FORMAT(CURDATE(), '%Y%m')
80
+    </select>
81
+
82
+</mapper>

+ 352 - 0
src/main/java/com/unissoft/model/ProcessAudit.java

@@ -0,0 +1,352 @@
1
+package com.unissoft.model;
2
+
3
+import com.baomidou.mybatisplus.annotation.TableName;
4
+import com.fasterxml.jackson.annotation.JsonFormat;
5
+import com.baomidou.mybatisplus.annotation.IdType;
6
+import java.util.Date;
7
+import com.baomidou.mybatisplus.annotation.TableId;
8
+import com.baomidou.mybatisplus.annotation.TableField;
9
+import java.io.Serializable;
10
+import io.swagger.annotations.ApiModel;
11
+import io.swagger.annotations.ApiModelProperty;
12
+import lombok.Data;
13
+import lombok.EqualsAndHashCode;
14
+
15
+/**
16
+ * <p>
17
+ * 流程审批表
18
+ * </p>
19
+ *
20
+ * @author My sunShine
21
+ * @since 2021-04-06
22
+ */
23
+@Data
24
+@EqualsAndHashCode(callSuper = false)
25
+@TableName("process_audit")
26
+@ApiModel(value="ProcessAudit对象", description="流程审批表")
27
+public class ProcessAudit implements Serializable {
28
+
29
+    private static final long serialVersionUID = 1L;
30
+
31
+    
32
+    //业务字段
33
+    @TableField(exist = false)
34
+    private String houseName;
35
+    @TableField(exist = false)
36
+	private String applyName;
37
+    @TableField(exist = false)
38
+	private String departmentName;
39
+    @TableField(exist = false)
40
+	private String companyName;
41
+	
42
+	
43
+	
44
+	
45
+
46
+    public String getHouseName() {
47
+		return houseName;
48
+	}
49
+
50
+	public void setHouseName(String houseName) {
51
+		this.houseName = houseName;
52
+	}
53
+
54
+	public String getApplyName() {
55
+		return applyName;
56
+	}
57
+
58
+	public void setApplyName(String applyName) {
59
+		this.applyName = applyName;
60
+	}
61
+
62
+	public String getDepartmentName() {
63
+		return departmentName;
64
+	}
65
+
66
+	public void setDepartmentName(String departmentName) {
67
+		this.departmentName = departmentName;
68
+	}
69
+
70
+	public String getCompanyName() {
71
+		return companyName;
72
+	}
73
+
74
+	public void setCompanyName(String companyName) {
75
+		this.companyName = companyName;
76
+	}
77
+	
78
+    @ApiModelProperty(value = "流程审批表")
79
+    @TableId(value = "id", type = IdType.AUTO)
80
+    private Integer id;
81
+
82
+    @ApiModelProperty(value = "主流程id")
83
+    @TableField("main_id")
84
+    private Integer mainId;
85
+
86
+    @ApiModelProperty(value = "子流程的id")
87
+    @TableField("sub_id")
88
+    private Integer subId;
89
+
90
+    @ApiModelProperty(value = "子流程的数据(0:是,1:否)")
91
+    @TableField("sub_data")
92
+    private Integer subData;
93
+
94
+    @ApiModelProperty(value = "审批状态(0:提交,1审批通过:,2:审批不通过,3:审批完成进行中,4已完成)")
95
+    @TableField("audit_state")
96
+    private Integer auditState;
97
+
98
+    @ApiModelProperty(value = "子流程的操作时间")
99
+    @TableField("operation_time")
100
+    private String operationTime;
101
+
102
+    @ApiModelProperty(value = "流程类型(如:tf)")
103
+    @TableField("type")
104
+    private String type;
105
+
106
+    @ApiModelProperty(value = "仓房id")
107
+    @TableField("house_id")
108
+    private Integer houseId;
109
+
110
+    @ApiModelProperty(value = "库id")
111
+    @TableField("depot_id")
112
+    private Integer depotId;
113
+
114
+    @ApiModelProperty(value = "提交人")
115
+    @TableField("from_people")
116
+    private Integer fromPeople;
117
+
118
+    @ApiModelProperty(value = "审批人")
119
+    @TableField("to_people")
120
+    private Integer toPeople;
121
+
122
+    @ApiModelProperty(value = "是否是整个业务的首条记录(1是0否)")
123
+    @TableField("result")
124
+    private Integer result;
125
+
126
+    @ApiModelProperty(value = "申请人")
127
+    @TableField("apply_people")
128
+    private Integer applyPeople;
129
+
130
+    @ApiModelProperty(value = "审批时间")
131
+    @TableField("audit_time")
132
+    private String auditTime;
133
+
134
+    @ApiModelProperty(value = "每一个业务流程的流程标识")
135
+    @TableField("process_id")
136
+    private String processId;
137
+
138
+    @ApiModelProperty(value = "进行到哪一步的主流程id")
139
+    @TableField("ongoing_step")
140
+    private String ongoingStep;
141
+
142
+    @ApiModelProperty(value = "是否提交给总经理和分公司审批(0否1是)")
143
+    @TableField("is_audit")
144
+    private Integer isAudit;
145
+
146
+    @ApiModelProperty(value = "申请时间")
147
+    @TableField("apply_time")
148
+    private String applyTime;
149
+
150
+    @ApiModelProperty(value = "流程名称,如 科长每2周粮情检查,通风申请")
151
+    @TableField("work_name")
152
+    private String workName;
153
+
154
+    
155
+    @ApiModelProperty(value = "办理开始时间")
156
+    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm",timezone="GMT+8")
157
+    @TableField("start_date")
158
+    private Date startDate;
159
+
160
+    @ApiModelProperty(value = "办理结束时间")
161
+    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm",timezone="GMT+8")
162
+    @TableField("end_date")
163
+    private Date endDate;
164
+
165
+    @ApiModelProperty(value = "办理页面url")
166
+    @TableField("to_page")
167
+    private String toPage;
168
+
169
+
170
+
171
+
172
+
173
+	public Integer getId() {
174
+		return id;
175
+	}
176
+
177
+	public void setId(Integer id) {
178
+		this.id = id;
179
+	}
180
+
181
+	public Integer getMainId() {
182
+		return mainId;
183
+	}
184
+
185
+	public void setMainId(Integer mainId) {
186
+		this.mainId = mainId;
187
+	}
188
+
189
+	public Integer getSubId() {
190
+		return subId;
191
+	}
192
+
193
+	public void setSubId(Integer subId) {
194
+		this.subId = subId;
195
+	}
196
+
197
+	public Integer getSubData() {
198
+		return subData;
199
+	}
200
+
201
+	public void setSubData(Integer subData) {
202
+		this.subData = subData;
203
+	}
204
+
205
+	public Integer getAuditState() {
206
+		return auditState;
207
+	}
208
+
209
+	public void setAuditState(Integer auditState) {
210
+		this.auditState = auditState;
211
+	}
212
+
213
+	public String getOperationTime() {
214
+		return operationTime;
215
+	}
216
+
217
+	public void setOperationTime(String operationTime) {
218
+		this.operationTime = operationTime;
219
+	}
220
+
221
+	public String getType() {
222
+		return type;
223
+	}
224
+
225
+	public void setType(String type) {
226
+		this.type = type;
227
+	}
228
+
229
+	public Integer getHouseId() {
230
+		return houseId;
231
+	}
232
+
233
+	public void setHouseId(Integer houseId) {
234
+		this.houseId = houseId;
235
+	}
236
+
237
+	public Integer getDepotId() {
238
+		return depotId;
239
+	}
240
+
241
+	public void setDepotId(Integer depotId) {
242
+		this.depotId = depotId;
243
+	}
244
+
245
+	public Integer getFromPeople() {
246
+		return fromPeople;
247
+	}
248
+
249
+	public void setFromPeople(Integer fromPeople) {
250
+		this.fromPeople = fromPeople;
251
+	}
252
+
253
+	public Integer getToPeople() {
254
+		return toPeople;
255
+	}
256
+
257
+	public void setToPeople(Integer toPeople) {
258
+		this.toPeople = toPeople;
259
+	}
260
+
261
+	public Integer getResult() {
262
+		return result;
263
+	}
264
+
265
+	public void setResult(Integer result) {
266
+		this.result = result;
267
+	}
268
+
269
+	public Integer getApplyPeople() {
270
+		return applyPeople;
271
+	}
272
+
273
+	public void setApplyPeople(Integer applyPeople) {
274
+		this.applyPeople = applyPeople;
275
+	}
276
+
277
+	public String getAuditTime() {
278
+		return auditTime;
279
+	}
280
+
281
+	public void setAuditTime(String auditTime) {
282
+		this.auditTime = auditTime;
283
+	}
284
+
285
+	public String getProcessId() {
286
+		return processId;
287
+	}
288
+
289
+	public void setProcessId(String processId) {
290
+		this.processId = processId;
291
+	}
292
+
293
+	public String getOngoingStep() {
294
+		return ongoingStep;
295
+	}
296
+
297
+	public void setOngoingStep(String ongoingStep) {
298
+		this.ongoingStep = ongoingStep;
299
+	}
300
+
301
+	public Integer getIsAudit() {
302
+		return isAudit;
303
+	}
304
+
305
+	public void setIsAudit(Integer isAudit) {
306
+		this.isAudit = isAudit;
307
+	}
308
+
309
+	public String getApplyTime() {
310
+		return applyTime;
311
+	}
312
+
313
+	public void setApplyTime(String applyTime) {
314
+		this.applyTime = applyTime;
315
+	}
316
+
317
+	public String getWorkName() {
318
+		return workName;
319
+	}
320
+
321
+	public void setWorkName(String workName) {
322
+		this.workName = workName;
323
+	}
324
+
325
+	public Date getStartDate() {
326
+		return startDate;
327
+	}
328
+
329
+	public void setStartDate(Date startDate) {
330
+		this.startDate = startDate;
331
+	}
332
+
333
+	public Date getEndDate() {
334
+		return endDate;
335
+	}
336
+
337
+	public void setEndDate(Date endDate) {
338
+		this.endDate = endDate;
339
+	}
340
+
341
+	public String getToPage() {
342
+		return toPage;
343
+	}
344
+
345
+	public void setToPage(String toPage) {
346
+		this.toPage = toPage;
347
+	}
348
+    
349
+    
350
+
351
+
352
+}