fanxw 11 ヶ月 前
コミット
45ee50589a

+ 69 - 0
src/main/java/com/chinaitop/depot/device/controller/StorageSlkhxxController.java

@@ -0,0 +1,69 @@
1
+package com.chinaitop.depot.device.controller;
2
+
3
+import java.util.HashMap;
4
+import java.util.Map;
5
+
6
+import javax.annotation.Resource;
7
+
8
+import org.springframework.http.MediaType;
9
+import org.springframework.web.bind.annotation.RequestMapping;
10
+import org.springframework.web.bind.annotation.RequestMethod;
11
+import org.springframework.web.bind.annotation.RestController;
12
+
13
+import com.chinaitop.depot.device.model.StorageSlkhxx;
14
+import com.chinaitop.depot.device.service.StorageSlkhxxService;
15
+
16
+import io.swagger.annotations.Api;
17
+import io.swagger.annotations.ApiImplicitParam;
18
+import io.swagger.annotations.ApiImplicitParams;
19
+import io.swagger.annotations.ApiOperation;
20
+
21
+@RestController
22
+@RequestMapping("/storageSlkhxx")
23
+@Api(value = "StorageSlkhxxController", description = "散粮客户信息")
24
+public class StorageSlkhxxController {
25
+
26
+	@Resource
27
+	private StorageSlkhxxService storageSlkhxxService;
28
+
29
+	@RequestMapping(value = "/saveOrUpdate", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
30
+    @ApiOperation(value = "根据通知单号查询出入库业务数据", notes = "支持分页")
31
+    @ApiImplicitParams({
32
+        @ApiImplicitParam(name = "json", value = "数据对象", paramType = "form")
33
+    })
34
+	public Map<String, String> saveOrUpdate(String json) {
35
+		Map<String, String> map = new HashMap<String, String>();
36
+		try {
37
+			int i = storageSlkhxxService.saveOrUpdate(json);
38
+			if (i > 0) {
39
+				map.put("status", "200");
40
+				map.put("msg", "操作成功");
41
+			}
42
+		} catch (Exception e) {
43
+			map.put("status", "500");
44
+			map.put("msg", e.getMessage());
45
+			e.printStackTrace();
46
+		}
47
+		return map;
48
+	}
49
+
50
+	@RequestMapping(value = "/queryStorageSlkhxx", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.GET)
51
+    @ApiOperation(value = "根据通知单号查询出入库业务数据", notes = "支持分页")
52
+    @ApiImplicitParams({
53
+        @ApiImplicitParam(name = "khmc", value = "客户名称", paramType = "query"),
54
+        @ApiImplicitParam(name = "sfzhm", value = "身份证号码", paramType = "query")
55
+    })
56
+	public Map<String, Object> queryStorageSlkhxx(String khmc, String sfzhm) {
57
+		Map<String, Object> map = new HashMap<String, Object>();
58
+		try {
59
+			StorageSlkhxx storageSlkhxx = storageSlkhxxService.queryStorageSlkhxx(khmc, sfzhm);
60
+			map.put("status", 200);
61
+			map.put("msg", storageSlkhxx);
62
+		} catch (Exception e) {
63
+			map.put("status", "500");
64
+			map.put("msg", e.getMessage());
65
+			e.printStackTrace();
66
+		}
67
+		return map;
68
+	}
69
+}

+ 4 - 1
src/main/java/com/chinaitop/depot/device/mapper/StorageJsglKhxxMapper.xml

@@ -370,10 +370,12 @@
370 370
   <!-- 根据通知单号查询出入库业务数据 -->
371 371
   <select id="queryCrkywData" parameterType="map" resultType="java.util.Map">
372 372
     select 
373
-	  a.bizno, a.cphm cph, c.srsl crksl, to_char(c.rq, 'yyyy-MM-dd HH24:mi:ss') crkrq, b.cyr sfkr, b.cyrsfzh skrsfzh
373
+	  a.bizno, a.cphm cph, c.srsl crksl, to_char(c.rq, 'yyyy-MM-dd HH24:mi:ss') crkrq, b.cyr sfkr, b.cyrsfzh skrsfzh,
374
+	  d.khhmc, d.yhhbdm, d.khhh, d.yhzh
374 375
 	from lsreport_ts:data_kcgl_xckc_default a 
375 376
 	left join lsreport_ts:data_crkyw_rmdj_default b on b.bizno=a.bizno
376 377
 	left join lsreport_ts:data_kcgl_fcbgz_default c on c.dataid=a.dataid
378
+	left join depot:storage_slkhxx d on d.khmc=b.cyr and d.sfzhm=b.cyrsfzh
377 379
 	where a.tzdh=#{obj.tzdbh, jdbcType=VARCHAR}
378 380
 	<if test="obj.cph != null">
379 381
 	and a.cphm like #{obj.cph,jdbcType=VARCHAR}
@@ -384,5 +386,6 @@
384 386
 	<if test="obj.endTime != null">
385 387
 	and c.rq &lt;= #{obj.endTime,jdbcType=VARCHAR}
386 388
 	</if>
389
+	order by c.rq desc
387 390
   </select>
388 391
 </mapper>

+ 31 - 0
src/main/java/com/chinaitop/depot/device/mapper/StorageSlkhxxMapper.java

@@ -0,0 +1,31 @@
1
+package com.chinaitop.depot.device.mapper;
2
+
3
+import com.chinaitop.depot.device.model.StorageSlkhxx;
4
+import com.chinaitop.depot.device.model.StorageSlkhxxExample;
5
+import com.chinaitop.depot.device.model.StorageSlkhxxKey;
6
+import java.util.List;
7
+import org.apache.ibatis.annotations.Param;
8
+
9
+public interface StorageSlkhxxMapper {
10
+    int countByExample(StorageSlkhxxExample example);
11
+
12
+    int deleteByExample(StorageSlkhxxExample example);
13
+
14
+    int deleteByPrimaryKey(StorageSlkhxxKey key);
15
+
16
+    int insert(StorageSlkhxx record);
17
+
18
+    int insertSelective(StorageSlkhxx record);
19
+
20
+    List<StorageSlkhxx> selectByExample(StorageSlkhxxExample example);
21
+
22
+    StorageSlkhxx selectByPrimaryKey(StorageSlkhxxKey key);
23
+
24
+    int updateByExampleSelective(@Param("record") StorageSlkhxx record, @Param("example") StorageSlkhxxExample example);
25
+
26
+    int updateByExample(@Param("record") StorageSlkhxx record, @Param("example") StorageSlkhxxExample example);
27
+
28
+    int updateByPrimaryKeySelective(StorageSlkhxx record);
29
+
30
+    int updateByPrimaryKey(StorageSlkhxx record);
31
+}

+ 226 - 0
src/main/java/com/chinaitop/depot/device/mapper/StorageSlkhxxMapper.xml

@@ -0,0 +1,226 @@
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.chinaitop.depot.device.mapper.StorageSlkhxxMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.device.model.StorageSlkhxx" >
5
+    <id column="khmc" property="khmc" jdbcType="VARCHAR" />
6
+    <id column="sfzhm" property="sfzhm" jdbcType="VARCHAR" />
7
+    <result column="khhmc" property="khhmc" jdbcType="VARCHAR" />
8
+    <result column="yhhbdm" property="yhhbdm" jdbcType="VARCHAR" />
9
+    <result column="khhh" property="khhh" jdbcType="VARCHAR" />
10
+    <result column="yhzh" property="yhzh" jdbcType="VARCHAR" />
11
+  </resultMap>
12
+  <sql id="Example_Where_Clause" >
13
+    <where >
14
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
15
+        <if test="criteria.valid" >
16
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
17
+            <foreach collection="criteria.criteria" item="criterion" >
18
+              <choose >
19
+                <when test="criterion.noValue" >
20
+                  and ${criterion.condition}
21
+                </when>
22
+                <when test="criterion.singleValue" >
23
+                  and ${criterion.condition} #{criterion.value}
24
+                </when>
25
+                <when test="criterion.betweenValue" >
26
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
27
+                </when>
28
+                <when test="criterion.listValue" >
29
+                  and ${criterion.condition}
30
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
31
+                    #{listItem}
32
+                  </foreach>
33
+                </when>
34
+              </choose>
35
+            </foreach>
36
+          </trim>
37
+        </if>
38
+      </foreach>
39
+    </where>
40
+  </sql>
41
+  <sql id="Update_By_Example_Where_Clause" >
42
+    <where >
43
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
44
+        <if test="criteria.valid" >
45
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
46
+            <foreach collection="criteria.criteria" item="criterion" >
47
+              <choose >
48
+                <when test="criterion.noValue" >
49
+                  and ${criterion.condition}
50
+                </when>
51
+                <when test="criterion.singleValue" >
52
+                  and ${criterion.condition} #{criterion.value}
53
+                </when>
54
+                <when test="criterion.betweenValue" >
55
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
56
+                </when>
57
+                <when test="criterion.listValue" >
58
+                  and ${criterion.condition}
59
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
60
+                    #{listItem}
61
+                  </foreach>
62
+                </when>
63
+              </choose>
64
+            </foreach>
65
+          </trim>
66
+        </if>
67
+      </foreach>
68
+    </where>
69
+  </sql>
70
+  <sql id="Base_Column_List" >
71
+    khmc, sfzhm, khhmc, yhhbdm, khhh, yhzh
72
+  </sql>
73
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.device.model.StorageSlkhxxExample" >
74
+    select
75
+    <if test="distinct" >
76
+      distinct
77
+    </if>
78
+    <include refid="Base_Column_List" />
79
+    from storage_slkhxx
80
+    <if test="_parameter != null" >
81
+      <include refid="Example_Where_Clause" />
82
+    </if>
83
+    <if test="orderByClause != null" >
84
+      order by ${orderByClause}
85
+    </if>
86
+  </select>
87
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.device.model.StorageSlkhxxKey" >
88
+    select 
89
+    <include refid="Base_Column_List" />
90
+    from storage_slkhxx
91
+    where khmc = #{khmc,jdbcType=VARCHAR}
92
+      and sfzhm = #{sfzhm,jdbcType=VARCHAR}
93
+  </select>
94
+  <delete id="deleteByPrimaryKey" parameterType="com.chinaitop.depot.device.model.StorageSlkhxxKey" >
95
+    delete from storage_slkhxx
96
+    where khmc = #{khmc,jdbcType=VARCHAR}
97
+      and sfzhm = #{sfzhm,jdbcType=VARCHAR}
98
+  </delete>
99
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.device.model.StorageSlkhxxExample" >
100
+    delete from storage_slkhxx
101
+    <if test="_parameter != null" >
102
+      <include refid="Example_Where_Clause" />
103
+    </if>
104
+  </delete>
105
+  <insert id="insert" parameterType="com.chinaitop.depot.device.model.StorageSlkhxx" >
106
+    insert into storage_slkhxx (khmc, sfzhm, khhmc, 
107
+      yhhbdm, khhh, yhzh)
108
+    values (#{khmc,jdbcType=VARCHAR}, #{sfzhm,jdbcType=VARCHAR}, #{khhmc,jdbcType=VARCHAR}, 
109
+      #{yhhbdm,jdbcType=VARCHAR}, #{khhh,jdbcType=VARCHAR}, #{yhzh,jdbcType=VARCHAR})
110
+  </insert>
111
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.device.model.StorageSlkhxx" >
112
+    insert into storage_slkhxx
113
+    <trim prefix="(" suffix=")" suffixOverrides="," >
114
+      <if test="khmc != null" >
115
+        khmc,
116
+      </if>
117
+      <if test="sfzhm != null" >
118
+        sfzhm,
119
+      </if>
120
+      <if test="khhmc != null" >
121
+        khhmc,
122
+      </if>
123
+      <if test="yhhbdm != null" >
124
+        yhhbdm,
125
+      </if>
126
+      <if test="khhh != null" >
127
+        khhh,
128
+      </if>
129
+      <if test="yhzh != null" >
130
+        yhzh,
131
+      </if>
132
+    </trim>
133
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
134
+      <if test="khmc != null" >
135
+        #{khmc,jdbcType=VARCHAR},
136
+      </if>
137
+      <if test="sfzhm != null" >
138
+        #{sfzhm,jdbcType=VARCHAR},
139
+      </if>
140
+      <if test="khhmc != null" >
141
+        #{khhmc,jdbcType=VARCHAR},
142
+      </if>
143
+      <if test="yhhbdm != null" >
144
+        #{yhhbdm,jdbcType=VARCHAR},
145
+      </if>
146
+      <if test="khhh != null" >
147
+        #{khhh,jdbcType=VARCHAR},
148
+      </if>
149
+      <if test="yhzh != null" >
150
+        #{yhzh,jdbcType=VARCHAR},
151
+      </if>
152
+    </trim>
153
+  </insert>
154
+  <select id="countByExample" parameterType="com.chinaitop.depot.device.model.StorageSlkhxxExample" resultType="java.lang.Integer" >
155
+    select count(*) from storage_slkhxx
156
+    <if test="_parameter != null" >
157
+      <include refid="Example_Where_Clause" />
158
+    </if>
159
+  </select>
160
+  <update id="updateByExampleSelective" parameterType="map" >
161
+    update storage_slkhxx
162
+    <set >
163
+      <if test="record.khmc != null" >
164
+        khmc = #{record.khmc,jdbcType=VARCHAR},
165
+      </if>
166
+      <if test="record.sfzhm != null" >
167
+        sfzhm = #{record.sfzhm,jdbcType=VARCHAR},
168
+      </if>
169
+      <if test="record.khhmc != null" >
170
+        khhmc = #{record.khhmc,jdbcType=VARCHAR},
171
+      </if>
172
+      <if test="record.yhhbdm != null" >
173
+        yhhbdm = #{record.yhhbdm,jdbcType=VARCHAR},
174
+      </if>
175
+      <if test="record.khhh != null" >
176
+        khhh = #{record.khhh,jdbcType=VARCHAR},
177
+      </if>
178
+      <if test="record.yhzh != null" >
179
+        yhzh = #{record.yhzh,jdbcType=VARCHAR},
180
+      </if>
181
+    </set>
182
+    <if test="_parameter != null" >
183
+      <include refid="Update_By_Example_Where_Clause" />
184
+    </if>
185
+  </update>
186
+  <update id="updateByExample" parameterType="map" >
187
+    update storage_slkhxx
188
+    set khmc = #{record.khmc,jdbcType=VARCHAR},
189
+      sfzhm = #{record.sfzhm,jdbcType=VARCHAR},
190
+      khhmc = #{record.khhmc,jdbcType=VARCHAR},
191
+      yhhbdm = #{record.yhhbdm,jdbcType=VARCHAR},
192
+      khhh = #{record.khhh,jdbcType=VARCHAR},
193
+      yhzh = #{record.yhzh,jdbcType=VARCHAR}
194
+    <if test="_parameter != null" >
195
+      <include refid="Update_By_Example_Where_Clause" />
196
+    </if>
197
+  </update>
198
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.device.model.StorageSlkhxx" >
199
+    update storage_slkhxx
200
+    <set >
201
+      <if test="khhmc != null" >
202
+        khhmc = #{khhmc,jdbcType=VARCHAR},
203
+      </if>
204
+      <if test="yhhbdm != null" >
205
+        yhhbdm = #{yhhbdm,jdbcType=VARCHAR},
206
+      </if>
207
+      <if test="khhh != null" >
208
+        khhh = #{khhh,jdbcType=VARCHAR},
209
+      </if>
210
+      <if test="yhzh != null" >
211
+        yhzh = #{yhzh,jdbcType=VARCHAR},
212
+      </if>
213
+    </set>
214
+    where khmc = #{khmc,jdbcType=VARCHAR}
215
+      and sfzhm = #{sfzhm,jdbcType=VARCHAR}
216
+  </update>
217
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.device.model.StorageSlkhxx" >
218
+    update storage_slkhxx
219
+    set khhmc = #{khhmc,jdbcType=VARCHAR},
220
+      yhhbdm = #{yhhbdm,jdbcType=VARCHAR},
221
+      khhh = #{khhh,jdbcType=VARCHAR},
222
+      yhzh = #{yhzh,jdbcType=VARCHAR}
223
+    where khmc = #{khmc,jdbcType=VARCHAR}
224
+      and sfzhm = #{sfzhm,jdbcType=VARCHAR}
225
+  </update>
226
+</mapper>

+ 75 - 0
src/main/java/com/chinaitop/depot/device/model/StorageSlkhxx.java

@@ -0,0 +1,75 @@
1
+package com.chinaitop.depot.device.model;
2
+
3
+public class StorageSlkhxx extends StorageSlkhxxKey {
4
+    private String khhmc;
5
+
6
+    private String yhhbdm;
7
+
8
+    private String khhh;
9
+
10
+    private String yhzh;
11
+
12
+    /**
13
+     * null
14
+     * @return khhmc null
15
+     */
16
+    public String getKhhmc() {
17
+        return khhmc;
18
+    }
19
+
20
+    /**
21
+     * null
22
+     * @param khhmc null
23
+     */
24
+    public void setKhhmc(String khhmc) {
25
+        this.khhmc = khhmc == null ? null : khhmc.trim();
26
+    }
27
+
28
+    /**
29
+     * null
30
+     * @return yhhbdm null
31
+     */
32
+    public String getYhhbdm() {
33
+        return yhhbdm;
34
+    }
35
+
36
+    /**
37
+     * null
38
+     * @param yhhbdm null
39
+     */
40
+    public void setYhhbdm(String yhhbdm) {
41
+        this.yhhbdm = yhhbdm == null ? null : yhhbdm.trim();
42
+    }
43
+
44
+    /**
45
+     * null
46
+     * @return khhh null
47
+     */
48
+    public String getKhhh() {
49
+        return khhh;
50
+    }
51
+
52
+    /**
53
+     * null
54
+     * @param khhh null
55
+     */
56
+    public void setKhhh(String khhh) {
57
+        this.khhh = khhh == null ? null : khhh.trim();
58
+    }
59
+
60
+    /**
61
+     * null
62
+     * @return yhzh null
63
+     */
64
+    public String getYhzh() {
65
+        return yhzh;
66
+    }
67
+
68
+    /**
69
+     * null
70
+     * @param yhzh null
71
+     */
72
+    public void setYhzh(String yhzh) {
73
+        this.yhzh = yhzh == null ? null : yhzh.trim();
74
+    }
75
+}

+ 638 - 0
src/main/java/com/chinaitop/depot/device/model/StorageSlkhxxExample.java

@@ -0,0 +1,638 @@
1
+package com.chinaitop.depot.device.model;
2
+
3
+import java.util.ArrayList;
4
+import java.util.List;
5
+
6
+public class StorageSlkhxxExample {
7
+    /**
8
+     * storage_slkhxx
9
+     */
10
+    protected String orderByClause;
11
+
12
+    /**
13
+     * storage_slkhxx
14
+     */
15
+    protected boolean distinct;
16
+
17
+    /**
18
+     * storage_slkhxx
19
+     */
20
+    protected List<Criteria> oredCriteria;
21
+
22
+    public StorageSlkhxxExample() {
23
+        oredCriteria = new ArrayList<Criteria>();
24
+    }
25
+
26
+    public void setOrderByClause(String orderByClause) {
27
+        this.orderByClause = orderByClause;
28
+    }
29
+
30
+    public String getOrderByClause() {
31
+        return orderByClause;
32
+    }
33
+
34
+    public void setDistinct(boolean distinct) {
35
+        this.distinct = distinct;
36
+    }
37
+
38
+    public boolean isDistinct() {
39
+        return distinct;
40
+    }
41
+
42
+    public List<Criteria> getOredCriteria() {
43
+        return oredCriteria;
44
+    }
45
+
46
+    public void or(Criteria criteria) {
47
+        oredCriteria.add(criteria);
48
+    }
49
+
50
+    public Criteria or() {
51
+        Criteria criteria = createCriteriaInternal();
52
+        oredCriteria.add(criteria);
53
+        return criteria;
54
+    }
55
+
56
+    public Criteria createCriteria() {
57
+        Criteria criteria = createCriteriaInternal();
58
+        if (oredCriteria.size() == 0) {
59
+            oredCriteria.add(criteria);
60
+        }
61
+        return criteria;
62
+    }
63
+
64
+    protected Criteria createCriteriaInternal() {
65
+        Criteria criteria = new Criteria();
66
+        return criteria;
67
+    }
68
+
69
+    public void clear() {
70
+        oredCriteria.clear();
71
+        orderByClause = null;
72
+        distinct = false;
73
+    }
74
+
75
+    /**
76
+     * storage_slkhxx 2025-03-04
77
+     */
78
+    protected abstract static class GeneratedCriteria {
79
+        protected List<Criterion> criteria;
80
+
81
+        protected GeneratedCriteria() {
82
+            super();
83
+            criteria = new ArrayList<Criterion>();
84
+        }
85
+
86
+        public boolean isValid() {
87
+            return criteria.size() > 0;
88
+        }
89
+
90
+        public List<Criterion> getAllCriteria() {
91
+            return criteria;
92
+        }
93
+
94
+        public List<Criterion> getCriteria() {
95
+            return criteria;
96
+        }
97
+
98
+        protected void addCriterion(String condition) {
99
+            if (condition == null) {
100
+                throw new RuntimeException("Value for condition cannot be null");
101
+            }
102
+            criteria.add(new Criterion(condition));
103
+        }
104
+
105
+        protected void addCriterion(String condition, Object value, String property) {
106
+            if (value == null) {
107
+                throw new RuntimeException("Value for " + property + " cannot be null");
108
+            }
109
+            criteria.add(new Criterion(condition, value));
110
+        }
111
+
112
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
113
+            if (value1 == null || value2 == null) {
114
+                throw new RuntimeException("Between values for " + property + " cannot be null");
115
+            }
116
+            criteria.add(new Criterion(condition, value1, value2));
117
+        }
118
+
119
+        public Criteria andKhmcIsNull() {
120
+            addCriterion("khmc is null");
121
+            return (Criteria) this;
122
+        }
123
+
124
+        public Criteria andKhmcIsNotNull() {
125
+            addCriterion("khmc is not null");
126
+            return (Criteria) this;
127
+        }
128
+
129
+        public Criteria andKhmcEqualTo(String value) {
130
+            addCriterion("khmc =", value, "khmc");
131
+            return (Criteria) this;
132
+        }
133
+
134
+        public Criteria andKhmcNotEqualTo(String value) {
135
+            addCriterion("khmc <>", value, "khmc");
136
+            return (Criteria) this;
137
+        }
138
+
139
+        public Criteria andKhmcGreaterThan(String value) {
140
+            addCriterion("khmc >", value, "khmc");
141
+            return (Criteria) this;
142
+        }
143
+
144
+        public Criteria andKhmcGreaterThanOrEqualTo(String value) {
145
+            addCriterion("khmc >=", value, "khmc");
146
+            return (Criteria) this;
147
+        }
148
+
149
+        public Criteria andKhmcLessThan(String value) {
150
+            addCriterion("khmc <", value, "khmc");
151
+            return (Criteria) this;
152
+        }
153
+
154
+        public Criteria andKhmcLessThanOrEqualTo(String value) {
155
+            addCriterion("khmc <=", value, "khmc");
156
+            return (Criteria) this;
157
+        }
158
+
159
+        public Criteria andKhmcLike(String value) {
160
+            addCriterion("khmc like", value, "khmc");
161
+            return (Criteria) this;
162
+        }
163
+
164
+        public Criteria andKhmcNotLike(String value) {
165
+            addCriterion("khmc not like", value, "khmc");
166
+            return (Criteria) this;
167
+        }
168
+
169
+        public Criteria andKhmcIn(List<String> values) {
170
+            addCriterion("khmc in", values, "khmc");
171
+            return (Criteria) this;
172
+        }
173
+
174
+        public Criteria andKhmcNotIn(List<String> values) {
175
+            addCriterion("khmc not in", values, "khmc");
176
+            return (Criteria) this;
177
+        }
178
+
179
+        public Criteria andKhmcBetween(String value1, String value2) {
180
+            addCriterion("khmc between", value1, value2, "khmc");
181
+            return (Criteria) this;
182
+        }
183
+
184
+        public Criteria andKhmcNotBetween(String value1, String value2) {
185
+            addCriterion("khmc not between", value1, value2, "khmc");
186
+            return (Criteria) this;
187
+        }
188
+
189
+        public Criteria andSfzhmIsNull() {
190
+            addCriterion("sfzhm is null");
191
+            return (Criteria) this;
192
+        }
193
+
194
+        public Criteria andSfzhmIsNotNull() {
195
+            addCriterion("sfzhm is not null");
196
+            return (Criteria) this;
197
+        }
198
+
199
+        public Criteria andSfzhmEqualTo(String value) {
200
+            addCriterion("sfzhm =", value, "sfzhm");
201
+            return (Criteria) this;
202
+        }
203
+
204
+        public Criteria andSfzhmNotEqualTo(String value) {
205
+            addCriterion("sfzhm <>", value, "sfzhm");
206
+            return (Criteria) this;
207
+        }
208
+
209
+        public Criteria andSfzhmGreaterThan(String value) {
210
+            addCriterion("sfzhm >", value, "sfzhm");
211
+            return (Criteria) this;
212
+        }
213
+
214
+        public Criteria andSfzhmGreaterThanOrEqualTo(String value) {
215
+            addCriterion("sfzhm >=", value, "sfzhm");
216
+            return (Criteria) this;
217
+        }
218
+
219
+        public Criteria andSfzhmLessThan(String value) {
220
+            addCriterion("sfzhm <", value, "sfzhm");
221
+            return (Criteria) this;
222
+        }
223
+
224
+        public Criteria andSfzhmLessThanOrEqualTo(String value) {
225
+            addCriterion("sfzhm <=", value, "sfzhm");
226
+            return (Criteria) this;
227
+        }
228
+
229
+        public Criteria andSfzhmLike(String value) {
230
+            addCriterion("sfzhm like", value, "sfzhm");
231
+            return (Criteria) this;
232
+        }
233
+
234
+        public Criteria andSfzhmNotLike(String value) {
235
+            addCriterion("sfzhm not like", value, "sfzhm");
236
+            return (Criteria) this;
237
+        }
238
+
239
+        public Criteria andSfzhmIn(List<String> values) {
240
+            addCriterion("sfzhm in", values, "sfzhm");
241
+            return (Criteria) this;
242
+        }
243
+
244
+        public Criteria andSfzhmNotIn(List<String> values) {
245
+            addCriterion("sfzhm not in", values, "sfzhm");
246
+            return (Criteria) this;
247
+        }
248
+
249
+        public Criteria andSfzhmBetween(String value1, String value2) {
250
+            addCriterion("sfzhm between", value1, value2, "sfzhm");
251
+            return (Criteria) this;
252
+        }
253
+
254
+        public Criteria andSfzhmNotBetween(String value1, String value2) {
255
+            addCriterion("sfzhm not between", value1, value2, "sfzhm");
256
+            return (Criteria) this;
257
+        }
258
+
259
+        public Criteria andKhhmcIsNull() {
260
+            addCriterion("khhmc is null");
261
+            return (Criteria) this;
262
+        }
263
+
264
+        public Criteria andKhhmcIsNotNull() {
265
+            addCriterion("khhmc is not null");
266
+            return (Criteria) this;
267
+        }
268
+
269
+        public Criteria andKhhmcEqualTo(String value) {
270
+            addCriterion("khhmc =", value, "khhmc");
271
+            return (Criteria) this;
272
+        }
273
+
274
+        public Criteria andKhhmcNotEqualTo(String value) {
275
+            addCriterion("khhmc <>", value, "khhmc");
276
+            return (Criteria) this;
277
+        }
278
+
279
+        public Criteria andKhhmcGreaterThan(String value) {
280
+            addCriterion("khhmc >", value, "khhmc");
281
+            return (Criteria) this;
282
+        }
283
+
284
+        public Criteria andKhhmcGreaterThanOrEqualTo(String value) {
285
+            addCriterion("khhmc >=", value, "khhmc");
286
+            return (Criteria) this;
287
+        }
288
+
289
+        public Criteria andKhhmcLessThan(String value) {
290
+            addCriterion("khhmc <", value, "khhmc");
291
+            return (Criteria) this;
292
+        }
293
+
294
+        public Criteria andKhhmcLessThanOrEqualTo(String value) {
295
+            addCriterion("khhmc <=", value, "khhmc");
296
+            return (Criteria) this;
297
+        }
298
+
299
+        public Criteria andKhhmcLike(String value) {
300
+            addCriterion("khhmc like", value, "khhmc");
301
+            return (Criteria) this;
302
+        }
303
+
304
+        public Criteria andKhhmcNotLike(String value) {
305
+            addCriterion("khhmc not like", value, "khhmc");
306
+            return (Criteria) this;
307
+        }
308
+
309
+        public Criteria andKhhmcIn(List<String> values) {
310
+            addCriterion("khhmc in", values, "khhmc");
311
+            return (Criteria) this;
312
+        }
313
+
314
+        public Criteria andKhhmcNotIn(List<String> values) {
315
+            addCriterion("khhmc not in", values, "khhmc");
316
+            return (Criteria) this;
317
+        }
318
+
319
+        public Criteria andKhhmcBetween(String value1, String value2) {
320
+            addCriterion("khhmc between", value1, value2, "khhmc");
321
+            return (Criteria) this;
322
+        }
323
+
324
+        public Criteria andKhhmcNotBetween(String value1, String value2) {
325
+            addCriterion("khhmc not between", value1, value2, "khhmc");
326
+            return (Criteria) this;
327
+        }
328
+
329
+        public Criteria andYhhbdmIsNull() {
330
+            addCriterion("yhhbdm is null");
331
+            return (Criteria) this;
332
+        }
333
+
334
+        public Criteria andYhhbdmIsNotNull() {
335
+            addCriterion("yhhbdm is not null");
336
+            return (Criteria) this;
337
+        }
338
+
339
+        public Criteria andYhhbdmEqualTo(String value) {
340
+            addCriterion("yhhbdm =", value, "yhhbdm");
341
+            return (Criteria) this;
342
+        }
343
+
344
+        public Criteria andYhhbdmNotEqualTo(String value) {
345
+            addCriterion("yhhbdm <>", value, "yhhbdm");
346
+            return (Criteria) this;
347
+        }
348
+
349
+        public Criteria andYhhbdmGreaterThan(String value) {
350
+            addCriterion("yhhbdm >", value, "yhhbdm");
351
+            return (Criteria) this;
352
+        }
353
+
354
+        public Criteria andYhhbdmGreaterThanOrEqualTo(String value) {
355
+            addCriterion("yhhbdm >=", value, "yhhbdm");
356
+            return (Criteria) this;
357
+        }
358
+
359
+        public Criteria andYhhbdmLessThan(String value) {
360
+            addCriterion("yhhbdm <", value, "yhhbdm");
361
+            return (Criteria) this;
362
+        }
363
+
364
+        public Criteria andYhhbdmLessThanOrEqualTo(String value) {
365
+            addCriterion("yhhbdm <=", value, "yhhbdm");
366
+            return (Criteria) this;
367
+        }
368
+
369
+        public Criteria andYhhbdmLike(String value) {
370
+            addCriterion("yhhbdm like", value, "yhhbdm");
371
+            return (Criteria) this;
372
+        }
373
+
374
+        public Criteria andYhhbdmNotLike(String value) {
375
+            addCriterion("yhhbdm not like", value, "yhhbdm");
376
+            return (Criteria) this;
377
+        }
378
+
379
+        public Criteria andYhhbdmIn(List<String> values) {
380
+            addCriterion("yhhbdm in", values, "yhhbdm");
381
+            return (Criteria) this;
382
+        }
383
+
384
+        public Criteria andYhhbdmNotIn(List<String> values) {
385
+            addCriterion("yhhbdm not in", values, "yhhbdm");
386
+            return (Criteria) this;
387
+        }
388
+
389
+        public Criteria andYhhbdmBetween(String value1, String value2) {
390
+            addCriterion("yhhbdm between", value1, value2, "yhhbdm");
391
+            return (Criteria) this;
392
+        }
393
+
394
+        public Criteria andYhhbdmNotBetween(String value1, String value2) {
395
+            addCriterion("yhhbdm not between", value1, value2, "yhhbdm");
396
+            return (Criteria) this;
397
+        }
398
+
399
+        public Criteria andKhhhIsNull() {
400
+            addCriterion("khhh is null");
401
+            return (Criteria) this;
402
+        }
403
+
404
+        public Criteria andKhhhIsNotNull() {
405
+            addCriterion("khhh is not null");
406
+            return (Criteria) this;
407
+        }
408
+
409
+        public Criteria andKhhhEqualTo(String value) {
410
+            addCriterion("khhh =", value, "khhh");
411
+            return (Criteria) this;
412
+        }
413
+
414
+        public Criteria andKhhhNotEqualTo(String value) {
415
+            addCriterion("khhh <>", value, "khhh");
416
+            return (Criteria) this;
417
+        }
418
+
419
+        public Criteria andKhhhGreaterThan(String value) {
420
+            addCriterion("khhh >", value, "khhh");
421
+            return (Criteria) this;
422
+        }
423
+
424
+        public Criteria andKhhhGreaterThanOrEqualTo(String value) {
425
+            addCriterion("khhh >=", value, "khhh");
426
+            return (Criteria) this;
427
+        }
428
+
429
+        public Criteria andKhhhLessThan(String value) {
430
+            addCriterion("khhh <", value, "khhh");
431
+            return (Criteria) this;
432
+        }
433
+
434
+        public Criteria andKhhhLessThanOrEqualTo(String value) {
435
+            addCriterion("khhh <=", value, "khhh");
436
+            return (Criteria) this;
437
+        }
438
+
439
+        public Criteria andKhhhLike(String value) {
440
+            addCriterion("khhh like", value, "khhh");
441
+            return (Criteria) this;
442
+        }
443
+
444
+        public Criteria andKhhhNotLike(String value) {
445
+            addCriterion("khhh not like", value, "khhh");
446
+            return (Criteria) this;
447
+        }
448
+
449
+        public Criteria andKhhhIn(List<String> values) {
450
+            addCriterion("khhh in", values, "khhh");
451
+            return (Criteria) this;
452
+        }
453
+
454
+        public Criteria andKhhhNotIn(List<String> values) {
455
+            addCriterion("khhh not in", values, "khhh");
456
+            return (Criteria) this;
457
+        }
458
+
459
+        public Criteria andKhhhBetween(String value1, String value2) {
460
+            addCriterion("khhh between", value1, value2, "khhh");
461
+            return (Criteria) this;
462
+        }
463
+
464
+        public Criteria andKhhhNotBetween(String value1, String value2) {
465
+            addCriterion("khhh not between", value1, value2, "khhh");
466
+            return (Criteria) this;
467
+        }
468
+
469
+        public Criteria andYhzhIsNull() {
470
+            addCriterion("yhzh is null");
471
+            return (Criteria) this;
472
+        }
473
+
474
+        public Criteria andYhzhIsNotNull() {
475
+            addCriterion("yhzh is not null");
476
+            return (Criteria) this;
477
+        }
478
+
479
+        public Criteria andYhzhEqualTo(String value) {
480
+            addCriterion("yhzh =", value, "yhzh");
481
+            return (Criteria) this;
482
+        }
483
+
484
+        public Criteria andYhzhNotEqualTo(String value) {
485
+            addCriterion("yhzh <>", value, "yhzh");
486
+            return (Criteria) this;
487
+        }
488
+
489
+        public Criteria andYhzhGreaterThan(String value) {
490
+            addCriterion("yhzh >", value, "yhzh");
491
+            return (Criteria) this;
492
+        }
493
+
494
+        public Criteria andYhzhGreaterThanOrEqualTo(String value) {
495
+            addCriterion("yhzh >=", value, "yhzh");
496
+            return (Criteria) this;
497
+        }
498
+
499
+        public Criteria andYhzhLessThan(String value) {
500
+            addCriterion("yhzh <", value, "yhzh");
501
+            return (Criteria) this;
502
+        }
503
+
504
+        public Criteria andYhzhLessThanOrEqualTo(String value) {
505
+            addCriterion("yhzh <=", value, "yhzh");
506
+            return (Criteria) this;
507
+        }
508
+
509
+        public Criteria andYhzhLike(String value) {
510
+            addCriterion("yhzh like", value, "yhzh");
511
+            return (Criteria) this;
512
+        }
513
+
514
+        public Criteria andYhzhNotLike(String value) {
515
+            addCriterion("yhzh not like", value, "yhzh");
516
+            return (Criteria) this;
517
+        }
518
+
519
+        public Criteria andYhzhIn(List<String> values) {
520
+            addCriterion("yhzh in", values, "yhzh");
521
+            return (Criteria) this;
522
+        }
523
+
524
+        public Criteria andYhzhNotIn(List<String> values) {
525
+            addCriterion("yhzh not in", values, "yhzh");
526
+            return (Criteria) this;
527
+        }
528
+
529
+        public Criteria andYhzhBetween(String value1, String value2) {
530
+            addCriterion("yhzh between", value1, value2, "yhzh");
531
+            return (Criteria) this;
532
+        }
533
+
534
+        public Criteria andYhzhNotBetween(String value1, String value2) {
535
+            addCriterion("yhzh not between", value1, value2, "yhzh");
536
+            return (Criteria) this;
537
+        }
538
+    }
539
+
540
+    /**
541
+     * storage_slkhxx
542
+     */
543
+    public static class Criteria extends GeneratedCriteria {
544
+
545
+        protected Criteria() {
546
+            super();
547
+        }
548
+    }
549
+
550
+    /**
551
+     * storage_slkhxx 2025-03-04
552
+     */
553
+    public static class Criterion {
554
+        private String condition;
555
+
556
+        private Object value;
557
+
558
+        private Object secondValue;
559
+
560
+        private boolean noValue;
561
+
562
+        private boolean singleValue;
563
+
564
+        private boolean betweenValue;
565
+
566
+        private boolean listValue;
567
+
568
+        private String typeHandler;
569
+
570
+        public String getCondition() {
571
+            return condition;
572
+        }
573
+
574
+        public Object getValue() {
575
+            return value;
576
+        }
577
+
578
+        public Object getSecondValue() {
579
+            return secondValue;
580
+        }
581
+
582
+        public boolean isNoValue() {
583
+            return noValue;
584
+        }
585
+
586
+        public boolean isSingleValue() {
587
+            return singleValue;
588
+        }
589
+
590
+        public boolean isBetweenValue() {
591
+            return betweenValue;
592
+        }
593
+
594
+        public boolean isListValue() {
595
+            return listValue;
596
+        }
597
+
598
+        public String getTypeHandler() {
599
+            return typeHandler;
600
+        }
601
+
602
+        protected Criterion(String condition) {
603
+            super();
604
+            this.condition = condition;
605
+            this.typeHandler = null;
606
+            this.noValue = true;
607
+        }
608
+
609
+        protected Criterion(String condition, Object value, String typeHandler) {
610
+            super();
611
+            this.condition = condition;
612
+            this.value = value;
613
+            this.typeHandler = typeHandler;
614
+            if (value instanceof List<?>) {
615
+                this.listValue = true;
616
+            } else {
617
+                this.singleValue = true;
618
+            }
619
+        }
620
+
621
+        protected Criterion(String condition, Object value) {
622
+            this(condition, value, null);
623
+        }
624
+
625
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
626
+            super();
627
+            this.condition = condition;
628
+            this.value = value;
629
+            this.secondValue = secondValue;
630
+            this.typeHandler = typeHandler;
631
+            this.betweenValue = true;
632
+        }
633
+
634
+        protected Criterion(String condition, Object value, Object secondValue) {
635
+            this(condition, value, secondValue, null);
636
+        }
637
+    }
638
+}

+ 39 - 0
src/main/java/com/chinaitop/depot/device/model/StorageSlkhxxKey.java

@@ -0,0 +1,39 @@
1
+package com.chinaitop.depot.device.model;
2
+
3
+public class StorageSlkhxxKey {
4
+    private String khmc;
5
+
6
+    private String sfzhm;
7
+
8
+    /**
9
+     * null
10
+     * @return khmc null
11
+     */
12
+    public String getKhmc() {
13
+        return khmc;
14
+    }
15
+
16
+    /**
17
+     * null
18
+     * @param khmc null
19
+     */
20
+    public void setKhmc(String khmc) {
21
+        this.khmc = khmc == null ? null : khmc.trim();
22
+    }
23
+
24
+    /**
25
+     * null
26
+     * @return sfzhm null
27
+     */
28
+    public String getSfzhm() {
29
+        return sfzhm;
30
+    }
31
+
32
+    /**
33
+     * null
34
+     * @param sfzhm null
35
+     */
36
+    public void setSfzhm(String sfzhm) {
37
+        this.sfzhm = sfzhm == null ? null : sfzhm.trim();
38
+    }
39
+}

+ 23 - 0
src/main/java/com/chinaitop/depot/device/service/StorageSlkhxxService.java

@@ -0,0 +1,23 @@
1
+package com.chinaitop.depot.device.service;
2
+
3
+import com.chinaitop.depot.device.model.StorageSlkhxx;
4
+
5
+public interface StorageSlkhxxService {
6
+
7
+	/**
8
+	 * 散粮客户信息新增或修改
9
+	 * @param json
10
+	 * @return
11
+	 * @throws Exception
12
+	 */
13
+	int saveOrUpdate(String json) throws Exception;
14
+
15
+	/**
16
+	 * 按主键查询一条数据
17
+	 * @param khmc 客户名称
18
+	 * @param sfzhm 身份证号码
19
+	 * @return
20
+	 * @throws Exception
21
+	 */
22
+	StorageSlkhxx queryStorageSlkhxx(String khmc, String sfzhm) throws Exception;
23
+}

+ 47 - 0
src/main/java/com/chinaitop/depot/device/service/impl/StorageSlkhxxImpl.java

@@ -0,0 +1,47 @@
1
+package com.chinaitop.depot.device.service.impl;
2
+
3
+import javax.annotation.Resource;
4
+
5
+import org.apache.commons.lang3.StringUtils;
6
+import org.springframework.stereotype.Service;
7
+import org.springframework.util.ObjectUtils;
8
+
9
+import com.chinaitop.depot.device.mapper.StorageSlkhxxMapper;
10
+import com.chinaitop.depot.device.model.StorageSlkhxx;
11
+import com.chinaitop.depot.device.model.StorageSlkhxxKey;
12
+import com.chinaitop.depot.device.service.StorageSlkhxxService;
13
+import com.fasterxml.jackson.databind.ObjectMapper;
14
+
15
+@Service
16
+public class StorageSlkhxxImpl implements StorageSlkhxxService {
17
+
18
+	@Resource
19
+	private StorageSlkhxxMapper storageSlkhxxMapper;
20
+
21
+	@Override
22
+	public int saveOrUpdate(String json) throws Exception {
23
+		int i = 0;
24
+		ObjectMapper objectMapper = new ObjectMapper();
25
+		StorageSlkhxx storageSlkhxx = objectMapper.readValue(json, StorageSlkhxx.class);
26
+		if (StringUtils.isNotBlank(storageSlkhxx.getKhmc()) && StringUtils.isNotBlank(storageSlkhxx.getKhmc())) {
27
+			StorageSlkhxxKey storageSlkhxxKey = new StorageSlkhxxKey();
28
+			storageSlkhxxKey.setKhmc(storageSlkhxx.getKhmc());
29
+			storageSlkhxxKey.setSfzhm(storageSlkhxx.getSfzhm());
30
+			StorageSlkhxx qu = storageSlkhxxMapper.selectByPrimaryKey(storageSlkhxxKey);
31
+			if (ObjectUtils.isEmpty(qu)) {
32
+				i = storageSlkhxxMapper.insert(storageSlkhxx);
33
+			} else {
34
+				i = storageSlkhxxMapper.updateByPrimaryKey(storageSlkhxx);
35
+			}
36
+		}
37
+		return i;
38
+	}
39
+
40
+	@Override
41
+	public StorageSlkhxx queryStorageSlkhxx(String khmc, String sfzhm) throws Exception {
42
+		StorageSlkhxxKey storageSlkhxxKey = new StorageSlkhxxKey();
43
+		storageSlkhxxKey.setKhmc(khmc);
44
+		storageSlkhxxKey.setSfzhm(sfzhm);
45
+		return storageSlkhxxMapper.selectByPrimaryKey(storageSlkhxxKey);
46
+	}
47
+}