dxq 2 päivää sitten
vanhempi
commit
f21d110eac

sto/src/main/java/com/shinsoft/sto/controller/record/InrecordController.java → sto/src/main/java/com/shinsoft/sto/controller/record/InRecordController.java Näytä tiedosto

@@ -15,7 +15,7 @@ import java.util.Map;
15 15
 
16 16
 @RestController
17 17
 @RequestMapping("/InRecord")
18
-public class InrecordController {
18
+public class InRecordController {
19 19
 
20 20
     @Autowired
21 21
     private InrecordService inrecordService;

+ 58
- 0
sto/src/main/java/com/shinsoft/sto/controller/record/OutrecordController.java Näytä tiedosto

@@ -0,0 +1,58 @@
1
+package com.shinsoft.sto.controller.record;
2
+
3
+import com.alibaba.fastjson.JSON;
4
+import com.shinsoft.sto.model.system.ResultJSON;
5
+import com.shinsoft.sto.service.record.OutrecordService;
6
+import org.springframework.beans.factory.annotation.Autowired;
7
+import org.springframework.web.bind.annotation.GetMapping;
8
+import org.springframework.web.bind.annotation.RequestMapping;
9
+import org.springframework.web.bind.annotation.RequestParam;
10
+import org.springframework.web.bind.annotation.RestController;
11
+
12
+import javax.servlet.http.HttpServletRequest;
13
+import java.util.HashMap;
14
+import java.util.Map;
15
+
16
+@RestController
17
+@RequestMapping("/OutRecord")
18
+public class OutrecordController {
19
+
20
+    @Autowired
21
+    private OutrecordService outrecordService;
22
+
23
+    @RequestMapping("/query")
24
+    public ResultJSON query(@RequestParam(defaultValue = "1") int page,
25
+                            @RequestParam(defaultValue = "50") int rows,
26
+                            String params,
27
+                            HttpServletRequest request) {
28
+        try {
29
+            Map<String, Object> map = buildQueryParams(params, request);
30
+            return outrecordService.query(page, rows, map);
31
+        } catch (Exception ex) {
32
+            ex.printStackTrace();
33
+            return ResultJSON.error("查询失败:" + ex.getMessage());
34
+        }
35
+    }
36
+
37
+    @GetMapping("/statistics")
38
+    public ResultJSON statistics(String params, HttpServletRequest request) {
39
+        try {
40
+            Map<String, Object> map = buildQueryParams(params, request);
41
+            return outrecordService.statistics(map);
42
+        } catch (Exception ex) {
43
+            ex.printStackTrace();
44
+            return ResultJSON.error("统计失败:" + ex.getMessage());
45
+        }
46
+    }
47
+
48
+    @SuppressWarnings("unchecked")
49
+    private Map<String, Object> buildQueryParams(String params, HttpServletRequest request) {
50
+        Map<String, Object> map = new HashMap<>();
51
+        if (params != null && !params.trim().isEmpty()) {
52
+            map.putAll(JSON.parseObject(params, Map.class));
53
+        }
54
+        return map;
55
+    }
56
+}
57
+
58
+

+ 19
- 0
sto/src/main/java/com/shinsoft/sto/mapper/record/OutrecordMapper.java Näytä tiedosto

@@ -0,0 +1,19 @@
1
+package com.shinsoft.sto.mapper.record;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.shinsoft.sto.model.record.Outrecord;
7
+import org.apache.ibatis.annotations.Param;
8
+
9
+import java.util.Map;
10
+
11
+public interface OutrecordMapper extends BaseMapper<Outrecord> {
12
+
13
+    IPage<Outrecord> selectOutrecordPage(Page<Outrecord> page,
14
+                                         @Param("parms") Map<String, Object> map);
15
+
16
+    Map<String, Object> selectStatistics(@Param("parms") Map<String, Object> map);
17
+}
18
+
19
+

+ 219
- 0
sto/src/main/java/com/shinsoft/sto/mapper/record/OutrecordMapper.xml Näytä tiedosto

@@ -0,0 +1,219 @@
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.shinsoft.sto.mapper.record.OutrecordMapper">
4
+
5
+    <resultMap id="OutrecordResultMap" type="com.shinsoft.sto.model.record.Outrecord">
6
+        <id column="id" property="id" jdbcType="VARCHAR"/>
7
+        <result column="belong_id" property="belongId" jdbcType="VARCHAR"/>
8
+        <result column="in_truck_no" property="inTruckNo" jdbcType="VARCHAR"/>
9
+        <result column="tally_people" property="tallyPeople" jdbcType="VARCHAR"/>
10
+        <result column="in_dtm" property="inDtm" jdbcType="TIMESTAMP"/>
11
+        <result column="out_ware_name" property="outWareName" jdbcType="VARCHAR"/>
12
+        <result column="out_stack_name" property="outStackName" jdbcType="VARCHAR"/>
13
+        <result column="out_layer_no" property="outLayerNo" jdbcType="VARCHAR"/>
14
+        <result column="prod_no" property="prodNo" jdbcType="VARCHAR"/>
15
+        <result column="owner_company" property="ownerCompany" jdbcType="VARCHAR"/>
16
+        <result column="receiving_company" property="receivingCompany" jdbcType="VARCHAR"/>
17
+        <result column="customer_company" property="customerCompany" jdbcType="VARCHAR"/>
18
+        <result column="material_id" property="materialId" jdbcType="VARCHAR"/>
19
+        <result column="st_grade" property="stGrade" jdbcType="VARCHAR"/>
20
+        <result column="out_weight" property="outWeight" jdbcType="DECIMAL"/>
21
+        <result column="out_quantity" property="outQuantity" jdbcType="DECIMAL"/>
22
+        <result column="out_flag" property="outFlag" jdbcType="VARCHAR"/>
23
+        <result column="delivery_address" property="deliveryAddress" jdbcType="VARCHAR"/>
24
+        <result column="attrib_01" property="attrib01" jdbcType="VARCHAR"/>
25
+        <result column="attrib_02" property="attrib02" jdbcType="VARCHAR"/>
26
+        <result column="attrib_03" property="attrib03" jdbcType="VARCHAR"/>
27
+        <result column="attrib_04" property="attrib04" jdbcType="VARCHAR"/>
28
+        <result column="attrib_05" property="attrib05" jdbcType="VARCHAR"/>
29
+        <result column="attrib_06" property="attrib06" jdbcType="VARCHAR"/>
30
+        <result column="attrib_07" property="attrib07" jdbcType="VARCHAR"/>
31
+        <result column="attrib_08" property="attrib08" jdbcType="VARCHAR"/>
32
+        <result column="attrib_09" property="attrib09" jdbcType="VARCHAR"/>
33
+        <result column="attrib_10" property="attrib10" jdbcType="VARCHAR"/>
34
+        <result column="attrib_11" property="attrib11" jdbcType="VARCHAR"/>
35
+        <result column="attrib_12" property="attrib12" jdbcType="VARCHAR"/>
36
+        <result column="attrib_13" property="attrib13" jdbcType="VARCHAR"/>
37
+        <result column="attrib_14" property="attrib14" jdbcType="VARCHAR"/>
38
+        <result column="attrib_15" property="attrib15" jdbcType="VARCHAR"/>
39
+        <result column="attrib_16" property="attrib16" jdbcType="VARCHAR"/>
40
+        <result column="attrib_17" property="attrib17" jdbcType="VARCHAR"/>
41
+        <result column="attrib_18" property="attrib18" jdbcType="VARCHAR"/>
42
+        <result column="attrib_19" property="attrib19" jdbcType="VARCHAR"/>
43
+        <result column="attrib_20" property="attrib20" jdbcType="VARCHAR"/>
44
+        <result column="attrib_21" property="attrib21" jdbcType="VARCHAR"/>
45
+        <result column="attrib_22" property="attrib22" jdbcType="VARCHAR"/>
46
+        <result column="attrib_23" property="attrib23" jdbcType="VARCHAR"/>
47
+        <result column="attrib_24" property="attrib24" jdbcType="VARCHAR"/>
48
+        <result column="attrib_25" property="attrib25" jdbcType="VARCHAR"/>
49
+        <result column="remark_1" property="remark1" jdbcType="VARCHAR"/>
50
+        <result column="remark_2" property="remark2" jdbcType="VARCHAR"/>
51
+        <result column="remark_3" property="remark3" jdbcType="VARCHAR"/>
52
+        <result column="remark_4" property="remark4" jdbcType="VARCHAR"/>
53
+        <result column="remark_5" property="remark5" jdbcType="VARCHAR"/>
54
+        <result column="out_truck_no" property="outTruckNo" jdbcType="VARCHAR"/>
55
+        <result column="out_dtm" property="outDtm" jdbcType="TIMESTAMP"/>
56
+        <result column="distrib_id" property="distribId" jdbcType="VARCHAR"/>
57
+        <result column="out_user_id" property="outUserId" jdbcType="VARCHAR"/>
58
+        <result column="owner_company_name" property="ownerCompanyName" jdbcType="VARCHAR"/>
59
+        <result column="receiving_company_name" property="receivingCompanyName" jdbcType="VARCHAR"/>
60
+        <result column="customer_company_name" property="customerCompanyName" jdbcType="VARCHAR"/>
61
+        <result column="material_name" property="materialName" jdbcType="VARCHAR"/>
62
+        <result column="material_code" property="materialCode" jdbcType="VARCHAR"/>
63
+        <result column="material_standard" property="materialStandard" jdbcType="VARCHAR"/>
64
+        <result column="material_model" property="materialModel" jdbcType="VARCHAR"/>
65
+    </resultMap>
66
+
67
+    <sql id="OutrecordWhere">
68
+        where 1=1
69
+        <if test="parms.wareName != null and parms.wareName != ''">
70
+            and tor.OUT_WARE_NAME like '%' || #{parms.wareName} || '%'
71
+        </if>
72
+        <if test="parms.outWareName != null and parms.outWareName != ''">
73
+            and tor.OUT_WARE_NAME like '%' || #{parms.outWareName} || '%'
74
+        </if>
75
+        <if test="parms.stackName != null and parms.stackName != ''">
76
+            and tor.OUT_STACK_NAME like '%' || #{parms.stackName} || '%'
77
+        </if>
78
+        <if test="parms.outStackName != null and parms.outStackName != ''">
79
+            and tor.OUT_STACK_NAME like '%' || #{parms.outStackName} || '%'
80
+        </if>
81
+        <if test="parms.outLayerNo != null and parms.outLayerNo != ''">
82
+            and tor.OUT_LAYER_NO = #{parms.outLayerNo}
83
+        </if>
84
+        <if test="parms.inTruckNo != null and parms.inTruckNo != ''">
85
+            and tor.IN_TRUCK_NO like '%' || #{parms.inTruckNo} || '%'
86
+        </if>
87
+        <if test="parms.outTruckNo != null and parms.outTruckNo != ''">
88
+            and tor.OUT_TRUCK_NO like '%' || #{parms.outTruckNo} || '%'
89
+        </if>
90
+        <if test="parms.materialName != null and parms.materialName != ''">
91
+            and material.MATERIAL_NAME like '%' || #{parms.materialName} || '%'
92
+        </if>
93
+        <if test="parms.ownerCompany != null and parms.ownerCompany != ''">
94
+            and owner.id = #{parms.ownerCompany}
95
+        </if>
96
+        <if test="parms.receivingCompany != null and parms.receivingCompany != ''">
97
+            and receiving.id = #{parms.receivingCompany}
98
+        </if>
99
+        <if test="parms.customerCompany != null and parms.customerCompany != ''">
100
+            and customer.id = #{parms.customerCompany}
101
+        </if>
102
+        <if test="parms.startDtm != null and parms.startDtm != ''">
103
+            and tor.OUT_DTM &gt;= TO_DATE(#{parms.startDtm}, 'yyyy-MM-dd hh24:mi:ss')
104
+        </if>
105
+        <if test="parms.endDtm != null and parms.endDtm != ''">
106
+            and tor.OUT_DTM &lt;= TO_DATE(#{parms.endDtm}, 'yyyy-MM-dd hh24:mi:ss')
107
+        </if>
108
+        <if test="parms.startOutDtm != null and parms.startOutDtm != ''">
109
+            and tor.OUT_DTM &gt;= TO_DATE(#{parms.startOutDtm}, 'yyyy-MM-dd hh24:mi:ss')
110
+        </if>
111
+        <if test="parms.endOutDtm != null and parms.endOutDtm != ''">
112
+            and tor.OUT_DTM &lt;= TO_DATE(#{parms.endOutDtm}, 'yyyy-MM-dd hh24:mi:ss')
113
+        </if>
114
+        <if test="parms.startInDtm != null and parms.startInDtm != ''">
115
+            and tor.IN_DTM &gt;= TO_DATE(#{parms.startInDtm}, 'yyyy-MM-dd hh24:mi:ss')
116
+        </if>
117
+        <if test="parms.endInDtm != null and parms.endInDtm != ''">
118
+            and tor.IN_DTM &lt;= TO_DATE(#{parms.endInDtm}, 'yyyy-MM-dd hh24:mi:ss')
119
+        </if>
120
+        <if test="parms.prodNo != null and parms.prodNo != ''">
121
+            and tor.PROD_NO like '%' || #{parms.prodNo} || '%'
122
+        </if>
123
+        <if test="parms.materialId != null and parms.materialId != ''">
124
+            and tor.MATERIAL_ID = #{parms.materialId}
125
+        </if>
126
+        <if test="parms.outFlag != null and parms.outFlag != ''">
127
+            and tor.OUT_FLAG = #{parms.outFlag}
128
+        </if>
129
+        <if test="parms.distribId != null and parms.distribId != ''">
130
+            and tor.DISTRIB_ID = #{parms.distribId}
131
+        </if>
132
+        <if test="parms.outUserId != null and parms.outUserId != ''">
133
+            and tor.OUT_USER_ID = #{parms.outUserId}
134
+        </if>
135
+    </sql>
136
+
137
+    <select id="selectOutrecordPage" resultMap="OutrecordResultMap" parameterType="map">
138
+        select
139
+            tor.id,
140
+            tor.belong_id,
141
+            tor.in_truck_no,
142
+            tor.tally_people,
143
+            tor.in_dtm,
144
+            tor.out_ware_name,
145
+            tor.out_stack_name,
146
+            tor.out_layer_no,
147
+            tor.prod_no,
148
+            tor.owner_company,
149
+            tor.receiving_company,
150
+            tor.customer_company,
151
+            tor.material_id,
152
+            tor.st_grade,
153
+            tor.out_weight,
154
+            tor.out_quantity,
155
+            tor.out_flag,
156
+            nvl(tor.delivery_address, owner.default_address) as delivery_address,
157
+            tor.attrib_01,
158
+            tor.attrib_02,
159
+            tor.attrib_03,
160
+            tor.attrib_04,
161
+            tor.attrib_05,
162
+            tor.attrib_06,
163
+            tor.attrib_07,
164
+            tor.attrib_08,
165
+            tor.attrib_09,
166
+            tor.attrib_10,
167
+            tor.attrib_11,
168
+            tor.attrib_12,
169
+            tor.attrib_13,
170
+            tor.attrib_14,
171
+            tor.attrib_15,
172
+            tor.attrib_16,
173
+            tor.attrib_17,
174
+            tor.attrib_18,
175
+            tor.attrib_19,
176
+            tor.attrib_20,
177
+            tor.attrib_21,
178
+            tor.attrib_22,
179
+            tor.attrib_23,
180
+            tor.attrib_24,
181
+            tor.attrib_25,
182
+            tor.remark_1,
183
+            tor.remark_2,
184
+            tor.remark_3,
185
+            tor.remark_4,
186
+            tor.remark_5,
187
+            tor.out_truck_no,
188
+            tor.out_dtm,
189
+            tor.distrib_id,
190
+            tor.out_user_id,
191
+            owner.customer_nm as owner_company_name,
192
+            receiving.customer_nm as receiving_company_name,
193
+            customer.customer_nm as customer_company_name,
194
+            material.material_name as material_name,
195
+            material.material_code as material_code,
196
+            material.material_standard as material_standard,
197
+            material.material_model as material_model
198
+        from T_OUT_RECORD tor
199
+                 left join T_MAIN_CUSTOMER owner on owner.id = tor.owner_company
200
+                 left join T_MAIN_CUSTOMER receiving on receiving.id = tor.receiving_company
201
+                 left join T_MAIN_CUSTOMER customer on customer.id = tor.customer_company
202
+                 left join T_MAIN_MATERIAL material on material.id = tor.material_id
203
+        <include refid="OutrecordWhere"/>
204
+        order by tor.out_dtm desc
205
+    </select>
206
+
207
+    <select id="selectStatistics" resultType="map" parameterType="map">
208
+        select
209
+            nvl(sum(tor.out_quantity), 0) as totalQuantity,
210
+            nvl(sum(tor.out_weight), 0) as totalWeight
211
+        from T_OUT_RECORD tor
212
+                 left join T_MAIN_CUSTOMER owner on owner.id = tor.owner_company
213
+                 left join T_MAIN_CUSTOMER receiving on receiving.id = tor.receiving_company
214
+                 left join T_MAIN_CUSTOMER customer on customer.id = tor.customer_company
215
+                 left join T_MAIN_MATERIAL material on material.id = tor.material_id
216
+        <include refid="OutrecordWhere"/>
217
+    </select>
218
+</mapper>
219
+

+ 169
- 0
sto/src/main/java/com/shinsoft/sto/model/record/Outrecord.java Näytä tiedosto

@@ -0,0 +1,169 @@
1
+package com.shinsoft.sto.model.record;
2
+
3
+import com.baomidou.mybatisplus.annotation.TableField;
4
+import com.baomidou.mybatisplus.annotation.TableName;
5
+import com.shinsoft.generator.model.BaseModel;
6
+import io.swagger.annotations.ApiModel;
7
+import io.swagger.annotations.ApiModelProperty;
8
+import lombok.Getter;
9
+import lombok.Setter;
10
+import lombok.experimental.Accessors;
11
+
12
+import java.math.BigDecimal;
13
+import java.util.Date;
14
+
15
+/**
16
+ * 出库记录视图模型,对应 T_OUT_RECORD 表
17
+ */
18
+@Getter
19
+@Setter
20
+@Accessors(chain = true)
21
+@TableName("T_OUT_RECORD")
22
+@ApiModel(value = "Outrecord", description = "出库记录")
23
+public class Outrecord extends BaseModel {
24
+
25
+    @ApiModelProperty("入库车号")
26
+    private String inTruckNo;
27
+
28
+    @ApiModelProperty("入库/理货人员姓名")
29
+    private String tallyPeople;
30
+
31
+    @ApiModelProperty("入库时间")
32
+    private Date inDtm;
33
+
34
+    @ApiModelProperty("出库库房名称")
35
+    private String outWareName;
36
+
37
+    @ApiModelProperty("出库垛位名称")
38
+    private String outStackName;
39
+
40
+    @ApiModelProperty("出库层号")
41
+    private String outLayerNo;
42
+
43
+    @ApiModelProperty("材料号/批号")
44
+    private String prodNo;
45
+
46
+    @ApiModelProperty("货权公司ID")
47
+    private String ownerCompany;
48
+
49
+    @ApiModelProperty("收货公司ID")
50
+    private String receivingCompany;
51
+
52
+    @ApiModelProperty("最终客户公司ID")
53
+    private String customerCompany;
54
+
55
+    @ApiModelProperty("物料ID")
56
+    private String materialId;
57
+
58
+    @ApiModelProperty("钢种信息")
59
+    private String stGrade;
60
+
61
+    @ApiModelProperty("出库重量")
62
+    private BigDecimal outWeight;
63
+
64
+    @ApiModelProperty("出库数量")
65
+    private BigDecimal outQuantity;
66
+
67
+    @ApiModelProperty("出库标记0为正常在用,1为取消入库")
68
+    private String outFlag;
69
+
70
+    @ApiModelProperty("收货地址,空时读取客户表地址")
71
+    private String deliveryAddress;
72
+
73
+    @ApiModelProperty("材料属性01")
74
+    private String attrib01;
75
+    @ApiModelProperty("材料属性02")
76
+    private String attrib02;
77
+    @ApiModelProperty("材料属性03")
78
+    private String attrib03;
79
+    @ApiModelProperty("材料属性04")
80
+    private String attrib04;
81
+    @ApiModelProperty("材料属性05")
82
+    private String attrib05;
83
+    @ApiModelProperty("材料属性06")
84
+    private String attrib06;
85
+    @ApiModelProperty("材料属性07")
86
+    private String attrib07;
87
+    @ApiModelProperty("材料属性08")
88
+    private String attrib08;
89
+    @ApiModelProperty("材料属性09")
90
+    private String attrib09;
91
+    @ApiModelProperty("材料属性10")
92
+    private String attrib10;
93
+    @ApiModelProperty("材料属性11")
94
+    private String attrib11;
95
+    @ApiModelProperty("材料属性12")
96
+    private String attrib12;
97
+    @ApiModelProperty("材料属性13")
98
+    private String attrib13;
99
+    @ApiModelProperty("材料属性14")
100
+    private String attrib14;
101
+    @ApiModelProperty("材料属性15")
102
+    private String attrib15;
103
+    @ApiModelProperty("材料属性16")
104
+    private String attrib16;
105
+    @ApiModelProperty("材料属性17")
106
+    private String attrib17;
107
+    @ApiModelProperty("材料属性18")
108
+    private String attrib18;
109
+    @ApiModelProperty("材料属性19")
110
+    private String attrib19;
111
+    @ApiModelProperty("材料属性20")
112
+    private String attrib20;
113
+    @ApiModelProperty("材料属性21")
114
+    private String attrib21;
115
+    @ApiModelProperty("材料属性22")
116
+    private String attrib22;
117
+    @ApiModelProperty("材料属性23")
118
+    private String attrib23;
119
+    @ApiModelProperty("材料属性24")
120
+    private String attrib24;
121
+    @ApiModelProperty("材料属性25")
122
+    private String attrib25;
123
+
124
+    @ApiModelProperty("备注信息1")
125
+    private String remark1;
126
+    @ApiModelProperty("备注信息2")
127
+    private String remark2;
128
+    @ApiModelProperty("备注信息3")
129
+    private String remark3;
130
+    @ApiModelProperty("备注信息4")
131
+    private String remark4;
132
+    @ApiModelProperty("备注信息5")
133
+    private String remark5;
134
+
135
+    @ApiModelProperty("出库车号")
136
+    private String outTruckNo;
137
+
138
+    @ApiModelProperty("出库时间")
139
+    private Date outDtm;
140
+
141
+    @ApiModelProperty("配车单ID")
142
+    private String distribId;
143
+
144
+    @ApiModelProperty("出库人员id")
145
+    private String outUserId;
146
+
147
+    @TableField(exist = false)
148
+    private String ownerCompanyName;
149
+
150
+    @TableField(exist = false)
151
+    private String receivingCompanyName;
152
+
153
+    @TableField(exist = false)
154
+    private String customerCompanyName;
155
+
156
+    @TableField(exist = false)
157
+    private String materialName;
158
+
159
+    @TableField(exist = false)
160
+    private String materialCode;
161
+
162
+    @TableField(exist = false)
163
+    private String materialStandard;
164
+
165
+    @TableField(exist = false)
166
+    private String materialModel;
167
+}
168
+
169
+

+ 42
- 0
sto/src/main/java/com/shinsoft/sto/service/impl/record/OutrecordServiceImpl.java Näytä tiedosto

@@ -0,0 +1,42 @@
1
+package com.shinsoft.sto.service.impl.record;
2
+
3
+import com.baomidou.mybatisplus.core.metadata.IPage;
4
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
6
+import com.shinsoft.sto.mapper.record.OutrecordMapper;
7
+import com.shinsoft.sto.model.record.Outrecord;
8
+import com.shinsoft.sto.model.system.ResponseCodeMsg;
9
+import com.shinsoft.sto.model.system.ResultJSON;
10
+import com.shinsoft.sto.service.record.OutrecordService;
11
+import org.springframework.stereotype.Service;
12
+
13
+import java.util.Map;
14
+
15
+@Service
16
+public class OutrecordServiceImpl extends ServiceImpl<OutrecordMapper, Outrecord> implements OutrecordService {
17
+
18
+    @Override
19
+    public ResultJSON query(int page, int rows, Map<String, Object> map) {
20
+        try {
21
+            Page<Outrecord> pageParam = new Page<>(page, rows);
22
+            IPage<Outrecord> result = baseMapper.selectOutrecordPage(pageParam, map);
23
+            return ResultJSON.success(result);
24
+        } catch (Exception ex) {
25
+            ex.printStackTrace();
26
+            return ResultJSON.error(ResponseCodeMsg.CODE_EX, ex.getMessage());
27
+        }
28
+    }
29
+
30
+    @Override
31
+    public ResultJSON statistics(Map<String, Object> map) {
32
+        try {
33
+            Map<String, Object> stats = baseMapper.selectStatistics(map);
34
+            return ResultJSON.success(stats);
35
+        } catch (Exception ex) {
36
+            ex.printStackTrace();
37
+            return ResultJSON.error(ResponseCodeMsg.CODE_EX, ex.getMessage());
38
+        }
39
+    }
40
+}
41
+
42
+

+ 16
- 0
sto/src/main/java/com/shinsoft/sto/service/record/OutrecordService.java Näytä tiedosto

@@ -0,0 +1,16 @@
1
+package com.shinsoft.sto.service.record;
2
+
3
+import com.shinsoft.sto.model.system.ResultJSON;
4
+
5
+import java.util.Map;
6
+
7
+public interface OutrecordService {
8
+
9
+    ResultJSON query(int page,
10
+                     int rows,
11
+                     Map<String, Object> map);
12
+
13
+    ResultJSON statistics(Map<String, Object> map);
14
+}
15
+
16
+

Loading…
Peruuta
Tallenna