Bladeren bron

Merge remote-tracking branch 'origin/master'

石岩 2 maanden geleden
bovenliggende
commit
00d7a92e40

+ 38
- 0
README.md Bestand weergeven

@@ -0,0 +1,38 @@
1
+# 保胜库房仓储管理系统
2
+
3
+远程数据库信息
4
+
5
+# jdbc.driverClass=com.mysql.jdbc.Driver
6
+# jdbc.jdbcUrl=jdbc:mysql://172.18.200.32:3306/ware?useUnicode=true&characterEncoding=utf8
7
+# jdbc.user=root
8
+# jdbc.password=root
9
+
10
+远程上传文件操作
11
+
12
+远程系统为Linux系统需要挂载山钢VPN和远程软件进行操作
13
+
14
+远程服务器地址: 172.18.200.32
15
+远程账号:root
16
+远程密码:@Sdgt@1234
17
+
18
+上传文件操作流程
19
+后台:
20
+1、执行 cd /home/apache-tomcat-8.5.51/webapps/
21
+2、执行 rz
22
+3、 选择本地打包好的文件上传war包
23
+4、 浏览器打开 http://120.224.213.150/thware/ 显示启动成功即可
24
+5、 cd /home/apache-tomcat-8.5.51/webapps/thware/home/sam/thwareUpload/ureportfiles/ 
25
+    前去这个文件夹下面查看出库单配车单的xml文件是否存在,如果不存在了需要将项目中的xml文件上传
26
+6、 cd /home/apache-tomcat-8.5.51/webapps/thware/ 
27
+    前去这个文件夹下面查看导入模板(import.xls)文件是否存在,如果不存在了需要将项目中的import.xls文件上传
28
+
29
+
30
+
31
+前台;
32
+1、 将本地打包的dist文件夹压缩成zip文件(一定要压缩成zip文件)
33
+2、 执行 cd /home/apache-tomcat-8.5.51/webapps/
34
+3、 查看是否有dist.zip文件,如果有则执行 rm -f dist.zip
35
+4、 执行 rz
36
+5、 选择本地打包好的文件上传zip文件
37
+6、 上传至完成之后执行 unzip dist.zip 在选择是否全部替换的时候选择A
38
+7、 执行完成之后回到前台界面刷新界面或者清空浏览器缓存查看更改信息是否已经生效

+ 9
- 3
src/main/java/com/th/demo/controller/ware/StoreController.java Bestand weergeven

@@ -97,8 +97,11 @@ public class StoreController {
97 97
                               String stackName,
98 98
                               String model,
99 99
                               String materialName,
100
-                             String standard,
101
-                             String customerName,
100
+                              String standard,
101
+                              String customerName,
102
+                              String plateNo,
103
+                              String fromDate,
104
+                              String toDate,
102 105
                               HttpServletRequest request) {
103 106
 
104 107
         try {
@@ -110,7 +113,10 @@ public class StoreController {
110 113
                     model,
111 114
                     materialName,
112 115
                     standard,
113
-                      customerName,
116
+                    customerName,
117
+                    plateNo,
118
+                    fromDate,
119
+                    toDate,
114 120
                     userId,
115 121
                     belongId);
116 122
         } catch (Exception ex) {

+ 2
- 2
src/main/java/com/th/demo/mapping/maint/PriceMapper.java Bestand weergeven

@@ -19,9 +19,9 @@ public interface PriceMapper {
19 19
 
20 20
     int updateByPrimaryKey(Price record);
21 21
 
22
-    Price selectByMaterialChangeTime(String materialId, int changeTime,String belongId);
22
+    Price selectByMaterialChangeTime(String id, String belongId);
23 23
 
24
-    List<Price> select(String materialName, String standard, String belongId);
24
+    List<Price> select(String customerName,  String belongId);
25 25
 
26 26
     int selectCntByMaterialChangeTime(String id, int i, String belongId);
27 27
 

+ 1
- 1
src/main/java/com/th/demo/mapping/ware/StoreMapper.java Bestand weergeven

@@ -31,7 +31,7 @@ public interface StoreMapper {
31 31
 
32 32
     Store selectByOutId(String id,String noUserParam,String userId, String belongId);
33 33
 
34
-    List<Store> selectStore(String wareName, String stackName, String model, String materialName, String standard,   String customerName, String userId,String belongId);
34
+    List<Store> selectStore(String wareName, String stackName, String model, String materialName, String standard,   String customerName, String fromDate,   String toDate, String userId,String belongId,String plateNo);
35 35
 
36 36
     int updateForUpDownByLayer(String wareName, String stackName, String userId, String belongId, int min, int max, int i);
37 37
 

+ 39
- 0
src/main/java/com/th/demo/model/maint/Price.java Bestand weergeven

@@ -1,6 +1,7 @@
1 1
 package com.th.demo.model.maint;
2 2
 
3 3
 import com.th.demo.model.system.SysUser;
4
+import com.th.demo.model.maint.Customer;
4 5
 
5 6
 import java.util.Date;
6 7
 
@@ -33,6 +34,44 @@ public class Price {
33 34
 
34 35
     private String   storageType;
35 36
 
37
+    // 20250324新增字段
38
+    private Customer customer;
39
+    private int keepDay;
40
+    private double ordPrice;
41
+    private double outOrdPrice;
42
+
43
+    public Customer getCustomer() {
44
+        return customer;
45
+    }
46
+
47
+    public void setCustomer(Customer customer) {
48
+        this.customer = customer;
49
+    }
50
+
51
+    public int getKeepDay() {
52
+        return keepDay;
53
+    }
54
+
55
+    public void setKeepDay(int keepDay) {
56
+        this.keepDay = keepDay;
57
+    }
58
+
59
+    public double getOrdPrice() {
60
+        return ordPrice;
61
+    }
62
+
63
+    public void setOrdPrice(double ordPrice) {
64
+        this.ordPrice = ordPrice;
65
+    }
66
+
67
+    public double getOutOrdPrice() {
68
+        return outOrdPrice;
69
+    }
70
+
71
+    public void setOutOrdPrice(double outOrdPrice) {
72
+        this.outOrdPrice = outOrdPrice;
73
+    }
74
+
36 75
     public String getId() {
37 76
         return id;
38 77
     }

+ 9
- 0
src/main/java/com/th/demo/model/ware/InRecord.java Bestand weergeven

@@ -61,6 +61,15 @@ public class InRecord {
61 61
     private String tallyPeople;
62 62
 
63 63
     private String fkComponyName;
64
+    private double invoicePrice;
65
+
66
+    public double getInvoicePrice() {
67
+        return invoicePrice;
68
+    }
69
+
70
+    public void setInvoicePrice(double invoicePrice) {
71
+        this.invoicePrice = invoicePrice;
72
+    }
64 73
 
65 74
     public String getFkComponyName() {
66 75
         return fkComponyName;

+ 9
- 0
src/main/java/com/th/demo/model/ware/OutRecord.java Bestand weergeven

@@ -85,6 +85,15 @@ public class OutRecord {
85 85
 
86 86
     private Double storeFee;
87 87
     private Integer inWareDays;
88
+    private Double unitPrice;
89
+
90
+    public Double getUnitPrice() {
91
+        return unitPrice;
92
+    }
93
+
94
+    public void setUnitPrice(Double unitPrice) {
95
+        this.unitPrice = unitPrice;
96
+    }
88 97
 
89 98
     public Double getStoreFee() {
90 99
         return storeFee;

+ 9
- 0
src/main/java/com/th/demo/model/ware/Store.java Bestand weergeven

@@ -74,6 +74,15 @@ public class Store  implements Comparable<Store>{
74 74
     private String fkComponyId ;
75 75
 
76 76
     private Double invoicePrice;
77
+    private String contractNo;
78
+
79
+    public String getContractNo() {
80
+        return contractNo;
81
+    }
82
+
83
+    public void setContractNo(String contractNo) {
84
+        this.contractNo = contractNo;
85
+    }
77 86
 
78 87
     public Double getInvoicePrice() {
79 88
         return invoicePrice;

+ 12
- 2
src/main/java/com/th/demo/service/impl/maint/PriceServiceImpl.java Bestand weergeven

@@ -6,8 +6,10 @@ import com.github.pagehelper.PageHelper;
6 6
 import com.github.pagehelper.PageInfo;
7 7
 import com.th.demo.mapping.maint.PriceMapper;
8 8
 import com.th.demo.mapping.maint.ProdPriceMapper;
9
+import com.th.demo.mapping.maint.CustomerMapper;
9 10
 import com.th.demo.model.maint.Price;
10 11
 import com.th.demo.model.maint.ProdPrice;
12
+import com.th.demo.model.maint.Customer;
11 13
 import com.th.demo.model.system.SysUser;
12 14
 import com.th.demo.model.system.Type;
13 15
 import com.th.demo.service.maint.PriceService;
@@ -26,6 +28,8 @@ public class PriceServiceImpl implements PriceService {
26 28
     public PriceMapper priceMapper;
27 29
     @Autowired
28 30
     ProdPriceMapper prodPriceMapper;
31
+    @Autowired
32
+    public CustomerMapper customerMapper;
29 33
 
30 34
     String result = Type.FAIL;
31 35
     int num = 0;
@@ -33,7 +37,7 @@ public class PriceServiceImpl implements PriceService {
33 37
     @Override
34 38
     public String query(int page, int rows, String materialName,String standard, String userId, String belongId) {
35 39
         PageHelper.startPage(page, rows);
36
-        List<Price> list = priceMapper.select(  materialName,standard, belongId);
40
+        List<Price> list = priceMapper.select(materialName,belongId);
37 41
         PageInfo<Price> pageInfo = new PageInfo<>(list);
38 42
         result = JSONTools.toStringyyyyMMddHHmmss(pageInfo);
39 43
         return result;
@@ -43,7 +47,13 @@ public class PriceServiceImpl implements PriceService {
43 47
     public String save(String json, String userId, String belongId) {
44 48
         Price price = JSON.parseObject(json,new TypeReference<Price>(){});
45 49
         if(price.getId()==null||price.getId().equals("")){
46
-            int priceCnt = priceMapper.selectCntByMaterialChangeTime(price.getMaterial().getId(),Integer.parseInt(price.getStorageType()) , belongId);
50
+            Customer customers = customerMapper.selectByName(price.getCustomer().getName(),belongId);
51
+            if (customers.getId()==null||customers.getId().equals("")){
52
+                result = JSONTools.toStringyyyyMMddHHmmss(0);
53
+                result = "该客户名称不存才";
54
+                return result;
55
+            }
56
+            int priceCnt = priceMapper.selectCntByMaterialChangeTime(customers.getId(),0 , belongId);
47 57
             if(priceCnt > 0){
48 58
                 result = JSONTools.toStringyyyyMMddHHmmss(0);
49 59
                 result = "已存在该价格信息";

+ 33
- 33
src/main/java/com/th/demo/service/impl/ware/InServiceImpl.java Bestand weergeven

@@ -45,6 +45,8 @@ public class InServiceImpl implements InService {
45 45
     public MaterialMapper materialMapper;
46 46
     @Autowired
47 47
     public ProdPriceMapper prodPriceMapper;
48
+    @Autowired
49
+    public PriceMapper priceMapper;
48 50
     String result = Type.FAIL;
49 51
     int num = 0;
50 52
 
@@ -211,16 +213,16 @@ public class InServiceImpl implements InService {
211 213
 
212 214
     private int insert(List<Store> listSameStack, Stack stack, String userId, String belongId) throws Exception{
213 215
         int currentLayer = 0;
214
-        if (stack.getIsLayer().equals("1")) {
216
+        /*if (stack.getIsLayer().equals("1")) {
215 217
             currentLayer = Integer.parseInt(storeMapper.selectLayerByStackId(stack.getId(), belongId));
216 218
         } else {
217 219
             currentLayer = -1;
218
-        }
219
-        ProdPrice prodPrice = new ProdPrice();
220
+        }*/
221
+        Price Price = new Price();
220 222
         for (int m = 0; m < listSameStack.size(); m++) {
221
-
223
+            currentLayer = Integer.parseInt(storeMapper.selectLayerByStackId(stack.getId(), belongId));
222 224
             if (stack.getIsLayer().equals("1")) {
223
-                listSameStack.get(m).setLayer(currentLayer + m + 1);
225
+                listSameStack.get(m).setLayer(currentLayer + 1);
224 226
             } else {
225 227
                 listSameStack.get(m).setLayer(0);
226 228
             }
@@ -228,11 +230,12 @@ public class InServiceImpl implements InService {
228 230
             listSameStack.get(m).setAddTime(new Date());
229 231
             listSameStack.get(m).setCancelFlag("0");
230 232
             listSameStack.get(m).setBelongId(belongId);
231
-            /*prodPrice = prodPriceMapper.selectByProdNm(listSameStack.get(m).getMaterial().getName());
232
-            if(prodPrice == null){
233
-                throw new Exception(listSameStack.get(m).getMaterial().getName()+"价格未维护");
233
+            Price = priceMapper.selectByMaterialChangeTime(listSameStack.get(m).getFkComponyId().toString(),belongId);
234
+            if(Price == null){
235
+                Customer fk_compony = customerMapper.selectByPrimaryKey(listSameStack.get(m).getFkComponyId());
236
+                throw new Exception(fk_compony.getName()+"公司的价格未维护");
234 237
             }
235
-            listSameStack.get(m).setInvoicePrice(prodPrice.getInvoicePrice());*/
238
+            listSameStack.get(m).setInvoicePrice(Price.getOrdPrice());
236 239
             InRecord inRecord = getInRecord(listSameStack.get(m), "1", userId);
237 240
             num += inRecordMapper.insert(inRecord);
238 241
 
@@ -250,10 +253,10 @@ public class InServiceImpl implements InService {
250 253
         List<Store> listStore = new ArrayList<>();
251 254
         String wareName = listJO.get(0).get("仓库名称").toString();
252 255
         String stackName = listJO.get(0).get("垛位号").toString();
253
-        String materialName = listJO.get(0).get("物料类型").toString();
254
-        String standard = listJO.get(0).get("钢种").toString();
256
+        String materialName = listJO.get(0).get("货物品名").toString();
257
+        String standard = listJO.get(0).get("材质").toString();
255 258
         String customerName = listJO.get(0).get("客户名称").toString();
256
-        String fk_compony_name = listJO.get(0).get("货权单位").toString();
259
+        String fk_compony_name = listJO.get(0).get("客户名称").toString();
257 260
         Ware ware = wareMapper.selectByWareName(wareName, userId, belongId);
258 261
         if (ware == null) {
259 262
             err += "未找到名为\"" + wareName + "\"的库房;";
@@ -303,33 +306,33 @@ public class InServiceImpl implements InService {
303 306
                 }
304 307
                 store.setStack(stack);
305 308
             }
306
-            if (listJO.get(i).get("物料类型").toString().equals(materialName) && listJO.get(i).get("钢种").toString().equals(standard)) {
309
+            if (listJO.get(i).get("货物品名").toString().equals(materialName) && listJO.get(i).get("材质").toString().equals(standard)) {
307 310
                 store.setMaterial(material);
308 311
             } else {
309
-                materialName = listJO.get(i).get("物料类型").toString();
310
-                standard = listJO.get(i).get("钢种").toString();
312
+                materialName = listJO.get(i).get("货物品名").toString();
313
+                standard = listJO.get(i).get("材质").toString();
311 314
                 material = materialMapper.selectByNameStandard(materialName, standard, belongId);
312 315
                 if (material == null) {
313
-                    err += "未找到名为\"" + materialName + "," + standard + "\"的物料类型;";
316
+                    err += "未找到名为\"" + materialName + "," + standard + "\"的货物品名;";
314 317
                     throw new Exception(err);
315 318
                 }
316 319
                 store.setMaterial(material);
317 320
             }
318
-            if (listJO.get(i).get("客户名称").toString().equals(customerName)) {
321
+            if (listJO.get(i).get("订单客户").toString().equals(customerName)) {
319 322
                 store.setCustomer(customer);
320 323
             } else {
321
-                customerName = listJO.get(i).get("客户名称").toString();
324
+                customerName = listJO.get(i).get("订单客户").toString();
322 325
                 customer = customerMapper.selectByName(customerName, belongId);
323 326
                 if (customer == null) {
324
-                    err += "未找到名为\"" + customerName + "\"的客户名称;";
327
+                    err += "未找到名为\"" + customerName + "\"的订单客户名称;";
325 328
                     throw new Exception(err);
326 329
                 }
327 330
                 store.setCustomer(customer);
328 331
             }
329
-            if (listJO.get(i).get("货权单位").toString().equals(fk_compony_name)) {
332
+            if (listJO.get(i).get("客户名称").toString().equals(fk_compony_name)) {
330 333
                 store.setFkComponyId(fk_compony.getId());
331 334
             } else {
332
-                fk_compony_name = listJO.get(i).get("货权单位").toString();
335
+                fk_compony_name = listJO.get(i).get("客户名称").toString();
333 336
                 fk_compony = customerMapper.selectByName(fk_compony_name, belongId);
334 337
                 if (customer == null) {
335 338
                     err += "未找到名为\"" + customerName + "\"的客户名称;";
@@ -338,14 +341,14 @@ public class InServiceImpl implements InService {
338 341
                 store.setFkComponyId(fk_compony.getId());
339 342
             }
340 343
             store.setLayer(Integer.parseInt(listJO.get(i).get("层号").toString()));
341
-            store.setPlateNo(listJO.get(i).get("产品编号").toString());
342
-            store.setModel(listJO.get(i).get("产品规格").toString());
344
+            store.setPlateNo(listJO.get(i).get("顺序号").toString());
345
+            store.setModel(listJO.get(i).get("规格").toString());
343 346
             store.setCount(Double.parseDouble(listJO.get(i).get("数量").toString()));
344 347
             store.setWeight(Double.parseDouble(listJO.get(i).get("重量").toString()));
345
-            if (listJO.get(i).get("收货地址") == null || listJO.get(i).get("收货地址").toString().equals("")) {
348
+            if (listJO.get(i).get("目的地") == null || listJO.get(i).get("目的地").toString().equals("")) {
346 349
                 store.setReceiveAddress(customer.getAddress());
347 350
             } else {
348
-                store.setReceiveAddress(listJO.get(i).get("收货地址").toString());
351
+                store.setReceiveAddress(listJO.get(i).get("目的地").toString());
349 352
             }
350 353
             if(listJO.get(i).get("备注") != null){
351 354
                 store.setRemark(listJO.get(i).get("备注").toString());
@@ -356,12 +359,6 @@ public class InServiceImpl implements InService {
356 359
             store.setCancelFlag("0");
357 360
             store.setOutFlag("0");
358 361
             store.setBelongId(belongId);
359
-            if(listJO.get(i).get("计量方式") != null){
360
-                store.setWgtDcnMtcCd(listJO.get(i).get("计量方式").toString());
361
-            }
362
-            if(listJO.get(i).get("切边类型") != null){
363
-                store.setEdgeTy(listJO.get(i).get("切边类型").toString());
364
-            }
365 362
             if(listJO.get(i).get("产地") != null){
366 363
                 store.setProductionPlace(listJO.get(i).get("产地").toString());
367 364
             }
@@ -369,11 +366,14 @@ public class InServiceImpl implements InService {
369 366
             if(listJO.get(i).get("订单号") != null){
370 367
                 store.setOrdNo(listJO.get(i).get("订单号").toString());
371 368
             }
369
+            if(listJO.get(i).get("合约号") != null){
370
+                store.setContractNo(listJO.get(i).get("合约号").toString());
371
+            }
372 372
             if(listJO.get(i).get("车号") != null){
373 373
                 store.setCarNo(listJO.get(i).get("车号").toString());
374 374
             }
375
-            if(listJO.get(i).get("入库理货人员") != null){
376
-                store.setTallyPeople(listJO.get(i).get("入库理货人员").toString());
375
+            if(listJO.get(i).get("吊装工") != null){
376
+                store.setTallyPeople(listJO.get(i).get("吊装工").toString());
377 377
             }
378 378
             listStore.add(store);
379 379
         }

+ 15
- 1
src/main/java/com/th/demo/service/impl/ware/OutServiceImpl.java Bestand weergeven

@@ -47,6 +47,8 @@ public class OutServiceImpl implements OutService {
47 47
     public ChangeRecordMapper changeRecordMapper;
48 48
     @Autowired
49 49
     public PriceMapper priceMapper;
50
+    @Autowired
51
+    public InRecordMapper inRecordMapper;
50 52
 
51 53
     String result = Type.FAIL;
52 54
     int num = 0;
@@ -298,7 +300,19 @@ public class OutServiceImpl implements OutService {
298 300
         outRecord.setWgtDcnMtcCd(store.getWgtDcnMtcCd());
299 301
         outRecord.setEdgeTy(store.getEdgeTy());
300 302
         outRecord.setProductionPlace(store.getProductionPlace());
301
-        outRecord.setInvoicePrice(store.getInvoicePrice());
303
+        InRecord inRecord = inRecordMapper.selectByPrimaryKey(store.getInId());
304
+        double asd = (outRecord.getAddTime().getDate() - inRecord.getAddTime().getTime())/ (24 * 60 * 60 * 1000);
305
+        Price price = priceMapper.selectByMaterialChangeTime(store.getFkComponyId(),store.getBelongId());
306
+        if (asd > price.getKeepDay()){
307
+            outRecord.setInvoicePrice(price.getOutOrdPrice());
308
+            outRecord.setUnitPrice(price.getOutOrdPrice());
309
+        }else {
310
+            outRecord.setInvoicePrice(price.getOrdPrice());
311
+            outRecord.setUnitPrice(price.getOrdPrice());
312
+        }
313
+
314
+
315
+
302 316
         return outRecord;
303 317
     }
304 318
 

+ 4
- 1
src/main/java/com/th/demo/service/impl/ware/StoreServiceImpl.java Bestand weergeven

@@ -79,10 +79,13 @@ public class StoreServiceImpl implements StoreService {
79 79
                              String materialName,
80 80
                              String standard,
81 81
                              String customerName,
82
+                             String plateNo,
83
+                             String fromDate,
84
+                             String toDate,
82 85
                              String userId,
83 86
                              String belongId) {
84 87
         PageHelper.startPage(page, rows);
85
-        List<Store> list=storeMapper.selectStore(wareName,stackName,model,materialName,standard,    customerName,   userId,belongId);
88
+        List<Store> list=storeMapper.selectStore(wareName,stackName,model,materialName,standard,    customerName,fromDate, toDate,  userId,belongId, plateNo);
86 89
         PageInfo<Store> pageInfo = new PageInfo<>(list);
87 90
         result = JSONTools.toStringyyyyMMddHHmmss(pageInfo);
88 91
         return result;

+ 1
- 1
src/main/java/com/th/demo/service/ware/StoreService.java Bestand weergeven

@@ -11,7 +11,7 @@ public interface StoreService {
11 11
     
12 12
     String modify(String json, String userId, String belongId);
13 13
 
14
-    String queryStore(int page,int rows,String wareName,String stackName,String model,String materialName,String standard,  String customerName, String userId,String belongId);
14
+    String queryStore(int page,int rows,String wareName,String stackName,String model,String materialName,String standard, String customerName, String plateNo,String fromDate,  String toDate, String userId,String belongId);
15 15
 
16 16
     String modifyCustomer(String id,String customerNameOld,String customerNameNew);
17 17
 

+ 8
- 10
src/main/resource/localhost/db.properties Bestand weergeven

@@ -1,12 +1,10 @@
1
-jdbc.driverClass=com.mysql.jdbc.Driver
2
-jdbc.jdbcUrl=jdbc:mysql://172.18.200.32:3306/ware?useUnicode=true&characterEncoding=utf8
3
-jdbc.user=root
4
-jdbc.password=root
5 1
 #jdbc.driverClass=com.mysql.jdbc.Driver
6
-#jdbc.jdbcUrl=jdbc:mysql://localhost:3306/thware?characterEncoding=utf8
2
+#jdbc.jdbcUrl=jdbc:mysql://172.18.200.32:3306/ware?useUnicode=true&characterEncoding=utf8
7 3
 #jdbc.user=root
8
-#jdbc.password=alyaly
9
-#jdbc.driverClass=com.mysql.jdbc.Driver
10
-#jdbc.jdbcUrl=jdbc:mysql://39.105.120.43:3306/thware?characterEncoding=utf8
11
-#jdbc.user=thware
12
-#jdbc.password=Lwyh:333333
4
+#jdbc.password=root
5
+
6
+#???????????????????????????????
7
+jdbc.driverClass=com.mysql.jdbc.Driver
8
+jdbc.jdbcUrl=jdbc:mysql://localhost:3306/ware?characterEncoding=utf8
9
+jdbc.user=root
10
+jdbc.password=root

+ 24
- 14
src/main/resource/mapper/maint/PriceMapper.xml Bestand weergeven

@@ -16,14 +16,19 @@
16 16
     <result column="cancel_flag" property="cancelFlag" jdbcType="VARCHAR" />
17 17
     <result column="belong_id" property="belongId" jdbcType="VARCHAR" />
18 18
 
19
+    <result column="keep_day" property="keepDay" jdbcType="INTEGER" />
20
+    <result column="ord_price" property="ordPrice" jdbcType="DOUBLE" />
21
+    <result column="out_ord_price" property="outOrdPrice" jdbcType="DOUBLE" />
22
+
19 23
       <association  column="material_id" property="material" select="com.th.demo.mapping.maint.MaterialMapper.selectByPrimaryKey" />
20 24
       <association  column="add_id" property="addUser" select="com.th.demo.mapping.system.SysUserMapper.selectByPrimaryKey" />
21 25
     <association  column="modify_id" property="modifyUser" select="com.th.demo.mapping.system.SysUserMapper.selectByPrimaryKey" />
26
+    <association  column="customer_id" property="customer" select="com.th.demo.mapping.maint.CustomerMapper.selectByPrimaryKey" />
22 27
 
23 28
   </resultMap>
24 29
   <sql id="Base_Column_List" >
25 30
     id, material_id, storage_price,transfer_price, weight_price, add_id, add_time,
26
-    modify_id, modify_time, cancel_id, cancel_time, cancel_flag, belong_id,storage_type
31
+    modify_id, modify_time, cancel_id, cancel_time, cancel_flag, belong_id,storage_type,customer_id,keep_day,ord_price,out_ord_price
27 32
   </sql>
28 33
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
29 34
     select 
@@ -45,12 +50,14 @@
45 50
       transfer_price, weight_price, add_id,
46 51
       add_time, modify_id, modify_time, 
47 52
       cancel_id, cancel_time, cancel_flag, 
48
-      belong_id,storage_type)
53
+      belong_id,storage_type,customer_id,
54
+      keep_day,ord_price,out_ord_price)
49 55
     values (#{id,jdbcType=VARCHAR}, #{material.id,jdbcType=VARCHAR}, #{storagePrice,jdbcType=DOUBLE},
50 56
       #{transferPrice,jdbcType=DOUBLE}, #{weightPrice,jdbcType=DOUBLE}, #{addUser.id,jdbcType=VARCHAR},
51 57
       #{addTime,jdbcType=TIMESTAMP}, #{modifyUser.id,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP},
52 58
       #{cancelId,jdbcType=VARCHAR}, #{cancelTime,jdbcType=TIMESTAMP}, #{cancelFlag,jdbcType=VARCHAR}, 
53
-      #{belongId,jdbcType=VARCHAR},#{storageType,jdbcType=VARCHAR})
59
+      #{belongId,jdbcType=VARCHAR},#{storageType,jdbcType=VARCHAR},#{customer.id,jdbcType=VARCHAR},
60
+      #{keepDay,jdbcType=INTEGER},#{ordPrice,jdbcType=DOUBLE},#{outOrdPrice,jdbcType=DOUBLE}  )
54 61
   </insert>
55 62
   <insert id="insertSelective" parameterType="com.th.demo.model.maint.Price" >
56 63
     insert into t_maint_price
@@ -193,33 +200,36 @@ transfer_price,
193 200
       cancel_time = #{cancelTime,jdbcType=TIMESTAMP},
194 201
       cancel_flag = #{cancelFlag,jdbcType=VARCHAR},
195 202
       belong_id =  #{belongId,jdbcType=VARCHAR},
196
-     storage_type = #{storageType,jdbcType=VARCHAR}
203
+      storage_type = #{storageType,jdbcType=VARCHAR},
204
+      customer_id = #{customer.id,jdbcType=VARCHAR},
205
+        keep_day = #{keepDay,jdbcType=INTEGER},
206
+        ord_price = #{ordPrice,jdbcType=VARCHAR},
207
+        out_ord_price = #{outOrdPrice,jdbcType=VARCHAR}
197 208
     where id = #{id,jdbcType=VARCHAR}
198 209
   </update>
199 210
 
200 211
   <select id="selectByMaterialChangeTime" resultMap="BaseResultMap" >
201 212
     select *   from t_maint_price
202
-    where material_id = #{param1,jdbcType=VARCHAR}
203
-      and storage_type = #{param2,jdbcType=VARCHAR}
204
-     and belong_id = #{param3,jdbcType=VARCHAR}
213
+    where 1=1
214
+      and customer_id = #{param1,jdbcType=VARCHAR}
215
+     and belong_id = #{param2,jdbcType=VARCHAR}
205 216
      and cancel_flag = '0'
206 217
   </select>
207 218
 
208 219
 
209 220
   <select id="select" resultMap="BaseResultMap" >
210
-    select  t.*   from t_maint_price t ,t_maint_material d
211
-    where t.material_id = d.id
212
-    and d.name like concat('%',#{param1,jdbcType=VARCHAR},'%')
213
-      and d.standard like concat('%',#{param2,jdbcType=VARCHAR},'%')
214
-     and t.belong_id=#{param3,jdbcType=VARCHAR}
221
+    select  t.*   from t_maint_price t ,t_maint_customer d
222
+    where t.customer_id = d.id
223
+      and d.name like concat('%',#{param1,jdbcType=VARCHAR},'%')
224
+      and t.belong_id = #{param2,jdbcType=VARCHAR}
215 225
       and t.cancel_flag = '0'
216 226
   </select>
217 227
 
218 228
 
219 229
   <select id="selectCntByMaterialChangeTime" resultType="java.lang.Integer" >
220 230
     select count(*)  from t_maint_price
221
-    where material_id = #{param1,jdbcType=VARCHAR}
222
-      and storage_type = #{param2,jdbcType=VARCHAR}
231
+    where 1=1
232
+     and customer_id = #{param1,jdbcType=VARCHAR}
223 233
      and belong_id = #{param3,jdbcType=VARCHAR}
224 234
      and cancel_flag = '0'
225 235
   </select>

+ 8
- 5
src/main/resource/mapper/ware/OutRecordMapper.xml Bestand weergeven

@@ -39,6 +39,7 @@
39 39
     <result column="fk_compony_name" property="fkComponyName" jdbcType="VARCHAR" />
40 40
     <result column="invoice_price" property="invoicePrice" jdbcType="DOUBLE" />
41 41
     <result column="verify_account_id" property="verifyAccountId" jdbcType="DOUBLE" />
42
+    <result column="unit_price" property="unitPrice" jdbcType="DOUBLE" />
42 43
 
43 44
     <result column="in_ware_days" property="inWareDays" jdbcType="INTEGER" />
44 45
     <result column="store_fee" property="storeFee" jdbcType="DOUBLE" />
@@ -88,6 +89,7 @@
88 89
     <result column="distribution_id" property="distributionId" jdbcType="VARCHAR" />
89 90
     <result column="in_ware_days" property="inWareDays" jdbcType="INTEGER" />
90 91
     <result column="store_fee" property="storeFee" jdbcType="DOUBLE" />
92
+    <result column="unit_price" property="unitPrice" jdbcType="DOUBLE" />
91 93
   </resultMap>
92 94
   <resultMap id="TotalResultMap" type="com.th.demo.model.ware.TotalRecord">
93 95
     <result column="total_amount" property="totalAmount" jdbcType="DOUBLE" />
@@ -96,7 +98,7 @@
96 98
   <sql id="Base_Column_List" >
97 99
     id, ware_name, stack_name, layer, material_name, material_no, standard, model, customer_name, 
98 100
     customer_no, count, weight, remark, add_id, add_time, modify_id, modify_time, cancel_id, 
99
-    cancel_time, cancel_flag, belong_id, plate_no,in_id, record_type,back_flag,receive_address,distribution_id,wgt_dcn_mtc_cd,edge_ty,production_place,verify_account_id
101
+    cancel_time, cancel_flag, belong_id, plate_no,in_id, record_type,back_flag,receive_address,distribution_id,wgt_dcn_mtc_cd,edge_ty,production_place,verify_account_id,unit_price
100 102
   </sql>
101 103
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
102 104
     select 
@@ -120,7 +122,7 @@
120 122
       modify_id, modify_time, cancel_id, 
121 123
       cancel_time, cancel_flag, belong_id, 
122 124
       plate_no,in_id, record_type,back_flag,receive_address,distribution_id
123
-    ,wgt_dcn_mtc_cd,edge_ty,production_place,tally_people,invoice_price)
125
+    ,wgt_dcn_mtc_cd,edge_ty,production_place,tally_people,invoice_price,unit_price)
124 126
     values (#{id,jdbcType=VARCHAR}, #{wareName,jdbcType=VARCHAR}, #{stackName,jdbcType=VARCHAR}, 
125 127
       #{layer,jdbcType=INTEGER}, #{materialName,jdbcType=VARCHAR}, #{materialNo,jdbcType=VARCHAR}, 
126 128
       #{standard,jdbcType=VARCHAR}, #{model,jdbcType=VARCHAR}, #{customerName,jdbcType=VARCHAR}, 
@@ -130,7 +132,7 @@
130 132
       #{cancelTime,jdbcType=TIMESTAMP}, #{cancelFlag,jdbcType=VARCHAR}, #{belongId,jdbcType=VARCHAR},
131 133
     #{plateNo,jdbcType=VARCHAR},  #{inId,jdbcType=VARCHAR}, #{recordType,jdbcType=VARCHAR},
132 134
     #{backFlag,jdbcType=VARCHAR}, #{receiveAddress,jdbcType=VARCHAR}, #{distributionId,jdbcType=VARCHAR}
133
-    ,#{wgtDcnMtcCd,jdbcType=VARCHAR},#{edgeTy,jdbcType=VARCHAR},#{productionPlace,jdbcType=VARCHAR},#{tallyPeople,jdbcType=VARCHAR},#{invoicePrice,jdbcType=DOUBLE})
135
+    ,#{wgtDcnMtcCd,jdbcType=VARCHAR},#{edgeTy,jdbcType=VARCHAR},#{productionPlace,jdbcType=VARCHAR},#{tallyPeople,jdbcType=VARCHAR},#{invoicePrice,jdbcType=DOUBLE},#{unitPrice,jdbcType=DOUBLE})
134 136
   </insert>
135 137
   <insert id="insertSelective" parameterType="com.th.demo.model.ware.OutRecord" >
136 138
     insert into t_ware_out_record
@@ -367,7 +369,8 @@
367 369
            record_type = #{recordType,jdbcType=VARCHAR},
368 370
           back_flag =  #{backFlag,jdbcType=VARCHAR},
369 371
     receive_address = #{receiveAddress,jdbcType=VARCHAR},
370
-      distribution_id =  #{distributionId,jdbcType=VARCHAR}
372
+      distribution_id =  #{distributionId,jdbcType=VARCHAR},
373
+        unit_price =  #{unitPrice,jdbcType=DOUBLE}
371 374
     where id = #{id,jdbcType=VARCHAR}
372 375
   </update>
373 376
 
@@ -379,7 +382,7 @@
379 382
 
380 383
   <update id="savePriceMod" parameterType="com.th.demo.model.ware.OutRecord" >
381 384
     update t_ware_out_record t
382
-    set t.invoice_price = #{invoicePrice,jdbcType=DOUBLE}
385
+    set t.unit_price = #{invoicePrice,jdbcType=DOUBLE}
383 386
     where id = #{id,jdbcType=VARCHAR}
384 387
   </update>
385 388
   <update id="cleanVerifyInfo" parameterType="java.lang.String" >

+ 12
- 6
src/main/resource/mapper/ware/StoreMapper.xml Bestand weergeven

@@ -32,6 +32,7 @@
32 32
     <result column="fk_compony_id" property="fkComponyId" jdbcType="VARCHAR" />
33 33
 
34 34
     <result column="invoice_price" property="invoicePrice" jdbcType="DOUBLE" />
35
+    <result column="contract_no" property="contractNo" jdbcType="VARCHAR" />
35 36
 
36 37
 
37 38
     <association  column="ware_id" property="ware" select="com.th.demo.mapping.maint.WareMapper.selectByPrimaryKey" />
@@ -56,7 +57,7 @@
56 57
   <sql id="Base_Column_List" >
57 58
     id, ware_id, stack_id, layer, material_id, model, plate_no, customer_id, count, weight,
58 59
     remark, add_id, add_time, modify_id, modify_time, cancel_id, cancel_time, cancel_flag,
59
-    belong_id, in_id, out_id, receive_address, out_flag, lock_flag,wgt_dcn_mtc_cd,edge_ty,production_place
60
+    belong_id, in_id, out_id, receive_address, out_flag, lock_flag,wgt_dcn_mtc_cd,edge_ty,production_place,contract_no
60 61
   </sql>
61 62
 
62 63
 
@@ -86,7 +87,7 @@
86 87
       belong_id, in_id, out_id,
87 88
       receive_address, out_flag, lock_flag
88 89
       ,wgt_dcn_mtc_cd,edge_ty,production_place,ord_no
89
-      ,car_no,tally_people,fk_compony_id,invoice_price
90
+      ,car_no,tally_people,fk_compony_id,invoice_price,contract_no
90 91
     )
91 92
     values (#{id,jdbcType=VARCHAR}, #{ware.id,jdbcType=VARCHAR}, #{stack.id,jdbcType=VARCHAR},
92 93
       #{layer,jdbcType=INTEGER}, #{material.id,jdbcType=VARCHAR}, #{model,jdbcType=VARCHAR},
@@ -97,7 +98,7 @@
97 98
       #{belongId,jdbcType=VARCHAR}, #{inId,jdbcType=VARCHAR}, #{outId,jdbcType=VARCHAR},
98 99
       #{receiveAddress,jdbcType=VARCHAR}, #{outFlag,jdbcType=VARCHAR}, #{lockFlag,jdbcType=VARCHAR}
99 100
       ,#{wgtDcnMtcCd,jdbcType=VARCHAR},#{edgeTy,jdbcType=VARCHAR},#{productionPlace,jdbcType=VARCHAR},#{ordNo,jdbcType=VARCHAR}
100
-     ,#{carNo,jdbcType=VARCHAR},#{tallyPeople,jdbcType=VARCHAR},#{fkComponyId,jdbcType=VARCHAR},#{invoicePrice,jdbcType=DOUBLE}
101
+     ,#{carNo,jdbcType=VARCHAR},#{tallyPeople,jdbcType=VARCHAR},#{fkComponyId,jdbcType=VARCHAR},#{invoicePrice,jdbcType=DOUBLE},#{contractNo,jdbcType=VARCHAR}
101 102
       )
102 103
   </insert>
103 104
 
@@ -324,7 +325,8 @@
324 325
       out_id = #{outId,jdbcType=VARCHAR},
325 326
       receive_address = #{receiveAddress,jdbcType=VARCHAR},
326 327
       out_flag = #{outFlag,jdbcType=VARCHAR},
327
-      lock_flag = #{lockFlag,jdbcType=VARCHAR}
328
+      lock_flag = #{lockFlag,jdbcType=VARCHAR},
329
+      contract_no = #{contractNo,jdbcType=VARCHAR}
328 330
     where id = #{id,jdbcType=VARCHAR}
329 331
   </update>
330 332
 
@@ -436,11 +438,15 @@ update t_ware_store t set t.layer =   #{param7,jdbcType=INTEGER}
436 438
     and  c.name like concat('%',#{param4,jdbcType=VARCHAR},'%')
437 439
     and  c.standard like concat('%',#{param5,jdbcType=VARCHAR},'%')
438 440
     and  d.name like concat('%',#{param6,jdbcType=VARCHAR},'%')
439
-    and t.belong_id = #{param8,jdbcType=VARCHAR}
441
+    and t.belong_id = #{param10,jdbcType=VARCHAR}
442
+    and t.plate_no like concat('%',#{param11,jdbcType=VARCHAR},'%')
440 443
     and t.cancel_flag = '0'
441 444
     and t.out_flag = '0'
445
+      <if test="param7 != null and param7 != '' and param8 != null and param8 != ''">
446
+      and t.add_time between #{param7,jdbcType=TIMESTAMP} and #{param8,jdbcType=TIMESTAMP}
447
+      </if>
442 448
     and t.ware_id in (
443
-    select m.ware_id from t_maint_userware m  where m.user_id = #{param7,jdbcType=VARCHAR}
449
+    select m.ware_id from t_maint_userware m  where m.user_id = #{param9,jdbcType=VARCHAR}
444 450
      )
445 451
     order by b.code,t.layer desc
446 452
   </select>

+ 12
- 0
出库单配车单导入模板/distribution.ureport.xml
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


BIN
出库单配车单导入模板/import.xls Bestand weergeven


+ 35
- 0
出库单配车单导入模板/out.ureport.xml
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


Laden…
Annuleren
Opslaan