浏览代码

查询条件

LiuCheng 3 个月前
父节点
当前提交
56bf623e99

+ 4
- 0
src/main/java/com/th/demo/controller/ware/StoreController.java 查看文件

102
                               String plateNo,
102
                               String plateNo,
103
                               String fromDate,
103
                               String fromDate,
104
                               String toDate,
104
                               String toDate,
105
+                              String fkcustmerName,
106
+                              String ordNo,
105
                               HttpServletRequest request) {
107
                               HttpServletRequest request) {
106
 
108
 
107
         try {
109
         try {
117
                     plateNo,
119
                     plateNo,
118
                     fromDate,
120
                     fromDate,
119
                     toDate,
121
                     toDate,
122
+                    fkcustmerName,
123
+                    ordNo,
120
                     userId,
124
                     userId,
121
                     belongId);
125
                     belongId);
122
         } catch (Exception ex) {
126
         } catch (Exception ex) {

+ 3
- 1
src/main/java/com/th/demo/mapping/ware/StoreMapper.java 查看文件

31
 
31
 
32
     Store selectByOutId(String id,String noUserParam,String userId, String belongId);
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 fromDate,   String toDate, String userId,String belongId,String plateNo);
34
+    List<Store> selectStore(String wareName, String stackName, String model, String materialName, String standard,
35
+                            String customerName, String fromDate,   String toDate, String userId,
36
+                            String belongId,String plateNo,String fkcustmerName,String ordNo);
35
 
37
 
36
     int updateForUpDownByLayer(String wareName, String stackName, String userId, String belongId, int min, int max, int i);
38
     int updateForUpDownByLayer(String wareName, String stackName, String userId, String belongId, int min, int max, int i);
37
 
39
 

+ 1
- 0
src/main/java/com/th/demo/service/impl/ware/InServiceImpl.java 查看文件

436
         inRecord.setOrdNo(store.getOrdNo());
436
         inRecord.setOrdNo(store.getOrdNo());
437
         inRecord.setCarNo(store.getCarNo());
437
         inRecord.setCarNo(store.getCarNo());
438
         inRecord.setTallyPeople(store.getTallyPeople());
438
         inRecord.setTallyPeople(store.getTallyPeople());
439
+        inRecord.setContractNo(store.getContractNo());
439
 
440
 
440
         return inRecord;
441
         return inRecord;
441
     }
442
     }

+ 1
- 1
src/main/java/com/th/demo/service/impl/ware/OutServiceImpl.java 查看文件

310
             outRecord.setInvoicePrice(price.getOrdPrice());
310
             outRecord.setInvoicePrice(price.getOrdPrice());
311
             outRecord.setUnitPrice(price.getOrdPrice());
311
             outRecord.setUnitPrice(price.getOrdPrice());
312
         }
312
         }
313
-
313
+        outRecord.setContractNo(store.getContractNo());
314
 
314
 
315
 
315
 
316
         return outRecord;
316
         return outRecord;

+ 15
- 4
src/main/java/com/th/demo/service/impl/ware/StoreServiceImpl.java 查看文件

82
                              String plateNo,
82
                              String plateNo,
83
                              String fromDate,
83
                              String fromDate,
84
                              String toDate,
84
                              String toDate,
85
+                             String fkcustmerName,
86
+                             String ordNo,
85
                              String userId,
87
                              String userId,
86
                              String belongId) {
88
                              String belongId) {
87
-        PageHelper.startPage(page, rows);
88
-        List<Store> list=storeMapper.selectStore(wareName,stackName,model,materialName,standard,    customerName,fromDate, toDate,  userId,belongId, plateNo);
89
-        PageInfo<Store> pageInfo = new PageInfo<>(list);
90
-        result = JSONTools.toStringyyyyMMddHHmmss(pageInfo);
89
+        if(page == -1 && rows == -1){
90
+            List<Store> list=storeMapper.selectStore(wareName,stackName,model,materialName,standard,
91
+                    customerName,fromDate, toDate,  userId,belongId, plateNo,fkcustmerName,ordNo);
92
+            result = JSONTools.toStringyyyyMMddHHmmss(list);
93
+        }else {
94
+            PageHelper.startPage(page, rows);
95
+
96
+            List<Store> list=storeMapper.selectStore(wareName,stackName,model,materialName,standard,
97
+                    customerName,fromDate, toDate,  userId,belongId, plateNo,fkcustmerName,ordNo);
98
+            PageInfo<Store> pageInfo = new PageInfo<>(list);
99
+            result = JSONTools.toStringyyyyMMddHHmmss(pageInfo);
100
+        }
101
+
91
         return result;
102
         return result;
92
     }
103
     }
93
 
104
 

+ 4
- 1
src/main/java/com/th/demo/service/ware/StoreService.java 查看文件

11
     
11
     
12
     String modify(String json, String userId, String belongId);
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 plateNo,String fromDate,  String toDate, String userId,String belongId);
14
+    String queryStore(int page,int rows,String wareName,String stackName,String model,String materialName,
15
+                      String standard, String customerName, String plateNo,String fromDate,
16
+                      String toDate, String fkcustmerName,String ordNo,
17
+                      String userId,String belongId);
15
 
18
 
16
     String modifyCustomer(String id,String customerNameOld,String customerNameNew);
19
     String modifyCustomer(String id,String customerNameOld,String customerNameNew);
17
 
20
 

+ 2
- 2
src/main/resource/localhost/db.properties 查看文件

1
-#????????
1
+????????
2
 #jdbc.driverClass=com.mysql.jdbc.Driver
2
 #jdbc.driverClass=com.mysql.jdbc.Driver
3
 #jdbc.jdbcUrl=jdbc:mysql://172.18.200.32:3306/ware?useUnicode=true&characterEncoding=utf8
3
 #jdbc.jdbcUrl=jdbc:mysql://172.18.200.32:3306/ware?useUnicode=true&characterEncoding=utf8
4
 #jdbc.user=root
4
 #jdbc.user=root
9
 #jdbc.user=root
9
 #jdbc.user=root
10
 #jdbc.password=root
10
 #jdbc.password=root
11
 
11
 
12
-#60?????
12
+##60?????
13
 jdbc.driverClass=com.mysql.jdbc.Driver
13
 jdbc.driverClass=com.mysql.jdbc.Driver
14
 jdbc.jdbcUrl=jdbc:mysql://60.205.9.174:3309/ware?useUnicode=true&characterEncoding=utf8
14
 jdbc.jdbcUrl=jdbc:mysql://60.205.9.174:3309/ware?useUnicode=true&characterEncoding=utf8
15
 jdbc.user=root
15
 jdbc.user=root

+ 4
- 1
src/main/resource/mapper/ware/StoreMapper.xml 查看文件

427
 
427
 
428
 
428
 
429
   <select id="selectStore" resultMap="BaseResultMap" >
429
   <select id="selectStore" resultMap="BaseResultMap" >
430
-    select t.* from t_ware_store t, t_maint_ware a, t_maint_stack b, t_maint_material c,t_maint_customer d
430
+    select e.name as fk_compony_id,t.* from t_ware_store t, t_maint_ware a, t_maint_stack b, t_maint_material c,t_maint_customer d,t_maint_customer e
431
     where t.ware_id = a.id
431
     where t.ware_id = a.id
432
     and t.stack_id = b.id
432
     and t.stack_id = b.id
433
     and t.material_id  = c.id
433
     and t.material_id  = c.id
434
     and t.customer_id = d.id
434
     and t.customer_id = d.id
435
+    and t.fk_compony_id = e.id
435
     and  a.name like concat('%',#{param1,jdbcType=VARCHAR},'%')
436
     and  a.name like concat('%',#{param1,jdbcType=VARCHAR},'%')
436
     and  b.name like concat('%',#{param2,jdbcType=VARCHAR},'%')
437
     and  b.name like concat('%',#{param2,jdbcType=VARCHAR},'%')
437
     and  t.model like concat('%',#{param3,jdbcType=VARCHAR},'%')
438
     and  t.model like concat('%',#{param3,jdbcType=VARCHAR},'%')
440
     and  d.name like concat('%',#{param6,jdbcType=VARCHAR},'%')
441
     and  d.name like concat('%',#{param6,jdbcType=VARCHAR},'%')
441
     and t.belong_id = #{param10,jdbcType=VARCHAR}
442
     and t.belong_id = #{param10,jdbcType=VARCHAR}
442
     and t.plate_no like concat('%',#{param11,jdbcType=VARCHAR},'%')
443
     and t.plate_no like concat('%',#{param11,jdbcType=VARCHAR},'%')
444
+    and e.name like concat('%',#{param12,jdbcType=VARCHAR},'%')
445
+    and t.ord_no like concat('%',#{param13,jdbcType=VARCHAR},'%')
443
     and t.cancel_flag = '0'
446
     and t.cancel_flag = '0'
444
     and t.out_flag = '0'
447
     and t.out_flag = '0'
445
       <if test="param7 != null and param7 != '' and param8 != null and param8 != ''">
448
       <if test="param7 != null and param7 != '' and param8 != null and param8 != ''">

正在加载...
取消
保存