Browse Source

1.增加出入库单保存form,读取form

zhoudw 7 years ago
parent
commit
ebe1a30fd1

+ 8 - 1
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/ProdIODetailMapper.java

@@ -1,12 +1,13 @@
 package com.usoftchina.saas.purchase.mapper;
 
+import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 import com.usoftchina.saas.purchase.po.ProdIODetail;
 import com.usoftchina.saas.purchase.po.ProdIODetailExample;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
-public interface ProdIODetailMapper {
+public interface ProdIODetailMapper extends CommonBaseMapper<ProdIODetail> {
     long countByExample(ProdIODetailExample example);
 
     int deleteByExample(ProdIODetailExample example);
@@ -34,4 +35,10 @@ public interface ProdIODetailMapper {
     int updateByPrimaryKeyWithBLOBs(ProdIODetail record);
 
     int updateByPrimaryKey(ProdIODetail record);
+
+    void batchInsert(List<ProdIODetail> list);
+
+    void batchUpdate(List<ProdIODetail> list);
+
+
 }

+ 2 - 1
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/ProdInOutMapper.java

@@ -1,12 +1,13 @@
 package com.usoftchina.saas.purchase.mapper;
 
+import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 import com.usoftchina.saas.purchase.po.ProdInOut;
 import com.usoftchina.saas.purchase.po.ProdInOutExample;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
-public interface ProdInOutMapper {
+public interface ProdInOutMapper extends CommonBaseMapper<ProdInOut> {
     long countByExample(ProdInOutExample example);
 
     int deleteByExample(ProdInOutExample example);

+ 6 - 320
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdIODetail.java

@@ -1,9 +1,11 @@
 package com.usoftchina.saas.purchase.po;
 
-import java.util.Date;
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import lombok.Data;
 
-public class ProdIODetail {
-    private Long pd_id;
+import java.io.Serializable;
+@Data
+public class ProdIODetail extends CommonBaseEntity implements Serializable {
 
     private Long pd_piid;
 
@@ -33,7 +35,7 @@ public class ProdIODetail {
 
     private Double pd_price;
 
-    private String pd_total;
+    private Double pd_total;
 
     private Double pd_taxrate;
 
@@ -59,12 +61,6 @@ public class ProdIODetail {
 
     private Integer pd_status;
 
-    private Integer companyid;
-
-    private Integer updaterid;
-
-    private Date updatetime;
-
     private String pd_text1;
 
     private String pd_text2;
@@ -81,315 +77,5 @@ public class ProdIODetail {
 
     private String pd_remark;
 
-    public Long getPd_id() {
-        return pd_id;
-    }
-
-    public void setPd_id(Long pd_id) {
-        this.pd_id = pd_id;
-    }
-
-    public Long getPd_piid() {
-        return pd_piid;
-    }
-
-    public void setPd_piid(Long pd_piid) {
-        this.pd_piid = pd_piid;
-    }
-
-    public String getPd_inoutno() {
-        return pd_inoutno;
-    }
-
-    public void setPd_inoutno(String pd_inoutno) {
-        this.pd_inoutno = pd_inoutno == null ? null : pd_inoutno.trim();
-    }
-
-    public String getPd_piclass() {
-        return pd_piclass;
-    }
-
-    public void setPd_piclass(String pd_piclass) {
-        this.pd_piclass = pd_piclass == null ? null : pd_piclass.trim();
-    }
-
-    public Integer getPd_pdno() {
-        return pd_pdno;
-    }
-
-    public void setPd_pdno(Integer pd_pdno) {
-        this.pd_pdno = pd_pdno;
-    }
-
-    public String getPd_ordercode() {
-        return pd_ordercode;
-    }
-
-    public void setPd_ordercode(String pd_ordercode) {
-        this.pd_ordercode = pd_ordercode == null ? null : pd_ordercode.trim();
-    }
-
-    public Integer getPd_orderdetno() {
-        return pd_orderdetno;
-    }
-
-    public void setPd_orderdetno(Integer pd_orderdetno) {
-        this.pd_orderdetno = pd_orderdetno;
-    }
-
-    public Integer getPd_prodid() {
-        return pd_prodid;
-    }
-
-    public void setPd_prodid(Integer pd_prodid) {
-        this.pd_prodid = pd_prodid;
-    }
-
-    public String getPd_prodcode() {
-        return pd_prodcode;
-    }
-
-    public void setPd_prodcode(String pd_prodcode) {
-        this.pd_prodcode = pd_prodcode == null ? null : pd_prodcode.trim();
-    }
-
-    public String getPd_unit() {
-        return pd_unit;
-    }
-
-    public void setPd_unit(String pd_unit) {
-        this.pd_unit = pd_unit == null ? null : pd_unit.trim();
-    }
-
-    public Integer getPd_inqty() {
-        return pd_inqty;
-    }
-
-    public void setPd_inqty(Integer pd_inqty) {
-        this.pd_inqty = pd_inqty;
-    }
-
-    public Integer getPd_outqty() {
-        return pd_outqty;
-    }
-
-    public void setPd_outqty(Integer pd_outqty) {
-        this.pd_outqty = pd_outqty;
-    }
-
-    public Double getPd_orderprice() {
-        return pd_orderprice;
-    }
-
-    public void setPd_orderprice(Double pd_orderprice) {
-        this.pd_orderprice = pd_orderprice;
-    }
-
-    public Double getPd_sendprice() {
-        return pd_sendprice;
-    }
-
-    public void setPd_sendprice(Double pd_sendprice) {
-        this.pd_sendprice = pd_sendprice;
-    }
-
-    public Double getPd_price() {
-        return pd_price;
-    }
-
-    public void setPd_price(Double pd_price) {
-        this.pd_price = pd_price;
-    }
-
-    public String getPd_total() {
-        return pd_total;
-    }
-
-    public void setPd_total(String pd_total) {
-        this.pd_total = pd_total == null ? null : pd_total.trim();
-    }
-
-    public Double getPd_taxrate() {
-        return pd_taxrate;
-    }
-
-    public void setPd_taxrate(Double pd_taxrate) {
-        this.pd_taxrate = pd_taxrate;
-    }
-
-    public Double getPd_netprice() {
-        return pd_netprice;
-    }
-
-    public void setPd_netprice(Double pd_netprice) {
-        this.pd_netprice = pd_netprice;
-    }
-
-    public Double getPd_nettotal() {
-        return pd_nettotal;
-    }
-
-    public void setPd_nettotal(Double pd_nettotal) {
-        this.pd_nettotal = pd_nettotal;
-    }
-
-    public Integer getPd_whid() {
-        return pd_whid;
-    }
-
-    public void setPd_whid(Integer pd_whid) {
-        this.pd_whid = pd_whid;
-    }
-
-    public String getPd_whcode() {
-        return pd_whcode;
-    }
-
-    public void setPd_whcode(String pd_whcode) {
-        this.pd_whcode = pd_whcode == null ? null : pd_whcode.trim();
-    }
-
-    public String getPd_whname() {
-        return pd_whname;
-    }
-
-    public void setPd_whname(String pd_whname) {
-        this.pd_whname = pd_whname == null ? null : pd_whname.trim();
-    }
-
-    public Integer getPd_inwhid() {
-        return pd_inwhid;
-    }
-
-    public void setPd_inwhid(Integer pd_inwhid) {
-        this.pd_inwhid = pd_inwhid;
-    }
-
-    public String getPd_inwhcode() {
-        return pd_inwhcode;
-    }
-
-    public void setPd_inwhcode(String pd_inwhcode) {
-        this.pd_inwhcode = pd_inwhcode == null ? null : pd_inwhcode.trim();
-    }
-
-    public String getPd_inwhname() {
-        return pd_inwhname;
-    }
-
-    public void setPd_inwhname(String pd_inwhname) {
-        this.pd_inwhname = pd_inwhname == null ? null : pd_inwhname.trim();
-    }
-
-    public Integer getPd_orderid() {
-        return pd_orderid;
-    }
-
-    public void setPd_orderid(Integer pd_orderid) {
-        this.pd_orderid = pd_orderid;
-    }
-
-    public Integer getPd_sdid() {
-        return pd_sdid;
-    }
-
-    public void setPd_sdid(Integer pd_sdid) {
-        this.pd_sdid = pd_sdid;
-    }
-
-    public Integer getPd_status() {
-        return pd_status;
-    }
-
-    public void setPd_status(Integer pd_status) {
-        this.pd_status = pd_status;
-    }
-
-    public Integer getCompanyid() {
-        return companyid;
-    }
-
-    public void setCompanyid(Integer companyid) {
-        this.companyid = companyid;
-    }
-
-    public Integer getUpdaterid() {
-        return updaterid;
-    }
-
-    public void setUpdaterid(Integer updaterid) {
-        this.updaterid = updaterid;
-    }
-
-    public Date getUpdatetime() {
-        return updatetime;
-    }
-
-    public void setUpdatetime(Date updatetime) {
-        this.updatetime = updatetime;
-    }
-
-    public String getPd_text1() {
-        return pd_text1;
-    }
-
-    public void setPd_text1(String pd_text1) {
-        this.pd_text1 = pd_text1 == null ? null : pd_text1.trim();
-    }
-
-    public String getPd_text2() {
-        return pd_text2;
-    }
-
-    public void setPd_text2(String pd_text2) {
-        this.pd_text2 = pd_text2 == null ? null : pd_text2.trim();
-    }
-
-    public String getPd_text3() {
-        return pd_text3;
-    }
-
-    public void setPd_text3(String pd_text3) {
-        this.pd_text3 = pd_text3 == null ? null : pd_text3.trim();
-    }
-
-    public String getPd_text4() {
-        return pd_text4;
-    }
-
-    public void setPd_text4(String pd_text4) {
-        this.pd_text4 = pd_text4 == null ? null : pd_text4.trim();
-    }
-
-    public String getPd_text5() {
-        return pd_text5;
-    }
-
-    public void setPd_text5(String pd_text5) {
-        this.pd_text5 = pd_text5 == null ? null : pd_text5.trim();
-    }
-
-    public Integer getPd_ym() {
-        return pd_ym;
-    }
-
-    public void setPd_ym(Integer pd_ym) {
-        this.pd_ym = pd_ym;
-    }
-
-    public Double getPd_yqty() {
-        return pd_yqty;
-    }
-
-    public void setPd_yqty(Double pd_yqty) {
-        this.pd_yqty = pd_yqty;
-    }
-
-    public String getPd_remark() {
-        return pd_remark;
-    }
 
-    public void setPd_remark(String pd_remark) {
-        this.pd_remark = pd_remark == null ? null : pd_remark.trim();
-    }
 }

+ 6 - 256
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOut.java

@@ -1,10 +1,13 @@
 package com.usoftchina.saas.purchase.po;
 
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import lombok.Data;
+
+import java.io.Serializable;
 import java.math.BigDecimal;
 import java.util.Date;
-
-public class ProdInOut {
-    private Long pi_id;
+@Data
+public class ProdInOut extends CommonBaseEntity implements Serializable {
 
     private String pi_inoutno;
 
@@ -48,12 +51,6 @@ public class ProdInOut {
 
     private String pi_printstatuscode;
 
-    private Integer companyid;
-
-    private Integer updaterid;
-
-    private Date updatetime;
-
     private String pi_text1;
 
     private String pi_text2;
@@ -66,251 +63,4 @@ public class ProdInOut {
 
     private String pi_address;
 
-    public Long getPi_id() {
-        return pi_id;
-    }
-
-    public void setPi_id(Long pi_id) {
-        this.pi_id = pi_id;
-    }
-
-    public String getPi_inoutno() {
-        return pi_inoutno;
-    }
-
-    public void setPi_inoutno(String pi_inoutno) {
-        this.pi_inoutno = pi_inoutno == null ? null : pi_inoutno.trim();
-    }
-
-    public String getPi_class() {
-        return pi_class;
-    }
-
-    public void setPi_class(String pi_class) {
-        this.pi_class = pi_class == null ? null : pi_class.trim();
-    }
-
-    public Date getPi_date() {
-        return pi_date;
-    }
-
-    public void setPi_date(Date pi_date) {
-        this.pi_date = pi_date;
-    }
-
-    public Integer getPi_vendid() {
-        return pi_vendid;
-    }
-
-    public void setPi_vendid(Integer pi_vendid) {
-        this.pi_vendid = pi_vendid;
-    }
-
-    public String getPi_vendcode() {
-        return pi_vendcode;
-    }
-
-    public void setPi_vendcode(String pi_vendcode) {
-        this.pi_vendcode = pi_vendcode == null ? null : pi_vendcode.trim();
-    }
-
-    public String getPi_vendname() {
-        return pi_vendname;
-    }
-
-    public void setPi_vendname(String pi_vendname) {
-        this.pi_vendname = pi_vendname == null ? null : pi_vendname.trim();
-    }
-
-    public Integer getPi_custid() {
-        return pi_custid;
-    }
-
-    public void setPi_custid(Integer pi_custid) {
-        this.pi_custid = pi_custid;
-    }
-
-    public String getPi_custcode() {
-        return pi_custcode;
-    }
-
-    public void setPi_custcode(String pi_custcode) {
-        this.pi_custcode = pi_custcode == null ? null : pi_custcode.trim();
-    }
-
-    public String getPi_custname() {
-        return pi_custname;
-    }
-
-    public void setPi_custname(String pi_custname) {
-        this.pi_custname = pi_custname == null ? null : pi_custname.trim();
-    }
-
-    public Integer getPi_puid() {
-        return pi_puid;
-    }
-
-    public void setPi_puid(Integer pi_puid) {
-        this.pi_puid = pi_puid;
-    }
-
-    public String getPi_pucode() {
-        return pi_pucode;
-    }
-
-    public void setPi_pucode(String pi_pucode) {
-        this.pi_pucode = pi_pucode == null ? null : pi_pucode.trim();
-    }
-
-    public Integer getPi_said() {
-        return pi_said;
-    }
-
-    public void setPi_said(Integer pi_said) {
-        this.pi_said = pi_said;
-    }
-
-    public String getPi_sacode() {
-        return pi_sacode;
-    }
-
-    public void setPi_sacode(String pi_sacode) {
-        this.pi_sacode = pi_sacode == null ? null : pi_sacode.trim();
-    }
-
-    public BigDecimal getPi_total() {
-        return pi_total;
-    }
-
-    public void setPi_total(BigDecimal pi_total) {
-        this.pi_total = pi_total;
-    }
-
-    public Integer getPi_recordmanid() {
-        return pi_recordmanid;
-    }
-
-    public void setPi_recordmanid(Integer pi_recordmanid) {
-        this.pi_recordmanid = pi_recordmanid;
-    }
-
-    public String getPi_recordman() {
-        return pi_recordman;
-    }
-
-    public void setPi_recordman(String pi_recordman) {
-        this.pi_recordman = pi_recordman == null ? null : pi_recordman.trim();
-    }
-
-    public Date getPi_recorddate() {
-        return pi_recorddate;
-    }
-
-    public void setPi_recorddate(Date pi_recorddate) {
-        this.pi_recorddate = pi_recorddate;
-    }
-
-    public String getPi_status() {
-        return pi_status;
-    }
-
-    public void setPi_status(String pi_status) {
-        this.pi_status = pi_status == null ? null : pi_status.trim();
-    }
-
-    public String getPi_statuscode() {
-        return pi_statuscode;
-    }
-
-    public void setPi_statuscode(String pi_statuscode) {
-        this.pi_statuscode = pi_statuscode == null ? null : pi_statuscode.trim();
-    }
-
-    public String getPi_printstatus() {
-        return pi_printstatus;
-    }
-
-    public void setPi_printstatus(String pi_printstatus) {
-        this.pi_printstatus = pi_printstatus == null ? null : pi_printstatus.trim();
-    }
-
-    public String getPi_printstatuscode() {
-        return pi_printstatuscode;
-    }
-
-    public void setPi_printstatuscode(String pi_printstatuscode) {
-        this.pi_printstatuscode = pi_printstatuscode == null ? null : pi_printstatuscode.trim();
-    }
-
-    public Integer getCompanyid() {
-        return companyid;
-    }
-
-    public void setCompanyid(Integer companyid) {
-        this.companyid = companyid;
-    }
-
-    public Integer getUpdaterid() {
-        return updaterid;
-    }
-
-    public void setUpdaterid(Integer updaterid) {
-        this.updaterid = updaterid;
-    }
-
-    public Date getUpdatetime() {
-        return updatetime;
-    }
-
-    public void setUpdatetime(Date updatetime) {
-        this.updatetime = updatetime;
-    }
-
-    public String getPi_text1() {
-        return pi_text1;
-    }
-
-    public void setPi_text1(String pi_text1) {
-        this.pi_text1 = pi_text1 == null ? null : pi_text1.trim();
-    }
-
-    public String getPi_text2() {
-        return pi_text2;
-    }
-
-    public void setPi_text2(String pi_text2) {
-        this.pi_text2 = pi_text2 == null ? null : pi_text2.trim();
-    }
-
-    public String getPi_text3() {
-        return pi_text3;
-    }
-
-    public void setPi_text3(String pi_text3) {
-        this.pi_text3 = pi_text3 == null ? null : pi_text3.trim();
-    }
-
-    public String getPi_text4() {
-        return pi_text4;
-    }
-
-    public void setPi_text4(String pi_text4) {
-        this.pi_text4 = pi_text4 == null ? null : pi_text4.trim();
-    }
-
-    public String getPi_text5() {
-        return pi_text5;
-    }
-
-    public void setPi_text5(String pi_text5) {
-        this.pi_text5 = pi_text5 == null ? null : pi_text5.trim();
-    }
-
-    public String getPi_address() {
-        return pi_address;
-    }
-
-    public void setPi_address(String pi_address) {
-        this.pi_address = pi_address == null ? null : pi_address.trim();
-    }
 }

+ 3 - 3
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java

@@ -242,11 +242,11 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         prodInOut.setPi_puid(purchase.getId().intValue());
         prodInOut.setPi_pucode(purchase.getPu_code());
         //设置公司id
-        prodInOut.setCompanyid(1);
+        prodInOut.setCompanyId(1);
 
         prodInOutMapper.insertSelective(prodInOut);
         //插入验收单从表
-        long pi_id = prodInOut.getPi_id();
+        long pi_id = prodInOut.getId();
 
         for (int i=0;i<purchaseItems.size();i++){
             PurchaseItem purchaseItem =purchaseItems.get(i);
@@ -262,7 +262,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
             prodIODetail.setPd_prodid(purchaseItem.getPd_prodid());
             prodIODetail.setPd_prodcode(purchaseItem.getPd_prodcode());
             //公司id
-            prodIODetail.setCompanyid(1);
+            prodIODetail.setCompanyId(1);
 
             //本次转单数
             prodIODetail.setPd_inqty((int) (purchaseItem.getPd_qty()-purchaseItem.getPd_yqty()));

+ 96 - 23
applications/purchase/purchase-server/src/main/resources/mapper/ProdIODetailMapper.xml

@@ -2,7 +2,7 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.usoftchina.saas.purchase.mapper.ProdIODetailMapper">
   <resultMap id="BaseResultMap" type="com.usoftchina.saas.purchase.po.ProdIODetail">
-    <id column="pd_id" jdbcType="INTEGER" property="pd_id" />
+    <id column="pd_id" jdbcType="INTEGER" property="id" />
     <result column="pd_piid" jdbcType="INTEGER" property="pd_piid" />
     <result column="pd_inoutno" jdbcType="VARCHAR" property="pd_inoutno" />
     <result column="pd_piclass" jdbcType="VARCHAR" property="pd_piclass" />
@@ -17,7 +17,7 @@
     <result column="pd_orderprice" jdbcType="DOUBLE" property="pd_orderprice" />
     <result column="pd_sendprice" jdbcType="DOUBLE" property="pd_sendprice" />
     <result column="pd_price" jdbcType="DOUBLE" property="pd_price" />
-    <result column="pd_total" jdbcType="VARCHAR" property="pd_total" />
+    <result column="pd_total" jdbcType="DOUBLE" property="pd_total" />
     <result column="pd_taxrate" jdbcType="DOUBLE" property="pd_taxrate" />
     <result column="pd_netprice" jdbcType="DOUBLE" property="pd_netprice" />
     <result column="pd_nettotal" jdbcType="DOUBLE" property="pd_nettotal" />
@@ -30,9 +30,9 @@
     <result column="pd_orderid" jdbcType="INTEGER" property="pd_orderid" />
     <result column="pd_sdid" jdbcType="INTEGER" property="pd_sdid" />
     <result column="pd_status" jdbcType="INTEGER" property="pd_status" />
-    <result column="companyid" jdbcType="INTEGER" property="companyid" />
-    <result column="updaterid" jdbcType="INTEGER" property="updaterid" />
-    <result column="updatetime" jdbcType="TIMESTAMP" property="updatetime" />
+    <result column="companyid" jdbcType="INTEGER" property="companyId" />
+    <result column="updaterid" jdbcType="INTEGER" property="updaterId" />
+    <result column="updatetime" jdbcType="TIMESTAMP" property="updateTime" />
     <result column="pd_text1" jdbcType="VARCHAR" property="pd_text1" />
     <result column="pd_text2" jdbcType="VARCHAR" property="pd_text2" />
     <result column="pd_text3" jdbcType="VARCHAR" property="pd_text3" />
@@ -180,7 +180,7 @@
       #{pd_orderdetno,jdbcType=INTEGER}, #{pd_prodid,jdbcType=INTEGER}, #{pd_prodcode,jdbcType=VARCHAR}, 
       #{pd_unit,jdbcType=VARCHAR}, #{pd_inqty,jdbcType=INTEGER}, #{pd_outqty,jdbcType=INTEGER}, 
       #{pd_orderprice,jdbcType=DOUBLE}, #{pd_sendprice,jdbcType=DOUBLE}, #{pd_price,jdbcType=DOUBLE}, 
-      #{pd_total,jdbcType=VARCHAR}, #{pd_taxrate,jdbcType=DOUBLE}, #{pd_netprice,jdbcType=DOUBLE}, 
+      #{pd_total,jdbcType=DOUBLE}, #{pd_taxrate,jdbcType=DOUBLE}, #{pd_netprice,jdbcType=DOUBLE},
       #{pd_nettotal,jdbcType=DOUBLE}, #{pd_whid,jdbcType=INTEGER}, #{pd_whcode,jdbcType=VARCHAR}, 
       #{pd_whname,jdbcType=VARCHAR}, #{pd_inwhid,jdbcType=INTEGER}, #{pd_inwhcode,jdbcType=VARCHAR}, 
       #{pd_inwhname,jdbcType=VARCHAR}, #{pd_orderid,jdbcType=INTEGER}, #{pd_sdid,jdbcType=INTEGER}, 
@@ -191,7 +191,7 @@
       )
   </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.saas.purchase.po.ProdIODetail">
-    <selectKey resultType="java.lang.Long" keyProperty="pd_id">
+    <selectKey resultType="java.lang.Long" keyProperty="id">
       SELECT LAST_INSERT_ID() AS ID
     </selectKey>
     insert into prodiodetail
@@ -278,13 +278,13 @@
       <if test="pd_status != null">
         pd_status,
       </if>
-      <if test="companyid != null">
+      <if test="companyId != null">
         companyid,
       </if>
-      <if test="updaterid != null">
+      <if test="updaterId != null">
         updaterid,
       </if>
-      <if test="updatetime != null">
+      <if test="updateTime != null">
         updatetime,
       </if>
       <if test="pd_text1 != null">
@@ -357,7 +357,7 @@
         #{pd_price,jdbcType=DOUBLE},
       </if>
       <if test="pd_total != null">
-        #{pd_total,jdbcType=VARCHAR},
+        #{pd_total,jdbcType=DOUBLE},
       </if>
       <if test="pd_taxrate != null">
         #{pd_taxrate,jdbcType=DOUBLE},
@@ -395,14 +395,14 @@
       <if test="pd_status != null">
         #{pd_status,jdbcType=INTEGER},
       </if>
-      <if test="companyid != null">
-        #{companyid,jdbcType=INTEGER},
+      <if test="companyId != null">
+        #{companyId,jdbcType=INTEGER},
       </if>
-      <if test="updaterid != null">
-        #{updaterid,jdbcType=INTEGER},
+      <if test="updaterId != null">
+        #{updaterId,jdbcType=INTEGER},
       </if>
-      <if test="updatetime != null">
-        #{updatetime,jdbcType=TIMESTAMP},
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
       </if>
       <if test="pd_text1 != null">
         #{pd_text1,jdbcType=VARCHAR},
@@ -485,7 +485,7 @@
         pd_price = #{record.pd_price,jdbcType=DOUBLE},
       </if>
       <if test="record.pd_total != null">
-        pd_total = #{record.pd_total,jdbcType=VARCHAR},
+        pd_total = #{record.pd_total,jdbcType=DOUBLE},
       </if>
       <if test="record.pd_taxrate != null">
         pd_taxrate = #{record.pd_taxrate,jdbcType=DOUBLE},
@@ -578,7 +578,7 @@
       pd_orderprice = #{record.pd_orderprice,jdbcType=DOUBLE},
       pd_sendprice = #{record.pd_sendprice,jdbcType=DOUBLE},
       pd_price = #{record.pd_price,jdbcType=DOUBLE},
-      pd_total = #{record.pd_total,jdbcType=VARCHAR},
+      pd_total = #{record.pd_total,jdbcType=DOUBLE},
       pd_taxrate = #{record.pd_taxrate,jdbcType=DOUBLE},
       pd_netprice = #{record.pd_netprice,jdbcType=DOUBLE},
       pd_nettotal = #{record.pd_nettotal,jdbcType=DOUBLE},
@@ -623,7 +623,7 @@
       pd_orderprice = #{record.pd_orderprice,jdbcType=DOUBLE},
       pd_sendprice = #{record.pd_sendprice,jdbcType=DOUBLE},
       pd_price = #{record.pd_price,jdbcType=DOUBLE},
-      pd_total = #{record.pd_total,jdbcType=VARCHAR},
+      pd_total = #{record.pd_total,jdbcType=DOUBLE},
       pd_taxrate = #{record.pd_taxrate,jdbcType=DOUBLE},
       pd_netprice = #{record.pd_netprice,jdbcType=DOUBLE},
       pd_nettotal = #{record.pd_nettotal,jdbcType=DOUBLE},
@@ -696,7 +696,7 @@
         pd_price = #{pd_price,jdbcType=DOUBLE},
       </if>
       <if test="pd_total != null">
-        pd_total = #{pd_total,jdbcType=VARCHAR},
+        pd_total = #{pd_total,jdbcType=DOUBLE},
       </if>
       <if test="pd_taxrate != null">
         pd_taxrate = #{pd_taxrate,jdbcType=DOUBLE},
@@ -786,7 +786,7 @@
       pd_orderprice = #{pd_orderprice,jdbcType=DOUBLE},
       pd_sendprice = #{pd_sendprice,jdbcType=DOUBLE},
       pd_price = #{pd_price,jdbcType=DOUBLE},
-      pd_total = #{pd_total,jdbcType=VARCHAR},
+      pd_total = #{pd_total,jdbcType=DOUBLE},
       pd_taxrate = #{pd_taxrate,jdbcType=DOUBLE},
       pd_netprice = #{pd_netprice,jdbcType=DOUBLE},
       pd_nettotal = #{pd_nettotal,jdbcType=DOUBLE},
@@ -828,7 +828,7 @@
       pd_orderprice = #{pd_orderprice,jdbcType=DOUBLE},
       pd_sendprice = #{pd_sendprice,jdbcType=DOUBLE},
       pd_price = #{pd_price,jdbcType=DOUBLE},
-      pd_total = #{pd_total,jdbcType=VARCHAR},
+      pd_total = #{pd_total,jdbcType=DOUBLE},
       pd_taxrate = #{pd_taxrate,jdbcType=DOUBLE},
       pd_netprice = #{pd_netprice,jdbcType=DOUBLE},
       pd_nettotal = #{pd_nettotal,jdbcType=DOUBLE},
@@ -853,4 +853,77 @@
       pd_yqty = #{pd_yqty,jdbcType=DOUBLE}
     where pd_id = #{pd_id,jdbcType=INTEGER}
   </update>
+
+  <insert id="batchInsert" parameterType="java.util.List" >
+    insert into prodiodetail
+    (
+    pd_piid,pd_inoutno,pd_piclass,pd_pdno,pd_ordercode,
+    pd_orderdetno,pd_prodid,pd_prodcode,pd_unit,
+    pd_inqty,pd_outqty,pd_orderprice,pd_sendprice,pd_price,
+    pd_total,pd_taxrate,pd_netprice,pd_nettotal,
+    pd_whid,pd_whcode,pd_whname,pd_inwhid,pd_inwhcode,
+    pd_inwhname,pd_orderid,pd_sdid,pd_status,pd_remark,
+    companyid,updaterid,updatetime,pd_text1,pd_text2,
+    pd_text3,pd_text4,pd_text5,pd_ym,pd_yqty
+    )
+    values
+    <foreach collection="list" item="item" index="index" open="" close="" separator=",">
+      (
+      #{item.pd_piid,jdbcType=INTEGER},#{pd_inoutno,jdbcType=VARCHAR},#{pd_piclass,jdbcType=VARCHAR},#{pd_pdno,jdbcType=INTEGER},#{pd_ordercode,jdbcType=VARCHAR},
+      #{pd_orderdetno,jdbcType=INTEGER},#{pd_prodid,jdbcType=INTEGER},#{pd_prodcode,jdbcType=VARCHAR},#{pd_unit,jdbcType=VARCHAR},
+      #{pd_inqty,jdbcType=INTEGER},#{pd_outqty,jdbcType=INTEGER},#{pd_orderprice,jdbcType=DOUBLE},#{pd_sendprice,jdbcType=DOUBLE},#{pd_price,jdbcType=DOUBLE},
+      #{pd_total,jdbcType=DOUBLE},#{pd_taxrate,jdbcType=DOUBLE},#{pd_netprice,jdbcType=DOUBLE},#{pd_nettotal,jdbcType=DOUBLE},
+      #{pd_whid,jdbcType=INTEGER},#{pd_whcode,jdbcType=VARCHAR},#{pd_whname,jdbcType=VARCHAR},#{pd_inwhid,jdbcType=INTEGER},#{pd_inwhcode,jdbcType=VARCHAR},
+      #{pd_inwhname,jdbcType=VARCHAR},#{pd_orderid,jdbcType=INTEGER},#{pd_sdid,jdbcType=INTEGER},#{pd_status,jdbcType=VARCHAR},#{pd_remark,jdbcType=VARCHAR},
+      #{companyid,jdbcType=INTEGER},#{updaterid,jdbcType=INTEGER},#{updatetime,jdbcType=TIMESTAMP},#{pd_text1,jdbcType=VARCHAR},#{pd_text2,jdbcType=VARCHAR},
+      #{pd_text3,jdbcType=VARCHAR},#{pd_text4,jdbcType=VARCHAR},#{pd_text5,jdbcType=VARCHAR},#{pd_ym,jdbcType=INTEGER},#{pd_yqty,jdbcType=INTEGER}
+      )
+    </foreach>
+  </insert>
+  <update id="batchUpdate" parameterType="com.usoftchina.saas.purchase.po.PurchaseItem" >
+    <foreach collection="list" item="item" index="index" open="" close="" separator=";">
+      update prodiodetail <set>
+      pd_piid = #{item.pd_piid},
+      pd_inoutno = #{item.pd_inoutno},
+      pd_piclass = #{item.pd_piclass},
+      pd_pdno = #{item.pd_pdno},
+      pd_ordercode = #{item.pd_orderdetno},
+      pd_orderdetno = #{item.pd_unit},
+      pd_prodid = #{item.pd_prodid},
+      pd_prodcode = #{item.pd_prodcode},
+      pd_unit = #{item.pd_unit},
+      pd_inqty = #{item.pd_inqty},
+      pd_outqty = #{item.pd_outqty},
+      pd_orderprice = #{item.pd_orderprice},
+      pd_sendprice = #{item.pd_sendprice},
+      pd_price = #{item.pd_price},
+      pd_total = #{item.pd_total},
+      pd_taxrate= #{item.pd_taxrate},
+      pd_netprice= #{item.pd_netprice},
+      pd_nettotal= #{item.pd_nettotal},
+      pd_whid= #{item.pd_whid},
+      pd_whcode= #{item.pd_whcode},
+      pd_whname= #{item.pd_whname},
+      pd_inwhid= #{item.pd_inwhid},
+      pd_inwhcode= #{item.pd_inwhcode},
+      pd_inwhname= #{item.pd_inwhname},
+      pd_orderid= #{item.pd_orderid},
+      pd_sdid= #{item.pd_sdid},
+      pd_status= #{item.pd_status},
+      pd_remark= #{item.pd_remark},
+      companyId = #{item.companyId},
+      updaterId = #{item.updaterId},
+      updateTime = #{item.updateTime},
+      pd_text1 = #{item.pd_text1},
+      pd_text2 = #{item.pd_text2},
+      pd_text3 = #{item.pd_text3},
+      pd_text4 = #{item.pd_text4},
+      pd_text5 = #{item.pd_text5},
+      pd_ym = #{item.pd_ym},
+      pd_yqty = #{item.pd_yqty}
+    </set>
+      where PD_ID = #{item.id,jdbcType=INTEGER}
+    </foreach>
+  </update>
+
 </mapper>

+ 14 - 14
applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutMapper.xml

@@ -2,7 +2,7 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.usoftchina.saas.purchase.mapper.ProdInOutMapper">
   <resultMap id="BaseResultMap" type="com.usoftchina.saas.purchase.po.ProdInOut">
-    <id column="pi_id" jdbcType="INTEGER" property="pi_id" />
+    <id column="pi_id" jdbcType="INTEGER" property="id" />
     <result column="pi_inoutno" jdbcType="VARCHAR" property="pi_inoutno" />
     <result column="pi_class" jdbcType="VARCHAR" property="pi_class" />
     <result column="pi_date" jdbcType="TIMESTAMP" property="pi_date" />
@@ -24,9 +24,9 @@
     <result column="pi_statuscode" jdbcType="VARCHAR" property="pi_statuscode" />
     <result column="pi_printstatus" jdbcType="VARCHAR" property="pi_printstatus" />
     <result column="pi_printstatuscode" jdbcType="VARCHAR" property="pi_printstatuscode" />
-    <result column="companyid" jdbcType="INTEGER" property="companyid" />
-    <result column="updaterid" jdbcType="INTEGER" property="updaterid" />
-    <result column="updatetime" jdbcType="TIMESTAMP" property="updatetime" />
+    <result column="companyid" jdbcType="INTEGER" property="companyId" />
+    <result column="updaterid" jdbcType="INTEGER" property="updaterId" />
+    <result column="updatetime" jdbcType="TIMESTAMP" property="updateTime" />
     <result column="pi_text1" jdbcType="VARCHAR" property="pi_text1" />
     <result column="pi_text2" jdbcType="VARCHAR" property="pi_text2" />
     <result column="pi_text3" jdbcType="VARCHAR" property="pi_text3" />
@@ -176,7 +176,7 @@
       #{pi_address,jdbcType=LONGVARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.saas.purchase.po.ProdInOut">
-    <selectKey resultType="java.lang.Long" keyProperty="pi_id">
+    <selectKey resultType="java.lang.Long" keyProperty="id">
       SELECT LAST_INSERT_ID() AS ID
     </selectKey>
     insert into prodinout
@@ -245,13 +245,13 @@
       <if test="pi_printstatuscode != null">
         pi_printstatuscode,
       </if>
-      <if test="companyid != null">
+      <if test="companyId != null">
         companyid,
       </if>
-      <if test="updaterid != null">
+      <if test="updaterId != null">
         updaterid,
       </if>
-      <if test="updatetime != null">
+      <if test="updateTime != null">
         updatetime,
       </if>
       <if test="pi_text1 != null">
@@ -338,14 +338,14 @@
       <if test="pi_printstatuscode != null">
         #{pi_printstatuscode,jdbcType=VARCHAR},
       </if>
-      <if test="companyid != null">
-        #{companyid,jdbcType=INTEGER},
+      <if test="companyId != null">
+        #{companyId,jdbcType=INTEGER},
       </if>
-      <if test="updaterid != null">
-        #{updaterid,jdbcType=INTEGER},
+      <if test="updaterId != null">
+        #{updaterId,jdbcType=INTEGER},
       </if>
-      <if test="updatetime != null">
-        #{updatetime,jdbcType=TIMESTAMP},
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
       </if>
       <if test="pi_text1 != null">
         #{pi_text1,jdbcType=VARCHAR},