Browse Source

Merge branch 'dev' of ssh://10.10.100.21/source/saas-platform into dev

zhoudw 7 years ago
parent
commit
a5e90d5f24
23 changed files with 2321 additions and 54 deletions
  1. 1 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java
  2. 2 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/DocumentApplication.java
  3. 1 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/AddressController.java
  4. 1 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/CustomerkindController.java
  5. 1 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductbrandController.java
  6. 1 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProducttypeController.java
  7. 1 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/VendorkindController.java
  8. 2 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/AddressMapper.java
  9. 2 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomerkindMapper.java
  10. 2 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProductbrandMapper.java
  11. 2 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/VendorkindMapper.java
  12. 4 4
      applications/document/document-server/src/main/resources/mapper/AddressMapper.xml
  13. 4 4
      applications/document/document-server/src/main/resources/mapper/CustomerkindMapper.xml
  14. 4 4
      applications/document/document-server/src/main/resources/mapper/ProductbrandMapper.xml
  15. 4 4
      applications/document/document-server/src/main/resources/mapper/ProducttypeMapper.xml
  16. 4 4
      applications/document/document-server/src/main/resources/mapper/VendorkindMapper.xml
  17. 6 6
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java
  18. 133 8
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/controller/ProdInOutController.java
  19. 1 5
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/mapper/ProdInOutListMapper.java
  20. 2 2
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/ProdInoutServiceImpl.java
  21. 1309 0
      applications/storage/storage-server/src/main/resources/mapper/ProdIODetailMapper.xml
  22. 114 0
      applications/storage/storage-server/src/main/resources/mapper/ProdInOutListMapper.xml
  23. 720 0
      applications/storage/storage-server/src/main/resources/mapper/ProdInOutMapper.xml

+ 1 - 0
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java

@@ -32,6 +32,7 @@ public enum BizExceptionCode implements BaseExceptionCode {
     //资金
     //资金
 
 
     //库存
     //库存
+    EMPTY_DATA(76100,"数据为空,请填写后再保存"),
 
 
     ;
     ;
     private int code;
     private int code;

+ 2 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/DocumentApplication.java

@@ -4,12 +4,14 @@ import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
 import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
+import org.springframework.cloud.openfeign.EnableFeignClients;
 import org.springframework.transaction.annotation.EnableTransactionManagement;
 import org.springframework.transaction.annotation.EnableTransactionManagement;
 
 
 @SpringBootApplication
 @SpringBootApplication
 @EnableEurekaClient
 @EnableEurekaClient
 //@EnableAuthClient
 //@EnableAuthClient
 @EnableTransactionManagement
 @EnableTransactionManagement
+@EnableFeignClients
 @MapperScan("com.usoftchina.saas.document.mapper")
 @MapperScan("com.usoftchina.saas.document.mapper")
 public class DocumentApplication {
 public class DocumentApplication {
 
 

+ 1 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/AddressController.java

@@ -16,7 +16,7 @@ public class AddressController {
     private AddressService addressService;
     private AddressService addressService;
 
 
     @PostMapping("/save")
     @PostMapping("/save")
-    public Result save(Address address){
+    public Result save(@RequestBody Address address){
         addressService.save(address);
         addressService.save(address);
         return Result.success();
         return Result.success();
     }
     }

+ 1 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/CustomerkindController.java

@@ -17,7 +17,7 @@ public class CustomerkindController {
     private CustomerkindService customerkindService;
     private CustomerkindService customerkindService;
 
 
     @PostMapping("/save")
     @PostMapping("/save")
-    public Result save(Customerkind customerkind){
+    public Result save(@RequestBody Customerkind customerkind){
         customerkindService.save(customerkind);
         customerkindService.save(customerkind);
         return Result.success();
         return Result.success();
     }
     }

+ 1 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductbrandController.java

@@ -21,7 +21,7 @@ public class ProductbrandController {
      * @return
      * @return
      */
      */
     @PostMapping("/save")
     @PostMapping("/save")
-    public Result save(Productbrand productbrand){
+    public Result save(@RequestBody Productbrand productbrand){
         productbrandService.save(productbrand);
         productbrandService.save(productbrand);
         return Result.success();
         return Result.success();
     }
     }

+ 1 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProducttypeController.java

@@ -22,7 +22,7 @@ public class ProducttypeController {
     }
     }
 
 
     @PostMapping("/save")
     @PostMapping("/save")
-    public Result save(Producttype producttype){
+    public Result save(@RequestBody Producttype producttype){
         producttypeService.save(producttype);
         producttypeService.save(producttype);
         return Result.success();
         return Result.success();
     }
     }

+ 1 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/VendorkindController.java

@@ -16,7 +16,7 @@ public class VendorkindController {
     private VendorkindService vendorkindService;
     private VendorkindService vendorkindService;
 
 
     @PostMapping("/save")
     @PostMapping("/save")
-    public Result save(Vendorkind vendorkind){
+    public Result save(@RequestBody Vendorkind vendorkind){
         vendorkindService.save(vendorkind);
         vendorkindService.save(vendorkind);
         return Result.success();
         return Result.success();
     }
     }

+ 2 - 2
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/AddressMapper.java

@@ -6,13 +6,13 @@ import java.util.List;
 
 
 public interface AddressMapper extends CommonBaseMapper<Address> {
 public interface AddressMapper extends CommonBaseMapper<Address> {
 
 
-    int deleteByPrimaryKey(Long ad_id);
+    int deleteByPrimaryKey(Long id);
 
 
     int insert(Address record);
     int insert(Address record);
 
 
     int insertSelective(Address record);
     int insertSelective(Address record);
 
 
-    Address selectByPrimaryKey(Long ad_id);
+    Address selectByPrimaryKey(Long id);
 
 
     int updateByPrimaryKeySelective(Address record);
     int updateByPrimaryKeySelective(Address record);
 
 

+ 2 - 2
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomerkindMapper.java

@@ -4,13 +4,13 @@ import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 import com.usoftchina.saas.document.entities.Customerkind;
 import com.usoftchina.saas.document.entities.Customerkind;
 
 
 public interface CustomerkindMapper extends CommonBaseMapper<Customerkind> {
 public interface CustomerkindMapper extends CommonBaseMapper<Customerkind> {
-    int deleteByPrimaryKey(Long ck_id);
+    int deleteByPrimaryKey(Long id);
 
 
     int insert(Customerkind record);
     int insert(Customerkind record);
 
 
     int insertSelective(Customerkind record);
     int insertSelective(Customerkind record);
 
 
-    Customerkind selectByPrimaryKey(Long ck_id);
+    Customerkind selectByPrimaryKey(Long id);
 
 
     int updateByPrimaryKeySelective(Customerkind record);
     int updateByPrimaryKeySelective(Customerkind record);
 
 

+ 2 - 2
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProductbrandMapper.java

@@ -5,13 +5,13 @@ import com.usoftchina.saas.document.entities.Productbrand;
 
 
 public interface ProductbrandMapper extends CommonBaseMapper<Productbrand> {
 public interface ProductbrandMapper extends CommonBaseMapper<Productbrand> {
 
 
-    int deleteByPrimaryKey(Long pb_id);
+    int deleteByPrimaryKey(Long id);
 
 
     int insert(Productbrand record);
     int insert(Productbrand record);
 
 
     int insertSelective(Productbrand record);
     int insertSelective(Productbrand record);
 
 
-    Productbrand selectByPrimaryKey(Long pb_id);
+    Productbrand selectByPrimaryKey(Long id);
 
 
     int updateByPrimaryKeySelective(Productbrand record);
     int updateByPrimaryKeySelective(Productbrand record);
 
 

+ 2 - 2
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/VendorkindMapper.java

@@ -5,13 +5,13 @@ import com.usoftchina.saas.document.entities.Vendorkind;
 
 
 public interface VendorkindMapper extends CommonBaseMapper<Vendorkind> {
 public interface VendorkindMapper extends CommonBaseMapper<Vendorkind> {
 
 
-    int deleteByPrimaryKey(Integer vk_id);
+    int deleteByPrimaryKey(Integer id);
 
 
     int insert(Vendorkind record);
     int insert(Vendorkind record);
 
 
     int insertSelective(Vendorkind record);
     int insertSelective(Vendorkind record);
 
 
-    Vendorkind selectByPrimaryKey(Long vk_id);
+    Vendorkind selectByPrimaryKey(Long id);
 
 
     int updateByPrimaryKeySelective(Vendorkind record);
     int updateByPrimaryKeySelective(Vendorkind record);
 
 

+ 4 - 4
applications/document/document-server/src/main/resources/mapper/AddressMapper.xml

@@ -2,7 +2,7 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.usoftchina.saas.document.mapper.AddressMapper">
 <mapper namespace="com.usoftchina.saas.document.mapper.AddressMapper">
   <resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.Address">
   <resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.Address">
-    <id column="ad_id" jdbcType="INTEGER" property="ad_id" />
+    <id column="ad_id" jdbcType="INTEGER" property="id" />
     <result column="ad_recorddate" jdbcType="TIMESTAMP" property="ad_recorddate" />
     <result column="ad_recorddate" jdbcType="TIMESTAMP" property="ad_recorddate" />
     <result column="companyId" jdbcType="INTEGER" property="companyId" />
     <result column="companyId" jdbcType="INTEGER" property="companyId" />
     <result column="updaterId" jdbcType="INTEGER" property="updaterId" />
     <result column="updaterId" jdbcType="INTEGER" property="updaterId" />
@@ -149,7 +149,7 @@
       ad_text4 = #{ad_text4,jdbcType=VARCHAR},
       ad_text4 = #{ad_text4,jdbcType=VARCHAR},
       ad_text5 = #{ad_text5,jdbcType=VARCHAR},
       ad_text5 = #{ad_text5,jdbcType=VARCHAR},
       ad_address = #{ad_address,jdbcType=LONGVARCHAR}
       ad_address = #{ad_address,jdbcType=LONGVARCHAR}
-    where ad_id = #{ad_id,jdbcType=INTEGER}
+    where ad_id = #{id}
   </update>
   </update>
   <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Address">
   <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Address">
     update address
     update address
@@ -162,11 +162,11 @@
       ad_text3 = #{ad_text3,jdbcType=VARCHAR},
       ad_text3 = #{ad_text3,jdbcType=VARCHAR},
       ad_text4 = #{ad_text4,jdbcType=VARCHAR},
       ad_text4 = #{ad_text4,jdbcType=VARCHAR},
       ad_text5 = #{ad_text5,jdbcType=VARCHAR}
       ad_text5 = #{ad_text5,jdbcType=VARCHAR}
-    where ad_id = #{ad_id,jdbcType=INTEGER}
+    where ad_id = #{id}
   </update>
   </update>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
     delete from address
     delete from address
-    where ad_id = #{ad_id,jdbcType=INTEGER}
+    where ad_id = #{id}
   </delete>
   </delete>
   <delete id="deleteByIds" parameterType="java.lang.String">
   <delete id="deleteByIds" parameterType="java.lang.String">
     delete from address
     delete from address

+ 4 - 4
applications/document/document-server/src/main/resources/mapper/CustomerkindMapper.xml

@@ -15,11 +15,11 @@
     select 
     select 
     <include refid="Base_Column_List" />
     <include refid="Base_Column_List" />
     from customerkind
     from customerkind
-    where ck_id = #{id,jdbcType=INTEGER}
+    where ck_id = #{id}
   </select>
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
     delete from customerkind
     delete from customerkind
-    where ck_id = #{id,jdbcType=INTEGER}
+    where ck_id = #{id}
   </delete>
   </delete>
   <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Customerkind" >
   <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Customerkind" >
     insert into customerkind (ck_name, ck_recordid,
     insert into customerkind (ck_name, ck_recordid,
@@ -103,7 +103,7 @@
         updateTime = #{updateTime,jdbcType=TIMESTAMP},
         updateTime = #{updateTime,jdbcType=TIMESTAMP},
       </if>
       </if>
     </set>
     </set>
-    where ck_id = #{id,jdbcType=INTEGER}
+    where ck_id = #{id}
   </update>
   </update>
   <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Customerkind" >
   <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Customerkind" >
     update customerkind
     update customerkind
@@ -114,7 +114,7 @@
       companyId = #{companyId,jdbcType=INTEGER},
       companyId = #{companyId,jdbcType=INTEGER},
       updaterId = #{updaterId,jdbcType=INTEGER},
       updaterId = #{updaterId,jdbcType=INTEGER},
       updateTime = #{updateTime,jdbcType=TIMESTAMP}
       updateTime = #{updateTime,jdbcType=TIMESTAMP}
-    where ck_id = #{id,jdbcType=INTEGER}
+    where ck_id = #{id}
   </update>
   </update>
   <select id="selectAll" resultMap="BaseResultMap">
   <select id="selectAll" resultMap="BaseResultMap">
     SELECT * FROM CUSTOMERKIND
     SELECT * FROM CUSTOMERKIND

+ 4 - 4
applications/document/document-server/src/main/resources/mapper/ProductbrandMapper.xml

@@ -15,11 +15,11 @@
     select 
     select 
     <include refid="Base_Column_List" />
     <include refid="Base_Column_List" />
     from productbrand
     from productbrand
-    where pb_id = #{id,jdbcType=INTEGER}
+    where pb_id = #{id}
   </select>
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
     delete from productbrand
     delete from productbrand
-    where pb_id = #{id,jdbcType=INTEGER}
+    where pb_id = #{id}
   </delete>
   </delete>
   <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Productbrand" >
   <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Productbrand" >
     insert into productbrand (pb_name, pb_recordid,
     insert into productbrand (pb_name, pb_recordid,
@@ -103,7 +103,7 @@
         updateTime = #{updateTime,jdbcType=TIMESTAMP},
         updateTime = #{updateTime,jdbcType=TIMESTAMP},
       </if>
       </if>
     </set>
     </set>
-    where pb_id = #{id,jdbcType=INTEGER}
+    where pb_id = #{id}
   </update>
   </update>
   <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Productbrand" >
   <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Productbrand" >
     update productbrand
     update productbrand
@@ -114,7 +114,7 @@
       companyId = #{companyId,jdbcType=INTEGER},
       companyId = #{companyId,jdbcType=INTEGER},
       updaterId = #{updaterId,jdbcType=INTEGER},
       updaterId = #{updaterId,jdbcType=INTEGER},
       updateTime = #{updateTime,jdbcType=TIMESTAMP}
       updateTime = #{updateTime,jdbcType=TIMESTAMP}
-    where pb_id = #{id,jdbcType=INTEGER}
+    where pb_id = #{id}
   </update>
   </update>
   <select id="selectAll" resultMap="BaseResultMap">
   <select id="selectAll" resultMap="BaseResultMap">
     SELECT * FROM PRODUCTBRAND
     SELECT * FROM PRODUCTBRAND

+ 4 - 4
applications/document/document-server/src/main/resources/mapper/ProducttypeMapper.xml

@@ -18,7 +18,7 @@
     select 
     select 
     <include refid="Base_Column_List" />
     <include refid="Base_Column_List" />
     from producttype
     from producttype
-    where pt_id = #{id,jdbcType=INTEGER}
+    where pt_id = #{id}
   </select>
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
     delete from producttype
     delete from producttype
@@ -106,7 +106,7 @@
         updateTime = #{updateTime,jdbcType=TIMESTAMP},
         updateTime = #{updateTime,jdbcType=TIMESTAMP},
       </if>
       </if>
     </set>
     </set>
-    where pt_id = #{id,jdbcType=INTEGER}
+    where pt_id = #{id}
   </update>
   </update>
   <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Producttype">
   <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Producttype">
     update producttype
     update producttype
@@ -117,9 +117,9 @@
       companyId = #{companyId,jdbcType=INTEGER},
       companyId = #{companyId,jdbcType=INTEGER},
       updaterId = #{updaterId,jdbcType=INTEGER},
       updaterId = #{updaterId,jdbcType=INTEGER},
       updateTime = #{updateTime,jdbcType=TIMESTAMP}
       updateTime = #{updateTime,jdbcType=TIMESTAMP}
-    where pt_id = #{id,jdbcType=INTEGER}
+    where pt_id = #{id}
   </update>
   </update>
-  <select id="selectAll" resultMap="com.usoftchina.saas.document.entities.Producttype">
+  <select id="selectAll" resultMap="BaseResultMap">
     SELECT * FROM PRODUCTTYPE
     SELECT * FROM PRODUCTTYPE
   </select>
   </select>
 </mapper>
 </mapper>

+ 4 - 4
applications/document/document-server/src/main/resources/mapper/VendorkindMapper.xml

@@ -18,11 +18,11 @@
     select
     select
     <include refid="Base_Column_List" />
     <include refid="Base_Column_List" />
     from vendorkind
     from vendorkind
-    where vk_id = #{id,jdbcType=INTEGER}
+    where vk_id = #{id}
   </select>
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
     delete from vendorkind
     delete from vendorkind
-    where vk_id = #{id,jdbcType=INTEGER}
+    where vk_id = #{id}
   </delete>
   </delete>
   <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Vendorkind">
   <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Vendorkind">
     insert into vendorkind (vk_name, vk_recordid,
     insert into vendorkind (vk_name, vk_recordid,
@@ -106,7 +106,7 @@
         updateTime = #{updateTime,jdbcType=TIMESTAMP},
         updateTime = #{updateTime,jdbcType=TIMESTAMP},
       </if>
       </if>
     </set>
     </set>
-    where vk_id = #{id,jdbcType=INTEGER}
+    where vk_id = #{id}
   </update>
   </update>
   <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Vendorkind">
   <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Vendorkind">
     update vendorkind
     update vendorkind
@@ -117,7 +117,7 @@
     companyId = #{companyId,jdbcType=INTEGER},
     companyId = #{companyId,jdbcType=INTEGER},
     updaterId = #{updaterId,jdbcType=INTEGER},
     updaterId = #{updaterId,jdbcType=INTEGER},
     updateTime = #{updateTime,jdbcType=TIMESTAMP}
     updateTime = #{updateTime,jdbcType=TIMESTAMP}
-    where vk_id = #{id,jdbcType=INTEGER}
+    where vk_id = #{id}
   </update>
   </update>
   <select id="selectAll" resultMap="BaseResultMap">
   <select id="selectAll" resultMap="BaseResultMap">
     SELECT * FROM VENDORKIND
     SELECT * FROM VENDORKIND

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

@@ -290,15 +290,15 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
             //构造更新对象
             //构造更新对象
             purchase = new Purchase();
             purchase = new Purchase();
             purchase.setId(id);
             purchase.setId(id);
-            purchase.setPu_acceptstatuscode("UNTURNIN");
-            purchase.setPu_acceptstatus("未入库");
+            purchase.setPu_acceptstatuscode(Status.UNTURNIN.name());
+            purchase.setPu_acceptstatus(Status.UNTURNIN.getDisplay());
             if(partTurnCount > 0){
             if(partTurnCount > 0){
-                purchase.setPu_acceptstatuscode("PART2IN");
-                purchase.setPu_acceptstatus("部分入库");
+                purchase.setPu_acceptstatuscode(Status.PART2IN.name());
+                purchase.setPu_acceptstatus(Status.PART2IN.getDisplay());
             }
             }
             if(turnCount == purchaseDetailList.size()){
             if(turnCount == purchaseDetailList.size()){
-                purchase.setPu_acceptstatus("已入库");
-                purchase.setPu_acceptstatuscode("TURNIN");
+                purchase.setPu_acceptstatus(Status.TURNIN.getDisplay());
+                purchase.setPu_acceptstatuscode(Status.TURNIN.name());
             }
             }
             purchaseMapper.updateByPrimaryKeySelective(purchase);
             purchaseMapper.updateByPrimaryKeySelective(purchase);
             DocBaseDTO docBaseDTO = getBaseDTOById(id);
             DocBaseDTO docBaseDTO = getBaseDTOById(id);

+ 133 - 8
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/controller/ProdInOutController.java

@@ -1,12 +1,16 @@
 package com.usoftchina.saas.storage.controller;
 package com.usoftchina.saas.storage.controller;
 
 
-import com.netflix.discovery.converters.Auto;
+import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.base.Result;
-import com.usoftchina.saas.storage.entities.ProdInOut;
+import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
+import com.usoftchina.saas.commons.dto.DocSavedDTO;
+import com.usoftchina.saas.page.PageRequest;
+import com.usoftchina.saas.storage.dto.ProdInOutFormDTO;
+import com.usoftchina.saas.storage.dto.ProdInOutReqDTO;
+import com.usoftchina.saas.storage.entities.ProdInOutList;
 import com.usoftchina.saas.storage.service.ProdInOutService;
 import com.usoftchina.saas.storage.service.ProdInOutService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 
 import java.util.List;
 import java.util.List;
 
 
@@ -17,12 +21,133 @@ public class ProdInOutController {
     @Autowired
     @Autowired
     public ProdInOutService prodInOutService;
     public ProdInOutService prodInOutService;
 
 
-    @RequestMapping("/getAll")
-    public Result<ProdInOut> getAll(){
-        List<ProdInOut> prodInOutList = prodInOutService.findAll();
-        return Result.success(prodInOutList);
+    /**
+     * 出入库订单列表
+     *
+     * @param page
+     * @param req
+     * @return
+     */
+    @GetMapping("/list")
+    public Result<PageInfo<ProdInOutList>> getListData(PageRequest page, ProdInOutReqDTO req) {
+        PageInfo<ProdInOutList> listData = prodInOutService.getListData(page,req);
+        return Result.success(listData);
     }
     }
 
 
+    /**
+     * 获取出入库单表单
+     *
+     * @return
+     */
+    @GetMapping("/read/{id}")
+    public Result<ProdInOutFormDTO> getFormData(@PathVariable("id") Long id) {
+        ProdInOutFormDTO data = prodInOutService.getFormData(id);
+        return Result.success(data);
+    }
+
+    /**
+     * 出入库单表单保存
+     *
+     * @param
+     * @return
+     */
+    @PostMapping("/save")
+    public Result<DocSavedDTO> saveFormData(@RequestBody ProdInOutFormDTO data) {
+        DocSavedDTO savedDTO = prodInOutService.saveFormData(data,false);
+        return Result.success(savedDTO);
+    }
+
+    /**
+     * 出入库单删除
+     *
+     * @param id
+     * @return
+     */
+    @GetMapping("/delete/{id}")
+    public Result delete(@PathVariable("id") Long id) {
+        prodInOutService.delete(id);
+        return Result.success();
+    }
+
+    /**
+     * 出入库单明细删除
+     *
+     * @param id
+     * @return
+     */
+    @GetMapping("/deleteItem/{id}")
+    public Result deleteItem(@PathVariable("id") Long id) {
+        prodInOutService.deleteItem(id);
+        return Result.success();
+    }
+
+
+    /**
+     * 出入库单审批
+     *
+     * @param formData
+     * @return
+     */
+    @PostMapping("/audit")
+    public Result audit(@RequestBody ProdInOutFormDTO formData) {
+        DocSavedDTO audit = prodInOutService.audit(formData);
+        return Result.success(audit);
+    }
+
+    /**
+     * 出入库单审批
+     *
+     * @param id
+     * @return
+     */
+    @GetMapping("/unAudit/{id}")
+    public Result unAudit(@PathVariable("id") Long id) {
+        prodInOutService.unAudit(id);
+        return Result.success();
+    }
+
+    /**
+     * 出入库单批量审核/反审核
+     *
+     * @param baseDTOs
+     * @return
+     */
+    @PostMapping("/batchAudit")
+    public Result batchAudit(@RequestBody BatchDealBaseDTO baseDTOs) {
+        prodInOutService.batchAudit(baseDTOs);
+        return Result.success();
+    }
+
+    /**
+     * 出入库单批量反审核
+     *
+     * @param baseDTOs
+     * @return
+     */
+    @PostMapping("/batchUnAudit")
+    public Result batchUnAudit(@RequestBody BatchDealBaseDTO baseDTOs) {
+        prodInOutService.batchAudit(baseDTOs);
+        return Result.success();
+    }
+
+
+    /**
+     * 出入库单批量删除
+     *
+     * @param baseDTOs
+     * @return
+     */
+    @PostMapping("/batchDelete")
+    public Result batchDelete(@RequestBody BatchDealBaseDTO baseDTOs) {
+        prodInOutService.batchDelete(baseDTOs);
+        return Result.success();
+    }
+
+    @GetMapping("/turnProdOut/{id}")
+    public Result turnProdin(@PathVariable("id") Long id){
+        prodInOutService.turnProdOut(id);
+        return Result.success();
+    };
 
 
 
 
 }
 }

+ 1 - 5
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/mapper/ProdInOutListMapper.java

@@ -6,15 +6,11 @@ import com.usoftchina.saas.storage.entities.ProdInOutList;
 
 
 import java.util.List;
 import java.util.List;
 
 
-/**
- * Created by zdw
- * 2018-10-18 16:57.
- */
+
 public interface ProdInOutListMapper {
 public interface ProdInOutListMapper {
 
 
     List<ProdInOutList> selectProdInOutListByCondition(ProdInOutReqDTO reqDTO);
     List<ProdInOutList> selectProdInOutListByCondition(ProdInOutReqDTO reqDTO);
 
 
     List<ProdInOutList> selectProdInOutBycondition(ProdInOutReqDTO reqDTO);
     List<ProdInOutList> selectProdInOutBycondition(ProdInOutReqDTO reqDTO);
 
 
-
 }
 }

+ 2 - 2
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/ProdInoutServiceImpl.java

@@ -8,6 +8,7 @@ import com.usoftchina.saas.commons.api.MaxnumberService;
 import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.DocSavedDTO;
 import com.usoftchina.saas.commons.dto.DocSavedDTO;
+import com.usoftchina.saas.commons.exception.BizExceptionCode;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.api.WarehouseApi;
 import com.usoftchina.saas.document.api.WarehouseApi;
 import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.exception.BizException;
@@ -46,7 +47,6 @@ public class ProdInoutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
 
 
     @Override
     @Override
     public PageInfo<ProdInOutList> getListData(PageRequest page, ProdInOutReqDTO req) {
     public PageInfo<ProdInOutList> getListData(PageRequest page, ProdInOutReqDTO req) {
-        //设置默认分页
         //设置默认分页
         //设置默认分页
         if (null == page || page.getSize() == 0 || page.getNumber() == 0) {
         if (null == page || page.getSize() == 0 || page.getNumber() == 0) {
             page = new PageRequest();
             page = new PageRequest();
@@ -91,7 +91,7 @@ public class ProdInoutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
     @Override
     @Override
     public DocSavedDTO saveFormData(ProdInOutFormDTO formdata, Boolean isbfaudit) {
     public DocSavedDTO saveFormData(ProdInOutFormDTO formdata, Boolean isbfaudit) {
         if (null == formdata || null == formdata.getMain()){
         if (null == formdata || null == formdata.getMain()){
-            throw new BizException(500, "数据为空,请填写后再保存");
+            throw new BizException(BizExceptionCode.EMPTY_DATA);
         }
         }
         //公司ID
         //公司ID
         Long companyId = BaseContextHolder.getCompanyId();
         Long companyId = BaseContextHolder.getCompanyId();

+ 1309 - 0
applications/storage/storage-server/src/main/resources/mapper/ProdIODetailMapper.xml

@@ -0,0 +1,1309 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!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.storage.entities.ProdIODetail">
+    <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" />
+    <result column="pd_pdno" jdbcType="INTEGER" property="pd_pdno" />
+    <result column="pd_ordercode" jdbcType="VARCHAR" property="pd_ordercode" />
+    <result column="pd_orderdetno" jdbcType="INTEGER" property="pd_orderdetno" />
+    <result column="pd_prodid" jdbcType="INTEGER" property="pd_prodid" />
+    <result column="pd_prodcode" jdbcType="VARCHAR" property="pd_prodcode" />
+    <result column="pd_unit" jdbcType="VARCHAR" property="pd_unit" />
+    <result column="pd_inqty" jdbcType="INTEGER" property="pd_inqty" />
+    <result column="pd_outqty" jdbcType="INTEGER" property="pd_outqty" />
+    <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="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" />
+    <result column="pd_whid" jdbcType="INTEGER" property="pd_whid" />
+    <result column="pd_whcode" jdbcType="VARCHAR" property="pd_whcode" />
+    <result column="pd_whname" jdbcType="VARCHAR" property="pd_whname" />
+    <result column="pd_inwhid" jdbcType="INTEGER" property="pd_inwhid" />
+    <result column="pd_inwhcode" jdbcType="VARCHAR" property="pd_inwhcode" />
+    <result column="pd_inwhname" jdbcType="VARCHAR" property="pd_inwhname" />
+    <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="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" />
+    <result column="pd_text4" jdbcType="VARCHAR" property="pd_text4" />
+    <result column="pd_text5" jdbcType="VARCHAR" property="pd_text5" />
+    <result column="pd_ym" jdbcType="INTEGER" property="pd_ym" />
+    <result column="pd_yqty" jdbcType="INTEGER" property="pd_yqty" />
+    <result column="pd_ioid" jdbcType="INTEGER" property="pd_ioid" />
+    <association property="product" javaType="com.usoftchina.saas.document.entities.Product">
+      <id column="pr_id" property="id"/>
+      <result column="pr_code" property="pr_code"/>
+      <result column="pr_detail" property="pr_detail"/>
+      <result column="pr_spec" property="pr_spec"/>
+      <result column="pr_unit" property="pr_unit"/>
+      <result column="pr_kind" property="pr_kind"/>
+      <result column="pr_orispeccode" property="pr_orispeccode"/>
+      <result column="pr_whid" property="pr_whid"/>
+      <result column="pr_whcode" property="pr_whcode"/>
+      <result column="pr_whname" property="pr_whname"/>
+      <result column="pr_zxbzs" property="pr_zxbzs"/>
+      <result column="pr_leadtime" property="pr_leadtime"/>
+      <result column="pr_brand" property="pr_brand"/>
+      <result column="pr_standardprice" property="pr_standardprice"/>
+      <result column="pr_purcprice" property="pr_purcprice"/>
+      <result column="pr_saleprice" property="pr_saleprice"/>
+      <result column="pr_vendid" property="pr_vendid"/>
+      <result column="pr_vendname" property="pr_vendname"/>
+      <result column="pr_vendcode" property="pr_vendcode"/>
+      <result column="pr_docdate" property="pr_docdate"/>
+      <result column="pr_recordmanid" property="pr_recordmanid"/>
+      <result column="pr_recordman" property="pr_recordman"/>
+      <result column="pr_status" property="pr_status"/>
+      <result column="pr_statuscode" property="pr_statuscode"/>
+      <result column="pr_text1" property="pr_text1"/>
+      <result column="pr_text2" property="pr_text2"/>
+      <result column="pr_text3" property="pr_text3"/>
+      <result column="pr_text4" property="pr_text4"/>
+    </association>
+  </resultMap>
+  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.usoftchina.saas.purchase.po.ProdIODetail">
+    <result column="pd_remark" jdbcType="LONGVARCHAR" property="pd_remark" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    pd_id, 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, companyid, updaterid, updatetime, 
+    pd_text1, pd_text2, pd_text3, pd_text4, pd_text5, pd_ym, pd_yqty,pd_ioid
+  </sql>
+  <sql id="Blob_Column_List">
+    pd_remark
+  </sql>
+  <select id="selectByExampleWithBLOBs" parameterType="com.usoftchina.saas.purchase.po.ProdIODetailExample" resultMap="ResultMapWithBLOBs">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from prodiodetail
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByExample" parameterType="com.usoftchina.saas.purchase.po.ProdIODetailExample" resultMap="BaseResultMap">
+    select
+        *
+    from prodiodetail a left join product b on a.pd_prodid = b.pr_id and a.companyid = b.companyid
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
+    select 
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from prodiodetail
+    where pd_id = #{pd_id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from prodiodetail
+    where pd_id = #{pd_id,jdbcType=INTEGER}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.usoftchina.saas.purchase.po.ProdIODetailExample">
+    delete from prodiodetail
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.saas.purchase.po.ProdIODetail">
+    insert into prodiodetail (pd_id, 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, companyid, updaterid, 
+      updatetime, pd_text1, pd_text2, 
+      pd_text3, pd_text4, pd_text5, 
+      pd_ym, pd_yqty, pd_remark,pd_ioid
+      )
+    values (#{pd_id,jdbcType=INTEGER}, #{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=INTEGER}, #{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}, #{pd_remark,jdbcType=LONGVARCHAR},
+      #{pd_ioid,jdbcType=INTEGER}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.purchase.po.ProdIODetail">
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
+    insert into prodiodetail
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="pd_piid != null">
+        pd_piid,
+      </if>
+      <if test="pd_inoutno != null">
+        pd_inoutno,
+      </if>
+      <if test="pd_piclass != null">
+        pd_piclass,
+      </if>
+      <if test="pd_pdno != null">
+        pd_pdno,
+      </if>
+      <if test="pd_ordercode != null">
+        pd_ordercode,
+      </if>
+      <if test="pd_orderdetno != null">
+        pd_orderdetno,
+      </if>
+      <if test="pd_prodid != null">
+        pd_prodid,
+      </if>
+      <if test="pd_prodcode != null">
+        pd_prodcode,
+      </if>
+      <if test="pd_unit != null">
+        pd_unit,
+      </if>
+      <if test="pd_inqty != null">
+        pd_inqty,
+      </if>
+      <if test="pd_outqty != null">
+        pd_outqty,
+      </if>
+      <if test="pd_orderprice != null">
+        pd_orderprice,
+      </if>
+      <if test="pd_sendprice != null">
+        pd_sendprice,
+      </if>
+      <if test="pd_price != null">
+        pd_price,
+      </if>
+      <if test="pd_total != null">
+        pd_total,
+      </if>
+      <if test="pd_taxrate != null">
+        pd_taxrate,
+      </if>
+      <if test="pd_netprice != null">
+        pd_netprice,
+      </if>
+      <if test="pd_nettotal != null">
+        pd_nettotal,
+      </if>
+      <if test="pd_whid != null">
+        pd_whid,
+      </if>
+      <if test="pd_whcode != null">
+        pd_whcode,
+      </if>
+      <if test="pd_whname != null">
+        pd_whname,
+      </if>
+      <if test="pd_inwhid != null">
+        pd_inwhid,
+      </if>
+      <if test="pd_inwhcode != null">
+        pd_inwhcode,
+      </if>
+      <if test="pd_inwhname != null">
+        pd_inwhname,
+      </if>
+      <if test="pd_orderid != null">
+        pd_orderid,
+      </if>
+      <if test="pd_sdid != null">
+        pd_sdid,
+      </if>
+      <if test="pd_status != null">
+        pd_status,
+      </if>
+      <if test="companyId != null">
+        companyid,
+      </if>
+      <if test="updaterId != null">
+        updaterid,
+      </if>
+      <if test="updateTime != null">
+        updatetime,
+      </if>
+      <if test="pd_text1 != null">
+        pd_text1,
+      </if>
+      <if test="pd_text2 != null">
+        pd_text2,
+      </if>
+      <if test="pd_text3 != null">
+        pd_text3,
+      </if>
+      <if test="pd_text4 != null">
+        pd_text4,
+      </if>
+      <if test="pd_text5 != null">
+        pd_text5,
+      </if>
+      <if test="pd_ym != null">
+        pd_ym,
+      </if>
+      <if test="pd_yqty != null">
+        pd_yqty,
+      </if>
+      <if test="pd_remark != null">
+        pd_remark,
+      </if>
+      <if test="pd_ioid != null">
+        pd_ioid,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="pd_piid != null">
+        #{pd_piid,jdbcType=INTEGER},
+      </if>
+      <if test="pd_inoutno != null">
+        #{pd_inoutno,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_piclass != null">
+        #{pd_piclass,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_pdno != null">
+        #{pd_pdno,jdbcType=INTEGER},
+      </if>
+      <if test="pd_ordercode != null">
+        #{pd_ordercode,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_orderdetno != null">
+        #{pd_orderdetno,jdbcType=INTEGER},
+      </if>
+      <if test="pd_prodid != null">
+        #{pd_prodid,jdbcType=INTEGER},
+      </if>
+      <if test="pd_prodcode != null">
+        #{pd_prodcode,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_unit != null">
+        #{pd_unit,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_inqty != null">
+        #{pd_inqty,jdbcType=INTEGER},
+      </if>
+      <if test="pd_outqty != null">
+        #{pd_outqty,jdbcType=INTEGER},
+      </if>
+      <if test="pd_orderprice != null">
+        #{pd_orderprice,jdbcType=DOUBLE},
+      </if>
+      <if test="pd_sendprice != null">
+        #{pd_sendprice,jdbcType=DOUBLE},
+      </if>
+      <if test="pd_price != null">
+        #{pd_price,jdbcType=DOUBLE},
+      </if>
+      <if test="pd_total != null">
+        #{pd_total,jdbcType=DOUBLE},
+      </if>
+      <if test="pd_taxrate != null">
+        #{pd_taxrate,jdbcType=DOUBLE},
+      </if>
+      <if test="pd_netprice != null">
+        #{pd_netprice,jdbcType=DOUBLE},
+      </if>
+      <if test="pd_nettotal != null">
+        #{pd_nettotal,jdbcType=DOUBLE},
+      </if>
+      <if test="pd_whid != null">
+        #{pd_whid,jdbcType=INTEGER},
+      </if>
+      <if test="pd_whcode != null">
+        #{pd_whcode,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_whname != null">
+        #{pd_whname,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_inwhid != null">
+        #{pd_inwhid,jdbcType=INTEGER},
+      </if>
+      <if test="pd_inwhcode != null">
+        #{pd_inwhcode,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_inwhname != null">
+        #{pd_inwhname,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_orderid != null">
+        #{pd_orderid,jdbcType=INTEGER},
+      </if>
+      <if test="pd_sdid != null">
+        #{pd_sdid,jdbcType=INTEGER},
+      </if>
+      <if test="pd_status != null">
+        #{pd_status,jdbcType=INTEGER},
+      </if>
+      <if test="companyId != null">
+        #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null">
+        #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pd_text1 != null">
+        #{pd_text1,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_text2 != null">
+        #{pd_text2,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_text3 != null">
+        #{pd_text3,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_text4 != null">
+        #{pd_text4,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_text5 != null">
+        #{pd_text5,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_ym != null">
+        #{pd_ym,jdbcType=INTEGER},
+      </if>
+      <if test="pd_yqty != null">
+        #{pd_yqty,jdbcType=INTEGER},
+      </if>
+      <if test="pd_remark != null">
+        #{pd_remark,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="pd_ioid != null">
+        #{pd_ioid,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.usoftchina.saas.purchase.po.ProdIODetailExample" resultType="java.lang.Long">
+    select count(*) from prodiodetail
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update prodiodetail
+    <set>
+      <if test="record.pd_id != null">
+        pd_id = #{record.pd_id,jdbcType=INTEGER},
+      </if>
+      <if test="record.pd_piid != null">
+        pd_piid = #{record.pd_piid,jdbcType=INTEGER},
+      </if>
+      <if test="record.pd_inoutno != null">
+        pd_inoutno = #{record.pd_inoutno,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pd_piclass != null">
+        pd_piclass = #{record.pd_piclass,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pd_pdno != null">
+        pd_pdno = #{record.pd_pdno,jdbcType=INTEGER},
+      </if>
+      <if test="record.pd_ordercode != null">
+        pd_ordercode = #{record.pd_ordercode,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pd_orderdetno != null">
+        pd_orderdetno = #{record.pd_orderdetno,jdbcType=INTEGER},
+      </if>
+      <if test="record.pd_prodid != null">
+        pd_prodid = #{record.pd_prodid,jdbcType=INTEGER},
+      </if>
+      <if test="record.pd_prodcode != null">
+        pd_prodcode = #{record.pd_prodcode,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pd_unit != null">
+        pd_unit = #{record.pd_unit,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pd_inqty != null">
+        pd_inqty = #{record.pd_inqty,jdbcType=INTEGER},
+      </if>
+      <if test="record.pd_outqty != null">
+        pd_outqty = #{record.pd_outqty,jdbcType=INTEGER},
+      </if>
+      <if test="record.pd_orderprice != null">
+        pd_orderprice = #{record.pd_orderprice,jdbcType=DOUBLE},
+      </if>
+      <if test="record.pd_sendprice != null">
+        pd_sendprice = #{record.pd_sendprice,jdbcType=DOUBLE},
+      </if>
+      <if test="record.pd_price != null">
+        pd_price = #{record.pd_price,jdbcType=DOUBLE},
+      </if>
+      <if test="record.pd_total != null">
+        pd_total = #{record.pd_total,jdbcType=DOUBLE},
+      </if>
+      <if test="record.pd_taxrate != null">
+        pd_taxrate = #{record.pd_taxrate,jdbcType=DOUBLE},
+      </if>
+      <if test="record.pd_netprice != null">
+        pd_netprice = #{record.pd_netprice,jdbcType=DOUBLE},
+      </if>
+      <if test="record.pd_nettotal != null">
+        pd_nettotal = #{record.pd_nettotal,jdbcType=DOUBLE},
+      </if>
+      <if test="record.pd_whid != null">
+        pd_whid = #{record.pd_whid,jdbcType=INTEGER},
+      </if>
+      <if test="record.pd_whcode != null">
+        pd_whcode = #{record.pd_whcode,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pd_whname != null">
+        pd_whname = #{record.pd_whname,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pd_inwhid != null">
+        pd_inwhid = #{record.pd_inwhid,jdbcType=INTEGER},
+      </if>
+      <if test="record.pd_inwhcode != null">
+        pd_inwhcode = #{record.pd_inwhcode,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pd_inwhname != null">
+        pd_inwhname = #{record.pd_inwhname,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pd_orderid != null">
+        pd_orderid = #{record.pd_orderid,jdbcType=INTEGER},
+      </if>
+      <if test="record.pd_sdid != null">
+        pd_sdid = #{record.pd_sdid,jdbcType=INTEGER},
+      </if>
+      <if test="record.pd_status != null">
+        pd_status = #{record.pd_status,jdbcType=INTEGER},
+      </if>
+      <if test="record.companyid != null">
+        companyid = #{record.companyid,jdbcType=INTEGER},
+      </if>
+      <if test="record.updaterid != null">
+        updaterid = #{record.updaterid,jdbcType=INTEGER},
+      </if>
+      <if test="record.updatetime != null">
+        updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.pd_text1 != null">
+        pd_text1 = #{record.pd_text1,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pd_text2 != null">
+        pd_text2 = #{record.pd_text2,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pd_text3 != null">
+        pd_text3 = #{record.pd_text3,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pd_text4 != null">
+        pd_text4 = #{record.pd_text4,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pd_text5 != null">
+        pd_text5 = #{record.pd_text5,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pd_ym != null">
+        pd_ym = #{record.pd_ym,jdbcType=INTEGER},
+      </if>
+      <if test="record.pd_yqty != null">
+        pd_yqty = #{record.pd_yqty,jdbcType=INTEGER},
+      </if>
+      <if test="record.pd_remark != null">
+        pd_remark = #{record.pd_remark,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="record.pd_ioid != null">
+        pd_ioid = #{record.pd_ioid,jdbcType=INTEGER},
+      </if>
+
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExampleWithBLOBs" parameterType="map">
+    update prodiodetail
+    set pd_id = #{record.pd_id,jdbcType=INTEGER},
+      pd_piid = #{record.pd_piid,jdbcType=INTEGER},
+      pd_inoutno = #{record.pd_inoutno,jdbcType=VARCHAR},
+      pd_piclass = #{record.pd_piclass,jdbcType=VARCHAR},
+      pd_pdno = #{record.pd_pdno,jdbcType=INTEGER},
+      pd_ordercode = #{record.pd_ordercode,jdbcType=VARCHAR},
+      pd_orderdetno = #{record.pd_orderdetno,jdbcType=INTEGER},
+      pd_prodid = #{record.pd_prodid,jdbcType=INTEGER},
+      pd_prodcode = #{record.pd_prodcode,jdbcType=VARCHAR},
+      pd_unit = #{record.pd_unit,jdbcType=VARCHAR},
+      pd_inqty = #{record.pd_inqty,jdbcType=INTEGER},
+      pd_outqty = #{record.pd_outqty,jdbcType=INTEGER},
+      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=DOUBLE},
+      pd_taxrate = #{record.pd_taxrate,jdbcType=DOUBLE},
+      pd_netprice = #{record.pd_netprice,jdbcType=DOUBLE},
+      pd_nettotal = #{record.pd_nettotal,jdbcType=DOUBLE},
+      pd_whid = #{record.pd_whid,jdbcType=INTEGER},
+      pd_whcode = #{record.pd_whcode,jdbcType=VARCHAR},
+      pd_whname = #{record.pd_whname,jdbcType=VARCHAR},
+      pd_inwhid = #{record.pd_inwhid,jdbcType=INTEGER},
+      pd_inwhcode = #{record.pd_inwhcode,jdbcType=VARCHAR},
+      pd_inwhname = #{record.pd_inwhname,jdbcType=VARCHAR},
+      pd_orderid = #{record.pd_orderid,jdbcType=INTEGER},
+      pd_sdid = #{record.pd_sdid,jdbcType=INTEGER},
+      pd_status = #{record.pd_status,jdbcType=INTEGER},
+      companyid = #{record.companyid,jdbcType=INTEGER},
+      updaterid = #{record.updaterid,jdbcType=INTEGER},
+      updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
+      pd_text1 = #{record.pd_text1,jdbcType=VARCHAR},
+      pd_text2 = #{record.pd_text2,jdbcType=VARCHAR},
+      pd_text3 = #{record.pd_text3,jdbcType=VARCHAR},
+      pd_text4 = #{record.pd_text4,jdbcType=VARCHAR},
+      pd_text5 = #{record.pd_text5,jdbcType=VARCHAR},
+      pd_ym = #{record.pd_ym,jdbcType=INTEGER},
+      pd_yqty = #{record.pd_yqty,jdbcType=INTEGER},
+      pd_remark = #{record.pd_remark,jdbcType=LONGVARCHAR},
+      pd_ioid = #{record.pd_ioid,jdbcType=INTEGER}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update prodiodetail
+    set pd_id = #{record.pd_id,jdbcType=INTEGER},
+      pd_piid = #{record.pd_piid,jdbcType=INTEGER},
+      pd_inoutno = #{record.pd_inoutno,jdbcType=VARCHAR},
+      pd_piclass = #{record.pd_piclass,jdbcType=VARCHAR},
+      pd_pdno = #{record.pd_pdno,jdbcType=INTEGER},
+      pd_ordercode = #{record.pd_ordercode,jdbcType=VARCHAR},
+      pd_orderdetno = #{record.pd_orderdetno,jdbcType=INTEGER},
+      pd_prodid = #{record.pd_prodid,jdbcType=INTEGER},
+      pd_prodcode = #{record.pd_prodcode,jdbcType=VARCHAR},
+      pd_unit = #{record.pd_unit,jdbcType=VARCHAR},
+      pd_inqty = #{record.pd_inqty,jdbcType=INTEGER},
+      pd_outqty = #{record.pd_outqty,jdbcType=INTEGER},
+      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=DOUBLE},
+      pd_taxrate = #{record.pd_taxrate,jdbcType=DOUBLE},
+      pd_netprice = #{record.pd_netprice,jdbcType=DOUBLE},
+      pd_nettotal = #{record.pd_nettotal,jdbcType=DOUBLE},
+      pd_whid = #{record.pd_whid,jdbcType=INTEGER},
+      pd_whcode = #{record.pd_whcode,jdbcType=VARCHAR},
+      pd_whname = #{record.pd_whname,jdbcType=VARCHAR},
+      pd_inwhid = #{record.pd_inwhid,jdbcType=INTEGER},
+      pd_inwhcode = #{record.pd_inwhcode,jdbcType=VARCHAR},
+      pd_inwhname = #{record.pd_inwhname,jdbcType=VARCHAR},
+      pd_orderid = #{record.pd_orderid,jdbcType=INTEGER},
+      pd_sdid = #{record.pd_sdid,jdbcType=INTEGER},
+      pd_status = #{record.pd_status,jdbcType=INTEGER},
+      companyid = #{record.companyid,jdbcType=INTEGER},
+      updaterid = #{record.updaterid,jdbcType=INTEGER},
+      updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
+      pd_text1 = #{record.pd_text1,jdbcType=VARCHAR},
+      pd_text2 = #{record.pd_text2,jdbcType=VARCHAR},
+      pd_text3 = #{record.pd_text3,jdbcType=VARCHAR},
+      pd_text4 = #{record.pd_text4,jdbcType=VARCHAR},
+      pd_text5 = #{record.pd_text5,jdbcType=VARCHAR},
+      pd_ym = #{record.pd_ym,jdbcType=INTEGER},
+      pd_yqty = #{record.pd_yqty,jdbcType=INTEGER},
+      pd_ioid = #{record.pd_ioid,jdbcType=INTEGER}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.purchase.po.ProdIODetail">
+    update prodiodetail
+    <set>
+      <if test="pd_piid != null">
+        pd_piid = #{pd_piid,jdbcType=INTEGER},
+      </if>
+      <if test="pd_inoutno != null">
+        pd_inoutno = #{pd_inoutno,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_piclass != null">
+        pd_piclass = #{pd_piclass,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_pdno != null">
+        pd_pdno = #{pd_pdno,jdbcType=INTEGER},
+      </if>
+      <if test="pd_ordercode != null">
+        pd_ordercode = #{pd_ordercode,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_orderdetno != null">
+        pd_orderdetno = #{pd_orderdetno,jdbcType=INTEGER},
+      </if>
+      <if test="pd_prodid != null">
+        pd_prodid = #{pd_prodid,jdbcType=INTEGER},
+      </if>
+      <if test="pd_prodcode != null">
+        pd_prodcode = #{pd_prodcode,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_unit != null">
+        pd_unit = #{pd_unit,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_inqty != null">
+        pd_inqty = #{pd_inqty,jdbcType=INTEGER},
+      </if>
+      <if test="pd_outqty != null">
+        pd_outqty = #{pd_outqty,jdbcType=INTEGER},
+      </if>
+      <if test="pd_orderprice != null">
+        pd_orderprice = #{pd_orderprice,jdbcType=DOUBLE},
+      </if>
+      <if test="pd_sendprice != null">
+        pd_sendprice = #{pd_sendprice,jdbcType=DOUBLE},
+      </if>
+      <if test="pd_price != null">
+        pd_price = #{pd_price,jdbcType=DOUBLE},
+      </if>
+      <if test="pd_total != null">
+        pd_total = #{pd_total,jdbcType=DOUBLE},
+      </if>
+      <if test="pd_taxrate != null">
+        pd_taxrate = #{pd_taxrate,jdbcType=DOUBLE},
+      </if>
+      <if test="pd_netprice != null">
+        pd_netprice = #{pd_netprice,jdbcType=DOUBLE},
+      </if>
+      <if test="pd_nettotal != null">
+        pd_nettotal = #{pd_nettotal,jdbcType=DOUBLE},
+      </if>
+      <if test="pd_whid != null">
+        pd_whid = #{pd_whid,jdbcType=INTEGER},
+      </if>
+      <if test="pd_whcode != null">
+        pd_whcode = #{pd_whcode,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_whname != null">
+        pd_whname = #{pd_whname,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_inwhid != null">
+        pd_inwhid = #{pd_inwhid,jdbcType=INTEGER},
+      </if>
+      <if test="pd_inwhcode != null">
+        pd_inwhcode = #{pd_inwhcode,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_inwhname != null">
+        pd_inwhname = #{pd_inwhname,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_orderid != null">
+        pd_orderid = #{pd_orderid,jdbcType=INTEGER},
+      </if>
+      <if test="pd_sdid != null">
+        pd_sdid = #{pd_sdid,jdbcType=INTEGER},
+      </if>
+      <if test="pd_status != null">
+        pd_status = #{pd_status,jdbcType=INTEGER},
+      </if>
+      <if test="companyId != null">
+        companyid = #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null">
+        updaterid = #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null">
+        updatetime = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pd_text1 != null">
+        pd_text1 = #{pd_text1,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_text2 != null">
+        pd_text2 = #{pd_text2,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_text3 != null">
+        pd_text3 = #{pd_text3,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_text4 != null">
+        pd_text4 = #{pd_text4,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_text5 != null">
+        pd_text5 = #{pd_text5,jdbcType=VARCHAR},
+      </if>
+      <if test="pd_ym != null">
+        pd_ym = #{pd_ym,jdbcType=INTEGER},
+      </if>
+      <if test="pd_yqty != null">
+        pd_yqty = #{pd_yqty,jdbcType=INTEGER},
+      </if>
+      <if test="pd_remark != null">
+        pd_remark = #{pd_remark,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="pd_ioid != null">
+        pd_ioid = #{pd_ioid,jdbcType=LONGVARCHAR},
+      </if>
+    </set>
+    where pd_id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.saas.purchase.po.ProdIODetail">
+    update prodiodetail
+    set pd_piid = #{pd_piid,jdbcType=INTEGER},
+      pd_inoutno = #{pd_inoutno,jdbcType=VARCHAR},
+      pd_piclass = #{pd_piclass,jdbcType=VARCHAR},
+      pd_pdno = #{pd_pdno,jdbcType=INTEGER},
+      pd_ordercode = #{pd_ordercode,jdbcType=VARCHAR},
+      pd_orderdetno = #{pd_orderdetno,jdbcType=INTEGER},
+      pd_prodid = #{pd_prodid,jdbcType=INTEGER},
+      pd_prodcode = #{pd_prodcode,jdbcType=VARCHAR},
+      pd_unit = #{pd_unit,jdbcType=VARCHAR},
+      pd_inqty = #{pd_inqty,jdbcType=INTEGER},
+      pd_outqty = #{pd_outqty,jdbcType=INTEGER},
+      pd_orderprice = #{pd_orderprice,jdbcType=DOUBLE},
+      pd_sendprice = #{pd_sendprice,jdbcType=DOUBLE},
+      pd_price = #{pd_price,jdbcType=DOUBLE},
+      pd_total = #{pd_total,jdbcType=DOUBLE},
+      pd_taxrate = #{pd_taxrate,jdbcType=DOUBLE},
+      pd_netprice = #{pd_netprice,jdbcType=DOUBLE},
+      pd_nettotal = #{pd_nettotal,jdbcType=DOUBLE},
+      pd_whid = #{pd_whid,jdbcType=INTEGER},
+      pd_whcode = #{pd_whcode,jdbcType=VARCHAR},
+      pd_whname = #{pd_whname,jdbcType=VARCHAR},
+      pd_inwhid = #{pd_inwhid,jdbcType=INTEGER},
+      pd_inwhcode = #{pd_inwhcode,jdbcType=VARCHAR},
+      pd_inwhname = #{pd_inwhname,jdbcType=VARCHAR},
+      pd_orderid = #{pd_orderid,jdbcType=INTEGER},
+      pd_sdid = #{pd_sdid,jdbcType=INTEGER},
+      pd_status = #{pd_status,jdbcType=INTEGER},
+      companyid = #{companyid,jdbcType=INTEGER},
+      updaterid = #{updaterid,jdbcType=INTEGER},
+      updatetime = #{updatetime,jdbcType=TIMESTAMP},
+      pd_text1 = #{pd_text1,jdbcType=VARCHAR},
+      pd_text2 = #{pd_text2,jdbcType=VARCHAR},
+      pd_text3 = #{pd_text3,jdbcType=VARCHAR},
+      pd_text4 = #{pd_text4,jdbcType=VARCHAR},
+      pd_text5 = #{pd_text5,jdbcType=VARCHAR},
+      pd_ym = #{pd_ym,jdbcType=INTEGER},
+      pd_yqty = #{pd_yqty,jdbcType=INTEGER},
+      pd_remark = #{pd_remark,jdbcType=LONGVARCHAR},
+      pd_ioid = #{pd_ioid,jdbcType=INTEGER}
+    where pd_id = #{pd_id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.purchase.po.ProdIODetail">
+    update prodiodetail
+    set pd_piid = #{pd_piid,jdbcType=INTEGER},
+      pd_inoutno = #{pd_inoutno,jdbcType=VARCHAR},
+      pd_piclass = #{pd_piclass,jdbcType=VARCHAR},
+      pd_pdno = #{pd_pdno,jdbcType=INTEGER},
+      pd_ordercode = #{pd_ordercode,jdbcType=VARCHAR},
+      pd_orderdetno = #{pd_orderdetno,jdbcType=INTEGER},
+      pd_prodid = #{pd_prodid,jdbcType=INTEGER},
+      pd_prodcode = #{pd_prodcode,jdbcType=VARCHAR},
+      pd_unit = #{pd_unit,jdbcType=VARCHAR},
+      pd_inqty = #{pd_inqty,jdbcType=INTEGER},
+      pd_outqty = #{pd_outqty,jdbcType=INTEGER},
+      pd_orderprice = #{pd_orderprice,jdbcType=DOUBLE},
+      pd_sendprice = #{pd_sendprice,jdbcType=DOUBLE},
+      pd_price = #{pd_price,jdbcType=DOUBLE},
+      pd_total = #{pd_total,jdbcType=DOUBLE},
+      pd_taxrate = #{pd_taxrate,jdbcType=DOUBLE},
+      pd_netprice = #{pd_netprice,jdbcType=DOUBLE},
+      pd_nettotal = #{pd_nettotal,jdbcType=DOUBLE},
+      pd_whid = #{pd_whid,jdbcType=INTEGER},
+      pd_whcode = #{pd_whcode,jdbcType=VARCHAR},
+      pd_whname = #{pd_whname,jdbcType=VARCHAR},
+      pd_inwhid = #{pd_inwhid,jdbcType=INTEGER},
+      pd_inwhcode = #{pd_inwhcode,jdbcType=VARCHAR},
+      pd_inwhname = #{pd_inwhname,jdbcType=VARCHAR},
+      pd_orderid = #{pd_orderid,jdbcType=INTEGER},
+      pd_sdid = #{pd_sdid,jdbcType=INTEGER},
+      pd_status = #{pd_status,jdbcType=INTEGER},
+      companyid = #{companyid,jdbcType=INTEGER},
+      updaterid = #{updaterid,jdbcType=INTEGER},
+      updatetime = #{updatetime,jdbcType=TIMESTAMP},
+      pd_text1 = #{pd_text1,jdbcType=VARCHAR},
+      pd_text2 = #{pd_text2,jdbcType=VARCHAR},
+      pd_text3 = #{pd_text3,jdbcType=VARCHAR},
+      pd_text4 = #{pd_text4,jdbcType=VARCHAR},
+      pd_text5 = #{pd_text5,jdbcType=VARCHAR},
+      pd_ym = #{pd_ym,jdbcType=INTEGER},
+      pd_yqty = #{pd_yqty,jdbcType=INTEGER},
+      pd_ioid = #{pd_ioid,jdbcType=INTEGER}
+    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},#{item.pd_inoutno,jdbcType=VARCHAR},#{item.pd_piclass,jdbcType=VARCHAR},#{item.pd_pdno,jdbcType=INTEGER},#{item.pd_ordercode,jdbcType=VARCHAR},
+      #{item.pd_orderdetno,jdbcType=INTEGER},#{item.pd_prodid,jdbcType=INTEGER},#{item.pd_prodcode,jdbcType=VARCHAR},#{item.pd_unit,jdbcType=VARCHAR},
+      #{item.pd_inqty,jdbcType=INTEGER},#{item.pd_outqty,jdbcType=INTEGER},#{item.pd_orderprice,jdbcType=DOUBLE},#{item.pd_sendprice,jdbcType=DOUBLE},#{item.pd_price,jdbcType=DOUBLE},
+      #{item.pd_total,jdbcType=DOUBLE},#{item.pd_taxrate,jdbcType=DOUBLE},#{item.pd_netprice,jdbcType=DOUBLE},#{item.pd_nettotal,jdbcType=DOUBLE},
+      #{item.pd_whid,jdbcType=INTEGER},#{item.pd_whcode,jdbcType=VARCHAR},#{item.pd_whname,jdbcType=VARCHAR},#{item.pd_inwhid,jdbcType=INTEGER},#{item.pd_inwhcode,jdbcType=VARCHAR},
+      #{item.pd_inwhname,jdbcType=VARCHAR},#{item.pd_orderid,jdbcType=INTEGER},#{item.pd_sdid,jdbcType=INTEGER},#{item.pd_status,jdbcType=VARCHAR},#{item.pd_remark,jdbcType=VARCHAR},
+      #{item.companyId,jdbcType=INTEGER},#{item.updaterId,jdbcType=INTEGER},#{item.updateTime,jdbcType=TIMESTAMP},#{item.pd_text1,jdbcType=VARCHAR},#{item.pd_text2,jdbcType=VARCHAR},
+      #{item.pd_text3,jdbcType=VARCHAR},#{item.pd_text4,jdbcType=VARCHAR},#{item.pd_text5,jdbcType=VARCHAR},#{item.pd_ym,jdbcType=INTEGER},#{item.pd_yqty,jdbcType=INTEGER}
+      )
+    </foreach>
+  </insert>
+
+  <insert id="batchInsert1" parameterType="java.util.List" >
+    <foreach collection="list" item="item" index="index" open="" close="" separator=",">
+      insert into prodiodetail
+      <trim prefix="(" suffix=")" suffixOverrides=",">
+        <if test="item.pd_piid != null">
+          pd_piid,
+        </if>
+        <if test="item.pd_inoutno != null">
+          pd_inoutno,
+        </if>
+        <if test="item.pd_piclass != null">
+          pd_piclass,
+        </if>
+        <if test="item.pd_pdno != null">
+          pd_pdno,
+        </if>
+        <if test="item.pd_ordercode != null">
+          pd_ordercode,
+        </if>
+        <if test="item.pd_orderdetno != null">
+          pd_orderdetno,
+        </if>
+        <if test="item.pd_prodid != null">
+          pd_prodid,
+        </if>
+        <if test="item.pd_prodcode != null">
+          pd_prodcode,
+        </if>
+        <if test="item.pd_unit != null">
+          pd_unit,
+        </if>
+        <if test="item.pd_inqty != null">
+          pd_inqty,
+        </if>
+        <if test="item.pd_outqty != null">
+          pd_outqty,
+        </if>
+        <if test="item.pd_orderprice != null">
+          pd_orderprice,
+        </if>
+        <if test="item.pd_sendprice != null">
+          pd_sendprice,
+        </if>
+        <if test="item.pd_price != null">
+          pd_price,
+        </if>
+        <if test="item.pd_total != null">
+          pd_total,
+        </if>
+        <if test="item.pd_taxrate != null">
+          pd_taxrate,
+        </if>
+        <if test="item.pd_netprice != null">
+          pd_netprice,
+        </if>
+        <if test="item.pd_nettotal != null">
+          pd_nettotal,
+        </if>
+        <if test="item.pd_whid != null">
+          pd_whid,
+        </if>
+        <if test="item.pd_whcode != null">
+          pd_whcode,
+        </if>
+        <if test="item.pd_whname != null">
+          pd_whname,
+        </if>
+        <if test="item.pd_inwhid != null">
+          pd_inwhid,
+        </if>
+        <if test="item.pd_inwhcode != null">
+          pd_inwhcode,
+        </if>
+        <if test="item.pd_inwhname != null">
+          pd_inwhname,
+        </if>
+        <if test="item.pd_orderid != null">
+          pd_orderid,
+        </if>
+        <if test="item.pd_sdid != null">
+          pd_sdid,
+        </if>
+        <if test="item.pd_status != null">
+          pd_status,
+        </if>
+        <if test="item.companyId != null">
+          companyid,
+        </if>
+        <if test="item.updaterId != null">
+          updaterid,
+        </if>
+        <if test="item.updateTime != null">
+          updatetime,
+        </if>
+        <if test="item.pd_text1 != null">
+          pd_text1,
+        </if>
+        <if test="item.pd_text2 != null">
+          pd_text2,
+        </if>
+        <if test="item.pd_text3 != null">
+          pd_text3,
+        </if>
+        <if test="item.pd_text4 != null">
+          pd_text4,
+        </if>
+        <if test="item.pd_text5 != null">
+          pd_text5,
+        </if>
+        <if test="item.pd_ym != null">
+          pd_ym,
+        </if>
+        <if test="item.pd_yqty != null">
+          pd_yqty,
+        </if>
+        <if test="item.pd_remark != null">
+          pd_remark,
+        </if>
+        <if test="item.pd_ioid != null">
+          pd_ioid,
+        </if>
+      </trim>
+      <trim prefix="values (" suffix=")" suffixOverrides=",">
+        <if test="item.pd_piid != null">
+          #{item.pd_piid,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_inoutno != null">
+          #{item.pd_inoutno,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_piclass != null">
+          #{item.pd_piclass,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_pdno != null">
+          #{item.pd_pdno,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_ordercode != null">
+          #{item.pd_ordercode,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_orderdetno != null">
+          #{item.pd_orderdetno,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_prodid != null">
+          #{item.pd_prodid,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_prodcode != null">
+          #{item.pd_prodcode,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_unit != null">
+          #{item.pd_unit,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_inqty != null">
+          #{item.pd_inqty,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_outqty != null">
+          #{item.pd_outqty,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_orderprice != null">
+          #{item.pd_orderprice,jdbcType=DOUBLE},
+        </if>
+        <if test="item.pd_sendprice != null">
+          #{item.pd_sendprice,jdbcType=DOUBLE},
+        </if>
+        <if test="item.pd_price != null">
+          #{item.pd_price,jdbcType=DOUBLE},
+        </if>
+        <if test="item.pd_total != null">
+          #{item.pd_total,jdbcType=DOUBLE},
+        </if>
+        <if test="item.pd_taxrate != null">
+          #{item.pd_taxrate,jdbcType=DOUBLE},
+        </if>
+        <if test="item.pd_netprice != null">
+          #{item.pd_netprice,jdbcType=DOUBLE},
+        </if>
+        <if test="item.pd_nettotal != null">
+          #{item.pd_nettotal,jdbcType=DOUBLE},
+        </if>
+        <if test="item.pd_whid != null">
+          #{item.pd_whid,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_whcode != null">
+          #{item.pd_whcode,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_whname != null">
+          #{item.pd_whname,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_inwhid != null">
+          #{item.pd_inwhid,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_inwhcode != null">
+          #{item.pd_inwhcode,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_inwhname != null">
+          #{item.pd_inwhname,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_orderid != null">
+          #{item.pd_orderid,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_sdid != null">
+          #{item.pd_sdid,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_status != null">
+          #{item.pd_status,jdbcType=INTEGER},
+        </if>
+        <if test="item.companyId != null">
+          #{item.companyId,jdbcType=INTEGER},
+        </if>
+        <if test="item.updaterId != null">
+          #{item.updaterId,jdbcType=INTEGER},
+        </if>
+        <if test="item.updateTime != null">
+          #{item.updateTime,jdbcType=TIMESTAMP},
+        </if>
+        <if test="item.pd_text1 != null">
+          #{item.pd_text1,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_text2 != null">
+          #{item.pd_text2,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_text3 != null">
+          #{item.pd_text3,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_text4 != null">
+          #{item.pd_text4,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_text5 != null">
+          #{item.pd_text5,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_ym != null">
+          #{item.pd_ym,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_yqty != null">
+          #{item.pd_yqty,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_remark != null">
+          #{item.pd_remark,jdbcType=LONGVARCHAR},
+        </if>
+        <if test="item.pd_ioid != null">
+          #{item.pd_ioid,jdbcType=INTEGER},
+        </if>
+      </trim>
+
+    </foreach>
+  </insert>
+
+
+
+
+
+
+
+
+
+  <update id="batchUpdate" parameterType="com.usoftchina.saas.purchase.po.ProdIODetail" >
+    <foreach collection="list" item="item" index="index" open="" close="" separator=";">
+      update prodiodetail <set>
+      <if test="item.pd_piid !=null">
+        pd_piid = #{item.pd_piid},
+      </if>
+      <if test="item.pd_inoutno !=null">
+        pd_inoutno = #{item.pd_inoutno},
+      </if>
+      <if test="item.pd_piclass !=null">
+        pd_piclass = #{item.pd_piclass},
+      </if>
+      <if test="item.pd_pdno !=null">
+        pd_pdno = #{item.pd_pdno},
+      </if>
+      <if test="item.pd_ordercode !=null">
+        pd_ordercode = #{item.pd_ordercode},
+      </if>
+      <if test="item.pd_orderdetno !=null">
+        pd_orderdetno = #{item.pd_orderdetno},
+      </if>
+      <if test="item.pd_prodid !=null">
+        pd_prodid = #{item.pd_prodid},
+      </if>
+      <if test="item.pd_prodcode !=null">
+        pd_prodcode = #{item.pd_prodcode},
+      </if>
+      <if test="item.pd_unit !=null">
+        pd_unit = #{item.pd_unit},
+      </if>
+      <if test="item.pd_inqty !=null">
+        pd_inqty = #{item.pd_inqty},
+      </if>
+      <if test="item.pd_outqty !=null">
+        pd_outqty = #{item.pd_outqty},
+      </if>
+      <if test="item.pd_orderprice !=null">
+        pd_orderprice = #{item.pd_orderprice},
+      </if>
+      <if test="item.pd_sendprice !=null">
+        pd_sendprice = #{item.pd_sendprice},
+      </if>
+      <if test="item.pd_price !=null">
+        pd_price = #{item.pd_price},
+      </if>
+      <if test="item.pd_total !=null">
+        pd_total = #{item.pd_total},
+      </if>
+      <if test="item.pd_taxrate !=null">
+        pd_taxrate = #{item.pd_taxrate},
+      </if>
+      <if test="item.pd_netprice !=null">
+        pd_netprice = #{item.pd_netprice},
+      </if>
+      <if test="item.pd_nettotal !=null">
+        pd_nettotal = #{item.pd_nettotal},
+      </if>
+      <if test="item.pd_whid !=null">
+        pd_whid = #{item.pd_whid},
+      </if>
+      <if test="item.pd_whcode !=null">
+        pd_whcode = #{item.pd_whcode},
+      </if>
+      <if test="item.pd_whname !=null">
+        pd_whname = #{item.pd_whname},
+      </if>
+      <if test="item.pd_inwhid !=null">
+        pd_inwhid = #{item.pd_inwhid},
+      </if>
+      <if test="item.pd_inwhcode !=null">
+        pd_inwhcode = #{item.pd_inwhcode},
+      </if>
+      <if test="item.pd_inwhname !=null">
+        pd_inwhname = #{item.pd_inwhname},
+      </if>
+      <if test="item.pd_orderid !=null">
+        pd_orderid = #{item.pd_orderid},
+      </if>
+      <if test="item.pd_sdid !=null">
+        pd_sdid = #{item.pd_sdid},
+      </if>
+      <if test="item.pd_status !=null">
+        pd_status = #{item.pd_status},
+      </if>
+      <if test="item.pd_remark !=null">
+        pd_remark = #{item.pd_remark},
+      </if>
+      <if test="item.companyId!=null">
+        companyId = #{item.companyId},
+      </if>
+      <if test="item.updaterId!=null">
+        updaterId = #{item.updaterId},
+      </if>
+      <if test="item.updateTime!=null">
+        updateTime = #{item.updateTime},
+      </if>
+      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},
+      <if test="item.pd_ym!=null">
+        pd_ym = #{item.pd_ym},
+      </if>
+      <if test="item.pd_yqty!=null">
+        pd_yqty = #{item.pd_yqty},
+      </if>
+    </set>
+      where PD_ID = #{item.id,jdbcType=INTEGER}
+    </foreach>
+  </update>
+
+  <update id="updatePurchaseYqty" parameterType="java.lang.Integer">
+
+update prodiodetail a
+set a.pd_yqty =ifnull((select  b.pd_outqty  from  (select pd_ioid,sum(pd_outqty) pd_outqty from  prodiodetail left join prodinout on pd_piid = pi_id where pd_piclass='采购验退单'
+and pi_puid=#{id,jdbcType=INTEGER}  GROUP BY pd_ioid) b where ifnull(b.pd_ioid ,0)= a.pd_id ),0)
+where a.pd_piid = (select pi_id from prodinout where pi_puid=#{id,jdbcType=INTEGER} and pi_class='采购验收单')
+  </update>
+
+
+  <select id="selectByFK" parameterType="long" resultMap="BaseResultMap">
+    select * from prodiodetail a left join product b on b.pr_id= a.pd_prodid and a.companyid = b.companyid
+    where pd_piid=#{id} order by pd_pdno
+  </select>
+
+
+
+</mapper>

+ 114 - 0
applications/storage/storage-server/src/main/resources/mapper/ProdInOutListMapper.xml

@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!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.ProdInOutListMapper">
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.storage.entities.ProdInOutList">
+    <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" />
+    <result column="pi_vendid" jdbcType="INTEGER" property="pi_vendid" />
+    <result column="pi_vendcode" jdbcType="VARCHAR" property="pi_vendcode" />
+    <result column="pi_vendname" jdbcType="VARCHAR" property="pi_vendname" />
+    <result column="pi_custid" jdbcType="INTEGER" property="pi_custid" />
+    <result column="pi_custcode" jdbcType="VARCHAR" property="pi_custcode" />
+    <result column="pi_custname" jdbcType="VARCHAR" property="pi_custname" />
+    <result column="pi_puid" jdbcType="INTEGER" property="pi_puid" />
+    <result column="pi_pucode" jdbcType="VARCHAR" property="pi_pucode" />
+    <result column="pi_said" jdbcType="INTEGER" property="pi_said" />
+    <result column="pi_sacode" jdbcType="VARCHAR" property="pi_sacode" />
+    <result column="pi_total" jdbcType="DOUBLE" property="pi_total" />
+    <result column="pi_recordmanid" jdbcType="INTEGER" property="pi_recordmanid" />
+    <result column="pi_recordman" jdbcType="VARCHAR" property="pi_recordman" />
+    <result column="pi_recorddate" jdbcType="TIMESTAMP" property="pi_recorddate" />
+    <result column="pi_status" jdbcType="VARCHAR" property="pi_status" />
+    <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="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" />
+    <result column="pi_text4" jdbcType="VARCHAR" property="pi_text4" />
+    <result column="pi_text5" jdbcType="VARCHAR" property="pi_text5" />
+    <result column="pi_address" jdbcType="VARCHAR" property="pi_address" />
+    <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" />
+    <result column="pd_pdno" jdbcType="INTEGER" property="pd_pdno" />
+    <result column="pd_ordercode" jdbcType="VARCHAR" property="pd_ordercode" />
+    <result column="pd_orderdetno" jdbcType="INTEGER" property="pd_orderdetno" />
+    <result column="pd_prodid" jdbcType="INTEGER" property="pd_prodid" />
+    <result column="pd_prodcode" jdbcType="VARCHAR" property="pd_prodcode" />
+    <result column="pd_unit" jdbcType="VARCHAR" property="pd_unit" />
+    <result column="pd_inqty" jdbcType="INTEGER" property="pd_inqty" />
+    <result column="pd_outqty" jdbcType="INTEGER" property="pd_outqty" />
+    <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="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" />
+    <result column="pd_whid" jdbcType="INTEGER" property="pd_whid" />
+    <result column="pd_whcode" jdbcType="VARCHAR" property="pd_whcode" />
+    <result column="pd_whname" jdbcType="VARCHAR" property="pd_whname" />
+    <result column="pd_inwhid" jdbcType="INTEGER" property="pd_inwhid" />
+    <result column="pd_inwhcode" jdbcType="VARCHAR" property="pd_inwhcode" />
+    <result column="pd_inwhname" jdbcType="VARCHAR" property="pd_inwhname" />
+    <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="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" />
+    <result column="pd_text4" jdbcType="VARCHAR" property="pd_text4" />
+    <result column="pd_text5" jdbcType="VARCHAR" property="pd_text5" />
+    <result column="pd_ym" jdbcType="INTEGER" property="pd_ym" />
+    <result column="pd_yqty" jdbcType="INTEGER" property="pd_yqty" />
+    <result column="pd_ioid" jdbcType="INTEGER" property="pd_ioid" />
+
+  </resultMap>
+
+
+  <select id="selectProdInOutListByCondition" parameterType="com.usoftchina.saas.storage.dto.ProdInOutReqDTO" resultMap="BaseResultMap">
+    select  *  from prodinout left join prodiodetail on pi_id = pd_piid
+    <where>
+      <if test="begin != null">
+        pu_date &gt;= ${begin}
+      </if>
+      <if test="end!= null">
+        AND  pu_date &lt;= ${end}
+      </if>
+      <if test="status != null">
+        AND pu_status=${status}
+      </if>
+      <if test="keyword != null">
+        AND ${keyword}
+      </if>
+    </where>
+  </select>
+
+  <select id="selectProdInOutBycondition" parameterType="com.usoftchina.saas.storage.dto.ProdInOutReqDTO" resultMap="BaseResultMap">
+    select  *  from prodinout
+    <where>
+      <if test="begin != null">
+        pu_date &gt;= ${begin}
+      </if>
+      <if test="end!= null">
+        AND  pu_date &lt;= ${end}
+      </if>
+      <if test="status != null">
+        AND pu_status=${status}
+      </if>
+      <if test="keyword != null">
+        AND ${keyword}
+      </if>
+    </where>
+  </select>
+
+
+
+
+</mapper>

+ 720 - 0
applications/storage/storage-server/src/main/resources/mapper/ProdInOutMapper.xml

@@ -0,0 +1,720 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!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.storage.entities.ProdInOut">
+    <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" />
+    <result column="pi_vendid" jdbcType="INTEGER" property="pi_vendid" />
+    <result column="pi_vendcode" jdbcType="VARCHAR" property="pi_vendcode" />
+    <result column="pi_vendname" jdbcType="VARCHAR" property="pi_vendname" />
+    <result column="pi_custid" jdbcType="INTEGER" property="pi_custid" />
+    <result column="pi_custcode" jdbcType="VARCHAR" property="pi_custcode" />
+    <result column="pi_custname" jdbcType="VARCHAR" property="pi_custname" />
+    <result column="pi_puid" jdbcType="INTEGER" property="pi_puid" />
+    <result column="pi_pucode" jdbcType="VARCHAR" property="pi_pucode" />
+    <result column="pi_said" jdbcType="INTEGER" property="pi_said" />
+    <result column="pi_sacode" jdbcType="VARCHAR" property="pi_sacode" />
+    <result column="pi_total" jdbcType="DOUBLE" property="pi_total" />
+    <result column="pi_recordmanid" jdbcType="INTEGER" property="pi_recordmanid" />
+    <result column="pi_recordman" jdbcType="VARCHAR" property="pi_recordman" />
+    <result column="pi_recorddate" jdbcType="TIMESTAMP" property="pi_recorddate" />
+    <result column="pi_status" jdbcType="VARCHAR" property="pi_status" />
+    <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="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" />
+    <result column="pi_text4" jdbcType="VARCHAR" property="pi_text4" />
+    <result column="pi_text5" jdbcType="VARCHAR" property="pi_text5" />
+
+
+
+  </resultMap>
+  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.usoftchina.saas.purchase.po.ProdInOut">
+    <result column="pi_address" jdbcType="LONGVARCHAR" property="pi_address" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    pi_id, pi_inoutno, pi_class, pi_date, pi_vendid, pi_vendcode, pi_vendname, pi_custid, 
+    pi_custcode, pi_custname, pi_puid, pi_pucode, pi_said, pi_sacode, pi_total, pi_recordmanid, 
+    pi_recordman, pi_recorddate, pi_status, pi_statuscode, pi_printstatus, pi_printstatuscode, 
+    companyid, updaterid, updatetime, pi_text1, pi_text2, pi_text3, pi_text4, pi_text5
+  </sql>
+  <sql id="Blob_Column_List">
+    pi_address
+  </sql>
+  <select id="selectByExampleWithBLOBs" parameterType="com.usoftchina.saas.purchase.po.ProdInOutExample" resultMap="ResultMapWithBLOBs">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from prodinout
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByExample" parameterType="com.usoftchina.saas.purchase.po.ProdInOutExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from prodinout
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
+    select 
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from prodinout
+    where pi_id = #{pi_id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from prodinout
+    where pi_id = #{pi_id,jdbcType=INTEGER}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.usoftchina.saas.purchase.po.ProdInOutExample">
+    delete from prodinout
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.saas.purchase.po.ProdInOut">
+    insert into prodinout (pi_id, pi_inoutno, pi_class, 
+      pi_date, pi_vendid, pi_vendcode, 
+      pi_vendname, pi_custid, pi_custcode, 
+      pi_custname, pi_puid, pi_pucode, 
+      pi_said, pi_sacode, pi_total, 
+      pi_recordmanid, pi_recordman, pi_recorddate, 
+      pi_status, pi_statuscode, pi_printstatus, 
+      pi_printstatuscode, companyid, updaterid, 
+      updatetime, pi_text1, pi_text2, 
+      pi_text3, pi_text4, pi_text5,
+      pi_address)
+    values (#{pi_id,jdbcType=INTEGER}, #{pi_inoutno,jdbcType=VARCHAR}, #{pi_class,jdbcType=VARCHAR}, 
+      #{pi_date,jdbcType=TIMESTAMP}, #{pi_vendid,jdbcType=INTEGER}, #{pi_vendcode,jdbcType=VARCHAR}, 
+      #{pi_vendname,jdbcType=VARCHAR}, #{pi_custid,jdbcType=INTEGER}, #{pi_custcode,jdbcType=VARCHAR}, 
+      #{pi_custname,jdbcType=VARCHAR}, #{pi_puid,jdbcType=INTEGER}, #{pi_pucode,jdbcType=VARCHAR}, 
+      #{pi_said,jdbcType=INTEGER}, #{pi_sacode,jdbcType=VARCHAR}, #{pi_total,jdbcType=DOUBLE},
+      #{pi_recordmanid,jdbcType=INTEGER}, #{pi_recordman,jdbcType=VARCHAR}, #{pi_recorddate,jdbcType=TIMESTAMP}, 
+      #{pi_status,jdbcType=VARCHAR}, #{pi_statuscode,jdbcType=VARCHAR}, #{pi_printstatus,jdbcType=VARCHAR}, 
+      #{pi_printstatuscode,jdbcType=VARCHAR}, #{companyid,jdbcType=INTEGER}, #{updaterid,jdbcType=INTEGER}, 
+      #{updatetime,jdbcType=TIMESTAMP}, #{pi_text1,jdbcType=VARCHAR}, #{pi_text2,jdbcType=VARCHAR}, 
+      #{pi_text3,jdbcType=VARCHAR}, #{pi_text4,jdbcType=VARCHAR}, #{pi_text5,jdbcType=VARCHAR}, 
+      #{pi_address,jdbcType=LONGVARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.purchase.po.ProdInOut">
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
+    insert into prodinout
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+
+      <if test="pi_inoutno != null">
+        pi_inoutno,
+      </if>
+      <if test="pi_class != null">
+        pi_class,
+      </if>
+      <if test="pi_date != null">
+        pi_date,
+      </if>
+      <if test="pi_vendid != null">
+        pi_vendid,
+      </if>
+      <if test="pi_vendcode != null">
+        pi_vendcode,
+      </if>
+      <if test="pi_vendname != null">
+        pi_vendname,
+      </if>
+      <if test="pi_custid != null">
+        pi_custid,
+      </if>
+      <if test="pi_custcode != null">
+        pi_custcode,
+      </if>
+      <if test="pi_custname != null">
+        pi_custname,
+      </if>
+      <if test="pi_puid != null">
+        pi_puid,
+      </if>
+      <if test="pi_pucode != null">
+        pi_pucode,
+      </if>
+      <if test="pi_said != null">
+        pi_said,
+      </if>
+      <if test="pi_sacode != null">
+        pi_sacode,
+      </if>
+      <if test="pi_total != null">
+        pi_total,
+      </if>
+      <if test="pi_recordmanid != null">
+        pi_recordmanid,
+      </if>
+      <if test="pi_recordman != null">
+        pi_recordman,
+      </if>
+      <if test="pi_recorddate != null">
+        pi_recorddate,
+      </if>
+      <if test="pi_status != null">
+        pi_status,
+      </if>
+      <if test="pi_statuscode != null">
+        pi_statuscode,
+      </if>
+      <if test="pi_printstatus != null">
+        pi_printstatus,
+      </if>
+      <if test="pi_printstatuscode != null">
+        pi_printstatuscode,
+      </if>
+      <if test="companyId != null">
+        companyid,
+      </if>
+      <if test="updaterId != null">
+        updaterid,
+      </if>
+      <if test="updateTime != null">
+        updatetime,
+      </if>
+      <if test="pi_text1 != null">
+        pi_text1,
+      </if>
+      <if test="pi_text2 != null">
+        pi_text2,
+      </if>
+      <if test="pi_text3 != null">
+        pi_text3,
+      </if>
+      <if test="pi_text4 != null">
+        pi_text4,
+      </if>
+      <if test="pi_text5 != null">
+        pi_text5,
+      </if>
+      <if test="pi_address != null">
+        pi_address,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+
+      <if test="pi_inoutno != null">
+        #{pi_inoutno,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_class != null">
+        #{pi_class,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_date != null">
+        #{pi_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pi_vendid != null">
+        #{pi_vendid,jdbcType=INTEGER},
+      </if>
+      <if test="pi_vendcode != null">
+        #{pi_vendcode,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_vendname != null">
+        #{pi_vendname,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_custid != null">
+        #{pi_custid,jdbcType=INTEGER},
+      </if>
+      <if test="pi_custcode != null">
+        #{pi_custcode,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_custname != null">
+        #{pi_custname,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_puid != null">
+        #{pi_puid,jdbcType=INTEGER},
+      </if>
+      <if test="pi_pucode != null">
+        #{pi_pucode,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_said != null">
+        #{pi_said,jdbcType=INTEGER},
+      </if>
+      <if test="pi_sacode != null">
+        #{pi_sacode,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_total != null">
+        #{pi_total,jdbcType=DOUBLE},
+      </if>
+      <if test="pi_recordmanid != null">
+        #{pi_recordmanid,jdbcType=INTEGER},
+      </if>
+      <if test="pi_recordman != null">
+        #{pi_recordman,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_recorddate != null">
+        #{pi_recorddate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pi_status != null">
+        #{pi_status,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_statuscode != null">
+        #{pi_statuscode,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_printstatus != null">
+        #{pi_printstatus,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_printstatuscode != null">
+        #{pi_printstatuscode,jdbcType=VARCHAR},
+      </if>
+      <if test="companyId != null">
+        #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null">
+        #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pi_text1 != null">
+        #{pi_text1,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_text2 != null">
+        #{pi_text2,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_text3 != null">
+        #{pi_text3,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_text4 != null">
+        #{pi_text4,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_text5 != null">
+        #{pi_text5,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_address != null">
+        #{pi_address,jdbcType=LONGVARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.usoftchina.saas.purchase.po.ProdInOutExample" resultType="java.lang.Long">
+    select count(*) from prodinout
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update prodinout
+    <set>
+      <if test="record.pi_id != null">
+        pi_id = #{record.pi_id,jdbcType=INTEGER},
+      </if>
+      <if test="record.pi_inoutno != null">
+        pi_inoutno = #{record.pi_inoutno,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pi_class != null">
+        pi_class = #{record.pi_class,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pi_date != null">
+        pi_date = #{record.pi_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.pi_vendid != null">
+        pi_vendid = #{record.pi_vendid,jdbcType=INTEGER},
+      </if>
+      <if test="record.pi_vendcode != null">
+        pi_vendcode = #{record.pi_vendcode,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pi_vendname != null">
+        pi_vendname = #{record.pi_vendname,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pi_custid != null">
+        pi_custid = #{record.pi_custid,jdbcType=INTEGER},
+      </if>
+      <if test="record.pi_custcode != null">
+        pi_custcode = #{record.pi_custcode,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pi_custname != null">
+        pi_custname = #{record.pi_custname,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pi_puid != null">
+        pi_puid = #{record.pi_puid,jdbcType=INTEGER},
+      </if>
+      <if test="record.pi_pucode != null">
+        pi_pucode = #{record.pi_pucode,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pi_said != null">
+        pi_said = #{record.pi_said,jdbcType=INTEGER},
+      </if>
+      <if test="record.pi_sacode != null">
+        pi_sacode = #{record.pi_sacode,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pi_total != null">
+        pi_total = #{record.pi_total,jdbcType=DOUBLE},
+      </if>
+      <if test="record.pi_recordmanid != null">
+        pi_recordmanid = #{record.pi_recordmanid,jdbcType=INTEGER},
+      </if>
+      <if test="record.pi_recordman != null">
+        pi_recordman = #{record.pi_recordman,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pi_recorddate != null">
+        pi_recorddate = #{record.pi_recorddate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.pi_status != null">
+        pi_status = #{record.pi_status,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pi_statuscode != null">
+        pi_statuscode = #{record.pi_statuscode,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pi_printstatus != null">
+        pi_printstatus = #{record.pi_printstatus,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pi_printstatuscode != null">
+        pi_printstatuscode = #{record.pi_printstatuscode,jdbcType=VARCHAR},
+      </if>
+      <if test="record.companyid != null">
+        companyid = #{record.companyid,jdbcType=INTEGER},
+      </if>
+      <if test="record.updaterid != null">
+        updaterid = #{record.updaterid,jdbcType=INTEGER},
+      </if>
+      <if test="record.updatetime != null">
+        updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.pi_text1 != null">
+        pi_text1 = #{record.pi_text1,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pi_text2 != null">
+        pi_text2 = #{record.pi_text2,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pi_text3 != null">
+        pi_text3 = #{record.pi_text3,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pi_text4 != null">
+        pi_text4 = #{record.pi_text4,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pi_text5 != null">
+        pi_text5 = #{record.pi_text5,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pi_address != null">
+        pi_address = #{record.pi_address,jdbcType=LONGVARCHAR},
+      </if>
+
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExampleWithBLOBs" parameterType="map">
+    update prodinout
+    set pi_id = #{record.pi_id,jdbcType=INTEGER},
+      pi_inoutno = #{record.pi_inoutno,jdbcType=VARCHAR},
+      pi_class = #{record.pi_class,jdbcType=VARCHAR},
+      pi_date = #{record.pi_date,jdbcType=TIMESTAMP},
+      pi_vendid = #{record.pi_vendid,jdbcType=INTEGER},
+      pi_vendcode = #{record.pi_vendcode,jdbcType=VARCHAR},
+      pi_vendname = #{record.pi_vendname,jdbcType=VARCHAR},
+      pi_custid = #{record.pi_custid,jdbcType=INTEGER},
+      pi_custcode = #{record.pi_custcode,jdbcType=VARCHAR},
+      pi_custname = #{record.pi_custname,jdbcType=VARCHAR},
+      pi_puid = #{record.pi_puid,jdbcType=INTEGER},
+      pi_pucode = #{record.pi_pucode,jdbcType=VARCHAR},
+      pi_said = #{record.pi_said,jdbcType=INTEGER},
+      pi_sacode = #{record.pi_sacode,jdbcType=VARCHAR},
+      pi_total = #{record.pi_total,jdbcType=DOUBLE},
+      pi_recordmanid = #{record.pi_recordmanid,jdbcType=INTEGER},
+      pi_recordman = #{record.pi_recordman,jdbcType=VARCHAR},
+      pi_recorddate = #{record.pi_recorddate,jdbcType=TIMESTAMP},
+      pi_status = #{record.pi_status,jdbcType=VARCHAR},
+      pi_statuscode = #{record.pi_statuscode,jdbcType=VARCHAR},
+      pi_printstatus = #{record.pi_printstatus,jdbcType=VARCHAR},
+      pi_printstatuscode = #{record.pi_printstatuscode,jdbcType=VARCHAR},
+      companyid = #{record.companyid,jdbcType=INTEGER},
+      updaterid = #{record.updaterid,jdbcType=INTEGER},
+      updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
+      pi_text1 = #{record.pi_text1,jdbcType=VARCHAR},
+      pi_text2 = #{record.pi_text2,jdbcType=VARCHAR},
+      pi_text3 = #{record.pi_text3,jdbcType=VARCHAR},
+      pi_text4 = #{record.pi_text4,jdbcType=VARCHAR},
+      pi_text5 = #{record.pi_text5,jdbcType=VARCHAR},
+      pi_address = #{record.pi_address,jdbcType=LONGVARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update prodinout
+    set pi_id = #{record.pi_id,jdbcType=INTEGER},
+      pi_inoutno = #{record.pi_inoutno,jdbcType=VARCHAR},
+      pi_class = #{record.pi_class,jdbcType=VARCHAR},
+      pi_date = #{record.pi_date,jdbcType=TIMESTAMP},
+      pi_vendid = #{record.pi_vendid,jdbcType=INTEGER},
+      pi_vendcode = #{record.pi_vendcode,jdbcType=VARCHAR},
+      pi_vendname = #{record.pi_vendname,jdbcType=VARCHAR},
+      pi_custid = #{record.pi_custid,jdbcType=INTEGER},
+      pi_custcode = #{record.pi_custcode,jdbcType=VARCHAR},
+      pi_custname = #{record.pi_custname,jdbcType=VARCHAR},
+      pi_puid = #{record.pi_puid,jdbcType=INTEGER},
+      pi_pucode = #{record.pi_pucode,jdbcType=VARCHAR},
+      pi_said = #{record.pi_said,jdbcType=INTEGER},
+      pi_sacode = #{record.pi_sacode,jdbcType=VARCHAR},
+      pi_total = #{record.pi_total,jdbcType=DOUBLE},
+      pi_recordmanid = #{record.pi_recordmanid,jdbcType=INTEGER},
+      pi_recordman = #{record.pi_recordman,jdbcType=VARCHAR},
+      pi_recorddate = #{record.pi_recorddate,jdbcType=TIMESTAMP},
+      pi_status = #{record.pi_status,jdbcType=VARCHAR},
+      pi_statuscode = #{record.pi_statuscode,jdbcType=VARCHAR},
+      pi_printstatus = #{record.pi_printstatus,jdbcType=VARCHAR},
+      pi_printstatuscode = #{record.pi_printstatuscode,jdbcType=VARCHAR},
+      companyid = #{record.companyid,jdbcType=INTEGER},
+      updaterid = #{record.updaterid,jdbcType=INTEGER},
+      updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
+      pi_text1 = #{record.pi_text1,jdbcType=VARCHAR},
+      pi_text2 = #{record.pi_text2,jdbcType=VARCHAR},
+      pi_text3 = #{record.pi_text3,jdbcType=VARCHAR},
+      pi_text4 = #{record.pi_text4,jdbcType=VARCHAR},
+      pi_text5 = #{record.pi_text5,jdbcType=VARCHAR}
+
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.purchase.po.ProdInOut">
+    update prodinout
+    <set>
+      <if test="pi_inoutno != null">
+        pi_inoutno = #{pi_inoutno,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_class != null">
+        pi_class = #{pi_class,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_date != null">
+        pi_date = #{pi_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pi_vendid != null">
+        pi_vendid = #{pi_vendid,jdbcType=INTEGER},
+      </if>
+      <if test="pi_vendcode != null">
+        pi_vendcode = #{pi_vendcode,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_vendname != null">
+        pi_vendname = #{pi_vendname,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_custid != null">
+        pi_custid = #{pi_custid,jdbcType=INTEGER},
+      </if>
+      <if test="pi_custcode != null">
+        pi_custcode = #{pi_custcode,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_custname != null">
+        pi_custname = #{pi_custname,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_puid != null">
+        pi_puid = #{pi_puid,jdbcType=INTEGER},
+      </if>
+      <if test="pi_pucode != null">
+        pi_pucode = #{pi_pucode,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_said != null">
+        pi_said = #{pi_said,jdbcType=INTEGER},
+      </if>
+      <if test="pi_sacode != null">
+        pi_sacode = #{pi_sacode,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_total != null">
+        pi_total = #{pi_total,jdbcType=DOUBLE},
+      </if>
+      <if test="pi_recordmanid != null">
+        pi_recordmanid = #{pi_recordmanid,jdbcType=INTEGER},
+      </if>
+      <if test="pi_recordman != null">
+        pi_recordman = #{pi_recordman,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_recorddate != null">
+        pi_recorddate = #{pi_recorddate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pi_status != null">
+        pi_status = #{pi_status,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_statuscode != null">
+        pi_statuscode = #{pi_statuscode,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_printstatus != null">
+        pi_printstatus = #{pi_printstatus,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_printstatuscode != null">
+        pi_printstatuscode = #{pi_printstatuscode,jdbcType=VARCHAR},
+      </if>
+      <if test="companyId != null">
+        companyid = #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null">
+        updaterid = #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null">
+        updatetime = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pi_text1 != null">
+        pi_text1 = #{pi_text1,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_text2 != null">
+        pi_text2 = #{pi_text2,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_text3 != null">
+        pi_text3 = #{pi_text3,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_text4 != null">
+        pi_text4 = #{pi_text4,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_text5 != null">
+        pi_text5 = #{pi_text5,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_address != null">
+        pi_address = #{pi_address,jdbcType=LONGVARCHAR},
+      </if>
+
+    </set>
+    where pi_id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.saas.purchase.po.ProdInOut">
+    update prodinout
+    set pi_inoutno = #{pi_inoutno,jdbcType=VARCHAR},
+      pi_class = #{pi_class,jdbcType=VARCHAR},
+      pi_date = #{pi_date,jdbcType=TIMESTAMP},
+      pi_vendid = #{pi_vendid,jdbcType=INTEGER},
+      pi_vendcode = #{pi_vendcode,jdbcType=VARCHAR},
+      pi_vendname = #{pi_vendname,jdbcType=VARCHAR},
+      pi_custid = #{pi_custid,jdbcType=INTEGER},
+      pi_custcode = #{pi_custcode,jdbcType=VARCHAR},
+      pi_custname = #{pi_custname,jdbcType=VARCHAR},
+      pi_puid = #{pi_puid,jdbcType=INTEGER},
+      pi_pucode = #{pi_pucode,jdbcType=VARCHAR},
+      pi_said = #{pi_said,jdbcType=INTEGER},
+      pi_sacode = #{pi_sacode,jdbcType=VARCHAR},
+      pi_total = #{pi_total,jdbcType=DOUBLE},
+      pi_recordmanid = #{pi_recordmanid,jdbcType=INTEGER},
+      pi_recordman = #{pi_recordman,jdbcType=VARCHAR},
+      pi_recorddate = #{pi_recorddate,jdbcType=TIMESTAMP},
+      pi_status = #{pi_status,jdbcType=VARCHAR},
+      pi_statuscode = #{pi_statuscode,jdbcType=VARCHAR},
+      pi_printstatus = #{pi_printstatus,jdbcType=VARCHAR},
+      pi_printstatuscode = #{pi_printstatuscode,jdbcType=VARCHAR},
+      companyid = #{companyid,jdbcType=INTEGER},
+      updaterid = #{updaterid,jdbcType=INTEGER},
+      updatetime = #{updatetime,jdbcType=TIMESTAMP},
+      pi_text1 = #{pi_text1,jdbcType=VARCHAR},
+      pi_text2 = #{pi_text2,jdbcType=VARCHAR},
+      pi_text3 = #{pi_text3,jdbcType=VARCHAR},
+      pi_text4 = #{pi_text4,jdbcType=VARCHAR},
+      pi_text5 = #{pi_text5,jdbcType=VARCHAR},
+      pi_address = #{pi_address,jdbcType=LONGVARCHAR}
+
+    where pi_id = #{pi_id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.purchase.po.ProdInOut">
+    update prodinout
+    set pi_inoutno = #{pi_inoutno,jdbcType=VARCHAR},
+      pi_class = #{pi_class,jdbcType=VARCHAR},
+      pi_date = #{pi_date,jdbcType=TIMESTAMP},
+      pi_vendid = #{pi_vendid,jdbcType=INTEGER},
+      pi_vendcode = #{pi_vendcode,jdbcType=VARCHAR},
+      pi_vendname = #{pi_vendname,jdbcType=VARCHAR},
+      pi_custid = #{pi_custid,jdbcType=INTEGER},
+      pi_custcode = #{pi_custcode,jdbcType=VARCHAR},
+      pi_custname = #{pi_custname,jdbcType=VARCHAR},
+      pi_puid = #{pi_puid,jdbcType=INTEGER},
+      pi_pucode = #{pi_pucode,jdbcType=VARCHAR},
+      pi_said = #{pi_said,jdbcType=INTEGER},
+      pi_sacode = #{pi_sacode,jdbcType=VARCHAR},
+      pi_total = #{pi_total,jdbcType=DOUBLE},
+      pi_recordmanid = #{pi_recordmanid,jdbcType=INTEGER},
+      pi_recordman = #{pi_recordman,jdbcType=VARCHAR},
+      pi_recorddate = #{pi_recorddate,jdbcType=TIMESTAMP},
+      pi_status = #{pi_status,jdbcType=VARCHAR},
+      pi_statuscode = #{pi_statuscode,jdbcType=VARCHAR},
+      pi_printstatus = #{pi_printstatus,jdbcType=VARCHAR},
+      pi_printstatuscode = #{pi_printstatuscode,jdbcType=VARCHAR},
+      companyid = #{companyId,jdbcType=INTEGER},
+      updaterid = #{updaterId,jdbcType=INTEGER},
+      updatetime = #{updateTime,jdbcType=TIMESTAMP},
+      pi_text1 = #{pi_text1,jdbcType=VARCHAR},
+      pi_text2 = #{pi_text2,jdbcType=VARCHAR},
+      pi_text3 = #{pi_text3,jdbcType=VARCHAR},
+      pi_text4 = #{pi_text4,jdbcType=VARCHAR},
+      pi_text5 = #{pi_text5,jdbcType=VARCHAR}
+    where pi_id = #{id,jdbcType=INTEGER}
+  </update>
+</mapper>