Explorar el Código

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

zhoudw hace 7 años
padre
commit
7d958c9c3a
Se han modificado 15 ficheros con 562 adiciones y 11 borrados
  1. 118 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/Enterprise.java
  2. 1 1
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/EndProductController.java
  3. 30 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/EnterpriseController.java
  4. 14 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/EnterpriseMapper.java
  5. 12 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/EnterpriseService.java
  6. 35 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/EnterpriseServiceImpl.java
  7. 156 0
      applications/commons/commons-server/src/main/resources/mapper/EnterpriseMapper.xml
  8. 120 0
      applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/ProductReserveCostDTO.java
  9. 3 3
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Vendorcontact.java
  10. 7 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductController.java
  11. 3 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProductMapper.java
  12. 9 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProductService.java
  13. 25 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductServiceImpl.java
  14. 23 0
      applications/document/document-server/src/main/resources/mapper/ProductMapper.xml
  15. 6 6
      applications/document/document-server/src/main/resources/mapper/VendorcontactMapper.xml

+ 118 - 0
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/Enterprise.java

@@ -0,0 +1,118 @@
+package com.usoftchina.saas.commons.po;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class Enterprise extends CommonBaseEntity implements Serializable {
+    private String en_name;
+
+    private String en_address;
+
+    private String en_tel;
+
+    private String en_fax;
+
+    private String en_postcodes;
+
+    private Date en_begindate;
+
+    private String en_pricemethod;
+
+    private Integer en_recorderid;
+
+    private String en_recorder;
+
+    private Date en_recorddate;
+
+    private byte[] en_signet;
+
+    public String getEn_name() {
+        return en_name;
+    }
+
+    public void setEn_name(String en_name) {
+        this.en_name = en_name;
+    }
+
+    public String getEn_address() {
+        return en_address;
+    }
+
+    public void setEn_address(String en_address) {
+        this.en_address = en_address;
+    }
+
+    public String getEn_tel() {
+        return en_tel;
+    }
+
+    public void setEn_tel(String en_tel) {
+        this.en_tel = en_tel;
+    }
+
+    public String getEn_fax() {
+        return en_fax;
+    }
+
+    public void setEn_fax(String en_fax) {
+        this.en_fax = en_fax;
+    }
+
+    public String getEn_postcodes() {
+        return en_postcodes;
+    }
+
+    public void setEn_postcodes(String en_postcodes) {
+        this.en_postcodes = en_postcodes;
+    }
+
+    public Date getEn_begindate() {
+        return en_begindate;
+    }
+
+    public void setEn_begindate(Date en_begindate) {
+        this.en_begindate = en_begindate;
+    }
+
+    public String getEn_pricemethod() {
+        return en_pricemethod;
+    }
+
+    public void setEn_pricemethod(String en_pricemethod) {
+        this.en_pricemethod = en_pricemethod;
+    }
+
+    public Integer getEn_recorderid() {
+        return en_recorderid;
+    }
+
+    public void setEn_recorderid(Integer en_recorderid) {
+        this.en_recorderid = en_recorderid;
+    }
+
+    public String getEn_recorder() {
+        return en_recorder;
+    }
+
+    public void setEn_recorder(String en_recorder) {
+        this.en_recorder = en_recorder;
+    }
+
+    public Date getEn_recorddate() {
+        return en_recorddate;
+    }
+
+    public void setEn_recorddate(Date en_recorddate) {
+        this.en_recorddate = en_recorddate;
+    }
+
+    public byte[] getEn_signet() {
+        return en_signet;
+    }
+
+    public void setEn_signet(byte[] en_signet) {
+        this.en_signet = en_signet;
+    }
+}

+ 1 - 1
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/EndProductController.java

@@ -30,7 +30,7 @@ public class EndProductController {
 
     @PostMapping("/unEndAccount")
     public Result unEndAccount(){
-
+        endProductService.unEndAccount();
         return Result.success();
     }
 

+ 30 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/EnterpriseController.java

@@ -0,0 +1,30 @@
+package com.usoftchina.saas.commons.controller;
+
+import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.po.Enterprise;
+import com.usoftchina.saas.commons.service.EnterpriseService;
+import com.usoftchina.saas.context.BaseContextHolder;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+@RestController
+@RequestMapping("/enterprise")
+public class EnterpriseController {
+
+    @Autowired
+    private EnterpriseService enterpriseService;
+
+    @GetMapping("/read")
+    public Result getList(){
+        enterpriseService.findByPrimaryKey(BaseContextHolder.getCompanyId());
+        return Result.success();
+    }
+
+    @PostMapping("/save")
+    public Result save(@RequestBody Enterprise enterprise){
+        DocBaseDTO docBaseDTO = enterpriseService.saveData(enterprise);
+        return Result.success(docBaseDTO);
+    }
+
+}

+ 14 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/EnterpriseMapper.java

@@ -0,0 +1,14 @@
+package com.usoftchina.saas.commons.mapper;
+
+import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.commons.po.Enterprise;
+
+public interface EnterpriseMapper extends CommonBaseMapper<Enterprise> {
+
+    int insertSelective(Enterprise record);
+
+    Enterprise selectByPrimaryKey(Long id);
+
+    int updateByPrimaryKeySelective(Enterprise record);
+
+}

+ 12 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/EnterpriseService.java

@@ -0,0 +1,12 @@
+package com.usoftchina.saas.commons.service;
+
+import com.usoftchina.saas.base.service.CommonBaseService;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.mapper.EnterpriseMapper;
+import com.usoftchina.saas.commons.po.Enterprise;
+
+public interface EnterpriseService extends CommonBaseService<EnterpriseMapper, Enterprise> {
+
+    DocBaseDTO saveData(Enterprise enterprise);
+
+}

+ 35 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/EnterpriseServiceImpl.java

@@ -0,0 +1,35 @@
+package com.usoftchina.saas.commons.service.impl;
+
+import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.exception.BizExceptionCode;
+import com.usoftchina.saas.commons.mapper.EnterpriseMapper;
+import com.usoftchina.saas.commons.po.Enterprise;
+import com.usoftchina.saas.commons.service.EnterpriseService;
+import com.usoftchina.saas.commons.service.MessageLogService;
+import com.usoftchina.saas.exception.BizException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class EnterpriseServiceImpl extends CommonBaseServiceImpl<EnterpriseMapper, Enterprise> implements EnterpriseService {
+
+    @Autowired
+    private MessageLogService messageLogService;
+
+    @Override
+    public DocBaseDTO saveData(Enterprise enterprise) {
+        if (enterprise.getCompanyId() == 0){
+            throw new BizException(BizExceptionCode.ILLEGAL_ID);
+        }
+        getMapper().updateByPrimaryKeySelective(enterprise);
+        DocBaseDTO docBaseDTO = generateMsgObj(enterprise.getCompanyId());
+        messageLogService.update(docBaseDTO);
+        return docBaseDTO;
+    }
+
+    private DocBaseDTO generateMsgObj(Long id){
+        return new DocBaseDTO(id, null, "Enterprise");
+    }
+
+}

+ 156 - 0
applications/commons/commons-server/src/main/resources/mapper/EnterpriseMapper.xml

@@ -0,0 +1,156 @@
+<?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.commons.mapper.EnterpriseMapper" >
+    <resultMap id="BaseResultMap" type="com.usoftchina.saas.commons.po.Enterprise" >
+        <id column="companyId" property="companyId" jdbcType="INTEGER" />
+        <result column="en_name" property="en_name" jdbcType="VARCHAR" />
+        <result column="en_address" property="en_address" jdbcType="VARCHAR" />
+        <result column="en_tel" property="en_tel" jdbcType="VARCHAR" />
+        <result column="en_fax" property="en_fax" jdbcType="VARCHAR" />
+        <result column="en_postcodes" property="en_postcodes" jdbcType="VARCHAR" />
+        <result column="en_begindate" property="en_begindate" jdbcType="TIMESTAMP" />
+        <result column="en_pricemethod" property="en_pricemethod" jdbcType="VARCHAR" />
+        <result column="en_recorderid" property="en_recorderid" jdbcType="INTEGER" />
+        <result column="en_recorder" property="en_recorder" jdbcType="VARCHAR" />
+        <result column="en_recorddate" property="en_recorddate" jdbcType="TIMESTAMP" />
+        <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
+        <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
+    </resultMap>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap">
+        SELECT * FROM ENTERPRISE WHERE companyId=#{id}
+    </select>
+
+    <insert id="insertSelective" parameterType="com.usoftchina.saas.commons.po.Enterprise" >
+        <selectKey resultType="java.lang.Long" keyProperty="id">
+            SELECT LAST_INSERT_ID() AS ID
+        </selectKey>
+        insert into enterprise
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+            <if test="en_name != null" >
+                en_name,
+            </if>
+            <if test="en_address != null" >
+                en_address,
+            </if>
+            <if test="en_tel != null" >
+                en_tel,
+            </if>
+            <if test="en_fax != null" >
+                en_fax,
+            </if>
+            <if test="en_postcodes != null" >
+                en_postcodes,
+            </if>
+            <if test="en_begindate != null" >
+                en_begindate,
+            </if>
+            <if test="en_pricemethod != null" >
+                en_pricemethod,
+            </if>
+            <if test="en_recorderid != null" >
+                en_recorderid,
+            </if>
+            <if test="en_recorder != null" >
+                en_recorder,
+            </if>
+            <if test="en_recorddate != null" >
+                en_recorddate,
+            </if>
+            <if test="updaterId != null" >
+                updaterId,
+            </if>
+            <if test="updateTime != null" >
+                updateTime,
+            </if>
+            <if test="en_signet != null" >
+                en_signet,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+            <if test="en_name != null" >
+                #{en_name,jdbcType=VARCHAR},
+            </if>
+            <if test="en_address != null" >
+                #{en_address,jdbcType=VARCHAR},
+            </if>
+            <if test="en_tel != null" >
+                #{en_tel,jdbcType=VARCHAR},
+            </if>
+            <if test="en_fax != null" >
+                #{en_fax,jdbcType=VARCHAR},
+            </if>
+            <if test="en_postcodes != null" >
+                #{en_postcodes,jdbcType=VARCHAR},
+            </if>
+            <if test="en_begindate != null" >
+                #{en_begindate,jdbcType=TIMESTAMP},
+            </if>
+            <if test="en_pricemethod != null" >
+                #{en_pricemethod,jdbcType=VARCHAR},
+            </if>
+            <if test="en_recorderid != null" >
+                #{en_recorderid,jdbcType=INTEGER},
+            </if>
+            <if test="en_recorder != null" >
+                #{en_recorder,jdbcType=VARCHAR},
+            </if>
+            <if test="en_recorddate != null" >
+                #{en_recorddate,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updaterId != null" >
+                #{updaterId,jdbcType=INTEGER},
+            </if>
+            <if test="updateTime != null" >
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="en_signet != null" >
+                #{en_signet,jdbcType=LONGVARBINARY},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.commons.po.Enterprise" >
+        update enterprise
+        <set >
+            <if test="en_name != null" >
+                en_name = #{en_name,jdbcType=VARCHAR},
+            </if>
+            <if test="en_address != null" >
+                en_address = #{en_address,jdbcType=VARCHAR},
+            </if>
+            <if test="en_tel != null" >
+                en_tel = #{en_tel,jdbcType=VARCHAR},
+            </if>
+            <if test="en_fax != null" >
+                en_fax = #{en_fax,jdbcType=VARCHAR},
+            </if>
+            <if test="en_postcodes != null" >
+                en_postcodes = #{en_postcodes,jdbcType=VARCHAR},
+            </if>
+            <if test="en_begindate != null" >
+                en_begindate = #{en_begindate,jdbcType=TIMESTAMP},
+            </if>
+            <if test="en_pricemethod != null" >
+                en_pricemethod = #{en_pricemethod,jdbcType=VARCHAR},
+            </if>
+            <if test="en_recorderid != null" >
+                en_recorderid = #{en_recorderid,jdbcType=INTEGER},
+            </if>
+            <if test="en_recorder != null" >
+                en_recorder = #{en_recorder,jdbcType=VARCHAR},
+            </if>
+            <if test="en_recorddate != null" >
+                en_recorddate = #{en_recorddate,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updaterId != null" >
+                updaterId = #{updaterId,jdbcType=INTEGER},
+            </if>
+            <if test="updateTime != null" >
+                updateTime = #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="en_signet != null" >
+                en_signet = #{en_signet,jdbcType=LONGVARBINARY},
+            </if>
+        </set>
+        where companyId = #{companyId}
+    </update>
+</mapper>

+ 120 - 0
applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/ProductReserveCostDTO.java

@@ -0,0 +1,120 @@
+package com.usoftchina.saas.document.dto;
+
+import com.usoftchina.saas.base.dto.CommonBaseDTO;
+
+import java.io.Serializable;
+
+/**
+ * 物料库存数量金额表
+ */
+public class ProductReserveCostDTO extends CommonBaseDTO implements Serializable {
+
+    /**
+     * 物料编号
+     */
+    private String rc_prodCode;
+    /**
+     * 物料名称
+     */
+    private String rc_prodDetail;
+    /**
+     * 物料规格
+     */
+    private String rc_prodSpec;
+    /**
+     * 物料单位
+     */
+    private String rc_prodUnit;
+    /**
+     * 仓库编号
+     */
+    private String rc_whCode;
+    /**
+     * 仓库名称
+     */
+    private String rc_whName;
+    /**
+     * 数量
+     */
+    private String rc_number;
+    /**
+     * 单价
+     */
+    private String rc_price;
+    /**
+     * 金额
+     */
+    private String rc_amount;
+
+    public String getRc_prodCode() {
+        return rc_prodCode;
+    }
+
+    public void setRc_prodCode(String rc_prodCode) {
+        this.rc_prodCode = rc_prodCode;
+    }
+
+    public String getRc_prodDetail() {
+        return rc_prodDetail;
+    }
+
+    public void setRc_prodDetail(String rc_prodDetail) {
+        this.rc_prodDetail = rc_prodDetail;
+    }
+
+    public String getRc_prodSpec() {
+        return rc_prodSpec;
+    }
+
+    public void setRc_prodSpec(String rc_prodSpec) {
+        this.rc_prodSpec = rc_prodSpec;
+    }
+
+    public String getRc_prodUnit() {
+        return rc_prodUnit;
+    }
+
+    public void setRc_prodUnit(String rc_prodUnit) {
+        this.rc_prodUnit = rc_prodUnit;
+    }
+
+    public String getRc_whCode() {
+        return rc_whCode;
+    }
+
+    public void setRc_whCode(String rc_whCode) {
+        this.rc_whCode = rc_whCode;
+    }
+
+    public String getRc_whName() {
+        return rc_whName;
+    }
+
+    public void setRc_whName(String rc_whName) {
+        this.rc_whName = rc_whName;
+    }
+
+    public String getRc_number() {
+        return rc_number;
+    }
+
+    public void setRc_number(String rc_number) {
+        this.rc_number = rc_number;
+    }
+
+    public String getRc_price() {
+        return rc_price;
+    }
+
+    public void setRc_price(String rc_price) {
+        this.rc_price = rc_price;
+    }
+
+    public String getRc_amount() {
+        return rc_amount;
+    }
+
+    public void setRc_amount(String rc_amount) {
+        this.rc_amount = rc_amount;
+    }
+}

+ 3 - 3
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Vendorcontact.java

@@ -12,7 +12,7 @@ public class Vendorcontact extends CommonBaseEntity implements Serializable {
 
     private String vc_name;
 
-    private Long vc_tel;
+    private String vc_tel;
 
     private String vc_qq;
 
@@ -54,11 +54,11 @@ public class Vendorcontact extends CommonBaseEntity implements Serializable {
         this.vc_name = vc_name;
     }
 
-    public Long getVc_tel() {
+    public String getVc_tel() {
         return vc_tel;
     }
 
-    public void setVc_tel(Long vc_tel) {
+    public void setVc_tel(String vc_tel) {
         this.vc_tel = vc_tel;
     }
 

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

@@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.*;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-@CrossOrigin
+
 @RestController
 @RequestMapping("/product")
 public class ProductController {
@@ -98,4 +98,10 @@ public class ProductController {
         return Result.success(map);
     }
 
+    @GetMapping("ReserveCost")
+    public Result getReserveCost(PageRequest page, ListReqDTO listReqDTO){
+        productService.getReserveCost(page, listReqDTO);
+        return Result.success();
+    }
+
 }

+ 3 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProductMapper.java

@@ -3,6 +3,7 @@ package com.usoftchina.saas.document.mapper;
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.document.dto.ProductDTO;
+import com.usoftchina.saas.document.dto.ProductReserveCostDTO;
 import com.usoftchina.saas.document.entities.Product;
 import org.apache.ibatis.annotations.Param;
 
@@ -21,4 +22,6 @@ public interface ProductMapper extends CommonBaseMapper<Product> {
     int validateCodeWhenUpdate(@Param("code") String code, @Param("id") Long id, @Param("companyId") Long company);
 
     String getCodeById(@Param("id") Long id);
+
+    List<ProductReserveCostDTO> selectReserveCost(@Param("con") String con, @Param("companyId") Long companyId);
 }

+ 9 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProductService.java

@@ -9,6 +9,7 @@ import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.document.dto.ProductDTO;
+import com.usoftchina.saas.document.dto.ProductReserveCostDTO;
 import com.usoftchina.saas.document.entities.Product;
 import com.usoftchina.saas.document.mapper.ProductMapper;
 
@@ -93,4 +94,12 @@ public interface ProductService extends CommonBaseService<ProductMapper, Product
      * @return
      */
     Product getDataById(Long id);
+
+    /**
+     * 物料库存数量金额表
+     * @param page
+     * @param listReqDTO
+     * @return
+     */
+    PageInfo<ProductReserveCostDTO> getReserveCost(PageRequest page, ListReqDTO listReqDTO);
 }

+ 25 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductServiceImpl.java

@@ -14,6 +14,7 @@ import com.usoftchina.saas.commons.po.BillCodeSeq;
 import com.usoftchina.saas.commons.po.Status;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.dto.ProductDTO;
+import com.usoftchina.saas.document.dto.ProductReserveCostDTO;
 import com.usoftchina.saas.document.entities.Product;
 import com.usoftchina.saas.document.mapper.ProductMapper;
 import com.usoftchina.saas.document.service.ProductService;
@@ -180,6 +181,30 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
         return getMapper().selectByPrimaryKey(id);
     }
 
+    @Override
+    public PageInfo<ProductReserveCostDTO> getReserveCost(PageRequest page, ListReqDTO listReqDTO) {
+        //设置分页
+        if (null == page || page.getSize() == 0 || page.getNumber() == 0) {
+            page = new PageRequest();
+            page.setNumber(1);
+            page.setSize(10);
+        }
+        PageHelper.startPage(page.getNumber(), page.getSize());
+        List<ProductReserveCostDTO> reserveCostList = geReserveCost(listReqDTO);
+        //取分页信息
+        PageInfo<ProductReserveCostDTO> pageInfo = new PageInfo<ProductReserveCostDTO>(reserveCostList);
+        return pageInfo;
+    }
+
+    private List<ProductReserveCostDTO> geReserveCost(ListReqDTO listReqDTO) {
+        Long companyId = BaseContextHolder.getCompanyId();
+        String condition = listReqDTO.getFinalCondition();
+        if(condition == null){
+            condition = "1=1";
+        }
+        return getMapper().selectReserveCost(condition, companyId);
+    }
+
     private List<ProductDTO> getList(ListReqDTO listReqDTO){
         Long companyId = BaseContextHolder.getCompanyId();
         String condition = listReqDTO.getFinalCondition();

+ 23 - 0
applications/document/document-server/src/main/resources/mapper/ProductMapper.xml

@@ -466,5 +466,28 @@
         where pr_id = #{id}
     </update>
 
+    <resultMap id="ProdReserveCostResultMap" type="com.usoftchina.saas.document.dto.ProductReserveCostDTO">
+        <result column="pr_code" property="rc_prodCode" jdbcType="VARCHAR" />
+        <result column="pr_spec" property="rc_prodSpec" jdbcType="VARCHAR" />
+        <result column="pr_detail" property="rc_prodDetail" jdbcType="VARCHAR" />
+        <result column="pr_unit" property="rc_prodUnit" jdbcType="VARCHAR" />
+        <result column="wh_code" property="rc_whCode" jdbcType="VARCHAR" />
+        <result column="wh_name" property="rc_whName" jdbcType="VARCHAR" />
+        <result column="pw_onhand" property="rc_number" jdbcType="DOUBLE" />
+        <result column="pw_avprice" property="rc_price" jdbcType="DOUBLE" />
+        <result column="pw_amount" property="rc_amount" jdbcType="DOOUBLE" />
+    </resultMap>
+    <select id="selectReserveCost" resultMap="ProdReserveCostResultMap">
+        select * from productWH tab left join Product on pw_prodcode=pr_code left join warehouse on pw_whcode=wh_code
+        <where>
+          <if test="con!=null">
+              ${con}
+          </if>
+          <if test="companyId!=null">
+              and tab.companyId=#{companyId} and Product.companyId=#{companyId} and warehouse.companyId=#{companyId}
+          </if>
+        </where>
+        ORDER BY PR_ID DESC
+    </select>
 </mapper>
 

+ 6 - 6
applications/document/document-server/src/main/resources/mapper/VendorcontactMapper.xml

@@ -51,7 +51,7 @@
       vc_text3, vc_text4, vc_text5, vc_default
       )
     values (#{vc_veid}, #{vc_detno,jdbcType=INTEGER},
-      #{vc_name,jdbcType=VARCHAR}, #{vc_tel}, #{vc_qq,jdbcType=VARCHAR},
+      #{vc_name,jdbcType=VARCHAR}, #{vc_tel,jdbcType=VARCHAR}, #{vc_qq,jdbcType=VARCHAR},
       #{vc_email,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER}, #{updaterId,jdbcType=INTEGER}, 
       #{updateTime,jdbcType=TIMESTAMP}, #{vc_text1,jdbcType=VARCHAR}, #{vc_text2,jdbcType=VARCHAR}, 
       #{vc_text3,jdbcType=VARCHAR}, #{vc_text4,jdbcType=VARCHAR}, #{vc_text5,jdbcType=VARCHAR},
@@ -118,7 +118,7 @@
         #{vc_name,jdbcType=VARCHAR},
       </if>
       <if test="vc_tel != null" >
-        #{vc_tel},
+        #{vc_tel,jdbcType=VARCHAR},
       </if>
       <if test="vc_qq != null" >
         #{vc_qq,jdbcType=VARCHAR},
@@ -168,7 +168,7 @@
         vc_name = #{vc_name,jdbcType=VARCHAR},
       </if>
       <if test="vc_tel != null" >
-        vc_tel = #{vc_tel},
+        vc_tel = #{vc_tel,jdbcType=VARCHAR},
       </if>
       <if test="vc_qq != null" >
         vc_qq = #{vc_qq,jdbcType=VARCHAR},
@@ -211,7 +211,7 @@
     set vc_veid = #{vc_veid},
       vc_detno = #{vc_detno,jdbcType=INTEGER},
       vc_name = #{vc_name,jdbcType=VARCHAR},
-      vc_tel = #{vc_tel},
+      vc_tel = #{vc_tel,jdbcType=VARCHAR},
       vc_qq = #{vc_qq,jdbcType=VARCHAR},
       vc_email = #{vc_email,jdbcType=VARCHAR},
       companyId = #{companyId,jdbcType=INTEGER},
@@ -236,7 +236,7 @@
     <foreach collection="list" item="item" index="index" open="" close="" separator=",">
       (
       #{item.vc_veid}, #{item.vc_detno,jdbcType=INTEGER},
-      #{item.vc_name,jdbcType=VARCHAR}, #{item.vc_tel}, #{item.vc_qq,jdbcType=VARCHAR},
+      #{item.vc_name,jdbcType=VARCHAR}, #{item.vc_tel,jdbcType=VARCHAR}, #{item.vc_qq,jdbcType=VARCHAR},
       #{item.vc_email,jdbcType=VARCHAR}, #{item.companyId,jdbcType=INTEGER}, #{item.updaterId,jdbcType=INTEGER},
       #{item.updateTime,jdbcType=TIMESTAMP}, #{item.vc_text1,jdbcType=VARCHAR}, #{item.vc_text2,jdbcType=VARCHAR},
       #{item.vc_text3,jdbcType=VARCHAR}, #{item.vc_text4,jdbcType=VARCHAR}, #{item.vc_text5,jdbcType=VARCHAR},
@@ -255,7 +255,7 @@
           vc_name = #{item.vc_name,jdbcType=VARCHAR},
         </if>
         <if test="item.vc_tel != null" >
-          vc_tel = #{item.vc_tel},
+          vc_tel = #{item.vc_tel,jdbcType=VARCHAR},
         </if>
         <if test="item.vc_qq != null" >
           vc_qq = #{item.vc_qq,jdbcType=VARCHAR},