浏览代码

5月4日系统修改完成 1.0

Zhangqy 1 个月前
父节点
当前提交
a2fd68eaf1

+ 86
- 0
src/main/java/com/th/demo/controller/maint/OrdTractController.java 查看文件

@@ -0,0 +1,86 @@
1
+package com.th.demo.controller.maint;
2
+
3
+import com.th.demo.model.maint.OrdTract;
4
+import com.th.demo.model.system.ResponseCodeMsg;
5
+import com.th.demo.model.system.Type;
6
+import com.th.demo.service.maint.OrdTractService;
7
+import com.th.demo.tools.JSONTools;
8
+import org.springframework.beans.factory.annotation.Autowired;
9
+import org.springframework.web.bind.annotation.RequestMapping;
10
+import org.springframework.web.bind.annotation.RestController;
11
+
12
+import javax.servlet.http.HttpServletRequest;
13
+
14
+@RestController
15
+@RequestMapping(value = "/MaintOrdTract")
16
+public class OrdTractController {
17
+    @Autowired
18
+    public OrdTractService ordTractService;
19
+    String result = Type.FAIL;
20
+
21
+    @RequestMapping(value = "/query.do")//查询方法 前两个参数是分页参数
22
+    public String query(int page,
23
+                        int rows,
24
+                        String customerName,
25
+                        HttpServletRequest request) {
26
+
27
+        try {
28
+            String userId = (String) request.getAttribute("userId");
29
+            String belongId = (String) request.getAttribute("belongId");
30
+            result = ordTractService.query(page, rows,customerName, userId,belongId);
31
+        } catch (Exception ex) {
32
+            ex.printStackTrace();
33
+            result = JSONTools.toString(ResponseCodeMsg.CODE_EX, ex.getMessage());
34
+        } finally {
35
+            return result;
36
+        }
37
+    }
38
+
39
+    @RequestMapping(value = "/save.do")//查询方法 前两个参数是分页参数
40
+    public String save(String json,
41
+                       HttpServletRequest request) {
42
+
43
+        try {
44
+            String userId = (String) request.getAttribute("userId");
45
+            String belongId = (String) request.getAttribute("belongId");
46
+            result = ordTractService.save(json, userId,belongId);
47
+        } catch (Exception ex) {
48
+            ex.printStackTrace();
49
+            result = JSONTools.toString(ResponseCodeMsg.CODE_EX, ex.getMessage());
50
+        } finally {
51
+            return result;
52
+        }
53
+    }
54
+
55
+    @RequestMapping(value = "/inImport.do")//查询方法 前两个参数是分页参数
56
+    public String inImport(String json,
57
+                       HttpServletRequest request) {
58
+
59
+        try {
60
+            String userId = (String) request.getAttribute("userId");
61
+            String belongId = (String) request.getAttribute("belongId");
62
+            result = ordTractService.inImport(json, userId,belongId);
63
+        } catch (Exception ex) {
64
+            ex.printStackTrace();
65
+            result = JSONTools.toString(ResponseCodeMsg.CODE_EX, ex.getMessage());
66
+        } finally {
67
+            return result;
68
+        }
69
+    }
70
+
71
+    @RequestMapping(value = "/remove.do")//查询方法 前两个参数是分页参数
72
+    public String remove(String ordNo,
73
+                         HttpServletRequest request) {
74
+
75
+        try {
76
+            String userId = (String) request.getAttribute("userId");
77
+            String belongId = (String) request.getAttribute("belongId");
78
+            result = ordTractService.remove(ordNo, userId,belongId);
79
+        } catch (Exception ex) {
80
+            ex.printStackTrace();
81
+            result = JSONTools.toString(ResponseCodeMsg.CODE_EX, ex.getMessage());
82
+        } finally {
83
+            return result;
84
+        }
85
+    }
86
+}

+ 17
- 0
src/main/java/com/th/demo/mapping/maint/OrdTractMapper.java 查看文件

@@ -0,0 +1,17 @@
1
+package com.th.demo.mapping.maint;
2
+
3
+import com.th.demo.model.maint.Material;
4
+import com.th.demo.model.maint.OrdTract;
5
+
6
+import java.util.List;
7
+
8
+public interface OrdTractMapper {
9
+    int insert(OrdTract ordTract);
10
+    int delete(OrdTract ordTract);
11
+    int update(OrdTract ordTract);
12
+
13
+    List<OrdTract> select(String ordNo, String belongId);
14
+
15
+    List<OrdTract> selectByOrdNo(String ordNo, String belongId);
16
+
17
+}

+ 49
- 0
src/main/java/com/th/demo/model/maint/OrdTract.java 查看文件

@@ -0,0 +1,49 @@
1
+package com.th.demo.model.maint;
2
+
3
+public class OrdTract {
4
+    public String contractNo;
5
+    public String ordNo;
6
+    public String payWay;
7
+    public String remark;
8
+    public String cancelFlag;
9
+
10
+    public String getContractNo() {
11
+        return contractNo;
12
+    }
13
+
14
+    public void setContractNo(String contractNo) {
15
+        this.contractNo = contractNo;
16
+    }
17
+
18
+    public String getOrdNo() {
19
+        return ordNo;
20
+    }
21
+
22
+    public void setOrdNo(String ordNo) {
23
+        this.ordNo = ordNo;
24
+    }
25
+
26
+    public String getPayWay() {
27
+        return payWay;
28
+    }
29
+
30
+    public void setPayWay(String payWay) {
31
+        this.payWay = payWay;
32
+    }
33
+
34
+    public String getRemark() {
35
+        return remark;
36
+    }
37
+
38
+    public void setRemark(String remark) {
39
+        this.remark = remark;
40
+    }
41
+
42
+    public String getCancelFlag() {
43
+        return cancelFlag;
44
+    }
45
+
46
+    public void setCancelFlag(String cancelFlag) {
47
+        this.cancelFlag = cancelFlag;
48
+    }
49
+}

+ 58
- 0
src/main/java/com/th/demo/model/ware/Store.java 查看文件

@@ -91,6 +91,16 @@ public class Store  implements Comparable<Store>{
91 91
     private String attrib09;
92 92
     private String attrib10;
93 93
 
94
+    private String fkCustomerName;
95
+
96
+    private double keepDay;
97
+    private double ordPrice;
98
+    private double outOrdPrice;
99
+
100
+    private double inwareDay; //在库时间
101
+
102
+    private String payWay;
103
+
94 104
 
95 105
     public Double getInvoicePrice() {
96 106
         return invoicePrice;
@@ -509,6 +519,54 @@ public class Store  implements Comparable<Store>{
509 519
         this.attrib10 = attrib10;
510 520
     }
511 521
 
522
+    public double getKeepDay() {
523
+        return keepDay;
524
+    }
525
+
526
+    public void setKeepDay(double keepDay) {
527
+        this.keepDay = keepDay;
528
+    }
529
+
530
+    public double getOrdPrice() {
531
+        return ordPrice;
532
+    }
533
+
534
+    public void setOrdPrice(double ordPrice) {
535
+        this.ordPrice = ordPrice;
536
+    }
537
+
538
+    public double getOutOrdPrice() {
539
+        return outOrdPrice;
540
+    }
541
+
542
+    public void setOutOrdPrice(double outOrdPrice) {
543
+        this.outOrdPrice = outOrdPrice;
544
+    }
545
+
546
+    public String getFkCustomerName() {
547
+        return fkCustomerName;
548
+    }
549
+
550
+    public void setFkCustomerName(String fkCustomerName) {
551
+        this.fkCustomerName = fkCustomerName;
552
+    }
553
+
554
+    public double getInwareDay() {
555
+        return inwareDay;
556
+    }
557
+
558
+    public void setInwareDay(double inwareDay) {
559
+        this.inwareDay = inwareDay;
560
+    }
561
+
562
+    public String getPayWay() {
563
+        return payWay;
564
+    }
565
+
566
+    public void setPayWay(String payWay) {
567
+        this.payWay = payWay;
568
+    }
569
+
512 570
     @Override
513 571
     public int compareTo(Store o) {
514 572
         if (this.layer > o.getLayer()) {

+ 106
- 0
src/main/java/com/th/demo/service/impl/maint/OrdTractServiceImpl.java 查看文件

@@ -0,0 +1,106 @@
1
+package com.th.demo.service.impl.maint;
2
+
3
+import com.alibaba.fastjson.JSON;
4
+import com.alibaba.fastjson.JSONObject;
5
+import com.alibaba.fastjson.TypeReference;
6
+import com.github.pagehelper.PageHelper;
7
+import com.github.pagehelper.PageInfo;
8
+import com.th.demo.mapping.maint.AreaMapper;
9
+import com.th.demo.mapping.maint.OrdTractMapper;
10
+import com.th.demo.model.maint.Area;
11
+import com.th.demo.model.maint.OrdTract;
12
+import com.th.demo.model.maint.Price;
13
+import com.th.demo.model.maint.Ware;
14
+import com.th.demo.model.system.Type;
15
+import com.th.demo.service.maint.AreaService;
16
+import com.th.demo.service.maint.OrdTractService;
17
+import com.th.demo.tools.JSONTools;
18
+import com.th.demo.tools.Tools;
19
+import org.springframework.beans.factory.annotation.Autowired;
20
+import org.springframework.stereotype.Service;
21
+
22
+import java.util.Date;
23
+import java.util.List;
24
+
25
+@Service("OrdTractService")
26
+public class OrdTractServiceImpl implements OrdTractService {
27
+
28
+    @Autowired
29
+    public OrdTractMapper ordTractMapper;
30
+
31
+    String result = Type.FAIL;
32
+    int num = 0;
33
+
34
+    @Override
35
+    public String query(int page, int rows, String query, String userId, String belongId) {
36
+        PageHelper.startPage(page, rows);
37
+        List<OrdTract> list   = ordTractMapper.select(query, belongId);
38
+        PageInfo<OrdTract> pageInfo = new PageInfo<>(list);
39
+        result = JSONTools.toString(pageInfo);
40
+        return result;
41
+    }
42
+
43
+    @Override
44
+    public String save(String json, String userId, String belongId) {
45
+        result = Type.FAIL;
46
+        OrdTract ordTract = JSON.parseObject(json,new TypeReference<OrdTract>(){});
47
+        ordTract.setCancelFlag("0");
48
+
49
+        List<OrdTract> ordTractList = ordTractMapper.selectByOrdNo(ordTract.getOrdNo(),belongId);
50
+        if (ordTractList.size() == 0){
51
+            num = ordTractMapper.insert(ordTract);
52
+        }else {
53
+            num = ordTractMapper.update(ordTract);
54
+        }
55
+        result = Tools.moreThanZeroResultJSON(num);
56
+        return result;
57
+    }
58
+
59
+    @Override
60
+    public String inImport(String json, String userId, String belongId){
61
+        List<JSONObject> listJO = JSON.parseObject(json, new TypeReference<List<JSONObject>>() {
62
+        });
63
+        OrdTract ordTract = new OrdTract();
64
+        for (int i = 0; i < listJO.size(); i++) {
65
+            ordTract = new OrdTract();
66
+            if(listJO.get(i).get("合约号") != null && !listJO.get(i).get("合约号").toString().equals("")){
67
+                ordTract.setContractNo(listJO.get(i).get("合约号").toString());
68
+            }
69
+            if(listJO.get(i).get("订单号") != null && !listJO.get(i).get("订单号").toString().equals("")){
70
+                ordTract.setOrdNo(listJO.get(i).get("订单号").toString());
71
+            }else {
72
+                return JSONTools.toString(1,"订单号必须维护");
73
+            }
74
+            if(listJO.get(i).get("支付方式") != null && !listJO.get(i).get("支付方式").toString().equals("")){
75
+                ordTract.setPayWay(listJO.get(i).get("支付方式").toString());
76
+            }else {
77
+                return JSONTools.toString(1,"支付方式必须维护");
78
+            }
79
+            if (!ordTract.getPayWay().equals("现金") && !ordTract.getPayWay().equals("月付")){
80
+                return JSONTools.toString(1,"支付方式维护了“现金”和“月付”两种");
81
+            }
82
+            if(listJO.get(i).get("备注信息") != null && !listJO.get(i).get("备注信息").toString().equals("")){
83
+                ordTract.setRemark(listJO.get(i).get("备注信息").toString());
84
+            }
85
+            num += ordTractMapper.insert(ordTract);
86
+
87
+        }
88
+        result = Tools.moreThanZeroResultJSON(num);
89
+        return result;
90
+    }
91
+
92
+    @Override
93
+    public String remove(String ordNo, String userId,String belongid){
94
+        List<OrdTract> ordTractList = ordTractMapper.selectByOrdNo(ordNo,belongid);
95
+        if (ordTractList.size() > 0){
96
+            ordTractList.get(0).setCancelFlag("1");
97
+            num = ordTractMapper.update(ordTractList.get(0));
98
+            result = Tools.moreThanZeroResultJSON(num);
99
+        }
100
+
101
+        return result;
102
+    }
103
+
104
+
105
+
106
+}

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

@@ -20,6 +20,7 @@ import com.th.demo.service.ware.StoreService;
20 20
 import com.th.demo.tools.JSONTools;
21 21
 import com.th.demo.tools.Tools;
22 22
 import org.apache.velocity.context.InternalContextAdapter;
23
+import org.apache.xmlbeans.impl.xb.xsdschema.Public;
23 24
 import org.springframework.beans.factory.annotation.Autowired;
24 25
 import org.springframework.stereotype.Service;
25 26
 import org.springframework.transaction.annotation.Transactional;
@@ -48,6 +49,10 @@ public class InServiceImpl implements InService {
48 49
     public ProdPriceMapper prodPriceMapper;
49 50
     @Autowired
50 51
     public SysUserMapper sysUserMapper;
52
+    @Autowired
53
+    public PriceMapper priceMapper;
54
+    @Autowired
55
+    public OrdTractMapper ordTractMapper;
51 56
     String result = Type.FAIL;
52 57
     int num = 0;
53 58
 
@@ -231,11 +236,21 @@ public class InServiceImpl implements InService {
231 236
             listSameStack.get(m).setAddTime(new Date());
232 237
             listSameStack.get(m).setCancelFlag("0");
233 238
             listSameStack.get(m).setBelongId(belongId);
234
-            prodPrice = prodPriceMapper.selectByProdNm(listSameStack.get(m).getMaterial().getName());
235
-            if(prodPrice == null){
236
-                throw new Exception(listSameStack.get(m).getMaterial().getName()+"价格未维护");
239
+//            prodPrice = prodPriceMapper.selectByProdNm(listSameStack.get(m).getMaterial().getName());
240
+//            if(prodPrice == null){
241
+//                throw new Exception(listSameStack.get(m).getMaterial().getName()+"价格未维护");
242
+//            }
243
+            // listSameStack.get(m).setInvoicePrice(prodPrice.getInvoicePrice());
244
+            List<Price> priceList = priceMapper.selectListByCustomer(listSameStack.get(m).getFkComponyId(),belongId);
245
+            if (priceList.size() >= 1){
246
+                listSameStack.get(m).setKeepDay(priceList.get(0).getKeepDay());
247
+                listSameStack.get(m).setOrdPrice(priceList.get(0).getOrdPrice());
248
+                listSameStack.get(m).setOutOrdPrice(priceList.get(0).getOutOrdPrice());
249
+            }
250
+            List<OrdTract> ordTractList = ordTractMapper.selectByOrdNo(listSameStack.get(m).getOrdNo(),belongId);
251
+            if (ordTractList.size() >= 1){
252
+                listSameStack.get(m).setPayWay(ordTractList.get(0).getPayWay());
237 253
             }
238
-            listSameStack.get(m).setInvoicePrice(prodPrice.getInvoicePrice());
239 254
             InRecord inRecord = getInRecord(listSameStack.get(m), "1", userId);
240 255
             num += inRecordMapper.insert(inRecord);
241 256
 
@@ -402,22 +417,28 @@ public class InServiceImpl implements InService {
402 417
             store.setOutFlag("0");
403 418
             store.setLockFlag("0");
404 419
             store.setBelongId(belongId);
405
-            if(listJO.get(i).get("计量方式") != null && !listJO.get(i).get("备注").toString().equals("")){
420
+            if(listJO.get(i).get("计量方式") != null && !listJO.get(i).get("计量方式").toString().equals("")){
406 421
                 store.setWgtDcnMtcCd(listJO.get(i).get("计量方式").toString());
407 422
             }
408 423
             if(listJO.get(i).get("产地") != null && !listJO.get(i).get("产地").toString().equals("")){
409 424
                 store.setProductionPlace(listJO.get(i).get("产地").toString());
410 425
             }
426
+            if(listJO.get(i).get("合约号") != null && !listJO.get(i).get("合约号").toString().equals("")){
427
+                store.setContractNo(listJO.get(i).get("合约号").toString());
428
+            }
411 429
 
412 430
             if(listJO.get(i).get("订单号") != null && !listJO.get(i).get("订单号").toString().equals("")){
413 431
                 store.setOrdNo(listJO.get(i).get("订单号").toString());
414 432
             }
415
-            if(listJO.get(i).get("车号") != null && !listJO.get(i).get("车号").toString().equals("")){
416
-                store.setCarNo(listJO.get(i).get("车号").toString());
433
+            if(listJO.get(i).get("入库车号") != null && !listJO.get(i).get("入库车号").toString().equals("")){
434
+                store.setCarNo(listJO.get(i).get("入库车号").toString());
417 435
             }
418 436
             if(listJO.get(i).get("吊装工") != null && !listJO.get(i).get("吊装工").toString().equals("")){
419 437
                 store.setTallyPeople(listJO.get(i).get("吊装工").toString());
420 438
             }
439
+            if(listJO.get(i).get("捆包号") != null && !listJO.get(i).get("捆包号").toString().equals("")){
440
+                store.setPackNo(listJO.get(i).get("捆包号").toString());
441
+            }
421 442
             listStore.add(store);
422 443
         }
423 444
         if (err.equals(Type.SUCCESS)) {

+ 11
- 0
src/main/java/com/th/demo/service/maint/OrdTractService.java 查看文件

@@ -0,0 +1,11 @@
1
+package com.th.demo.service.maint;
2
+
3
+public interface OrdTractService {
4
+
5
+    String query(int page, int rows, String query, String userId, String belongId);
6
+
7
+    String save(String json, String userId, String belongId);
8
+    String inImport(String json, String userId, String belongId);
9
+
10
+    String remove(String ordNo, String userId,String belongid);
11
+}

+ 51
- 0
src/main/resource/mapper/maint/OrdTractMapper.xml 查看文件

@@ -0,0 +1,51 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.th.demo.mapping.maint.OrdTractMapper" >
4
+    <resultMap id="BaseResultMap" type="com.th.demo.model.maint.OrdTract" >
5
+        <result column="contract_no" property="contractNo" jdbcType="VARCHAR" />
6
+        <result column="ord_no" property="ordNo" jdbcType="VARCHAR" />
7
+        <result column="pay_way" property="payWay" jdbcType="VARCHAR" />
8
+        <result column="remark" property="remark" jdbcType="VARCHAR" />
9
+
10
+    </resultMap>
11
+
12
+    <insert id="insert" parameterType="com.th.demo.model.maint.OrdTract" >
13
+        insert into t_maint_ordtract (contract_no,ord_no,pay_way,remark,cancel_flag)
14
+        values (#{contractNo,jdbcType=VARCHAR}, #{ordNo,jdbcType=VARCHAR}, #{payWay,jdbcType=VARCHAR},
15
+                #{remark,jdbcType=VARCHAR}, #{cancelFlag,jdbcType=VARCHAR})
16
+    </insert>
17
+
18
+    <update id="delete"  parameterType="java.lang.String">
19
+        update t_maint_ordtract
20
+        set cancel_flag = '1'
21
+        where ord_no = #{param1,jdbcType=VARCHAR}
22
+    </update>
23
+
24
+    <update id="update" parameterType="com.th.demo.model.maint.OrdTract" >
25
+        update t_maint_ordtract
26
+        set contract_no = #{contractNo,jdbcType=VARCHAR},
27
+            pay_way = #{payWay,jdbcType=VARCHAR},
28
+            cancel_flag = #{cancelFlag,jdbcType=VARCHAR},
29
+            remark = #{remark,jdbcType=VARCHAR}
30
+        where ord_no = #{ordNo,jdbcType=VARCHAR}
31
+    </update>
32
+
33
+    <select id="select" resultMap="BaseResultMap" parameterType="java.lang.String" >
34
+        select *
35
+        from t_maint_ordtract
36
+        where 1= 1
37
+        <if test="param1 != null and param1 != ''" >
38
+            AND (ord_no like concat('%',#{param1,jdbcType=VARCHAR},'%')
39
+            or contract_no like concat('%',#{param1,jdbcType=VARCHAR},'%'))
40
+        </if>
41
+        and ifnull(cancel_flag,'0') = '0'
42
+    </select>
43
+
44
+    <select id="selectByOrdNo" resultMap="BaseResultMap" >
45
+        select t.*
46
+        from t_maint_ordtract t
47
+        where t.ord_no  = #{param1,jdbcType=VARCHAR}
48
+          and ifnull(t.cancel_flag,'0') = '0'
49
+    </select>
50
+
51
+</mapper>

+ 21
- 6
src/main/resource/mapper/ware/StoreMapper.xml 查看文件

@@ -42,9 +42,17 @@
42 42
     <result column="attrib_08" property="attrib08" jdbcType="VARCHAR" />
43 43
     <result column="attrib_09" property="attrib09" jdbcType="VARCHAR" />
44 44
     <result column="attrib_10" property="attrib10" jdbcType="VARCHAR" />
45
+    <result column="fk_customer_name" property="fkCustomerName" jdbcType="VARCHAR" />
45 46
 
46 47
     <result column="invoice_price" property="invoicePrice" jdbcType="DOUBLE" />
47 48
 
49
+    <result column="keep_day" property="keepDay" jdbcType="DOUBLE" />
50
+    <result column="ord_price" property="ordPrice" jdbcType="DOUBLE" />
51
+    <result column="out_ord_price" property="outOrdPrice" jdbcType="DOUBLE" />
52
+
53
+    <result column="inware_day" property="inwareDay" jdbcType="DOUBLE" />
54
+    <result column="pay_way" property="payWay" jdbcType="VARCHAR" />
55
+
48 56
 
49 57
     <association  column="ware_id" property="ware" select="com.th.demo.mapping.maint.WareMapper.selectByPrimaryKey" />
50 58
     <association  column="stack_id" property="stack" select="com.th.demo.mapping.maint.StackMapper.selectByPrimaryKey" />
@@ -69,7 +77,8 @@
69 77
     id, ware_id, stack_id, layer, material_id, model, plate_no, customer_id, count, weight,
70 78
     remark, add_id, add_time, modify_id, modify_time, cancel_id, cancel_time, cancel_flag,
71 79
     belong_id, in_id, out_id, receive_address, out_flag, lock_flag,wgt_dcn_mtc_cd,edge_ty,production_place,
72
-      pack_no,contract_no,attrib_01,attrib_02,attrib_03,attrib_04,attrib_05,attrib_06,attrib_07,attrib_08,attrib_09,attrib_10
80
+      pack_no,contract_no,attrib_01,attrib_02,attrib_03,attrib_04,attrib_05,attrib_06,attrib_07,attrib_08,attrib_09,attrib_10,
81
+      keep_day,ord_price,out_ord_price,pay_way
73 82
   </sql>
74 83
 
75 84
 
@@ -102,7 +111,7 @@
102 111
       ,car_no,tally_people,fk_compony_id,invoice_price,
103 112
       pack_no,contract_no,attrib_01,attrib_02,attrib_03,
104 113
       attrib_04,attrib_05,attrib_06,attrib_07,attrib_08,
105
-      attrib_09,attrib_10
114
+      attrib_09,attrib_10,keep_day,ord_price,out_ord_price,pay_way
106 115
     )
107 116
     values (#{id,jdbcType=VARCHAR}, #{ware.id,jdbcType=VARCHAR}, #{stack.id,jdbcType=VARCHAR},
108 117
       #{layer,jdbcType=INTEGER}, #{material.id,jdbcType=VARCHAR}, #{model,jdbcType=VARCHAR},
@@ -114,9 +123,9 @@
114 123
       #{receiveAddress,jdbcType=VARCHAR}, #{outFlag,jdbcType=VARCHAR}, #{lockFlag,jdbcType=VARCHAR}
115 124
       ,#{wgtDcnMtcCd,jdbcType=VARCHAR},#{edgeTy,jdbcType=VARCHAR},#{productionPlace,jdbcType=VARCHAR},#{ordNo,jdbcType=VARCHAR}
116 125
      ,#{carNo,jdbcType=VARCHAR},#{tallyPeople,jdbcType=VARCHAR},#{fkComponyId,jdbcType=VARCHAR},#{invoicePrice,jdbcType=DOUBLE},
117
-     #{packNo,jdbcType=VARCHAR},#{cintractNo,jdbcType=VARCHAR},#{attrib01,jdbcType=VARCHAR},#{attrib02,jdbcType=VARCHAR},#{attrib03,jdbcType=VARCHAR},
126
+     #{packNo,jdbcType=VARCHAR},#{contractNo,jdbcType=VARCHAR},#{attrib01,jdbcType=VARCHAR},#{attrib02,jdbcType=VARCHAR},#{attrib03,jdbcType=VARCHAR},
118 127
      #{attrib04,jdbcType=VARCHAR},#{attrib05,jdbcType=VARCHAR},#{attrib06,jdbcType=VARCHAR},#{attrib07,jdbcType=VARCHAR},#{attrib08,jdbcType=VARCHAR},
119
-        #{attrib09,jdbcType=VARCHAR},#{attrib10,jdbcType=VARCHAR},
128
+        #{attrib09,jdbcType=VARCHAR},#{attrib10,jdbcType=VARCHAR},#{keepDay,jdbcType=DOUBLE},#{ordPrice,jdbcType=DOUBLE},#{outOrdPrice,jdbcType=DOUBLE},#{payWay,jdbcType=VARCHAR}
120 129
 
121 130
       )
122 131
   </insert>
@@ -356,7 +365,11 @@
356 365
         attrib_07 = #{attrib07,jdbcType=VARCHAR},
357 366
         attrib_08 = #{attrib08,jdbcType=VARCHAR},
358 367
         attrib_09 = #{attrib09,jdbcType=VARCHAR},
359
-        attrib_10 = #{attrib10,jdbcType=VARCHAR}
368
+        attrib_10 = #{attrib10,jdbcType=VARCHAR},
369
+        keep_day = #{keepDay,jdbcType=DOUBLE},
370
+        ord_price = #{ordPrice,jdbcType=DOUBLE},
371
+        out_ord_price = #{outOrdPrice,jdbcType=DOUBLE},
372
+        pay_way = #{payWay,jdbcType=VARCHAR}
360 373
     where id = #{id,jdbcType=VARCHAR}
361 374
   </update>
362 375
 
@@ -457,11 +470,13 @@ update t_ware_store t set t.layer =   #{param7,jdbcType=INTEGER}
457 470
 
458 471
 
459 472
   <select id="selectStore" resultMap="BaseResultMap" >
460
-    select t.* from t_ware_store t, t_maint_ware a, t_maint_stack b, t_maint_material c,t_maint_customer d
473
+    select e.name as fk_customer_name,DATEDIFF(now(), t.add_time) + IF(TIME(now()) > TIME(t.add_time), 1, 0) as inware_day,t.*
474
+    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
461 475
     where t.ware_id = a.id
462 476
     and t.stack_id = b.id
463 477
     and t.material_id  = c.id
464 478
     and t.customer_id = d.id
479
+    and t.fk_compony_id = e.id
465 480
     and  a.name like concat('%',#{param1,jdbcType=VARCHAR},'%')
466 481
     and  b.name like concat('%',#{param2,jdbcType=VARCHAR},'%')
467 482
     and  t.model like concat('%',#{param3,jdbcType=VARCHAR},'%')

二进制
导入数据、配车单、出库单模板/import.xls 查看文件


二进制
导入数据、配车单、出库单模板/importOrd.xls 查看文件


正在加载...
取消
保存