YL2767 3 months ago
parent
commit
4ce0a03321

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

35
                         String carNo,
35
                         String carNo,
36
                         String tallyPeople,
36
                         String tallyPeople,
37
                         String fkComponyName,
37
                         String fkComponyName,
38
+                        String remark1,
38
                         HttpServletRequest request) {
39
                         HttpServletRequest request) {
39
 
40
 
40
         try {
41
         try {
43
             Date fromDate2 = DateTools.StrToDate(fromDate, "yyyy-MM-dd HH:mm:ss");
44
             Date fromDate2 = DateTools.StrToDate(fromDate, "yyyy-MM-dd HH:mm:ss");
44
             Date toDate2 = DateTools.StrToDate(toDate, "yyyy-MM-dd HH:mm:ss");
45
             Date toDate2 = DateTools.StrToDate(toDate, "yyyy-MM-dd HH:mm:ss");
45
             result = inRecordService.query(page, rows, wareName, stackName, model, materialName, standard, customerName,
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,remark1);
47
         } catch (Exception ex) {
48
         } catch (Exception ex) {
48
             ex.printStackTrace();
49
             ex.printStackTrace();
49
             result = JSONTools.toString(ResponseCodeMsg.CODE_EX, ex.getMessage());
50
             result = JSONTools.toString(ResponseCodeMsg.CODE_EX, ex.getMessage());
82
                         String carNo,
83
                         String carNo,
83
                         String tallyPeople,
84
                         String tallyPeople,
84
                         String fkComponyName,
85
                         String fkComponyName,
86
+                        String remark1,
85
                         HttpServletRequest request) {
87
                         HttpServletRequest request) {
86
 
88
 
87
         try {
89
         try {
90
             Date fromDate2 = DateTools.StrToDate(fromDate, "yyyy-MM-dd HH:mm:ss");
92
             Date fromDate2 = DateTools.StrToDate(fromDate, "yyyy-MM-dd HH:mm:ss");
91
             Date toDate2 = DateTools.StrToDate(toDate, "yyyy-MM-dd HH:mm:ss");
93
             Date toDate2 = DateTools.StrToDate(toDate, "yyyy-MM-dd HH:mm:ss");
92
             result = inRecordService.queryTotal(page, rows, wareName, stackName, model, materialName, standard, customerName,
94
             result = inRecordService.queryTotal(page, rows, wareName, stackName, model, materialName, standard, customerName,
93
-                    plateNo,fromDate2,toDate2 ,userId, belongId,ordNo,carNo,tallyPeople,fkComponyName);
95
+                    plateNo,fromDate2,toDate2 ,userId, belongId,ordNo,carNo,tallyPeople,fkComponyName,remark1);
96
+        } catch (Exception ex) {
97
+            ex.printStackTrace();
98
+            result = JSONTools.toString(ResponseCodeMsg.CODE_EX, ex.getMessage());
99
+        } finally {
100
+            return result;
101
+        }
102
+    }
103
+
104
+    @RequestMapping(value = "/deleterecord.do")
105
+    public String deleterecord(String json,
106
+                             HttpServletRequest request) {
107
+
108
+        try {
109
+            String userId = (String) request.getAttribute("userId");
110
+            String belongId = (String) request.getAttribute("belongId");
111
+
112
+            result = inRecordService.deleterecord(json ,userId, belongId);
94
         } catch (Exception ex) {
113
         } catch (Exception ex) {
95
             ex.printStackTrace();
114
             ex.printStackTrace();
96
             result = JSONTools.toString(ResponseCodeMsg.CODE_EX, ex.getMessage());
115
             result = JSONTools.toString(ResponseCodeMsg.CODE_EX, ex.getMessage());

+ 17
- 0
src/main/java/com/th/demo/controller/ware/OutController.java View File

70
         }
70
         }
71
     }
71
     }
72
 
72
 
73
+    @RequestMapping(value = "/changeCarNo.do", method = RequestMethod.POST)
74
+    public String changeCarNo(String distId,
75
+                       String carNo,
76
+                       HttpServletRequest request) {
77
+
78
+        try {
79
+            String userId = (String) request.getAttribute("userId");
80
+            String belongId = (String) request.getAttribute("belongId");
81
+            result = outService.changeCarNo(distId,carNo,userId,belongId);
82
+        } catch (Exception ex) {
83
+            ex.printStackTrace();
84
+            result = JSONTools.toString(ResponseCodeMsg.CODE_EX, ex.getMessage());
85
+        } finally {
86
+            return result;
87
+        }
88
+    }
89
+
73
 }
90
 }

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

11
 
11
 
12
     int insertSelective(Distribution record);
12
     int insertSelective(Distribution record);
13
 
13
 
14
-    Distribution selectByPrimaryKey(Integer id);
14
+    Distribution selectByPrimaryKey(String id);
15
 
15
 
16
     int updateByPrimaryKeySelective(Distribution record);
16
     int updateByPrimaryKeySelective(Distribution record);
17
 
17
 

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

24
     //根据条件查询全部数据
24
     //根据条件查询全部数据
25
     List<InRecord> select(String wareName, String stackName, String layer, String materialName, String standard, String customerName,
25
     List<InRecord> select(String wareName, String stackName, String layer, String materialName, String standard, String customerName,
26
                           String plateNo, Date fromDate,
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
28
+                            ,List<String> plateNos,List<String> ordNos,String remark1);
28
 
29
 
29
     int updateIn(InRecord inRecord);
30
     int updateIn(InRecord inRecord);
30
 
31
 
31
     List<TrackRecord> selectTrackRecord(String plateNo, String userId, String belongId);
32
     List<TrackRecord> selectTrackRecord(String plateNo, String userId, String belongId);
32
 
33
 
33
     List<TotalRecord> selectTotal(String wareName, String stackName, String layer, String materialName, String standard, String customerName,
34
     List<TotalRecord> selectTotal(String wareName, String stackName, String layer, String materialName, String standard, String customerName,
34
-                                  String plateNo, Date fromDate, Date toDate, String userId, String belongId, String ordNo, String carNo, String tallyPeople, String fkComponyName);
35
+                                  String plateNo, Date fromDate, Date toDate, String userId, String belongId, String ordNo,
36
+                                  String carNo, String tallyPeople, String fkComponyName,
37
+                                    List<String> plateNos,List<String> ordNos,String remark1);
35
 }
38
 }

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

55
     void updateByOutId(String id, String noUserParam, String userId, String belongId);
55
     void updateByOutId(String id, String noUserParam, String userId, String belongId);
56
 
56
 
57
     int updateFkById(Store store);
57
     int updateFkById(Store store);
58
+
59
+    int selectByInId(String id);
58
 }
60
 }

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

1
 package com.th.demo.service.impl.ware;
1
 package com.th.demo.service.impl.ware;
2
 
2
 
3
 import com.alibaba.fastjson.JSON;
3
 import com.alibaba.fastjson.JSON;
4
+import com.alibaba.fastjson.TypeReference;
4
 import com.github.pagehelper.PageHelper;
5
 import com.github.pagehelper.PageHelper;
5
 import com.github.pagehelper.PageInfo;
6
 import com.github.pagehelper.PageInfo;
6
 import com.th.demo.mapping.ware.InRecordMapper;
7
 import com.th.demo.mapping.ware.InRecordMapper;
8
+import com.th.demo.mapping.ware.StoreMapper;
7
 import com.th.demo.model.system.Type;
9
 import com.th.demo.model.system.Type;
8
 import com.th.demo.model.ware.InRecord;
10
 import com.th.demo.model.ware.InRecord;
11
+import com.th.demo.model.ware.Store;
9
 import com.th.demo.model.ware.TotalRecord;
12
 import com.th.demo.model.ware.TotalRecord;
10
 import com.th.demo.service.ware.InRecordService;
13
 import com.th.demo.service.ware.InRecordService;
11
 import com.th.demo.tools.JSONTools;
14
 import com.th.demo.tools.JSONTools;
12
 import org.springframework.beans.factory.annotation.Autowired;
15
 import org.springframework.beans.factory.annotation.Autowired;
13
 import org.springframework.stereotype.Service;
16
 import org.springframework.stereotype.Service;
14
 
17
 
18
+import java.util.ArrayList;
19
+import java.util.Arrays;
15
 import java.util.Date;
20
 import java.util.Date;
16
 import java.util.List;
21
 import java.util.List;
17
 
22
 
20
 
25
 
21
     @Autowired
26
     @Autowired
22
     public InRecordMapper inRecordMapper;
27
     public InRecordMapper inRecordMapper;
28
+    @Autowired
29
+    public StoreMapper storeMapper;
23
 
30
 
24
     String result = Type.FAIL;
31
     String result = Type.FAIL;
25
     int num = 0;
32
     int num = 0;
27
     @Override
34
     @Override
28
     public String query(int page, int rows, String wareName, String stackName, String model, String materialName, String standard, String customerName,
35
     public String query(int page, int rows, String wareName, String stackName, String model, String materialName, String standard, String customerName,
29
                         String plateNo, Date fromDate,
36
                         String plateNo, Date fromDate,
30
-                        Date toDate, String userId, String belongId, String ordNo, String carNo, String tallyPeople, String fkComponyName) {
37
+                        Date toDate, String userId, String belongId,
38
+                        String ordNo, String carNo, String tallyPeople, String fkComponyName,String remark1) {
39
+        List<String> pltNos =new ArrayList<>() ;
40
+        List<String> ordNos =new ArrayList<>() ;
41
+        if (plateNo.indexOf(",") != -1){
42
+            pltNos = Arrays.asList(plateNo.split(","));
43
+        }
44
+        if (ordNo.indexOf(",") != -1){
45
+            ordNos = Arrays.asList(ordNo.split(","));
46
+        }
47
+
31
         if(page == -1 && rows == -1){
48
         if(page == -1 && rows == -1){
32
             List<InRecord> list=inRecordMapper.select(wareName,stackName,model,materialName,standard,    customerName,
49
             List<InRecord> list=inRecordMapper.select(wareName,stackName,model,materialName,standard,    customerName,
33
-                    plateNo, fromDate,toDate , userId, belongId,ordNo,carNo,tallyPeople,fkComponyName);;
50
+                    plateNo, fromDate,toDate , userId, belongId,ordNo,carNo,tallyPeople,fkComponyName, pltNos,ordNos,remark1);
34
             result = JSONTools.toStringyyyyMMddHHmmss(list);
51
             result = JSONTools.toStringyyyyMMddHHmmss(list);
35
         }else{
52
         }else{
36
             PageHelper.startPage(page, rows);
53
             PageHelper.startPage(page, rows);
37
 
54
 
38
             List<InRecord> list=inRecordMapper.select(wareName,stackName,model,materialName,standard,    customerName,
55
             List<InRecord> list=inRecordMapper.select(wareName,stackName,model,materialName,standard,    customerName,
39
-                    plateNo, fromDate,toDate , userId, belongId, ordNo, carNo,tallyPeople,fkComponyName);
56
+                    plateNo, fromDate,toDate , userId, belongId, ordNo, carNo,tallyPeople,fkComponyName, pltNos,ordNos,remark1);
40
 
57
 
41
             PageInfo<InRecord> pageInfo = new PageInfo<>(list);
58
             PageInfo<InRecord> pageInfo = new PageInfo<>(list);
42
             result = JSONTools.toStringyyyyMMddHHmmss(pageInfo);
59
             result = JSONTools.toStringyyyyMMddHHmmss(pageInfo);
60
     }
77
     }
61
     @Override
78
     @Override
62
     public String queryTotal(int page, int rows, String wareName, String stackName, String model, String materialName, String standard, String customerName,
79
     public String queryTotal(int page, int rows, String wareName, String stackName, String model, String materialName, String standard, String customerName,
63
-                             String plateNo, Date fromDate, Date toDate, String userId, String belongId, String ordNo, String carNo, String tallyPeople, String fkComponyName) {
80
+                             String plateNo, Date fromDate, Date toDate, String userId, String belongId, String ordNo, String carNo,
81
+                             String tallyPeople, String fkComponyName,String remark1) {
82
+        List<String> pltNos =new ArrayList<>() ;
83
+        List<String> ordNos =new ArrayList<>() ;
84
+        if (plateNo.indexOf(",") != -1){
85
+            pltNos = Arrays.asList(plateNo.split(","));
86
+        }
87
+        if (ordNo.indexOf(",") != -1){
88
+            ordNos = Arrays.asList(ordNo.split(","));
89
+        }
64
         List<TotalRecord> list=inRecordMapper.selectTotal(wareName,stackName,model,materialName,standard,    customerName,
90
         List<TotalRecord> list=inRecordMapper.selectTotal(wareName,stackName,model,materialName,standard,    customerName,
65
-                plateNo,fromDate,toDate,   userId, belongId,ordNo,carNo,tallyPeople,fkComponyName);
91
+                plateNo,fromDate,toDate,   userId, belongId,ordNo,carNo,tallyPeople,fkComponyName,pltNos, ordNos, remark1);
66
         result = JSONTools.toStringyyyyMMddHHmmss(list);
92
         result = JSONTools.toStringyyyyMMddHHmmss(list);
67
         return result;
93
         return result;
68
     }
94
     }
95
+
96
+    @Override
97
+    public String deleterecord(String json, String userId, String belongId){
98
+        List<InRecord> inRecord = JSON.parseObject(json, new TypeReference<List<InRecord>>() {
99
+        });
100
+        for (int i = 0; i < inRecord.size(); i++) {
101
+            int num =storeMapper.selectByInId(inRecord.get(i).getId());
102
+            if(num == 0 ){
103
+                inRecord.get(i).setCancelFlag("1");
104
+                num = inRecordMapper.deleteByPrimaryKey(inRecord.get(i).getId());
105
+            }
106
+            result = JSONTools.toString(num);
107
+        }
108
+
109
+        return result;
110
+    }
69
 }
111
 }

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

222
         return result;
222
         return result;
223
     }
223
     }
224
 
224
 
225
+    @Override
226
+    public String changeCarNo(String distId, String carNo, String userId, String belongId){
227
+        Distribution distribution =  distributionMapper.selectByPrimaryKey(distId);
228
+        distribution.setTruckNo(carNo);
229
+        num = distributionMapper.updateByPrimaryKey(distribution);
230
+        result = Tools.moreThanZeroResultJSON(num);
231
+        return result;
232
+    }
233
+
225
     private AccountDetail getAccountDetail(Store store, Double sumWeight, Double suttle, String userId, String belongId) throws Exception {
234
     private AccountDetail getAccountDetail(Store store, Double sumWeight, Double suttle, String userId, String belongId) throws Exception {
226
         int changeTime = 0;
235
         int changeTime = 0;
227
         int changeTimeForPrice = 0;
236
         int changeTimeForPrice = 0;
313
         outRecord.setWgtDcnMtcCd(store.getWgtDcnMtcCd());
322
         outRecord.setWgtDcnMtcCd(store.getWgtDcnMtcCd());
314
         outRecord.setEdgeTy(store.getEdgeTy());
323
         outRecord.setEdgeTy(store.getEdgeTy());
315
         outRecord.setProductionPlace(store.getProductionPlace());
324
         outRecord.setProductionPlace(store.getProductionPlace());
325
+        outRecord.setRemark1(store.getRemark1());
316
         InRecord inRecord = inRecordMapper.selectByPrimaryKey(store.getInId());
326
         InRecord inRecord = inRecordMapper.selectByPrimaryKey(store.getInId());
317
         /*double asd = (outRecord.getAddTime().getDate() - inRecord.getAddTime().getTime())/ (24 * 60 * 60 * 1000);
327
         /*double asd = (outRecord.getAddTime().getDate() - inRecord.getAddTime().getTime())/ (24 * 60 * 60 * 1000);
318
         Price price = priceMapper.selectByMaterialChangeTime(store.getFkComponyId(),store.getBelongId());
328
         Price price = priceMapper.selectByMaterialChangeTime(store.getFkComponyId(),store.getBelongId());

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

5
 public interface InRecordService {
5
 public interface InRecordService {
6
     String query(int page, int rows, String wareName, String stackName, String model, String materialName, String standard, String customerName,
6
     String query(int page, int rows, String wareName, String stackName, String model, String materialName, String standard, String customerName,
7
                  String plateNo, Date fromDate,
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 remark1);
9
 
9
 
10
     String updateIn(String json, String userId, String belongId);
10
     String updateIn(String json, String userId, String belongId);
11
 
11
 
12
     String queryTotal(int page, int rows, String wareName, String stackName, String model, String materialName, String standard, String customerName,
12
     String queryTotal(int page, int rows, String wareName, String stackName, String model, String materialName, String standard, String customerName,
13
-                      String plateNo, Date fromDate, Date toDate, String userId, String belongId, String ordNo, String carNo, String tallyPeople, String fkComponyName);
13
+                      String plateNo, Date fromDate, Date toDate, String userId, String belongId, String ordNo, String carNo,
14
+                      String tallyPeople, String fkComponyName, String remark1);
15
+
16
+    String deleterecord(String json, String userId, String belongId);
14
 }
17
 }

+ 2
- 0
src/main/java/com/th/demo/service/ware/OutService.java View File

6
     String back(String json, String to, String userId, String belongId);
6
     String back(String json, String to, String userId, String belongId);
7
 
7
 
8
     String outByDistribution(String json, String userId, String belongId) throws Exception;
8
     String outByDistribution(String json, String userId, String belongId) throws Exception;
9
+
10
+    String changeCarNo(String distId, String carNo, String userId, String belongId);
9
 }
11
 }

+ 7
- 7
src/main/resource/localhost/db.properties View File

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

+ 2
- 3
src/main/resource/mapper/ware/DistributionMapper.xml View File

33
     add_id, add_time, modify_id, modify_time, cancel_id, cancel_time, cancel_flag, belong_id,delivery_company
33
     add_id, add_time, modify_id, modify_time, cancel_id, cancel_time, cancel_flag, belong_id,delivery_company
34
   </sql>
34
   </sql>
35
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
35
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
36
-    select 
37
-    <include refid="Base_Column_List" />
36
+    select *
38
     from t_ware_distribution
37
     from t_ware_distribution
39
-    where id = #{id,jdbcType=INTEGER}
38
+    where id = #{id,jdbcType=VARCHAR}
40
   </select>
39
   </select>
41
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
40
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
42
     delete from t_ware_distribution
41
     delete from t_ware_distribution

+ 27
- 7
src/main/resource/mapper/ware/InRecordMapper.xml View File

53
     where id = #{id,jdbcType=VARCHAR}
53
     where id = #{id,jdbcType=VARCHAR}
54
   </select>
54
   </select>
55
   <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
55
   <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
56
-    delete from t_ware_in_record
56
+    update t_ware_in_record set cancel_flag = '1'
57
     where id = #{id,jdbcType=VARCHAR}
57
     where id = #{id,jdbcType=VARCHAR}
58
   </delete>
58
   </delete>
59
   <insert id="insert" parameterType="com.th.demo.model.ware.InRecord" >
59
   <insert id="insert" parameterType="com.th.demo.model.ware.InRecord" >
70
       modify_id, modify_time, cancel_id, 
70
       modify_id, modify_time, cancel_id, 
71
       cancel_time, cancel_flag, belong_id, 
71
       cancel_time, cancel_flag, belong_id, 
72
       plate_no,record_type,receive_address
72
       plate_no,record_type,receive_address
73
-    ,wgt_dcn_mtc_cd,edge_ty,production_place,car_no,ord_no,tally_people,fk_compony_name,reamrk1)
73
+    ,wgt_dcn_mtc_cd,edge_ty,production_place,car_no,ord_no,tally_people,fk_compony_name,remark1)
74
     values (#{id,jdbcType=VARCHAR}, #{wareName,jdbcType=VARCHAR}, #{stackName,jdbcType=VARCHAR}, 
74
     values (#{id,jdbcType=VARCHAR}, #{wareName,jdbcType=VARCHAR}, #{stackName,jdbcType=VARCHAR}, 
75
       #{layer,jdbcType=INTEGER}, #{materialName,jdbcType=VARCHAR}, #{materialNo,jdbcType=VARCHAR}, 
75
       #{layer,jdbcType=INTEGER}, #{materialName,jdbcType=VARCHAR}, #{materialNo,jdbcType=VARCHAR}, 
76
       #{standard,jdbcType=VARCHAR}, #{model,jdbcType=VARCHAR}, #{customerName,jdbcType=VARCHAR}, 
76
       #{standard,jdbcType=VARCHAR}, #{model,jdbcType=VARCHAR}, #{customerName,jdbcType=VARCHAR}, 
80
       #{cancelTime,jdbcType=TIMESTAMP}, #{cancelFlag,jdbcType=VARCHAR}, #{belongId,jdbcType=VARCHAR},
80
       #{cancelTime,jdbcType=TIMESTAMP}, #{cancelFlag,jdbcType=VARCHAR}, #{belongId,jdbcType=VARCHAR},
81
     #{plateNo,jdbcType=VARCHAR},#{recordType,jdbcType=VARCHAR}, #{receiveAddress,jdbcType=VARCHAR}
81
     #{plateNo,jdbcType=VARCHAR},#{recordType,jdbcType=VARCHAR}, #{receiveAddress,jdbcType=VARCHAR}
82
     ,#{wgtDcnMtcCd,jdbcType=VARCHAR},#{edgeTy,jdbcType=VARCHAR},#{productionPlace,jdbcType=VARCHAR},#{carNo,jdbcType=VARCHAR}
82
     ,#{wgtDcnMtcCd,jdbcType=VARCHAR},#{edgeTy,jdbcType=VARCHAR},#{productionPlace,jdbcType=VARCHAR},#{carNo,jdbcType=VARCHAR}
83
-    ,#{ordNo,jdbcType=VARCHAR},#{tallyPeople,jdbcType=VARCHAR},#{fkComponyName,jdbcType=VARCHAR},#{remark1,jdbcType=VARCHAR}
83
+    ,#{ordNo,jdbcType=VARCHAR},#{tallyPeople,jdbcType=VARCHAR},#{fkComponyName,jdbcType=VARCHAR},#{remark1,jdbcType=VARCHAR})
84
   </insert>
84
   </insert>
85
   <insert id="insertSelective" parameterType="com.th.demo.model.ware.InRecord" >
85
   <insert id="insertSelective" parameterType="com.th.demo.model.ware.InRecord" >
86
     insert into t_ware_in_record
86
     insert into t_ware_in_record
334
       and t.customer_name  = #{param6,jdbcType=VARCHAR}
334
       and t.customer_name  = #{param6,jdbcType=VARCHAR}
335
     </if>
335
     </if>
336
 
336
 
337
-      and t.plate_no like concat('%',#{param7,jdbcType=VARCHAR},'%')
337
+      and (t.plate_no like concat('%',#{param7,jdbcType=VARCHAR},'%')
338
+            <if test="param16 != null and param16.size() !=0" >
339
+            OR t.plate_no IN <foreach  item="item" collection="param16" index="index"  open="(" separator="," close=")">
340
+            #{item,jdbcType=VARCHAR}  </foreach>
341
+            </if>
342
+          )
338
       and t.add_time between #{param8,jdbcType=TIMESTAMP} and #{param9,jdbcType=TIMESTAMP}
343
       and t.add_time between #{param8,jdbcType=TIMESTAMP} and #{param9,jdbcType=TIMESTAMP}
339
     and t.cancel_flag = '0'
344
     and t.cancel_flag = '0'
340
-    and ifnull(t.ord_no,'*') like concat('%',#{param12,jdbcType=VARCHAR},'%')
345
+    and (ifnull(t.ord_no,'*') like concat('%',#{param12,jdbcType=VARCHAR},'%')
346
+    <if test="param17 != null and param17.size() !=0" >
347
+      OR ifnull(t.ord_no,'*') IN <foreach  item="item" collection="param17" index="index"  open="(" separator="," close=")">
348
+      #{item,jdbcType=VARCHAR}  </foreach>
349
+    </if>)
341
     and ifnull(t.car_no,'*') like concat('%',#{param13,jdbcType=VARCHAR},'%')
350
     and ifnull(t.car_no,'*') like concat('%',#{param13,jdbcType=VARCHAR},'%')
342
     and ((t.belong_id=#{param11,jdbcType=VARCHAR} and  t.ware_name in (
351
     and ((t.belong_id=#{param11,jdbcType=VARCHAR} and  t.ware_name in (
343
             select b.name from t_maint_userware a ,t_maint_ware b  where a.ware_id = b.id
352
             select b.name from t_maint_userware a ,t_maint_ware b  where a.ware_id = b.id
345
             )  or t.customer_name like CONCAT((select attr3 from sys_user temp where temp.id=#{param10,jdbcType=VARCHAR}),'%') )
354
             )  or t.customer_name like CONCAT((select attr3 from sys_user temp where temp.id=#{param10,jdbcType=VARCHAR}),'%') )
346
     and ifnull(t.tally_people,'*') like concat('%',#{param14,jdbcType=VARCHAR},'%')
355
     and ifnull(t.tally_people,'*') like concat('%',#{param14,jdbcType=VARCHAR},'%')
347
     and ifnull(a.name,'*') like concat('%',#{param15,jdbcType=VARCHAR},'%')
356
     and ifnull(a.name,'*') like concat('%',#{param15,jdbcType=VARCHAR},'%')
357
+    AND ifnull(t.remark1,'*') like concat('%',#{param18,jdbcType=VARCHAR},'%')
348
     order by t.add_time desc
358
     order by t.add_time desc
349
   </select>
359
   </select>
350
 
360
 
362
     <if test="param6 != null and param6 != ''" >
372
     <if test="param6 != null and param6 != ''" >
363
       and t.customer_name = #{param6,jdbcType=VARCHAR}
373
       and t.customer_name = #{param6,jdbcType=VARCHAR}
364
     </if>
374
     </if>
365
-    and t.plate_no like concat('%',#{param7,jdbcType=VARCHAR},'%')
375
+    and (t.plate_no like concat('%',#{param7,jdbcType=VARCHAR},'%')
376
+    <if test="param16 != null and param16.size() !=0" >
377
+      OR t.plate_no IN <foreach  item="item" collection="param16" index="index"  open="(" separator="," close=")">
378
+      #{item,jdbcType=VARCHAR}  </foreach>
379
+    </if>
380
+    )
366
     and t.add_time between #{param8,jdbcType=TIMESTAMP} and #{param9,jdbcType=TIMESTAMP}
381
     and t.add_time between #{param8,jdbcType=TIMESTAMP} and #{param9,jdbcType=TIMESTAMP}
367
     and t.cancel_flag = '0'
382
     and t.cancel_flag = '0'
368
-    and ifnull(t.ord_no,'*') like concat('%',#{param12,jdbcType=VARCHAR},'%')
383
+    and (ifnull(t.ord_no,'*') like concat('%',#{param12,jdbcType=VARCHAR},'%')
384
+    <if test="param17 != null and param17.size() !=0" >
385
+      OR ifnull(t.ord_no,'*') IN <foreach  item="item" collection="param17" index="index"  open="(" separator="," close=")">
386
+      #{item,jdbcType=VARCHAR}  </foreach>
387
+    </if>)
369
     and ifnull(t.car_no,'*') like concat('%',#{param13,jdbcType=VARCHAR},'%')
388
     and ifnull(t.car_no,'*') like concat('%',#{param13,jdbcType=VARCHAR},'%')
370
     and ((t.belong_id=#{param11,jdbcType=VARCHAR} and t.ware_name in (
389
     and ((t.belong_id=#{param11,jdbcType=VARCHAR} and t.ware_name in (
371
             select b.name from t_maint_userware a ,t_maint_ware b  where a.ware_id = b.id
390
             select b.name from t_maint_userware a ,t_maint_ware b  where a.ware_id = b.id
373
             )  or t.customer_name like CONCAT((select attr3 from sys_user temp where temp.id=#{param10,jdbcType=VARCHAR}),'%') )
392
             )  or t.customer_name like CONCAT((select attr3 from sys_user temp where temp.id=#{param10,jdbcType=VARCHAR}),'%') )
374
     and ifnull(t.tally_people,'*') like concat('%',#{param14,jdbcType=VARCHAR},'%')
393
     and ifnull(t.tally_people,'*') like concat('%',#{param14,jdbcType=VARCHAR},'%')
375
     and ifnull(a.name,'*') like concat('%',#{param15,jdbcType=VARCHAR},'%')
394
     and ifnull(a.name,'*') like concat('%',#{param15,jdbcType=VARCHAR},'%')
395
+    AND ifnull(t.remark1,'*') like concat('%',#{param18,jdbcType=VARCHAR},'%')
376
     order by t.add_time desc
396
     order by t.add_time desc
377
   </select>
397
   </select>
378
 
398
 

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

558
     update  t_ware_store t set t.fk_compony_id = #{fkComponyId,jdbcType=VARCHAR}
558
     update  t_ware_store t set t.fk_compony_id = #{fkComponyId,jdbcType=VARCHAR}
559
     where t.id = #{id,jdbcType=VARCHAR}
559
     where t.id = #{id,jdbcType=VARCHAR}
560
   </update>
560
   </update>
561
+
562
+  <select id="selectByInId" resultType="java.lang.Integer" parameterType="java.lang.String">
563
+    select COUNT(*)
564
+    from t_ware_store t
565
+    where t.cancel_flag = '0'
566
+      and t.in_id = #{param1,jdbcType=VARCHAR};
567
+
568
+  </select>
561
 </mapper>
569
 </mapper>

+ 0
- 12
出库单配车单导入模板/distribution.ureport.xml
File diff suppressed because it is too large
View File


+ 3
- 3
出库单配车单导入模板/out.ureport.xml
File diff suppressed because it is too large
View File


Loading…
Cancel
Save