Pārlūkot izejas kodu

5月5日系统修改完成 1.0

Zhangqy 1 mēnesi atpakaļ
vecāks
revīzija
9c8274a121

+ 2
- 0
src/main/java/com/th/demo/mapping/ware/StoreMapper.java Parādīt failu

51
     int selEffStore(String plateNo);
51
     int selEffStore(String plateNo);
52
 
52
 
53
     void updateByOutId(String id, String noUserParam, String userId, String belongId);
53
     void updateByOutId(String id, String noUserParam, String userId, String belongId);
54
+
55
+    int updateFKByPKey(Store store);
54
 }
56
 }

+ 19
- 0
src/main/java/com/th/demo/model/ware/ChangeRecord.java Parādīt failu

67
 
67
 
68
     private String productionPlace;
68
     private String productionPlace;
69
 
69
 
70
+    private String fkCustomerNameOld;
71
+    private String fkCustomerNameNew;
72
+
70
     public String getId() {
73
     public String getId() {
71
         return id;
74
         return id;
72
     }
75
     }
314
     public void setProductionPlace(String productionPlace) {
317
     public void setProductionPlace(String productionPlace) {
315
         this.productionPlace = productionPlace;
318
         this.productionPlace = productionPlace;
316
     }
319
     }
320
+
321
+    public String getFkCustomerNameOld() {
322
+        return fkCustomerNameOld;
323
+    }
324
+
325
+    public void setFkCustomerNameOld(String fkCustomerNameOld) {
326
+        this.fkCustomerNameOld = fkCustomerNameOld;
327
+    }
328
+
329
+    public String getFkCustomerNameNew() {
330
+        return fkCustomerNameNew;
331
+    }
332
+
333
+    public void setFkCustomerNameNew(String fkCustomerNameNew) {
334
+        this.fkCustomerNameNew = fkCustomerNameNew;
335
+    }
317
 }
336
 }

+ 28
- 0
src/main/java/com/th/demo/model/ware/InRecord.java Parādīt failu

62
 
62
 
63
     private String fkComponyName;
63
     private String fkComponyName;
64
 
64
 
65
+    private String contractNo;
66
+    private String packNo;
67
+    private String outFlag;
68
+
65
     public String getFkComponyName() {
69
     public String getFkComponyName() {
66
         return fkComponyName;
70
         return fkComponyName;
67
     }
71
     }
322
     public void setReceiveAddress(String receiveAddress) {
326
     public void setReceiveAddress(String receiveAddress) {
323
         this.receiveAddress = receiveAddress == null ? null : receiveAddress.trim();
327
         this.receiveAddress = receiveAddress == null ? null : receiveAddress.trim();
324
     }
328
     }
329
+
330
+    public String getContractNo() {
331
+        return contractNo;
332
+    }
333
+
334
+    public void setContractNo(String contractNo) {
335
+        this.contractNo = contractNo;
336
+    }
337
+
338
+    public String getPackNo() {
339
+        return packNo;
340
+    }
341
+
342
+    public void setPackNo(String packNo) {
343
+        this.packNo = packNo;
344
+    }
345
+
346
+    public String getOutFlag() {
347
+        return outFlag;
348
+    }
349
+
350
+    public void setOutFlag(String outFlag) {
351
+        this.outFlag = outFlag;
352
+    }
325
 }
353
 }

+ 9
- 0
src/main/java/com/th/demo/model/ware/Store.java Parādīt failu

90
     private String attrib08;
90
     private String attrib08;
91
     private String attrib09;
91
     private String attrib09;
92
     private String attrib10;
92
     private String attrib10;
93
+    private double changeCount; // 合约号
93
 
94
 
94
     private String fkCustomerName;
95
     private String fkCustomerName;
95
 
96
 
567
         this.payWay = payWay;
568
         this.payWay = payWay;
568
     }
569
     }
569
 
570
 
571
+    public double getChangeCount() {
572
+        return changeCount;
573
+    }
574
+
575
+    public void setChangeCount(double changeCount) {
576
+        this.changeCount = changeCount;
577
+    }
578
+
570
     @Override
579
     @Override
571
     public int compareTo(Store o) {
580
     public int compareTo(Store o) {
572
         if (this.layer > o.getLayer()) {
581
         if (this.layer > o.getLayer()) {

+ 15
- 12
src/main/java/com/th/demo/service/impl/ware/ChangeServiceImpl.java Parādīt failu

3
 import com.alibaba.fastjson.JSON;
3
 import com.alibaba.fastjson.JSON;
4
 import com.alibaba.fastjson.TypeReference;
4
 import com.alibaba.fastjson.TypeReference;
5
 import com.th.demo.mapping.finance.AccountDetailMapper;
5
 import com.th.demo.mapping.finance.AccountDetailMapper;
6
+import com.th.demo.mapping.maint.CustomerMapper;
6
 import com.th.demo.mapping.maint.PriceMapper;
7
 import com.th.demo.mapping.maint.PriceMapper;
7
 import com.th.demo.mapping.maint.StackMapper;
8
 import com.th.demo.mapping.maint.StackMapper;
8
 import com.th.demo.mapping.ware.ChangeRecordMapper;
9
 import com.th.demo.mapping.ware.ChangeRecordMapper;
38
     public PriceMapper priceMapper;
39
     public PriceMapper priceMapper;
39
     @Autowired
40
     @Autowired
40
     public StoreMapper storeMapper;
41
     public StoreMapper storeMapper;
42
+    @Autowired
43
+    public CustomerMapper customerMapper;
41
 
44
 
42
     int num = 0;
45
     int num = 0;
43
     String result = Type.FAIL;
46
     String result = Type.FAIL;
48
     public String changeCustomer(String json, String customer,String address,String userId, String belongId) throws Exception{
51
     public String changeCustomer(String json, String customer,String address,String userId, String belongId) throws Exception{
49
         List<Store> list = JSON.parseObject(json, new TypeReference<List<Store>>() {
52
         List<Store> list = JSON.parseObject(json, new TypeReference<List<Store>>() {
50
         });
53
         });
51
-        Customer c = JSON.parseObject(customer, new TypeReference<Customer>() {
54
+        Customer c1 = JSON.parseObject(customer, new TypeReference<Customer>() {
52
         });
55
         });
56
+        Customer c = customerMapper.selectByPrimaryKey(c1.getId());
53
         String recordType = "";
57
         String recordType = "";
54
         for (int i = 0; i < list.size(); i++) {
58
         for (int i = 0; i < list.size(); i++) {
55
             if(list.get(i).getCustomer().getName().equals(c.getName())){
59
             if(list.get(i).getCustomer().getName().equals(c.getName())){
59
                 AccountDetail accountDetail = getAccountDetail(list.get(i),  userId, belongId);
63
                 AccountDetail accountDetail = getAccountDetail(list.get(i),  userId, belongId);
60
                 num += accountDetailMapper.insert(accountDetail);
64
                 num += accountDetailMapper.insert(accountDetail);
61
             }
65
             }
62
-            ChangeRecord changeRecord = getChangeRecord(recordType, list.get(i), c, address, userId, belongId);
66
+            Customer customer1 = customerMapper.selectByPrimaryKey(list.get(i).getFkComponyId());
67
+            ChangeRecord changeRecord = getChangeRecord(recordType, list.get(i), c, customer1, address, userId, belongId);
63
             num += changeRecordMapper.insert(changeRecord);
68
             num += changeRecordMapper.insert(changeRecord);
64
 
69
 
65
 
70
 
71
+            list.get(i).setFkComponyId(list.get(i).getCustomer().getId());
66
             list.get(i).setCustomer(c);
72
             list.get(i).setCustomer(c);
67
             list.get(i).setReceiveAddress(address);
73
             list.get(i).setReceiveAddress(address);
68
-            num += storeMapper.updateByPrimaryKey(list.get(i));
74
+            list.get(i).setChangeCount(list.get(i).getChangeCount()+1);
75
+            num += storeMapper.updateFKByPKey(list.get(i));
69
         }
76
         }
70
         return Tools.moreThanZeroResultJSON(num);
77
         return Tools.moreThanZeroResultJSON(num);
71
     }
78
     }
72
 
79
 
73
-    private ChangeRecord getChangeRecord(String recordType, Store store, Customer customer, String receiveAddress, String userId, String belongId) {
80
+    private ChangeRecord getChangeRecord(String recordType, Store store, Customer customer, Customer customer1, String receiveAddress, String userId, String belongId) {
74
 
81
 
75
         ChangeRecord record = new ChangeRecord();
82
         ChangeRecord record = new ChangeRecord();
76
         record.setRecordType(recordType);
83
         record.setRecordType(recordType);
86
             record.setCustomerNameNew(customer.getName());
93
             record.setCustomerNameNew(customer.getName());
87
         }
94
         }
88
         record.setCustomerNameOld(store.getCustomer().getName());
95
         record.setCustomerNameOld(store.getCustomer().getName());
96
+
97
+        record.setFkCustomerNameNew(store.getCustomer().getName());
98
+        record.setFkCustomerNameOld(customer1.getName());
99
+
89
         record.setCount(store.getCount());
100
         record.setCount(store.getCount());
90
         record.setWeight(store.getWeight());
101
         record.setWeight(store.getWeight());
91
         record.setRemark(store.getRemark());
102
         record.setRemark(store.getRemark());
115
             changeTime = list.size();
126
             changeTime = list.size();
116
             changeTimeForPrice = 1;
127
             changeTimeForPrice = 1;
117
         }
128
         }
118
-       /* Price price = priceMapper.selectByMaterialChangeTime(store.getMaterial().getId(), changeTimeForPrice, belongId);
119
-        if (price == null) {
120
-            throw new Exception(store.getMaterial().getName() + "," + store.getMaterial().getStandard() + "没有对应价格信息");
121
-        }*/
122
         AccountDetail accountDetail = new AccountDetail();
129
         AccountDetail accountDetail = new AccountDetail();
123
         accountDetail.setChangeTime(changeTime);
130
         accountDetail.setChangeTime(changeTime);
124
         accountDetail.setRecordType("货权转移");
131
         accountDetail.setRecordType("货权转移");
138
         accountDetail.setAddTime(new Date());
145
         accountDetail.setAddTime(new Date());
139
         accountDetail.setCancelFlag("0");
146
         accountDetail.setCancelFlag("0");
140
         accountDetail.setBelongId(belongId);
147
         accountDetail.setBelongId(belongId);
141
-
142
-        //storagePrice = price.getStoragePrice() * store.getWeight();
143
-
144
-        //accountDetail.setStorageUnitPrice(price.getStoragePrice());
145
         accountDetail.setStoragePrice(storagePrice);
148
         accountDetail.setStoragePrice(storagePrice);
146
 
149
 
147
         //accountDetail.setWeightUnitPrice(price.getWeightPrice());
150
         //accountDetail.setWeightUnitPrice(price.getWeightPrice());

+ 11
- 1
src/main/java/com/th/demo/service/impl/ware/InServiceImpl.java Parādīt failu

168
                     //listStore.get(i).setOutId(outRecord.getId());
168
                     //listStore.get(i).setOutId(outRecord.getId());
169
                     listStore.get(i).setCancelFlag("1");
169
                     listStore.get(i).setCancelFlag("1");
170
                     num += storeMapper.updateByPrimaryKey(listStore.get(i));
170
                     num += storeMapper.updateByPrimaryKey(listStore.get(i));
171
+                    num += inRecordMapper.deleteByPrimaryKey(listStore.get(i).getInId());
172
+
171
                 }
173
                 }
172
                 result = Tools.moreThanZeroResultJSON(num);
174
                 result = Tools.moreThanZeroResultJSON(num);
173
             }
175
             }
476
         inRecord.setAddUser(new SysUser(userId));
478
         inRecord.setAddUser(new SysUser(userId));
477
         inRecord.setAddTime(new Date());
479
         inRecord.setAddTime(new Date());
478
         inRecord.setRecordType(recordType);
480
         inRecord.setRecordType(recordType);
479
-        inRecord.setCancelFlag("0");
481
+        if (recordType.equals("0")){
482
+            inRecord.setCancelFlag("9");
483
+        }else {
484
+            inRecord.setCancelFlag("0");
485
+        }
486
+        inRecord.setOutFlag("0");
487
+        inRecord.setPackNo(store.getPackNo());
488
+        inRecord.setContractNo(store.getContractNo());
489
+
480
         inRecord.setReceiveAddress(store.getReceiveAddress());
490
         inRecord.setReceiveAddress(store.getReceiveAddress());
481
 
491
 
482
         inRecord.setWgtDcnMtcCd(store.getWgtDcnMtcCd());
492
         inRecord.setWgtDcnMtcCd(store.getWgtDcnMtcCd());

+ 9
- 3
src/main/resource/mapper/ware/ChangeRecordMapper.xml Parādīt failu

12
     <result column="model" property="model" jdbcType="VARCHAR" />
12
     <result column="model" property="model" jdbcType="VARCHAR" />
13
     <result column="customer_name_old" property="customerNameOld" jdbcType="VARCHAR" />
13
     <result column="customer_name_old" property="customerNameOld" jdbcType="VARCHAR" />
14
     <result column="customer_name_new" property="customerNameNew" jdbcType="VARCHAR" />
14
     <result column="customer_name_new" property="customerNameNew" jdbcType="VARCHAR" />
15
+
16
+    <result column="fk_customer_name_old" property="fkCustomerNameOld" jdbcType="VARCHAR" />
17
+    <result column="fk_customer_name_new" property="fkCustomerNameNew" jdbcType="VARCHAR" />
18
+
15
     <result column="record_type" property="recordType" jdbcType="VARCHAR" />
19
     <result column="record_type" property="recordType" jdbcType="VARCHAR" />
16
     <result column="count" property="count" jdbcType="DOUBLE" />
20
     <result column="count" property="count" jdbcType="DOUBLE" />
17
     <result column="weight" property="weight" jdbcType="DOUBLE" />
21
     <result column="weight" property="weight" jdbcType="DOUBLE" />
47
     id, ware_name, stack_name, layer, material_name, material_no, standard, model, customer_name_old, 
51
     id, ware_name, stack_name, layer, material_name, material_no, standard, model, customer_name_old, 
48
     customer_name_new, record_type, count, weight, remark, add_id, add_time, modify_id, 
52
     customer_name_new, record_type, count, weight, remark, add_id, add_time, modify_id, 
49
     modify_time, cancel_id, cancel_time, cancel_flag, belong_id, plate_no, in_id, out_id, 
53
     modify_time, cancel_id, cancel_time, cancel_flag, belong_id, plate_no, in_id, out_id, 
50
-    receive_address_old, receive_address_new,wgt_dcn_mtc_cd,edge_ty,production_place
54
+    receive_address_old, receive_address_new,wgt_dcn_mtc_cd,edge_ty,production_place,fk_customer_name_new,fk_customer_name_old
51
   </sql>
55
   </sql>
52
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
56
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
53
     select 
57
     select 
74
       cancel_id, cancel_time, cancel_flag, 
78
       cancel_id, cancel_time, cancel_flag, 
75
       belong_id, plate_no, in_id, 
79
       belong_id, plate_no, in_id, 
76
       out_id, receive_address_old, receive_address_new
80
       out_id, receive_address_old, receive_address_new
77
-    ,wgt_dcn_mtc_cd,edge_ty,production_place
81
+    ,wgt_dcn_mtc_cd,edge_ty,production_place,
82
+    fk_customer_name_old,fk_customer_name_new
78
       )
83
       )
79
     values (#{id,jdbcType=VARCHAR}, #{wareName,jdbcType=VARCHAR}, #{stackName,jdbcType=VARCHAR}, 
84
     values (#{id,jdbcType=VARCHAR}, #{wareName,jdbcType=VARCHAR}, #{stackName,jdbcType=VARCHAR}, 
80
       #{layer,jdbcType=INTEGER}, #{materialName,jdbcType=VARCHAR}, #{materialNo,jdbcType=VARCHAR}, 
85
       #{layer,jdbcType=INTEGER}, #{materialName,jdbcType=VARCHAR}, #{materialNo,jdbcType=VARCHAR}, 
85
       #{cancelId,jdbcType=VARCHAR}, #{cancelTime,jdbcType=TIMESTAMP}, #{cancelFlag,jdbcType=VARCHAR}, 
90
       #{cancelId,jdbcType=VARCHAR}, #{cancelTime,jdbcType=TIMESTAMP}, #{cancelFlag,jdbcType=VARCHAR}, 
86
       #{belongId,jdbcType=VARCHAR}, #{plateNo,jdbcType=VARCHAR}, #{inId,jdbcType=VARCHAR}, 
91
       #{belongId,jdbcType=VARCHAR}, #{plateNo,jdbcType=VARCHAR}, #{inId,jdbcType=VARCHAR}, 
87
       #{outId,jdbcType=VARCHAR}, #{receiveAddressOld,jdbcType=VARCHAR}, #{receiveAddressNew,jdbcType=VARCHAR}
92
       #{outId,jdbcType=VARCHAR}, #{receiveAddressOld,jdbcType=VARCHAR}, #{receiveAddressNew,jdbcType=VARCHAR}
88
-    ,#{wgtDcnMtcCd,jdbcType=VARCHAR},#{edgeTy,jdbcType=VARCHAR},#{productionPlace,jdbcType=VARCHAR}
93
+    ,#{wgtDcnMtcCd,jdbcType=VARCHAR},#{edgeTy,jdbcType=VARCHAR},#{productionPlace,jdbcType=VARCHAR},
94
+        #{fkCustomerNameOld,jdbcType=VARCHAR},#{fkCustomerNameNew,jdbcType=VARCHAR}
89
       )
95
       )
90
   </insert>
96
   </insert>
91
   <insert id="insertSelective" parameterType="com.th.demo.model.ware.ChangeRecord" >
97
   <insert id="insertSelective" parameterType="com.th.demo.model.ware.ChangeRecord" >

+ 17
- 7
src/main/resource/mapper/ware/InRecordMapper.xml Parādīt failu

33
     <result column="ord_no" property="ordNo" jdbcType="VARCHAR" />
33
     <result column="ord_no" property="ordNo" jdbcType="VARCHAR" />
34
     <result column="tally_people" property="tallyPeople" jdbcType="VARCHAR" />
34
     <result column="tally_people" property="tallyPeople" jdbcType="VARCHAR" />
35
     <result column="fk_compony_name" property="fkComponyName" jdbcType="VARCHAR" />
35
     <result column="fk_compony_name" property="fkComponyName" jdbcType="VARCHAR" />
36
+
37
+    <result column="contract_no" property="contractNo" jdbcType="VARCHAR" />
38
+    <result column="pack_no" property="packNo" jdbcType="VARCHAR" />
39
+    <result column="out_flag" property="outFlag" jdbcType="VARCHAR" />
40
+
36
     <association  column="add_id" property="addUser" select="com.th.demo.mapping.system.SysUserMapper.selectByPrimaryKey" />
41
     <association  column="add_id" property="addUser" select="com.th.demo.mapping.system.SysUserMapper.selectByPrimaryKey" />
37
 
42
 
38
   </resultMap>
43
   </resultMap>
43
   <sql id="Base_Column_List" >
48
   <sql id="Base_Column_List" >
44
     id, ware_name, stack_name, layer, material_name, material_no, standard, model, customer_name, 
49
     id, ware_name, stack_name, layer, material_name, material_no, standard, model, customer_name, 
45
     customer_no, count, weight, remark, add_id, add_time, modify_id, modify_time, cancel_id, 
50
     customer_no, count, weight, remark, add_id, add_time, modify_id, modify_time, cancel_id, 
46
-    cancel_time, cancel_flag, belong_id, plate_no,record_type,receive_address ,wgt_dcn_mtc_cd,edge_ty,production_place
51
+    cancel_time, cancel_flag, belong_id, plate_no,record_type,receive_address ,wgt_dcn_mtc_cd,edge_ty,production_place,contract_no,pack_no,out_flag
47
   </sql>
52
   </sql>
48
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
53
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
49
     select 
54
     select 
51
     from t_ware_in_record
56
     from t_ware_in_record
52
     where id = #{id,jdbcType=VARCHAR}
57
     where id = #{id,jdbcType=VARCHAR}
53
   </select>
58
   </select>
54
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
55
-    delete from t_ware_in_record
59
+  <update id="deleteByPrimaryKey" parameterType="java.lang.String" >
60
+    update t_ware_in_record set cancel_flag = '9'
56
     where id = #{id,jdbcType=VARCHAR}
61
     where id = #{id,jdbcType=VARCHAR}
57
-  </delete>
62
+  </update>
58
   <insert id="insert" parameterType="com.th.demo.model.ware.InRecord" >
63
   <insert id="insert" parameterType="com.th.demo.model.ware.InRecord" >
59
 
64
 
60
     <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.String">
65
     <selectKey keyProperty="id" order="BEFORE" resultType="java.lang.String">
69
       modify_id, modify_time, cancel_id, 
74
       modify_id, modify_time, cancel_id, 
70
       cancel_time, cancel_flag, belong_id, 
75
       cancel_time, cancel_flag, belong_id, 
71
       plate_no,record_type,receive_address
76
       plate_no,record_type,receive_address
72
-    ,wgt_dcn_mtc_cd,edge_ty,production_place,car_no,ord_no,tally_people,fk_compony_name)
77
+    ,wgt_dcn_mtc_cd,edge_ty,production_place,car_no,ord_no,tally_people,fk_compony_name
78
+    ,contract_no,pack_no,out_flag)
73
     values (#{id,jdbcType=VARCHAR}, #{wareName,jdbcType=VARCHAR}, #{stackName,jdbcType=VARCHAR}, 
79
     values (#{id,jdbcType=VARCHAR}, #{wareName,jdbcType=VARCHAR}, #{stackName,jdbcType=VARCHAR}, 
74
       #{layer,jdbcType=INTEGER}, #{materialName,jdbcType=VARCHAR}, #{materialNo,jdbcType=VARCHAR}, 
80
       #{layer,jdbcType=INTEGER}, #{materialName,jdbcType=VARCHAR}, #{materialNo,jdbcType=VARCHAR}, 
75
       #{standard,jdbcType=VARCHAR}, #{model,jdbcType=VARCHAR}, #{customerName,jdbcType=VARCHAR}, 
81
       #{standard,jdbcType=VARCHAR}, #{model,jdbcType=VARCHAR}, #{customerName,jdbcType=VARCHAR}, 
79
       #{cancelTime,jdbcType=TIMESTAMP}, #{cancelFlag,jdbcType=VARCHAR}, #{belongId,jdbcType=VARCHAR},
85
       #{cancelTime,jdbcType=TIMESTAMP}, #{cancelFlag,jdbcType=VARCHAR}, #{belongId,jdbcType=VARCHAR},
80
     #{plateNo,jdbcType=VARCHAR},#{recordType,jdbcType=VARCHAR}, #{receiveAddress,jdbcType=VARCHAR}
86
     #{plateNo,jdbcType=VARCHAR},#{recordType,jdbcType=VARCHAR}, #{receiveAddress,jdbcType=VARCHAR}
81
     ,#{wgtDcnMtcCd,jdbcType=VARCHAR},#{edgeTy,jdbcType=VARCHAR},#{productionPlace,jdbcType=VARCHAR},#{carNo,jdbcType=VARCHAR}
87
     ,#{wgtDcnMtcCd,jdbcType=VARCHAR},#{edgeTy,jdbcType=VARCHAR},#{productionPlace,jdbcType=VARCHAR},#{carNo,jdbcType=VARCHAR}
82
-    ,#{ordNo,jdbcType=VARCHAR},#{tallyPeople,jdbcType=VARCHAR},#{fkComponyName,jdbcType=VARCHAR})
88
+    ,#{ordNo,jdbcType=VARCHAR},#{tallyPeople,jdbcType=VARCHAR},#{fkComponyName,jdbcType=VARCHAR}
89
+    ,#{contractNo,jdbcType=VARCHAR},#{packNo,jdbcType=VARCHAR},#{outFlag,jdbcType=VARCHAR})
83
   </insert>
90
   </insert>
84
   <insert id="insertSelective" parameterType="com.th.demo.model.ware.InRecord" >
91
   <insert id="insertSelective" parameterType="com.th.demo.model.ware.InRecord" >
85
     insert into t_ware_in_record
92
     insert into t_ware_in_record
313
       belong_id = #{belongId,jdbcType=VARCHAR},
320
       belong_id = #{belongId,jdbcType=VARCHAR},
314
       plate_no = #{plateNo,jdbcType=VARCHAR},
321
       plate_no = #{plateNo,jdbcType=VARCHAR},
315
          record_type = #{recordType,jdbcType=VARCHAR},
322
          record_type = #{recordType,jdbcType=VARCHAR},
316
-    receive_address = #{receiveAddress,jdbcType=VARCHAR}
323
+    receive_address = #{receiveAddress,jdbcType=VARCHAR},
324
+        contract_no= #{contractNo,jdbcType=VARCHAR},
325
+        pack_no= #{packNo,jdbcType=VARCHAR},
326
+        out_flag= #{outFlag,jdbcType=VARCHAR}
317
     where id = #{id,jdbcType=VARCHAR}
327
     where id = #{id,jdbcType=VARCHAR}
318
   </update>
328
   </update>
319
 
329
 

+ 11
- 0
src/main/resource/mapper/ware/StoreMapper.xml Parādīt failu

53
     <result column="inware_day" property="inwareDay" jdbcType="DOUBLE" />
53
     <result column="inware_day" property="inwareDay" jdbcType="DOUBLE" />
54
     <result column="pay_way" property="payWay" jdbcType="VARCHAR" />
54
     <result column="pay_way" property="payWay" jdbcType="VARCHAR" />
55
 
55
 
56
+    <result column="change_count" property="changeCount" jdbcType="DOUBLE" />
57
+
56
 
58
 
57
     <association  column="ware_id" property="ware" select="com.th.demo.mapping.maint.WareMapper.selectByPrimaryKey" />
59
     <association  column="ware_id" property="ware" select="com.th.demo.mapping.maint.WareMapper.selectByPrimaryKey" />
58
     <association  column="stack_id" property="stack" select="com.th.demo.mapping.maint.StackMapper.selectByPrimaryKey" />
60
     <association  column="stack_id" property="stack" select="com.th.demo.mapping.maint.StackMapper.selectByPrimaryKey" />
373
     where id = #{id,jdbcType=VARCHAR}
375
     where id = #{id,jdbcType=VARCHAR}
374
   </update>
376
   </update>
375
 
377
 
378
+  <update id="updateFKByPKey" parameterType="com.th.demo.model.ware.Store" >
379
+    update t_ware_store
380
+    set customer_id = #{customer.id,jdbcType=VARCHAR},
381
+        fk_compony_id = #{fkComponyId,jdbcType=VARCHAR},
382
+        change_count = #{changeCount,jdbcType=DOUBLE}
383
+    where id = #{id,jdbcType=VARCHAR}
384
+  </update>
385
+
376
 
386
 
377
 
387
 
378
   <select id="selectLayerByStackId" resultType="java.lang.String" >
388
   <select id="selectLayerByStackId" resultType="java.lang.String" >
575
       select count(*)
585
       select count(*)
576
       from t_ware_store t
586
       from t_ware_store t
577
       where t.cancel_flag = '0'
587
       where t.cancel_flag = '0'
588
+      and t.out_flag = '0'
578
       and t.plate_no = #{param1,jdbcType=VARCHAR};
589
       and t.plate_no = #{param1,jdbcType=VARCHAR};
579
 
590
 
580
   </select>
591
   </select>

Notiek ielāde…
Atcelt
Saglabāt