Browse Source

客户资料保存,更新。采购验收单更新实体类属性

zhoudw 7 years ago
parent
commit
49be986977
22 changed files with 791 additions and 214 deletions
  1. 36 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/CustomerController.java
  2. 0 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomerMapper.java
  3. 4 4
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomeraddressMapper.java
  4. 3 4
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomercontactMapper.java
  5. 7 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/CustomerService.java
  6. 135 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerServiceImpl.java
  7. 1 1
      applications/document/document-server/src/main/resources/mapper/CustomerListMapper.xml
  8. 16 39
      applications/document/document-server/src/main/resources/mapper/CustomerMapper.xml
  9. 173 59
      applications/document/document-server/src/main/resources/mapper/CustomeraddressMapper.xml
  10. 136 55
      applications/document/document-server/src/main/resources/mapper/CustomercontactMapper.xml
  11. 1 1
      applications/document/document-server/src/main/resources/mapper/ProductbrandMapper.xml
  12. 66 0
      applications/document/document-server/src/test/java/com/usoftchina/saas/document/mapper/CustomeraddressMapperTest.java
  13. 82 0
      applications/document/document-server/src/test/java/com/usoftchina/saas/document/mapper/CustomercontactMapperTest.java
  14. 77 0
      applications/document/document-server/src/test/java/com/usoftchina/saas/document/service/CustomerServiceTest.java
  15. 8 1
      applications/document/document-server/src/test/java/com/usoftchina/saas/document/service/CustomerTest.java
  16. 3 3
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdIODetailDTO.java
  17. 3 3
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdInOutListDTO.java
  18. 1 1
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdIODetail.java
  19. 3 3
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOutList.java
  20. 2 2
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/ProdInOutServiceImpl.java
  21. 31 31
      applications/purchase/purchase-server/src/main/resources/mapper/ProdIODetailMapper.xml
  22. 3 3
      applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutListMapper.xml

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

@@ -2,6 +2,7 @@ package com.usoftchina.saas.document.controller;
 
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.document.dto.CustomerFormDTO;
@@ -15,7 +16,7 @@ import org.springframework.web.bind.annotation.*;
  * Created by zdw
  * 2018-10-23 11:39.
  */
-
+@CrossOrigin
 @RestController
 @RequestMapping("/customer")
 public class CustomerController {
@@ -71,7 +72,41 @@ public class CustomerController {
         return Result.success();
     }
 
+    /**
+     * 采购订单批量删除
+     *
+     * @param baseDTOs
+     * @return
+     */
+    @PostMapping("/batchDelete")
+    public Result batchDelete(@RequestBody BatchDealBaseDTO baseDTOs) {
+        customerService.batchDelete(baseDTOs);
+        return Result.success();
+    }
+
+    /**
+     * 客户资料关闭
+     *
+     * @param id
+     * @return
+     */
+    @PostMapping("/close/{id}")
+    public Result close(@PathVariable(value = "id") long id){
+        customerService.close(id);
+        return Result.success();
+    }
 
+    /**
+     * 客户资料启用
+     *
+     * @param id
+     * @return
+     */
+    @PostMapping("/open/{id}")
+    public Result open(@PathVariable(value = "id") long id){
+        customerService.open(id);
+        return Result.success();
+    }
 
 
 

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

@@ -6,8 +6,6 @@ import com.usoftchina.saas.document.entities.Customer;
 public interface CustomerMapper extends CommonBaseMapper<Customer> {
     int deleteByPrimaryKey(Integer cu_id);
 
-    int insert(Customer record);
-
     int insertSelective(Customer record);
 
     Customer selectByPrimaryKey(Long cu_id);

+ 4 - 4
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomeraddressMapper.java

@@ -9,8 +9,6 @@ import java.util.List;
 public interface CustomeraddressMapper extends CommonBaseMapper<Customer> {
     int deleteByPrimaryKey(Integer ca_id);
 
-    int insert(Customeraddress record);
-
     int insertSelective(Customeraddress record);
 
     Customeraddress selectByPrimaryKey(Integer ca_id);
@@ -19,7 +17,9 @@ public interface CustomeraddressMapper extends CommonBaseMapper<Customer> {
 
     int updateByPrimaryKeyWithBLOBs(Customeraddress record);
 
-    int updateByPrimaryKey(Customeraddress record);
-
     List<Customeraddress> selectByFK(Long fk_i);
+
+    void batchInsert(List<Customeraddress> list);
+
+    void batchUpdate(List<Customeraddress> list);
 }

+ 3 - 4
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomercontactMapper.java

@@ -9,17 +9,16 @@ import java.util.List;
 public interface CustomercontactMapper extends CommonBaseMapper<Customercontact> {
     int deleteByPrimaryKey(Integer cc_id);
 
-    int insert(Customercontact record);
-
     int insertSelective(Customercontact record);
 
     Customercontact selectByPrimaryKey(Integer cc_id);
 
     int updateByPrimaryKeySelective(Customercontact record);
 
-    int updateByPrimaryKey(Customercontact record);
-
     List<Customercontact> selectByFK(Long fk_i);
 
 
+    void batchInsert(List<Customercontact> insertDetail1);
+
+    void batchUpdate(List<Customercontact> updateDetail1);
 }

+ 7 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/CustomerService.java

@@ -2,6 +2,7 @@ package com.usoftchina.saas.document.service;
 
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.service.CommonBaseService;
+import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.document.dto.CustomerFormDTO;
@@ -22,4 +23,10 @@ public interface CustomerService extends CommonBaseService<CustomerMapper, Custo
     DocBaseDTO saveFormData(CustomerFormDTO data);
 
     void delete(Long id);
+
+    void close(long id);
+
+    void open(long id);
+
+    void batchDelete(BatchDealBaseDTO baseDTOs);
 }

+ 135 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerServiceImpl.java

@@ -3,6 +3,7 @@ package com.usoftchina.saas.document.service.impl;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.context.BaseContextHolder;
@@ -19,12 +20,15 @@ import com.usoftchina.saas.document.mapper.CustomerMapper;
 import com.usoftchina.saas.document.mapper.CustomeraddressMapper;
 import com.usoftchina.saas.document.mapper.CustomercontactMapper;
 import com.usoftchina.saas.document.service.CustomerService;
+import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.utils.BeanMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
 
+import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -86,7 +90,122 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
 
     @Override
     public DocBaseDTO saveFormData(CustomerFormDTO data) {
-        return null;
+        if (null == data || null == data.getMain()){
+            throw new BizException(500, "数据为空,请填写后再保存");
+        }
+        //公司ID
+        Long companyId = BaseContextHolder.getCompanyId();
+        //人员Id
+        Long userId = BaseContextHolder.getUserId();
+        //获取主表信息
+        CustomerDTO main = data.getMain();
+        //更新从表数据
+        List<CustomercontactDTO> items1 = data.getItems1();
+        List<CustomeraddressDTO> items2 = data.getItems2();
+        //插入从表数据
+        List<Customercontact> insertDetail1 = new ArrayList<>();
+        List<Customeraddress> insertDetail2 = new ArrayList<>();
+        //更新从表数据
+        List<Customercontact> updateDetail1 = new ArrayList<>();
+        List<Customeraddress> updateDetail2 = new ArrayList<>();
+        //返回对象
+        DocBaseDTO baseDTO = null;
+        Long cu_id = main.getId();
+        String cu_code = main.getCu_code();
+        Customer customer = BeanMapper.map(main,Customer.class);
+        customer.setCompanyId(companyId);
+        customer.setCreatorId(userId);
+        customer.setCreateTime(new Date());
+
+        //编号校验
+//        pu_code = pushMaxnubmer(pu_code, pu_id);
+        //单号赋值
+//        purchase.setPu_code(pu_code);
+        if (StringUtils.isEmpty(cu_id) || "0".equals(cu_id.toString())) {
+            //插入操作
+            getMapper().insertSelective(customer);
+            cu_id = customer.getId();
+            //添加从表传输对象
+            for (CustomercontactDTO item : items1) {
+                Customercontact detail1 = BeanMapper.map(item,Customercontact.class);
+                detail1.setCc_cuid(cu_id);
+                detail1.setCompanyId(companyId);
+                detail1.setCreatorId(userId);
+                detail1.setCreateTime(new Date());
+                insertDetail1.add(detail1);
+            }
+            //插入从表
+            if (insertDetail1.size()>0) {
+                customercontactMapper.batchInsert(insertDetail1);
+            }
+
+            for (CustomeraddressDTO item : items2) {
+                Customeraddress detail2 = BeanMapper.map(item,Customeraddress.class);
+                detail2.setCa_cuid(cu_id);
+                detail2.setCompanyId(companyId);
+                detail2.setCreatorId(userId);
+                detail2.setCreateTime(new Date());
+            }
+            //插入从表
+            if (insertDetail2.size()>0) {
+                customeraddressMapper.batchInsert(insertDetail2);
+            }
+//            baseDTO = getBaseDTOById(pu_id);
+            //日志记录
+//            messageLogService.save(baseDTO);
+            return baseDTO;
+        }
+        //更新操作
+        getMapper().updateByPrimaryKeySelective(customer);
+        //添加从表传输对象
+        for (CustomercontactDTO item : items1) {
+            Customercontact detail1 = BeanMapper.map(item,Customercontact.class);
+            detail1.setCc_cuid(cu_id);
+            detail1.setCompanyId(companyId);
+            detail1.setCreatorId(userId);
+            detail1.setCreateTime(new Date());
+            if (StringUtils.isEmpty(detail1.getId()) || "0".equals(detail1.getId().toString())) {
+                insertDetail1.add(detail1);
+            } else {
+                updateDetail1.add(detail1);
+            }
+        }
+        //插入从表
+        if (insertDetail1.size()>0) {
+            customercontactMapper.batchInsert(insertDetail1);
+        }
+        //更新从表
+        if (updateDetail1.size()>0) {
+            customercontactMapper.batchUpdate(updateDetail1);
+        }
+
+        for (CustomeraddressDTO item : items2) {
+            Customeraddress detail2 = BeanMapper.map(item,Customeraddress.class);
+            detail2.setCa_cuid(cu_id);
+            detail2.setCompanyId(companyId);
+            detail2.setCreatorId(userId);
+            detail2.setCreateTime(new Date());
+            if (StringUtils.isEmpty(detail2.getId()) || "0".equals(detail2.getId().toString())) {
+                insertDetail2.add(detail2);
+            } else {
+                updateDetail2.add(detail2);
+            }
+
+        }
+        //插入从表
+        if (insertDetail2.size()>0) {
+            customeraddressMapper.batchInsert(insertDetail2);
+        }
+        //更新从表
+        if (updateDetail2.size()>0) {
+            customeraddressMapper.batchUpdate(updateDetail2);
+        }
+
+
+        //            baseDTO = getBaseDTOById(pu_id);
+        //日志记录
+//            messageLogService.save(baseDTO);
+        return baseDTO;
     }
 
     @Override
@@ -94,6 +213,21 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
 
     }
 
+    @Override
+    public void close(long id) {
+
+    }
+
+    @Override
+    public void open(long id) {
+
+    }
+
+    @Override
+    public void batchDelete(BatchDealBaseDTO baseDTOs) {
+
+    }
+
     private List<CustomerList> getListByMode(ListReqDTO req) {
         List<CustomerList> list = null;
         Long companyId = BaseContextHolder.getCompanyId();

+ 1 - 1
applications/document/document-server/src/main/resources/mapper/CustomerListMapper.xml

@@ -31,7 +31,7 @@
         ${con}
       </if>
       <if test="companyId != null">
-        and   companyid = #{companyId}
+        and   customer.companyid = #{companyId}
       </if>
     </where>  order by cu_id
   </select>

+ 16 - 39
applications/document/document-server/src/main/resources/mapper/CustomerMapper.xml

@@ -49,34 +49,13 @@
     delete from customer
     where cu_id = #{cu_id,jdbcType=INTEGER}
   </delete>
-  <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Customer">
-    insert into customer (cu_id, cu_code, cu_name, 
-      cu_uu, cu_type, cu_begindate, 
-      cu_beginaramount, cu_beginprerecamount, cu_promisedays, 
-      cu_taxrate, cu_sellerid, cu_sellercode, 
-      cu_sellername, cu_credit, cu_status, 
-      cu_statuscode, cu_recordmanid, cu_recordman, 
-      cu_recorddate, companyid, updaterid, 
-      updatetime, cu_text1, cu_text2, 
-      cu_text3, cu_text4, cu_text5, 
-      cu_leftamount, cu_recamount)
-    values (#{cu_id,jdbcType=INTEGER}, #{cu_code,jdbcType=VARCHAR}, #{cu_name,jdbcType=VARCHAR}, 
-      #{cu_uu,jdbcType=VARCHAR}, #{cu_type,jdbcType=VARCHAR}, #{cu_begindate,jdbcType=TIMESTAMP}, 
-      #{cu_beginaramount,jdbcType=DOUBLE}, #{cu_beginprerecamount,jdbcType=DOUBLE}, #{cu_promisedays,jdbcType=DOUBLE}, 
-      #{cu_taxrate,jdbcType=DOUBLE}, #{cu_sellerid,jdbcType=INTEGER}, #{cu_sellercode,jdbcType=VARCHAR}, 
-      #{cu_sellername,jdbcType=VARCHAR}, #{cu_credit,jdbcType=DOUBLE}, #{cu_status,jdbcType=VARCHAR}, 
-      #{cu_statuscode,jdbcType=VARCHAR}, #{cu_recordmanid,jdbcType=INTEGER}, #{cu_recordman,jdbcType=VARCHAR}, 
-      #{cu_recorddate,jdbcType=TIMESTAMP}, #{companyid,jdbcType=INTEGER}, #{updaterid,jdbcType=INTEGER}, 
-      #{updatetime,jdbcType=TIMESTAMP}, #{cu_text1,jdbcType=VARCHAR}, #{cu_text2,jdbcType=VARCHAR}, 
-      #{cu_text3,jdbcType=VARCHAR}, #{cu_text4,jdbcType=VARCHAR}, #{cu_text5,jdbcType=VARCHAR}, 
-      #{cu_leftamount,jdbcType=DOUBLE}, #{cu_recamount,jdbcType=DOUBLE})
-  </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Customer">
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
     insert into customer
     <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="cu_id != null">
-        cu_id,
-      </if>
+
       <if test="cu_code != null">
         cu_code,
       </if>
@@ -131,13 +110,13 @@
       <if test="cu_recorddate != null">
         cu_recorddate,
       </if>
-      <if test="companyid != null">
+      <if test="companyId != null">
         companyid,
       </if>
-      <if test="updaterid != null">
+      <if test="updaterId != null">
         updaterid,
       </if>
-      <if test="updatetime != null">
+      <if test="updateTime != null">
         updatetime,
       </if>
       <if test="cu_text1 != null">
@@ -163,9 +142,7 @@
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="cu_id != null">
-        #{cu_id,jdbcType=INTEGER},
-      </if>
+
       <if test="cu_code != null">
         #{cu_code,jdbcType=VARCHAR},
       </if>
@@ -220,14 +197,14 @@
       <if test="cu_recorddate != null">
         #{cu_recorddate,jdbcType=TIMESTAMP},
       </if>
-      <if test="companyid != null">
-        #{companyid,jdbcType=INTEGER},
+      <if test="companyId != null">
+        #{companyId,jdbcType=INTEGER},
       </if>
-      <if test="updaterid != null">
-        #{updaterid,jdbcType=INTEGER},
+      <if test="updaterId != null">
+        #{updaterId,jdbcType=INTEGER},
       </if>
-      <if test="updatetime != null">
-        #{updatetime,jdbcType=TIMESTAMP},
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
       </if>
       <if test="cu_text1 != null">
         #{cu_text1,jdbcType=VARCHAR},
@@ -340,7 +317,7 @@
         cu_recamount = #{cu_recamount,jdbcType=DOUBLE},
       </if>
     </set>
-    where cu_id = #{cu_id,jdbcType=INTEGER}
+    where cu_id = #{id,jdbcType=INTEGER}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Customer">
     update customer
@@ -372,6 +349,6 @@
       cu_text5 = #{cu_text5,jdbcType=VARCHAR},
       cu_leftamount = #{cu_leftamount,jdbcType=DOUBLE},
       cu_recamount = #{cu_recamount,jdbcType=DOUBLE}
-    where cu_id = #{cu_id,jdbcType=INTEGER}
+    where cu_id = #{id,jdbcType=INTEGER}
   </update>
 </mapper>

+ 173 - 59
applications/document/document-server/src/main/resources/mapper/CustomeraddressMapper.xml

@@ -37,26 +37,13 @@
     delete from customeraddress
     where ca_id = #{ca_id,jdbcType=INTEGER}
   </delete>
-  <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Customeraddress">
-    insert into customeraddress (ca_id, ca_cuid, ca_detno, 
-      ca_person, ca_phone, ca_default, 
-      companyid, updaterid, updatetime, 
-      ca_text1, ca_text2, ca_text3, 
-      ca_text4, ca_text5, ca_address
-      )
-    values (#{ca_id,jdbcType=INTEGER}, #{ca_cuid,jdbcType=INTEGER}, #{ca_detno,jdbcType=INTEGER}, 
-      #{ca_person,jdbcType=VARCHAR}, #{ca_phone,jdbcType=INTEGER}, #{ca_default,jdbcType=INTEGER}, 
-      #{companyid,jdbcType=INTEGER}, #{updaterid,jdbcType=INTEGER}, #{updatetime,jdbcType=TIMESTAMP}, 
-      #{ca_text1,jdbcType=VARCHAR}, #{ca_text2,jdbcType=VARCHAR}, #{ca_text3,jdbcType=VARCHAR}, 
-      #{ca_text4,jdbcType=VARCHAR}, #{ca_text5,jdbcType=VARCHAR}, #{ca_address,jdbcType=LONGVARCHAR}
-      )
-  </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Customeraddress">
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
     insert into customeraddress
     <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="ca_id != null">
-        ca_id,
-      </if>
+
       <if test="ca_cuid != null">
         ca_cuid,
       </if>
@@ -72,13 +59,13 @@
       <if test="ca_default != null">
         ca_default,
       </if>
-      <if test="companyid != null">
+      <if test="companyId != null">
         companyid,
       </if>
-      <if test="updaterid != null">
+      <if test="updaterId != null">
         updaterid,
       </if>
-      <if test="updatetime != null">
+      <if test="updateTime != null">
         updatetime,
       </if>
       <if test="ca_text1 != null">
@@ -101,9 +88,7 @@
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="ca_id != null">
-        #{ca_id,jdbcType=INTEGER},
-      </if>
+
       <if test="ca_cuid != null">
         #{ca_cuid,jdbcType=INTEGER},
       </if>
@@ -119,14 +104,14 @@
       <if test="ca_default != null">
         #{ca_default,jdbcType=INTEGER},
       </if>
-      <if test="companyid != null">
-        #{companyid,jdbcType=INTEGER},
+      <if test="companyId != null">
+        #{companyId,jdbcType=INTEGER},
       </if>
-      <if test="updaterid != null">
-        #{updaterid,jdbcType=INTEGER},
+      <if test="updaterId != null">
+        #{updaterId,jdbcType=INTEGER},
       </if>
-      <if test="updatetime != null">
-        #{updatetime,jdbcType=TIMESTAMP},
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
       </if>
       <if test="ca_text1 != null">
         #{ca_text1,jdbcType=VARCHAR},
@@ -151,8 +136,8 @@
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Customeraddress">
     update customeraddress
     <set>
-      <if test="ca_cuid != null">
-        ca_cuid = #{ca_cuid,jdbcType=INTEGER},
+      <if test="id != null">
+        ca_cuid = #{id,jdbcType=INTEGER},
       </if>
       <if test="ca_detno != null">
         ca_detno = #{ca_detno,jdbcType=INTEGER},
@@ -166,14 +151,14 @@
       <if test="ca_default != null">
         ca_default = #{ca_default,jdbcType=INTEGER},
       </if>
-      <if test="companyid != null">
-        companyid = #{companyid,jdbcType=INTEGER},
+      <if test="companyId != null">
+        companyid = #{companyId,jdbcType=INTEGER},
       </if>
-      <if test="updaterid != null">
-        updaterid = #{updaterid,jdbcType=INTEGER},
+      <if test="updaterId != null">
+        updaterid = #{updaterId,jdbcType=INTEGER},
       </if>
-      <if test="updatetime != null">
-        updatetime = #{updatetime,jdbcType=TIMESTAMP},
+      <if test="updateTime != null">
+        updatetime = #{updateTime,jdbcType=TIMESTAMP},
       </if>
       <if test="ca_text1 != null">
         ca_text1 = #{ca_text1,jdbcType=VARCHAR},
@@ -194,7 +179,7 @@
         ca_address = #{ca_address,jdbcType=LONGVARCHAR},
       </if>
     </set>
-    where ca_id = #{ca_id,jdbcType=INTEGER}
+    where ca_id = #{id,jdbcType=INTEGER}
   </update>
   <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.saas.document.entities.Customeraddress">
     update customeraddress
@@ -203,35 +188,19 @@
       ca_person = #{ca_person,jdbcType=VARCHAR},
       ca_phone = #{ca_phone,jdbcType=INTEGER},
       ca_default = #{ca_default,jdbcType=INTEGER},
-      companyid = #{companyid,jdbcType=INTEGER},
-      updaterid = #{updaterid,jdbcType=INTEGER},
-      updatetime = #{updatetime,jdbcType=TIMESTAMP},
+      companyid = #{companyId,jdbcType=INTEGER},
+      updaterid = #{updaterId,jdbcType=INTEGER},
+      updatetime = #{updateTime,jdbcType=TIMESTAMP},
       ca_text1 = #{ca_text1,jdbcType=VARCHAR},
       ca_text2 = #{ca_text2,jdbcType=VARCHAR},
       ca_text3 = #{ca_text3,jdbcType=VARCHAR},
       ca_text4 = #{ca_text4,jdbcType=VARCHAR},
       ca_text5 = #{ca_text5,jdbcType=VARCHAR},
       ca_address = #{ca_address,jdbcType=LONGVARCHAR}
-    where ca_id = #{ca_id,jdbcType=INTEGER}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Customeraddress">
-    update customeraddress
-    set ca_cuid = #{ca_cuid,jdbcType=INTEGER},
-      ca_detno = #{ca_detno,jdbcType=INTEGER},
-      ca_person = #{ca_person,jdbcType=VARCHAR},
-      ca_phone = #{ca_phone,jdbcType=INTEGER},
-      ca_default = #{ca_default,jdbcType=INTEGER},
-      companyid = #{companyid,jdbcType=INTEGER},
-      updaterid = #{updaterid,jdbcType=INTEGER},
-      updatetime = #{updatetime,jdbcType=TIMESTAMP},
-      ca_text1 = #{ca_text1,jdbcType=VARCHAR},
-      ca_text2 = #{ca_text2,jdbcType=VARCHAR},
-      ca_text3 = #{ca_text3,jdbcType=VARCHAR},
-      ca_text4 = #{ca_text4,jdbcType=VARCHAR},
-      ca_text5 = #{ca_text5,jdbcType=VARCHAR}
-    where ca_id = #{ca_id,jdbcType=INTEGER}
+    where ca_id = #{id,jdbcType=INTEGER}
   </update>
 
+
   <select id="selectByFK" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
     select
     <include refid="Base_Column_List" />
@@ -241,5 +210,150 @@
     where ca_cuid = #{fk_i,jdbcType=INTEGER}
   </select>
 
+  <insert id="batchInsert" parameterType="java.util.List" >
+    <foreach collection="list" item="item" index="index" open="" close="" separator=",">
+      insert into customeraddress
+      <trim prefix="(" suffix=")" suffixOverrides=",">
+
+        <if test="item.ca_cuid != null">
+          ca_cuid,
+        </if>
+        <if test="item.ca_detno != null">
+          ca_detno,
+        </if>
+        <if test="item.ca_person != null">
+          ca_person,
+        </if>
+        <if test="item.ca_phone != null">
+          ca_phone,
+        </if>
+        <if test="item.ca_default != null">
+          ca_default,
+        </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.ca_text1 != null">
+          ca_text1,
+        </if>
+        <if test="item.ca_text2 != null">
+          ca_text2,
+        </if>
+        <if test="item.ca_text3 != null">
+          ca_text3,
+        </if>
+        <if test="item.ca_text4 != null">
+          ca_text4,
+        </if>
+        <if test="item.ca_text5 != null">
+          ca_text5,
+        </if>
+        <if test="item.ca_address != null">
+          ca_address,
+        </if>
+      </trim>
+      <trim prefix="values (" suffix=")" suffixOverrides=",">
+
+        <if test="item.ca_cuid != null">
+          #{item.ca_cuid,jdbcType=INTEGER},
+        </if>
+        <if test="item.ca_detno != null">
+          #{item.ca_detno,jdbcType=INTEGER},
+        </if>
+        <if test="item.ca_person != null">
+          #{item.ca_person,jdbcType=VARCHAR},
+        </if>
+        <if test="item.ca_phone != null">
+          #{item.ca_phone,jdbcType=INTEGER},
+        </if>
+        <if test="item.ca_default != null">
+          #{item.ca_default,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.ca_text1 != null">
+          #{item.ca_text1,jdbcType=VARCHAR},
+        </if>
+        <if test="item.ca_text2 != null">
+          #{item.ca_text2,jdbcType=VARCHAR},
+        </if>
+        <if test="item.ca_text3 != null">
+          #{item.ca_text3,jdbcType=VARCHAR},
+        </if>
+        <if test="item.ca_text4 != null">
+          #{item.ca_text4,jdbcType=VARCHAR},
+        </if>
+        <if test="item.ca_text5 != null">
+          #{item.ca_text5,jdbcType=VARCHAR},
+        </if>
+        <if test="item.ca_address != null">
+          #{item.ca_address,jdbcType=LONGVARCHAR},
+        </if>
+      </trim>
+    </foreach>
+  </insert>
+
+
+  <update id="batchUpdate" parameterType="com.usoftchina.saas.document.entities.Customeraddress" >
+    <foreach collection="list" item="item" index="index" open="" close="" separator=";">
+      update customeraddress
+      <set>
+        <if test="item.ca_detno != null">
+          ca_detno = #{item.ca_detno,jdbcType=INTEGER},
+        </if>
+        <if test="item.ca_person != null">
+          ca_person = #{item.ca_person,jdbcType=VARCHAR},
+        </if>
+        <if test="item.ca_phone != null">
+          ca_phone = #{item.ca_phone,jdbcType=INTEGER},
+        </if>
+        <if test="item.ca_default != null">
+          ca_default = #{item.ca_default,jdbcType=INTEGER},
+        </if>
+        <if test="item.companyId != null">
+          companyid = #{item.companyId,jdbcType=INTEGER},
+        </if>
+        <if test="item.updaterId != null">
+          updaterid = #{item.updaterId,jdbcType=INTEGER},
+        </if>
+        <if test="item.updateTime != null">
+          updatetime = #{item.updateTime,jdbcType=TIMESTAMP},
+        </if>
+        <if test="item.ca_text1 != null">
+          ca_text1 = #{item.ca_text1,jdbcType=VARCHAR},
+        </if>
+        <if test="item.ca_text2 != null">
+          ca_text2 = #{item.ca_text2,jdbcType=VARCHAR},
+        </if>
+        <if test="item.ca_text3 != null">
+          ca_text3 = #{item.ca_text3,jdbcType=VARCHAR},
+        </if>
+        <if test="item.ca_text4 != null">
+          ca_text4 = #{item.ca_text4,jdbcType=VARCHAR},
+        </if>
+        <if test="item.ca_text5 != null">
+          ca_text5 = #{item.ca_text5,jdbcType=VARCHAR},
+        </if>
+        <if test="item.ca_address != null">
+          ca_address = #{item.ca_address,jdbcType=LONGVARCHAR},
+        </if>
+      </set>
+      where ca_id = #{item.id,jdbcType=INTEGER}
+    </foreach>
+  </update>
+
 
 </mapper>

+ 136 - 55
applications/document/document-server/src/main/resources/mapper/CustomercontactMapper.xml

@@ -32,26 +32,13 @@
     delete from customercontact
     where cc_id = #{cc_id,jdbcType=INTEGER}
   </delete>
-  <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Customercontact">
-    insert into customercontact (cc_id, cc_cuid, cc_detno, 
-      cc_name, cc_tel, cc_qq, 
-      cc_email, companyid, updaterid, 
-      updatetime, cc_text1, cc_text2, 
-      cc_text3, cc_text4, cc_text5
-      )
-    values (#{cc_id,jdbcType=INTEGER}, #{cc_cuid,jdbcType=INTEGER}, #{cc_detno,jdbcType=INTEGER}, 
-      #{cc_name,jdbcType=VARCHAR}, #{cc_tel,jdbcType=INTEGER}, #{cc_qq,jdbcType=VARCHAR}, 
-      #{cc_email,jdbcType=VARCHAR}, #{companyid,jdbcType=INTEGER}, #{updaterid,jdbcType=INTEGER}, 
-      #{updatetime,jdbcType=TIMESTAMP}, #{cc_text1,jdbcType=VARCHAR}, #{cc_text2,jdbcType=VARCHAR}, 
-      #{cc_text3,jdbcType=VARCHAR}, #{cc_text4,jdbcType=VARCHAR}, #{cc_text5,jdbcType=VARCHAR}
-      )
-  </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Customercontact">
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
     insert into customercontact
     <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="cc_id != null">
-        cc_id,
-      </if>
+
       <if test="cc_cuid != null">
         cc_cuid,
       </if>
@@ -70,13 +57,13 @@
       <if test="cc_email != null">
         cc_email,
       </if>
-      <if test="companyid != null">
+      <if test="companyId != null">
         companyid,
       </if>
-      <if test="updaterid != null">
+      <if test="updaterId != null">
         updaterid,
       </if>
-      <if test="updatetime != null">
+      <if test="updateTime != null">
         updatetime,
       </if>
       <if test="cc_text1 != null">
@@ -96,9 +83,7 @@
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="cc_id != null">
-        #{cc_id,jdbcType=INTEGER},
-      </if>
+
       <if test="cc_cuid != null">
         #{cc_cuid,jdbcType=INTEGER},
       </if>
@@ -117,14 +102,14 @@
       <if test="cc_email != null">
         #{cc_email,jdbcType=VARCHAR},
       </if>
-      <if test="companyid != null">
-        #{companyid,jdbcType=INTEGER},
+      <if test="companyId != null">
+        #{companyId,jdbcType=INTEGER},
       </if>
-      <if test="updaterid != null">
-        #{updaterid,jdbcType=INTEGER},
+      <if test="updaterId != null">
+        #{updaterId,jdbcType=INTEGER},
       </if>
-      <if test="updatetime != null">
-        #{updatetime,jdbcType=TIMESTAMP},
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
       </if>
       <if test="cc_text1 != null">
         #{cc_text1,jdbcType=VARCHAR},
@@ -164,14 +149,14 @@
       <if test="cc_email != null">
         cc_email = #{cc_email,jdbcType=VARCHAR},
       </if>
-      <if test="companyid != null">
-        companyid = #{companyid,jdbcType=INTEGER},
+      <if test="companyId != null">
+        companyid = #{companyId,jdbcType=INTEGER},
       </if>
-      <if test="updaterid != null">
-        updaterid = #{updaterid,jdbcType=INTEGER},
+      <if test="updaterId != null">
+        updaterid = #{updaterId,jdbcType=INTEGER},
       </if>
-      <if test="updatetime != null">
-        updatetime = #{updatetime,jdbcType=TIMESTAMP},
+      <if test="updateTime != null">
+        updatetime = #{updateTime,jdbcType=TIMESTAMP},
       </if>
       <if test="cc_text1 != null">
         cc_text1 = #{cc_text1,jdbcType=VARCHAR},
@@ -189,27 +174,8 @@
         cc_text5 = #{cc_text5,jdbcType=VARCHAR},
       </if>
     </set>
-    where cc_id = #{cc_id,jdbcType=INTEGER}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Customercontact">
-    update customercontact
-    set cc_cuid = #{cc_cuid,jdbcType=INTEGER},
-      cc_detno = #{cc_detno,jdbcType=INTEGER},
-      cc_name = #{cc_name,jdbcType=VARCHAR},
-      cc_tel = #{cc_tel,jdbcType=INTEGER},
-      cc_qq = #{cc_qq,jdbcType=VARCHAR},
-      cc_email = #{cc_email,jdbcType=VARCHAR},
-      companyid = #{companyid,jdbcType=INTEGER},
-      updaterid = #{updaterid,jdbcType=INTEGER},
-      updatetime = #{updatetime,jdbcType=TIMESTAMP},
-      cc_text1 = #{cc_text1,jdbcType=VARCHAR},
-      cc_text2 = #{cc_text2,jdbcType=VARCHAR},
-      cc_text3 = #{cc_text3,jdbcType=VARCHAR},
-      cc_text4 = #{cc_text4,jdbcType=VARCHAR},
-      cc_text5 = #{cc_text5,jdbcType=VARCHAR}
-    where cc_id = #{cc_id,jdbcType=INTEGER}
+    where cc_id = #{id,jdbcType=INTEGER}
   </update>
-
   <select id="selectByFK" parameterType="java.lang.Long" resultMap="BaseResultMap">
     select
     <include refid="Base_Column_List" />
@@ -217,6 +183,121 @@
     where cc_cuid = #{fk_i,jdbcType=INTEGER}
   </select>
 
+  <insert id="batchInsert" parameterType="java.util.List" >
+    <foreach collection="list" item="item" index="index" open="" close="" separator=",">
+      insert into customercontact
+      <trim prefix="(" suffix=")" suffixOverrides=",">
+        <if test="item.cc_cuid != null">
+          cc_cuid,
+        </if>
+        <if test="item.cc_detno != null">
+          cc_detno,
+        </if>
+        <if test="item.cc_name != null">
+          cc_name,
+        </if>
+        <if test="item.cc_tel != null">
+          cc_tel,
+        </if>
+        <if test="item.cc_qq != null">
+          cc_qq,
+        </if>
+        <if test="item.cc_email != null">
+          cc_email,
+        </if>
+        <if test="item.companyId != null">
+          companyid,
+        </if>
+        <if test="item.updaterId != null">
+          updaterid,
+        </if>
+        <if test="item.updateTime != null">
+          updatetime
+        </if>
+      </trim>
+      <trim prefix="values (" suffix=")" suffixOverrides=",">
+        <if test="item.cc_cuid != null">
+          #{item.cc_cuid,jdbcType=INTEGER},
+        </if>
+        <if test="item.cc_detno != null">
+          #{item.cc_detno,jdbcType=INTEGER},
+        </if>
+        <if test="item.cc_name != null">
+          #{item.cc_name,jdbcType=VARCHAR},
+        </if>
+        <if test="item.cc_tel != null">
+          #{item.cc_tel,jdbcType=INTEGER},
+        </if>
+        <if test="item.cc_qq != null">
+          #{item.cc_qq,jdbcType=VARCHAR},
+        </if>
+        <if test="item.cc_email != null">
+          #{item.cc_email,jdbcType=VARCHAR},
+        </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>
+      </trim>
+    </foreach>
+  </insert>
+
+
+  <update id="batchUpdate" parameterType="com.usoftchina.saas.document.entities.Customercontact" >
+    <foreach collection="list" item="item" index="index" open="" close="" separator=";">
+      update customercontact
+      <set>
+        <if test="item.cc_cuid != null">
+          cc_cuid = #{item.cc_cuid,jdbcType=INTEGER},
+        </if>
+        <if test="item.cc_detno != null">
+          cc_detno = #{item.cc_detno,jdbcType=INTEGER},
+        </if>
+        <if test="item.cc_name != null">
+          cc_name = #{item.cc_name,jdbcType=VARCHAR},
+        </if>
+        <if test="item.cc_tel != null">
+          cc_tel = #{item.cc_tel,jdbcType=INTEGER},
+        </if>
+        <if test="item.cc_qq != null">
+          cc_qq = #{item.cc_qq,jdbcType=VARCHAR},
+        </if>
+        <if test="item.cc_email != null">
+          cc_email = #{item.cc_email,jdbcType=VARCHAR},
+        </if>
+        <if test="item.companyId != null">
+          companyid = #{item.companyId,jdbcType=INTEGER},
+        </if>
+        <if test="item.updaterId != null">
+          updaterid = #{item.updaterId,jdbcType=INTEGER},
+        </if>
+        <if test="item.updateTime != null">
+          updatetime = #{item.updateTime,jdbcType=TIMESTAMP},
+        </if>
+        <if test="item.cc_text1 != null">
+          cc_text1 = #{item.cc_text1,jdbcType=VARCHAR},
+        </if>
+        <if test="item.cc_text2 != null">
+          cc_text2 = #{item.cc_text2,jdbcType=VARCHAR},
+        </if>
+        <if test="item.cc_text3 != null">
+          cc_text3 = #{item.cc_text3,jdbcType=VARCHAR},
+        </if>
+        <if test="item.cc_text4 != null">
+          cc_text4 = #{item.cc_text4,jdbcType=VARCHAR},
+        </if>
+        <if test="item.cc_text5 != null">
+          cc_text5 = #{item.cc_text5,jdbcType=VARCHAR},
+        </if>
+      </set>
+      where cc_id = #{item.id,jdbcType=INTEGER}
+    </foreach>
+  </update>
 
 
 </mapper>

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

@@ -13,7 +13,7 @@
   </resultMap>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
     select 
-    <include refid="Base_Column_List" />
+    *
     from productbrand
     where pb_id = #{id}
   </select>

+ 66 - 0
applications/document/document-server/src/test/java/com/usoftchina/saas/document/mapper/CustomeraddressMapperTest.java

@@ -0,0 +1,66 @@
+package com.usoftchina.saas.document.mapper;
+
+import com.usoftchina.saas.document.DocumentApplication;
+import com.usoftchina.saas.document.entities.Customeraddress;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by zdw
+ * 2018-10-24 15:16.
+ */
+@RunWith(SpringJUnit4ClassRunner.class)
+@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = DocumentApplication.class)
+@EnableAutoConfiguration
+public class CustomeraddressMapperTest {
+    @Autowired
+    private CustomeraddressMapper customeraddressMapper;
+
+
+    @Test
+    public void deleteByPrimaryKey() throws Exception {
+    }
+
+    @Test
+    public void insertSelective() throws Exception {
+    }
+
+    @Test
+    public void selectByPrimaryKey() throws Exception {
+    }
+
+    @Test
+    public void updateByPrimaryKeyWithBLOBs() throws Exception {
+    }
+
+    @Test
+    public void selectByFK() throws Exception {
+    }
+
+    @Test
+    public void batchInsert() throws Exception {
+        List<Customeraddress> list = new ArrayList<>();
+        Customeraddress customeraddress = new Customeraddress();
+        customeraddress.setCa_address("地址1");
+        list.add(customeraddress);
+        customeraddressMapper.batchInsert(list);
+    }
+
+    @Test
+    public void batchUpdate() throws Exception {
+        List<Customeraddress> list = new ArrayList<>();
+        Customeraddress customeraddress = new Customeraddress();
+        customeraddress.setId(new Long(2));
+        customeraddress.setCa_person("人2");
+        list.add(customeraddress);
+        customeraddressMapper.batchUpdate(list);
+    }
+
+}

+ 82 - 0
applications/document/document-server/src/test/java/com/usoftchina/saas/document/mapper/CustomercontactMapperTest.java

@@ -0,0 +1,82 @@
+package com.usoftchina.saas.document.mapper;
+
+import com.usoftchina.saas.document.DocumentApplication;
+import com.usoftchina.saas.document.entities.Customercontact;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Created by zdw
+ * 2018-10-24 14:33.
+ */
+@RunWith(SpringJUnit4ClassRunner.class)
+@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = DocumentApplication.class)
+@EnableAutoConfiguration
+public class CustomercontactMapperTest {
+    @Autowired
+    private CustomercontactMapper customercontactMapper;
+
+    @Test
+    public void deleteByPrimaryKey() throws Exception {
+    }
+
+    @Test
+    public void insertSelective() throws Exception {
+    }
+
+    @Test
+    public void selectByPrimaryKey() throws Exception {
+    }
+
+    @Test
+    public void updateByPrimaryKeySelective() throws Exception {
+    }
+
+    @Test
+    public void selectByFK() throws Exception {
+    }
+
+    @Test
+    public void batchInsert() throws Exception {
+        List<Customercontact> insertDetail1 = new ArrayList<>();
+        Customercontact customercontact = new Customercontact();
+        customercontact.setCc_cuid(new Long(1));
+        customercontact.setCc_detno(1);
+        customercontact.setCc_name("zdw");
+        customercontact.setCc_tel(1881);
+        customercontact.setCc_qq("qq");
+        customercontact.setCc_email("@qq");
+        customercontact.setCompanyId(1);
+        customercontact.setUpdaterId(1);
+        customercontact.setUpdateTime(new Date());
+        insertDetail1.add(customercontact);
+        customercontactMapper.batchInsert(insertDetail1);
+    }
+
+    @Test
+    public void batchUpdate() throws Exception {
+        List<Customercontact> insertDetail1 = new ArrayList<>();
+        Customercontact customercontact = new Customercontact();
+        customercontact.setCc_cuid(new Long(1));
+        customercontact.setCc_detno(1);
+        customercontact.setCc_name("ssszdw");
+        customercontact.setCc_tel(1881);
+        customercontact.setCc_qq("qq");
+        customercontact.setCc_email("@qq");
+        customercontact.setCompanyId(1);
+        customercontact.setUpdaterId(1);
+        customercontact.setUpdateTime(new Date());
+        customercontact.setId(new Long(5));
+        insertDetail1.add(customercontact);
+        customercontactMapper.batchUpdate(insertDetail1);
+    }
+
+}

+ 77 - 0
applications/document/document-server/src/test/java/com/usoftchina/saas/document/service/CustomerServiceTest.java

@@ -0,0 +1,77 @@
+package com.usoftchina.saas.document.service;
+
+import com.usoftchina.saas.document.DocumentApplication;
+import com.usoftchina.saas.document.dto.CustomerDTO;
+import com.usoftchina.saas.document.dto.CustomerFormDTO;
+import com.usoftchina.saas.document.dto.CustomercontactDTO;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by zdw
+ * 2018-10-24 11:48.
+ */
+@RunWith(SpringJUnit4ClassRunner.class)
+@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = DocumentApplication.class)
+@EnableAutoConfiguration
+public class CustomerServiceTest {
+    @Autowired
+    private CustomerService customerService;
+
+    @Test
+    public void getListData() throws Exception {
+    }
+
+    @Test
+    public void getFormData() throws Exception {
+    }
+
+    @Test
+    public void saveFormData() throws Exception {
+        CustomerFormDTO customerFormDTO = new CustomerFormDTO();
+        CustomerDTO main = new CustomerDTO();
+
+        main.setCu_name("客户2");
+
+        List<CustomercontactDTO> items1 = new ArrayList<>();
+        CustomercontactDTO item = new CustomercontactDTO();
+        item.setCc_name("联系人1");
+        item.setCc_detno(1);
+        item.setCc_tel(112);
+        item.setCc_qq("396996717");
+        item.setCc_email("@qq.com");
+
+
+
+
+        items1.add(item);
+
+        customerFormDTO.setMain(main);
+        customerFormDTO.setItems1(items1);
+        customerService.saveFormData(customerFormDTO);
+    }
+
+    @Test
+    public void delete() throws Exception {
+    }
+
+    @Test
+    public void close() throws Exception {
+    }
+
+    @Test
+    public void open() throws Exception {
+    }
+
+    @Test
+    public void batchDelete() throws Exception {
+    }
+
+}

+ 8 - 1
applications/document/document-server/src/test/java/com/usoftchina/saas/document/service/CustomerTest.java

@@ -2,6 +2,7 @@ package com.usoftchina.saas.document.service;
 
 
 import com.usoftchina.saas.document.DocumentApplication;
+import com.usoftchina.saas.document.mapper.CustomerListMapper;
 import com.usoftchina.saas.document.mapper.CustomeraddressMapper;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -17,6 +18,9 @@ public class CustomerTest {
 
     @Autowired
     private CustomerService customerService;
+    @Autowired
+    private CustomerListMapper customerListMapper;
+
     @Autowired
     private CustomeraddressMapper customeraddressMapper;
 
@@ -27,6 +31,9 @@ public class CustomerTest {
 
     @Test
     public void test1(){
-        System.out.println(customeraddressMapper.selectByPrimaryKey(1));
+        System.out.println("---");
+        System.out.println(customerListMapper.selectCustomerListByCondition(null,null));
     }
+
+
 }

+ 3 - 3
applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdIODetailDTO.java

@@ -31,9 +31,9 @@ public class ProdIODetailDTO extends CommonBaseEntity implements Serializable {
 
     private String pd_unit;
 
-    private Integer pd_inqty;
+    private Double pd_inqty;
 
-    private Integer pd_outqty;
+    private Double pd_outqty;
 
     private Double pd_orderprice;
 
@@ -79,7 +79,7 @@ public class ProdIODetailDTO extends CommonBaseEntity implements Serializable {
 
     private Integer pd_ym;
 
-    private Integer pd_yqty;
+    private Double pd_yqty;
 
     private String pd_remark;
 

+ 3 - 3
applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdInOutListDTO.java

@@ -85,9 +85,9 @@ public class ProdInOutListDTO extends CommonBaseEntity implements Serializable {
 
     private String pd_unit;
 
-    private Integer pd_inqty;
+    private Double pd_inqty;
 
-    private Integer pd_outqty;
+    private Double pd_outqty;
 
     private Double pd_orderprice;
 
@@ -133,7 +133,7 @@ public class ProdInOutListDTO extends CommonBaseEntity implements Serializable {
 
     private Integer pd_ym;
 
-    private Integer pd_yqty;
+    private Double pd_yqty;
 
     private String pd_remark;
 

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

@@ -74,7 +74,7 @@ public class ProdIODetail extends CommonBaseEntity implements Serializable {
 
     private Integer pd_ym;
 
-    private Integer pd_yqty;
+    private Double pd_yqty;
 
     private String pd_remark;
 

+ 3 - 3
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOutList.java

@@ -84,9 +84,9 @@ public class ProdInOutList extends CommonBaseEntity{
 
     private String pd_unit;
 
-    private Integer pd_inqty;
+    private Double pd_inqty;
 
-    private Integer pd_outqty;
+    private Double pd_outqty;
 
     private Double pd_orderprice;
 
@@ -132,7 +132,7 @@ public class ProdInOutList extends CommonBaseEntity{
 
     private Integer pd_ym;
 
-    private Integer pd_yqty;
+    private Double pd_yqty;
 
     private String pd_remark;
 

+ 2 - 2
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/ProdInOutServiceImpl.java

@@ -136,7 +136,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                 detail.setPd_piid(pi_id);
                 detail.setPd_inoutno(pi_inoutno);
                 detail.setPd_piclass(prodInOut.getPi_class());
-                detail.setPd_yqty(0);
+                detail.setPd_yqty(new Double(0));
                 insertDetails.add(detail);
             }
             //插入从表
@@ -344,7 +344,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         }
         Integer count = "0".equals(String.valueOf(id)) ? purchaseMapper.validateCodeWhenInsert(code) :
                 purchaseMapper.validateCodeWhenUpdate(code, id);
-        return maxnumberService.pushMaxnubmer(count, code, "Purchase");
+        return maxnumberService.pushMaxnubmer(count, code, "Purchase").toString();
     }
 
 

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

@@ -12,8 +12,8 @@
     <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_inqty" jdbcType="DOUBLE" property="pd_inqty" />
+    <result column="pd_outqty" jdbcType="DOUBLE" 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" />
@@ -39,7 +39,7 @@
     <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_yqty" jdbcType="DOUBLE" 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"/>
@@ -206,7 +206,7 @@
     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_unit,jdbcType=VARCHAR}, #{pd_inqty,jdbcType=DOUBLE}, #{pd_outqty,jdbcType=DOUBLE},
       #{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}, 
@@ -215,7 +215,7 @@
       #{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_ym,jdbcType=INTEGER}, #{pd_yqty,jdbcType=DOUBLE}, #{pd_remark,jdbcType=LONGVARCHAR},
       #{pd_ioid,jdbcType=INTEGER}
       )
   </insert>
@@ -372,10 +372,10 @@
         #{pd_unit,jdbcType=VARCHAR},
       </if>
       <if test="pd_inqty != null">
-        #{pd_inqty,jdbcType=INTEGER},
+        #{pd_inqty,jdbcType=DOUBLE},
       </if>
       <if test="pd_outqty != null">
-        #{pd_outqty,jdbcType=INTEGER},
+        #{pd_outqty,jdbcType=DOUBLE},
       </if>
       <if test="pd_orderprice != null">
         #{pd_orderprice,jdbcType=DOUBLE},
@@ -453,7 +453,7 @@
         #{pd_ym,jdbcType=INTEGER},
       </if>
       <if test="pd_yqty != null">
-        #{pd_yqty,jdbcType=INTEGER},
+        #{pd_yqty,jdbcType=DOUBLE},
       </if>
       <if test="pd_remark != null">
         #{pd_remark,jdbcType=LONGVARCHAR},
@@ -503,10 +503,10 @@
         pd_unit = #{record.pd_unit,jdbcType=VARCHAR},
       </if>
       <if test="record.pd_inqty != null">
-        pd_inqty = #{record.pd_inqty,jdbcType=INTEGER},
+        pd_inqty = #{record.pd_inqty,jdbcType=DOUBLE},
       </if>
       <if test="record.pd_outqty != null">
-        pd_outqty = #{record.pd_outqty,jdbcType=INTEGER},
+        pd_outqty = #{record.pd_outqty,jdbcType=DOUBLE},
       </if>
       <if test="record.pd_orderprice != null">
         pd_orderprice = #{record.pd_orderprice,jdbcType=DOUBLE},
@@ -584,7 +584,7 @@
         pd_ym = #{record.pd_ym,jdbcType=INTEGER},
       </if>
       <if test="record.pd_yqty != null">
-        pd_yqty = #{record.pd_yqty,jdbcType=INTEGER},
+        pd_yqty = #{record.pd_yqty,jdbcType=DOUBLE},
       </if>
       <if test="record.pd_remark != null">
         pd_remark = #{record.pd_remark,jdbcType=LONGVARCHAR},
@@ -610,8 +610,8 @@
       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_inqty = #{record.pd_inqty,jdbcType=DOUBLE},
+      pd_outqty = #{record.pd_outqty,jdbcType=DOUBLE},
       pd_orderprice = #{record.pd_orderprice,jdbcType=DOUBLE},
       pd_sendprice = #{record.pd_sendprice,jdbcType=DOUBLE},
       pd_price = #{record.pd_price,jdbcType=DOUBLE},
@@ -637,7 +637,7 @@
       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_yqty = #{record.pd_yqty,jdbcType=DOUBLE},
       pd_remark = #{record.pd_remark,jdbcType=LONGVARCHAR},
       pd_ioid = #{record.pd_ioid,jdbcType=INTEGER}
     <if test="_parameter != null">
@@ -656,8 +656,8 @@
       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_inqty = #{record.pd_inqty,jdbcType=DOUBLE},
+      pd_outqty = #{record.pd_outqty,jdbcType=DOUBLE},
       pd_orderprice = #{record.pd_orderprice,jdbcType=DOUBLE},
       pd_sendprice = #{record.pd_sendprice,jdbcType=DOUBLE},
       pd_price = #{record.pd_price,jdbcType=DOUBLE},
@@ -683,7 +683,7 @@
       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_yqty = #{record.pd_yqty,jdbcType=DOUBLE},
       pd_ioid = #{record.pd_ioid,jdbcType=INTEGER}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -720,10 +720,10 @@
         pd_unit = #{pd_unit,jdbcType=VARCHAR},
       </if>
       <if test="pd_inqty != null">
-        pd_inqty = #{pd_inqty,jdbcType=INTEGER},
+        pd_inqty = #{pd_inqty,jdbcType=DOUBLE},
       </if>
       <if test="pd_outqty != null">
-        pd_outqty = #{pd_outqty,jdbcType=INTEGER},
+        pd_outqty = #{pd_outqty,jdbcType=DOUBLE},
       </if>
       <if test="pd_orderprice != null">
         pd_orderprice = #{pd_orderprice,jdbcType=DOUBLE},
@@ -801,7 +801,7 @@
         pd_ym = #{pd_ym,jdbcType=INTEGER},
       </if>
       <if test="pd_yqty != null">
-        pd_yqty = #{pd_yqty,jdbcType=INTEGER},
+        pd_yqty = #{pd_yqty,jdbcType=DOUBLE},
       </if>
       <if test="pd_remark != null">
         pd_remark = #{pd_remark,jdbcType=LONGVARCHAR},
@@ -823,8 +823,8 @@
       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_inqty = #{pd_inqty,jdbcType=DOUBLE},
+      pd_outqty = #{pd_outqty,jdbcType=DOUBLE},
       pd_orderprice = #{pd_orderprice,jdbcType=DOUBLE},
       pd_sendprice = #{pd_sendprice,jdbcType=DOUBLE},
       pd_price = #{pd_price,jdbcType=DOUBLE},
@@ -850,7 +850,7 @@
       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_yqty = #{pd_yqty,jdbcType=DOUBLE},
       pd_remark = #{pd_remark,jdbcType=LONGVARCHAR},
       pd_ioid = #{pd_ioid,jdbcType=INTEGER}
     where pd_id = #{pd_id,jdbcType=INTEGER}
@@ -866,8 +866,8 @@
       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_inqty = #{pd_inqty,jdbcType=DOUBLE},
+      pd_outqty = #{pd_outqty,jdbcType=DOUBLE},
       pd_orderprice = #{pd_orderprice,jdbcType=DOUBLE},
       pd_sendprice = #{pd_sendprice,jdbcType=DOUBLE},
       pd_price = #{pd_price,jdbcType=DOUBLE},
@@ -893,7 +893,7 @@
       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_yqty = #{pd_yqty,jdbcType=DOUBLE},
       pd_ioid = #{pd_ioid,jdbcType=INTEGER}
     where pd_id = #{pd_id,jdbcType=INTEGER}
   </update>
@@ -915,12 +915,12 @@
       (
       #{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_inqty,jdbcType=DOUBLE},#{item.pd_outqty,jdbcType=DOUBLE},#{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}
+      #{item.pd_text3,jdbcType=VARCHAR},#{item.pd_text4,jdbcType=VARCHAR},#{item.pd_text5,jdbcType=VARCHAR},#{item.pd_ym,jdbcType=INTEGER},#{item.pd_yqty,jdbcType=DOUBLE}
       )
     </foreach>
   </insert>
@@ -1076,10 +1076,10 @@
           #{item.pd_unit,jdbcType=VARCHAR},
         </if>
         <if test="item.pd_inqty != null">
-          #{item.pd_inqty,jdbcType=INTEGER},
+          #{item.pd_inqty,jdbcType=DOUBLE},
         </if>
         <if test="item.pd_outqty != null">
-          #{item.pd_outqty,jdbcType=INTEGER},
+          #{item.pd_outqty,jdbcType=DOUBLE},
         </if>
         <if test="item.pd_orderprice != null">
           #{item.pd_orderprice,jdbcType=DOUBLE},
@@ -1157,7 +1157,7 @@
           #{item.pd_ym,jdbcType=INTEGER},
         </if>
         <if test="item.pd_yqty != null">
-          #{item.pd_yqty,jdbcType=INTEGER},
+          #{item.pd_yqty,jdbcType=DOUBLE},
         </if>
         <if test="item.pd_remark != null">
           #{item.pd_remark,jdbcType=LONGVARCHAR},

+ 3 - 3
applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutListMapper.xml

@@ -39,8 +39,8 @@
     <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_inqty" jdbcType="DOUBLE" property="pd_inqty" />
+    <result column="pd_outqty" jdbcType="DOUBLE" 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" />
@@ -66,7 +66,7 @@
     <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_yqty" jdbcType="DOUBLE" property="pd_yqty" />
     <result column="pd_ioid" jdbcType="INTEGER" property="pd_ioid" />
 
   </resultMap>