Browse Source

Merge remote-tracking branch 'origin/dev'

guq 7 years ago
parent
commit
33a42b5e4e
100 changed files with 7581 additions and 35 deletions
  1. 19 0
      applications/commons/commons-api/src/main/java/com/usoftchina/saas/commons/api/CommonServiceFallback.java
  2. 1 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/BillCodeSeq.java
  3. 0 2
      applications/commons/commons-server/pom.xml
  4. 40 0
      applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/CurrencyDTO.java
  5. 2 0
      applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/CustomerDTO.java
  6. 11 0
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Bankinformation.java
  7. 40 0
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Currency.java
  8. 2 0
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Customer.java
  9. 2 0
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Vendor.java
  10. 2 0
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/VendorList.java
  11. 42 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/CurrencyController.java
  12. 13 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CurrencyMapper.java
  13. 17 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/CurrencyService.java
  14. 44 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CurrencyServiceImpl.java
  15. 11 1
      applications/document/document-server/src/main/resources/mapper/BankinformationMapper.xml
  16. 130 0
      applications/document/document-server/src/main/resources/mapper/CurrencyMapper.xml
  17. 11 1
      applications/document/document-server/src/main/resources/mapper/CustomerMapper.xml
  18. 15 4
      applications/document/document-server/src/main/resources/mapper/VendorMapper.xml
  19. 1 1
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/OthreceiptsdetailMapper.java
  20. 27 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othreceipts.java
  21. 20 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othreceiptsdetail.java
  22. 20 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othspendings.java
  23. 20 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othspendingsdetail.java
  24. 5 2
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthreceiptsServiceImpl.java
  25. 3 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthspendingsServiceImpl.java
  26. 21 1
      applications/money/money-server/src/main/resources/mapper/OthreceiptsMapper.xml
  27. 22 2
      applications/money/money-server/src/main/resources/mapper/OthreceiptsdetailMapper.xml
  28. 21 1
      applications/money/money-server/src/main/resources/mapper/OthspendingsMapper.xml
  29. 21 1
      applications/money/money-server/src/main/resources/mapper/OthspendingsdetailMapper.xml
  30. 10 4
      applications/operation/operation-auth-server/src/main/java/com/usoftchina/saas/operation/auth/controller/AuthController.java
  31. 70 0
      applications/operation/operation-server/pom.xml
  32. 6 0
      applications/operation/operation-server/src/main/docker/Dockerfile
  33. 24 0
      applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/OperationApplication.java
  34. 39 0
      applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/controller/CustomerFeedBackController.java
  35. 46 0
      applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/controller/DataController.java
  36. 135 0
      applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/dto/AccountDTO.java
  37. 100 0
      applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/dto/CompanyDTO.java
  38. 57 0
      applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/dto/LoginDTO.java
  39. 13 0
      applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/mapper/AccountMapper.java
  40. 14 0
      applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/mapper/CompanyMapper.java
  41. 21 0
      applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/mapper/CustomerfeedbackMapper.java
  42. 185 0
      applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/po/Company.java
  43. 141 0
      applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/po/CustomerFeedBack.java
  44. 13 0
      applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/service/CustomerFeedBackService.java
  45. 19 0
      applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/service/DataService.java
  46. 57 0
      applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/service/impl/CustomerFedBackServiceImpl.java
  47. 71 0
      applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/service/impl/DataServiceImpl.java
  48. 82 0
      applications/operation/operation-server/src/main/resources/application.yml
  49. 13 0
      applications/operation/operation-server/src/main/resources/config/application-dev.yml
  50. 12 0
      applications/operation/operation-server/src/main/resources/config/application-docker-dev.yml
  51. 23 0
      applications/operation/operation-server/src/main/resources/config/application-docker-prod.yml
  52. 10 0
      applications/operation/operation-server/src/main/resources/config/application-docker.yml
  53. 115 0
      applications/operation/operation-server/src/main/resources/logback-spring.xml
  54. 34 0
      applications/operation/operation-server/src/main/resources/mapper/AccoutMapper.xml
  55. 20 0
      applications/operation/operation-server/src/main/resources/mapper/CompanyMapper.xml
  56. 170 0
      applications/operation/operation-server/src/main/resources/mapper/CustomerfeedbackMapper.xml
  57. 2 0
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdInOutDTO.java
  58. 2 0
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/PurchaseDTO.java
  59. 2 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOut.java
  60. 2 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/Purchase.java
  61. 11 1
      applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutMapper.xml
  62. 11 1
      applications/purchase/purchase-server/src/main/resources/mapper/PurchaseMapper.xml
  63. 2 0
      applications/sale/sale-dto/src/main/java/com/usoftchina/saas/sale/dto/ProdInOutDTO.java
  64. 2 0
      applications/sale/sale-dto/src/main/java/com/usoftchina/saas/sale/dto/SaleDTO.java
  65. 2 0
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/po/Sale.java
  66. 13 3
      applications/sale/sale-server/src/main/resources/mapper/ProdInOutMapper.xml
  67. 12 2
      applications/sale/sale-server/src/main/resources/mapper/SaleMapper.xml
  68. 2 0
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOut.java
  69. 2 1
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/ProdInOutServiceImpl.java
  70. 48 0
      applications/transfers/mall-api/pom.xml
  71. 110 0
      applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/api/InquiryApi.java
  72. 13 0
      applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/config/InquiryFeignConfig.java
  73. 152 0
      applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/po/Attach.java
  74. 106 0
      applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/po/Enterprise.java
  75. 63 0
      applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/po/IPage.java
  76. 362 0
      applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/po/InquiryEnRemind.java
  77. 356 0
      applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/po/InquiryRemind.java
  78. 724 0
      applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/po/Product.java
  79. 224 0
      applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/po/ProductMatchResult.java
  80. 311 0
      applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/po/PublicInquiry.java
  81. 869 0
      applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/po/PublicInquiryItem.java
  82. 55 0
      applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/po/PublicInquiryReply.java
  83. 397 0
      applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/po/PurcInquiry.java
  84. 347 0
      applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/po/PurcInquiryInfo.java
  85. 433 0
      applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/po/PurcInquiryItem.java
  86. 499 0
      applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/po/PurcInquiryItemInfo.java
  87. 54 0
      applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/po/PurchaseInquiryReply.java
  88. 117 0
      applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/po/User.java
  89. 84 0
      applications/transfers/mall-api/src/test/java/com/usoftchina/inquiry/test/InquiryApiTest.java
  90. 19 0
      applications/transfers/mall-api/src/test/java/com/usoftchina/inquiry/test/InquiryTest.java
  91. 4 0
      applications/transfers/mall-api/src/test/resources/application.yml
  92. 1 0
      applications/transfers/pom.xml
  93. 4 0
      base-servers/account/account-api/pom.xml
  94. 11 0
      base-servers/account/account-api/src/main/java/com/usoftchina/saas/account/api/AccountApi.java
  95. 38 7
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/controller/AccountController.java
  96. 4 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/mapper/AccountMapper.java
  97. 3 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/AccountService.java
  98. 12 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/impl/AccountServiceImpl.java
  99. 8 0
      base-servers/account/account-server/src/main/resources/mapper/AccountMapper.xml
  100. 5 0
      base-servers/auth/auth-server/src/main/java/com/usoftchina/saas/auth/controller/AuthController.java

+ 19 - 0
applications/commons/commons-api/src/main/java/com/usoftchina/saas/commons/api/CommonServiceFallback.java

@@ -0,0 +1,19 @@
+package com.usoftchina.saas.commons.api;
+
+
+public class CommonServiceFallback implements CommonService {
+    @Override
+    public String commonAudit(String table, String keyvalue, String status, String statuscode, String auditdate, String auditman) {
+        return null;
+    }
+
+    @Override
+    public String commonResAudit(String table, String keyvalue, String status, String statuscode, String auditdate, String auditman) {
+        return null;
+    }
+/*
+    @Override
+    public String timeout(Long time) {
+        return "网络异常,请重试!";
+    }*/
+}

+ 1 - 0
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/BillCodeSeq.java

@@ -56,6 +56,7 @@ public enum  BillCodeSeq {
 
     UNENDPRODUCT ("反结账", "UNENDPRODUCT"),
 
+    CUSTOMERFEDBACK ("客户反馈", "CUSTOMERFEDBACK"),
 
     BOM("BOM资料", "Bom");
 

+ 0 - 2
applications/commons/commons-server/pom.xml

@@ -91,12 +91,10 @@
         <dependency>
             <groupId>com.google.zxing</groupId>
             <artifactId>core</artifactId>
-            <version>3.3.0</version>
         </dependency>
         <dependency>
             <groupId>com.google.zxing</groupId>
             <artifactId>javase</artifactId>
-            <version>3.3.0</version>
         </dependency>
     </dependencies>
 

+ 40 - 0
applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/CurrencyDTO.java

@@ -0,0 +1,40 @@
+package com.usoftchina.saas.document.dto;
+
+import com.usoftchina.saas.base.dto.CommonBaseDTO;
+
+import java.io.Serializable;
+
+/**
+ * @Author chenwei
+ * @Date 2019/01/04
+ */
+public class CurrencyDTO extends CommonBaseDTO implements Serializable {
+
+    private String cr_name;
+    private Double cr_rate;
+    private Long cr_standard;
+
+    public String getCr_name() {
+        return cr_name;
+    }
+
+    public void setCr_name(String cr_name) {
+        this.cr_name = cr_name;
+    }
+
+    public Double getCr_rate() {
+        return cr_rate;
+    }
+
+    public void setCr_rate(Double cr_rate) {
+        this.cr_rate = cr_rate;
+    }
+
+    public Long getCr_standard() {
+        return cr_standard;
+    }
+
+    public void setCr_standard(Long cr_standard) {
+        this.cr_standard = cr_standard;
+    }
+}

+ 2 - 0
applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/CustomerDTO.java

@@ -61,4 +61,6 @@ public class CustomerDTO extends CommonBaseDTO implements Serializable {
     private Double cu_preamount;
 
     private String cu_remark;
+
+    private String cu_currency;
 }

+ 11 - 0
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Bankinformation.java

@@ -38,8 +38,19 @@ public class Bankinformation extends CommonBaseEntity implements Serializable {
     private String bk_remark;
 
     private Double bk_income;
+
     private Double bk_spending;
 
+    private String bk_currency;
+
+    public String getBk_currency() {
+        return bk_currency;
+    }
+
+    public void setBk_currency(String bk_currency) {
+        this.bk_currency = bk_currency;
+    }
+
     public Double getBk_income() {
         return bk_income;
     }

+ 40 - 0
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Currency.java

@@ -0,0 +1,40 @@
+package com.usoftchina.saas.document.entities;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+
+import java.io.Serializable;
+
+/**
+ * @Author chenwei
+ * @Date 2019/01/04
+ */
+public class Currency extends CommonBaseEntity implements Serializable{
+
+    private String cr_name;
+    private Double cr_rate;
+    private Long cr_standard;
+
+    public String getCr_name() {
+        return cr_name;
+    }
+
+    public void setCr_name(String cr_name) {
+        this.cr_name = cr_name;
+    }
+
+    public Double getCr_rate() {
+        return cr_rate;
+    }
+
+    public void setCr_rate(Double cr_rate) {
+        this.cr_rate = cr_rate;
+    }
+
+    public Long getCr_standard() {
+        return cr_standard;
+    }
+
+    public void setCr_standard(Long cr_standard) {
+        this.cr_standard = cr_standard;
+    }
+}

+ 2 - 0
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Customer.java

@@ -57,4 +57,6 @@ public class Customer extends CommonBaseEntity implements Serializable {
     private Double cu_preamount;
 
     private String cu_remark;
+
+    private String cu_currency;
 }

+ 2 - 0
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Vendor.java

@@ -115,4 +115,6 @@ public class Vendor extends CommonBaseEntity implements Serializable{
 
     private String ve_address;
 
+    private String ve_currency;
+
 }

+ 2 - 0
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/VendorList.java

@@ -132,4 +132,6 @@ public class VendorList implements Serializable {
 
     private String vc_default;
 
+    private String ve_currency;
+
 }

+ 42 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/CurrencyController.java

@@ -0,0 +1,42 @@
+package com.usoftchina.saas.document.controller;
+
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.dto.DocReqDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.document.dto.CurrencyDTO;
+import com.usoftchina.saas.document.entities.Currency;
+import com.usoftchina.saas.document.service.CurrencyService;
+import com.usoftchina.saas.page.PageDefault;
+import com.usoftchina.saas.page.PageRequest;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+
+/**
+ * @Author chenwei
+ * @Date 2019/01/04
+ */
+@RestController
+@RequestMapping("/currency")
+public class CurrencyController {
+
+    @Autowired
+    private CurrencyService currencyService;
+
+    @GetMapping("/list")
+    public Result getAll(@PageDefault(number = 1, size = 10) PageRequest pageRequest, ListReqDTO listReqDTO){
+        PageInfo<Currency> currencyList = currencyService.getAll(pageRequest, listReqDTO);
+        return Result.success(currencyList);
+    }
+
+    @PostMapping("/save")
+    public Result save(@RequestBody CurrencyDTO currencyDTO){
+        currencyService.save(currencyDTO);
+        return Result.success();
+    }
+
+}

+ 13 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CurrencyMapper.java

@@ -0,0 +1,13 @@
+package com.usoftchina.saas.document.mapper;
+
+import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.document.entities.Currency;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface CurrencyMapper extends CommonBaseMapper<Currency> {
+
+    List<Currency> getAll(@Param("condition") String condition, @Param("companyId") Long companyId);
+
+}

+ 17 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/CurrencyService.java

@@ -0,0 +1,17 @@
+package com.usoftchina.saas.document.service;
+
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.base.service.CommonBaseService;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.document.dto.CurrencyDTO;
+import com.usoftchina.saas.document.entities.Currency;
+import com.usoftchina.saas.document.mapper.CurrencyMapper;
+import com.usoftchina.saas.page.PageRequest;
+
+public interface CurrencyService  extends CommonBaseService<CurrencyMapper, Currency> {
+
+    void save(CurrencyDTO currencyDTO);
+
+    PageInfo<Currency> getAll(PageRequest pageRequest, ListReqDTO listReqDTO);
+
+}

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

@@ -0,0 +1,44 @@
+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.ListReqDTO;
+import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.document.dto.CurrencyDTO;
+import com.usoftchina.saas.document.entities.Currency;
+import com.usoftchina.saas.document.mapper.CurrencyMapper;
+import com.usoftchina.saas.document.service.CurrencyService;
+import com.usoftchina.saas.page.PageRequest;
+import com.usoftchina.saas.utils.BeanMapper;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @Author chenwei
+ * @Date 2019/01/04
+ */
+@Service
+public class CurrencyServiceImpl extends CommonBaseServiceImpl<CurrencyMapper, Currency> implements CurrencyService {
+
+
+    @Override
+    public void save(CurrencyDTO currencyDTO) {
+        if (currencyDTO.getId() == 0){
+
+        }else{
+            Currency currency = BeanMapper.map(currencyDTO, Currency.class);
+            getMapper().updateByPrimaryKeySelective(currency);
+        }
+    }
+
+    @Override
+    public PageInfo<Currency> getAll(PageRequest pageRequest, ListReqDTO listReqDTO) {
+        String condition = listReqDTO.getFinalCondition();
+        PageHelper.startPage(pageRequest.getNumber(), pageRequest.getSize());
+        List<Currency> currencyList = getMapper().getAll(condition, BaseContextHolder.getCompanyId());
+        PageInfo<Currency> pageInfo = new PageInfo<Currency>(currencyList);
+        return pageInfo;
+    }
+}

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

@@ -23,6 +23,7 @@
     <result column="bk_remark" property="bk_remark" jdbcType="VARCHAR" />
     <result column="bk_spending" property="bk_spending" jdbcType="DOUBLE" />
     <result column="bk_income" property="bk_income" jdbcType="DOUBLE" />
+    <result column="bk_currency" property="bk_currency" jdbcType="VARCHAR" />
   </resultMap>
   <resultMap id="ResultMapWithBLOBs" type="com.usoftchina.saas.document.entities.Bankinformation" extends="BaseResultMap" >
     <result column="bk_remark" property="bk_remark" jdbcType="LONGVARCHAR" />
@@ -30,7 +31,7 @@
   <sql id="Base_Column_List" >
     bk_id, bk_bankcode, bk_bankname, bk_date, bk_type, bk_beginamount, bk_thisamount, 
     bk_status, bk_statuscode, bk_ym, companyid,
-    updaterId, updateTime, bk_text1, bk_text2, bk_text3, bk_text4, bk_text5, bk_remark
+    updaterId, updateTime, bk_text1, bk_text2, bk_text3, bk_text4, bk_text5, bk_remark,bk_currency
   </sql>
   <sql id="Blob_Column_List" >
     bk_remark
@@ -137,6 +138,9 @@
       <if test="creatorName != null" >
         creatorName,
       </if>
+      <if test="bk_currency != null" >
+        bk_currency,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="bk_bankcode != null" >
@@ -208,6 +212,9 @@
       <if test="creatorName != null" >
         #{creatorName,jdbcType=VARCHAR},
       </if>
+      <if test="bk_currency != null" >
+        #{bk_currency,jdbcType=VARCHAR},
+      </if>
     </trim>
     <selectKey resultType="Long" keyProperty="id" order="AFTER">
       SELECT LAST_INSERT_ID()
@@ -276,6 +283,9 @@
       <if test="bk_spending != null" >
         bk_spending = #{bk_spending,jdbcType=DOUBLE},
       </if>
+      <if test="bk_currency != null" >
+        bk_currency = #{bk_currency,jdbcType=VARCHAR},
+      </if>
     </set>
     where bk_id = #{id,jdbcType=INTEGER}
   </update>

+ 130 - 0
applications/document/document-server/src/main/resources/mapper/CurrencyMapper.xml

@@ -0,0 +1,130 @@
+<?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.document.mapper.CurrencyMapper" >
+    <resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.Currency" >
+        <id column="cr_id" property="id" jdbcType="INTEGER" />
+        <result column="cr_name" property="cr_name" jdbcType="VARCHAR" />
+        <result column="cr_rate" property="cr_rate" jdbcType="VARCHAR" />
+        <result column="companyId" property="companyId" jdbcType="INTEGER" />
+        <result column="creatorId" property="creatorId" jdbcType="INTEGER" />
+        <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
+        <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
+        <result column="creatorName" property="creatorName" jdbcType="INTEGER" />
+        <result column="updaterName" property="updaterName" jdbcType="INTEGER" />
+        <result column="createTime" property="createTime" jdbcType="TIMESTAMP" />
+        <result column="cr_standard" property="cr_standard" jdbcType="INTEGER" />
+    </resultMap>
+    <sql id="Base_Column_List" >
+        cr_id, cr_name, cr_rate, companyId, creatorId, updaterId, updateTime, creatorName, updaterName, createTime, cr_standard
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
+        select
+        <include refid="Base_Column_List" />
+        from currencys
+        where cr_id = #{id}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
+        delete from currencys
+        where cr_id = #{id}
+    </delete>
+    <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Currency" >
+        insert into Currencys
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+            <if test="cr_name != null" >
+                cr_name,
+            </if>
+            <if test="cr_rate != null">
+                cr_rate,
+            </if>
+            <if test="cr_standard != null">
+                cr_standard,
+            </if>
+            <if test="companyId != null" >
+                companyId,
+            </if>
+            <if test="updaterId != null" >
+                updaterId,
+            </if>
+            <if test="updateTime != null" >
+                updateTime,
+            </if>
+            <if test="creatorId != null" >
+                creatorId,
+            </if>
+            <if test="createTime != null" >
+                createTime,
+            </if>
+            <if test="creatorName != null" >
+                creatorName,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+            <if test="cr_name != null" >
+                #{cr_name,jdbcType=VARCHAR},
+            </if>
+            <if test="cr_rate != null" >
+                #{cr_rate,jdbcType=DOUBLE},
+            </if>
+            <if test="cr_standard != null" >
+                #{cr_standard,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="creatorId != null" >
+                #{creatorId,jdbcType=INTEGER},
+            </if>
+            <if test="createTime != null" >
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="creatorName != null" >
+                #{creatorName,jdbcType=VARCHAR},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Currency" >
+        update Currencys
+        <set >
+            <if test="cr_name != null" >
+                cr_name = #{cr_name,jdbcType=VARCHAR},
+            </if>
+            <if test="cr_rate != null" >
+                cr_rate = #{cr_rate,jdbcType=DOUBLE},
+            </if>
+            <if test="cr_standard != null" >
+                cr_standard = #{cr_standard,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>
+        </set>
+        where cr_id = #{id}
+    </update>
+    <select id="selectByCompanyId" resultMap="BaseResultMap">
+        SELECT * FROM Currencys where companyId=#{companyId} ORDER BY CR_ID DESC
+    </select>
+    <select id="getAll" resultMap="BaseResultMap">
+      SELECT * FROM Currencys
+      <where>
+        <if test="condition != null">
+          ${condition}
+        </if>
+        <if test="companyId != null">
+          and companyId = #{companyId}
+        </if>
+      </where>
+      ORDER BY CR_ID DESC
+    </select>
+</mapper>

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

@@ -31,13 +31,14 @@
     <result column="cu_recamount" jdbcType="DOUBLE" property="cu_recamount" />
     <result column="cu_preamount" jdbcType="DOUBLE" property="cu_preamount" />
     <result column="cu_remark" jdbcType="VARCHAR" property="cu_remark" />
+    <result column="cu_currency" jdbcType="VARCHAR" property="cu_currency" />
   </resultMap>
   <sql id="Base_Column_List">
     cu_id, cu_code,cu_shortname, 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, companyid,
     updaterid, updatetime, cu_text1, cu_text2, cu_text3, cu_text4, cu_text5, cu_leftamount, 
-    cu_recamount,cu_preamount,cu_remark
+    cu_recamount,cu_preamount,cu_remark,cu_currency
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
     select
@@ -149,6 +150,9 @@
       <if test="cu_remark!=null">
         cu_remark,
       </if>
+      <if test="cu_currency!=null">
+        cu_currency,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
 
@@ -245,6 +249,9 @@
       <if test="cu_remark !=null">
         #{cu_remark,jdbcType=VARCHAR},
       </if>
+      <if test="cu_currency !=null">
+        #{cu_currency,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Customer">
@@ -334,6 +341,9 @@
       <if test="cu_remark != null">
         cu_remark = #{cu_remark,jdbcType=VARCHAR},
       </if>
+      <if test="cu_currency != null">
+        cu_currency = #{cu_currency,jdbcType=VARCHAR},
+      </if>
     </set>
     where cu_id = #{id,jdbcType=INTEGER}
   </update>

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

@@ -32,6 +32,7 @@
         <result column="ve_preamount" property="ve_preamount" jdbcType="DOUBLE" />
         <result column="ve_remark" property="ve_remark" jdbcType="VARCHAR" />
         <result column="ve_address" property="ve_address" jdbcType="VARCHAR" />
+        <result column="ve_currency" property="ve_currency" jdbcType="VARCHAR" />
     </resultMap>
     <resultMap id="VendorDTOResultMapper" type="com.usoftchina.saas.document.dto.VendorDTO">
         <id column="ve_id" property="id" jdbcType="INTEGER" />
@@ -97,6 +98,7 @@
         <result column="vc_text4" property="vc_text4" jdbcType="VARCHAR" />
         <result column="vc_text5" property="vc_text5" jdbcType="VARCHAR" />
         <result column="vc_default" property="vc_default" jdbcType="VARCHAR" />
+        <result column="ve_currency" property="ve_currency" jdbcType="VARCHAR" />
     </resultMap>
 
     <select id="getListDataByCondition" resultMap="VendorListResultMapper">
@@ -115,7 +117,7 @@
         ve_promisedays, ve_taxrate, ve_nsrzh, ve_bankaccount, ve_bankcode, ve_status, ve_statuscode,
         companyId, updaterId, updateTime, ve_text1,
         ve_text2, ve_text3, ve_text4, ve_text5, ve_payamount, ve_leftamount, ve_beginym, ve_preamount,ve_remark,
-        ve_buyerid,ve_buyercode,ve_buyername,ve_address
+        ve_buyerid,ve_buyercode,ve_buyername,ve_address,ve_currency
     </sql>
     <select id="selectByPrimaryKey" resultMap="VendorResultMapper" parameterType="java.lang.Long" >
         select
@@ -236,7 +238,10 @@
                 ve_buyername,
             </if>
             <if test="ve_address!=null">
-                ve_address
+                ve_address,
+            </if>
+            <if test="ve_currency!=null">
+              ve_currency,
             </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides="," >
@@ -343,7 +348,10 @@
                 #{ve_buyername,jdbcType=VARCHAR},
             </if>
             <if test="ve_address != null">
-                #{ve_address,jdbcType=VARCHAR}
+                #{ve_address,jdbcType=VARCHAR},
+            </if>
+            <if test="ve_currency != null">
+              #{ve_currency,jdbcType=VARCHAR},
             </if>
         </trim>
     </insert>
@@ -444,7 +452,10 @@
                 ve_buyername = #{ve_buyername,jdbcType=VARCHAR},
             </if>
             <if test="ve_address != null">
-                ve_address = #{ve_address,jdbcType=VARCHAR}
+                ve_address = #{ve_address,jdbcType=VARCHAR},
+            </if>
+            <if test="ve_currency != null">
+              ve_currency = #{ve_currency,jdbcType=VARCHAR},
             </if>
         </set>
         where ve_id = #{id}

+ 1 - 1
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/OthreceiptsdetailMapper.java

@@ -12,7 +12,7 @@ public interface OthreceiptsdetailMapper {
 
     int insertSelective(Othreceiptsdetail record);
 
-    List<Othreceiptsdetail> selectByPrimaryKey(Integer ordId);
+    List<Othreceiptsdetail> selectByPrimaryKey(Long orId);
 
     int updateByPrimaryKeySelective(Othreceiptsdetail record);
 

+ 27 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othreceipts.java

@@ -53,6 +53,26 @@ public class Othreceipts extends CommonBaseEntity implements Serializable {
 
     private Date or_auditdate;
 
+    private String or_currency;
+
+    private Double or_rate;
+
+    public String getOr_currency() {
+        return or_currency;
+    }
+
+    public void setOr_currency(String or_currency) {
+        this.or_currency = or_currency;
+    }
+
+    public Double getOr_rate() {
+        return or_rate;
+    }
+
+    public void setOr_rate(Double or_rate) {
+        this.or_rate = or_rate;
+    }
+
     public String getOr_auditman() {
         return or_auditman;
     }
@@ -268,6 +288,13 @@ public class Othreceipts extends CommonBaseEntity implements Serializable {
                 ", or_text3='" + or_text3 + '\'' +
                 ", or_text4='" + or_text4 + '\'' +
                 ", or_text5='" + or_text5 + '\'' +
+                ", ord_type='" + ord_type + '\'' +
+                ", ord_nowbalance=" + ord_nowbalance +
+                ", ord_remark='" + ord_remark + '\'' +
+                ", or_auditman='" + or_auditman + '\'' +
+                ", or_auditdate=" + or_auditdate +
+                ", or_currency='" + or_currency + '\'' +
+                ", or_rate=" + or_rate +
                 '}';
     }
 }

+ 20 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othreceiptsdetail.java

@@ -32,6 +32,26 @@ public class Othreceiptsdetail extends CommonBaseEntity implements Serializable
 
     private String ord_text5;
 
+    private String ord_currency;
+
+    private Double ord_rate;
+
+    public String getOrd_currency() {
+        return ord_currency;
+    }
+
+    public void setOrd_currency(String ord_currency) {
+        this.ord_currency = ord_currency;
+    }
+
+    public Double getOrd_rate() {
+        return ord_rate;
+    }
+
+    public void setOrd_rate(Double ord_rate) {
+        this.ord_rate = ord_rate;
+    }
+
     public Date getOr_date() {
         return or_date;
     }

+ 20 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othspendings.java

@@ -54,6 +54,26 @@ public class Othspendings extends CommonBaseEntity implements Serializable {
 
     private Date os_auditdate;
 
+    private String os_currency;
+
+    private Double os_rate;
+
+    public String getOs_currency() {
+        return os_currency;
+    }
+
+    public void setOs_currency(String os_currency) {
+        this.os_currency = os_currency;
+    }
+
+    public Double getOs_rate() {
+        return os_rate;
+    }
+
+    public void setOs_rate(Double os_rate) {
+        this.os_rate = os_rate;
+    }
+
     public String getOs_auditman() {
         return os_auditman;
     }

+ 20 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othspendingsdetail.java

@@ -33,6 +33,26 @@ public class Othspendingsdetail extends CommonBaseEntity implements Serializable
 
     private String osd_text5;
 
+    private String osd_currency;
+
+    private Double osd_rate;
+
+    public String getOsd_currency() {
+        return osd_currency;
+    }
+
+    public void setOsd_currency(String osd_currency) {
+        this.osd_currency = osd_currency;
+    }
+
+    public Double getOsd_rate() {
+        return osd_rate;
+    }
+
+    public void setOsd_rate(Double osd_rate) {
+        this.osd_rate = osd_rate;
+    }
+
     public Date getOs_date() {
         return os_date;
     }

+ 5 - 2
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthreceiptsServiceImpl.java

@@ -77,6 +77,7 @@ public class OthreceiptsServiceImpl extends CommonBaseServiceImpl<OthreceiptsMap
         DocBaseDTO baseDTO = new DocBaseDTO();
         if (othreceipts.getId() > 0){
             othreceiptsMapper.updateByPrimaryKeySelective(othreceipts);
+            othreceiptsdetail = othreceiptsdetailMapper.selectByPrimaryKey(othreceipts.getId());
             baseDTO = getBaseDTOById(id);
             if (!("AUDITED".equals(othreceipts.getOr_statuscode()))) {
                 //日志记录
@@ -101,6 +102,8 @@ public class OthreceiptsServiceImpl extends CommonBaseServiceImpl<OthreceiptsMap
             othreceiptsdetail1.setOrd_orid(Math.toIntExact(id));
             othreceiptsdetail1.setCompanyId(BaseContextHolder.getCompanyId());
             othreceiptsdetail1.setOr_date(othreceipts.getOr_date());
+            othreceiptsdetail1.setOrd_currency(othreceipts.getOr_currency());
+            othreceiptsdetail1.setOrd_rate(othreceipts.getOr_rate());
             if (othreceiptsdetail1.getId() > 0 ){
                 othreceiptsdetailMapper.updateByPrimaryKeySelective(othreceiptsdetail1);
             }else {
@@ -223,7 +226,7 @@ public class OthreceiptsServiceImpl extends CommonBaseServiceImpl<OthreceiptsMap
 
         //更新资金
         Double amount = banksubledgerMapper.selectThisamount(othreceipts.getOr_bankcode(), BaseContextHolder.getCompanyId());
-        List<Othreceiptsdetail> othreceiptsdetailList = othreceiptsdetailMapper.selectByPrimaryKey(id);
+        List<Othreceiptsdetail> othreceiptsdetailList = othreceiptsdetailMapper.selectByPrimaryKey(Long.valueOf(id));
         Iterator isList = othreceiptsdetailList.iterator();
         while (isList.hasNext()){
             Othreceiptsdetail othreceiptsdetail = (Othreceiptsdetail) isList.next();
@@ -309,7 +312,7 @@ public class OthreceiptsServiceImpl extends CommonBaseServiceImpl<OthreceiptsMap
     public Othte select(int id) {
         Othte othte = new Othte();
         othte.setMain(othreceiptsMapper.selectByPrimaryKey(id));
-        othte.setItems(othreceiptsdetailMapper.selectByPrimaryKey(id));
+        othte.setItems(othreceiptsdetailMapper.selectByPrimaryKey(Long.valueOf(id)));
         return othte;
     }
 

+ 3 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthspendingsServiceImpl.java

@@ -72,6 +72,7 @@ public class OthspendingsServiceImpl extends CommonBaseServiceImpl<OthspendingsM
         DocBaseDTO baseDTO = new DocBaseDTO();
         if (othspendings.getId() > 0){
             othspendingsMapper.updateByPrimaryKeySelective(othspendings);
+            othspendingsdetails = othspendingsdetailMapper.selectByPrimaryKey(Integer.parseInt(String.valueOf(othspendings.getId())));
             baseDTO = getBaseDTOById(id);
             //日志记录
             if (!("AUDITED".equals(othspendings.getOs_statuscode()))) {
@@ -97,6 +98,8 @@ public class OthspendingsServiceImpl extends CommonBaseServiceImpl<OthspendingsM
             othspendingsdetail.setOsd_osid(Math.toIntExact(id));
             othspendingsdetail.setCompanyId(BaseContextHolder.getCompanyId());
             othspendingsdetail.setOs_date(othspendings.getOs_date());
+            othspendingsdetail.setOsd_currency(othspendings.getOs_currency());
+            othspendingsdetail.setOsd_rate(othspendings.getOs_rate());
             if (othspendingsdetail.getId() > 0 ){
                 othspendingsdetailMapper.updateByPrimaryKeySelective(othspendingsdetail);
             }else {

+ 21 - 1
applications/money/money-server/src/main/resources/mapper/OthreceiptsMapper.xml

@@ -31,12 +31,14 @@
     <result column="or_auditman" property="or_auditman" jdbcType="VARCHAR" />
     <result column="or_auditdate" property="or_auditdate" jdbcType="TIMESTAMP" />
     <result column="createTime" property="createTime" jdbcType="TIMESTAMP" />
+    <result column="or_currency" property="or_currency" jdbcType="VARCHAR" />
+    <result column="or_rate" property="or_rate" jdbcType="DOUBLE" />
   </resultMap>
   <sql id="Base_Column_List" >
     or_id, or_code, or_date, or_custid, or_custcode, or_custname, or_bankcode, or_bankid, 
     or_bankname, or_amount, or_status, or_statuscode,
     or_remark, Othreceipts.companyId, Othreceipts.updaterId, Othreceipts.updatedate, or_text1,
-    or_text2, or_text3, or_text4, or_text5, othreceipts.creatorName, othreceipts.createTime, or_auditman, or_auditdate
+    or_text2, or_text3, or_text4, or_text5, othreceipts.creatorName, othreceipts.createTime, or_auditman, or_auditdate,or_currency,or_rate
   </sql>
   <sql id="Detail_Column_List" >
     ord_type,ord_nowbalance,ord_remark
@@ -142,6 +144,12 @@
       <if test="createTime != null" >
         createTime,
       </if>
+      <if test="or_currency != null" >
+        or_currency,
+      </if>
+      <if test="or_rate != null" >
+        or_rate,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="or_code != null" >
@@ -207,6 +215,12 @@
       <if test="createTime != null" >
         #{createTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="or_currency != null" >
+        #{or_currency,jdbcType=VARCHAR},
+      </if>
+      <if test="or_rate != null" >
+        #{or_rate,jdbcType=DOUBLE},
+      </if>
     </trim>
     <selectKey resultType="Long" keyProperty="id" order="AFTER">
       SELECT LAST_INSERT_ID()
@@ -272,6 +286,12 @@
       <if test="or_text5 != null" >
         or_text5 = #{or_text5,jdbcType=VARCHAR},
       </if>
+      <if test="or_currency != null" >
+        or_currency = #{or_currency,jdbcType=VARCHAR},
+      </if>
+      <if test="or_rate != null" >
+        or_rate = #{or_rate,jdbcType=DOUBLE},
+      </if>
       or_auditman = #{or_auditman,jdbcType=VARCHAR},
       or_auditdate = #{or_auditdate,jdbcType=TIMESTAMP}
     </set>

+ 22 - 2
applications/money/money-server/src/main/resources/mapper/OthreceiptsdetailMapper.xml

@@ -18,12 +18,14 @@
     <result column="ord_text3" property="ord_text3" jdbcType="VARCHAR" />
     <result column="ord_text4" property="ord_text4" jdbcType="VARCHAR" />
     <result column="ord_text5" property="ord_text5" jdbcType="VARCHAR" />
+    <result column="ord_currency" property="ord_currency" jdbcType="VARCHAR" />
+    <result column="ord_rate" property="ord_rate" jdbcType="DOUBLE" />
   </resultMap>
   <sql id="Base_Column_List" >
     ord_id, ord_orid, ord_detno, ord_ym, ord_type, ord_nowbalance, ord_remark, companyId, 
-    updaterId, updatedate, ord_text1, ord_text2, ord_text3, ord_text4, ord_text5
+    updaterId, updatedate, ord_text1, ord_text2, ord_text3, ord_text4, ord_text5,ord_currency,ord_rate
   </sql>
-  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
     select 
     <include refid="Base_Column_List" />
     from othreceiptsdetail
@@ -98,6 +100,12 @@
       <if test="ord_text5 != null" >
         ord_text5,
       </if>
+      <if test="ord_currency != null" >
+        ord_currency,
+      </if>
+      <if test="ord_rate != null" >
+        ord_rate,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="ord_orid != null" >
@@ -142,6 +150,12 @@
       <if test="ord_text5 != null" >
         #{ord_text5,jdbcType=VARCHAR},
       </if>
+      <if test="ord_currency != null" >
+        #{ord_currency,jdbcType=VARCHAR},
+      </if>
+      <if test="ord_rate != null" >
+        #{ord_rate,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.money.po.Othreceiptsdetail" >
@@ -186,6 +200,12 @@
       <if test="ord_text5 != null" >
         ord_text5 = #{ord_text5,jdbcType=VARCHAR},
       </if>
+      <if test="ord_currency != null" >
+        ord_currency = #{ord_currency,jdbcType=VARCHAR},
+      </if>
+      <if test="ord_rate != null" >
+        ord_rate = #{ord_rate,jdbcType=DOUBLE},
+      </if>
     </set>
     where ord_id = #{id,jdbcType=INTEGER}
   </update>

+ 21 - 1
applications/money/money-server/src/main/resources/mapper/OthspendingsMapper.xml

@@ -30,13 +30,15 @@
     <result column="createTime" property="createTime" jdbcType="TIMESTAMP" />
     <result column="os_auditman" property="os_auditman" jdbcType="VARCHAR" />
     <result column="os_auditdate" property="os_auditdate" jdbcType="TIMESTAMP" />
+    <result column="os_currency" property="os_currency" jdbcType="VARCHAR" />
+    <result column="os_rate" property="os_rate" jdbcType="DOUBLE" />
   </resultMap>
   <sql id="Base_Column_List" >
     os_id, os_code, os_date, os_vendid, os_vendcode, os_vendname, os_bankid, os_bankcode, 
     os_bankname, os_amount, os_status, os_statuscode,
     os_remark, othspendings.companyId, othspendings.updaterId,
     othspendings.updatedate, os_text1, os_text2, os_text3, os_text4,
-    os_text5,othspendings.creatorName, othspendings.createTime, os_auditman, os_auditdate
+    os_text5,othspendings.creatorName, othspendings.createTime, os_auditman, os_auditdate,os_currency,os_rate
   </sql>
   <sql id="Detail_Column_List" >
     osd_type,osd_nowbalance,osd_remark
@@ -136,6 +138,12 @@
       <if test="createTime != null" >
         createTime,
       </if>
+      <if test="os_currency != null" >
+        os_currency,
+      </if>
+      <if test="os_rate != null" >
+        os_rate,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="os_code != null" >
@@ -201,6 +209,12 @@
       <if test="createTime != null" >
         #{createTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="os_currency != null" >
+        #{os_currency,jdbcType=VARCHAR},
+      </if>
+      <if test="os_rate != null" >
+        #{os_rate,jdbcType=DOUBLE},
+      </if>
     </trim>
     <selectKey resultType="Long" keyProperty="id" order="AFTER">
       SELECT LAST_INSERT_ID()
@@ -267,6 +281,12 @@
       <if test="os_text5 != null" >
         os_text5 = #{os_text5,jdbcType=VARCHAR},
       </if>
+      <if test="os_currency != null" >
+        os_currency = #{os_currency,jdbcType=VARCHAR},
+      </if>
+      <if test="os_rate != null" >
+        os_rate = #{os_rate,jdbcType=VARCHAR},
+      </if>
       os_auditman = #{os_auditman,jdbcType=VARCHAR},
       os_auditdate = #{os_auditdate,jdbcType=TIMESTAMP}
     </set>

+ 21 - 1
applications/money/money-server/src/main/resources/mapper/OthspendingsdetailMapper.xml

@@ -18,10 +18,12 @@
     <result column="osd_text3" property="osd_text3" jdbcType="VARCHAR" />
     <result column="osd_text4" property="osd_text4" jdbcType="VARCHAR" />
     <result column="osd_text5" property="osd_text5" jdbcType="VARCHAR" />
+    <result column="osd_currency" property="osd_currency" jdbcType="VARCHAR" />
+    <result column="osd_rate" property="osd_rate" jdbcType="DOUBLE" />
   </resultMap>
   <sql id="Base_Column_List" >
     osd_id, osd_osid, osd_detno, osd_ym, osd_type, osd_nowbalance, osd_remark, companyId,
-    updaterId, updatedate, osd_text1, osd_text2, osd_text3, osd_text4, osd_text5
+    updaterId, updatedate, osd_text1, osd_text2, osd_text3, osd_text4, osd_text5,osd_currency,osd_rate
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
     select 
@@ -98,6 +100,12 @@
       <if test="osd_text5 != null" >
         osd_text5,
       </if>
+      <if test="osd_currency != null" >
+        osd_currency,
+      </if>
+      <if test="osd_rate != null" >
+        osd_rate,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="osd_osid != null" >
@@ -142,6 +150,12 @@
       <if test="osd_text5 != null" >
         #{osd_text5,jdbcType=VARCHAR},
       </if>
+      <if test="osd_currency != null" >
+        #{osd_currency,jdbcType=VARCHAR},
+      </if>
+      <if test="osd_rate != null" >
+        #{osd_rate,jdbcType=DOUBLE},
+      </if>
     </trim>
     <selectKey resultType="Long" keyProperty="id" order="AFTER">
       SELECT LAST_INSERT_ID()
@@ -192,6 +206,12 @@
       <if test="osd_text5 != null" >
         osd_text5 = #{osd_text5,jdbcType=VARCHAR},
       </if>
+      <if test="osd_currency != null" >
+        osd_currency = #{osd_currency,jdbcType=VARCHAR},
+      </if>
+      <if test="osd_rate != null" >
+        osd_rate = #{osd_rate,jdbcType=VARCHAR},
+      </if>
     </set>
     where osd_id = #{id,jdbcType=INTEGER}
   </update>

+ 10 - 4
applications/operation/operation-auth-server/src/main/java/com/usoftchina/saas/operation/auth/controller/AuthController.java

@@ -18,12 +18,10 @@ import com.usoftchina.saas.operation.auth.service.AuthorizeLogService;
 import com.usoftchina.saas.utils.BeanMapper;
 import com.usoftchina.saas.utils.CollectionUtils;
 import com.usoftchina.saas.utils.RedisUtil;
+import com.usoftchina.saas.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletRequest;
 import java.util.Optional;
@@ -100,5 +98,13 @@ public class AuthController {
         return Result.error(result.getCode(), result.getMessage());
     }
 
+    @GetMapping("/clearAuthorizeCount")
+    public Result clearAuthorizeCount(@RequestParam String username) {
+        if (StringUtils.isEmpty(username)) {
+            return Result.error("请输入用户名");
+        }
+        authorizeCountService.clear(username);
+        return Result.success();
+    }
 
 }

+ 70 - 0
applications/operation/operation-server/pom.xml

@@ -10,6 +10,76 @@
     <modelVersion>4.0.0</modelVersion>
 
     <artifactId>operation-server</artifactId>
+    <dependencies>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>auth-dto</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>auth-common</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>account-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>server-starter</artifactId>
+        </dependency>
+        <!-- db -->
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+        </dependency>
+        <!-- api doc -->
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger-ui</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger2</artifactId>
+        </dependency>
 
+        <!-- sleuth -->
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-zipkin</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.amqp</groupId>
+            <artifactId>spring-rabbit</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>net.logstash.logback</groupId>
+            <artifactId>logstash-logback-encoder</artifactId>
+        </dependency>
+        <!-- test -->
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>test-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper-spring-boot-starter</artifactId>
+        </dependency>
+    </dependencies>
 
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>com.spotify</groupId>
+                <artifactId>docker-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
 </project>

+ 6 - 0
applications/operation/operation-server/src/main/docker/Dockerfile

@@ -0,0 +1,6 @@
+FROM frolvlad/alpine-oraclejdk8:slim
+VOLUME /tmp
+ADD operation-server-1.0.0-SNAPSHOT.jar app.jar
+RUN sh -c 'touch /app.jar'
+ENV JAVA_OPTS=""
+ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar" ]

+ 24 - 0
applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/OperationApplication.java

@@ -0,0 +1,24 @@
+package com.usoftchina.saas.operation;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
+import org.springframework.cloud.openfeign.EnableFeignClients;
+
+/**
+ * @author: guq
+ * @create: 2019-01-04 14:53
+ **/
+@SpringBootApplication
+@EnableEurekaClient
+@EnableFeignClients(basePackages = {
+        "com.usoftchina.saas.account.api"
+})
+@MapperScan(basePackages = "com.usoftchina.saas.operation.mapper")
+public class OperationApplication {
+
+    public static void main(String[] args) {
+        SpringApplication.run(OperationApplication.class, args);
+    }
+}

+ 39 - 0
applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/controller/CustomerFeedBackController.java

@@ -0,0 +1,39 @@
+package com.usoftchina.saas.operation.controller;
+
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.operation.po.CustomerFeedBack;
+import com.usoftchina.saas.operation.service.CustomerFeedBackService;
+import com.usoftchina.saas.page.PageDefault;
+import com.usoftchina.saas.page.PageRequest;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 客户反馈
+ * @author: guq
+ * @create: 2019-01-04 17:52
+ **/
+@RequestMapping("/customerFeedBack")
+@RestController
+public class CustomerFeedBackController {
+
+    @Autowired
+    private CustomerFeedBackService customerFeedBackService;
+
+    @GetMapping("/list")
+    public Result<PageInfo<CustomerFeedBack>> getListData(@PageDefault(size = 10) PageRequest page, ListReqDTO req) {
+        PageInfo<CustomerFeedBack> listData = customerFeedBackService.getListData(page, req);
+        return Result.success(listData);
+    }
+
+    @RequestMapping("/save")
+    public Result<DocBaseDTO> save(@RequestBody CustomerFeedBack feedBack) {
+        DocBaseDTO save = customerFeedBackService.save(feedBack);
+        return Result.success(save);
+    }
+
+
+}

+ 46 - 0
applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/controller/DataController.java

@@ -0,0 +1,46 @@
+package com.usoftchina.saas.operation.controller;
+
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.operation.dto.AccountDTO;
+import com.usoftchina.saas.operation.dto.CompanyDTO;
+import com.usoftchina.saas.operation.dto.LoginDTO;
+import com.usoftchina.saas.operation.service.DataService;
+import com.usoftchina.saas.page.PageDefault;
+import com.usoftchina.saas.page.PageRequest;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 统计数据
+ * @author: guq
+ * @create: 2019-01-04 15:27
+ **/
+@RequestMapping("/data")
+@RestController
+public class DataController {
+
+    @Autowired
+    private DataService dataService;
+
+    @GetMapping("/getCompany")
+    public Result<PageInfo<CompanyDTO>> getCompany(@PageDefault(size = 10) PageRequest page, ListReqDTO req){
+        return Result.success(dataService.getCompany(page, req));
+    }
+
+
+    @GetMapping("/getAccount")
+    public Result<PageInfo<AccountDTO>> getAccount(@PageDefault(size = 10) PageRequest page, ListReqDTO req) {
+        return Result.success(dataService.getAccount(page, req));
+    }
+
+    @GetMapping("/getLogin")
+    public Result<PageInfo<LoginDTO>> getLogin(@PageDefault(size = 10) PageRequest page, ListReqDTO req) {
+        return Result.success(dataService.getLogin(page, req));
+    }
+
+
+}

+ 135 - 0
applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/dto/AccountDTO.java

@@ -0,0 +1,135 @@
+package com.usoftchina.saas.operation.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author: guq
+ * @create: 2019-01-05 13:27
+ **/
+public class AccountDTO implements Serializable{
+    private Long id;
+    private String username;
+    private String realname;
+    private String email;
+    private String mobile;
+    /**
+     * 头像
+     */
+    private String avatarUrl;
+    /**
+     * 账号类型 0 - 管理员
+     */
+    private Integer type;
+    private Boolean enabled;
+    private Date createTime;
+    private long creatorId;
+    private Date updateTime;
+    private long updaterId;
+    private Long uu;
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+
+    public String getRealname() {
+        return realname;
+    }
+
+    public void setRealname(String realname) {
+        this.realname = realname;
+    }
+
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
+    public String getMobile() {
+        return mobile;
+    }
+
+    public void setMobile(String mobile) {
+        this.mobile = mobile;
+    }
+
+    public String getAvatarUrl() {
+        return avatarUrl;
+    }
+
+    public void setAvatarUrl(String avatarUrl) {
+        this.avatarUrl = avatarUrl;
+    }
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public Boolean isEnabled() {
+        return enabled;
+    }
+
+    public void setEnabled(Boolean enabled) {
+        this.enabled = enabled;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public long getCreatorId() {
+        return creatorId;
+    }
+
+    public void setCreatorId(long creatorId) {
+        this.creatorId = creatorId;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public long getUpdaterId() {
+        return updaterId;
+    }
+
+    public void setUpdaterId(long updaterId) {
+        this.updaterId = updaterId;
+    }
+
+    public Long getUu() {
+        return uu;
+    }
+
+    public void setUu(Long uu) {
+        this.uu = uu;
+    }
+}

+ 100 - 0
applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/dto/CompanyDTO.java

@@ -0,0 +1,100 @@
+package com.usoftchina.saas.operation.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author: guq
+ * @create: 2019-01-04 16:19
+ **/
+public class CompanyDTO implements Serializable{
+    /**
+     * 唯一名称
+     */
+    private String name;
+
+    /**
+     * 商业登记证号
+
+     */
+    private String business_code;
+    private String address;
+    private String tel;
+    private String fax;
+    private String realname;
+    private String mobile;
+    private Long uu;
+    private Date create_time;
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getBusiness_code() {
+        return business_code;
+    }
+
+    public void setBusiness_code(String business_code) {
+        this.business_code = business_code;
+    }
+
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public String getTel() {
+        return tel;
+    }
+
+    public void setTel(String tel) {
+        this.tel = tel;
+    }
+
+    public String getFax() {
+        return fax;
+    }
+
+    public void setFax(String fax) {
+        this.fax = fax;
+    }
+
+    public String getRealname() {
+        return realname;
+    }
+
+    public void setRealname(String realname) {
+        this.realname = realname;
+    }
+
+    public String getMobile() {
+        return mobile;
+    }
+
+    public void setMobile(String mobile) {
+        this.mobile = mobile;
+    }
+
+    public Long getUu() {
+        return uu;
+    }
+
+    public void setUu(Long uu) {
+        this.uu = uu;
+    }
+
+    public Date getCreate_time() {
+        return create_time;
+    }
+
+    public void setCreate_time(Date create_time) {
+        this.create_time = create_time;
+    }
+}

+ 57 - 0
applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/dto/LoginDTO.java

@@ -0,0 +1,57 @@
+package com.usoftchina.saas.operation.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author: guq
+ * @create: 2019-01-05 15:28
+ **/
+public class LoginDTO implements Serializable{
+
+    private Long account_id;
+    private int login_num;
+    private String username;
+    private Date lastesttime;
+    private String mobile;
+
+    public Long getAccount_id() {
+        return account_id;
+    }
+
+    public void setAccount_id(Long account_id) {
+        this.account_id = account_id;
+    }
+
+    public int getLogin_num() {
+        return login_num;
+    }
+
+    public void setLogin_num(int login_num) {
+        this.login_num = login_num;
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    public Date getLastesttime() {
+        return lastesttime;
+    }
+
+    public void setLastesttime(Date lastesttime) {
+        this.lastesttime = lastesttime;
+    }
+
+    public String getMobile() {
+        return mobile;
+    }
+
+    public void setMobile(String mobile) {
+        this.mobile = mobile;
+    }
+}

+ 13 - 0
applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/mapper/AccountMapper.java

@@ -0,0 +1,13 @@
+package com.usoftchina.saas.operation.mapper;
+
+import com.usoftchina.saas.operation.dto.AccountDTO;
+import com.usoftchina.saas.operation.dto.LoginDTO;
+
+import java.util.List;
+
+public interface AccountMapper {
+
+    List<AccountDTO> findAccountByCondition(String con);
+
+    List<LoginDTO> getLogin(String con);
+}

+ 14 - 0
applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/mapper/CompanyMapper.java

@@ -0,0 +1,14 @@
+package com.usoftchina.saas.operation.mapper;
+
+import com.usoftchina.saas.operation.dto.CompanyDTO;
+
+import java.util.List;
+
+/**
+ * @author: guq
+ * @create: 2019-01-04 17:10
+ **/
+public interface CompanyMapper {
+
+    List<CompanyDTO> findCompanyByCondition(String con);
+}

+ 21 - 0
applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/mapper/CustomerfeedbackMapper.java

@@ -0,0 +1,21 @@
+package com.usoftchina.saas.operation.mapper;
+
+import com.usoftchina.saas.operation.po.CustomerFeedBack;
+
+import java.util.List;
+
+public interface CustomerfeedbackMapper {
+    int deleteByPrimaryKey(Integer cf_id);
+
+    int insert(CustomerFeedBack record);
+
+    int insertSelective(CustomerFeedBack record);
+
+    CustomerFeedBack selectByPrimaryKey(Integer cf_id);
+
+    int updateByPrimaryKeySelective(CustomerFeedBack record);
+
+    int updateByPrimaryKey(CustomerFeedBack record);
+
+    List<CustomerFeedBack> selectByCondition(String con);
+}

+ 185 - 0
applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/po/Company.java

@@ -0,0 +1,185 @@
+package com.usoftchina.saas.operation.po;
+
+import java.util.Date;
+
+/**
+ * 注册企业
+ * @author: guq
+ * @create: 2019-01-04 16:14
+ **/
+
+public class Company {
+    private Long id;
+    /**
+     * 唯一名称
+     */
+    private String name;
+    /**
+     * 商业登记证号
+     */
+    private String businessCode;
+    private String address;
+    /**
+     * 企业logo
+     */
+    private String logoUrl;
+    private String tel;
+    private String fax;
+    private String signet;
+    /**
+     * 所属行业
+     */
+    private String type;
+    /**
+     * 数据中心
+     */
+    private String dcName;
+
+    private Date createTime;
+    private long creatorId;
+    private Date updateTime;
+    private long updaterId;
+    private Long uu;
+
+    private String admin;
+    private String admin_phone;
+
+    public String getAdmin() {
+        return admin;
+    }
+
+    public void setAdmin(String admin) {
+        this.admin = admin;
+    }
+
+    public String getAdmin_phone() {
+        return admin_phone;
+    }
+
+    public void setAdmin_phone(String admin_phone) {
+        this.admin_phone = admin_phone;
+    }
+
+
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getTel() {
+        return tel;
+    }
+
+    public void setTel(String tel) {
+        this.tel = tel;
+    }
+
+    public String getFax() {
+        return fax;
+    }
+
+    public void setFax(String fax) {
+        this.fax = fax;
+    }
+
+    public String getSignet() {
+        return signet;
+    }
+
+    public void setSignet(String signet) {
+        this.signet = signet;
+    }
+
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getBusinessCode() {
+        return businessCode;
+    }
+
+    public void setBusinessCode(String businessCode) {
+        this.businessCode = businessCode;
+    }
+
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public String getLogoUrl() {
+        return logoUrl;
+    }
+
+    public void setLogoUrl(String logoUrl) {
+        this.logoUrl = logoUrl;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public long getCreatorId() {
+        return creatorId;
+    }
+
+    public void setCreatorId(long creatorId) {
+        this.creatorId = creatorId;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public long getUpdaterId() {
+        return updaterId;
+    }
+
+    public void setUpdaterId(long updaterId) {
+        this.updaterId = updaterId;
+    }
+
+    public Long getUu() {
+        return uu;
+    }
+
+    public void setUu(Long uu) {
+        this.uu = uu;
+    }
+
+    public String getDcName() {
+        return dcName;
+    }
+
+    public void setDcName(String dcName) {
+        this.dcName = dcName;
+    }
+}

+ 141 - 0
applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/po/CustomerFeedBack.java

@@ -0,0 +1,141 @@
+package com.usoftchina.saas.operation.po;
+
+import java.util.Date;
+
+/**
+ * @author: guq
+ * @create: 2019-01-04 18:18
+ **/
+public class CustomerFeedBack {
+
+    private Long cf_id;
+
+    private String cf_creator;
+
+    private Date cf_creatime;
+
+    private Long cf_creatorid;
+
+    private String cf_content;
+
+    private String cf_status;
+
+    private Long cf_companyid;
+
+    private String cf_company;
+
+    private String cf_remark;
+
+    private String cf_name;
+
+    public String getCf_name() {
+        return cf_name;
+    }
+
+    public void setCf_name(String cf_name) {
+        this.cf_name = cf_name;
+    }
+
+    public String getCf_mobile() {
+        return cf_mobile;
+    }
+
+    public void setCf_mobile(String cf_mobile) {
+        this.cf_mobile = cf_mobile;
+    }
+
+    public Long getCf_qq() {
+        return cf_qq;
+    }
+
+    public void setCf_qq(Long cf_qq) {
+        this.cf_qq = cf_qq;
+    }
+
+    public String getCf_wechat() {
+        return cf_wechat;
+    }
+
+    public void setCf_wechat(String cf_wechat) {
+        this.cf_wechat = cf_wechat;
+    }
+
+    private String cf_mobile;
+    private Long cf_qq;
+    private String cf_wechat;
+
+    public Long getCf_id() {
+        return cf_id;
+    }
+
+    public void setCf_id(Long cf_id) {
+        this.cf_id = cf_id;
+    }
+
+    public String getCf_creator() {
+        return cf_creator;
+    }
+
+    public void setCf_creator(String cf_creator) {
+        this.cf_creator = cf_creator == null ? null : cf_creator.trim();
+    }
+
+    public Date getCf_creatime() {
+        return cf_creatime;
+    }
+
+    public void setCf_creatime(Date cf_creatime) {
+        this.cf_creatime = cf_creatime;
+    }
+
+
+    public String getCf_content() {
+        return cf_content;
+    }
+
+    public void setCf_content(String cf_content) {
+        this.cf_content = cf_content == null ? null : cf_content.trim();
+    }
+
+    public String getCf_status() {
+        return cf_status;
+    }
+
+    public Long getCf_creatorid() {
+        return cf_creatorid;
+    }
+
+    public void setCf_creatorid(Long cf_creatorid) {
+        this.cf_creatorid = cf_creatorid;
+    }
+
+    public Long getCf_companyid() {
+        return cf_companyid;
+    }
+
+    public void setCf_companyid(Long cf_companyid) {
+        this.cf_companyid = cf_companyid;
+    }
+
+    public void setCf_status(String cf_status) {
+        this.cf_status = cf_status == null ? null : cf_status.trim();
+    }
+
+
+    public String getCf_company() {
+        return cf_company;
+    }
+
+    public void setCf_company(String cf_company) {
+        this.cf_company = cf_company == null ? null : cf_company.trim();
+    }
+
+    public String getCf_remark() {
+        return cf_remark;
+    }
+
+    public void setCf_remark(String cf_remark) {
+        this.cf_remark = cf_remark == null ? null : cf_remark.trim();
+    }
+
+}

+ 13 - 0
applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/service/CustomerFeedBackService.java

@@ -0,0 +1,13 @@
+package com.usoftchina.saas.operation.service;
+
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.operation.po.CustomerFeedBack;
+import com.usoftchina.saas.page.PageRequest;
+
+public interface CustomerFeedBackService {
+    DocBaseDTO save(CustomerFeedBack fedBack);
+
+    PageInfo<CustomerFeedBack> getListData(PageRequest page, ListReqDTO req);
+}

+ 19 - 0
applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/service/DataService.java

@@ -0,0 +1,19 @@
+package com.usoftchina.saas.operation.service;
+
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.operation.dto.AccountDTO;
+import com.usoftchina.saas.operation.dto.CompanyDTO;
+import com.usoftchina.saas.operation.dto.LoginDTO;
+import com.usoftchina.saas.page.PageRequest; /**
+ * @author: guq
+ * @create: 2019-01-04 15:27
+ **/
+public interface DataService {
+
+    PageInfo<CompanyDTO> getCompany(PageRequest page, ListReqDTO req);
+
+    PageInfo<AccountDTO> getAccount(PageRequest page, ListReqDTO req);
+
+    PageInfo<LoginDTO> getLogin(PageRequest page, ListReqDTO req);
+}

+ 57 - 0
applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/service/impl/CustomerFedBackServiceImpl.java

@@ -0,0 +1,57 @@
+package com.usoftchina.saas.operation.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.commons.exception.BizExceptionCode;
+import com.usoftchina.saas.commons.po.BillCodeSeq;
+import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.exception.BizException;
+import com.usoftchina.saas.operation.mapper.CustomerfeedbackMapper;
+import com.usoftchina.saas.operation.po.CustomerFeedBack;
+import com.usoftchina.saas.operation.service.CustomerFeedBackService;
+import com.usoftchina.saas.page.PageRequest;
+import com.usoftchina.saas.utils.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author: guq
+ * @create: 2019-01-04 18:29
+ **/
+@Service
+public class CustomerFedBackServiceImpl implements CustomerFeedBackService {
+
+    @Autowired
+    private CustomerfeedbackMapper customerfedbackMapper;
+
+    @Override
+    public DocBaseDTO save(CustomerFeedBack feedBack) {
+        if (StringUtils.isEmpty(feedBack)){
+            throw new BizException(BizExceptionCode.EMPTY_DATA);
+        }
+        feedBack.setCf_creator(BaseContextHolder.getUserName());
+        feedBack.setCf_creatorid(BaseContextHolder.getUserId());
+        feedBack.setCf_companyid(BaseContextHolder.getCompanyId());
+        feedBack.setCf_creatime(new Date());
+        customerfedbackMapper.insertSelective(feedBack);
+        DocBaseDTO baseDTO = new DocBaseDTO(feedBack.getCf_id(), null, BillCodeSeq.CUSTOMERFEDBACK.getName());
+        return baseDTO;
+    }
+
+    @Override
+    public PageInfo<CustomerFeedBack> getListData(PageRequest page, ListReqDTO req) {
+        PageHelper.startPage(page.getNumber(), page.getSize());
+        String con = req.getFinalCondition();
+        if (null == con) {
+            con = "1=1";
+        }
+        List<CustomerFeedBack> list = customerfedbackMapper.selectByCondition(con);
+        PageInfo<CustomerFeedBack> fedbacks = new PageInfo<CustomerFeedBack>(list);
+        return fedbacks;
+    }
+}

+ 71 - 0
applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/service/impl/DataServiceImpl.java

@@ -0,0 +1,71 @@
+package com.usoftchina.saas.operation.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.operation.dto.AccountDTO;
+import com.usoftchina.saas.operation.dto.CompanyDTO;
+import com.usoftchina.saas.operation.dto.LoginDTO;
+import com.usoftchina.saas.operation.mapper.AccountMapper;
+import com.usoftchina.saas.operation.mapper.CompanyMapper;
+import com.usoftchina.saas.operation.service.DataService;
+import com.usoftchina.saas.page.PageRequest;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @author: guq
+ * @create: 2019-01-04 15:28
+ **/
+@Service
+public class DataServiceImpl implements DataService{
+
+    @Autowired
+    private CompanyMapper companyMapper;
+    @Autowired
+    private AccountMapper accountMapper;
+
+    @Override
+    public PageInfo<CompanyDTO> getCompany(PageRequest page, ListReqDTO req) {
+        PageHelper.startPage(page.getNumber(), page.getSize());
+        //查询数据
+        String con = req.getFinalCondition();
+        if (null == con) {
+            con = "1=1";
+        }
+        List<CompanyDTO> companies = companyMapper.findCompanyByCondition(con);
+        //取分页信息
+        PageInfo<CompanyDTO> pageInfo = new PageInfo<CompanyDTO>(companies);
+        return pageInfo;
+    }
+
+    @Override
+    public PageInfo<AccountDTO> getAccount(PageRequest page, ListReqDTO req) {
+        PageHelper.startPage(page.getNumber(), page.getSize());
+        //查询数据
+        String con = req.getFinalCondition();
+        if (null == con) {
+            con = "1=1";
+        }
+        List<AccountDTO> accounts = accountMapper.findAccountByCondition(con);
+        //取分页信息
+        PageInfo<AccountDTO> pageInfo = new PageInfo<AccountDTO>(accounts);
+        return pageInfo;
+    }
+
+    @Override
+    public PageInfo<LoginDTO> getLogin(PageRequest page, ListReqDTO req) {
+        PageHelper.startPage(page.getNumber(), page.getSize());
+        //查询数据
+        String con = req.getFinalCondition();
+        if (null == con) {
+            con = "1=1";
+        }
+        List<LoginDTO> info = accountMapper.getLogin(con);
+        //取分页信息
+        PageInfo<LoginDTO> pageInfo = new PageInfo<LoginDTO>(info);
+        return pageInfo;
+    }
+}

+ 82 - 0
applications/operation/operation-server/src/main/resources/application.yml

@@ -0,0 +1,82 @@
+spring:
+  profiles:
+    active: dev
+  application:
+    name: operation-server
+  security:
+    user:
+      name: admin
+      password: select111***
+  rabbitmq:
+    host: 10.1.81.75
+    port: 5672
+    virtual-host: dev
+    username: saas
+    password: select123***
+  zipkin:
+    sender:
+      type: rabbit
+    locator:
+      discovery:
+        enabled: true
+  sleuth:
+    sampler:
+      probability: 1.0
+  datasource:
+    driver-class-name: com.mysql.cj.jdbc.Driver
+    url: jdbc:mysql://10.1.81.79:3306/saas_auth?characterEncoding=utf-8&useSSL=false
+    username: root
+    password: select111***
+    hikari:
+      minimum-idle: 5
+      maximum-pool-size: 50
+      idle-timeout: 30000
+      max-lifetime: 1800000
+      connection-timeout: 30000
+  redis:
+    host: 10.1.81.62
+    port: 6379
+  jackson:
+    date-format: yyyy-MM-dd HH:mm:ss
+    time-zone: GMT+8
+eureka:
+  instance:
+    leaseRenewalIntervalInSeconds: 10
+    health-check-url-path: /actuator/health
+    status-page-url-path: /actuator/info
+    prefer-ip-address: true
+    metadata-map:
+      user.name: ${spring.security.user.name}
+      user.password: ${spring.security.user.password}
+  client:
+    registryFetchIntervalSeconds: 5
+    serviceUrl:
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@10.1.81.61:8510/eureka/
+server:
+  port: 9040
+  tomcat:
+    uri-encoding: UTF-8
+management:
+  endpoints:
+    web:
+      exposure:
+        include: "*"
+  endpoint:
+    health:
+      show-details: always
+    shutdown:
+      enabled: true
+    restart:
+      enabled: true
+info:
+  name: '@project.artifactId@'
+  description: '@project.description@'
+  version: '@project.version@'
+  spring-boot-version: '@spring.boot.version@'
+  spring-cloud-version: '@spring.cloud.version@'
+mybatis:
+  type-aliases-package: com.usoftchina.saas.operation.po
+  mapper-locations: classpath:mapper/*.xml
+ribbon:
+  ReadTimeout: 5000
+  ConnectTimeout: 5000

+ 13 - 0
applications/operation/operation-server/src/main/resources/config/application-dev.yml

@@ -0,0 +1,13 @@
+eureka:
+  instance:
+    leaseRenewalIntervalInSeconds: 10
+    health-check-url-path: /actuator/health
+    status-page-url-path: /actuator/info
+    prefer-ip-address: true
+    metadata-map:
+      user.name: ${spring.security.user.name}
+      user.password: ${spring.security.user.password}
+  client:
+    registryFetchIntervalSeconds: 5
+    serviceUrl:
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@127.0.0.1:8500/eureka/

+ 12 - 0
applications/operation/operation-server/src/main/resources/config/application-docker-dev.yml

@@ -0,0 +1,12 @@
+eureka:
+  instance:
+    hostname: saas-operation-server-dev
+    prefer-ip-address: false
+  client:
+    serviceUrl:
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@saas-eureka-server-dev:8510/eureka/
+spring:
+  rabbitmq:
+    virtual-host: dev
+server:
+  port: 9040

+ 23 - 0
applications/operation/operation-server/src/main/resources/config/application-docker-prod.yml

@@ -0,0 +1,23 @@
+eureka:
+  instance:
+    hostname: saas-operation-server
+    prefer-ip-address: false
+  client:
+    serviceUrl:
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@saas-eureka-server:8500/eureka/
+spring:
+  rabbitmq:
+    host: 10.10.100.103
+    port: 5672
+    virtual-host: docker
+    username: saas
+    password: select123***
+  datasource:
+    url: jdbc:mysql://10.10.100.18:3306/saas_auth?characterEncoding=utf-8&useSSL=false
+    username: saas
+    password: select111***
+  redis:
+    host: 10.10.100.173
+    port: 6379
+logging:
+  destination: 10.10.100.160:5000

+ 10 - 0
applications/operation/operation-server/src/main/resources/config/application-docker.yml

@@ -0,0 +1,10 @@
+eureka:
+  instance:
+    hostname: saas-operation-server
+    prefer-ip-address: false
+  client:
+    serviceUrl:
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@saas-eureka-server:8500/eureka/
+spring:
+  rabbitmq:
+    virtual-host: docker

+ 115 - 0
applications/operation/operation-server/src/main/resources/logback-spring.xml

@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+    <include resource="org/springframework/boot/logging/logback/base.xml" />
+    <jmxConfigurator/>
+
+    <!--
+    %m
+    输出代码中指定的消息
+    %p
+    输出优先级,即DEBUG,INFO,WARN,ERROR,FATAL
+    %r
+    输出自应用启动到输出该log信息耗费的毫秒数
+    %c
+    输出所属的类目,通常就是所在类的全名
+    %t
+    输出产生该日志事件的线程名
+    %n
+    输出一个回车换行符,Windows平台为“\r\n”,Unix平台为“\n”
+    %d
+    输出日志时间点的日期或时间,默认格式为ISO8601,也可以在其后指定格式,比如:%d{yyy MMM dd HH:mm:ss,SSS},
+    输出类似:2002年10月18日 22:10:28,921
+    %l
+    输出日志事件的发生位置,包括类目名、发生的线程,以及在代码中的行数。举例:Testlog4.main(TestLog4.java:10)
+    -->
+
+    <springProperty scope="context" name="log.path" source="logging.path" defaultValue="/var/log/saas/operation-server"/>
+    <springProperty scope="context" name="spring.application.name" source="spring.application.name" defaultValue="operation-server"/>
+    <springProperty scope="context" name="spring.profiles.active" source="spring.profiles.active" defaultValue="dev"/>
+    <springProperty scope="context" name="common-pattern" source="logging.common-pattern" defaultValue="%d{yyyy-MM-dd HH:mm:ss.SSS}:[%5p] [%t:%r] [%C{1}:%M:%L] --> %m%n"/>
+    <springProperty scope="context" name="log.level.console" source="logging.level.console" defaultValue="INFO"/>
+    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="10.1.81.1:5000"/>
+
+    <contextName>${spring.application.name}-${spring.profiles.active}-logback</contextName>
+
+    <appender name="CONSOLE_APPENDER" class="ch.qos.logback.core.ConsoleAppender">
+        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+            <level>${log.level.console}</level>
+        </filter>
+        <encoder>
+            <pattern>${common-pattern}</pattern>
+        </encoder>
+    </appender>
+
+    <appender name="ROOT_APPENDER" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${log.path}/root.log</file>
+        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+            <fileNamePattern>${log.path}/%d{yyyy-MM}/root-%d{yyyy-MM-dd}-%i.log.gz</fileNamePattern>
+            <maxFileSize>128MB</maxFileSize>
+            <maxHistory>7</maxHistory>
+            <totalSizeCap>20GB</totalSizeCap>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${common-pattern}</pattern>
+        </encoder>
+    </appender>
+
+    <!-- Appender to log in a JSON format -->
+    <appender name="JSON_APPENDER" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
+        <destination>${log.destination}</destination>
+        <encoder class="net.logstash.logback.encoder.LoggingEventCompositeJsonEncoder">
+            <providers>
+                <pattern>
+                    <pattern>
+                        {
+                        "severity": "%level",
+                        "service": "${spring.application.name:-}",
+                        "trace": "%X{X-B3-TraceId:-}",
+                        "span": "%X{X-B3-SpanId:-}",
+                        "parent": "%X{X-B3-ParentSpanId:-}",
+                        "exportable": "%X{X-Span-Export:-}",
+                        "pid": "${PID:-}",
+                        "thread": "%thread",
+                        "class": "%logger{40}",
+                        "rest": "%message"
+                        }
+                    </pattern>
+                </pattern>
+            </providers>
+        </encoder>
+    </appender>
+
+    <logger name="org.springframework" level="INFO"/>
+    <logger name="com.usoftchina.saas" level="INFO"/>
+
+    <springProfile name="dev">
+        <root level="INFO">
+            <appender-ref ref="CONSOLE_APPENDER"/>
+        </root>
+    </springProfile>
+
+    <springProfile name="docker">
+        <logger name="org.springframework" level="WARN"/>
+        <logger name="com.usoftchina.saas" level="WARN"/>
+        <root level="WARN">
+            <appender-ref ref="CONSOLE_APPENDER"/>
+            <appender-ref ref="JSON_APPENDER"/>
+        </root>
+    </springProfile>
+
+    <springProfile name="docker-dev">
+        <root level="INFO">
+            <appender-ref ref="CONSOLE_APPENDER"/>
+        </root>
+    </springProfile>
+
+    <springProfile name="docker-prod">
+        <logger name="org.springframework" level="WARN"/>
+        <logger name="com.usoftchina.saas" level="WARN"/>
+        <root level="WARN">
+            <appender-ref ref="CONSOLE_APPENDER"/>
+            <appender-ref ref="JSON_APPENDER"/>
+        </root>
+    </springProfile>
+
+</configuration>

+ 34 - 0
applications/operation/operation-server/src/main/resources/mapper/AccoutMapper.xml

@@ -0,0 +1,34 @@
+<?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.operation.mapper.AccountMapper">
+    <resultMap id="BaseResultMap" type="com.usoftchina.saas.operation.dto.AccountDTO">
+        <id column="id" jdbcType="BIGINT" property="id"/>
+        <result column="username" jdbcType="VARCHAR" property="username"/>
+        <result column="realname" jdbcType="VARCHAR" property="realname"/>
+        <result column="email" jdbcType="VARCHAR" property="email"/>
+        <result column="mobile" jdbcType="VARCHAR" property="mobile"/>
+        <result column="type" jdbcType="INTEGER" property="type"/>
+        <result column="uu" jdbcType="BIGINT" property="uu"/>
+        <result column="enabled" jdbcType="BOOLEAN" property="enabled"/>
+        <result column="creator_id" jdbcType="BIGINT" property="creatorId"/>
+        <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
+        <result column="updater_id" jdbcType="BIGINT" property="updaterId"/>
+        <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
+    </resultMap>
+
+    <resultMap id="loginMap" type="com.usoftchina.saas.operation.dto.LoginDTO">
+        <id column="account_id" jdbcType="INTEGER" property="account_id"/>
+        <result column="username" jdbcType="VARCHAR" property="username"/>
+        <result column="login_num" jdbcType="INTEGER" property="login_num"/>
+        <result column="lastesttime" jdbcType="TIMESTAMP" property="lastesttime"/>
+        <result column="mobile" jdbcType="VARCHAR" property="mobile"/>
+    </resultMap>
+
+    <select id="findAccountByCondition" parameterType="string" resultMap="BaseResultMap">
+        select * from saas_account.ac_account  where #{con}
+    </select>
+    <select id="getLogin" parameterType="string" resultMap="loginMap">
+        SELECT * FROM (select account_id  ,count(account_id) login_num,max(ac_account.realname) username,max(login_time) lastesttime, max(ac_account.mobile) mobile from au_authorize_log left join saas_account.ac_account on account_id= ac_account.id  where login_time >  date_sub(now(),interval 3 MONTH) GROUP BY account_id order by lastesttime desc
+        )login_info where #{con}
+    </select>
+</mapper>

+ 20 - 0
applications/operation/operation-server/src/main/resources/mapper/CompanyMapper.xml

@@ -0,0 +1,20 @@
+<?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.operation.mapper.CompanyMapper">
+    <resultMap id="baseMap" type="com.usoftchina.saas.operation.dto.CompanyDTO">
+        <result column="name" property="name" jdbcType="VARCHAR" />
+        <result column="business_code" property="business_code" jdbcType="VARCHAR" />
+        <result column="address" property="address" jdbcType="VARCHAR" />
+        <result column="tel" property="tel" jdbcType="VARCHAR" />
+        <result column="fax" property="fax" jdbcType="VARCHAR" />
+        <result column="realname" property="realname" jdbcType="VARCHAR" />
+        <result column="mobile" property="mobile" jdbcType="VARCHAR" />
+        <result column="create_time" property="create_time" jdbcType="TIMESTAMP" />
+        <result column="uu" property="uu" jdbcType="INTEGER" />
+    </resultMap>
+
+    <select id="findCompanyByCondition" parameterType="string" resultMap="baseMap">
+         select name,business_code,address,tel,fax,realname,mobile,ac_company.create_time,ac_company.uu from saas_account.ac_company
+        left join saas_account.ac_account on ac_account.id = ac_company.creator_id where #{con}
+    </select>
+</mapper>

+ 170 - 0
applications/operation/operation-server/src/main/resources/mapper/CustomerfeedbackMapper.xml

@@ -0,0 +1,170 @@
+<?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.operation.mapper.CustomerfeedbackMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.operation.po.CustomerFeedBack" >
+    <id column="cf_id" property="cf_id" jdbcType="INTEGER" />
+    <result column="cf_creator" property="cf_creator" jdbcType="VARCHAR" />
+    <result column="cf_creatime" property="cf_creatime" jdbcType="TIMESTAMP" />
+    <result column="cf_creatorid" property="cf_creatorid" jdbcType="INTEGER" />
+    <result column="cf_content" property="cf_content" jdbcType="VARCHAR" />
+    <result column="cf_status" property="cf_status" jdbcType="VARCHAR" />
+    <result column="cf_companyid" property="cf_companyid" jdbcType="INTEGER" />
+    <result column="cf_company" property="cf_company" jdbcType="VARCHAR" />
+    <result column="cf_remark" property="cf_remark" jdbcType="VARCHAR" />
+    <result column="cf_name" property="cf_name" jdbcType="VARCHAR" />
+    <result column="cf_qq" property="cf_qq" jdbcType="INTEGER" />
+    <result column="cf_wechat" property="cf_wechat" jdbcType="VARCHAR" />
+    <result column="cf_mobile" property="cf_mobile" jdbcType="VARCHAR" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    cf_id, cf_creator, cf_creatime, cf_creatorid, cf_content, cf_status, cf_companyid, 
+    cf_company, cf_remark
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+    select 
+    <include refid="Base_Column_List" />
+    from customerfedback
+    where cf_id = #{cf_id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+    delete from customerfedback
+    where cf_id = #{cf_id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.saas.operation.po.CustomerFeedBack" >
+    insert into customerfedback (cf_id, cf_creator, cf_creatime, 
+      cf_creatorid, cf_content, cf_status, 
+      cf_companyid, cf_company, cf_remark
+      )
+    values (#{cf_id,jdbcType=INTEGER}, #{cf_creator,jdbcType=VARCHAR}, #{cf_creatime,jdbcType=TIMESTAMP}, 
+      #{cf_creatorid,jdbcType=INTEGER}, #{cf_content,jdbcType=VARCHAR}, #{cf_status,jdbcType=VARCHAR}, 
+      #{cf_companyid,jdbcType=INTEGER}, #{cf_company,jdbcType=VARCHAR}, #{cf_remark,jdbcType=VARCHAR}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.operation.po.CustomerFeedBack" >
+    <selectKey  resultType="java.lang.Long" keyProperty="cf_id">
+      SELECT LAST_INSERT_ID() AS cf_id
+    </selectKey>
+    insert into saas_manage.customerfeedback
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="cf_creator != null" >
+        cf_creator,
+      </if>
+      <if test="cf_creatime != null" >
+        cf_creatime,
+      </if>
+      <if test="cf_creatorid != null" >
+        cf_creatorid,
+      </if>
+      <if test="cf_content != null" >
+        cf_content,
+      </if>
+      <if test="cf_status != null" >
+        cf_status,
+      </if>
+      <if test="cf_companyid != null" >
+        cf_companyid,
+      </if>
+      <if test="cf_company != null" >
+        cf_company,
+      </if>
+      <if test="cf_remark != null" >
+        cf_remark,
+      </if>
+      <if test="cf_qq != null" >
+        cf_qq,
+      </if>
+      <if test="cf_wechat != null" >
+        cf_wechat,
+      </if>
+      <if test="cf_name != null" >
+        cf_name,
+      </if>
+      <if test="cf_mobile != null" >
+        cf_mobile,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="cf_creator != null" >
+        #{cf_creator,jdbcType=VARCHAR},
+      </if>
+      <if test="cf_creatime != null" >
+        #{cf_creatime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="cf_creatorid != null" >
+        #{cf_creatorid},
+      </if>
+      <if test="cf_content != null" >
+        #{cf_content,jdbcType=VARCHAR},
+      </if>
+      <if test="cf_status != null" >
+        #{cf_status,jdbcType=VARCHAR},
+      </if>
+      <if test="cf_companyid != null" >
+        #{cf_companyid},
+      </if>
+      <if test="cf_company != null" >
+        #{cf_company,jdbcType=VARCHAR},
+      </if>
+      <if test="cf_remark != null" >
+        #{cf_remark,jdbcType=VARCHAR},
+      </if>
+      <if test="cf_qq != null" >
+        #{cf_qq},
+      </if>
+      <if test="cf_wechat != null" >
+        #{cf_wechat,jdbcType=VARCHAR},
+      </if>
+      <if test="cf_name != null" >
+        #{cf_name,jdbcType=VARCHAR},
+      </if>
+      <if test="cf_mobile != null" >
+        #{cf_mobile,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.operation.po.CustomerFeedBack" >
+    update customerfeedback
+    <set >
+      <if test="cf_creator != null" >
+        cf_creator = #{cf_creator,jdbcType=VARCHAR},
+      </if>
+      <if test="cf_creatime != null" >
+        cf_creatime = #{cf_creatime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="cf_creatorid != null" >
+        cf_creatorid = #{cf_creatorid,jdbcType=INTEGER},
+      </if>
+      <if test="cf_content != null" >
+        cf_content = #{cf_content,jdbcType=VARCHAR},
+      </if>
+      <if test="cf_status != null" >
+        cf_status = #{cf_status,jdbcType=VARCHAR},
+      </if>
+      <if test="cf_companyid != null" >
+        cf_companyid = #{cf_companyid,jdbcType=INTEGER},
+      </if>
+      <if test="cf_company != null" >
+        cf_company = #{cf_company,jdbcType=VARCHAR},
+      </if>
+      <if test="cf_remark != null" >
+        cf_remark = #{cf_remark,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where cf_id = #{cf_id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.operation.po.CustomerFeedBack" >
+    update customerfeedback
+    set cf_creator = #{cf_creator,jdbcType=VARCHAR},
+      cf_creatime = #{cf_creatime,jdbcType=TIMESTAMP},
+      cf_creatorid = #{cf_creatorid,jdbcType=INTEGER},
+      cf_content = #{cf_content,jdbcType=VARCHAR},
+      cf_status = #{cf_status,jdbcType=VARCHAR},
+      cf_companyid = #{cf_companyid,jdbcType=INTEGER},
+      cf_company = #{cf_company,jdbcType=VARCHAR},
+      cf_remark = #{cf_remark,jdbcType=VARCHAR}
+    where cf_id = #{cf_id,jdbcType=INTEGER}
+  </update>
+  <select id="selectByCondition" parameterType="string" resultMap="BaseResultMap">
+      select * from saas_manage.customerfeedback where #{con} order by cf_creatime desc
+  </select>
+</mapper>

+ 2 - 0
applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdInOutDTO.java

@@ -94,4 +94,6 @@ public class ProdInOutDTO extends CommonBaseDTO implements Serializable {
     private String pi_sellercode;
 
     private String pi_seller;
+
+    private Double pi_rate;
 }

+ 2 - 0
applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/PurchaseDTO.java

@@ -74,4 +74,6 @@ public class PurchaseDTO extends CommonBaseDTO implements Serializable{
     private String pu_sacode;
 
     private String pu_currency;
+
+    private Double pu_rate;
 }

+ 2 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOut.java

@@ -90,4 +90,6 @@ public class ProdInOut extends CommonBaseEntity implements Serializable {
     private String pi_sellercode;
 
     private String pi_seller;
+
+    private Double pi_rate;
 }

+ 2 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/Purchase.java

@@ -68,4 +68,6 @@ public class Purchase extends CommonBaseEntity implements Serializable {
     private String pu_sacode;
 
     private String pu_currency;
+
+    private Double pu_rate;
 }

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

@@ -41,6 +41,7 @@
     <result column="pi_prstatus" jdbcType="VARCHAR" property="pi_prstatus" />
     <result column="pi_prstatuscode" jdbcType="VARCHAR" property="pi_prstatuscode" />
     <result column="pi_currency" jdbcType="VARCHAR" property="pi_currency" />
+    <result column="pi_rate" jdbcType="DOUBLE" property="pi_rate" />
     <result column="pi_buyerid" jdbcType="INTEGER" property="pi_buyerid" />
     <result column="pi_buyercode" jdbcType="VARCHAR" property="pi_buyercode" />
     <result column="pi_buyername" jdbcType="VARCHAR" property="pi_buyername" />
@@ -59,7 +60,7 @@
     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_status, pi_statuscode, pi_printstatus, pi_printstatuscode,
     companyid, updaterid,updaterName,updatetime,creatorid,creatorName,createtime, pi_text1, pi_text2, pi_text3, pi_text4, pi_text5,pi_auditdate,
-    pi_auditman,pi_remark,pi_ioid,pi_iocode,pi_prstatus,pi_prstatuscode,pi_currency,pi_buyerid,pi_buyercode,pi_buyername,pi_sellerid,pi_sellercode,pi_seller,pi_nettotal
+    pi_auditman,pi_remark,pi_ioid,pi_iocode,pi_prstatus,pi_prstatuscode,pi_currency,pi_buyerid,pi_buyercode,pi_buyername,pi_sellerid,pi_sellercode,pi_seller,pi_nettotal,pi_rate
   </sql>
   <sql id="Blob_Column_List">
     pi_address
@@ -212,6 +213,9 @@
       <if test="pi_buyername != null">
         pi_buyername,
       </if>
+      <if test="pi_rate != null">
+        pi_rate,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
 
@@ -343,6 +347,9 @@
       <if test="pi_buyername != null">
         #{pi_buyername,jdbcType=VARCHAR},
       </if>
+      <if test="pi_rate != null">
+        #{pi_rate,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
 
@@ -451,6 +458,9 @@
       <if test="pi_buyername != null">
         pi_buyername = #{pi_buyername,jdbcType=VARCHAR},
       </if>
+      <if test="pi_rate != null">
+        pi_rate = #{pi_rate,jdbcType=VARCHAR},
+      </if>
     </set>
     where pi_id = #{id,jdbcType=INTEGER}
   </update>

+ 11 - 1
applications/purchase/purchase-server/src/main/resources/mapper/PurchaseMapper.xml

@@ -37,6 +37,7 @@
     <result column="pu_text4" property="pu_text4" jdbcType="VARCHAR" />
     <result column="pu_text5" property="pu_text5" jdbcType="VARCHAR" />
     <result column="pu_currency" property="pu_currency" jdbcType="VARCHAR" />
+    <result column="pu_rate" property="pu_rate" jdbcType="DOUBLE" />
   </resultMap>
  <resultMap id="ResultMapWithBLOBs" type="com.usoftchina.saas.purchase.po.Purchase" extends="BaseResultMap" >
     <result column="PU_SHIPADDRESSCODE" property="pu_shipaddresscode" jdbcType="LONGVARCHAR" />
@@ -47,7 +48,7 @@
     PU_BUYERNAME, PU_DELIVERY, PU_TAXTOTAL, PU_TOTAL, PU_REMARK, PU_TOTALUPPER,
     PU_PRINTSTATUS, PU_PRINTSTATUSCODE, PU_ACCEPTSTATUSCODE, PU_ACCEPTSTATUS, PU_STATUSCODE, 
     PU_STATUS, companyid, updaterId,updaterName,updateTime,creatorid,creatorName,createtime, pu_text1, pu_text2, pu_text3, pu_text4,
-    pu_text5,pu_auditman,pu_auditdate,pu_currency
+    pu_text5,pu_auditman,pu_auditdate,pu_currency,pu_rate
   </sql>
   <sql id="Blob_Column_List" >
     PU_SHIPADDRESSCODE
@@ -170,6 +171,9 @@
       <if test="pu_currency != null" >
       pu_currency,
       </if>
+      <if test="pu_rate != null" >
+          pu_rate,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="pu_code != null" >
@@ -271,6 +275,9 @@
       <if test="pu_currency != null" >
         #{pu_currency,jdbcType=VARCHAR},
       </if>
+      <if test="pu_rate != null" >
+          #{pu_rate,jdbcType=DOUBLE},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.purchase.po.Purchase" >
@@ -372,6 +379,9 @@
       <if test="pu_currency != null" >
         pu_currency = #{pu_currency,jdbcType=VARCHAR},
       </if>
+      <if test="pu_rate != null" >
+        pu_rate = #{pu_rate,jdbcType=DOUBLE},
+      </if>
     </set>
     where pu_id = #{id,jdbcType=INTEGER}
   </update>

+ 2 - 0
applications/sale/sale-dto/src/main/java/com/usoftchina/saas/sale/dto/ProdInOutDTO.java

@@ -86,4 +86,6 @@ public class ProdInOutDTO extends CommonBaseDTO implements Serializable {
     private String pi_seller;
 
     private Double pi_nettotal;
+
+    private Double pi_rate;
 }

+ 2 - 0
applications/sale/sale-dto/src/main/java/com/usoftchina/saas/sale/dto/SaleDTO.java

@@ -67,4 +67,6 @@ public class SaleDTO extends CommonBaseDTO{
     private Double sa_nettotal;
 
     private Date sa_delivery;
+
+    private Double sa_rate;
 }

+ 2 - 0
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/po/Sale.java

@@ -66,4 +66,6 @@ public class Sale extends CommonBaseEntity{
     private Double sa_nettotal;
 
     private Date sa_delivery;
+
+    private Double sa_rate;
 }

+ 13 - 3
applications/sale/sale-server/src/main/resources/mapper/ProdInOutMapper.xml

@@ -42,6 +42,7 @@
     <result column="pi_sellercode" jdbcType="VARCHAR" property="pi_sellercode" />
     <result column="pi_seller" jdbcType="VARCHAR" property="pi_seller" />
     <result column="pi_nettotal"  jdbcType="DOUBLE" property="pi_nettotal"/>
+    <result column="pi_rate"  jdbcType="DOUBLE" property="pi_rate"/>
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.usoftchina.saas.storage.po.ProdInOut">
     <result column="pi_address" jdbcType="LONGVARCHAR" property="pi_address" />
@@ -260,6 +261,9 @@
       <if test="pi_seller != null">
         pi_seller,
       </if>
+      <if test="pi_rate != null">
+        pi_rate,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
 
@@ -363,13 +367,16 @@
         #{pi_currency,jdbcType=VARCHAR},
       </if>
       <if test="pi_sellerid != null">
-        pi_sellerid = #{pi_sellerid,jdbcType=INTEGER},
+        #{pi_sellerid,jdbcType=INTEGER},
       </if>
       <if test="pi_sellercode != null">
-        pi_sellercode = #{pi_sellercode,jdbcType=VARCHAR},
+        #{pi_sellercode,jdbcType=VARCHAR},
       </if>
       <if test="pi_seller != null">
-        pi_seller = #{pi_seller,jdbcType=VARCHAR},
+        #{pi_seller,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_rate != null">
+        #{pi_rate,jdbcType=DOUBLE},
       </if>
     </trim>
   </insert>
@@ -478,6 +485,9 @@
       <if test="pi_seller!=null">
         pi_seller = #{pi_seller,jdbcType=VARCHAR},
       </if>
+      <if test="pi_rate!=null">
+        pi_rate = #{pi_rate,jdbcType=DOUBLE},
+      </if>
     </set>
     where pi_id = #{id,jdbcType=INTEGER}
   </update>

+ 12 - 2
applications/sale/sale-server/src/main/resources/mapper/SaleMapper.xml

@@ -36,13 +36,14 @@
     <result column="sa_sellerid" property="sa_sellerid" jdbcType="INTEGER" />
     <result column="sa_currency" property="sa_currency" jdbcType="VARCHAR" />
     <result column="sa_nettotal" property="sa_nettotal" jdbcType="DOUBLE" />
+    <result column="sa_rate" property="sa_rate" jdbcType="DOUBLE" />
   </resultMap>
   <sql id="Base_Column_List" >
     sa_id, sa_code, sa_custid, sa_custcode, sa_custname, sa_toplace, sa_total, sa_totalupper, 
     sa_remark, sa_status, sa_statuscode, sa_sendstatuscode, sa_sendstatus, sa_printstatus, 
-    sa_printstatuscode,companyId, updaterId,
+    sa_printstatuscode,companyId, updaterId,sa_currency
     updateTime, sa_text1, sa_text2, sa_text3, sa_text4, sa_text5,sa_auditman,sa_auditdate,
-    sa_seller,sa_sellercode,sa_date,sa_sellerid
+    sa_seller,sa_sellercode,sa_date,sa_sellerid,sa_rate
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
     select * from sale where sa_id = #{id}
@@ -162,6 +163,9 @@
       <if test="sa_delivery != null">
         sa_delivery,
       </if>
+      <if test="sa_rate != null">
+        sa_rate,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="sa_code != null" >
@@ -251,6 +255,9 @@
       <if test="sa_delivery != null" >
         #{sa_delivery,jdbcType=TIMESTAMP},
       </if>
+      <if test="sa_rate != null" >
+        #{sa_rate,jdbcType=DOUBLE},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.sale.po.Sale" >
@@ -349,6 +356,9 @@
       <if test="sa_delivery!=null">
         sa_delivery = #{sa_delivery,jdbcType=TIMESTAMP},
       </if>
+      <if test="sa_rate!=null">
+        sa_rate = #{sa_rate,jdbcType=DOUBLE},
+      </if>
     </set>
     where sa_id = #{id,jdbcType=INTEGER}
   </update>

+ 2 - 0
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOut.java

@@ -86,4 +86,6 @@ public class ProdInOut extends CommonBaseEntity implements Serializable {
     private String pi_seller;
 
     private Double pi_costtotal;
+
+    private Double pi_rate;
 }

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

@@ -302,7 +302,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         singleUnAudit(prodInOutDTO);
     }
 
-    private void singleUnAudit(ProdInOutDTO prodInOutDTO) {
+    @Transactional
+    public void singleUnAudit(ProdInOutDTO prodInOutDTO) {
         String pi_class = prodInOutDTO.getPi_class();
         String  pi_inoutno = prodInOutDTO.getPi_inoutno();
         String pi_statuscode = prodInOutDTO.getPi_statuscode();

+ 48 - 0
applications/transfers/mall-api/pom.xml

@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>transfers</artifactId>
+        <groupId>com.usoftchina.saas</groupId>
+        <version>1.0.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>mall-api</artifactId>
+
+    <description>mall api</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-openfeign</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>core</artifactId>
+        </dependency>
+        <!-- test -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper</artifactId>
+            <version>RELEASE</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-redis</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.data</groupId>
+            <artifactId>spring-data-commons</artifactId>
+            <version>RELEASE</version>
+        </dependency>
+    </dependencies>
+
+</project>

+ 110 - 0
applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/api/InquiryApi.java

@@ -0,0 +1,110 @@
+package com.usoftchina.inquiry.api;
+
+import com.usoftchina.inquiry.po.*;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.data.domain.Page;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.*;
+
+@FeignClient(url = "${inquiry.base-url}", name = "inquiry-server")
+@RequestMapping("/inquiry")
+public interface InquiryApi {
+
+    /**
+     * 查看待报价列表(全部)
+     * @param pageNumber
+     * @param pageSize
+     * @return
+     */
+    @GetMapping("/public")
+    IPage<PurcInquiryItemInfo> getInquiry(@RequestParam("pageNumber") int pageNumber, @RequestParam("pageSize") int pageSize,
+                                          @RequestParam("keyword") String keyword, @RequestParam("isLogin") int isLogin);
+
+    /**
+     * 查看待报价列表(企业商机)
+     * @param useruu
+     * @param enuu
+     * @param pageNumber
+     * @param pageSize
+     * @param enableOffer   是否能报价的:1为是 0为否,作为搜索条件。  值为0或null时,筛选所有
+     * @return
+     */
+    @GetMapping("/sale/enremind")
+    IPage<InquiryEnRemind> findEnRemind(@RequestParam("useruu") Long useruu, @RequestParam("enuu") Long enuu,
+                                        @RequestParam("pageNumber") int pageNumber, @RequestParam("pageSize") int pageSize,
+                                        @RequestParam("enableOffer") Integer enableOffer);
+
+    /**
+     * 查看(个人商机)
+     * @param useruu
+     * @param enuu
+     * @param pageNumber
+     * @param pageSize
+     * @param enableOffer   是否能报价的:1为是 0为否,作为搜索条件。  值为0或null时,筛选所有
+     * @param keyword       关键词,做筛选用
+     * @return
+     */
+    @GetMapping("/sale/remind")
+    IPage<InquiryRemind> findByUserInfo(@RequestParam("useruu") Long useruu, @RequestParam("enuu") Long enuu,
+                                        @RequestParam("pageNumber") int pageNumber, @RequestParam("pageSize") int pageSize,
+                                        @RequestParam("enableOffer") Integer enableOffer, @RequestParam("keyword") String keyword);
+
+    /**
+     * 保存报价接口
+     * @param publicInquiryItem 报价单内容
+     * @return
+     */
+    @PostMapping("/sale/item/saveQuote")
+    ModelMap saveQuote(@RequestBody PublicInquiryItem publicInquiryItem);
+
+    /**
+     * 保存更新公共询价单
+     * @param inquiry   询价信息
+     * @return
+     */
+    @PostMapping("/buyer/save")
+    PurcInquiry saveInquiry(@RequestBody PurcInquiry inquiry);
+
+    /**
+     * 通过企业UU和分页参数获取已发布的询价明细
+     * @param enUU
+     * @param overdue
+     * @param pageNumber
+     * @param pageSize
+     * @param state
+     * @return
+     */
+    @GetMapping("/buyer/list")
+    IPage<PurcInquiryItemInfo> getInquiryList(@RequestParam("enUU") Long enUU, @RequestParam("overdue") Integer overdue,
+                                             @RequestParam("pageNumber") int pageNumber, @RequestParam("pageSize") int pageSize,
+                                             @RequestParam("state") String state);
+
+    /*@GetMapping("/buyer/quotations")
+    IPage<PurcInquiryItemInfo> findQuotationsByPage(@RequestParam(value = "state", defaultValue = "done") String state,
+                                                   @RequestParam("enUU") Long enUU,
+                                                   @RequestParam("pageNumber") int pageNumber, @RequestParam("pageSize") int pageSize);
+    */
+
+    /**
+     * 采纳
+     * @param id
+     * @param status    是否采纳:1是 0否
+     * @param enuu      企业uu
+     * @param useruu    用户uu
+     */
+    @PostMapping("/buyer/adopt")
+    void adoptQuote(@RequestParam("id") Long id, @RequestParam("status") Short status,
+                    @RequestParam("enuu") Long enuu, @RequestParam("useruu") Long useruu);
+
+    /**
+     *
+     * @param id        报价明细id
+     * @param status    是否采纳:1是 0否
+     * @param enuu      企业uu
+     * @param useruu    用户uu
+     * @param refusereason  拒绝理由
+     */
+    @PostMapping("/buyer/refuse")
+    void refuseQuote(@RequestParam("id") Long id, @RequestParam("status") Short status, @RequestParam("enuu") Long enuu,
+                     @RequestParam("useruu") Long useruu, @RequestParam("refusereason") String refusereason);
+}

+ 13 - 0
applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/config/InquiryFeignConfig.java

@@ -0,0 +1,13 @@
+package com.usoftchina.inquiry.config;
+
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @Author chenwei
+ * @Date 2019/01/04
+ */
+public class InquiryFeignConfig {
+
+    private String baseUrl;
+
+}

+ 152 - 0
applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/po/Attach.java

@@ -0,0 +1,152 @@
+package com.usoftchina.inquiry.po;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.Objects;
+
+/**
+ * 附件
+ *
+ * @author chenwei
+ * @since 2018/1/13 13:56
+ */
+public class Attach implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    private Long id;
+
+    /**
+     * 路径
+     */
+    private String path;
+
+    /**
+     * 描述语
+     */
+    private String description;
+
+    /**
+     * 文件名称
+     */
+    private String name;
+
+    /**
+     * 文件大小
+     */
+    private Long size;
+
+    /**
+     * 关联的表
+     */
+    private String relatedTable;
+
+    /**
+     * 关联的数据主键值
+     */
+    private Long relatedKey;
+
+    /**
+     * 保存时间
+     */
+    private Date date;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getPath() {
+        return path;
+    }
+
+    public void setPath(String path) {
+        this.path = path;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Long getSize() {
+        return size;
+    }
+
+    public void setSize(Long size) {
+        this.size = size;
+    }
+
+    public String getRelatedTable() {
+        return relatedTable;
+    }
+
+    public void setRelatedTable(String relatedTable) {
+        this.relatedTable = relatedTable;
+    }
+
+    public Long getRelatedKey() {
+        return relatedKey;
+    }
+
+    public void setRelatedKey(Long relatedKey) {
+        this.relatedKey = relatedKey;
+    }
+
+    public Date getDate() {
+        return date;
+    }
+
+    public void setDate(Date date) {
+        this.date = date;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        Attach attach = (Attach) o;
+        return Objects.equals(id, attach.id) &&
+                Objects.equals(path, attach.path) &&
+                Objects.equals(description, attach.description) &&
+                Objects.equals(name, attach.name) &&
+                Objects.equals(size, attach.size) &&
+                Objects.equals(relatedTable, attach.relatedTable) &&
+                Objects.equals(relatedKey, attach.relatedKey) &&
+                Objects.equals(date, attach.date);
+    }
+
+    @Override
+    public int hashCode() {
+
+        return Objects.hash(id, path, description, name, size, relatedTable, relatedKey, date);
+    }
+
+    @Override
+    public String toString() {
+        return "Attach{" +
+                "id=" + id +
+                ", path='" + path + '\'' +
+                ", description='" + description + '\'' +
+                ", name='" + name + '\'' +
+                ", size=" + size +
+                ", relatedTable='" + relatedTable + '\'' +
+                ", relatedKey=" + relatedKey +
+                ", date=" + date +
+                '}';
+    }
+}

+ 106 - 0
applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/po/Enterprise.java

@@ -0,0 +1,106 @@
+package com.usoftchina.inquiry.po;
+
+import java.io.Serializable;
+
+/**
+ * 企业信息,询价所有信息存在公共服务,这里需要关联企业信息
+ *
+ * chenwei
+ */
+public class Enterprise implements Serializable {
+
+    /**
+     * 序列号
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * uu号
+     */
+    private Long uu;
+
+    /**
+     * 公司名称
+     */
+    private String enName;
+
+    /**
+     * 公司电话
+     */
+    private String enTel;
+
+    /**
+     * 注册地址
+     */
+    private String enAddress;
+
+    /**
+     * 营业执照号
+     */
+    private  String businesscode;
+
+    /**
+     * 企业管理员UU
+     */
+    private Long adminUU;
+
+    public Long getUu() {
+        return uu;
+    }
+
+    public void setUu(Long uu) {
+        this.uu = uu;
+    }
+
+    public String getEnName() {
+        return enName;
+    }
+
+    public void setEnName(String enName) {
+        this.enName = enName;
+    }
+
+    public String getEnTel() {
+        return enTel;
+    }
+
+    public void setEnTel(String enTel) {
+        this.enTel = enTel;
+    }
+
+    public String getEnAddress() {
+        return enAddress;
+    }
+
+    public void setEnAddress(String enAddress) {
+        this.enAddress = enAddress;
+    }
+
+    public String getBusinesscode() {
+        return businesscode;
+    }
+
+    public void setBusinesscode(String businesscode) {
+        this.businesscode = businesscode;
+    }
+
+    public Long getAdminUU() {
+        return adminUU;
+    }
+
+    public void setAdminUU(Long adminUU) {
+        this.adminUU = adminUU;
+    }
+
+    @Override
+    public String toString() {
+        return "Enterprise{" +
+                "uu=" + uu +
+                ", enName='" + enName + '\'' +
+                ", enTel='" + enTel + '\'' +
+                ", enAddress='" + enAddress + '\'' +
+                ", businesscode='" + businesscode + '\'' +
+                ", adminUU=" + adminUU +
+                '}';
+    }
+}

+ 63 - 0
applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/po/IPage.java

@@ -0,0 +1,63 @@
+package com.usoftchina.inquiry.po;
+
+import java.io.Serializable;
+import java.util.List;
+
+public class IPage<T> implements Serializable {
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = -6338331260909724178L;
+    private int number;
+    private int size;
+    private int numberOfElements;
+    private List<T> content;
+    private boolean first;
+    private boolean last;
+    private long totalElements;
+
+    public long getTotalElements() {
+        return totalElements;
+    }
+    public void setTotalElements(long totalElements) {
+        this.totalElements = totalElements;
+    }
+    public int getNumber() {
+        return number;
+    }
+    public void setNumber(int number) {
+        this.number = number;
+    }
+    public int getSize() {
+        return size;
+    }
+    public void setSize(int size) {
+        this.size = size;
+    }
+    public int getNumberOfElements() {
+        return numberOfElements;
+    }
+    public void setNumberOfElements(int numberOfElements) {
+        this.numberOfElements = numberOfElements;
+    }
+    public List<T> getContent() {
+        return content;
+    }
+    public void setContent(List<T> content) {
+        this.content = content;
+    }
+    public boolean isFirst() {
+        return first;
+    }
+    public void setFirst(boolean first) {
+        this.first = first;
+    }
+    public boolean isLast() {
+        return last;
+    }
+    public void setLast(boolean last) {
+        this.last = last;
+    }
+
+}

+ 362 - 0
applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/po/InquiryEnRemind.java

@@ -0,0 +1,362 @@
+package com.usoftchina.inquiry.po;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 针对用户的询价企业推荐提醒
+ *
+ * Created by lisuw on 2018-01-31.
+ */
+public class InquiryEnRemind implements Serializable {
+
+    /**
+     * default serialVersionUID
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * id
+     */
+    private Long id;
+
+    /**
+     * 询价单号
+     */
+    private String code;
+
+    /**
+     * 询价企业名称
+     */
+    private String enName;
+
+    /**
+     * 询价企业UU
+     */
+    private Long enUU;
+
+    /**
+     * 联系人
+     */
+    private String userName;
+
+    /**
+     * 联系方式
+     */
+    private String userTel;
+
+    /* ********************* 物料信息start***************************** */
+
+    /**
+     * 询价品牌
+     */
+    private String brand;
+
+    /**
+     * 询价品牌
+     */
+    private String inbrand;
+
+    /**
+     * 原厂型号
+     */
+    private String cmpCode;
+
+    /**
+     * 物料规格
+     */
+    private String spec;
+
+    /**
+     * 物料名称
+     */
+    private String prodTitle;
+
+    /* ********************* 物料信息end***************************** */
+
+    /**
+     * 需求数量
+     */
+    private Double needQty;
+
+    /**
+     * 发布日期
+     */
+    private Date reDate;
+
+    /**
+     * 截止日期
+     */
+    private Date endDate;
+
+    /**
+     * 记录来源公共询价询价明细id
+     */
+    private Long itemId;
+
+    /**
+     * 记录来源公共询价询价单id
+     */
+    private Long inid;
+
+    /**
+     * 询价单信息
+     */
+    private PurcInquiry inquiry;
+
+    /**
+     * 记录转报价后的明细id
+     */
+    private Long newId;
+
+    /**
+     * 单据状态
+     * <note>
+     * {@code 100 在录入}
+     * {@code 101 已提交}
+     * {@code 102 已审核}
+     * {@code 103 未通过}
+     * {@code 104 已通过}
+     * </note>
+     */
+    private Integer status;
+
+    /**
+     * 被推荐的企业UU
+     */
+    private Long vendUU;
+
+//    /**
+//     * 被推荐的人员UU
+//     */
+//    @Column(name = "ir_venduseruu")
+//    private Long vendUserUU;
+
+    /**
+     * 是否已包含在个人商机 1是  0 否
+     */
+    private Integer remindStatus;
+
+    /**
+     * 记录日期
+     */
+    private Date date;
+
+    /**
+     * 剩余时间
+     */
+    private Long remainingTime;
+
+    /**
+     * 报价单详情
+     */
+    private PublicInquiryItem quotation;
+
+    /**
+     * erp下载状态 202  待上传 203 已下载
+     */
+    private Short erpDownStatus = 202;
+
+    public String getInbrand() {
+        return inbrand;
+    }
+
+    public void setInbrand(String inbrand) {
+        this.inbrand = inbrand;
+    }
+
+    public Long getRemainingTime() {
+        if (null != endDate) {
+            return endDate.getTime() - System.currentTimeMillis();
+        }
+        return null;
+    }
+
+    public Long getInid() {
+        return inid;
+    }
+
+    public void setInid(Long inid) {
+        this.inid = inid;
+    }
+
+    public PurcInquiry getInquiry() {
+        return inquiry;
+    }
+
+    public void setInquiry(PurcInquiry inquiry) {
+        this.inquiry = inquiry;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getEnName() {
+        return enName;
+    }
+
+    public void setEnName(String enName) {
+        this.enName = enName;
+    }
+
+    public Long getEnUU() {
+        return enUU;
+    }
+
+    public void setEnUU(Long enUU) {
+        this.enUU = enUU;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getUserTel() {
+        return userTel;
+    }
+
+    public void setUserTel(String userTel) {
+        this.userTel = userTel;
+    }
+
+    public String getBrand() {
+        return brand;
+    }
+
+    public void setBrand(String brand) {
+        this.brand = brand;
+    }
+
+    public String getCmpCode() {
+        return cmpCode;
+    }
+
+    public void setCmpCode(String cmpCode) {
+        this.cmpCode = cmpCode;
+    }
+
+    public String getSpec() {
+        return spec;
+    }
+
+    public void setSpec(String spec) {
+        this.spec = spec;
+    }
+
+    public String getProdTitle() {
+        return prodTitle;
+    }
+
+    public void setProdTitle(String prodTitle) {
+        this.prodTitle = prodTitle;
+    }
+
+    public Double getNeedQty() {
+        return needQty;
+    }
+
+    public void setNeedQty(Double needQty) {
+        this.needQty = needQty;
+    }
+
+    public Date getReDate() {
+        return reDate;
+    }
+
+    public void setReDate(Date reDate) {
+        this.reDate = reDate;
+    }
+
+    public Date getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(Date endDate) {
+        this.endDate = endDate;
+    }
+
+    public Long getItemId() {
+        return itemId;
+    }
+
+    public void setItemId(Long itemId) {
+        this.itemId = itemId;
+    }
+
+    public Long getNewId() {
+        return newId;
+    }
+
+    public void setNewId(Long newId) {
+        this.newId = newId;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public Long getVendUU() {
+        return vendUU;
+    }
+
+    public void setVendUU(Long vendUU) {
+        this.vendUU = vendUU;
+    }
+
+    public Date getDate() {
+        return date;
+    }
+
+    public void setDate(Date date) {
+        this.date = date;
+    }
+
+    public Integer getRemindStatus() {
+        return remindStatus;
+    }
+
+    public void setRemindStatus(Integer remindStatus) {
+        this.remindStatus = remindStatus;
+    }
+
+    public void setRemainingTime(Long remainingTime) {
+        this.remainingTime = remainingTime;
+    }
+
+    public PublicInquiryItem getQuotation() {
+        return quotation;
+    }
+
+    public void setQuotation(PublicInquiryItem quotation) {
+        this.quotation = quotation;
+    }
+
+    public Short getErpDownStatus() {
+        return erpDownStatus;
+    }
+
+    public void setErpDownStatus(Short erpDownStatus) {
+        this.erpDownStatus = erpDownStatus;
+    }
+}

+ 356 - 0
applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/po/InquiryRemind.java

@@ -0,0 +1,356 @@
+package com.usoftchina.inquiry.po;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 针对用户的询价推荐提醒
+ *
+ * Created by hejq on 2018-01-31.
+ */
+public class InquiryRemind implements Serializable {
+
+    /**
+     * default serialVersionUID
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * id
+     */
+    private Long id;
+
+    /**
+     * 询价单号
+     */
+    private String code;
+
+    /**
+     * 询价企业名称
+     */
+    private String enName;
+
+    /**
+     * 询价企业UU
+     */
+    private Long enUU;
+
+    /**
+     * 联系人
+     */
+    private String userName;
+
+    /**
+     * 联系方式
+     */
+    private String userTel;
+
+    /* ********************* 物料信息start***************************** */
+
+    /**
+     * 询价品牌
+     */
+    private String brand;
+
+    /**
+     * 询价品牌
+     */
+    private String inbrand;
+
+    /**
+     * 原厂型号
+     */
+    private String cmpCode;
+
+    /**
+     * 物料规格
+     */
+    private String spec;
+
+    /**
+     * 物料名称
+     */
+    private String prodTitle;
+
+    /* ********************* 物料信息end***************************** */
+
+    /**
+     * 需求数量
+     */
+    private Double needQty;
+
+    /**
+     * 发布日期
+     */
+    private Date reDate;
+
+    /**
+     * 截止日期
+     */
+    private Date endDate;
+
+    /**
+     * 记录来源公共询价询价明细id
+     */
+    private Long itemId;
+
+    /**
+     * 记录来源公共询价询价单id
+     */
+    private Long inid;
+
+    /**
+     * 询价单信息
+     */
+    private PurcInquiry inquiry;
+
+    /**
+     * 记录转报价后的明细id
+     */
+    private Long newId;
+
+    /**
+     * 单据状态
+     * <note>
+     * {@code 100 在录入}
+     * {@code 101 已提交}
+     * {@code 102 已审核}
+     * {@code 103 未通过}
+     * {@code 104 已通过}
+     * </note>
+     */
+    private Integer status;
+
+    /**
+     * 被推荐的企业UU
+     */
+    private Long vendUU;
+
+    /**
+     * 被推荐的人员UU
+     */
+    private Long vendUserUU;
+
+    /**
+     * 记录日期
+     */
+    private Date date;
+
+    /**
+     * 剩余时间
+     */
+    private Long remainingTime;
+
+    /**
+     * 报价单详情
+     */
+    private PublicInquiryItem quotation;
+
+    /**
+     * 发送消息时,记录条数
+     */
+    private Integer counts;
+
+    public String getInbrand() {
+        return inbrand;
+    }
+
+    public void setInbrand(String inbrand) {
+        this.inbrand = inbrand;
+    }
+
+    public Long getRemainingTime() {
+        if (null != endDate) {
+            return endDate.getTime() - System.currentTimeMillis();
+        }
+        return null;
+    }
+
+    public Long getInid() {
+        return inid;
+    }
+
+    public void setInid(Long inid) {
+        this.inid = inid;
+    }
+
+    public PurcInquiry getInquiry() {
+        return inquiry;
+    }
+
+    public void setInquiry(PurcInquiry inquiry) {
+        this.inquiry = inquiry;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getEnName() {
+        return enName;
+    }
+
+    public void setEnName(String enName) {
+        this.enName = enName;
+    }
+
+    public Long getEnUU() {
+        return enUU;
+    }
+
+    public void setEnUU(Long enUU) {
+        this.enUU = enUU;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getUserTel() {
+        return userTel;
+    }
+
+    public void setUserTel(String userTel) {
+        this.userTel = userTel;
+    }
+
+    public String getBrand() {
+        return brand;
+    }
+
+    public void setBrand(String brand) {
+        this.brand = brand;
+    }
+
+    public String getCmpCode() {
+        return cmpCode;
+    }
+
+    public void setCmpCode(String cmpCode) {
+        this.cmpCode = cmpCode;
+    }
+
+    public String getSpec() {
+        return spec;
+    }
+
+    public void setSpec(String spec) {
+        this.spec = spec;
+    }
+
+    public String getProdTitle() {
+        return prodTitle;
+    }
+
+    public void setProdTitle(String prodTitle) {
+        this.prodTitle = prodTitle;
+    }
+
+    public Double getNeedQty() {
+        return needQty;
+    }
+
+    public void setNeedQty(Double needQty) {
+        this.needQty = needQty;
+    }
+
+    public Date getReDate() {
+        return reDate;
+    }
+
+    public void setReDate(Date reDate) {
+        this.reDate = reDate;
+    }
+
+    public Date getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(Date endDate) {
+        this.endDate = endDate;
+    }
+
+    public Long getItemId() {
+        return itemId;
+    }
+
+    public void setItemId(Long itemId) {
+        this.itemId = itemId;
+    }
+
+    public Long getNewId() {
+        return newId;
+    }
+
+    public void setNewId(Long newId) {
+        this.newId = newId;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public Long getVendUU() {
+        return vendUU;
+    }
+
+    public void setVendUU(Long vendUU) {
+        this.vendUU = vendUU;
+    }
+
+    public Long getVendUserUU() {
+        return vendUserUU;
+    }
+
+    public void setVendUserUU(Long vendUserUU) {
+        this.vendUserUU = vendUserUU;
+    }
+
+    public Date getDate() {
+        return date;
+    }
+
+    public void setDate(Date date) {
+        this.date = date;
+    }
+
+    public void setRemainingTime(Long remainingTime) {
+        this.remainingTime = remainingTime;
+    }
+
+    public PublicInquiryItem getQuotation() {
+        return quotation;
+    }
+
+    public void setQuotation(PublicInquiryItem quotation) {
+        this.quotation = quotation;
+    }
+
+    public Integer getCounts() {
+        return counts;
+    }
+
+    public void setCounts(Integer counts) {
+        this.counts = counts;
+    }
+}

+ 724 - 0
applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/po/Product.java

@@ -0,0 +1,724 @@
+package com.usoftchina.inquiry.po;
+
+import java.util.Date;
+import java.util.Set;
+
+/**
+ * 商品信息
+ *
+ * @author chenwei
+ *
+ */
+public class Product {
+
+    private Long id;
+
+    /**
+     * 商品信息标题
+     */
+    private String title;
+
+    /**
+     * 产品编号
+     */
+    private String code;
+
+    /**
+     * 产品规格
+     */
+    private String spec;
+
+    /**
+     * 单位
+     */
+    private String unit;
+
+    /**
+     * 所属企业UU
+     */
+    private Long enUU;
+
+    /**
+     * 个人UU
+     */
+    private Long userUU;
+
+    /**
+     * 最小包装量
+     */
+    private Double minPack;
+
+    /**
+     * 最小采购量
+     */
+    private Double minOrder;
+
+    /**
+     * 采购提前期
+     */
+    private Double leadtime;
+
+    /**
+     * 备货提前期(天数)
+     */
+    private Double ltinstock;
+
+    /**
+     * 价格
+     */
+    private Double price;
+
+    /**
+     * 品牌(ERP)
+     */
+    private String brand;
+
+    /**
+     * 买方ERP物料ID
+     */
+    private Long sourceId;
+
+    /**
+     * 保存erp传入数据的时间
+     *
+     * @return
+     */
+    private Date erpDate;
+
+    /**
+     * 原厂型号(erp)
+     *
+     * @return
+     */
+    private String cmpCode;
+
+    /**
+     * UUID 标准料号
+     *
+     * @return
+     */
+    private String cmpUuId;
+
+    /**
+     * 应用来源<br>
+     * 平台上传的为可以销售的
+     *
+     * @return
+     */
+    private String sourceApp;
+
+    /**
+     * 是否可卖<br>
+     * 1. 可以卖 <br>
+     * 0. 不可
+     */
+    private Short isSale;
+
+    /**
+     * 是否可买<br>
+     * 1. 可以买<br>
+     * 0. 不可
+     */
+    private Short isPurchase;
+
+    /**
+     * 公开展示<br>
+     *
+     * 1. 是<br>
+     * 0. 否
+     */
+    private Short isShow;
+
+    /**
+     * 公开销售 <br>
+     * 1. 是<br>
+     * 0. 否
+     */
+    private Short isPubsale;
+
+    /**
+     * 附件
+     */
+    private String attachment;
+
+    /**
+     * 类目(平台)(中文)
+     */
+    private String kind;
+
+    /**
+     * 品牌(平台)(中文)
+     */
+    private String pbrand;
+
+    /**
+     * 型号(平台)
+     */
+    private String pcmpcode;
+
+    /**
+     * 是否是标准物料<br>
+     * 1.YES<br>
+     * 0.NO
+     */
+    private Short standard;
+
+    /**
+     * 类目(平台)(英文)
+     */
+    private String kinden;
+
+    /**
+     * 品牌(平台)(英文)
+     */
+    private String pbranden;
+
+    /**
+     * 匹配状态(记录匹配状态,方便下次查看)
+     */
+    private Integer matchstatus;
+
+    /**
+     * 匹配数量(用作排序)
+     */
+    private Integer matchsize;
+
+    /**
+     * 匹配结果
+     */
+    private Set<ProductMatchResult> matchresults;
+
+    /**
+     * 下载状态,平台更新ERP的数据后,将数据回传回ERP更新
+     */
+    private Integer downloadstatus;
+
+    /**
+     * 图片
+     */
+    private String img;
+
+    /**
+     * 封装
+     */
+    private String encapsulation;
+
+    /**
+     * 匹配成标准的日期
+     */
+    private Date tostandard;
+
+    /**
+     * 编码版本号
+     */
+    private String goodsnover;
+
+    /**
+     * 税收分类编码
+     */
+    private String goodstaxno;
+
+    /**
+     * 是否享受优惠政策
+     */
+    private String taxpre;
+
+    /**
+     * 享受优惠政策内容
+     */
+    private String taxprecon;
+
+    /**
+     * ERP库存
+     */
+    private Double reserve;
+
+    /**
+     * 标准类目id
+     */
+    private Long kindId;
+
+    /**
+     * 标准品牌id
+     */
+    private Long pbrandId;
+
+    /**
+     * 标准品牌uuid
+     */
+    private String pbrandUuid;
+
+    /**
+     * 包装方式
+     */
+    private String packaging;
+
+    /**
+     * 产品建立时间
+     */
+    private Date createTime;
+
+    /**
+     * 产品生产日期
+     */
+    private String manufactureDate;
+
+    /**
+     * 最大交期
+     */
+    private Short maxDelivery;
+
+    /**
+     * 最小交期
+     */
+    private Short minDelivery;
+
+    /**
+     * 是否可拆卖
+     */
+    private Boolean isBreakUp;
+
+    /**
+     * b2b物料禁用状态
+     */
+    private Short b2bDisabled;
+
+    /**
+     * 公共库启用状态
+     * 1: 启用
+     * 0: 禁用
+     */
+    private Short b2cEnabled;
+
+    /**
+     * 匹配的料号(买方)(用于供应商推荐接口匹配状态)
+     */
+    private String ifMatched;
+
+    public Product() {
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getSpec() {
+        return spec;
+    }
+
+    public void setSpec(String spec) {
+        this.spec = spec;
+    }
+
+    public String getUnit() {
+        return unit;
+    }
+
+    public void setUnit(String unit) {
+        this.unit = unit;
+    }
+
+    public Long getEnUU() {
+        return enUU;
+    }
+
+    public void setEnUU(Long enUU) {
+        this.enUU = enUU;
+    }
+
+    public Long getUserUU() {
+        return userUU;
+    }
+
+    public void setUserUU(Long userUU) {
+        this.userUU = userUU;
+    }
+
+    public Double getMinPack() {
+        return minPack;
+    }
+
+    public void setMinPack(Double minPack) {
+        this.minPack = minPack;
+    }
+
+    public Double getMinOrder() {
+        return minOrder;
+    }
+
+    public void setMinOrder(Double minOrder) {
+        this.minOrder = minOrder;
+    }
+
+    public Double getLeadtime() {
+        return leadtime;
+    }
+
+    public void setLeadtime(Double leadtime) {
+        this.leadtime = leadtime;
+    }
+
+    public Double getPrice() {
+        return price;
+    }
+
+    public void setPrice(Double price) {
+        this.price = price;
+    }
+
+    public String getBrand() {
+        return brand;
+    }
+
+    public void setBrand(String brand) {
+        this.brand = brand;
+    }
+
+    public Double getLtinstock() {
+        return ltinstock;
+    }
+
+    public void setLtinstock(Double ltinstock) {
+        this.ltinstock = ltinstock;
+    }
+
+    public Long getSourceId() {
+        return sourceId;
+    }
+
+    public void setSourceId(Long sourceId) {
+        this.sourceId = sourceId;
+    }
+
+    public Date getErpDate() {
+        return erpDate;
+    }
+
+    public void setErpDate(Date erpDate) {
+        this.erpDate = erpDate;
+    }
+
+    public String getCmpCode() {
+        return cmpCode;
+    }
+
+    public void setCmpCode(String cmpCode) {
+        this.cmpCode = cmpCode;
+    }
+
+    public String getCmpUuId() {
+        return cmpUuId;
+    }
+
+    public void setCmpUuId(String cmpUuId) {
+        this.cmpUuId = cmpUuId;
+    }
+
+    public String getSourceApp() {
+        return sourceApp;
+    }
+
+    public void setSourceApp(String sourceApp) {
+        this.sourceApp = sourceApp;
+    }
+
+    public Short getIsSale() {
+        return isSale;
+    }
+
+    public void setIsSale(Short isSale) {
+        this.isSale = isSale;
+    }
+
+    public Short getIsPurchase() {
+        return isPurchase;
+    }
+
+    public void setIsPurchase(Short isPurchase) {
+        this.isPurchase = isPurchase;
+    }
+
+    public Short getIsShow() {
+        return isShow;
+    }
+
+    public void setIsShow(Short isShow) {
+        this.isShow = isShow;
+    }
+
+    public Short getIsPubsale() {
+        return isPubsale;
+    }
+
+    public void setIsPubsale(Short isPubsale) {
+        this.isPubsale = isPubsale;
+    }
+
+    public String getKind() {
+        return kind;
+    }
+
+    public void setKind(String kind) {
+        this.kind = kind;
+    }
+
+    public String getPbrand() {
+        return pbrand;
+    }
+
+    public void setPbrand(String pbrand) {
+        this.pbrand = pbrand;
+    }
+
+    public String getPcmpcode() {
+        return pcmpcode;
+    }
+
+    public void setPcmpcode(String pcmpcode) {
+        this.pcmpcode = pcmpcode;
+    }
+
+    public Short getStandard() {
+        return standard;
+    }
+
+    public void setStandard(Short standard) {
+        this.standard = standard;
+    }
+
+    public String getKinden() {
+        return kinden;
+    }
+
+    public void setKinden(String kinden) {
+        this.kinden = kinden;
+    }
+
+    public String getPbranden() {
+        return pbranden;
+    }
+
+    public void setPbranden(String pbranden) {
+        this.pbranden = pbranden;
+    }
+
+    public Integer getMatchstatus() {
+        return matchstatus;
+    }
+
+    public void setMatchstatus(Integer matchstatus) {
+        this.matchstatus = matchstatus;
+    }
+
+    public Integer getMatchsize() {
+        return matchsize;
+    }
+
+    public void setMatchsize(Integer matchsize) {
+        this.matchsize = matchsize;
+    }
+
+    public Set<ProductMatchResult> getMatchresults() {
+        return matchresults;
+    }
+
+    public void setMatchresults(Set<ProductMatchResult> matchresults) {
+        this.matchresults = matchresults;
+    }
+
+    public Integer getDownloadstatus() {
+        return downloadstatus;
+    }
+
+    public void setDownloadstatus(Integer downloadstatus) {
+        this.downloadstatus = downloadstatus;
+    }
+
+    public String getImg() {
+        return img;
+    }
+
+    public void setImg(String img) {
+        this.img = img;
+    }
+
+    public String getEncapsulation() {
+        return encapsulation;
+    }
+
+    public void setEncapsulation(String encapsulation) {
+        this.encapsulation = encapsulation;
+    }
+
+    public Date getTostandard() {
+        return tostandard;
+    }
+
+    public void setTostandard(Date tostandard) {
+        this.tostandard = tostandard;
+    }
+
+    public String getGoodsnover() {
+        return goodsnover;
+    }
+
+    public void setGoodsnover(String goodsnover) {
+        this.goodsnover = goodsnover;
+    }
+
+    public String getGoodstaxno() {
+        return goodstaxno;
+    }
+
+    public void setGoodstaxno(String goodstaxno) {
+        this.goodstaxno = goodstaxno;
+    }
+
+    public String getTaxpre() {
+        return taxpre;
+    }
+
+    public void setTaxpre(String taxpre) {
+        this.taxpre = taxpre;
+    }
+
+    public String getTaxprecon() {
+        return taxprecon;
+    }
+
+    public void setTaxprecon(String taxprecon) {
+        this.taxprecon = taxprecon;
+    }
+
+    public String getAttachment() {
+        return attachment;
+    }
+
+    public void setAttachment(String attachment) {
+        this.attachment = attachment;
+    }
+
+    public Double getReserve() {
+        return reserve;
+    }
+
+    public void setReserve(Double reserve) {
+        this.reserve = reserve;
+    }
+
+    public Long getKindId() {
+        return kindId;
+    }
+
+    public void setKindId(Long kindId) {
+        this.kindId = kindId;
+    }
+
+    public Long getPbrandId() {
+        return pbrandId;
+    }
+
+    public void setPbrandId(Long pbrandId) {
+        this.pbrandId = pbrandId;
+    }
+
+    public String getPbrandUuid() {
+        return pbrandUuid;
+    }
+
+    public void setPbrandUuid(String pbrandUuid) {
+        this.pbrandUuid = pbrandUuid;
+    }
+
+    public String getPackaging() {
+        return packaging;
+    }
+
+    public void setPackaging(String packaging) {
+        this.packaging = packaging;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getManufactureDate() {
+        return manufactureDate;
+    }
+
+    public void setManufactureDate(String manufactureDate) {
+        this.manufactureDate = manufactureDate;
+    }
+
+    public Short getMaxDelivery() {
+        return maxDelivery;
+    }
+
+    public void setMaxDelivery(Short maxDelivery) {
+        this.maxDelivery = maxDelivery;
+    }
+
+    public Short getMinDelivery() {
+        return minDelivery;
+    }
+
+    public void setMinDelivery(Short minDelivery) {
+        this.minDelivery = minDelivery;
+    }
+
+    public Boolean getBreakUp() {
+        return isBreakUp;
+    }
+
+    public void setBreakUp(Boolean breakUp) {
+        isBreakUp = breakUp;
+    }
+
+    public Short getB2bDisabled() {
+        return b2bDisabled;
+    }
+
+    public void setB2bDisabled(Short b2bDisabled) {
+        this.b2bDisabled = b2bDisabled;
+    }
+
+    public Short getB2cEnabled() {
+        return b2cEnabled;
+    }
+
+    public void setB2cEnabled(Short b2cEnabled) {
+        this.b2cEnabled = b2cEnabled;
+    }
+
+    public String getIfMatched() {
+        return ifMatched;
+    }
+
+    public void setIfMatched(String ifMatched) {
+        this.ifMatched = ifMatched;
+    }
+}

+ 224 - 0
applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/po/ProductMatchResult.java

@@ -0,0 +1,224 @@
+package com.usoftchina.inquiry.po;
+
+
+import java.io.Serializable;
+
+/**
+ * 物料匹配结果
+ *
+ * @author hejq
+ * @date 2018-08-21 12:21
+ */
+public class ProductMatchResult implements Serializable {
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = 1L;
+
+    private Long id;
+
+    /**
+     * 产品id
+     */
+    private Long prid;
+
+    /**
+     * 产品
+     */
+    private Product product;
+
+    /**
+     * 序号
+     */
+    private Short number;
+
+    /**
+     * 品牌id
+     */
+    private Long brid;
+
+    /**
+     * 品牌英文
+     */
+    private String branden;
+
+    /**
+     * 品牌中文
+     */
+    private String brandcn;
+
+    /**
+     * 类目id
+     */
+    private Long kindid;
+
+    /**
+     * 类目英文
+     */
+    private String kinden;
+
+    /**
+     * 类目中文
+     */
+    private String kindcn;
+
+    /**
+     * uuid
+     */
+    private String uuid;
+
+    /**
+     * 器件id
+     */
+    private Long cmpid;
+
+    /**
+     * 原厂型号
+     */
+    private String cmpcode;
+
+    /**
+     * 企业uu
+     */
+    private Long enuu;
+
+    /**
+     * 图片
+     */
+    private String img;
+
+    /**
+     * 包装
+     */
+    private String encapsulation;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getPrid() {
+        return prid;
+    }
+
+    public void setPrid(Long prid) {
+        this.prid = prid;
+    }
+
+    public Product getProduct() {
+        return product;
+    }
+
+    public void setProduct(Product product) {
+        this.product = product;
+    }
+
+    public Short getNumber() {
+        return number;
+    }
+
+    public void setNumber(Short number) {
+        this.number = number;
+    }
+
+    public String getBranden() {
+        return branden;
+    }
+
+    public void setBranden(String branden) {
+        this.branden = branden;
+    }
+
+    public String getBrandcn() {
+        return brandcn;
+    }
+
+    public void setBrandcn(String brandcn) {
+        this.brandcn = brandcn;
+    }
+
+    public String getKinden() {
+        return kinden;
+    }
+
+    public void setKinden(String kinden) {
+        this.kinden = kinden;
+    }
+
+    public String getKindcn() {
+        return kindcn;
+    }
+
+    public void setKindcn(String kindcn) {
+        this.kindcn = kindcn;
+    }
+
+    public String getUuid() {
+        return uuid;
+    }
+
+    public void setUuid(String uuid) {
+        this.uuid = uuid;
+    }
+
+    public String getCmpcode() {
+        return cmpcode;
+    }
+
+    public void setCmpcode(String cmpcode) {
+        this.cmpcode = cmpcode;
+    }
+
+    public Long getBrid() {
+        return brid;
+    }
+
+    public void setBrid(Long brid) {
+        this.brid = brid;
+    }
+
+    public Long getKindid() {
+        return kindid;
+    }
+
+    public void setKindid(Long kindid) {
+        this.kindid = kindid;
+    }
+
+    public Long getCmpid() {
+        return cmpid;
+    }
+
+    public void setCmpid(Long cmpid) {
+        this.cmpid = cmpid;
+    }
+
+    public Long getEnuu() {
+        return enuu;
+    }
+
+    public void setEnuu(Long enuu) {
+        this.enuu = enuu;
+    }
+
+    public String getImg() {
+        return img;
+    }
+
+    public void setImg(String img) {
+        this.img = img;
+    }
+
+    public String getEncapsulation() {
+        return encapsulation;
+    }
+
+    public void setEncapsulation(String encapsulation) {
+        this.encapsulation = encapsulation;
+    }
+
+}

+ 311 - 0
applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/po/PublicInquiry.java

@@ -0,0 +1,311 @@
+package com.usoftchina.inquiry.po;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * 公共询价单主表
+ *    <pre>
+ *        这里是公共询价转成报价后存的数据信息,与以前的采购询价分开
+ *    </pre>
+ * @author hejq 2018-01-06
+ */
+public class PublicInquiry implements Serializable {
+
+    /**
+     * 序列
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * id
+     */
+    private Long id;
+
+    /**
+     * 询价单所属企业UU
+     */
+    private Long enUU;
+
+    /**
+     * 企业名称(方便搜索)
+     */
+    private String enName;
+
+    /**
+     * 询价企业信息
+     */
+    private Enterprise enterprise;
+
+    /**
+     * 询价单所属用户UU
+     */
+    private Long recorderUU;
+
+    /**
+     * 流水号
+     */
+    private String code;
+
+    /**
+     * 单据归属日期
+     */
+    private Date date;
+
+    /**
+     * 录入人
+     */
+    private String recorder;
+
+    /**
+     * 报价截止日期
+     */
+    private Date endDate;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 环保要求
+     */
+    private String environment;
+
+    /**
+     * 询价明细
+     */
+    private Set<PublicInquiryItem> inquiryItems;
+
+    /**
+     * 来源系统单据ID
+     */
+    private Long sourceId;
+
+    /**
+     * 附件
+     */
+    private Set<Attach> attachs;
+
+    /**
+     * 是否过期 1 为过期 否则为未过期
+     */
+    private Short overdue;
+
+    /**
+     * 应用来源,主要是为了平台公共询价做处理
+     */
+    private String sourceApp;
+
+    /**
+     * 收货地址
+     */
+    private String ship;
+
+    /**
+     * 是否开票<br>
+     * 1. 是<br>
+     * 0. 否
+     */
+    private Short invoice;
+
+    /**
+     * 询价类型
+     */
+    private String inquirytype;
+
+    private Long quteId;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public Date getDate() {
+        return date;
+    }
+
+    public void setDate(Date date) {
+        this.date = date;
+    }
+
+    public String getRecorder() {
+        return recorder;
+    }
+
+    public void setRecorder(String recorder) {
+        this.recorder = recorder;
+    }
+
+    public Date getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(Date endDate) {
+        this.endDate = endDate;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public Long getEnUU() {
+        return enUU;
+    }
+
+    public void setEnUU(Long enUU) {
+        this.enUU = enUU;
+    }
+
+    public String getEnName() {
+        return enName;
+    }
+
+    public void setEnName(String enName) {
+        this.enName = enName;
+    }
+
+    public Enterprise getEnterprise() {
+        return enterprise;
+    }
+
+    public void setEnterprise(Enterprise enterprise) {
+        this.enterprise = enterprise;
+    }
+
+    public Long getRecorderUU() {
+        return recorderUU;
+    }
+
+    public void setRecorderUU(Long recorderUU) {
+        this.recorderUU = recorderUU;
+    }
+
+    public Long getSourceId() {
+        return sourceId;
+    }
+
+    public void setSourceId(Long sourceId) {
+        this.sourceId = sourceId;
+    }
+
+    public Set<PublicInquiryItem> getInquiryItems() {
+        return inquiryItems;
+    }
+
+    public void setInquiryItems(Set<PublicInquiryItem> inquiryItems) {
+        this.inquiryItems = inquiryItems;
+    }
+
+    public Set<Attach> getAttachs() {
+        return attachs;
+    }
+
+    public void setAttachs(Set<Attach> attachs) {
+        this.attachs = attachs;
+    }
+
+    public String getEnvironment() {
+        return environment;
+    }
+
+    public void setEnvironment(String environment) {
+        this.environment = environment;
+    }
+
+    public Short getOverdue() {
+        return overdue;
+    }
+
+    public void setOverdue(Short overdue) {
+        this.overdue = overdue;
+    }
+
+    public String getSourceApp() {
+        return sourceApp;
+    }
+
+    public void setSourceApp(String sourceApp) {
+        this.sourceApp = sourceApp;
+    }
+
+    public String getShip() {
+        return ship;
+    }
+
+    public void setShip(String ship) {
+        this.ship = ship;
+    }
+
+    public Short getInvoice() {
+        return invoice;
+    }
+
+    public void setInvoice(Short invoice) {
+        this.invoice = invoice;
+    }
+
+    public String getInquirytype() {
+        return inquirytype;
+    }
+
+    public void setInquirytype(String inquirytype) {
+        this.inquirytype = inquirytype;
+    }
+
+    public Long getQuteId() {
+        return quteId;
+    }
+
+    public void setQuteId(Long quteId) {
+        this.quteId = quteId;
+    }
+
+    public PublicInquiry() {
+    }
+
+    public PublicInquiry(PurcInquiryInfo inquiry) {
+        if (null != inquiry.getAttachs()) {
+            Set<Attach> attachSet = new HashSet<Attach>();
+            Attach attach = new Attach();
+            for (Attach att : inquiry.getAttachs()) {
+                attach.setDate(att.getDate());
+                attach.setDescription(att.getDescription());
+                attach.setName(att.getName());
+                attach.setPath(att.getPath());
+                attach.setSize(att.getSize());
+                attachSet.add(attach);
+            }
+            this.attachs = attachSet;
+        }
+        this.code = inquiry.getCode();
+        this.date = inquiry.getDate();
+        this.endDate = inquiry.getEndDate();
+        this.enUU = inquiry.getEnUU();
+        this.environment = inquiry.getEnvironment();
+        this.inquirytype = inquiry.getInquirytype();
+        this.invoice = inquiry.getInvoice();
+        this.recorderUU = inquiry.getRecorderUU();
+        this.recorder = inquiry.getRecorder();
+        this.sourceApp = inquiry.getSourceapp();
+        this.ship = inquiry.getShip();
+        this.sourceId = inquiry.getId();
+    }
+}

+ 869 - 0
applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/po/PublicInquiryItem.java

@@ -0,0 +1,869 @@
+package com.usoftchina.inquiry.po;
+
+import org.springframework.util.CollectionUtils;
+
+import java.io.Serializable;
+import java.util.*;
+
+/**
+ * 公共询价单转报价后的询价单明细
+ *
+ * @author hejq 2018-01-06
+ */
+public class PublicInquiryItem implements Serializable {
+
+    /**
+     * default serialVersionUID
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * id
+     */
+    private Long id;
+
+    /**
+     * 来源(买家ERP采购询价明细)的ID
+     */
+    private Long sourceId;
+
+    /**
+     * 序号
+     */
+    private Short number;
+
+    /**
+     * 询价单
+     */
+    private PublicInquiry inquiry;
+
+    /**
+     * 买家采购员UU
+     */
+    private Long userUU;
+
+    /**
+     * 联系人姓名
+     */
+    private String userName;
+
+    /**
+     * 联系人电话
+     */
+    private String userTel;
+
+    /**
+     * 产品id
+     */
+    private Long productId;
+
+    /**
+     * 产品
+     */
+    private Product product;
+
+    /**
+     * 币种
+     */
+    private String currency;
+
+    /**
+     * 税率
+     */
+    private Float taxrate;
+
+    /**
+     * 供应商UU
+     */
+    private Long vendUU;
+
+    /**
+     * 供应商企业信息
+     */
+    private Enterprise enterprise;
+
+    /**
+     * 供应商联系人UU
+     */
+    private Long vendUserUU;
+
+    /**
+     * 供应商用户信息
+     */
+    private User user;
+
+    /**
+     * (买家预先提供的)有效期始
+     */
+    private Date fromDate;
+
+    /**
+     * (卖家报的)最小订购量
+     */
+    private Double minOrderQty;
+
+    /**
+     * (卖家报的)最小包装量
+     */
+    private Double minPackQty;
+
+    /**
+     * (卖家报的)供应商物料编号
+     */
+    private String vendorprodcode;
+
+    /**
+     * (卖家报的)交货周期(天数)
+     */
+    private Long leadtime;
+
+    /**
+     * 分段报价明细
+     */
+    private List<PublicInquiryReply> replies;
+
+    /**
+     * 状态 200 待回复 、201 已回复 、314 已作废
+     */
+    private Short status;
+
+    /**
+     * (针对卖家的)询价传输状态{待上传、已下载}
+     */
+    private Short sendStatus;
+
+    /**
+     * (针对买家的)报价信息传输状态{待上传、已下载}
+     */
+    private Short backStatus;
+
+    /**
+     * (针对卖家的)报价信息传输状态{待上传、已下载}
+     */
+    private Short replySendStatus;
+
+    /**
+     * 是否采纳 1 为已采纳 0为已拒绝  空 未处理
+     */
+    private Short agreed;
+
+    /**
+     * 拒绝采纳理由
+     */
+    private String refusereason;
+
+    /**
+     * (针对卖家的)是否采纳信息传输状态{待上传、已下载}
+     */
+    private Short decideStatus;
+
+    /**
+     * 报价方UAS 是否采纳信息传输状态{待上传、已下载}  202 待上传  203  已下载
+     */
+    private Short decideDownStatus;
+
+    /**
+     * (针对卖家的)作废信息传输状态{待上传、已下载}
+     */
+    private Short invalidStatus;
+
+    /**
+     * 录入时间
+     *
+     */
+    private Date date;
+
+    /**
+     * 保存询价的应用
+     */
+    private String source;
+
+    /**
+     * 报价的应用
+     */
+    private String qutoApp;
+
+    /**
+     * 报价附件
+     */
+    private Set<Attach> attaches;
+
+    /**
+     * 需求数量
+     */
+    private Double needquantity;
+
+    /**
+     * erp传输状态
+     *
+     * <pre>erp发出数据传输请求时,赋给状态,完成后更新状态</pre>
+     *
+     * 1、 传输完成<br>
+     * 0、 正在传输
+     *
+     */
+    private Short erpstatus;
+
+	/*这下面是供应商报价时存的相关信息;
+	* 因为存在非客户报价,而且公共服务里面没有企业信息,现存入相关字段,后续处理*/
+    /**
+     * 供应商名称
+     */
+    private String vendName;
+
+    /**
+     * 供应商营业执照
+     */
+    private String businessCode;
+
+    /**
+     * 报价时间
+     */
+    private Date offerTime;
+
+    /**
+     * 报价截止日期
+     */
+    private Date endDate;
+
+    /**
+     * ************* 上传的物料信息,物料冗余字段 *************
+     */
+    /**
+     * 物料编号
+     */
+    private String prodCode;
+
+    /**
+     * 名称
+     */
+    private String prodTitle;
+
+    /**
+     * 规格
+     */
+    private String spec;
+
+    /**
+     * 型号
+     */
+    private String cmpCode;
+
+    /**
+     * 品牌
+     */
+    private String inbrand;
+
+    /**
+     * ******end*******
+     */
+
+    /**
+     * 剩余时间
+     */
+    private Long remainingTime;
+
+    /**
+     * 附件链接
+     */
+    private String attachUrl;
+
+    /**
+     * 附件名称
+     */
+    private String attachName;
+
+    /**
+     * 买家发出公共询价单时录入的币别
+     */
+    private String custCurrency;
+
+    /******** 替代物料信息  */
+
+    /**
+     * 替代型号
+     */
+    private String replaceCmpCode;
+
+    /**
+     * 替代规格
+     */
+    private String replaceSpec;
+
+    /**
+     * 替代品牌
+     */
+    private String replaceBrand;
+
+    /**
+     * 是否替代物料报价  1 是替代料报价, 0为普通报价
+     */
+    private Short isReplace = 0;
+
+    /** end  */
+
+    /**
+     * 总计价格(用于商城bom求购明细价格分析  dongbw  2018年9月5日 14:59:48)
+     */
+    private Double sumPrice;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getSourceId() {
+        return sourceId;
+    }
+
+    public void setSourceId(Long sourceId) {
+        this.sourceId = sourceId;
+    }
+
+    public Short getNumber() {
+        return number;
+    }
+
+    public void setNumber(Short number) {
+        this.number = number;
+    }
+
+    public PublicInquiry getInquiry() {
+        return inquiry;
+    }
+
+    public Long getProductId() {
+        return productId;
+    }
+
+    public void setInquiry(PublicInquiry inquiry) {
+        this.inquiry = inquiry;
+    }
+
+    public void setProductId(Long productId) {
+        this.productId = productId;
+    }
+
+    public Product getProduct() {
+        Product product = new Product();
+        product.setId(this.productId);
+        product.setCode(this.prodCode);
+        product.setSpec(this.spec);
+        product.setCmpCode(this.cmpCode);
+        product.setTitle(this.prodTitle);
+        product.setBrand(this.inbrand);
+        return product;
+    }
+
+    public void setProduct(Product product) {
+        this.product = product;
+    }
+
+    public String getProdCode() {
+        return prodCode;
+    }
+
+    public void setProdCode(String prodCode) {
+        this.prodCode = prodCode;
+    }
+
+    public String getCurrency() {
+        return currency;
+    }
+
+    public void setCurrency(String currency) {
+        this.currency = currency;
+    }
+
+    public Float getTaxrate() {
+        return taxrate;
+    }
+
+    public void setTaxrate(Float taxrate) {
+        this.taxrate = taxrate;
+    }
+
+    public Date getFromDate() {
+        return fromDate;
+    }
+
+    public void setFromDate(Date fromDate) {
+        this.fromDate = fromDate;
+    }
+
+    public Long getVendUU() {
+        return vendUU;
+    }
+
+    public void setVendUU(Long vendUU) {
+        this.vendUU = vendUU;
+    }
+
+    public Enterprise getEnterprise() {
+        return enterprise;
+    }
+
+    public void setEnterprise(Enterprise enterprise) {
+        this.enterprise = enterprise;
+    }
+
+    public List<PublicInquiryReply> getReplies() {
+        return replies;
+    }
+
+    public void setReplies(List<PublicInquiryReply> replies) {
+        this.replies = replies;
+    }
+
+    public Long getVendUserUU() {
+        return vendUserUU;
+    }
+
+    public void setVendUserUU(Long vendUserUU) {
+        this.vendUserUU = vendUserUU;
+    }
+
+    public User getUser() {
+        return user;
+    }
+
+    public void setUser(User user) {
+        this.user = user;
+    }
+
+    public Short getAgreed() {
+        return agreed;
+    }
+
+    public void setAgreed(Short agreed) {
+        this.agreed = agreed;
+    }
+
+    public Short getStatus() {
+        return status;
+    }
+
+    public void setStatus(Short status) {
+        this.status = status;
+    }
+
+    public Short getSendStatus() {
+        return sendStatus;
+    }
+
+    public void setSendStatus(Short sendStatus) {
+        this.sendStatus = sendStatus;
+    }
+
+    public Double getMinOrderQty() {
+        return minOrderQty;
+    }
+
+    public void setMinOrderQty(Double minOrderQty) {
+        this.minOrderQty = minOrderQty;
+    }
+
+    public Double getMinPackQty() {
+        return minPackQty;
+    }
+
+    public void setMinPackQty(Double minPackQty) {
+        this.minPackQty = minPackQty;
+    }
+
+    public Short getBackStatus() {
+        return backStatus;
+    }
+
+    public void setBackStatus(Short backStatus) {
+        this.backStatus = backStatus;
+    }
+
+    public Short getReplySendStatus() {
+        return replySendStatus;
+    }
+
+    public void setReplySendStatus(Short replySendStatus) {
+        this.replySendStatus = replySendStatus;
+    }
+
+    public Short getDecideStatus() {
+        return decideStatus;
+    }
+
+    public void setDecideStatus(Short decideStatus) {
+        this.decideStatus = decideStatus;
+    }
+
+    public Short getDecideDownStatus() {
+        return decideDownStatus;
+    }
+
+    public void setDecideDownStatus(Short decideDownStatus) {
+        this.decideDownStatus = decideDownStatus;
+    }
+
+    public Long getUserUU() {
+        return userUU;
+    }
+
+    public void setUserUU(Long userUU) {
+        this.userUU = userUU;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getUserTel() {
+        return userTel;
+    }
+
+    public void setUserTel(String userTel) {
+        this.userTel = userTel;
+    }
+
+    public String getVendorprodcode() {
+        return vendorprodcode;
+    }
+
+    public void setVendorprodcode(String vendorprodcode) {
+        this.vendorprodcode = vendorprodcode;
+    }
+
+    public Long getLeadtime() {
+        return leadtime;
+    }
+
+    public void setLeadtime(Long leadtime) {
+        this.leadtime = leadtime;
+    }
+
+    public Date getDate() {
+        return date;
+    }
+
+    public void setDate(Date date) {
+        this.date = date;
+    }
+
+    public String getSource() {
+        return source;
+    }
+
+    public void setSource(String source) {
+        this.source = source;
+    }
+
+    public String getQutoApp() {
+        return qutoApp;
+    }
+
+    public void setQutoApp(String qutoApp) {
+        this.qutoApp = qutoApp;
+    }
+
+    public Short getInvalidStatus() {
+        return invalidStatus;
+    }
+
+    public void setInvalidStatus(Short invalidStatus) {
+        this.invalidStatus = invalidStatus;
+    }
+
+    public Set<Attach> getAttaches() {
+        return attaches;
+    }
+
+    public void setAttaches(Set<Attach> attaches) {
+        this.attaches = attaches;
+    }
+
+    public Double getNeedquantity() {
+        return needquantity;
+    }
+
+    public void setNeedquantity(Double needquantity) {
+        this.needquantity = needquantity;
+    }
+
+    public Short getErpstatus() {
+        return erpstatus;
+    }
+
+    public void setErpstatus(Short erpstatus) {
+
+        this.erpstatus = erpstatus ;
+    }
+
+    public String getVendName() {
+        return vendName;
+    }
+
+    public void setVendName(String vendName) {
+        this.vendName = vendName;
+    }
+
+    public String getBusinessCode() {
+        return businessCode;
+    }
+
+    public void setBusinessCode(String businessCode) {
+        this.businessCode = businessCode;
+    }
+
+    public Date getOfferTime() {
+        return offerTime;
+    }
+
+    public void setOfferTime(Date offerTime) {
+        this.offerTime = offerTime;
+    }
+
+    public Date getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(Date endDate) {
+        this.endDate = endDate;
+    }
+
+    public String getProdTitle() {
+        return prodTitle;
+    }
+
+    public void setProdTitle(String prodTitle) {
+        this.prodTitle = prodTitle;
+    }
+
+    public String getSpec() {
+        return spec;
+    }
+
+    public void setSpec(String spec) {
+        this.spec = spec;
+    }
+
+    public String getCmpCode() {
+        return cmpCode;
+    }
+
+    public void setCmpCode(String cmpCode) {
+        this.cmpCode = cmpCode;
+    }
+
+    public String getInbrand() {
+        return inbrand;
+    }
+
+    public void setInbrand(String inbrand) {
+        this.inbrand = inbrand;
+    }
+
+    public Long getRemainingTime() {
+        if (null != endDate) {
+            return endDate.getTime() - System.currentTimeMillis();
+        }
+        return null;
+    }
+
+    public String getAttachUrl() {
+        return attachUrl;
+    }
+
+    public void setAttachUrl(String attachUrl) {
+        this.attachUrl = attachUrl;
+    }
+
+    public String getAttachName() {
+        return attachName;
+    }
+
+    public void setAttachName(String attachName) {
+        this.attachName = attachName;
+    }
+
+    public String getCustCurrency() {
+        return custCurrency;
+    }
+
+    public void setCustCurrency(String custCurrency) {
+        this.custCurrency = custCurrency;
+    }
+
+    public String getRefusereason() {
+        return refusereason;
+    }
+
+    public void setRefusereason(String refusereason) {
+        this.refusereason = refusereason;
+    }
+
+    public void setRemainingTime(Long remainingTime) {
+        this.remainingTime = remainingTime;
+    }
+
+    public String getReplaceCmpCode() {
+        return replaceCmpCode;
+    }
+
+    public void setReplaceCmpCode(String replaceCmpCode) {
+        this.replaceCmpCode = replaceCmpCode;
+    }
+
+    public String getReplaceSpec() {
+        return replaceSpec;
+    }
+
+    public void setReplaceSpec(String replaceSpec) {
+        this.replaceSpec = replaceSpec;
+    }
+
+    public String getReplaceBrand() {
+        return replaceBrand;
+    }
+
+    public void setReplaceBrand(String replaceBrand) {
+        this.replaceBrand = replaceBrand;
+    }
+
+    public Short getIsReplace() {
+        return isReplace;
+    }
+
+    public void setIsReplace(Short isReplace) {
+        this.isReplace = isReplace;
+    }
+
+    public Double getSumPrice() {
+        return sumPrice;
+    }
+
+    public void setSumPrice(Double sumPrice) {
+        this.sumPrice = sumPrice;
+    }
+
+    /**
+     * 将公共询价单转成报价单
+     *
+     * @param item 公共询价单明细
+     */
+    public PublicInquiryItem(PurcInquiryItemInfo item) {
+        this.date = item.getDate();
+        this.offerTime = new Date(System.currentTimeMillis());
+        this.sourceId = item.getId();
+        this.currency = item.getCurrency();
+        this.productId = item.getProductId();
+        this.needquantity = item.getNeedquantity();
+        this.fromDate = item.getFromDate();
+        this.taxrate = item.getTaxrate();
+        this.id = item.getId();
+        this.userName = item.getUserName();
+        this.userTel = item.getUserTel();
+        this.prodCode = item.getProdCode();
+        this.source = item.getSource();
+        this.endDate = item.getEndDate();
+        this.prodTitle = item.getProdTitle();
+        this.spec = item.getSpec();
+        this.inbrand = item.getInbrand();
+        this.cmpCode = item.getCmpCode();
+    }
+
+    public PublicInquiryItem() {
+    }
+
+    /**
+     * 回复记录的描述
+     *
+     * @return
+     */
+    public String replyDescription() {
+        if (!CollectionUtils.isEmpty(this.replies)) {
+            StringBuffer sb = new StringBuffer();
+            for (PublicInquiryReply reply : this.replies) {
+                sb.append("分段数:").append(reply.getLapQty()).append(",").append("价格:").append(reply.getPrice())
+                        .append(";");
+            }
+            return sb.toString();
+        }
+        return null;
+    }
+
+    public static List<PublicInquiry> distinct(List<PublicInquiryItem> purcitems) {
+        List<PublicInquiry> inquiries = new ArrayList<>();
+        Set<Long> keys = new HashSet<>();
+        for (PublicInquiryItem item : purcitems) {
+            if (!keys.contains(item.getInquiry().getId())) {
+                inquiries.add(item.getInquiry());
+                keys.add(item.getInquiry().getId());
+            }
+        }
+        return inquiries;
+    }
+
+    @Override
+    public String toString() {
+        return "PublicInquiryItem{" +
+                "id=" + id +
+                ", sourceId=" + sourceId +
+                ", number=" + number +
+                ", inquiry=" + inquiry +
+                ", userUU=" + userUU +
+                ", userName='" + userName + '\'' +
+                ", userTel='" + userTel + '\'' +
+                ", productId=" + productId +
+                ", product=" + product +
+                ", currency='" + currency + '\'' +
+                ", taxrate=" + taxrate +
+                ", vendUU=" + vendUU +
+                ", enterprise=" + enterprise +
+                ", vendUserUU=" + vendUserUU +
+                ", user=" + user +
+                ", fromDate=" + fromDate +
+                ", minOrderQty=" + minOrderQty +
+                ", minPackQty=" + minPackQty +
+                ", vendorprodcode='" + vendorprodcode + '\'' +
+                ", leadtime=" + leadtime +
+                ", replies=" + replies +
+                ", status=" + status +
+                ", sendStatus=" + sendStatus +
+                ", backStatus=" + backStatus +
+                ", replySendStatus=" + replySendStatus +
+                ", agreed=" + agreed +
+                ", refusereason='" + refusereason + '\'' +
+                ", decideStatus=" + decideStatus +
+                ", decideDownStatus=" + decideDownStatus +
+                ", invalidStatus=" + invalidStatus +
+                ", date=" + date +
+                ", source='" + source + '\'' +
+                ", qutoApp='" + qutoApp + '\'' +
+                ", attaches=" + attaches +
+                ", needquantity=" + needquantity +
+                ", erpstatus=" + erpstatus +
+                ", vendName='" + vendName + '\'' +
+                ", businessCode='" + businessCode + '\'' +
+                ", offerTime=" + offerTime +
+                ", endDate=" + endDate +
+                ", prodCode='" + prodCode + '\'' +
+                ", prodTitle='" + prodTitle + '\'' +
+                ", spec='" + spec + '\'' +
+                ", cmpCode='" + cmpCode + '\'' +
+                ", inbrand='" + inbrand + '\'' +
+                ", remainingTime=" + remainingTime +
+                ", attachUrl='" + attachUrl + '\'' +
+                ", attachName='" + attachName + '\'' +
+                ", custCurrency='" + custCurrency + '\'' +
+                ", replaceCmpCode='" + replaceCmpCode + '\'' +
+                ", replaceSpec='" + replaceSpec + '\'' +
+                ", replaceBrand='" + replaceBrand + '\'' +
+                ", isReplace=" + isReplace +
+                '}';
+    }
+}

+ 55 - 0
applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/po/PublicInquiryReply.java

@@ -0,0 +1,55 @@
+package com.usoftchina.inquiry.po;
+
+import java.io.Serializable;
+
+/**
+ * 公共询价单报价明细
+ * @author hejq 2018-01-06
+ */
+public class PublicInquiryReply implements Serializable {
+
+    /**
+     * 序列
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * id
+     */
+    private Long id;
+
+    /**
+     * (买家或卖家定义的)分段数量
+     */
+    private Double lapQty;
+
+    /**
+     * (卖家报的)单价
+     */
+    private Double price;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Double getLapQty() {
+        return lapQty;
+    }
+
+    public void setLapQty(Double lapQty) {
+        this.lapQty = lapQty;
+    }
+
+    public Double getPrice() {
+        return price;
+    }
+
+    public void setPrice(Double price) {
+        this.price = price;
+    }
+
+}

+ 397 - 0
applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/po/PurcInquiry.java

@@ -0,0 +1,397 @@
+package com.usoftchina.inquiry.po;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.Set;
+
+/**
+ * 公共库新增的询价信息表中间表
+ *
+ * Created by hejq on 2018-01-13.
+ */
+public class PurcInquiry implements Serializable {
+
+    /**
+     * default serialVersionUID
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * id
+     */
+    private Long id;
+
+    /**
+     * 询价单所属企业UU
+     */
+    private Long enUU;
+
+    /**
+     * 询价企业信息
+     */
+    private Enterprise enterprise;
+
+    /**
+     * 企业名称(方便搜索过滤)
+     */
+    private String enName;
+
+    /**
+     * 询价单所属用户UU
+     */
+    private Long recorderUU;
+
+    /**
+     * 流水号
+     */
+    private String code;
+
+    /**
+     * 单据归属日期
+     */
+    private Date date;
+
+    /**
+     * 录入人
+     */
+    private String recorder;
+
+    /**
+     * 报价截止日期
+     */
+    private Date endDate;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 环保要求
+     */
+    private String environment;
+
+    /**
+     * 询价明细
+     */
+    private Set<PurcInquiryItem> inquiryItems;
+
+    /**
+     * 附件
+     */
+    private Set<Attach> attachs;
+
+    /**
+     * 单据状态(已提交、在录入)
+     */
+    private Integer enteryStatus;
+
+    /**
+     * 收货地址
+     */
+    private String ship;
+
+    /**
+     * 是否开票<br>
+     * 1. 是<br>
+     * 0. 否
+     */
+    private Short invoice;
+
+    /**
+     * 是否含税
+     */
+    private Short ifTax;
+
+    /**
+     * 币别
+     */
+    private String currency;
+
+    /**
+     * 询价类型
+     */
+    private String inquirytype;
+
+    /**
+     * 应用来源
+     */
+    private String sourceapp;
+
+    /**
+     * 如果从erp传过来的,记录id
+     */
+    private Long erpid;
+
+    /**
+     * erp传过来的记录时间
+     */
+    private  Date erpdate;
+
+    /**
+     * 明细总数
+     */
+    private Integer amount;
+
+    /**
+     * bom单规格(仅bom单求购有)
+     */
+    private String spec;
+
+    /**
+     * 采购套数(bom询价使用,普通询价默认1)
+     */
+    private Integer count = 1;
+
+    /**
+     * 已报价明细数
+     */
+    private Integer quotedAmount;
+
+    /**
+     * 替代料报价数
+     */
+    private Integer replaceQuotedAmount;
+
+    /**
+     * 按价格最低,合计价格
+     */
+    private Double minPriceSum;
+
+    /**
+     * 按交期最短,合计价格
+     */
+    private Double minDeliverySum;
+
+    public Enterprise getEnterprise() {
+        return enterprise;
+    }
+
+    public void setEnterprise(Enterprise enterprise) {
+        this.enterprise = enterprise;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getEnUU() {
+        return enUU;
+    }
+
+    public void setEnUU(Long enUU) {
+        this.enUU = enUU;
+    }
+
+    public String getEnName() {
+        return enName;
+    }
+
+    public void setEnName(String enName) {
+        this.enName = enName;
+    }
+
+    public Long getRecorderUU() {
+        return recorderUU;
+    }
+
+    public void setRecorderUU(Long recorderUU) {
+        this.recorderUU = recorderUU;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public Date getDate() {
+        return date;
+    }
+
+    public void setDate(Date date) {
+        this.date = date;
+    }
+
+    public String getRecorder() {
+        return recorder;
+    }
+
+    public void setRecorder(String recorder) {
+        this.recorder = recorder;
+    }
+
+    public Date getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(Date endDate) {
+        this.endDate = endDate;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getEnvironment() {
+        return environment;
+    }
+
+    public void setEnvironment(String environment) {
+        this.environment = environment;
+    }
+
+    public Set<PurcInquiryItem> getInquiryItems() {
+        return inquiryItems;
+    }
+
+    public void setInquiryItems(Set<PurcInquiryItem> inquiryItems) {
+        this.inquiryItems = inquiryItems;
+    }
+
+    public Set<Attach> getAttachs() {
+        return attachs;
+    }
+
+    public void setAttachs(Set<Attach> attachs) {
+        this.attachs = attachs;
+    }
+
+    public Integer getEnteryStatus() {
+        return enteryStatus;
+    }
+
+    public void setEnteryStatus(Integer enteryStatus) {
+        this.enteryStatus = enteryStatus;
+    }
+
+    public String getShip() {
+        return ship;
+    }
+
+    public void setShip(String ship) {
+        this.ship = ship;
+    }
+
+    public Short getInvoice() {
+        return invoice;
+    }
+
+    public void setInvoice(Short invoice) {
+        this.invoice = invoice;
+    }
+
+    public Short getIfTax() {
+        return ifTax;
+    }
+
+    public void setIfTax(Short ifTax) {
+        this.ifTax = ifTax;
+    }
+
+    public String getCurrency() {
+        return currency;
+    }
+
+    public void setCurrency(String currency) {
+        this.currency = currency;
+    }
+
+    public String getInquirytype() {
+        return inquirytype;
+    }
+
+    public void setInquirytype(String inquirytype) {
+        this.inquirytype = inquirytype;
+    }
+
+    public String getSourceapp() {
+        return sourceapp;
+    }
+
+    public void setSourceapp(String sourceapp) {
+        this.sourceapp = sourceapp;
+    }
+
+    public Long getErpid() {
+        return erpid;
+    }
+
+    public void setErpid(Long erpid) {
+        this.erpid = erpid;
+    }
+
+    public Date getErpdate() {
+        return erpdate;
+    }
+
+    public void setErpdate(Date erpdate) {
+        this.erpdate = erpdate;
+    }
+
+    public Integer getAmount() {
+        return amount;
+    }
+
+    public void setAmount(Integer amount) {
+        this.amount = amount;
+    }
+
+    public Integer getQuotedAmount() {
+        return quotedAmount;
+    }
+
+    public void setQuotedAmount(Integer quotedAmount) {
+        this.quotedAmount = quotedAmount;
+    }
+
+    public Integer getReplaceQuotedAmount() {
+        return replaceQuotedAmount;
+    }
+
+    public void setReplaceQuotedAmount(Integer replaceQuotedAmount) {
+        this.replaceQuotedAmount = replaceQuotedAmount;
+    }
+
+    public String getSpec() {
+        return spec;
+    }
+
+    public void setSpec(String spec) {
+        this.spec = spec;
+    }
+
+    public Integer getCount() {
+        return count;
+    }
+
+    public void setCount(Integer count) {
+        this.count = count;
+    }
+
+    public Double getMinPriceSum() {
+        return minPriceSum;
+    }
+
+    public void setMinPriceSum(Double minPriceSum) {
+        this.minPriceSum = minPriceSum;
+    }
+
+    public Double getMinDeliverySum() {
+        return minDeliverySum;
+    }
+
+    public void setMinDeliverySum(Double minDeliverySum) {
+        this.minDeliverySum = minDeliverySum;
+    }
+}

+ 347 - 0
applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/po/PurcInquiryInfo.java

@@ -0,0 +1,347 @@
+package com.usoftchina.inquiry.po;
+
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.Set;
+
+/**
+ * 公共库新增的询价信息表中间表(查询信息)
+ *
+ * @author hejq
+ * @date 2018-01-17 15:46
+ */
+public class PurcInquiryInfo implements Serializable {
+
+    /**
+     * default serialVersionUID
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * id
+     */
+    private Long id;
+
+    /**
+     * 询价单所属企业UU
+     */
+    private Long enUU;
+
+    /**
+     * 企业名称(方便搜索过滤)
+     */
+    private String enName;
+
+    /**
+     * 询价企业
+     */
+    private Enterprise enterprise;
+
+    /**
+     * 询价单所属用户UU
+     */
+    private Long recorderUU;
+
+    /**
+     * 流水号
+     */
+    private String code;
+
+    /**
+     * 单据归属日期
+     */
+    private Date date;
+
+    /**
+     * 录入人
+     */
+    private String recorder;
+
+    /**
+     * 报价截止日期
+     */
+    private Date endDate;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 环保要求
+     */
+    private String environment;
+
+    /**
+     * 询价明细
+     */
+    private Set<PurcInquiryItemInfo> inquiryItems;
+
+    /**
+     * 附件
+     */
+    private Set<Attach> attachs;
+
+    /**
+     * 单据状态(已提交、在录入)
+     */
+    private Integer enteryStatus;
+
+    /**
+     * 收货地址
+     */
+    private String ship;
+
+    /**
+     * 是否开票<br>
+     * 1. 是<br>
+     * 0. 否
+     */
+    private Short invoice;
+
+    /**
+     * 是否含税
+     */
+    private Short ifTax;
+
+    /**
+     * 币别
+     */
+    private String currency;
+
+    /**
+     * 询价类型
+     */
+    private String inquirytype;
+
+    /**
+     * 应用来源
+     */
+    private String sourceapp;
+
+    /**
+     * 如果从erp传过来的,记录id
+     */
+    private Long erpid;
+
+    /**
+     * erp传过来的记录时间
+     */
+    private  Date erpdate;
+
+    /**
+     * 明细总数
+     */
+    private Integer amount;
+
+    /**
+     * bom单规格(仅bom单求购有)
+     */
+    private String spec;
+
+    /**
+     * 采购套数(bom询价使用,普通询价默认1)
+     */
+    private Integer count = 1;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getEnUU() {
+        return enUU;
+    }
+
+    public void setEnUU(Long enUU) {
+        this.enUU = enUU;
+    }
+
+    public String getEnName() {
+        return enName;
+    }
+
+    public void setEnName(String enName) {
+        this.enName = enName;
+    }
+
+    public Enterprise getEnterprise() {
+        return enterprise;
+    }
+
+    public void setEnterprise(Enterprise enterprise) {
+        this.enterprise = enterprise;
+    }
+
+    public Long getRecorderUU() {
+        return recorderUU;
+    }
+
+    public void setRecorderUU(Long recorderUU) {
+        this.recorderUU = recorderUU;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public Date getDate() {
+        return date;
+    }
+
+    public void setDate(Date date) {
+        this.date = date;
+    }
+
+    public String getRecorder() {
+        return recorder;
+    }
+
+    public void setRecorder(String recorder) {
+        this.recorder = recorder;
+    }
+
+    public Date getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(Date endDate) {
+        this.endDate = endDate;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getEnvironment() {
+        return environment;
+    }
+
+    public void setEnvironment(String environment) {
+        this.environment = environment;
+    }
+
+    public Set<PurcInquiryItemInfo> getInquiryItems() {
+        return inquiryItems;
+    }
+
+    public void setInquiryItems(Set<PurcInquiryItemInfo> inquiryItems) {
+        this.inquiryItems = inquiryItems;
+    }
+
+    public Set<Attach> getAttachs() {
+        return attachs;
+    }
+
+    public void setAttachs(Set<Attach> attachs) {
+        this.attachs = attachs;
+    }
+
+    public Integer getEnteryStatus() {
+        return enteryStatus;
+    }
+
+    public void setEnteryStatus(Integer enteryStatus) {
+        this.enteryStatus = enteryStatus;
+    }
+
+    public String getShip() {
+        return ship;
+    }
+
+    public void setShip(String ship) {
+        this.ship = ship;
+    }
+
+    public Short getInvoice() {
+        return invoice;
+    }
+
+    public void setInvoice(Short invoice) {
+        this.invoice = invoice;
+    }
+
+    public Short getIfTax() {
+        return ifTax;
+    }
+
+    public void setIfTax(Short ifTax) {
+        this.ifTax = ifTax;
+    }
+
+    public String getCurrency() {
+        return currency;
+    }
+
+    public void setCurrency(String currency) {
+        this.currency = currency;
+    }
+
+    public String getInquirytype() {
+        return inquirytype;
+    }
+
+    public void setInquirytype(String inquirytype) {
+        this.inquirytype = inquirytype;
+    }
+
+    public String getSourceapp() {
+        return sourceapp;
+    }
+
+    public void setSourceapp(String sourceapp) {
+        this.sourceapp = sourceapp;
+    }
+
+    public Long getErpid() {
+        return erpid;
+    }
+
+    public void setErpid(Long erpid) {
+        this.erpid = erpid;
+    }
+
+    public Date getErpdate() {
+        return erpdate;
+    }
+
+    public void setErpdate(Date erpdate) {
+        this.erpdate = erpdate;
+    }
+
+    public Integer getAmount() {
+        return amount;
+    }
+
+    public void setAmount(Integer amount) {
+        this.amount = amount;
+    }
+
+    public String getSpec() {
+        return spec;
+    }
+
+    public void setSpec(String spec) {
+        this.spec = spec;
+    }
+
+    public Integer getCount() {
+        return count;
+    }
+
+    public void setCount(Integer count) {
+        this.count = count;
+    }
+}

+ 433 - 0
applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/po/PurcInquiryItem.java

@@ -0,0 +1,433 @@
+package com.usoftchina.inquiry.po;
+
+import java.util.*;
+
+/**
+ * 平台新增询价单明细
+ *
+ * @author hejq
+ * @date 2018-01-13 19:19
+ */
+public class PurcInquiryItem {
+
+    private Long id;
+
+    /**
+     * 序号
+     */
+    private Short number;
+
+    /**
+     * 询价单
+     */
+    private PurcInquiry inquiry;
+
+    /**
+     * 买家采购员UU
+     */
+    private Long userUU;
+
+    /**
+     * 联系人姓名
+     */
+    private String userName;
+
+    /**
+     * 联系人电话
+     */
+    private String userTel;
+
+    /**
+     * 产品id
+     */
+    private Long productId;
+
+    /**
+     * 产品
+     */
+    private Product product;
+
+    /**
+     * ************* 上传的物料信息,因为可能是手动输入的,物料款不存在,需要先进行保存物料 *************
+     */
+    /**
+     * 物料编号
+     */
+    private String prodCode;
+
+    /**
+     * 名称
+     */
+    private String prodTitle;
+
+    /**
+     * 规格
+     */
+    private String spec;
+
+    /**
+     * 型号
+     */
+    private String cmpCode;
+
+    /**
+     * 品牌
+     */
+    private String inbrand;
+    /**
+     * ******end*******
+     */
+
+    /**
+     * 币种
+     */
+    private String currency;
+
+    /**
+     * 税率
+     */
+    private Float taxrate;
+
+    /**
+     * (买家预先提供的)有效期始
+     */
+    private Date fromDate;
+
+    /**
+     * 分段报价明细
+     */
+    private List<PurchaseInquiryReply> replies;
+
+    /**
+     * {未回复、已回复}
+     */
+    private Short status;
+
+    /**
+     * 是否采纳
+     */
+    private Short agreed;
+
+    /**
+     * 是否已过期 1为已过期,0为未过期 已过期单据无法报价
+     *
+     * @return
+     */
+    private Short overdue;
+
+    /**
+     * 来源ERP或B2B
+     */
+    private String source;
+
+    /**
+     * 需求数量
+     */
+    private Double needquantity;
+
+    /**
+     * 来源id,可能是ERP同步过来的单据
+     */
+    private Long sourceid;
+
+    /**
+     * 单据日期,索引过滤需要
+     */
+    private Date date;
+
+    /**
+     * 发布询价企业uu
+     */
+    private Long enuu;
+
+    /**
+     * 物料报价数量(记录多少人或企业对该物料进行报价)
+     */
+    private Integer offerAmount;
+
+    /**
+     * 截止日期
+     */
+    private Date endDate;
+
+    /**
+     * 剩余时间
+     */
+    private Long remainingTime;
+
+    /**
+     * 是否有效  1有效  0 无效
+     */
+    private Integer valid;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Short getNumber() {
+        return number;
+    }
+
+    public void setNumber(Short number) {
+        this.number = number;
+    }
+
+    public PurcInquiry getInquiry() {
+        return inquiry;
+    }
+
+    public void setInquiry(PurcInquiry inquiry) {
+        this.inquiry = inquiry;
+    }
+
+    public Long getUserUU() {
+        return userUU;
+    }
+
+    public void setUserUU(Long userUU) {
+        this.userUU = userUU;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getUserTel() {
+        return userTel;
+    }
+
+    public void setUserTel(String userTel) {
+        this.userTel = userTel;
+    }
+
+    public Long getProductId() {
+        return productId;
+    }
+
+    public void setProductId(Long productId) {
+        this.productId = productId;
+    }
+
+    public Product getProduct() {
+        return product;
+    }
+
+    public void setProduct(Product product) {
+        this.product = product;
+    }
+
+    public String getCurrency() {
+        return currency;
+    }
+
+    public void setCurrency(String currency) {
+        this.currency = currency;
+    }
+
+    public Float getTaxrate() {
+        return taxrate;
+    }
+
+    public void setTaxrate(Float taxrate) {
+        this.taxrate = taxrate;
+    }
+
+    public Date getFromDate() {
+        return fromDate;
+    }
+
+    public void setFromDate(Date fromDate) {
+        this.fromDate = fromDate;
+    }
+
+    public List<PurchaseInquiryReply> getReplies() {
+        return replies;
+    }
+
+    public void setReplies(List<PurchaseInquiryReply> replies) {
+        this.replies = replies;
+    }
+
+    public Short getStatus() {
+        return status;
+    }
+
+    public void setStatus(Short status) {
+        this.status = status;
+    }
+
+    public Short getAgreed() {
+        return agreed;
+    }
+
+    public void setAgreed(Short agreed) {
+        this.agreed = agreed;
+    }
+
+    public Short getOverdue() {
+        return overdue;
+    }
+
+    public void setOverdue(Short overdue) {
+        this.overdue = overdue;
+    }
+
+    public String getSource() {
+        return source;
+    }
+
+    public void setSource(String source) {
+        this.source = source;
+    }
+
+    public String getProdCode() {
+        return prodCode;
+    }
+
+    public void setProdCode(String prodCode) {
+        this.prodCode = prodCode;
+    }
+
+    public String getProdTitle() {
+        return prodTitle;
+    }
+
+    public void setProdTitle(String prodTitle) {
+        this.prodTitle = prodTitle;
+    }
+
+    public String getSpec() {
+        return spec;
+    }
+
+    public void setSpec(String spec) {
+        this.spec = spec;
+    }
+
+    public String getCmpCode() {
+        return cmpCode;
+    }
+
+    public void setCmpCode(String cmpCode) {
+        this.cmpCode = cmpCode;
+    }
+
+    public String getInbrand() {
+        return inbrand;
+    }
+
+    public void setInbrand(String inbrand) {
+        this.inbrand = inbrand;
+    }
+
+    public Double getNeedquantity() {
+        return needquantity;
+    }
+
+    public void setNeedquantity(Double needquantity) {
+        this.needquantity = needquantity;
+    }
+
+    public Long getSourceid() {
+        return sourceid;
+    }
+
+    public void setSourceid(Long sourceid) {
+        this.sourceid = sourceid;
+    }
+
+    public Date getDate() {
+        return date;
+    }
+
+    public void setDate(Date date) {
+        this.date = date;
+    }
+
+    public Long getEnuu() {
+        return enuu;
+    }
+
+    public void setEnuu(Long enuu) {
+        this.enuu = enuu;
+    }
+
+    public Integer getOfferAmount() {
+        return offerAmount;
+    }
+
+    public void setOfferAmount(Integer offerAmount) {
+        this.offerAmount = offerAmount;
+    }
+
+    public Date getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(Date endDate) {
+        this.endDate = endDate;
+    }
+
+    public Long getRemainingTime() {
+        if (endDate != null) {
+            return endDate.getTime() - System.currentTimeMillis();
+        }
+        return null;
+    }
+
+    public void setRemainingTime(Long remainingTime) {
+        this.remainingTime = remainingTime;
+    }
+
+    @Override
+    public String toString() {
+        return "PurcInquiryItem{" +
+                "id=" + id +
+                ", number=" + number +
+                ", inquiry=" + inquiry +
+                ", userUU=" + userUU +
+                ", userName='" + userName + '\'' +
+                ", userTel='" + userTel + '\'' +
+                ", productId=" + productId +
+                ", product=" + product +
+                ", prodCode='" + prodCode + '\'' +
+                ", prodTitle='" + prodTitle + '\'' +
+                ", spec='" + spec + '\'' +
+                ", cmpCode='" + cmpCode + '\'' +
+                ", inbrand='" + inbrand + '\'' +
+                ", currency='" + currency + '\'' +
+                ", taxrate=" + taxrate +
+                ", fromDate=" + fromDate +
+                ", replies=" + replies +
+                ", status=" + status +
+                ", agreed=" + agreed +
+                ", overdue=" + overdue +
+                ", source='" + source + '\'' +
+                ", needquantity=" + needquantity +
+                ", sourceid=" + sourceid +
+                ", date=" + date +
+                ", enuu=" + enuu +
+                ", offerAmount=" + offerAmount +
+                ", endDate=" + endDate +
+                ", remainingTime=" + remainingTime +
+                ", valid=" + valid +
+                '}';
+    }
+
+    public Integer getValid() {
+        return valid;
+    }
+
+    public void setValid(Integer valid) {
+        this.valid = valid;
+    }
+
+}

+ 499 - 0
applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/po/PurcInquiryItemInfo.java

@@ -0,0 +1,499 @@
+package com.usoftchina.inquiry.po;
+
+import java.util.*;
+
+/**
+ * 平台新增询价单明细(查询,用明细带出主表信息)
+ *
+ * @author hejq
+ * @date 2018-01-17 15:46
+ */
+public class PurcInquiryItemInfo {
+
+    private Long id;
+
+    /**
+     * 序号
+     */
+    private Short number;
+
+    /**
+     * 询价单
+     */
+    private PurcInquiryInfo inquiry;
+
+    /**
+     * 买家采购员UU
+     */
+    private Long userUU;
+
+    /**
+     * 联系人姓名
+     */
+    private String userName;
+
+    /**
+     * 联系人电话
+     */
+    private String userTel;
+
+    /**
+     * 产品id
+     */
+    private Long productId;
+
+    /**
+     * 产品
+     */
+    private Product product;
+
+    /**
+     * ************* 上传的物料信息,因为可能是手动输入的,物料款不存在,需要先进行保存物料 *************
+     */
+    /**
+     * 物料编号
+     */
+    private String prodCode;
+
+    /**
+     * 名称
+     */
+    private String prodTitle;
+
+    /**
+     * 规格
+     */
+    private String spec;
+
+    /**
+     * 型号
+     */
+    private String cmpCode;
+
+    /**
+     * 品牌
+     */
+    private String inbrand;
+    /**
+     * ******end*******
+     */
+
+    /**
+     * 币种
+     */
+    private String currency;
+
+    /**
+     * 税率
+     */
+    private Float taxrate;
+
+    /**
+     * (买家预先提供的)有效期始
+     */
+    private Date fromDate;
+
+    /**
+     * {未回复、已回复}
+     */
+    private Short status;
+
+    /**
+     * 1已过期 0 未过期
+     *
+     */
+    private Short overdue;
+
+    /**
+     * 来源ERP或B2B
+     */
+    private String source;
+
+    /**
+     * 需求数量
+     */
+    private Double needquantity;
+
+    /**
+     * 来源id,可能是ERP同步过来的单据
+     */
+    private Long sourceid;
+
+    /**
+     * 单据日期,索引过滤需要
+     */
+    private Date date;
+
+    /**
+     * 发布询价企业uu
+     */
+    private Long enuu;
+
+    /**
+     * 截止时间
+     */
+    private Date endDate;
+
+    /**
+     * 剩余时间
+     */
+    private Long remainingTime;
+
+    /**
+     * 物料报价数量(记录多少人或企业对该物料进行报价)
+     */
+    private Integer offerAmount;
+
+    /**** 针对客户,查询公共询价信息时展示的相关其他需求数据 *****/
+    /**
+     * 是否已报价 1、是;0、否
+     */
+    private Short quoted;
+
+    /**
+     * 如果已报价,记录已转报价后的明细id
+     */
+    private Long quteId;
+
+    /**
+     * 是否已采纳 1为已采纳。  -- 修改为字段,在采纳时,设置为1,方便bom询价详情内判断状态  2018年8月14日 17:03:05  dongbw
+     */
+    private Short agreed;
+    /****** end ******/
+
+    /**
+     * 已报价的信息,封装给商城
+     */
+    private List<PublicInquiryItem> qutations;
+
+    /**
+     * 登录企业对该单据的报价
+     */
+    private PublicInquiryItem quotation;
+
+    /**
+     * 是否有效  1有效  0 无效
+     */
+    private Integer valid;
+
+    /**
+     * 分配状态  1为已分配 0 为未分配
+     */
+    private Short allotStatus;
+
+    public Short getAllotStatus() {
+        return allotStatus;
+    }
+
+    public void setAllotStatus(Short allotStatus) {
+        this.allotStatus = allotStatus;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Short getNumber() {
+        return number;
+    }
+
+    public void setNumber(Short number) {
+        this.number = number;
+    }
+
+    public PurcInquiryInfo getInquiry() {
+        return inquiry;
+    }
+
+    public void setInquiry(PurcInquiryInfo inquiry) {
+        this.inquiry = inquiry;
+    }
+
+    public Long getUserUU() {
+        return userUU;
+    }
+
+    public void setUserUU(Long userUU) {
+        this.userUU = userUU;
+    }
+
+    public Long getProductId() {
+        return productId;
+    }
+
+    public void setProductId(Long productId) {
+        this.productId = productId;
+    }
+
+    public Product getProduct() {
+        Product product = new Product();
+        product.setId(this.productId);
+        product.setCode(this.prodCode);
+        product.setSpec(this.spec);
+        product.setCmpCode(this.cmpCode);
+        product.setTitle(this.prodTitle);
+        product.setBrand(this.inbrand);
+        return product;
+    }
+
+    public void setProduct(Product product) {
+        this.product = product;
+    }
+
+    public String getCurrency() {
+        return currency;
+    }
+
+    public void setCurrency(String currency) {
+        this.currency = currency;
+    }
+
+    public Float getTaxrate() {
+        return taxrate;
+    }
+
+    public void setTaxrate(Float taxrate) {
+        this.taxrate = taxrate;
+    }
+
+    public Date getFromDate() {
+        return fromDate;
+    }
+
+    public void setFromDate(Date fromDate) {
+        this.fromDate = fromDate;
+    }
+
+    public Short getStatus() {
+        return status;
+    }
+
+    public void setStatus(Short status) {
+        this.status = status;
+    }
+
+    public Short getAgreed() {
+        return agreed;
+    }
+
+    public void setAgreed(Short agreed) {
+        this.agreed = agreed;
+    }
+
+    public Short getOverdue() {
+        return overdue;
+    }
+
+    public void setOverdue(Short overdue) {
+        this.overdue = overdue;
+    }
+
+    public String getSource() {
+        return source;
+    }
+
+    public void setSource(String source) {
+        this.source = source;
+    }
+
+    public String getProdCode() {
+        return prodCode;
+    }
+
+    public void setProdCode(String prodCode) {
+        this.prodCode = prodCode;
+    }
+
+    public String getProdTitle() {
+        return prodTitle;
+    }
+
+    public void setProdTitle(String prodTitle) {
+        this.prodTitle = prodTitle;
+    }
+
+    public String getSpec() {
+        return spec;
+    }
+
+    public void setSpec(String spec) {
+        this.spec = spec;
+    }
+
+    public String getCmpCode() {
+        return cmpCode;
+    }
+
+    public void setCmpCode(String cmpCode) {
+        this.cmpCode = cmpCode;
+    }
+
+    public String getInbrand() {
+        return inbrand;
+    }
+
+    public void setInbrand(String inbrand) {
+        this.inbrand = inbrand;
+    }
+
+    public Double getNeedquantity() {
+        return needquantity;
+    }
+
+    public void setNeedquantity(Double needquantity) {
+        this.needquantity = needquantity;
+    }
+
+    public Long getSourceid() {
+        return sourceid;
+    }
+
+    public void setSourceid(Long sourceid) {
+        this.sourceid = sourceid;
+    }
+
+    public Date getDate() {
+        return date;
+    }
+
+    public void setDate(Date date) {
+        this.date = date;
+    }
+
+    public Long getEnuu() {
+        return enuu;
+    }
+
+    public void setEnuu(Long enuu) {
+        this.enuu = enuu;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getUserTel() {
+        return userTel;
+    }
+
+    public void setUserTel(String userTel) {
+        this.userTel = userTel;
+    }
+
+    public Date getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(Date endDate) {
+        this.endDate = endDate;
+    }
+
+    public Long getRemainingTime() {
+        if (null != endDate) {
+            return endDate.getTime() - System.currentTimeMillis();
+        }
+        return remainingTime;
+    }
+
+    public void setRemainingTime(Long remainingTime) {
+        this.remainingTime = remainingTime;
+    }
+
+    public Integer getOfferAmount() {
+        return offerAmount;
+    }
+
+    public void setOfferAmount(Integer offerAmount) {
+        this.offerAmount = offerAmount;
+    }
+
+    public Short getQuoted() {
+        return quoted;
+    }
+
+    public void setQuoted(Short quoted) {
+        this.quoted = quoted;
+    }
+
+    public Long getQuteId() {
+        return quteId;
+    }
+
+    public void setQuteId(Long quteId) {
+        this.quteId = quteId;
+    }
+
+    public List<PublicInquiryItem> getQutations() {
+        return qutations;
+    }
+
+    public void setQutations(List<PublicInquiryItem> qutations) {
+        this.qutations = qutations;
+    }
+
+    public PublicInquiryItem getQuotation() {
+        return quotation;
+    }
+
+    public void setQuotation(PublicInquiryItem quotation) {
+        this.quotation = quotation;
+    }
+
+
+
+    @Override
+    public String toString() {
+        return "PurcInquiryItemInfo{" +
+                "id=" + id +
+                ", number=" + number +
+                ", inquiry=" + inquiry +
+                ", userUU=" + userUU +
+                ", userName='" + userName + '\'' +
+                ", userTel='" + userTel + '\'' +
+                ", productId=" + productId +
+                ", product=" + product +
+                ", prodCode='" + prodCode + '\'' +
+                ", prodTitle='" + prodTitle + '\'' +
+                ", spec='" + spec + '\'' +
+                ", cmpCode='" + cmpCode + '\'' +
+                ", inbrand='" + inbrand + '\'' +
+                ", currency='" + currency + '\'' +
+                ", taxrate=" + taxrate +
+                ", fromDate=" + fromDate +
+                ", status=" + status +
+                ", overdue=" + overdue +
+                ", source='" + source + '\'' +
+                ", needquantity=" + needquantity +
+                ", sourceid=" + sourceid +
+                ", date=" + date +
+                ", enuu=" + enuu +
+                ", endDate=" + endDate +
+                ", remainingTime=" + remainingTime +
+                ", offerAmount=" + offerAmount +
+                ", quoted=" + quoted +
+                ", quteId=" + quteId +
+                ", agreed=" + agreed +
+                ", qutations=" + qutations +
+                ", quotation=" + quotation +
+                ", valid=" + valid +
+                ", allotStatus=" + allotStatus +
+                '}';
+    }
+
+    public Integer getValid() {
+        return valid;
+    }
+
+    public void setValid(Integer valid) {
+        this.valid = valid;
+    }
+
+}

+ 54 - 0
applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/po/PurchaseInquiryReply.java

@@ -0,0 +1,54 @@
+package com.usoftchina.inquiry.po;
+
+import java.io.Serializable;
+
+/**
+ * 采购询价单明细的报价记录
+ *
+ * @author hejq
+ * @date 2018-01-13 19:23
+ */
+public class PurchaseInquiryReply implements Serializable {
+
+    /**
+     * default serialVersionUID
+     */
+    private static final long serialVersionUID = 1L;
+
+    private Long id;
+
+    /**
+     * (买家或卖家定义的)分段数量
+     */
+    private Double lapQty;
+
+    /**
+     * (卖家报的)单价
+     */
+    private Double price;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Double getLapQty() {
+        return lapQty;
+    }
+
+    public void setLapQty(Double lapQty) {
+        this.lapQty = lapQty;
+    }
+
+    public Double getPrice() {
+        return price;
+    }
+
+    public void setPrice(Double price) {
+        this.price = price;
+    }
+
+}

+ 117 - 0
applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/po/User.java

@@ -0,0 +1,117 @@
+package com.usoftchina.inquiry.po;
+
+import java.io.Serializable;
+
+/**
+ * 只包含最基本的信息,用与跟单据关联展现
+ * @author suntg
+ *
+ */
+public class User implements Serializable {
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 用户UU
+     */
+    private Long userUU;
+
+    /**
+     * 用户姓名
+     */
+    private String userName;
+
+    /**
+     * 密码
+     */
+    private String userPwd;
+
+    /**
+     * 用户邮箱
+     */
+    private String userEmail;
+
+    /**
+     * 手机
+     */
+    private String userTel;
+
+    /**
+     * 性别
+     */
+    private String userSex;
+
+    /**
+     * imid
+     */
+    private Long userIMId;
+
+    private Enterprise enterprise;
+
+    public Long getUserUU() {
+        return userUU;
+    }
+
+    public void setUserUU(Long userUU) {
+        this.userUU = userUU;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getUserPwd() {
+        return userPwd;
+    }
+
+    public void setUserPwd(String userPwd) {
+        this.userPwd = userPwd;
+    }
+
+    public String getUserEmail() {
+        return userEmail;
+    }
+
+    public void setUserEmail(String userEmail) {
+        this.userEmail = userEmail;
+    }
+
+    public String getUserTel() {
+        return userTel;
+    }
+
+    public void setUserTel(String userTel) {
+        this.userTel = userTel;
+    }
+
+    public String getUserSex() {
+        return userSex;
+    }
+
+    public void setUserSex(String userSex) {
+        this.userSex = userSex;
+    }
+
+    public Long getUserIMId() {
+        return userIMId;
+    }
+
+    public void setUserIMId(Long userIMId) {
+        this.userIMId = userIMId;
+    }
+
+    public Enterprise getEnterprise() {
+        return enterprise;
+    }
+
+    public void setEnterprise(Enterprise enterprise) {
+        this.enterprise = enterprise;
+    }
+}

+ 84 - 0
applications/transfers/mall-api/src/test/java/com/usoftchina/inquiry/test/InquiryApiTest.java

@@ -0,0 +1,84 @@
+package com.usoftchina.inquiry.test;
+
+import com.usoftchina.inquiry.api.InquiryApi;
+import com.usoftchina.inquiry.po.*;
+import com.usoftchina.saas.utils.JsonUtils;
+import org.junit.FixMethodOrder;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.MethodSorters;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.data.domain.Page;
+import org.springframework.test.context.junit4.SpringRunner;
+import org.springframework.ui.ModelMap;
+
+import javax.naming.directory.InvalidSearchFilterException;
+
+/**
+ * 询报价接口测试
+ * @Author chenwei
+ * @Date 2019/01/04
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+public class InquiryApiTest {
+
+    @Autowired
+    private InquiryApi inquiryApi;
+
+    private static final Long userUU = 1000002503L;
+    private static final Long enUU = 10041559L;
+    private static final int pageNum = 1;
+    private static final int pageSize = 5;
+
+
+    @Test
+    public void testA_getInquiry() throws InvalidSearchFilterException {
+        IPage<PurcInquiryItemInfo> result = inquiryApi.getInquiry(pageNum, pageSize, "1", 1);
+        System.out.println(JsonUtils.toJsonString(result));
+    }
+
+    @Test
+    public void testB_findEnRemind(){
+        IPage<InquiryEnRemind> inquiryEnRemindIPage = inquiryApi.findEnRemind(userUU, enUU, pageNum, pageSize, 1);
+        System.out.println(JsonUtils.toJsonString(inquiryEnRemindIPage));
+    }
+
+    @Test
+    public void testC_findByUserInfo(){
+        IPage<InquiryRemind> inquiryRemindIPage = inquiryApi.findByUserInfo(userUU, enUU, pageNum, pageSize, 1, "1");
+        System.out.println(JsonUtils.toJsonString(inquiryRemindIPage));
+    }
+
+    @Test
+    public void testD_saveQuote(){
+        PublicInquiryItem publicInquiryItem = new PublicInquiryItem();
+        ModelMap modelMap = inquiryApi.saveQuote(publicInquiryItem);
+        System.out.println(JsonUtils.toJsonString(modelMap));
+    }
+
+    @Test
+    public void testE_saveQuote(){
+        PurcInquiry purcInquiry = new PurcInquiry();
+        PurcInquiry result = inquiryApi.saveInquiry(purcInquiry);
+        System.out.println(JsonUtils.toJsonString(result));
+    }
+
+    @Test
+    public void testF_getInquiryList(){
+        IPage<PurcInquiryItemInfo> getInquiryList = inquiryApi.getInquiryList(enUU, 1, pageNum, pageSize, "todo");
+        System.out.println(JsonUtils.toJsonString(getInquiryList));
+    }
+
+    @Test
+    public void testG_adoptQuote(){
+        inquiryApi.adoptQuote(0L, (short) 1, enUU, userUU);
+    }
+
+    @Test
+    public void testH_refuseQuote(){
+        inquiryApi.refuseQuote(0L, new Short("1"), enUU, userUU, "reason");
+    }
+}

+ 19 - 0
applications/transfers/mall-api/src/test/java/com/usoftchina/inquiry/test/InquiryTest.java

@@ -0,0 +1,19 @@
+package com.usoftchina.inquiry.test;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.openfeign.EnableFeignClients;
+
+/**
+ * @Author chenwei
+ * @Date 2019/01/04
+ */
+@SpringBootApplication(scanBasePackages = "com.usoftchina")
+@EnableFeignClients("com.usoftchina.inquiry")
+public class InquiryTest {
+
+    public static void main(String[] args) {
+        SpringApplication.run(InquiryTest.class, args);
+    }
+
+}

+ 4 - 0
applications/transfers/mall-api/src/test/resources/application.yml

@@ -0,0 +1,4 @@
+inquiry:
+  base-url: https://test-inquiry.uuzcc.cn
+Component:
+  base-url: https://test-mall.uuzcc.cn

+ 1 - 0
applications/transfers/pom.xml

@@ -15,6 +15,7 @@
     <modules>
         <module>transfers-api</module>
         <module>transfers-server</module>
+        <module>mall-api</module>
     </modules>
 
 </project>

+ 4 - 0
base-servers/account/account-api/pom.xml

@@ -29,6 +29,10 @@
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-data-redis</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>auth-common</artifactId>
+        </dependency>
     </dependencies>
 
 </project>

+ 11 - 0
base-servers/account/account-api/src/main/java/com/usoftchina/saas/account/api/AccountApi.java

@@ -4,6 +4,7 @@ import com.usoftchina.saas.account.dto.AccountCopyDTO;
 import com.usoftchina.saas.account.dto.AccountDTO;
 import com.usoftchina.saas.account.dto.AccountRegDTO;
 import com.usoftchina.saas.account.dto.AccountUpdateDTO;
+import com.usoftchina.saas.auth.common.cookie.CookieInfo;
 import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.commons.dto.ShareAddDTO;
 import org.springframework.cloud.openfeign.FeignClient;
@@ -105,4 +106,14 @@ public interface AccountApi {
      */
     @PostMapping("/account/share/join")
     Result shareJoin(@RequestBody ShareAddDTO shareAddDTO);
+
+    /**
+    * @Description 同步优软云密码
+    * @Param: [info]
+    * @return: void
+    * @Author: guq
+    * @Date: 2019/1/4
+    */
+    @PostMapping("/account/updatePassword")
+    Result updatePassword(@RequestBody CookieInfo info);
 }

+ 38 - 7
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/controller/AccountController.java

@@ -11,6 +11,7 @@ import com.usoftchina.saas.account.service.CompanyService;
 import com.usoftchina.saas.account.service.RoleService;
 import com.usoftchina.saas.account.vo.CompanyBaseVO;
 import com.usoftchina.saas.auth.client.annotation.IgnoreAuth;
+import com.usoftchina.saas.auth.common.cookie.CookieInfo;
 import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.commons.dto.ShareAddDTO;
@@ -20,13 +21,12 @@ import com.usoftchina.saas.exception.ExceptionCode;
 import com.usoftchina.saas.page.PageDefault;
 import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.sms.api.SmsApi;
-import com.usoftchina.saas.utils.BeanMapper;
-import com.usoftchina.saas.utils.CollectionUtils;
-import com.usoftchina.saas.utils.ObjectUtils;
-import com.usoftchina.saas.utils.RegexpUtils;
+import com.usoftchina.saas.utils.*;
 import com.usoftchina.sso.api.SsoUserApi;
 import com.usoftchina.sso.api.SsoUserSpaceApi;
 import com.usoftchina.sso.dto.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -57,7 +57,10 @@ public class AccountController {
     private SmsApi smsApi;
 
     private final String msgTemplateCode = "SMS_152288990";
+    private final static String CHECK_OPERATR = "fuzzyCheck";
 
+
+    private Logger logger = LoggerFactory.getLogger(getClass());
     /**
      * 注册
      *
@@ -196,16 +199,30 @@ public class AccountController {
         if (null == account) {
             return Result.error(ExceptionCode.USER_NOT_EXIST);
         }
-
+        if (StringUtils.isEmpty(account.getUu())) {
+            return Result.error(ExceptionCode.USER_NOT_EXISTUU);
+        }
         if (!account.isEnabled()) {
             return Result.error(ExceptionCode.USER_NOT_ENABLE);
         }
 
         boolean checked = accountService.checkPwd(account, password);
         if (!checked) {
-            return Result.error(ExceptionCode.USER_PWD_ERROR);
+            //去优软云检测密码
+            SsoResult ssoResult = ssoUserApi.fuzzyCheck(CHECK_OPERATR, account.getMobile(), password);
+            if (!ssoResult.isError()) {
+                //同步本地密码
+                CookieInfo info = new CookieInfo();
+                info.setUserUU(account.getUu());
+                info.setSalt(String.valueOf(account.getUu()));
+                String encryptedPassword = accountService.getEncryptedPassword(password, String.valueOf(account.getUu()));
+                info.setPassword(encryptedPassword);
+                accountService.updatePassword(info);
+            } else {
+                logger.error(ssoResult.getErrMsg());
+                return Result.error(ExceptionCode.USER_PWD_ERROR);
+            }
         }
-
         return Result.success(getAccountDTO(account));
     }
 
@@ -494,4 +511,18 @@ public class AccountController {
         ResourceCache.current().clear();
         return Result.success();
     }
+
+
+    /**
+    * @Description  同步优软云代码
+    * @Param: [info]
+    * @return: com.usoftchina.saas.base.Result
+    * @Author: guq
+    * @Date: 2019/1/4
+    */
+    @PostMapping("/updatePassword")
+    Result updatePassword(@RequestBody CookieInfo info) {
+        accountService.updatePassword(info);
+        return Result.success();
+    }
 }

+ 4 - 0
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/mapper/AccountMapper.java

@@ -130,4 +130,8 @@ public interface AccountMapper {
      * @param status
      */
     void updateBindCompanyStatus(@Param("accountId") Long accountId, @Param("companyId") Long companyId, @Param("status") String status);
+
+    Integer checkPassword(@Param("userUU") Long userUU, @Param("salt") String salt, @Param("password") String password);
+
+    void updatePassword(@Param("userUU") Long userUU, @Param("salt") String salt, @Param("password") String password);
 }

+ 3 - 0
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/AccountService.java

@@ -5,6 +5,7 @@ import com.usoftchina.saas.account.dto.AccountAddDTO;
 import com.usoftchina.saas.account.dto.AccountRoleDTO;
 import com.usoftchina.saas.account.po.Account;
 import com.usoftchina.saas.account.po.RoleResource;
+import com.usoftchina.saas.auth.common.cookie.CookieInfo;
 import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.commons.dto.ShareAddDTO;
@@ -217,4 +218,6 @@ public interface AccountService {
      * @param shareAddDTO
      */
     void shareJoin(ShareAddDTO shareAddDTO);
+
+    void updatePassword(CookieInfo info);
 }

+ 12 - 0
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/impl/AccountServiceImpl.java

@@ -17,6 +17,7 @@ import com.usoftchina.saas.account.po.RoleResource;
 import com.usoftchina.saas.account.service.AccountService;
 import com.usoftchina.saas.account.service.CompanyService;
 import com.usoftchina.saas.account.service.RoleService;
+import com.usoftchina.saas.auth.common.cookie.CookieInfo;
 import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.commons.dto.ShareAddDTO;
@@ -380,6 +381,17 @@ public class AccountServiceImpl implements AccountService {
         clearCache(account.getId());
     }
 
+    @Override
+    public void updatePassword(CookieInfo info) {
+        if (StringUtils.isEmpty(info) || StringUtils.isEmpty(info.getUserUU())) {
+            return;
+        }
+        Integer count = accountMapper.checkPassword(info.getUserUU(), info.getSalt(), info.getPassword());
+        if (count == 0) {
+            accountMapper.updatePassword(info.getUserUU(), info.getSalt(), info.getPassword());
+        }
+    }
+
     /**
      * 校验短信验证码准确性
      * @param mobile

+ 8 - 0
base-servers/account/account-server/src/main/resources/mapper/AccountMapper.xml

@@ -223,4 +223,12 @@
     <update id="updateBindCompanyStatus">
         UPDATE AC_ACCOUNT_COMPANY SET STATUS = #{status} WHERE ACCOUNT_ID = #{accountId} AND COMPANY_ID = #{companyId}
     </update>
+
+    <select id="checkPassword" resultType="integer">
+        select count(1) from ac_account where uu=#{userUU} and password = #{password} and salt = #{salt}
+    </select>
+
+    <update id="updatePassword" >
+        update ac_account set salt=#{salt}, password=#{password} where uu = #{userUU}
+    </update>
 </mapper>

+ 5 - 0
base-servers/auth/auth-server/src/main/java/com/usoftchina/saas/auth/controller/AuthController.java

@@ -254,6 +254,11 @@ public class AuthController {
                         ServletUtils.writeJsonPMessage(response, callback, false);
                         return;
                     }
+                } else {
+                    logger.info("同步密码: uu{} mobile{} salt{} password{}", info.getUserUU(),
+                            info.getMobile(), info.getSalt(), info.getPassword());
+                    //同步优软云密码
+                    accountApi.updatePassword(info);
                 }
             }
             // TODO

Some files were not shown because too many files changed in this diff