Commit bcdfd6c5d48c3e05c32f1c07d587ee01a768d65c
Merge branch 'developMain' of http://172.16.29.40:8010/huhai/WMSV1 into developMain
Showing
12 changed files
with
1077 additions
and
208 deletions
src/main/java/com/huaheng/api/U8/Service/ICSShipmentAPIService.java
@@ -10,7 +10,6 @@ import com.huaheng.common.utils.StringUtils; | @@ -10,7 +10,6 @@ import com.huaheng.common.utils.StringUtils; | ||
10 | import com.huaheng.common.utils.http.HttpUtils; | 10 | import com.huaheng.common.utils.http.HttpUtils; |
11 | import com.huaheng.common.utils.security.ShiroUtils; | 11 | import com.huaheng.common.utils.security.ShiroUtils; |
12 | import com.huaheng.framework.web.domain.AjaxResult; | 12 | import com.huaheng.framework.web.domain.AjaxResult; |
13 | -import com.huaheng.pc.general.company.domain.Company; | ||
14 | import com.huaheng.pc.general.company.service.ICompanyService; | 13 | import com.huaheng.pc.general.company.service.ICompanyService; |
15 | import com.huaheng.pc.general.material.domain.Material; | 14 | import com.huaheng.pc.general.material.domain.Material; |
16 | import com.huaheng.pc.general.material.service.IMaterialService; | 15 | import com.huaheng.pc.general.material.service.IMaterialService; |
src/main/java/com/huaheng/api/U8/domain/ICSShipmentDetail.java
1 | package com.huaheng.api.U8.domain; | 1 | package com.huaheng.api.U8.domain; |
2 | 2 | ||
3 | 3 | ||
4 | +import org.apache.commons.lang3.builder.ToStringBuilder; | ||
5 | + | ||
4 | import java.io.Serializable; | 6 | import java.io.Serializable; |
5 | import java.math.BigDecimal; | 7 | import java.math.BigDecimal; |
6 | import java.util.Date; | 8 | import java.util.Date; |
@@ -420,4 +422,47 @@ public class ICSShipmentDetail implements Serializable { | @@ -420,4 +422,47 @@ public class ICSShipmentDetail implements Serializable { | ||
420 | public void setMoDId(Integer moDId) { | 422 | public void setMoDId(Integer moDId) { |
421 | MoDId = moDId; | 423 | MoDId = moDId; |
422 | } | 424 | } |
425 | + | ||
426 | + @Override | ||
427 | + public String toString() { | ||
428 | + return new ToStringBuilder(this) | ||
429 | + .append("cCode", cCode) | ||
430 | + .append("ID", ID) | ||
431 | + .append("AutoID", AutoID) | ||
432 | + .append("irowno", irowno) | ||
433 | + .append("cItemName", cItemName) | ||
434 | + .append("DLID", DLID) | ||
435 | + .append("cSOCode", cSOCode) | ||
436 | + .append("cSOID", cSOID) | ||
437 | + .append("cSOAutoID", cSOAutoID) | ||
438 | + .append("MoId", MoId) | ||
439 | + .append("MoDId", MoDId) | ||
440 | + .append("MoCode", MoCode) | ||
441 | + .append("SortSeq", SortSeq) | ||
442 | + .append("warehouseId", warehouseId) | ||
443 | + .append("cWHCode", cWHCode) | ||
444 | + .append("cWHName", cWHName) | ||
445 | + .append("cInvCode", cInvCode) | ||
446 | + .append("materialId", materialId) | ||
447 | + .append("cInvName", cInvName) | ||
448 | + .append("cInvStd", cInvStd) | ||
449 | + .append("iQuantity", iQuantity) | ||
450 | + .append("cQuantity", cQuantity) | ||
451 | + .append("cComUnitName", cComUnitName) | ||
452 | + .append("StartDate", StartDate) | ||
453 | + .append("DueDate", DueDate) | ||
454 | + .append("companyId", companyId) | ||
455 | + .append("CompanyCode", CompanyCode) | ||
456 | + .append("cModifyDate", cModifyDate) | ||
457 | + .append("cMemo", cMemo) | ||
458 | + .append("iMaIDs", iMaIDs) | ||
459 | + .append("POCode", POCode) | ||
460 | + .append("POID", POID) | ||
461 | + .append("PODID", PODID) | ||
462 | + .append("iTrIds", iTrIds) | ||
463 | + .append("iDLsID", iDLsID) | ||
464 | + .append("iArrsId", iArrsId) | ||
465 | + .append("iPOsID", iPOsID) | ||
466 | + .toString(); | ||
467 | + } | ||
423 | } | 468 | } |
src/main/java/com/huaheng/api/U8/domain/ICSShipmentHeader.java
@@ -373,7 +373,6 @@ public class ICSShipmentHeader implements Serializable { | @@ -373,7 +373,6 @@ public class ICSShipmentHeader implements Serializable { | ||
373 | .append("DLID", getDLID()) | 373 | .append("DLID", getDLID()) |
374 | .append("cDLCode", getcDLCode()) | 374 | .append("cDLCode", getcDLCode()) |
375 | .append("cCusCode", getcCusCode()) | 375 | .append("cCusCode", getcCusCode()) |
376 | - .append("companyCode", getCompanyCode()) | ||
377 | .append("cCusName", getcCusName()) | 376 | .append("cCusName", getcCusName()) |
378 | .append("cSTName", getcSTName()) | 377 | .append("cSTName", getcSTName()) |
379 | .toString(); | 378 | .toString(); |
src/main/java/com/huaheng/pc/general/location/controller/LocationController.java
@@ -80,6 +80,46 @@ public class LocationController extends BaseController | @@ -80,6 +80,46 @@ public class LocationController extends BaseController | ||
80 | } | 80 | } |
81 | 81 | ||
82 | /** | 82 | /** |
83 | + * 批量新增库位 | ||
84 | + */ | ||
85 | + @GetMapping("/addBatch") | ||
86 | + public String addBatch() | ||
87 | + { | ||
88 | + return prefix + "/addBatch"; | ||
89 | + } | ||
90 | + | ||
91 | + /** | ||
92 | + * 批量新增保存库位 | ||
93 | + */ | ||
94 | + @RequiresPermissions("general:location:add") | ||
95 | + @Log(title = "通用-库位管理", operating = "新增库位", action = BusinessType.INSERT) | ||
96 | + @PostMapping("/addBatchSave") | ||
97 | + @ResponseBody | ||
98 | + public AjaxResult addBatchSave(Location lastLocation) { | ||
99 | + for (int i=1; i<=lastLocation.getRow().intValue(); i++) { | ||
100 | + for (int j=1; j<=lastLocation.getLine().intValue(); j++) { | ||
101 | + for (int k=1; k<=lastLocation.getLayer().intValue(); k++) { | ||
102 | + for (int m=1; m<=lastLocation.getGrid().intValue(); m++) { | ||
103 | + Integer roadway = (j / 2) + 1; | ||
104 | + Location location = new Location(); | ||
105 | + location.setRow(i); | ||
106 | + location.setLine(j); | ||
107 | + location.setLayer(k); | ||
108 | + location.setGrid(m); | ||
109 | + location.setZoneId(lastLocation.getZoneId()); | ||
110 | + location.setZoneCode(lastLocation.getZoneCode()); | ||
111 | + location.setType(lastLocation.getType()); | ||
112 | + location.setRoadway(roadway); | ||
113 | + location.setEnable(lastLocation.getEnable()); | ||
114 | + locationService.insertLocation(location); | ||
115 | + } | ||
116 | + } | ||
117 | + } | ||
118 | + } | ||
119 | + return AjaxResult.success(""); | ||
120 | + } | ||
121 | + | ||
122 | + /** | ||
83 | * 修改库位 | 123 | * 修改库位 |
84 | */ | 124 | */ |
85 | @GetMapping("/edit/{id}") | 125 | @GetMapping("/edit/{id}") |
src/main/java/com/huaheng/pc/general/location/service/LocationServiceImpl.java
@@ -108,9 +108,8 @@ public class LocationServiceImpl implements ILocationService { | @@ -108,9 +108,8 @@ public class LocationServiceImpl implements ILocationService { | ||
108 | String.format("%02d", location.getGrid())); | 108 | String.format("%02d", location.getGrid())); |
109 | Location locationCondition = new Location(); | 109 | Location locationCondition = new Location(); |
110 | locationCondition.setCode(code); | 110 | locationCondition.setCode(code); |
111 | - if (this.selectFirstEntity(locationCondition) != null) | ||
112 | - { | ||
113 | - throw new ServiceException("货位号(" + code + ")已经存在"); | 111 | + if (this.selectFirstEntity(locationCondition) != null) { |
112 | + return true; | ||
114 | } | 113 | } |
115 | else | 114 | else |
116 | { | 115 | { |
src/main/resources/mybatis/general/CompanyMapperAuto.xml
@@ -2,286 +2,908 @@ | @@ -2,286 +2,908 @@ | ||
2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
3 | <mapper namespace="com.huaheng.pc.general.company.mapper.CompanyMapperAuto"> | 3 | <mapper namespace="com.huaheng.pc.general.company.mapper.CompanyMapperAuto"> |
4 | <select id="selectListEntityByLike" resultType="com.huaheng.pc.general.company.domain.Company"> | 4 | <select id="selectListEntityByLike" resultType="com.huaheng.pc.general.company.domain.Company"> |
5 | - SELECT id, warehouseId, warehouseCode, companyId, companyCode | ||
6 | - FROM warehouse_company | 5 | + SELECT id, code, parentId, type, name, address1, address2, city, province, country, postalCode, attentionTo, phoneNum, mobile, faxNum, email, created, createdBy, lastUpdated, lastUpdatedBy, enable, deleted, userDef1, userDef2, userDef3 |
6 | + FROM company | ||
7 | <where> | 7 | <where> |
8 | <if test="id != null "> | 8 | <if test="id != null "> |
9 | AND id = #{id} | 9 | AND id = #{id} |
10 | </if> | 10 | </if> |
11 | - <if test="warehouseId != null "> | ||
12 | - AND warehouseId = #{warehouseId} | 11 | + <if test="code != null and code != '' "> |
12 | + AND code = #{code} | ||
13 | </if> | 13 | </if> |
14 | - <if test="warehouseCode != null and warehouseCode != '' "> | ||
15 | - AND warehouseCode = #{warehouseCode} | 14 | + <if test="parentId != null "> |
15 | + AND parentId = #{parentId} | ||
16 | </if> | 16 | </if> |
17 | - <if test="companyIdList != null and companyIdList.size() > 0 "> | ||
18 | - AND companyId in | ||
19 | - <foreach collection="companyIdList" item="companyIdItem" open="(" separator="," close=")"> | ||
20 | - #{companyIdItem} | ||
21 | - </foreach> | 17 | + <if test="type != null and type != '' "> |
18 | + AND type = #{type} | ||
22 | </if> | 19 | </if> |
23 | - <if test="companyId != null "> | ||
24 | - AND companyId = #{companyId} | 20 | + <if test="name != null and name != ''"> |
21 | + <bind name="namePattern" value="'%' + name + '%'" /> | ||
22 | + AND name like #{namePattern} | ||
25 | </if> | 23 | </if> |
26 | - <if test="companyCodeList != null and companyCodeList.size() > 0 "> | ||
27 | - AND companyCode in | ||
28 | - <foreach collection="companyCodeList" item="companyCodeItem" open="(" separator="," close=")"> | ||
29 | - #{companyCodeItem} | ||
30 | - </foreach> | 24 | + <if test="address1 != null and address1 != ''"> |
25 | + <bind name="address1Pattern" value="'%' + address1 + '%'" /> | ||
26 | + AND address1 like #{address1Pattern} | ||
31 | </if> | 27 | </if> |
32 | - <if test="companyCode != null and companyCode != '' "> | ||
33 | - AND companyCode = #{companyCode} | 28 | + <if test="address2 != null and address2 != ''"> |
29 | + <bind name="address2Pattern" value="'%' + address2 + '%'" /> | ||
30 | + AND address2 like #{address2Pattern} | ||
31 | + </if> | ||
32 | + <if test="city != null and city != ''"> | ||
33 | + <bind name="cityPattern" value="'%' + city + '%'" /> | ||
34 | + AND city like #{cityPattern} | ||
35 | + </if> | ||
36 | + <if test="province != null and province != ''"> | ||
37 | + <bind name="provincePattern" value="'%' + province + '%'" /> | ||
38 | + AND province like #{provincePattern} | ||
39 | + </if> | ||
40 | + <if test="country != null and country != ''"> | ||
41 | + <bind name="countryPattern" value="'%' + country + '%'" /> | ||
42 | + AND country like #{countryPattern} | ||
43 | + </if> | ||
44 | + <if test="postalCode != null and postalCode != '' "> | ||
45 | + AND postalCode = #{postalCode} | ||
46 | + </if> | ||
47 | + <if test="attentionTo != null and attentionTo != ''"> | ||
48 | + <bind name="attentionToPattern" value="'%' + attentionTo + '%'" /> | ||
49 | + AND attentionTo like #{attentionToPattern} | ||
50 | + </if> | ||
51 | + <if test="phoneNum != null and phoneNum != ''"> | ||
52 | + <bind name="phoneNumPattern" value="'%' + phoneNum + '%'" /> | ||
53 | + AND phoneNum like #{phoneNumPattern} | ||
54 | + </if> | ||
55 | + <if test="mobile != null and mobile != ''"> | ||
56 | + <bind name="mobilePattern" value="'%' + mobile + '%'" /> | ||
57 | + AND mobile like #{mobilePattern} | ||
58 | + </if> | ||
59 | + <if test="faxNum != null and faxNum != ''"> | ||
60 | + <bind name="faxNumPattern" value="'%' + faxNum + '%'" /> | ||
61 | + AND faxNum like #{faxNumPattern} | ||
62 | + </if> | ||
63 | + <if test="email != null and email != ''"> | ||
64 | + <bind name="emailPattern" value="'%' + email + '%'" /> | ||
65 | + AND email like #{emailPattern} | ||
66 | + </if> | ||
67 | + <if test="params != null and params.createdBegin != null and params.createdBegin != ''"> | ||
68 | + AND created >= #{params.createdBegin} | ||
69 | + </if> | ||
70 | + <if test="params != null and params.createdEnd != null and params.createdEnd != ''"> | ||
71 | + AND created <= #{params.createdEnd} | ||
72 | + </if> | ||
73 | + <if test="createdBy != null and createdBy != ''"> | ||
74 | + <bind name="createdByPattern" value="'%' + createdBy + '%'" /> | ||
75 | + AND createdBy like #{createdByPattern} | ||
76 | + </if> | ||
77 | + <if test="params != null and params.lastUpdatedBegin != null and params.lastUpdatedBegin != ''"> | ||
78 | + AND lastUpdated >= #{params.lastUpdatedBegin} | ||
79 | + </if> | ||
80 | + <if test="params != null and params.lastUpdatedEnd != null and params.lastUpdatedEnd != ''"> | ||
81 | + AND lastUpdated <= #{params.lastUpdatedEnd} | ||
82 | + </if> | ||
83 | + <if test="lastUpdatedBy != null and lastUpdatedBy != ''"> | ||
84 | + <bind name="lastUpdatedByPattern" value="'%' + lastUpdatedBy + '%'" /> | ||
85 | + AND lastUpdatedBy like #{lastUpdatedByPattern} | ||
86 | + </if> | ||
87 | + <if test="enable != null "> | ||
88 | + AND enable = #{enable} | ||
89 | + </if> | ||
90 | + <if test="deleted != null "> | ||
91 | + AND deleted = #{deleted} | ||
92 | + </if> | ||
93 | + <if test="userDef1 != null and userDef1 != ''"> | ||
94 | + <bind name="userDef1Pattern" value="'%' + userDef1 + '%'" /> | ||
95 | + AND userDef1 like #{userDef1Pattern} | ||
96 | + </if> | ||
97 | + <if test="userDef2 != null and userDef2 != ''"> | ||
98 | + <bind name="userDef2Pattern" value="'%' + userDef2 + '%'" /> | ||
99 | + AND userDef2 like #{userDef2Pattern} | ||
100 | + </if> | ||
101 | + <if test="userDef3 != null and userDef3 != ''"> | ||
102 | + <bind name="userDef3Pattern" value="'%' + userDef3 + '%'" /> | ||
103 | + AND userDef3 like #{userDef3Pattern} | ||
34 | </if> | 104 | </if> |
35 | </where> | 105 | </where> |
36 | </select> | 106 | </select> |
37 | 107 | ||
38 | <select id="selectListEntityByEqual" resultType="com.huaheng.pc.general.company.domain.Company"> | 108 | <select id="selectListEntityByEqual" resultType="com.huaheng.pc.general.company.domain.Company"> |
39 | - SELECT id, warehouseId, warehouseCode, companyId, companyCode | ||
40 | - FROM warehouse_company | 109 | + SELECT id, code, parentId, type, name, address1, address2, city, province, country, postalCode, attentionTo, phoneNum, mobile, faxNum, email, created, createdBy, lastUpdated, lastUpdatedBy, enable, deleted, userDef1, userDef2, userDef3 |
110 | + FROM company | ||
41 | <where> | 111 | <where> |
42 | <if test="id != null"> | 112 | <if test="id != null"> |
43 | AND id = #{id} | 113 | AND id = #{id} |
44 | </if> | 114 | </if> |
45 | - <if test="warehouseId != null"> | ||
46 | - AND warehouseId = #{warehouseId} | 115 | + <if test="code != null"> |
116 | + AND code = #{code} | ||
117 | + </if> | ||
118 | + <if test="parentId != null"> | ||
119 | + AND parentId = #{parentId} | ||
120 | + </if> | ||
121 | + <if test="type != null"> | ||
122 | + AND type = #{type} | ||
123 | + </if> | ||
124 | + <if test="name != null"> | ||
125 | + AND name = #{name} | ||
126 | + </if> | ||
127 | + <if test="address1 != null"> | ||
128 | + AND address1 = #{address1} | ||
129 | + </if> | ||
130 | + <if test="address2 != null"> | ||
131 | + AND address2 = #{address2} | ||
132 | + </if> | ||
133 | + <if test="city != null"> | ||
134 | + AND city = #{city} | ||
135 | + </if> | ||
136 | + <if test="province != null"> | ||
137 | + AND province = #{province} | ||
47 | </if> | 138 | </if> |
48 | - <if test="warehouseCode != null"> | ||
49 | - AND warehouseCode = #{warehouseCode} | 139 | + <if test="country != null"> |
140 | + AND country = #{country} | ||
50 | </if> | 141 | </if> |
51 | - <if test="companyIdList != null and companyIdList.size() > 0 "> | ||
52 | - AND companyId in | ||
53 | - <foreach collection="companyIdList" item="companyIdItem" open="(" separator="," close=")"> | ||
54 | - #{companyIdItem} | ||
55 | - </foreach> | 142 | + <if test="postalCode != null"> |
143 | + AND postalCode = #{postalCode} | ||
56 | </if> | 144 | </if> |
57 | - <if test="companyId != null"> | ||
58 | - AND companyId = #{companyId} | 145 | + <if test="attentionTo != null"> |
146 | + AND attentionTo = #{attentionTo} | ||
59 | </if> | 147 | </if> |
60 | - <if test="companyCodeList != null and companyCodeList.size() > 0 "> | ||
61 | - AND companyCode in | ||
62 | - <foreach collection="companyCodeList" item="companyCodeItem" open="(" separator="," close=")"> | ||
63 | - #{companyCodeItem} | ||
64 | - </foreach> | 148 | + <if test="phoneNum != null"> |
149 | + AND phoneNum = #{phoneNum} | ||
65 | </if> | 150 | </if> |
66 | - <if test="companyCode != null"> | ||
67 | - AND companyCode = #{companyCode} | 151 | + <if test="mobile != null"> |
152 | + AND mobile = #{mobile} | ||
153 | + </if> | ||
154 | + <if test="faxNum != null"> | ||
155 | + AND faxNum = #{faxNum} | ||
156 | + </if> | ||
157 | + <if test="email != null"> | ||
158 | + AND email = #{email} | ||
159 | + </if> | ||
160 | + <if test="created != null"> | ||
161 | + AND created = #{created} | ||
162 | + </if> | ||
163 | + <if test="createdBy != null"> | ||
164 | + AND createdBy = #{createdBy} | ||
165 | + </if> | ||
166 | + <if test="lastUpdated != null"> | ||
167 | + AND lastUpdated = #{lastUpdated} | ||
168 | + </if> | ||
169 | + <if test="lastUpdatedBy != null"> | ||
170 | + AND lastUpdatedBy = #{lastUpdatedBy} | ||
171 | + </if> | ||
172 | + <if test="enable != null"> | ||
173 | + AND enable = #{enable} | ||
174 | + </if> | ||
175 | + <if test="deleted != null"> | ||
176 | + AND deleted = #{deleted} | ||
177 | + </if> | ||
178 | + <if test="userDef1 != null"> | ||
179 | + AND userDef1 = #{userDef1} | ||
180 | + </if> | ||
181 | + <if test="userDef2 != null"> | ||
182 | + AND userDef2 = #{userDef2} | ||
183 | + </if> | ||
184 | + <if test="userDef3 != null"> | ||
185 | + AND userDef3 = #{userDef3} | ||
68 | </if> | 186 | </if> |
69 | </where> | 187 | </where> |
70 | </select> | 188 | </select> |
71 | 189 | ||
72 | <select id="selectListMapByEqual" resultType="java.util.HashMap"> | 190 | <select id="selectListMapByEqual" resultType="java.util.HashMap"> |
73 | - SELECT ${columns} FROM warehouse_company | 191 | + SELECT ${columns} FROM company |
74 | <where> | 192 | <where> |
75 | <if test="condition.id != null"> | 193 | <if test="condition.id != null"> |
76 | AND id = #{condition.id} | 194 | AND id = #{condition.id} |
77 | </if> | 195 | </if> |
78 | - <if test="condition.warehouseId != null"> | ||
79 | - AND warehouseId = #{condition.warehouseId} | 196 | + <if test="condition.code != null"> |
197 | + AND code = #{condition.code} | ||
198 | + </if> | ||
199 | + <if test="condition.parentId != null"> | ||
200 | + AND parentId = #{condition.parentId} | ||
201 | + </if> | ||
202 | + <if test="condition.type != null"> | ||
203 | + AND type = #{condition.type} | ||
204 | + </if> | ||
205 | + <if test="condition.name != null"> | ||
206 | + AND name = #{condition.name} | ||
207 | + </if> | ||
208 | + <if test="condition.address1 != null"> | ||
209 | + AND address1 = #{condition.address1} | ||
210 | + </if> | ||
211 | + <if test="condition.address2 != null"> | ||
212 | + AND address2 = #{condition.address2} | ||
213 | + </if> | ||
214 | + <if test="condition.city != null"> | ||
215 | + AND city = #{condition.city} | ||
216 | + </if> | ||
217 | + <if test="condition.province != null"> | ||
218 | + AND province = #{condition.province} | ||
219 | + </if> | ||
220 | + <if test="condition.country != null"> | ||
221 | + AND country = #{condition.country} | ||
222 | + </if> | ||
223 | + <if test="condition.postalCode != null"> | ||
224 | + AND postalCode = #{condition.postalCode} | ||
225 | + </if> | ||
226 | + <if test="condition.attentionTo != null"> | ||
227 | + AND attentionTo = #{condition.attentionTo} | ||
228 | + </if> | ||
229 | + <if test="condition.phoneNum != null"> | ||
230 | + AND phoneNum = #{condition.phoneNum} | ||
231 | + </if> | ||
232 | + <if test="condition.mobile != null"> | ||
233 | + AND mobile = #{condition.mobile} | ||
234 | + </if> | ||
235 | + <if test="condition.faxNum != null"> | ||
236 | + AND faxNum = #{condition.faxNum} | ||
237 | + </if> | ||
238 | + <if test="condition.email != null"> | ||
239 | + AND email = #{condition.email} | ||
240 | + </if> | ||
241 | + <if test="condition.created != null"> | ||
242 | + AND created = #{condition.created} | ||
80 | </if> | 243 | </if> |
81 | - <if test="condition.warehouseCode != null"> | ||
82 | - AND warehouseCode = #{condition.warehouseCode} | 244 | + <if test="condition.createdBy != null"> |
245 | + AND createdBy = #{condition.createdBy} | ||
83 | </if> | 246 | </if> |
84 | - <if test="condition.companyIdList != null and condition.companyIdList.size() > 0 "> | ||
85 | - AND companyId in | ||
86 | - <foreach collection="condition.companyIdList" item="companyIdItem" open="(" separator="," close=")"> | ||
87 | - #{companyIdItem} | ||
88 | - </foreach> | 247 | + <if test="condition.lastUpdated != null"> |
248 | + AND lastUpdated = #{condition.lastUpdated} | ||
89 | </if> | 249 | </if> |
90 | - <if test="condition.companyId != null"> | ||
91 | - AND companyId = #{condition.companyId} | 250 | + <if test="condition.lastUpdatedBy != null"> |
251 | + AND lastUpdatedBy = #{condition.lastUpdatedBy} | ||
92 | </if> | 252 | </if> |
93 | - <if test="condition.companyCodeList != null and condition.companyCodeList.size() > 0 "> | ||
94 | - AND companyCode in | ||
95 | - <foreach collection="condition.companyCodeList" item="companyCodeItem" open="(" separator="," close=")"> | ||
96 | - #{companyCodeItem} | ||
97 | - </foreach> | 253 | + <if test="condition.enable != null"> |
254 | + AND enable = #{condition.enable} | ||
98 | </if> | 255 | </if> |
99 | - <if test="condition.companyCode != null"> | ||
100 | - AND companyCode = #{condition.companyCode} | 256 | + <if test="condition.deleted != null"> |
257 | + AND deleted = #{condition.deleted} | ||
258 | + </if> | ||
259 | + <if test="condition.userDef1 != null"> | ||
260 | + AND userDef1 = #{condition.userDef1} | ||
261 | + </if> | ||
262 | + <if test="condition.userDef2 != null"> | ||
263 | + AND userDef2 = #{condition.userDef2} | ||
264 | + </if> | ||
265 | + <if test="condition.userDef3 != null"> | ||
266 | + AND userDef3 = #{condition.userDef3} | ||
101 | </if> | 267 | </if> |
102 | </where> | 268 | </where> |
103 | </select> | 269 | </select> |
104 | 270 | ||
105 | <select id="selectEntityById" resultType="com.huaheng.pc.general.company.domain.Company"> | 271 | <select id="selectEntityById" resultType="com.huaheng.pc.general.company.domain.Company"> |
106 | - SELECT id, warehouseId, warehouseCode, companyId, companyCode FROM warehouse_company WHERE id = #{id} | 272 | + SELECT id, code, parentId, type, name, address1, address2, city, province, country, postalCode, attentionTo, phoneNum, mobile, faxNum, email, created, createdBy, lastUpdated, lastUpdatedBy, enable, deleted, userDef1, userDef2, userDef3 FROM company WHERE id = #{id} |
107 | </select> | 273 | </select> |
108 | 274 | ||
109 | <select id="selectFirstEntity" resultType="com.huaheng.pc.general.company.domain.Company"> | 275 | <select id="selectFirstEntity" resultType="com.huaheng.pc.general.company.domain.Company"> |
110 | - SELECT id, warehouseId, warehouseCode, companyId, companyCode | ||
111 | - FROM warehouse_company | 276 | + SELECT id, code, parentId, type, name, address1, address2, city, province, country, postalCode, attentionTo, phoneNum, mobile, faxNum, email, created, createdBy, lastUpdated, lastUpdatedBy, enable, deleted, userDef1, userDef2, userDef3 |
277 | + FROM company | ||
112 | <where> | 278 | <where> |
113 | <if test="id != null"> | 279 | <if test="id != null"> |
114 | AND id = #{id} | 280 | AND id = #{id} |
115 | </if> | 281 | </if> |
116 | - <if test="warehouseId != null"> | ||
117 | - AND warehouseId = #{warehouseId} | 282 | + <if test="code != null"> |
283 | + AND code = #{code} | ||
284 | + </if> | ||
285 | + <if test="parentId != null"> | ||
286 | + AND parentId = #{parentId} | ||
287 | + </if> | ||
288 | + <if test="type != null"> | ||
289 | + AND type = #{type} | ||
290 | + </if> | ||
291 | + <if test="name != null"> | ||
292 | + AND name = #{name} | ||
293 | + </if> | ||
294 | + <if test="address1 != null"> | ||
295 | + AND address1 = #{address1} | ||
296 | + </if> | ||
297 | + <if test="address2 != null"> | ||
298 | + AND address2 = #{address2} | ||
299 | + </if> | ||
300 | + <if test="city != null"> | ||
301 | + AND city = #{city} | ||
302 | + </if> | ||
303 | + <if test="province != null"> | ||
304 | + AND province = #{province} | ||
305 | + </if> | ||
306 | + <if test="country != null"> | ||
307 | + AND country = #{country} | ||
308 | + </if> | ||
309 | + <if test="postalCode != null"> | ||
310 | + AND postalCode = #{postalCode} | ||
311 | + </if> | ||
312 | + <if test="attentionTo != null"> | ||
313 | + AND attentionTo = #{attentionTo} | ||
314 | + </if> | ||
315 | + <if test="phoneNum != null"> | ||
316 | + AND phoneNum = #{phoneNum} | ||
118 | </if> | 317 | </if> |
119 | - <if test="warehouseCode != null"> | ||
120 | - AND warehouseCode = #{warehouseCode} | 318 | + <if test="mobile != null"> |
319 | + AND mobile = #{mobile} | ||
121 | </if> | 320 | </if> |
122 | - <if test="companyIdList != null and companyIdList.size() > 0 "> | ||
123 | - AND companyId in | ||
124 | - <foreach collection="companyIdList" item="companyIdItem" open="(" separator="," close=")"> | ||
125 | - #{companyIdItem} | ||
126 | - </foreach> | 321 | + <if test="faxNum != null"> |
322 | + AND faxNum = #{faxNum} | ||
127 | </if> | 323 | </if> |
128 | - <if test="companyId != null"> | ||
129 | - AND companyId = #{companyId} | 324 | + <if test="email != null"> |
325 | + AND email = #{email} | ||
130 | </if> | 326 | </if> |
131 | - <if test="companyCodeList != null and companyCodeList.size() > 0 "> | ||
132 | - AND companyCode in | ||
133 | - <foreach collection="companyCodeList" item="companyCodeItem" open="(" separator="," close=")"> | ||
134 | - #{companyCodeItem} | ||
135 | - </foreach> | 327 | + <if test="created != null"> |
328 | + AND created = #{created} | ||
136 | </if> | 329 | </if> |
137 | - <if test="companyCode != null"> | ||
138 | - AND companyCode = #{companyCode} | 330 | + <if test="createdBy != null"> |
331 | + AND createdBy = #{createdBy} | ||
332 | + </if> | ||
333 | + <if test="lastUpdated != null"> | ||
334 | + AND lastUpdated = #{lastUpdated} | ||
335 | + </if> | ||
336 | + <if test="lastUpdatedBy != null"> | ||
337 | + AND lastUpdatedBy = #{lastUpdatedBy} | ||
338 | + </if> | ||
339 | + <if test="enable != null"> | ||
340 | + AND enable = #{enable} | ||
341 | + </if> | ||
342 | + <if test="deleted != null"> | ||
343 | + AND deleted = #{deleted} | ||
344 | + </if> | ||
345 | + <if test="userDef1 != null"> | ||
346 | + AND userDef1 = #{userDef1} | ||
347 | + </if> | ||
348 | + <if test="userDef2 != null"> | ||
349 | + AND userDef2 = #{userDef2} | ||
350 | + </if> | ||
351 | + <if test="userDef3 != null"> | ||
352 | + AND userDef3 = #{userDef3} | ||
139 | </if> | 353 | </if> |
140 | </where> | 354 | </where> |
141 | LIMIT 1 | 355 | LIMIT 1 |
142 | </select> | 356 | </select> |
143 | 357 | ||
144 | <select id="selectFirstMap" resultType="java.util.HashMap"> | 358 | <select id="selectFirstMap" resultType="java.util.HashMap"> |
145 | - SELECT ${columns} FROM warehouse_company | 359 | + SELECT ${columns} FROM company |
146 | <where> | 360 | <where> |
147 | <if test="condition.id != null"> | 361 | <if test="condition.id != null"> |
148 | AND id = #{condition.id} | 362 | AND id = #{condition.id} |
149 | </if> | 363 | </if> |
150 | - <if test="condition.warehouseId != null"> | ||
151 | - AND warehouseId = #{condition.warehouseId} | 364 | + <if test="condition.code != null"> |
365 | + AND code = #{condition.code} | ||
366 | + </if> | ||
367 | + <if test="condition.parentId != null"> | ||
368 | + AND parentId = #{condition.parentId} | ||
369 | + </if> | ||
370 | + <if test="condition.type != null"> | ||
371 | + AND type = #{condition.type} | ||
372 | + </if> | ||
373 | + <if test="condition.name != null"> | ||
374 | + AND name = #{condition.name} | ||
375 | + </if> | ||
376 | + <if test="condition.address1 != null"> | ||
377 | + AND address1 = #{condition.address1} | ||
378 | + </if> | ||
379 | + <if test="condition.address2 != null"> | ||
380 | + AND address2 = #{condition.address2} | ||
381 | + </if> | ||
382 | + <if test="condition.city != null"> | ||
383 | + AND city = #{condition.city} | ||
152 | </if> | 384 | </if> |
153 | - <if test="condition.warehouseCode != null"> | ||
154 | - AND warehouseCode = #{condition.warehouseCode} | 385 | + <if test="condition.province != null"> |
386 | + AND province = #{condition.province} | ||
155 | </if> | 387 | </if> |
156 | - <if test="condition.companyIdList != null and condition.companyIdList.size() > 0 "> | ||
157 | - AND companyId in | ||
158 | - <foreach collection="condition.companyIdList" item="companyIdItem" open="(" separator="," close=")"> | ||
159 | - #{companyIdItem} | ||
160 | - </foreach> | 388 | + <if test="condition.country != null"> |
389 | + AND country = #{condition.country} | ||
161 | </if> | 390 | </if> |
162 | - <if test="condition.companyId != null"> | ||
163 | - AND companyId = #{condition.companyId} | 391 | + <if test="condition.postalCode != null"> |
392 | + AND postalCode = #{condition.postalCode} | ||
164 | </if> | 393 | </if> |
165 | - <if test="condition.companyCodeList != null and condition.companyCodeList.size() > 0 "> | ||
166 | - AND companyCode in | ||
167 | - <foreach collection="condition.companyCodeList" item="companyCodeItem" open="(" separator="," close=")"> | ||
168 | - #{companyCodeItem} | ||
169 | - </foreach> | 394 | + <if test="condition.attentionTo != null"> |
395 | + AND attentionTo = #{condition.attentionTo} | ||
170 | </if> | 396 | </if> |
171 | - <if test="condition.companyCode != null"> | ||
172 | - AND companyCode = #{condition.companyCode} | 397 | + <if test="condition.phoneNum != null"> |
398 | + AND phoneNum = #{condition.phoneNum} | ||
399 | + </if> | ||
400 | + <if test="condition.mobile != null"> | ||
401 | + AND mobile = #{condition.mobile} | ||
402 | + </if> | ||
403 | + <if test="condition.faxNum != null"> | ||
404 | + AND faxNum = #{condition.faxNum} | ||
405 | + </if> | ||
406 | + <if test="condition.email != null"> | ||
407 | + AND email = #{condition.email} | ||
408 | + </if> | ||
409 | + <if test="condition.created != null"> | ||
410 | + AND created = #{condition.created} | ||
411 | + </if> | ||
412 | + <if test="condition.createdBy != null"> | ||
413 | + AND createdBy = #{condition.createdBy} | ||
414 | + </if> | ||
415 | + <if test="condition.lastUpdated != null"> | ||
416 | + AND lastUpdated = #{condition.lastUpdated} | ||
417 | + </if> | ||
418 | + <if test="condition.lastUpdatedBy != null"> | ||
419 | + AND lastUpdatedBy = #{condition.lastUpdatedBy} | ||
420 | + </if> | ||
421 | + <if test="condition.enable != null"> | ||
422 | + AND enable = #{condition.enable} | ||
423 | + </if> | ||
424 | + <if test="condition.deleted != null"> | ||
425 | + AND deleted = #{condition.deleted} | ||
426 | + </if> | ||
427 | + <if test="condition.userDef1 != null"> | ||
428 | + AND userDef1 = #{condition.userDef1} | ||
429 | + </if> | ||
430 | + <if test="condition.userDef2 != null"> | ||
431 | + AND userDef2 = #{condition.userDef2} | ||
432 | + </if> | ||
433 | + <if test="condition.userDef3 != null"> | ||
434 | + AND userDef3 = #{condition.userDef3} | ||
173 | </if> | 435 | </if> |
174 | </where> | 436 | </where> |
175 | LIMIT 1 | 437 | LIMIT 1 |
176 | </select> | 438 | </select> |
177 | 439 | ||
178 | <insert id="insert" parameterType="com.huaheng.pc.general.company.domain.Company" keyProperty="id" useGeneratedKeys="true" > | 440 | <insert id="insert" parameterType="com.huaheng.pc.general.company.domain.Company" keyProperty="id" useGeneratedKeys="true" > |
179 | - INSERT INTO warehouse_company | 441 | + INSERT INTO company |
180 | <trim prefix="(" suffix=")" suffixOverrides=","> | 442 | <trim prefix="(" suffix=")" suffixOverrides=","> |
181 | - <if test="warehouseId != null"> | ||
182 | - warehouseId, | 443 | + <if test="code != null"> |
444 | + code, | ||
445 | + </if> | ||
446 | + <if test="parentId != null"> | ||
447 | + parentId, | ||
448 | + </if> | ||
449 | + <if test="type != null"> | ||
450 | + type, | ||
451 | + </if> | ||
452 | + <if test="name != null"> | ||
453 | + name, | ||
454 | + </if> | ||
455 | + <if test="address1 != null"> | ||
456 | + address1, | ||
457 | + </if> | ||
458 | + <if test="address2 != null"> | ||
459 | + address2, | ||
460 | + </if> | ||
461 | + <if test="city != null"> | ||
462 | + city, | ||
463 | + </if> | ||
464 | + <if test="province != null"> | ||
465 | + province, | ||
466 | + </if> | ||
467 | + <if test="country != null"> | ||
468 | + country, | ||
469 | + </if> | ||
470 | + <if test="postalCode != null"> | ||
471 | + postalCode, | ||
472 | + </if> | ||
473 | + <if test="attentionTo != null"> | ||
474 | + attentionTo, | ||
475 | + </if> | ||
476 | + <if test="phoneNum != null"> | ||
477 | + phoneNum, | ||
478 | + </if> | ||
479 | + <if test="mobile != null"> | ||
480 | + mobile, | ||
481 | + </if> | ||
482 | + <if test="faxNum != null"> | ||
483 | + faxNum, | ||
484 | + </if> | ||
485 | + <if test="email != null"> | ||
486 | + email, | ||
183 | </if> | 487 | </if> |
184 | - <if test="warehouseCode != null"> | ||
185 | - warehouseCode, | 488 | + <if test="created != null"> |
489 | + created, | ||
186 | </if> | 490 | </if> |
187 | - <if test="companyId != null"> | ||
188 | - companyId, | 491 | + <if test="createdBy != null"> |
492 | + createdBy, | ||
189 | </if> | 493 | </if> |
190 | - <if test="companyCode != null"> | ||
191 | - companyCode, | 494 | + <if test="lastUpdated != null"> |
495 | + lastUpdated, | ||
496 | + </if> | ||
497 | + <if test="lastUpdatedBy != null"> | ||
498 | + lastUpdatedBy, | ||
499 | + </if> | ||
500 | + <if test="enable != null"> | ||
501 | + enable, | ||
502 | + </if> | ||
503 | + <if test="deleted != null"> | ||
504 | + deleted, | ||
505 | + </if> | ||
506 | + <if test="userDef1 != null"> | ||
507 | + userDef1, | ||
508 | + </if> | ||
509 | + <if test="userDef2 != null"> | ||
510 | + userDef2, | ||
511 | + </if> | ||
512 | + <if test="userDef3 != null"> | ||
513 | + userDef3, | ||
192 | </if> | 514 | </if> |
193 | </trim> | 515 | </trim> |
194 | <trim prefix=" values (" suffix=")" suffixOverrides=","> | 516 | <trim prefix=" values (" suffix=")" suffixOverrides=","> |
195 | - <if test="warehouseId != null"> | ||
196 | - #{warehouseId, jdbcType=INTEGER}, | 517 | + <if test="code != null"> |
518 | + #{code, jdbcType=VARCHAR}, | ||
519 | + </if> | ||
520 | + <if test="parentId != null"> | ||
521 | + #{parentId, jdbcType=INTEGER}, | ||
522 | + </if> | ||
523 | + <if test="type != null"> | ||
524 | + #{type, jdbcType=VARCHAR}, | ||
525 | + </if> | ||
526 | + <if test="name != null"> | ||
527 | + #{name, jdbcType=VARCHAR}, | ||
528 | + </if> | ||
529 | + <if test="address1 != null"> | ||
530 | + #{address1, jdbcType=VARCHAR}, | ||
531 | + </if> | ||
532 | + <if test="address2 != null"> | ||
533 | + #{address2, jdbcType=VARCHAR}, | ||
534 | + </if> | ||
535 | + <if test="city != null"> | ||
536 | + #{city, jdbcType=VARCHAR}, | ||
537 | + </if> | ||
538 | + <if test="province != null"> | ||
539 | + #{province, jdbcType=VARCHAR}, | ||
540 | + </if> | ||
541 | + <if test="country != null"> | ||
542 | + #{country, jdbcType=VARCHAR}, | ||
197 | </if> | 543 | </if> |
198 | - <if test="warehouseCode != null"> | ||
199 | - #{warehouseCode, jdbcType=VARCHAR}, | 544 | + <if test="postalCode != null"> |
545 | + #{postalCode, jdbcType=VARCHAR}, | ||
200 | </if> | 546 | </if> |
201 | - <if test="companyId != null"> | ||
202 | - #{companyId, jdbcType=INTEGER}, | 547 | + <if test="attentionTo != null"> |
548 | + #{attentionTo, jdbcType=VARCHAR}, | ||
203 | </if> | 549 | </if> |
204 | - <if test="companyCode != null"> | ||
205 | - #{companyCode, jdbcType=VARCHAR}, | 550 | + <if test="phoneNum != null"> |
551 | + #{phoneNum, jdbcType=VARCHAR}, | ||
552 | + </if> | ||
553 | + <if test="mobile != null"> | ||
554 | + #{mobile, jdbcType=VARCHAR}, | ||
555 | + </if> | ||
556 | + <if test="faxNum != null"> | ||
557 | + #{faxNum, jdbcType=VARCHAR}, | ||
558 | + </if> | ||
559 | + <if test="email != null"> | ||
560 | + #{email, jdbcType=VARCHAR}, | ||
561 | + </if> | ||
562 | + <if test="created != null"> | ||
563 | + #{created, jdbcType=TIMESTAMP}, | ||
564 | + </if> | ||
565 | + <if test="createdBy != null"> | ||
566 | + #{createdBy, jdbcType=VARCHAR}, | ||
567 | + </if> | ||
568 | + <if test="lastUpdated != null"> | ||
569 | + #{lastUpdated, jdbcType=TIMESTAMP}, | ||
570 | + </if> | ||
571 | + <if test="lastUpdatedBy != null"> | ||
572 | + #{lastUpdatedBy, jdbcType=VARCHAR}, | ||
573 | + </if> | ||
574 | + <if test="enable != null"> | ||
575 | + #{enable, jdbcType=BIT}, | ||
576 | + </if> | ||
577 | + <if test="deleted != null"> | ||
578 | + #{deleted, jdbcType=BIT}, | ||
579 | + </if> | ||
580 | + <if test="userDef1 != null"> | ||
581 | + #{userDef1, jdbcType=VARCHAR}, | ||
582 | + </if> | ||
583 | + <if test="userDef2 != null"> | ||
584 | + #{userDef2, jdbcType=VARCHAR}, | ||
585 | + </if> | ||
586 | + <if test="userDef3 != null"> | ||
587 | + #{userDef3, jdbcType=VARCHAR}, | ||
206 | </if> | 588 | </if> |
207 | </trim> | 589 | </trim> |
208 | </insert> | 590 | </insert> |
209 | 591 | ||
210 | <update id="updateByModel"> | 592 | <update id="updateByModel"> |
211 | - UPDATE warehouse_company | 593 | + UPDATE company |
212 | <set> | 594 | <set> |
213 | - <if test="warehouseId != null"> | ||
214 | - warehouseId = #{warehouseId, jdbcType=INTEGER}, | 595 | + <if test="code != null"> |
596 | + code = #{code, jdbcType=VARCHAR}, | ||
597 | + </if> | ||
598 | + <if test="parentId != null"> | ||
599 | + parentId = #{parentId, jdbcType=INTEGER}, | ||
215 | </if> | 600 | </if> |
216 | - <if test="warehouseCode != null"> | ||
217 | - warehouseCode = #{warehouseCode, jdbcType=VARCHAR}, | 601 | + <if test="type != null"> |
602 | + type = #{type, jdbcType=VARCHAR}, | ||
218 | </if> | 603 | </if> |
219 | - <if test="companyId != null"> | ||
220 | - companyId = #{companyId, jdbcType=INTEGER}, | 604 | + <if test="name != null"> |
605 | + name = #{name, jdbcType=VARCHAR}, | ||
221 | </if> | 606 | </if> |
222 | - <if test="companyCode != null"> | ||
223 | - companyCode = #{companyCode, jdbcType=VARCHAR}, | 607 | + <if test="address1 != null"> |
608 | + address1 = #{address1, jdbcType=VARCHAR}, | ||
609 | + </if> | ||
610 | + <if test="address2 != null"> | ||
611 | + address2 = #{address2, jdbcType=VARCHAR}, | ||
612 | + </if> | ||
613 | + <if test="city != null"> | ||
614 | + city = #{city, jdbcType=VARCHAR}, | ||
615 | + </if> | ||
616 | + <if test="province != null"> | ||
617 | + province = #{province, jdbcType=VARCHAR}, | ||
618 | + </if> | ||
619 | + <if test="country != null"> | ||
620 | + country = #{country, jdbcType=VARCHAR}, | ||
621 | + </if> | ||
622 | + <if test="postalCode != null"> | ||
623 | + postalCode = #{postalCode, jdbcType=VARCHAR}, | ||
624 | + </if> | ||
625 | + <if test="attentionTo != null"> | ||
626 | + attentionTo = #{attentionTo, jdbcType=VARCHAR}, | ||
627 | + </if> | ||
628 | + <if test="phoneNum != null"> | ||
629 | + phoneNum = #{phoneNum, jdbcType=VARCHAR}, | ||
630 | + </if> | ||
631 | + <if test="mobile != null"> | ||
632 | + mobile = #{mobile, jdbcType=VARCHAR}, | ||
633 | + </if> | ||
634 | + <if test="faxNum != null"> | ||
635 | + faxNum = #{faxNum, jdbcType=VARCHAR}, | ||
636 | + </if> | ||
637 | + <if test="email != null"> | ||
638 | + email = #{email, jdbcType=VARCHAR}, | ||
639 | + </if> | ||
640 | + <if test="created != null"> | ||
641 | + created = #{created, jdbcType=TIMESTAMP}, | ||
642 | + </if> | ||
643 | + <if test="createdBy != null"> | ||
644 | + createdBy = #{createdBy, jdbcType=VARCHAR}, | ||
645 | + </if> | ||
646 | + <if test="lastUpdated != null"> | ||
647 | + lastUpdated = #{lastUpdated, jdbcType=TIMESTAMP}, | ||
648 | + </if> | ||
649 | + <if test="lastUpdatedBy != null"> | ||
650 | + lastUpdatedBy = #{lastUpdatedBy, jdbcType=VARCHAR}, | ||
651 | + </if> | ||
652 | + <if test="enable != null"> | ||
653 | + enable = #{enable, jdbcType=BIT}, | ||
654 | + </if> | ||
655 | + <if test="deleted != null"> | ||
656 | + deleted = #{deleted, jdbcType=BIT}, | ||
657 | + </if> | ||
658 | + <if test="userDef1 != null"> | ||
659 | + userDef1 = #{userDef1, jdbcType=VARCHAR}, | ||
660 | + </if> | ||
661 | + <if test="userDef2 != null"> | ||
662 | + userDef2 = #{userDef2, jdbcType=VARCHAR}, | ||
663 | + </if> | ||
664 | + <if test="userDef3 != null"> | ||
665 | + userDef3 = #{userDef3, jdbcType=VARCHAR}, | ||
224 | </if> | 666 | </if> |
225 | </set> | 667 | </set> |
226 | WHERE id = #{id,jdbcType=INTEGER} | 668 | WHERE id = #{id,jdbcType=INTEGER} |
227 | </update> | 669 | </update> |
228 | 670 | ||
229 | <update id="updateByCondition"> | 671 | <update id="updateByCondition"> |
230 | - UPDATE warehouse_company | 672 | + UPDATE company |
231 | <set> | 673 | <set> |
232 | - <if test="record.warehouseId != null"> | ||
233 | - warehouseId = #{record.warehouseId, jdbcType=INTEGER}, | 674 | + <if test="record.code != null"> |
675 | + code = #{record.code, jdbcType=VARCHAR}, | ||
676 | + </if> | ||
677 | + <if test="record.parentId != null"> | ||
678 | + parentId = #{record.parentId, jdbcType=INTEGER}, | ||
679 | + </if> | ||
680 | + <if test="record.type != null"> | ||
681 | + type = #{record.type, jdbcType=VARCHAR}, | ||
682 | + </if> | ||
683 | + <if test="record.name != null"> | ||
684 | + name = #{record.name, jdbcType=VARCHAR}, | ||
685 | + </if> | ||
686 | + <if test="record.address1 != null"> | ||
687 | + address1 = #{record.address1, jdbcType=VARCHAR}, | ||
688 | + </if> | ||
689 | + <if test="record.address2 != null"> | ||
690 | + address2 = #{record.address2, jdbcType=VARCHAR}, | ||
691 | + </if> | ||
692 | + <if test="record.city != null"> | ||
693 | + city = #{record.city, jdbcType=VARCHAR}, | ||
694 | + </if> | ||
695 | + <if test="record.province != null"> | ||
696 | + province = #{record.province, jdbcType=VARCHAR}, | ||
234 | </if> | 697 | </if> |
235 | - <if test="record.warehouseCode != null"> | ||
236 | - warehouseCode = #{record.warehouseCode, jdbcType=VARCHAR}, | 698 | + <if test="record.country != null"> |
699 | + country = #{record.country, jdbcType=VARCHAR}, | ||
237 | </if> | 700 | </if> |
238 | - <if test="record.companyId != null"> | ||
239 | - companyId = #{record.companyId, jdbcType=INTEGER}, | 701 | + <if test="record.postalCode != null"> |
702 | + postalCode = #{record.postalCode, jdbcType=VARCHAR}, | ||
240 | </if> | 703 | </if> |
241 | - <if test="record.companyCode != null"> | ||
242 | - companyCode = #{record.companyCode, jdbcType=VARCHAR}, | 704 | + <if test="record.attentionTo != null"> |
705 | + attentionTo = #{record.attentionTo, jdbcType=VARCHAR}, | ||
706 | + </if> | ||
707 | + <if test="record.phoneNum != null"> | ||
708 | + phoneNum = #{record.phoneNum, jdbcType=VARCHAR}, | ||
709 | + </if> | ||
710 | + <if test="record.mobile != null"> | ||
711 | + mobile = #{record.mobile, jdbcType=VARCHAR}, | ||
712 | + </if> | ||
713 | + <if test="record.faxNum != null"> | ||
714 | + faxNum = #{record.faxNum, jdbcType=VARCHAR}, | ||
715 | + </if> | ||
716 | + <if test="record.email != null"> | ||
717 | + email = #{record.email, jdbcType=VARCHAR}, | ||
718 | + </if> | ||
719 | + <if test="record.created != null"> | ||
720 | + created = #{record.created, jdbcType=TIMESTAMP}, | ||
721 | + </if> | ||
722 | + <if test="record.createdBy != null"> | ||
723 | + createdBy = #{record.createdBy, jdbcType=VARCHAR}, | ||
724 | + </if> | ||
725 | + <if test="record.lastUpdated != null"> | ||
726 | + lastUpdated = #{record.lastUpdated, jdbcType=TIMESTAMP}, | ||
727 | + </if> | ||
728 | + <if test="record.lastUpdatedBy != null"> | ||
729 | + lastUpdatedBy = #{record.lastUpdatedBy, jdbcType=VARCHAR}, | ||
730 | + </if> | ||
731 | + <if test="record.enable != null"> | ||
732 | + enable = #{record.enable, jdbcType=BIT}, | ||
733 | + </if> | ||
734 | + <if test="record.deleted != null"> | ||
735 | + deleted = #{record.deleted, jdbcType=BIT}, | ||
736 | + </if> | ||
737 | + <if test="record.userDef1 != null"> | ||
738 | + userDef1 = #{record.userDef1, jdbcType=VARCHAR}, | ||
739 | + </if> | ||
740 | + <if test="record.userDef2 != null"> | ||
741 | + userDef2 = #{record.userDef2, jdbcType=VARCHAR}, | ||
742 | + </if> | ||
743 | + <if test="record.userDef3 != null"> | ||
744 | + userDef3 = #{record.userDef3, jdbcType=VARCHAR}, | ||
243 | </if> | 745 | </if> |
244 | </set> | 746 | </set> |
245 | <where> | 747 | <where> |
246 | <if test="condition.id != null"> | 748 | <if test="condition.id != null"> |
247 | AND id = #{condition.id} | 749 | AND id = #{condition.id} |
248 | </if> | 750 | </if> |
249 | - <if test="condition.warehouseId != null"> | ||
250 | - AND warehouseId = #{condition.warehouseId} | 751 | + <if test="condition.code != null"> |
752 | + AND code = #{condition.code} | ||
753 | + </if> | ||
754 | + <if test="condition.parentId != null"> | ||
755 | + AND parentId = #{condition.parentId} | ||
756 | + </if> | ||
757 | + <if test="condition.type != null"> | ||
758 | + AND type = #{condition.type} | ||
759 | + </if> | ||
760 | + <if test="condition.name != null"> | ||
761 | + AND name = #{condition.name} | ||
762 | + </if> | ||
763 | + <if test="condition.address1 != null"> | ||
764 | + AND address1 = #{condition.address1} | ||
765 | + </if> | ||
766 | + <if test="condition.address2 != null"> | ||
767 | + AND address2 = #{condition.address2} | ||
768 | + </if> | ||
769 | + <if test="condition.city != null"> | ||
770 | + AND city = #{condition.city} | ||
771 | + </if> | ||
772 | + <if test="condition.province != null"> | ||
773 | + AND province = #{condition.province} | ||
774 | + </if> | ||
775 | + <if test="condition.country != null"> | ||
776 | + AND country = #{condition.country} | ||
777 | + </if> | ||
778 | + <if test="condition.postalCode != null"> | ||
779 | + AND postalCode = #{condition.postalCode} | ||
780 | + </if> | ||
781 | + <if test="condition.attentionTo != null"> | ||
782 | + AND attentionTo = #{condition.attentionTo} | ||
783 | + </if> | ||
784 | + <if test="condition.phoneNum != null"> | ||
785 | + AND phoneNum = #{condition.phoneNum} | ||
786 | + </if> | ||
787 | + <if test="condition.mobile != null"> | ||
788 | + AND mobile = #{condition.mobile} | ||
789 | + </if> | ||
790 | + <if test="condition.faxNum != null"> | ||
791 | + AND faxNum = #{condition.faxNum} | ||
792 | + </if> | ||
793 | + <if test="condition.email != null"> | ||
794 | + AND email = #{condition.email} | ||
251 | </if> | 795 | </if> |
252 | - <if test="condition.warehouseCode != null"> | ||
253 | - AND warehouseCode = #{condition.warehouseCode} | 796 | + <if test="condition.created != null"> |
797 | + AND created = #{condition.created} | ||
254 | </if> | 798 | </if> |
255 | - <if test="condition.companyId != null"> | ||
256 | - AND companyId = #{condition.companyId} | 799 | + <if test="condition.createdBy != null"> |
800 | + AND createdBy = #{condition.createdBy} | ||
257 | </if> | 801 | </if> |
258 | - <if test="condition.companyCode != null"> | ||
259 | - AND companyCode = #{condition.companyCode} | 802 | + <if test="condition.lastUpdated != null"> |
803 | + AND lastUpdated = #{condition.lastUpdated} | ||
804 | + </if> | ||
805 | + <if test="condition.lastUpdatedBy != null"> | ||
806 | + AND lastUpdatedBy = #{condition.lastUpdatedBy} | ||
807 | + </if> | ||
808 | + <if test="condition.enable != null"> | ||
809 | + AND enable = #{condition.enable} | ||
810 | + </if> | ||
811 | + <if test="condition.deleted != null"> | ||
812 | + AND deleted = #{condition.deleted} | ||
813 | + </if> | ||
814 | + <if test="condition.userDef1 != null"> | ||
815 | + AND userDef1 = #{condition.userDef1} | ||
816 | + </if> | ||
817 | + <if test="condition.userDef2 != null"> | ||
818 | + AND userDef2 = #{condition.userDef2} | ||
819 | + </if> | ||
820 | + <if test="condition.userDef3 != null"> | ||
821 | + AND userDef3 = #{condition.userDef3} | ||
260 | </if> | 822 | </if> |
261 | </where> | 823 | </where> |
262 | </update> | 824 | </update> |
263 | 825 | ||
264 | <delete id="deleteById"> | 826 | <delete id="deleteById"> |
265 | - DELETE FROM warehouse_company WHERE id = #{id, jdbcType=INTEGER} | 827 | + DELETE FROM company WHERE id = #{id, jdbcType=INTEGER} |
266 | </delete> | 828 | </delete> |
267 | 829 | ||
268 | <delete id="deleteByCondition"> | 830 | <delete id="deleteByCondition"> |
269 | - DELETE FROM warehouse_company | 831 | + DELETE FROM company |
270 | <where> | 832 | <where> |
271 | <if test="id != null"> | 833 | <if test="id != null"> |
272 | AND id = #{id} | 834 | AND id = #{id} |
273 | </if> | 835 | </if> |
274 | - <if test="warehouseId != null"> | ||
275 | - AND warehouseId = #{warehouseId} | 836 | + <if test="code != null"> |
837 | + AND code = #{code} | ||
838 | + </if> | ||
839 | + <if test="parentId != null"> | ||
840 | + AND parentId = #{parentId} | ||
841 | + </if> | ||
842 | + <if test="type != null"> | ||
843 | + AND type = #{type} | ||
844 | + </if> | ||
845 | + <if test="name != null"> | ||
846 | + AND name = #{name} | ||
847 | + </if> | ||
848 | + <if test="address1 != null"> | ||
849 | + AND address1 = #{address1} | ||
850 | + </if> | ||
851 | + <if test="address2 != null"> | ||
852 | + AND address2 = #{address2} | ||
853 | + </if> | ||
854 | + <if test="city != null"> | ||
855 | + AND city = #{city} | ||
856 | + </if> | ||
857 | + <if test="province != null"> | ||
858 | + AND province = #{province} | ||
859 | + </if> | ||
860 | + <if test="country != null"> | ||
861 | + AND country = #{country} | ||
862 | + </if> | ||
863 | + <if test="postalCode != null"> | ||
864 | + AND postalCode = #{postalCode} | ||
865 | + </if> | ||
866 | + <if test="attentionTo != null"> | ||
867 | + AND attentionTo = #{attentionTo} | ||
868 | + </if> | ||
869 | + <if test="phoneNum != null"> | ||
870 | + AND phoneNum = #{phoneNum} | ||
871 | + </if> | ||
872 | + <if test="mobile != null"> | ||
873 | + AND mobile = #{mobile} | ||
874 | + </if> | ||
875 | + <if test="faxNum != null"> | ||
876 | + AND faxNum = #{faxNum} | ||
877 | + </if> | ||
878 | + <if test="email != null"> | ||
879 | + AND email = #{email} | ||
880 | + </if> | ||
881 | + <if test="created != null"> | ||
882 | + AND created = #{created} | ||
883 | + </if> | ||
884 | + <if test="createdBy != null"> | ||
885 | + AND createdBy = #{createdBy} | ||
886 | + </if> | ||
887 | + <if test="lastUpdated != null"> | ||
888 | + AND lastUpdated = #{lastUpdated} | ||
889 | + </if> | ||
890 | + <if test="lastUpdatedBy != null"> | ||
891 | + AND lastUpdatedBy = #{lastUpdatedBy} | ||
892 | + </if> | ||
893 | + <if test="enable != null"> | ||
894 | + AND enable = #{enable} | ||
895 | + </if> | ||
896 | + <if test="deleted != null"> | ||
897 | + AND deleted = #{deleted} | ||
276 | </if> | 898 | </if> |
277 | - <if test="warehouseCode != null"> | ||
278 | - AND warehouseCode = #{warehouseCode} | 899 | + <if test="userDef1 != null"> |
900 | + AND userDef1 = #{userDef1} | ||
279 | </if> | 901 | </if> |
280 | - <if test="companyId != null"> | ||
281 | - AND companyId = #{companyId} | 902 | + <if test="userDef2 != null"> |
903 | + AND userDef2 = #{userDef2} | ||
282 | </if> | 904 | </if> |
283 | - <if test="companyCode != null"> | ||
284 | - AND companyCode = #{companyCode} | 905 | + <if test="userDef3 != null"> |
906 | + AND userDef3 = #{userDef3} | ||
285 | </if> | 907 | </if> |
286 | </where> | 908 | </where> |
287 | </delete> | 909 | </delete> |
src/main/resources/mybatis/shipment/ShipmentDetailMapper.xml
@@ -139,7 +139,7 @@ | @@ -139,7 +139,7 @@ | ||
139 | </select> | 139 | </select> |
140 | 140 | ||
141 | <insert id="insertModel"> | 141 | <insert id="insertModel"> |
142 | - INSERT INTO icsShipment_detail | 142 | + INSERT INTO icsshipment_detail |
143 | <trim prefix="(" suffix=")" suffixOverrides=","> | 143 | <trim prefix="(" suffix=")" suffixOverrides=","> |
144 | <if test="cCode != null"> | 144 | <if test="cCode != null"> |
145 | cCode, | 145 | cCode, |
@@ -174,6 +174,9 @@ | @@ -174,6 +174,9 @@ | ||
174 | <if test="MoCode != null"> | 174 | <if test="MoCode != null"> |
175 | MoCode, | 175 | MoCode, |
176 | </if> | 176 | </if> |
177 | + <if test="MoDId != null"> | ||
178 | + MoDId, | ||
179 | + </if> | ||
177 | <if test="SortSeq != null"> | 180 | <if test="SortSeq != null"> |
178 | SortSeq, | 181 | SortSeq, |
179 | </if> | 182 | </if> |
@@ -231,9 +234,15 @@ | @@ -231,9 +234,15 @@ | ||
231 | <if test="iTrIds != null"> | 234 | <if test="iTrIds != null"> |
232 | iTrIds, | 235 | iTrIds, |
233 | </if> | 236 | </if> |
234 | - <if test="iMaIDs != null"> | 237 | + <if test="iDLsID != null"> |
235 | iDLsID, | 238 | iDLsID, |
236 | </if> | 239 | </if> |
240 | + <if test="iArrsId != null"> | ||
241 | + iArrsId, | ||
242 | + </if> | ||
243 | + <if test="iPOsID != null"> | ||
244 | + iPOsID, | ||
245 | + </if> | ||
237 | </trim> | 246 | </trim> |
238 | <trim prefix=" values (" suffix=")" suffixOverrides=","> | 247 | <trim prefix=" values (" suffix=")" suffixOverrides=","> |
239 | <if test="cCode != null"> | 248 | <if test="cCode != null"> |
@@ -266,6 +275,9 @@ | @@ -266,6 +275,9 @@ | ||
266 | <if test="MoId != null"> | 275 | <if test="MoId != null"> |
267 | #{MoId, jdbcType=INTEGER}, | 276 | #{MoId, jdbcType=INTEGER}, |
268 | </if> | 277 | </if> |
278 | + <if test="MoDId != null"> | ||
279 | + #{MoDId, jdbcType=INTEGER}, | ||
280 | + </if> | ||
269 | <if test="MoCode != null"> | 281 | <if test="MoCode != null"> |
270 | #{MoCode, jdbcType=VARCHAR}, | 282 | #{MoCode, jdbcType=VARCHAR}, |
271 | </if> | 283 | </if> |
@@ -326,16 +338,22 @@ | @@ -326,16 +338,22 @@ | ||
326 | <if test="iTrIds != null"> | 338 | <if test="iTrIds != null"> |
327 | #{iTrIds, jdbcType=INTEGER}, | 339 | #{iTrIds, jdbcType=INTEGER}, |
328 | </if> | 340 | </if> |
329 | - <if test="iMaIDs != null"> | ||
330 | - #{iMaIDs, jdbcType=INTEGER}, | 341 | + <if test="iDLsID != null"> |
342 | + #{iDLsID, jdbcType=INTEGER}, | ||
343 | + </if> | ||
344 | + <if test="iArrsId != null"> | ||
345 | + #{iArrsId, jdbcType=INTEGER}, | ||
346 | + </if> | ||
347 | + <if test="iPOsID != null"> | ||
348 | + #{iPOsID, jdbcType=INTEGER}, | ||
331 | </if> | 349 | </if> |
332 | </trim> | 350 | </trim> |
333 | </insert> | 351 | </insert> |
334 | 352 | ||
335 | <select id="selectModel" | 353 | <select id="selectModel" |
336 | resultType="com.huaheng.api.U8.domain.ICSShipmentDetail"> | 354 | resultType="com.huaheng.api.U8.domain.ICSShipmentDetail"> |
337 | - SELECT cCode, ID, AutoID,irowno,cItemName, DLID, cSOCode, cSOID, cSOAutoID , MoId, MoDId,MoCode, SortSeq, cWHCode,cWHName,cInvCode,cInvName,cInvStd,iQuantity,cQuantity,cComUnitName,StartDate,DueDate,CompanyCode,cModifyDate,cMemo,iMaIDs, POCode, POID, PODID, iTrIds, iDLsID | ||
338 | - from icsShipment_detail | 355 | + SELECT cCode, ID, AutoID,irowno,cItemName, DLID, cSOCode, cSOID, cSOAutoID , MoId, MoDId,MoCode, SortSeq, cWHCode,cWHName,cInvCode,cInvName,cInvStd,iQuantity,cQuantity,cComUnitName,StartDate,DueDate,CompanyCode,cModifyDate,cMemo,iMaIDs, POCode, POID, PODID, iTrIds, iDLsID,iArrsId,iPOsID |
356 | + from icsshipment_detail | ||
339 | <where> | 357 | <where> |
340 | <if test="cCode != null"> | 358 | <if test="cCode != null"> |
341 | AND cCode = #{cCode} | 359 | AND cCode = #{cCode} |
@@ -433,13 +451,19 @@ | @@ -433,13 +451,19 @@ | ||
433 | <if test="iDLsID != null"> | 451 | <if test="iDLsID != null"> |
434 | AND iDLsID = #{iDLsID} | 452 | AND iDLsID = #{iDLsID} |
435 | </if> | 453 | </if> |
454 | + <if test="iArrsId != null"> | ||
455 | + AND iArrsId = #{iArrsId} | ||
456 | + </if> | ||
457 | + <if test="iPOsID != null"> | ||
458 | + AND iPOsID = #{iPOsID} | ||
459 | + </if> | ||
436 | </where> | 460 | </where> |
437 | - | 461 | + LIMIT 1 |
438 | </select> | 462 | </select> |
439 | 463 | ||
440 | <select id="selectList" resultType="com.huaheng.api.U8.domain.ICSShipmentDetail"> | 464 | <select id="selectList" resultType="com.huaheng.api.U8.domain.ICSShipmentDetail"> |
441 | - SELECT cCode, ID, AutoID,irowno,cItemName, DLID, cSOCode, cSOID, cSOAutoID , MoId, MoDId,MoCode, SortSeq, cWHCode,cWHName,cInvCode,cInvName,cInvStd,iQuantity,cQuantity,cComUnitName,StartDate,DueDate,CompanyCode,cModifyDate,cMemo,iMaIDs, POCode, POID, PODID, iTrIds, iDLsID | ||
442 | - from icsShipment_detail | 465 | + SELECT cCode, ID, AutoID,irowno,cItemName, DLID, cSOCode, cSOID, cSOAutoID , MoId, MoDId,MoCode, SortSeq, cWHCode,cWHName,cInvCode,cInvName,cInvStd,iQuantity,cQuantity,cComUnitName,StartDate,DueDate,CompanyCode,cModifyDate,cMemo,iMaIDs, POCode, POID, PODID, iTrIds, iDLsID,iPOsID,iArrsId |
466 | + from icsshipment_detail | ||
443 | <where> | 467 | <where> |
444 | <if test="cCode != null"> | 468 | <if test="cCode != null"> |
445 | AND cCode = #{cCode} | 469 | AND cCode = #{cCode} |
@@ -537,6 +561,12 @@ | @@ -537,6 +561,12 @@ | ||
537 | <if test="iDLsID != null"> | 561 | <if test="iDLsID != null"> |
538 | AND iDLsID = #{iDLsID} | 562 | AND iDLsID = #{iDLsID} |
539 | </if> | 563 | </if> |
564 | + <if test="iArrsId != null"> | ||
565 | + AND iArrsId = #{iArrsId} | ||
566 | + </if> | ||
567 | + <if test="iPOsID != null"> | ||
568 | + AND iPOsID = #{iPOsID} | ||
569 | + </if> | ||
540 | </where> | 570 | </where> |
541 | </select> | 571 | </select> |
542 | 572 |
src/main/resources/mybatis/shipment/ShipmentHeaderMapper.xml
@@ -73,8 +73,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -73,8 +73,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
73 | 73 | ||
74 | <select id="selectModel" | 74 | <select id="selectModel" |
75 | resultType="com.huaheng.api.U8.domain.ICSShipmentHeader"> | 75 | resultType="com.huaheng.api.U8.domain.ICSShipmentHeader"> |
76 | - SELECT cCode, ID, dPODate, cVenCode, cVenName, cBusType, cDepCode, cDepName, cPersonCode, cPersonName, cMemo, cMaker, cVerifier, CompanyCode, cModifyDate,cTVCode, dDate, cRDName, cWHCode, cWHName,oWHCode, oWHName, MoId, MoCode, DLID, cDLCode, cCusCode, cCusName, cSTName | ||
77 | - from icsShipment_header | 76 | + SELECT cCode, ID, dPODate, cVenCode, cVenName, cBusType, cDepCode, cDepName, cPersonCode, cPersonName, cMemo, cMaker, type, cVerifier, CompanyCode, cModifyDate,cTVCode, dDate, cRDName, cWHCode, cWHName,oWHCode, oWHName, MoId, MoCode, DLID, cDLCode, cCusCode, cCusName, cSTName |
77 | + from icsshipment_header | ||
78 | <where> | 78 | <where> |
79 | <if test="cCode != null"> | 79 | <if test="cCode != null"> |
80 | AND cCode = #{cCode} | 80 | AND cCode = #{cCode} |
@@ -163,6 +163,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -163,6 +163,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
163 | <if test="cSTName != null"> | 163 | <if test="cSTName != null"> |
164 | AND cSTName = #{cSTName} | 164 | AND cSTName = #{cSTName} |
165 | </if> | 165 | </if> |
166 | + <if test="type != null"> | ||
167 | + AND type = #{type} | ||
168 | + </if> | ||
166 | </where> | 169 | </where> |
167 | </select> | 170 | </select> |
168 | 171 | ||
@@ -170,7 +173,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -170,7 +173,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
170 | 173 | ||
171 | 174 | ||
172 | <insert id="insertModel"> | 175 | <insert id="insertModel"> |
173 | - INSERT INTO icsShipment_header | 176 | + INSERT INTO icsshipment_header |
174 | <trim prefix="(" suffix=")" suffixOverrides=","> | 177 | <trim prefix="(" suffix=")" suffixOverrides=","> |
175 | <if test="cCode != null"> | 178 | <if test="cCode != null"> |
176 | cCode, | 179 | cCode, |
@@ -259,6 +262,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -259,6 +262,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
259 | <if test="cSTName != null"> | 262 | <if test="cSTName != null"> |
260 | cSTName, | 263 | cSTName, |
261 | </if> | 264 | </if> |
265 | + <if test="type != null"> | ||
266 | + type, | ||
267 | + </if> | ||
262 | </trim> | 268 | </trim> |
263 | <trim prefix=" values (" suffix=")" suffixOverrides=","> | 269 | <trim prefix=" values (" suffix=")" suffixOverrides=","> |
264 | <if test="cCode != null"> | 270 | <if test="cCode != null"> |
@@ -348,6 +354,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -348,6 +354,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
348 | <if test="cSTName != null"> | 354 | <if test="cSTName != null"> |
349 | #{cSTName, jdbcType=VARCHAR}, | 355 | #{cSTName, jdbcType=VARCHAR}, |
350 | </if> | 356 | </if> |
357 | + <if test="type != null"> | ||
358 | + #{type, jdbcType=VARCHAR}, | ||
359 | + </if> | ||
351 | </trim> | 360 | </trim> |
352 | </insert> | 361 | </insert> |
353 | </mapper> | 362 | </mapper> |
354 | \ No newline at end of file | 363 | \ No newline at end of file |
src/main/resources/mybatis/shipment/ShipmentHeaderMapperAuto.xml
@@ -52,9 +52,8 @@ | @@ -52,9 +52,8 @@ | ||
52 | <if test="priority != null "> | 52 | <if test="priority != null "> |
53 | AND priority = #{priority} | 53 | AND priority = #{priority} |
54 | </if> | 54 | </if> |
55 | - <if test="station != null and station != ''"> | ||
56 | - <bind name="stationPattern" value="'%' + station + '%'" /> | ||
57 | - AND station like #{stationPattern} | 55 | + <if test="station != null "> |
56 | + AND station = #{station} | ||
58 | </if> | 57 | </if> |
59 | <if test="totalQty != null "> | 58 | <if test="totalQty != null "> |
60 | AND totalQty = #{totalQty} | 59 | AND totalQty = #{totalQty} |
@@ -695,7 +694,7 @@ | @@ -695,7 +694,7 @@ | ||
695 | #{priority, jdbcType=SMALLINT}, | 694 | #{priority, jdbcType=SMALLINT}, |
696 | </if> | 695 | </if> |
697 | <if test="station != null"> | 696 | <if test="station != null"> |
698 | - #{station, jdbcType=VARCHAR}, | 697 | + #{station, jdbcType=INTEGER}, |
699 | </if> | 698 | </if> |
700 | <if test="totalQty != null"> | 699 | <if test="totalQty != null"> |
701 | #{totalQty, jdbcType=DECIMAL}, | 700 | #{totalQty, jdbcType=DECIMAL}, |
@@ -788,7 +787,7 @@ | @@ -788,7 +787,7 @@ | ||
788 | priority = #{priority, jdbcType=SMALLINT}, | 787 | priority = #{priority, jdbcType=SMALLINT}, |
789 | </if> | 788 | </if> |
790 | <if test="station != null"> | 789 | <if test="station != null"> |
791 | - station = #{station, jdbcType=VARCHAR}, | 790 | + station = #{station, jdbcType=INTEGER}, |
792 | </if> | 791 | </if> |
793 | <if test="totalQty != null"> | 792 | <if test="totalQty != null"> |
794 | totalQty = #{totalQty, jdbcType=DECIMAL}, | 793 | totalQty = #{totalQty, jdbcType=DECIMAL}, |
@@ -882,7 +881,7 @@ | @@ -882,7 +881,7 @@ | ||
882 | priority = #{record.priority, jdbcType=SMALLINT}, | 881 | priority = #{record.priority, jdbcType=SMALLINT}, |
883 | </if> | 882 | </if> |
884 | <if test="record.station != null"> | 883 | <if test="record.station != null"> |
885 | - station = #{record.station, jdbcType=VARCHAR}, | 884 | + station = #{record.station, jdbcType=INTEGER}, |
886 | </if> | 885 | </if> |
887 | <if test="record.totalQty != null"> | 886 | <if test="record.totalQty != null"> |
888 | totalQty = #{record.totalQty, jdbcType=DECIMAL}, | 887 | totalQty = #{record.totalQty, jdbcType=DECIMAL}, |
src/main/resources/templates/general/location/addBatch.html
0 → 100644
1 | +<!DOCTYPE HTML> | ||
2 | +<html lang="zh" xmlns:th="http://www.thymeleaf.org"> | ||
3 | +<meta charset="utf-8"> | ||
4 | +<head th:include="include :: header"></head> | ||
5 | +<body class="white-bg"> | ||
6 | + <div class="wrapper wrapper-content animated fadeInRight ibox-content"> | ||
7 | + <form class="form-horizontal m" id="form-location-add"> | ||
8 | + <div class="form-group"> | ||
9 | + <label class="col-sm-3 control-label">最后行:</label> | ||
10 | + <div class="col-sm-8"> | ||
11 | + <input id="row" name="row" class="form-control" type="text"> | ||
12 | + </div> | ||
13 | + </div> | ||
14 | + <div class="form-group"> | ||
15 | + <label class="col-sm-3 control-label">最后列:</label> | ||
16 | + <div class="col-sm-8"> | ||
17 | + <input id="line" name="line" class="form-control" type="text"> | ||
18 | + </div> | ||
19 | + </div> | ||
20 | + <div class="form-group"> | ||
21 | + <label class="col-sm-3 control-label">最后层:</label> | ||
22 | + <div class="col-sm-8"> | ||
23 | + <input id="layer" name="layer" class="form-control" type="text"> | ||
24 | + </div> | ||
25 | + </div> | ||
26 | + <div class="form-group"> | ||
27 | + <label class="col-sm-3 control-label">最后格:</label> | ||
28 | + <div class="col-sm-8"> | ||
29 | + <input id="grid" name="grid" class="form-control" type="text"> | ||
30 | + </div> | ||
31 | + </div> | ||
32 | + <div class="form-group"> | ||
33 | + <label class="col-sm-3 control-label">库位类型:</label> | ||
34 | + <div class="col-sm-8"> | ||
35 | + <select id="type" class="form-control" th:with="locationType=${@locationType.getLocationPrefix()}"> | ||
36 | + <option th:each="item : ${locationType}" th:text="${item['name']}" th:value="${item['prefix']}"></option> | ||
37 | + </select> | ||
38 | + </div> | ||
39 | + </div> | ||
40 | + <div class="form-group"> | ||
41 | + <label class="col-sm-3 control-label">库区编码:</label> | ||
42 | + <div class="col-sm-8"> | ||
43 | + <select id="zone" name="zone" class="form-control" th:with="zone=${@zone.getZoneCodeList()}"> | ||
44 | + <option th:each="item : ${zone}" th:text="${item['name']}" th:value="${item['id']}" th:attr = " code = ${item['code']}"></option> | ||
45 | + </select> | ||
46 | + </div> | ||
47 | + </div> | ||
48 | + <div class="form-group"> | ||
49 | + <label class="col-sm-3 control-label">是否有效:</label> | ||
50 | + <div class="col-sm-8"> | ||
51 | + <div class="onoffswitch"> | ||
52 | + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="enable" name="enable"> | ||
53 | + <label class="onoffswitch-label" for="enable"> | ||
54 | + <span class="onoffswitch-inner"></span> | ||
55 | + <span class="onoffswitch-switch"></span> | ||
56 | + </label> | ||
57 | + </div> | ||
58 | + </div> | ||
59 | + </div> | ||
60 | + <div class="form-group"> | ||
61 | + <div class="form-control-static col-sm-offset-9"> | ||
62 | + <button type="submit" class="btn btn-primary">提交</button> | ||
63 | + <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button> | ||
64 | + </div> | ||
65 | + </div> | ||
66 | + </form> | ||
67 | + </div> | ||
68 | + <div th:include="include::footer"></div> | ||
69 | + <script type="text/javascript"> | ||
70 | + var prefix = ctx + "general/location" | ||
71 | + $("#form-location-add").validate({ | ||
72 | + rules:{ | ||
73 | + row:{ | ||
74 | + required:true, | ||
75 | + digits:true | ||
76 | + }, | ||
77 | + line:{ | ||
78 | + required:true, | ||
79 | + digits:true | ||
80 | + }, | ||
81 | + layer:{ | ||
82 | + required:true, | ||
83 | + digits:true | ||
84 | + }, | ||
85 | + grid:{ | ||
86 | + required:true, | ||
87 | + digits:true | ||
88 | + } | ||
89 | + }, | ||
90 | + submitHandler: function(form) { | ||
91 | + $.ajax({ | ||
92 | + cache : true, | ||
93 | + type : "POST", | ||
94 | + url : prefix + "/addBatchSave", | ||
95 | + data : { | ||
96 | + "row": $("input[name='row']").val(), | ||
97 | + "line": $("input[name='line']").val(), | ||
98 | + "layer": $("input[name='layer']").val(), | ||
99 | + "grid": $("input[name='grid']").val(), | ||
100 | + "type": $("#type option:selected").val(), | ||
101 | + "zoneId":$("#zone option:selected").val(), | ||
102 | + "zoneCode": $("#zone option:selected").attr("code"), | ||
103 | + "enable" : $("input[name='enable']").is(':checked'), | ||
104 | + }, | ||
105 | + async : false, | ||
106 | + error : function(request) { | ||
107 | + $.modal.alertError("请求失败!"); | ||
108 | + }, | ||
109 | + success : function(data) { | ||
110 | + $.operate.saveSuccess(data); | ||
111 | + } | ||
112 | + }); | ||
113 | + } | ||
114 | + }); | ||
115 | + </script> | ||
116 | +</body> | ||
117 | +</html> |
src/main/resources/templates/general/location/location.html
@@ -66,6 +66,10 @@ | @@ -66,6 +66,10 @@ | ||
66 | </a> | 66 | </a> |
67 | <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" | 67 | <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" |
68 | shiro:hasPermission="general:location:remove"> | 68 | shiro:hasPermission="general:location:remove"> |
69 | + <a class="btn btn-outline btn-success btn-rounded" onclick="addBatch()" shiro:hasPermission="general:location:add"> | ||
70 | + <i class="fa fa-plus"></i> 批量新增 | ||
71 | + </a> | ||
72 | + <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" shiro:hasPermission="general:location:remove"> | ||
69 | <i class="fa fa-trash-o"></i> 删除 | 73 | <i class="fa fa-trash-o"></i> 删除 |
70 | </a> | 74 | </a> |
71 | </div> | 75 | </div> |
@@ -235,6 +239,11 @@ | @@ -235,6 +239,11 @@ | ||
235 | }; | 239 | }; |
236 | $.table.init(options); | 240 | $.table.init(options); |
237 | }); | 241 | }); |
242 | + | ||
243 | + | ||
244 | + function addBatch() { | ||
245 | + $.modal.open("批量添加", prefix + "/addBatch"); | ||
246 | + } | ||
238 | </script> | 247 | </script> |
239 | </body> | 248 | </body> |
240 | </html> | 249 | </html> |
241 | \ No newline at end of file | 250 | \ No newline at end of file |
src/test/java/com.huaheng.test/CreateCode.java
@@ -187,7 +187,8 @@ public class CreateCode { | @@ -187,7 +187,8 @@ public class CreateCode { | ||
187 | 187 | ||
188 | if (packageName == null) continue; | 188 | if (packageName == null) continue; |
189 | directory = "src/main/resources/mybatis/" + packageName.split("\\.")[3]; | 189 | directory = "src/main/resources/mybatis/" + packageName.split("\\.")[3]; |
190 | - modelName = FirstCharToUpper(packageName.split("\\.")[4]); | 190 | + modelName = packageName.split("\\.")[5]; |
191 | + packageName = packageName.substring(0, packageName.lastIndexOf(".")); | ||
191 | 192 | ||
192 | for(Map<String, Object> columnMap : columnList) | 193 | for(Map<String, Object> columnMap : columnList) |
193 | if (columnMap.get("TABLE_NAME").equals(tableName)) | 194 | if (columnMap.get("TABLE_NAME").equals(tableName)) |
@@ -1149,33 +1150,33 @@ public class CreateCode { | @@ -1149,33 +1150,33 @@ public class CreateCode { | ||
1149 | 1150 | ||
1150 | private static Map<String, String> getPackages() { | 1151 | private static Map<String, String> getPackages() { |
1151 | Map<String, String> packages = new HashMap<String, String>(); | 1152 | Map<String, String> packages = new HashMap<String, String>(); |
1152 | - packages.put("company","com.huaheng.pc.general.company"); | ||
1153 | - packages.put("warehouse_company","com.huaheng.pc.general.company"); | ||
1154 | - packages.put("container","com.huaheng.pc.general.container"); | ||
1155 | - packages.put("container_type","com.huaheng.pc.config.containerType"); | ||
1156 | - packages.put("customer","com.huaheng.pc.general.customer"); | ||
1157 | - packages.put("cyclecount_adjust","com.huaheng.pc.inventory.cyclecountAdjust"); | ||
1158 | - packages.put("cyclecount_adjustdetail","com.huaheng.pc.inventory.cyclecountAdjustDetail"); | ||
1159 | - packages.put("cyclecount_detail","com.huaheng.pc.inventory.cyclecountDetail"); | ||
1160 | - packages.put("cyclecount_header","com.huaheng.pc.inventory.cyclecountHeader"); | ||
1161 | - packages.put("inventory","com.huaheng.pc.inventory.inventory"); | ||
1162 | - packages.put("inventory_transaction","com.huaheng.pc.inventory.inventoryTransaction"); | ||
1163 | - packages.put("location","com.huaheng.pc.general.location"); | ||
1164 | - packages.put("location_type","com.huaheng.pc.config.locationType"); | ||
1165 | - packages.put("material","com.huaheng.pc.general.material"); | ||
1166 | - packages.put("receipt_container_detail","com.huaheng.pc.receipt.receiptContainerDetail"); | ||
1167 | - packages.put("receipt_container_header","com.huaheng.pc.receipt.receiptContainerHeader"); | ||
1168 | - packages.put("receipt_detail","com.huaheng.pc.receipt.receiptDetail"); | ||
1169 | - packages.put("receipt_detail_history","com.huaheng.pc.receipt.receiptDetailHistory"); | ||
1170 | - packages.put("receipt_header","com.huaheng.pc.receipt.receiptHeader"); | ||
1171 | - packages.put("receipt_header_history","com.huaheng.pc.receipt.receiptHeaderHistory"); | ||
1172 | - packages.put("shipment_container_detail","com.huaheng.pc.shipment.shipmentContainerDetail"); | ||
1173 | - packages.put("shipment_container_header","com.huaheng.pc.shipment.shipmentContainerHeader"); | ||
1174 | - packages.put("shipment_detail","com.huaheng.pc.shipment.shipmentDetail"); | ||
1175 | - packages.put("shipment_detail_history","com.huaheng.pc.shipment.shipmentDetailHistory"); | ||
1176 | - packages.put("shipment_header","com.huaheng.pc.shipment.shipmentHeader"); | ||
1177 | - packages.put("shipment_header_history","com.huaheng.pc.shipment.shipmentHeaderHistory"); | ||
1178 | - packages.put("supplier","com.huaheng.pc.general.supplier"); | 1153 | + packages.put("company","com.huaheng.pc.general.company.Company"); |
1154 | + packages.put("warehouse_company","com.huaheng.pc.general.company.WarehouseCompany"); | ||
1155 | + packages.put("container","com.huaheng.pc.general.container.Container"); | ||
1156 | + packages.put("container_type","com.huaheng.pc.config.containerType.ContainerType"); | ||
1157 | + packages.put("customer","com.huaheng.pc.general.customer.Customer"); | ||
1158 | + packages.put("cyclecount_adjust","com.huaheng.pc.inventory.cyclecountAdjust.CyclecountAdjust"); | ||
1159 | + packages.put("cyclecount_adjustdetail","com.huaheng.pc.inventory.cyclecountAdjustDetail.CyclecountAdjustDetail"); | ||
1160 | + packages.put("cyclecount_detail","com.huaheng.pc.inventory.cyclecountDetail.CyclecountDetail"); | ||
1161 | + packages.put("cyclecount_header","com.huaheng.pc.inventory.cyclecountHeader.CyclecountHeader"); | ||
1162 | + packages.put("inventory","com.huaheng.pc.inventory.inventory.Inventory"); | ||
1163 | + packages.put("inventory_transaction","com.huaheng.pc.inventory.inventoryTransaction.InventoryTransaction"); | ||
1164 | + packages.put("location","com.huaheng.pc.general.location.Location"); | ||
1165 | + packages.put("location_type","com.huaheng.pc.config.locationType.LocationType"); | ||
1166 | + packages.put("material","com.huaheng.pc.general.material.Material"); | ||
1167 | + packages.put("receipt_container_detail","com.huaheng.pc.receipt.receiptContainerDetail.ReceiptContainerDetail"); | ||
1168 | + packages.put("receipt_container_header","com.huaheng.pc.receipt.receiptContainerHeader.ReceiptContainerHeader"); | ||
1169 | + packages.put("receipt_detail","com.huaheng.pc.receipt.receiptDetail.ReceiptDetail"); | ||
1170 | + packages.put("receipt_detail_history","com.huaheng.pc.receipt.receiptDetailHistory.ReceiptDetailHistory"); | ||
1171 | + packages.put("receipt_header","com.huaheng.pc.receipt.receiptHeader.ReceiptHeader"); | ||
1172 | + packages.put("receipt_header_history","com.huaheng.pc.receipt.receiptHeaderHistory.ReceiptHeaderHistory"); | ||
1173 | + packages.put("shipment_container_detail","com.huaheng.pc.shipment.shipmentContainerDetail.ShipmentContainerDetail"); | ||
1174 | + packages.put("shipment_container_header","com.huaheng.pc.shipment.shipmentContainerHeader.ShipmentContainerHeader"); | ||
1175 | + packages.put("shipment_detail","com.huaheng.pc.shipment.shipmentDetail.ShipmentDetail"); | ||
1176 | + packages.put("shipment_detail_history","com.huaheng.pc.shipment.shipmentDetailHistory.ShipmentDetailHistory"); | ||
1177 | + packages.put("shipment_header","com.huaheng.pc.shipment.shipmentHeader.ShipmentHeader"); | ||
1178 | + packages.put("shipment_header_history","com.huaheng.pc.shipment.shipmentHeaderHistory.ShipmentHeaderHistory"); | ||
1179 | + packages.put("supplier","com.huaheng.pc.general.supplier.Supplier"); | ||
1179 | // packages.put("sys_config","system"); | 1180 | // packages.put("sys_config","system"); |
1180 | // packages.put("sys_dept","system"); | 1181 | // packages.put("sys_dept","system"); |
1181 | // packages.put("sys_dict_data","system"); | 1182 | // packages.put("sys_dict_data","system"); |
@@ -1192,11 +1193,11 @@ public class CreateCode { | @@ -1192,11 +1193,11 @@ public class CreateCode { | ||
1192 | // packages.put("sys_user_company","system"); | 1193 | // packages.put("sys_user_company","system"); |
1193 | // packages.put("sys_user_online","system"); | 1194 | // packages.put("sys_user_online","system"); |
1194 | // packages.put("sys_user_role","system"); | 1195 | // packages.put("sys_user_role","system"); |
1195 | - packages.put("task","com.huaheng.pc.task.task"); | ||
1196 | - packages.put("task_detail","com.huaheng.pc.task.taskDetail"); | ||
1197 | - packages.put("warehouse","com.huaheng.pc.general.warehouse"); | ||
1198 | - packages.put("zone","com.huaheng.pc.config.zone"); | ||
1199 | - packages.put("zone_capacity","com.huaheng.pc.config.zoneCapacity"); | 1196 | + packages.put("task","com.huaheng.pc.task.task.Task"); |
1197 | + packages.put("task_detail","com.huaheng.pc.task.taskDetail.TaskDetail"); | ||
1198 | + packages.put("warehouse","com.huaheng.pc.general.warehouse.Warehouse"); | ||
1199 | + packages.put("zone","com.huaheng.pc.config.zone.Zone"); | ||
1200 | + packages.put("zone_capacity","com.huaheng.pc.config.zoneCapacity.ZoneCapacity"); | ||
1200 | return packages; | 1201 | return packages; |
1201 | } | 1202 | } |
1202 | 1203 |