gaodd il y a 4 ans
Parent
commit
961c7d535f

+ 16 - 0
src/main/java/com/unissoft/mapper/EquipmentStroeMapper.java

@@ -0,0 +1,16 @@
1
+package com.unissoft.mapper;
2
+
3
+import com.unissoft.model.EquipmentStroe;
4
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+
6
+/**
7
+ * <p>
8
+ * 器材库 Mapper 接口
9
+ * </p>
10
+ *
11
+ * @author My sunShine
12
+ * @since 2021-04-15
13
+ */
14
+public interface EquipmentStroeMapper extends BaseMapper<EquipmentStroe> {
15
+
16
+}

+ 30 - 0
src/main/java/com/unissoft/mapper/EquipmentStroeMapper.xml

@@ -0,0 +1,30 @@
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.EquipmentStroeMapper">
4
+
5
+    <!-- 通用查询映射结果 -->
6
+    <resultMap id="BaseResultMap" type="com.unissoft.model.EquipmentStroe">
7
+        <id column="id" property="id" />
8
+        <result column="depot_id" property="depotId" />
9
+        <result column="equipment_category" property="equipmentCategory" />
10
+        <result column="equipment_category_name" property="equipmentCategoryName" />
11
+        <result column="equipment_name_code" property="equipmentNameCode" />
12
+        <result column="equipment_name" property="equipmentName" />
13
+        <result column="standards_type" property="standardsType" />
14
+        <result column="manufacturer" property="manufacturer" />
15
+        <result column="asset_number" property="assetNumber" />
16
+        <result column="equipment_number" property="equipmentNumber" />
17
+        <result column="arrival_time" property="arrivalTime" />
18
+        <result column="management" property="management" />
19
+        <result column="leave_time" property="leaveTime" />
20
+        <result column="enterprise_name" property="enterpriseName" />
21
+        <result column="registrant" property="registrant" />
22
+        <result column="state" property="state" />
23
+    </resultMap>
24
+
25
+    <!-- 通用查询结果列 -->
26
+    <sql id="Base_Column_List">
27
+        id, depot_id, equipment_category, equipment_category_name, equipment_name_code, equipment_name, standards_type, manufacturer, asset_number, equipment_number, arrival_time, management, leave_time, enterprise_name, registrant, state
28
+    </sql>
29
+
30
+</mapper>

+ 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-15
16
+ */
17
+public interface ProcessAuditMapper extends BaseMapper<ProcessAudit> {
18
+
19
+	List<ProcessAudit> getToBeDone(List<Integer> list);
20
+
21
+	List<ProcessAudit> getCurrentMonthData();
22
+}

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

@@ -0,0 +1,85 @@
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
+        <result column="equipment_name_code" property="equipmentNameCode" />
30
+        <result column="equipment_id" property="equipmentId" />
31
+    </resultMap>
32
+
33
+    <!-- 通用查询结果列 -->
34
+    <sql id="Base_Column_List">
35
+        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, equipment_name_code, equipment_id
36
+    </sql>
37
+    
38
+    
39
+    <select id="getToBeDone" parameterType="list" resultType="com.unissoft.model.ProcessAudit">
40
+        select
41
+        <include refid="Base_Column_List"/>
42
+        from process_audit pa
43
+        <where>
44
+            pa.audit_state = 0 and
45
+            <foreach item="item" collection="list" separator=" or " open="(" close=")" index="">
46
+                pa.id=#{item, jdbcType=NUMERIC}
47
+            </foreach>
48
+        </where>
49
+    </select>
50
+
51
+    <select id="getCurrentMonthData" resultType="com.unissoft.model.ProcessAudit">
52
+      SELECT
53
+	p.id,
54
+	p.main_id,
55
+	p.sub_id,
56
+	p.sub_data,
57
+	p.audit_state,
58
+	p.operation_time,
59
+	p.type,
60
+	p.house_id,
61
+	p.depot_id,
62
+	p.from_people,
63
+	p.to_people,
64
+	p.result,
65
+	p.apply_people,
66
+	p.audit_time,
67
+	p.process_id,
68
+	p.ongoing_step,
69
+	p.apply_time,
70
+	p.work_name,
71
+	p.start_date,
72
+	p.end_date,
73
+	p.to_page
74
+FROM
75
+	process_audit p
76
+LEFT JOIN basics_depot b ON p.depot_id = b.d_id
77
+WHERE
78
+	b.p_belonging = 0
79
+AND p.to_people IS NOT NULL
80
+AND p.audit_state IS NOT NULL
81
+AND p.end_date IS NOT NULL
82
+AND DATE_FORMAT(p.apply_time, '%Y%m') = DATE_FORMAT(CURDATE(), '%Y%m')
83
+    </select>
84
+
85
+</mapper>

+ 98 - 0
src/main/java/com/unissoft/model/EquipmentStroe.java

@@ -0,0 +1,98 @@
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-15
22
+ */
23
+@Data
24
+@EqualsAndHashCode(callSuper = false)
25
+@TableName("equipment_stroe")
26
+@ApiModel(value="EquipmentStroe对象", description="器材库")
27
+public class EquipmentStroe implements Serializable {
28
+
29
+    private static final long serialVersionUID = 1L;
30
+
31
+    @ApiModelProperty(value = "器材库id")
32
+    @TableId(value = "id", type = IdType.AUTO)
33
+    private Integer id;
34
+
35
+    @ApiModelProperty(value = "库区ID")
36
+    @TableField("depot_id")
37
+    private Integer depotId;
38
+
39
+    @ApiModelProperty(value = "设备类别")
40
+    @TableField("equipment_category")
41
+    private String equipmentCategory;
42
+
43
+    @ApiModelProperty(value = "设备类别名称")
44
+    @TableField("equipment_category_name")
45
+    private String equipmentCategoryName;
46
+
47
+    @ApiModelProperty(value = "设备名称code")
48
+    @TableField("equipment_name_code")
49
+    private String equipmentNameCode;
50
+
51
+    @ApiModelProperty(value = "设备名称")
52
+    @TableField("equipment_name")
53
+    private String equipmentName;
54
+
55
+    @ApiModelProperty(value = "规格型号")
56
+    @TableField("standards_type")
57
+    private String standardsType;
58
+
59
+    @ApiModelProperty(value = "生产厂家")
60
+    @TableField("manufacturer")
61
+    private String manufacturer;
62
+
63
+    @ApiModelProperty(value = "资产编号")
64
+    @TableField("asset_number")
65
+    private String assetNumber;
66
+
67
+    @ApiModelProperty(value = "设备编号")
68
+    @TableField("equipment_number")
69
+    private String equipmentNumber;
70
+
71
+    @ApiModelProperty(value = "到库时间")
72
+    @TableField("arrival_time")
73
+    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
74
+    private Date arrivalTime;
75
+
76
+    @ApiModelProperty(value = "管理者")
77
+    @TableField("management")
78
+    private String management;
79
+
80
+    @ApiModelProperty(value = "出厂时间")
81
+    @TableField("leave_time")
82
+    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
83
+    private Date leaveTime;
84
+
85
+    @ApiModelProperty(value = "企业名称")
86
+    @TableField("enterprise_name")
87
+    private String enterpriseName;
88
+
89
+    @ApiModelProperty(value = "登记人")
90
+    @TableField("registrant")
91
+    private String registrant;
92
+
93
+    @ApiModelProperty(value = "该设备的状态(0:正常使用1:维修2:报废)")
94
+    @TableField("state")
95
+    private Integer state;
96
+
97
+
98
+}

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

@@ -0,0 +1,373 @@
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-15
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
+    @ApiModelProperty(value = "办理开始时间")
155
+    @TableField("start_date")
156
+    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm",timezone="GMT+8")
157
+    private Date startDate;
158
+
159
+    @ApiModelProperty(value = "办理结束时间")
160
+    @TableField("end_date")
161
+    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm",timezone="GMT+8")
162
+    private Date endDate;
163
+
164
+    @ApiModelProperty(value = "办理页面url")
165
+    @TableField("to_page")
166
+    private String toPage;
167
+
168
+    @ApiModelProperty(value = "设备名称code")
169
+    @TableField("equipment_name_code")
170
+    private String equipmentNameCode;
171
+
172
+    @ApiModelProperty(value = "器材库的id")
173
+    @TableField("equipment_id")
174
+    private Integer equipmentId;
175
+
176
+
177
+
178
+
179
+
180
+	public Integer getId() {
181
+		return id;
182
+	}
183
+
184
+	public void setId(Integer id) {
185
+		this.id = id;
186
+	}
187
+
188
+	public Integer getMainId() {
189
+		return mainId;
190
+	}
191
+
192
+	public void setMainId(Integer mainId) {
193
+		this.mainId = mainId;
194
+	}
195
+
196
+	public Integer getSubId() {
197
+		return subId;
198
+	}
199
+
200
+	public void setSubId(Integer subId) {
201
+		this.subId = subId;
202
+	}
203
+
204
+	public Integer getSubData() {
205
+		return subData;
206
+	}
207
+
208
+	public void setSubData(Integer subData) {
209
+		this.subData = subData;
210
+	}
211
+
212
+	public Integer getAuditState() {
213
+		return auditState;
214
+	}
215
+
216
+	public void setAuditState(Integer auditState) {
217
+		this.auditState = auditState;
218
+	}
219
+
220
+	public String getOperationTime() {
221
+		return operationTime;
222
+	}
223
+
224
+	public void setOperationTime(String operationTime) {
225
+		this.operationTime = operationTime;
226
+	}
227
+
228
+	public String getType() {
229
+		return type;
230
+	}
231
+
232
+	public void setType(String type) {
233
+		this.type = type;
234
+	}
235
+
236
+	public Integer getHouseId() {
237
+		return houseId;
238
+	}
239
+
240
+	public void setHouseId(Integer houseId) {
241
+		this.houseId = houseId;
242
+	}
243
+
244
+	public Integer getDepotId() {
245
+		return depotId;
246
+	}
247
+
248
+	public void setDepotId(Integer depotId) {
249
+		this.depotId = depotId;
250
+	}
251
+
252
+	public Integer getFromPeople() {
253
+		return fromPeople;
254
+	}
255
+
256
+	public void setFromPeople(Integer fromPeople) {
257
+		this.fromPeople = fromPeople;
258
+	}
259
+
260
+	public Integer getToPeople() {
261
+		return toPeople;
262
+	}
263
+
264
+	public void setToPeople(Integer toPeople) {
265
+		this.toPeople = toPeople;
266
+	}
267
+
268
+	public Integer getResult() {
269
+		return result;
270
+	}
271
+
272
+	public void setResult(Integer result) {
273
+		this.result = result;
274
+	}
275
+
276
+	public Integer getApplyPeople() {
277
+		return applyPeople;
278
+	}
279
+
280
+	public void setApplyPeople(Integer applyPeople) {
281
+		this.applyPeople = applyPeople;
282
+	}
283
+
284
+	public String getAuditTime() {
285
+		return auditTime;
286
+	}
287
+
288
+	public void setAuditTime(String auditTime) {
289
+		this.auditTime = auditTime;
290
+	}
291
+
292
+	public String getProcessId() {
293
+		return processId;
294
+	}
295
+
296
+	public void setProcessId(String processId) {
297
+		this.processId = processId;
298
+	}
299
+
300
+	public String getOngoingStep() {
301
+		return ongoingStep;
302
+	}
303
+
304
+	public void setOngoingStep(String ongoingStep) {
305
+		this.ongoingStep = ongoingStep;
306
+	}
307
+
308
+	public Integer getIsAudit() {
309
+		return isAudit;
310
+	}
311
+
312
+	public void setIsAudit(Integer isAudit) {
313
+		this.isAudit = isAudit;
314
+	}
315
+
316
+	public String getApplyTime() {
317
+		return applyTime;
318
+	}
319
+
320
+	public void setApplyTime(String applyTime) {
321
+		this.applyTime = applyTime;
322
+	}
323
+
324
+	public String getWorkName() {
325
+		return workName;
326
+	}
327
+
328
+	public void setWorkName(String workName) {
329
+		this.workName = workName;
330
+	}
331
+
332
+	public Date getStartDate() {
333
+		return startDate;
334
+	}
335
+
336
+	public void setStartDate(Date startDate) {
337
+		this.startDate = startDate;
338
+	}
339
+
340
+	public Date getEndDate() {
341
+		return endDate;
342
+	}
343
+
344
+	public void setEndDate(Date endDate) {
345
+		this.endDate = endDate;
346
+	}
347
+
348
+	public String getToPage() {
349
+		return toPage;
350
+	}
351
+
352
+	public void setToPage(String toPage) {
353
+		this.toPage = toPage;
354
+	}
355
+
356
+	public String getEquipmentNameCode() {
357
+		return equipmentNameCode;
358
+	}
359
+
360
+	public void setEquipmentNameCode(String equipmentNameCode) {
361
+		this.equipmentNameCode = equipmentNameCode;
362
+	}
363
+
364
+	public Integer getEquipmentId() {
365
+		return equipmentId;
366
+	}
367
+
368
+	public void setEquipmentId(Integer equipmentId) {
369
+		this.equipmentId = equipmentId;
370
+	}
371
+
372
+
373
+}