Browse Source

Merge remote-tracking branch 'master/master'

张庆宇 9 months ago
parent
commit
c9cd14858a

+ 2
- 1
src/main/java/com/th/demo/controller/ware/InRecordController.java View File

@@ -35,6 +35,7 @@ public class InRecordController {
35 35
                         String carNo,
36 36
                         String tallyPeople,
37 37
                         String fkComponyName,
38
+                        String contractNo,
38 39
                         HttpServletRequest request) {
39 40
 
40 41
         try {
@@ -43,7 +44,7 @@ public class InRecordController {
43 44
             Date fromDate2 = DateTools.StrToDate(fromDate, "yyyy-MM-dd HH:mm:ss");
44 45
             Date toDate2 = DateTools.StrToDate(toDate, "yyyy-MM-dd HH:mm:ss");
45 46
             result = inRecordService.query(page, rows, wareName, stackName, model, materialName, standard, customerName,
46
-                    plateNo,fromDate2,toDate2,userId, belongId,ordNo,carNo,tallyPeople,fkComponyName);
47
+                    plateNo,fromDate2,toDate2,userId, belongId,ordNo,carNo,tallyPeople,fkComponyName,contractNo);
47 48
         } catch (Exception ex) {
48 49
             ex.printStackTrace();
49 50
             result = JSONTools.toString(ResponseCodeMsg.CODE_EX, ex.getMessage());

+ 2
- 1
src/main/java/com/th/demo/controller/ware/OutRecordController.java View File

@@ -33,6 +33,7 @@ public class OutRecordController {
33 33
                            String tallyPeople,
34 34
                            String ordNo,
35 35
                            String fkComponyName,
36
+                           String contractNo,
36 37
                            HttpServletRequest request) {
37 38
 
38 39
         try {
@@ -42,7 +43,7 @@ public class OutRecordController {
42 43
             Date toDate = DateTools.StrToDate(pToDate, "yyyy-MM-dd HH:mm:ss");
43 44
 
44 45
             result = outRecordService.query(page, rows, wareName, stackName, model, materialName, standard, customerName,
45
-                    plateNo,fromDate,toDate, userId, belongId,carNo,tallyPeople,ordNo,fkComponyName);
46
+                    plateNo,fromDate,toDate, userId, belongId,carNo,tallyPeople,ordNo,fkComponyName,contractNo);
46 47
         } catch (Exception ex) {
47 48
             ex.printStackTrace();
48 49
             result = JSONTools.toString(ResponseCodeMsg.CODE_EX, ex.getMessage());

+ 2
- 0
src/main/java/com/th/demo/controller/ware/StoreController.java View File

@@ -104,6 +104,7 @@ public class StoreController {
104 104
                               String toDate,
105 105
                               String fkcustmerName,
106 106
                               String ordNo,
107
+                              String contractNo,
107 108
                               HttpServletRequest request) {
108 109
 
109 110
         try {
@@ -121,6 +122,7 @@ public class StoreController {
121 122
                     toDate,
122 123
                     fkcustmerName,
123 124
                     ordNo,
125
+                    contractNo,
124 126
                     userId,
125 127
                     belongId);
126 128
         } catch (Exception ex) {

+ 1
- 1
src/main/java/com/th/demo/mapping/ware/InRecordMapper.java View File

@@ -24,7 +24,7 @@ public interface InRecordMapper {
24 24
     //根据条件查询全部数据
25 25
     List<InRecord> select(String wareName, String stackName, String layer, String materialName, String standard, String customerName,
26 26
                           String plateNo, Date fromDate,
27
-                          Date toDate, String userId, String belongId, String ordNo, String carNo, String tallyPeople, String fkComponyName);
27
+                          Date toDate, String userId, String belongId, String ordNo, String carNo, String tallyPeople, String fkComponyName,String contractNo);
28 28
 
29 29
     int updateIn(InRecord inRecord);
30 30
 

+ 2
- 1
src/main/java/com/th/demo/mapping/ware/OutRecordMapper.java View File

@@ -22,7 +22,8 @@ public interface OutRecordMapper {
22 22
     List<OutRecord>  select(String wareName, String stackName, String layer, String materialName, String standard, String customerName,
23 23
                             String plateNo, Date fromDate, Date toDate, String userId, String belongId, String carNo, String tallyPeople, String ordNo, String fkComponyName);
24 24
     List<OutRecord>  selectExpt(String wareName, String stackName, String layer, String materialName, String standard, String customerName,
25
-                            String plateNo, Date fromDate, Date toDate, String userId, String belongId, String carNo, String tallyPeople, String ordNo, String fkComponyName);
25
+                            String plateNo, Date fromDate, Date toDate, String userId, String belongId, String carNo, String tallyPeople,
26
+                            String ordNo, String fkComponyName,String contractNo);
26 27
     List<TotalRecord>  selectTotal(String wareName, String stackName, String layer, String materialName, String standard, String customerName,
27 28
                                    String plateNo, Date fromDate, Date toDate, String userId, String belongId, String carNo, String tallyPeople, String ordNo, String fkComponyName);
28 29
 

+ 2
- 1
src/main/java/com/th/demo/mapping/ware/StoreMapper.java View File

@@ -33,7 +33,8 @@ public interface StoreMapper {
33 33
 
34 34
     List<Store> selectStore(String wareName, String stackName, String model, String materialName, String standard,
35 35
                             String customerName, String fromDate,   String toDate, String userId,
36
-                            String belongId,String plateNo,String fkcustmerName,String ordNo,List<String> plateNos);
36
+                            String belongId,String plateNo,String fkcustmerName,String ordNo,List<String> plateNos,
37
+                            String contractNo);
37 38
 
38 39
     int updateForUpDownByLayer(String wareName, String stackName, String userId, String belongId, int min, int max, int i);
39 40
 

+ 15
- 4
src/main/java/com/th/demo/service/impl/ware/DistributionServiceImpl.java View File

@@ -39,6 +39,7 @@ public class DistributionServiceImpl implements DistributionService {
39 39
     String result = Type.FAIL;
40 40
     int num = 0;
41 41
 
42
+
42 43
     @Override
43 44
     public String queryWaitTrucks(String userId, String belongId) {
44 45
 
@@ -79,14 +80,24 @@ public class DistributionServiceImpl implements DistributionService {
79 80
         });
80 81
         List<Store> list = JSON.parseObject(jsonList, new TypeReference<List<Store>>() {
81 82
         });
82
-        if (distribution.getListDetail().size() == list.size()) {
83
-            distribution.setOutFlag("2");
84
-            num += distributionMapper.updateByPrimaryKey(distribution);
85
-        }
83
+
84
+        int detailnum = 0;
85
+        double detailwgt = 0;
86
+
86 87
         for (int i = 0; i < list.size(); i++) {
87 88
             list.get(i).setLockFlag("0");
89
+            detailnum += list.get(i).getCount();
90
+            detailwgt += list.get(i).getWeight();
88 91
             num += storeMapper.updateByPrimaryKey(list.get(i));
89 92
         }
93
+        if (distribution.getListDetail().size() == list.size()) {
94
+            distribution.setOutFlag("2");
95
+            num += distributionMapper.updateByPrimaryKey(distribution);
96
+        }else {
97
+            distribution.setSumCount(distribution.getSumCount() - detailnum);
98
+            distribution.setSumWeight(distribution.getSumWeight() - detailwgt);
99
+            num += distributionMapper.updateByPrimaryKey(distribution);
100
+        }
90 101
         for (int i = 0; i < distribution.getListDetail().size(); i++) {
91 102
             for (int j = 0; j < list.size(); j++) {
92 103
                 if (distribution.getListDetail().get(i).getStore().getId().equals(list.get(j).getId())) {

+ 3
- 3
src/main/java/com/th/demo/service/impl/ware/InRecordServiceImpl.java View File

@@ -27,16 +27,16 @@ public class InRecordServiceImpl implements InRecordService {
27 27
     @Override
28 28
     public String query(int page, int rows, String wareName, String stackName, String model, String materialName, String standard, String customerName,
29 29
                         String plateNo, Date fromDate,
30
-                        Date toDate, String userId, String belongId, String ordNo, String carNo, String tallyPeople, String fkComponyName) {
30
+                        Date toDate, String userId, String belongId, String ordNo, String carNo, String tallyPeople, String fkComponyName,String contractNo) {
31 31
         if(page == -1 && rows == -1){
32 32
             List<InRecord> list=inRecordMapper.select(wareName,stackName,model,materialName,standard,    customerName,
33
-                    plateNo, fromDate,toDate , userId, belongId,ordNo,carNo,tallyPeople,fkComponyName);;
33
+                    plateNo, fromDate,toDate , userId, belongId,ordNo,carNo,tallyPeople,fkComponyName,contractNo);;
34 34
             result = JSONTools.toStringyyyyMMddHHmmss(list);
35 35
         }else{
36 36
             PageHelper.startPage(page, rows);
37 37
 
38 38
             List<InRecord> list=inRecordMapper.select(wareName,stackName,model,materialName,standard,    customerName,
39
-                    plateNo, fromDate,toDate , userId, belongId, ordNo, carNo,tallyPeople,fkComponyName);
39
+                    plateNo, fromDate,toDate , userId, belongId, ordNo, carNo,tallyPeople,fkComponyName,contractNo);
40 40
 
41 41
             PageInfo<InRecord> pageInfo = new PageInfo<>(list);
42 42
             result = JSONTools.toStringyyyyMMddHHmmss(pageInfo);

+ 4
- 3
src/main/java/com/th/demo/service/impl/ware/OutRecordServiceImpl.java View File

@@ -38,15 +38,16 @@ public class OutRecordServiceImpl implements OutRecordService {
38 38
     int num = 0;
39 39
 
40 40
     public String query(int page, int rows, String wareName, String stackName, String model, String materialName, String standard, String customerName,
41
-                        String plateNo, Date fromDate, Date toDate, String userId, String belongId, String carNo, String tallyPeople, String ordNo, String fkComponyName) {
41
+                        String plateNo, Date fromDate, Date toDate, String userId, String belongId, String carNo, String tallyPeople, String ordNo, String fkComponyName,
42
+                        String contractNo) {
42 43
         if(page == -1 && rows == -1){
43 44
             List<OutRecord> list=outRecordMapper.selectExpt(wareName,stackName,model,materialName,standard,  customerName,
44
-                    plateNo, fromDate,  toDate,   userId, belongId,carNo, tallyPeople,ordNo,fkComponyName);
45
+                    plateNo, fromDate,  toDate,   userId, belongId,carNo, tallyPeople,ordNo,fkComponyName,contractNo);
45 46
             result = JSONTools.toStringyyyyMMddHHmmss(list);
46 47
         }else{
47 48
             PageHelper.startPage(page, rows);
48 49
             List<OutRecord> list=outRecordMapper.selectExpt(wareName,stackName,model,materialName,standard,  customerName,
49
-                    plateNo, fromDate,  toDate,   userId, belongId,carNo,tallyPeople,ordNo,fkComponyName);
50
+                    plateNo, fromDate,  toDate,   userId, belongId,carNo,tallyPeople,ordNo,fkComponyName,contractNo);
50 51
             PageInfo<OutRecord> pageInfo = new PageInfo<>(list);
51 52
 //        result = JSONTools.toString(pageInfo);
52 53
             result = JSONTools.toStringyyyyMMddHHmmss(pageInfo);

+ 3
- 0
src/main/java/com/th/demo/service/impl/ware/OutServiceImpl.java View File

@@ -145,6 +145,9 @@ public class OutServiceImpl implements OutService {
145 145
         Distribution distribution = JSON.parseObject(json, new TypeReference<Distribution>() {
146 146
         });
147 147
         distribution.setOutFlag("1");
148
+        if(distribution.getTransportName().equals("")||distribution.getTransportName() == null){
149
+            result = JSONTools.toString(ResponseCodeMsg.CODE_EX, "承运单位不可为空!");
150
+        }
148 151
         num += distributionMapper.updateByPrimaryKey(distribution);
149 152
         List<String> listStoreId = new ArrayList<String>();
150 153
         for (int i = 0; i < distribution.getListDetail().size(); i++) {

+ 3
- 3
src/main/java/com/th/demo/service/impl/ware/StoreServiceImpl.java View File

@@ -85,7 +85,7 @@ public class StoreServiceImpl implements StoreService {
85 85
                              String toDate,
86 86
                              String fkcustmerName,
87 87
                              String ordNo,
88
-
88
+                             String contractNo,
89 89
                              String userId,
90 90
                              String belongId) {
91 91
 
@@ -97,13 +97,13 @@ public class StoreServiceImpl implements StoreService {
97 97
 
98 98
         if(page == -1 && rows == -1){
99 99
             List<Store> list=storeMapper.selectStore(wareName,stackName,model,materialName,standard,
100
-                    customerName,fromDate, toDate,  userId,belongId, plateNo,fkcustmerName,ordNo,pltNos);
100
+                    customerName,fromDate, toDate,  userId,belongId, plateNo,fkcustmerName,ordNo,pltNos,contractNo);
101 101
             result = JSONTools.toStringyyyyMMddHHmmss(list);
102 102
         }else {
103 103
             PageHelper.startPage(page, rows);
104 104
 
105 105
             List<Store> list=storeMapper.selectStore(wareName,stackName,model,materialName,standard,
106
-                    customerName,fromDate, toDate,  userId,belongId, plateNo,fkcustmerName,ordNo,pltNos);
106
+                    customerName,fromDate, toDate,  userId,belongId, plateNo,fkcustmerName,ordNo,pltNos,contractNo);
107 107
             PageInfo<Store> pageInfo = new PageInfo<>(list);
108 108
             result = JSONTools.toStringyyyyMMddHHmmss(pageInfo);
109 109
         }

+ 1
- 1
src/main/java/com/th/demo/service/ware/InRecordService.java View File

@@ -5,7 +5,7 @@ import java.util.Date;
5 5
 public interface InRecordService {
6 6
     String query(int page, int rows, String wareName, String stackName, String model, String materialName, String standard, String customerName,
7 7
                  String plateNo, Date fromDate,
8
-                 Date toDate, String userId, String belongId, String ordNo, String carNo, String tallyPeople, String fkComponyName);
8
+                 Date toDate, String userId, String belongId, String ordNo, String carNo, String tallyPeople, String fkComponyName,String contractNo);
9 9
 
10 10
     String updateIn(String json, String userId, String belongId);
11 11
 

+ 2
- 1
src/main/java/com/th/demo/service/ware/OutRecordService.java View File

@@ -5,7 +5,8 @@ import java.util.Date;
5 5
 public interface OutRecordService {
6 6
 
7 7
     String query(int page, int rows, String wareName, String stackName, String model, String materialName, String standard, String customerName,
8
-                 String plateNo, Date fromDate, Date toDate, String userId, String belongId, String carNo, String tallyPeople, String ordNo, String fkComponyName);
8
+                 String plateNo, Date fromDate, Date toDate, String userId, String belongId, String carNo, String tallyPeople, String ordNo, String fkComponyName,
9
+                 String contractNo);
9 10
     String queryTotal(int page, int rows, String wareName, String stackName, String model, String materialName, String standard, String customerName,
10 11
                       String plateNo, Date fromDate, Date toDate, String userId, String belongId, String carNo, String tallyPeople, String ordNo, String fkComponyName);
11 12
 

+ 1
- 1
src/main/java/com/th/demo/service/ware/StoreService.java View File

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

+ 1
- 0
src/main/resource/mapper/ware/InRecordMapper.xml View File

@@ -338,6 +338,7 @@
338 338
       and t.add_time between #{param8,jdbcType=TIMESTAMP} and #{param9,jdbcType=TIMESTAMP}
339 339
     and t.cancel_flag = '0'
340 340
     and ifnull(t.ord_no,'*') like concat('%',#{param12,jdbcType=VARCHAR},'%')
341
+    and ifnull(t.contract_no,'*') like concat('%',#{param16,jdbcType=VARCHAR},'%')
341 342
     and ifnull(t.car_no,'*') like concat('%',#{param13,jdbcType=VARCHAR},'%')
342 343
     and ((t.belong_id=#{param11,jdbcType=VARCHAR} and  t.ware_name in (
343 344
             select b.name from t_maint_userware a ,t_maint_ware b  where a.ware_id = b.id

+ 1
- 0
src/main/resource/mapper/ware/OutRecordMapper.xml View File

@@ -488,6 +488,7 @@
488 488
     )  or t.customer_name like CONCAT((select attr3 from sys_user temp where temp.id=#{param10,jdbcType=VARCHAR}),'%') )
489 489
     and ifnull(p.tally_people,'*') like concat('%',#{param13,jdbcType=VARCHAR},'%')
490 490
     and ifnull(c.ord_no,'*') like concat('%',#{param14,jdbcType=VARCHAR},'%')
491
+    and ifnull(t.contract_no,'*') like concat('%',#{param16,jdbcType=VARCHAR},'%')
491 492
     and ifnull(e.name,'*') like concat('%',#{param15,jdbcType=VARCHAR},'%')
492 493
     and ifnull(t.back_flag,0) &lt;> '1'
493 494
     order by t.add_time desc

+ 1
- 0
src/main/resource/mapper/ware/StoreMapper.xml View File

@@ -450,6 +450,7 @@ update t_ware_store t set t.layer =   #{param7,jdbcType=INTEGER}
450 450
         )
451 451
     and e.name like concat('%',#{param12,jdbcType=VARCHAR},'%')
452 452
     and t.ord_no like concat('%',#{param13,jdbcType=VARCHAR},'%')
453
+    and ifnull(t.contract_no,'*') like concat('%',#{param15,jdbcType=VARCHAR},'%')
453 454
     and t.cancel_flag = '0'
454 455
     and t.out_flag = '0'
455 456
       <if test="param7 != null and param7 != '' and param8 != null and param8 != ''">

Loading…
Cancel
Save