Browse Source

Merge remote-tracking branch 'origin/dev' into dev

rainco 8 years ago
parent
commit
90ba49336e
100 changed files with 4824 additions and 448 deletions
  1. 2 2
      applications/commons/commons-api/src/main/java/com/usoftchina/saas/commons/api/MaxnumberService.java
  2. 22 16
      applications/commons/commons-api/src/main/java/com/usoftchina/saas/commons/api/MessageLogService.java
  3. 3 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java
  4. 5 1
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/Status.java
  5. 71 16
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/MessageLogController.java
  6. 11 8
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/MessageLogService.java
  7. 26 17
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/MessageLogServiceImpl.java
  8. 1 1
      applications/document/document-api/src/main/java/com/usoftchina/saas/document/api/ProductApi.java
  9. 2 2
      applications/document/document-api/src/main/java/com/usoftchina/saas/document/api/WarehouseApi.java
  10. 2 0
      applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/CustomercontactDTO.java
  11. 227 0
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Bankinformation.java
  12. 1 0
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/CustomerList.java
  13. 2 0
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Customercontact.java
  14. 128 0
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/VendorList.java
  15. 41 31
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Vendorcontact.java
  16. 13 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/DocumentApplication.java
  17. 38 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/BankinformationController.java
  18. 5 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/CustomerkindController.java
  19. 28 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductController.java
  20. 69 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/VendorController.java
  21. 20 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/BankinformationMapper.java
  22. 3 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomerMapper.java
  23. 2 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomeraddressMapper.java
  24. 2 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomercontactMapper.java
  25. 4 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomerkindMapper.java
  26. 2 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProductMapper.java
  27. 3 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/VendorMapper.java
  28. 10 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/VendorcontactMapper.java
  29. 15 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/BankinformationService.java
  30. 4 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/CustomerkindService.java
  31. 30 3
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProductService.java
  32. 51 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/VendorService.java
  33. 23 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/AddressServiceImpl.java
  34. 34 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/BankinformationServiceImpl.java
  35. 41 5
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerServiceImpl.java
  36. 35 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerkindServiceImpl.java
  37. 21 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/FundinouttypeServiceImpl.java
  38. 91 4
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductServiceImpl.java
  39. 7 6
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductbrandServiceImpl.java
  40. 24 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProducttypeServiceImpl.java
  41. 25 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductunitServiceImpl.java
  42. 144 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/VendorServiceImpl.java
  43. 23 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/VendorkindServiceImpl.java
  44. 25 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/WarehouseServiceImpl.java
  45. 329 0
      applications/document/document-server/src/main/resources/mapper/BankinformationMapper.xml
  46. 29 2
      applications/document/document-server/src/main/resources/mapper/CustomerListMapper.xml
  47. 16 8
      applications/document/document-server/src/main/resources/mapper/CustomerMapper.xml
  48. 5 0
      applications/document/document-server/src/main/resources/mapper/CustomeraddressMapper.xml
  49. 31 4
      applications/document/document-server/src/main/resources/mapper/CustomercontactMapper.xml
  50. 3 0
      applications/document/document-server/src/main/resources/mapper/CustomerkindMapper.xml
  51. 49 0
      applications/document/document-server/src/main/resources/mapper/VendorMapper.xml
  52. 219 49
      applications/document/document-server/src/main/resources/mapper/VendorcontactMapper.xml
  53. 1 1
      applications/document/document-server/src/test/java/com/usoftchina/saas/document/mapper/CustomeraddressMapperTest.java
  54. 1 5
      applications/document/document-server/src/test/java/com/usoftchina/saas/document/mapper/CustomercontactMapperTest.java
  55. 1 3
      applications/money/money-server/pom.xml
  56. 60 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/OthreceiptsController.java
  57. 63 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/OthspengdingsController.java
  58. 19 13
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/PaybalanceController.java
  59. 28 18
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/RecbalanceContorller.java
  60. 21 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/OthreceiptsMapper.java
  61. 18 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/OthreceiptsdetailMapper.java
  62. 21 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/OthspendingsMapper.java
  63. 18 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/OthspendingsdetailMapper.java
  64. 6 2
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/PaybalancedetMapper.java
  65. 6 2
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/PaybalancedetailMapper.java
  66. 2 2
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/RecbalancedetMapper.java
  67. 4 1
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/RecbalancedetailMapper.java
  68. 245 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othreceipts.java
  69. 155 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othreceiptsdetail.java
  70. 28 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othsp.java
  71. 245 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othspendings.java
  72. 155 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othspendingsdetail.java
  73. 28 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othte.java
  74. 17 15
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Pay.java
  75. 6 6
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Paybalance.java
  76. 17 15
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Rec.java
  77. 6 6
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalance.java
  78. 3 7
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalancedetail.java
  79. 28 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/OthreceiptsService.java
  80. 29 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/OthspendingsService.java
  81. 7 4
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/PaybalanceService.java
  82. 11 5
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/RecbalanceService.java
  83. 105 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthreceiptsServiceImpl.java
  84. 106 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthspendingsServiceImpl.java
  85. 61 22
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/PaybalanceServiceImpl.java
  86. 75 24
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/RecbalanceServiceImpl.java
  87. 5 5
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/VerificationServiceImpl.java
  88. 326 0
      applications/money/money-server/src/main/resources/mapper/OthreceiptsMapper.xml
  89. 218 0
      applications/money/money-server/src/main/resources/mapper/OthreceiptsdetailMapper.xml
  90. 319 0
      applications/money/money-server/src/main/resources/mapper/OthspendingsMapper.xml
  91. 218 0
      applications/money/money-server/src/main/resources/mapper/OthspendingsdetailMapper.xml
  92. 2 2
      applications/money/money-server/src/main/resources/mapper/PaybalanceMapper.xml
  93. 22 14
      applications/money/money-server/src/main/resources/mapper/PaybalancedetMapper.xml
  94. 19 13
      applications/money/money-server/src/main/resources/mapper/PaybalancedetailMapper.xml
  95. 16 16
      applications/money/money-server/src/main/resources/mapper/RecbalanceMapper.xml
  96. 28 22
      applications/money/money-server/src/main/resources/mapper/RecbalancedetMapper.xml
  97. 25 19
      applications/money/money-server/src/main/resources/mapper/RecbalancedetailMapper.xml
  98. 7 6
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/PurchaseController.java
  99. 3 2
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/PurchaseMapper.java
  100. 3 2
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/ProdInOutServiceImpl.java

+ 2 - 2
applications/commons/commons-api/src/main/java/com/usoftchina/saas/commons/api/MaxnumberService.java

@@ -18,7 +18,7 @@ public interface MaxnumberService {
      * @Author: guq
      * @Date: 2018/10/19 api/commons
      */
-    @PostMapping("/api/commons/number/pushMaxnubmer")
+    @PostMapping("/number/pushMaxnubmer")
     public Result<String> pushMaxnubmer(@RequestParam("count") Integer count,@RequestParam("code") String code,
                                 @RequestParam("caller") String caller);
     /**
@@ -28,6 +28,6 @@ public interface MaxnumberService {
      * @Author: guq
      * @Date: 2018/10/22
      */
-    @PostMapping("/api/commons/numnber/getMaxnumber")
+    @PostMapping("/numnber/getMaxnumber")
     public Result<String> getMaxnumber(@RequestParam("caller") String caller, @RequestParam("update") boolean update);
 }

+ 22 - 16
applications/commons/commons-api/src/main/java/com/usoftchina/saas/commons/api/MessageLogService.java

@@ -1,9 +1,12 @@
 package com.usoftchina.saas.commons.api;
 
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.po.Operation;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.context.request.async.DeferredResult;
 
 /**
 * @Description: 日志接口
@@ -13,27 +16,30 @@ import org.springframework.web.bind.annotation.RequestMapping;
 @FeignClient("commons-server")
 public interface MessageLogService {
 
-    @RequestMapping("/api/commons/messagelog/save")
-    public void save(@RequestBody DocBaseDTO baseDTO);
+    @RequestMapping("/messagelog/save")
+    public String save(@RequestBody DocBaseDTO baseDTO);
 
-    @RequestMapping("/api/commons/messagelog/update")
-    public void update(@RequestBody DocBaseDTO baseDTO);
+    @RequestMapping("/messagelog/update")
+    public String update(@RequestBody DocBaseDTO baseDTO);
 
-    @RequestMapping("/api/commons/messagelog/delete")
-    public void delete(@RequestBody DocBaseDTO baseDTO);
+    @RequestMapping("/messagelog/delete")
+    public String delete(@RequestBody DocBaseDTO baseDTO);
 
-    @RequestMapping("/api/commons/messagelog/deleteDetail")
-    public void deleteDetail(@RequestBody DocBaseDTO baseDTO);
+    @RequestMapping("/messagelog/deleteDetail")
+    public String deleteDetail(@RequestBody DocBaseDTO baseDTO);
 
-    @RequestMapping("/api/commons/messagelog/audit")
-    public void audit(@RequestBody DocBaseDTO baseDTO);
+    @RequestMapping("/messagelog/audit")
+    public String audit(@RequestBody DocBaseDTO baseDTO);
 
-    @RequestMapping("/api/commons/messagelog/unAudit")
-    public void unAudit(@RequestBody DocBaseDTO baseDTO);
+    @RequestMapping("/messagelog/unAudit")
+    public String unAudit(@RequestBody DocBaseDTO baseDTO);
 
-    @RequestMapping("/api/commons/messagelog/close")
-    public void close(@RequestBody DocBaseDTO baseDTO);
+    @RequestMapping("/messagelog/close")
+    public String close(@RequestBody DocBaseDTO baseDTO);
 
-    @RequestMapping("/api/commons/messagelog/open")
-    public void open(@RequestBody DocBaseDTO baseDTO);
+    @RequestMapping("/messagelog/open")
+    public String open(@RequestBody DocBaseDTO baseDTO);
+
+    @RequestMapping("/messagelog/customizeLog")
+    public String customizeLog(@RequestBody DocBaseDTO baseDTO, @RequestParam("operation") Operation operation);
 }

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

@@ -22,6 +22,9 @@ public enum BizExceptionCode implements BaseExceptionCode {
     CODE_EXISTS(79200, "单据编号已存在"),
     BIZ_CLOSE(79301, "只能关闭已审核的单据"),
     BIZ_OPEN(79002, "只能打开已关闭的单据"),
+    NO_DATA(79998, "未找到数据"),
+    ILLEGAL_ID(79999, "id不正确"),
+
 
     //采购
 

+ 5 - 1
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/Status.java

@@ -44,8 +44,12 @@ public enum Status {
     /**
      * 未出库
      */
-    UNTURNOUT("未出库")
+    UNTURNOUT("未出库"),
 
+    /**
+     * 开启
+     */
+    OPEN("开启")
 
     ;
     private String display;

+ 71 - 16
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/MessageLogController.java

@@ -1,11 +1,17 @@
 package com.usoftchina.saas.commons.controller;
 
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.po.Operation;
 import com.usoftchina.saas.commons.service.MessageLogService;
+
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestBody;
 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.context.request.async.DeferredResult;
+
+import java.util.concurrent.CompletableFuture;
 
 /**
  * @author: guq
@@ -19,42 +25,91 @@ public class MessageLogController {
     private MessageLogService messageLogService;
 
     @RequestMapping("/save")
-    public void save(@RequestBody DocBaseDTO baseDTO) {
-        messageLogService.save(baseDTO);
+    public DeferredResult<String> save(@RequestBody DocBaseDTO baseDTO) {
+        // Create the deferredResult and initiate a callback object, task, with it
+        DeferredResult<String> deferredResult = new DeferredResult<>();
+        CompletableFuture.supplyAsync(() -> messageLogService.save(baseDTO))
+                .whenCompleteAsync((result, throwable) -> deferredResult.setResult(result));
+        return deferredResult;
     }
 
     @RequestMapping("/update")
-    public void update(@RequestBody DocBaseDTO baseDTO) {
-        messageLogService.update(baseDTO);
+    public DeferredResult<String> update(@RequestBody DocBaseDTO baseDTO) {
+        // Create the deferredResult and initiate a callback object, task, with it
+        DeferredResult<String> deferredResult = new DeferredResult<>();
+        CompletableFuture.supplyAsync(() -> messageLogService.update(baseDTO))
+                .whenCompleteAsync((result, throwable) -> deferredResult.setResult(result));
+        return deferredResult;
     }
 
     @RequestMapping("/delete")
-    public void delete(@RequestBody DocBaseDTO baseDTO) {
-        messageLogService.delete(baseDTO);
+    public DeferredResult<String> delete(@RequestBody DocBaseDTO baseDTO) {
+        // Create the deferredResult and initiate a callback object, task, with it
+        DeferredResult<String> deferredResult = new DeferredResult<>();
+        CompletableFuture.supplyAsync(() -> messageLogService.delete(baseDTO))
+                .whenCompleteAsync((result, throwable) -> deferredResult.setResult(result));
+        return deferredResult;
     }
 
     @RequestMapping("/deleteDetail")
-    public void deleteDetail(@RequestBody DocBaseDTO baseDTO) {
-        messageLogService.deleteDetail(baseDTO);
+    public DeferredResult<String> deleteDetail(@RequestBody DocBaseDTO baseDTO) {
+        // Create the deferredResult and initiate a callback object, task, with it
+        DeferredResult<String> deferredResult = new DeferredResult<>();
+        CompletableFuture.supplyAsync(() -> messageLogService.deleteDetail(baseDTO))
+                .whenCompleteAsync((result, throwable) -> deferredResult.setResult(result));
+        return deferredResult;
     }
 
     @RequestMapping("/audit")
-    public void audit(@RequestBody DocBaseDTO baseDTO) {
-        messageLogService.audit(baseDTO);
+    public DeferredResult<String> audit(@RequestBody DocBaseDTO baseDTO) {
+        // Create the deferredResult and initiate a callback object, task, with it
+        DeferredResult<String> deferredResult = new DeferredResult<>();
+        CompletableFuture.supplyAsync(() -> messageLogService.audit(baseDTO))
+                .whenCompleteAsync((result, throwable) -> deferredResult.setResult(result));
+        return deferredResult;
     }
 
     @RequestMapping("/unAudit")
-    public void unAudit(@RequestBody DocBaseDTO baseDTO) {
-        messageLogService.unAudit(baseDTO);
+    public DeferredResult<String> unAudit(@RequestBody DocBaseDTO baseDTO) {
+        // Create the deferredResult and initiate a callback object, task, with it
+        DeferredResult<String> deferredResult = new DeferredResult<>();
+        CompletableFuture.supplyAsync(() -> messageLogService.unAudit(baseDTO))
+                .whenCompleteAsync((result, throwable) -> deferredResult.setResult(result));
+        return deferredResult;
     }
 
     @RequestMapping("/close")
-    public void close(@RequestBody DocBaseDTO baseDTO) {
-        messageLogService.close(baseDTO);
+    public DeferredResult<String> close(@RequestBody DocBaseDTO baseDTO) {
+        // Create the deferredResult and initiate a callback object, task, with it
+        DeferredResult<String> deferredResult = new DeferredResult<>();
+        CompletableFuture.supplyAsync(() -> messageLogService.close(baseDTO))
+                .whenCompleteAsync((result, throwable) -> deferredResult.setResult(result));
+        return deferredResult;
     }
 
     @RequestMapping("/open")
-    public void open(@RequestBody DocBaseDTO baseDTO) {
-        messageLogService.open(baseDTO);
+    public DeferredResult<String> open(@RequestBody DocBaseDTO baseDTO) {
+        // Create the deferredResult and initiate a callback object, task, with it
+        DeferredResult<String> deferredResult = new DeferredResult<>();
+        CompletableFuture.supplyAsync(() -> messageLogService.open(baseDTO))
+                .whenCompleteAsync((result, throwable) -> deferredResult.setResult(result));
+        return deferredResult;
+    }
+
+    /**
+    * @Description 自定义的Log
+    * @Param: [baseDTO]
+    * @return: org.springframework.web.context.request.async.DeferredResult<java.lang.String>
+    * @Author: guq
+    * @Date: 2018/10/25
+    */
+    @RequestMapping("/customizeLog")
+    public DeferredResult<String> customizeLog(@RequestBody DocBaseDTO baseDTO, @RequestParam Operation operation) {
+        // Create the deferredResult and initiate a callback object, task, with it
+        DeferredResult<String> deferredResult = new DeferredResult<>();
+        System.out.println(operation.getTitle() + "  : " + operation.getResult());
+        CompletableFuture.supplyAsync(() -> messageLogService.customizeLog(baseDTO, operation))
+                .whenCompleteAsync((result, throwable) -> deferredResult.setResult(result));
+        return deferredResult;
     }
 }

+ 11 - 8
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/MessageLogService.java

@@ -4,21 +4,24 @@ import com.usoftchina.saas.base.service.CommonBaseService;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.mapper.MessagelogMapper;
 import com.usoftchina.saas.commons.po.Messagelog;
+import com.usoftchina.saas.commons.po.Operation;
 
 public interface MessageLogService extends CommonBaseService<MessagelogMapper, Messagelog>{
-    void save(DocBaseDTO baseDTO);
+    String save(DocBaseDTO baseDTO);
 
-    void update(DocBaseDTO baseDTO);
+    String update(DocBaseDTO baseDTO);
 
-    void delete(DocBaseDTO baseDTO);
+    String delete(DocBaseDTO baseDTO);
 
-    void deleteDetail(DocBaseDTO baseDTO);
+    String deleteDetail(DocBaseDTO baseDTO);
 
-    void audit(DocBaseDTO baseDTO);
+    String audit(DocBaseDTO baseDTO);
 
-    void unAudit(DocBaseDTO baseDTO);
+    String unAudit(DocBaseDTO baseDTO);
 
-    void close(DocBaseDTO baseDTO);
+    String close(DocBaseDTO baseDTO);
 
-    void open(DocBaseDTO baseDTO);
+    String open(DocBaseDTO baseDTO);
+
+    String customizeLog(DocBaseDTO baseDTO, Operation operation);
 }

+ 26 - 17
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/MessageLogServiceImpl.java

@@ -7,6 +7,8 @@ import com.usoftchina.saas.commons.po.Messagelog;
 import com.usoftchina.saas.commons.po.Operation;
 import com.usoftchina.saas.commons.service.MessageLogService;
 import com.usoftchina.saas.context.BaseContextHolder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.MessageSource;
 import org.springframework.stereotype.Service;
@@ -25,46 +27,52 @@ public class MessageLogServiceImpl extends CommonBaseServiceImpl<MessagelogMappe
     private MessageSource messageSource;
 
     @Override
-    public void save(DocBaseDTO baseDTO) {
-        log(Operation.SAVE, baseDTO);
+    public String save(DocBaseDTO baseDTO) {
+        return log(Operation.SAVE, baseDTO);
+
+    }
+
+    @Override
+    public String update(DocBaseDTO baseDTO) {
+        return log(Operation.UPDATE, baseDTO);
     }
 
     @Override
-    public void update(DocBaseDTO baseDTO) {
-        log(Operation.UPDATE, baseDTO);
+    public String delete(DocBaseDTO baseDTO) {
+        return log(Operation.DELETE, baseDTO);
     }
 
     @Override
-    public void delete(DocBaseDTO baseDTO) {
-        log(Operation.DELETE, baseDTO);
+    public String deleteDetail(DocBaseDTO baseDTO) {
+        return log(Operation.DELETEDETAIL, baseDTO);
     }
 
     @Override
-    public void deleteDetail(DocBaseDTO baseDTO) {
-        log(Operation.DELETEDETAIL, baseDTO);
+    public String audit(DocBaseDTO baseDTO) {
+        return log(Operation.AUDIT, baseDTO);
     }
 
     @Override
-    public void audit(DocBaseDTO baseDTO) {
-        log(Operation.AUDIT, baseDTO);
+    public String unAudit(DocBaseDTO baseDTO) {
+        return log(Operation.RESAUDIT, baseDTO);
     }
 
     @Override
-    public void unAudit(DocBaseDTO baseDTO) {
-        log(Operation.RESAUDIT, baseDTO);
+    public String close(DocBaseDTO baseDTO) {
+        return log(Operation.CLOSE, baseDTO);
     }
 
     @Override
-    public void close(DocBaseDTO baseDTO) {
-        log(Operation.CLOSE, baseDTO);
+    public String open(DocBaseDTO baseDTO) {
+        return log(Operation.OPEN, baseDTO);
     }
 
     @Override
-    public void open(DocBaseDTO baseDTO) {
-        log(Operation.OPEN, baseDTO);
+    public String customizeLog(DocBaseDTO baseDTO, Operation operation) {
+        return log(operation, baseDTO);
     }
 
-    private void log(Operation operation, DocBaseDTO baseDTO) {
+    private String log(Operation operation, DocBaseDTO baseDTO) {
         String language = "zh_CN";
         Messagelog msg = new Messagelog();
         msg.setMl_caller(baseDTO.getName());
@@ -76,6 +84,7 @@ public class MessageLogServiceImpl extends CommonBaseServiceImpl<MessagelogMappe
         msg.setCreatorId(BaseContextHolder.getUserId());
         msg.setMl_keyvalue(baseDTO.getId());
         getMapper().insert(msg);
+        return "success";
     }
 
     private String getLocalMessage(String msg, String language) {

+ 1 - 1
applications/document/document-api/src/main/java/com/usoftchina/saas/document/api/ProductApi.java

@@ -29,6 +29,6 @@ public interface ProductApi {
     * @Author: guq
     * @Date: 2018/10/16
     */
-    @RequestMapping("/api/document/product/updateLatestPurchasePrice")
+    @RequestMapping("/product/updateLatestPurchasePrice")
     public void updateLatestPurchasePrice(@RequestParam(value = "id") Long pu_id);
 }

+ 2 - 2
applications/document/document-api/src/main/java/com/usoftchina/saas/document/api/WarehouseApi.java

@@ -9,10 +9,10 @@ import java.util.Map;
 @FeignClient(name = "document-server")
 public interface WarehouseApi {
 
-    @GetMapping("/api/document/warehouse/post")
+    @GetMapping("/warehouse/post")
     public Result post(Map<String, Object> param);
 
-    @GetMapping("/api/document/warehouse/unPost")
+    @GetMapping("/warehouse/unPost")
     public Result unPost(Map<String, Object> param);
 
 }

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

@@ -30,4 +30,6 @@ public class CustomercontactDTO extends CommonBaseEntity implements Serializable
 
     private String cc_text5;
 
+    private Integer cc_default;
+
 }

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

@@ -0,0 +1,227 @@
+package com.usoftchina.saas.document.entities;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+
+import java.util.Date;
+
+public class Bankinformation extends CommonBaseEntity {
+    private Integer bkId;
+
+    private String bkBankcode;
+
+    private String bkBankname;
+
+    private Date bkDate;
+
+    private String bkType;
+
+    private Double bkBeginamount;
+
+    private Double bkThisamount;
+
+    private String bkStatus;
+
+    private String bkStatuscode;
+
+    private Integer bkRecorderid;
+
+    private String bkRecorder;
+
+    private Date bkRecorddate;
+
+    private Integer bkYm;
+
+    private Integer companyid;
+
+    private Integer updaterid;
+
+    private Date updatetime;
+
+    private String bkText1;
+
+    private String bkText2;
+
+    private String bkText3;
+
+    private String bkText4;
+
+    private String bkText5;
+
+    private String bkRemark;
+
+    public Integer getBkId() {
+        return bkId;
+    }
+
+    public void setBkId(Integer bkId) {
+        this.bkId = bkId;
+    }
+
+    public String getBkBankcode() {
+        return bkBankcode;
+    }
+
+    public void setBkBankcode(String bkBankcode) {
+        this.bkBankcode = bkBankcode == null ? null : bkBankcode.trim();
+    }
+
+    public String getBkBankname() {
+        return bkBankname;
+    }
+
+    public void setBkBankname(String bkBankname) {
+        this.bkBankname = bkBankname == null ? null : bkBankname.trim();
+    }
+
+    public Date getBkDate() {
+        return bkDate;
+    }
+
+    public void setBkDate(Date bkDate) {
+        this.bkDate = bkDate;
+    }
+
+    public String getBkType() {
+        return bkType;
+    }
+
+    public void setBkType(String bkType) {
+        this.bkType = bkType == null ? null : bkType.trim();
+    }
+
+    public Double getBkBeginamount() {
+        return bkBeginamount;
+    }
+
+    public void setBkBeginamount(Double bkBeginamount) {
+        this.bkBeginamount = bkBeginamount;
+    }
+
+    public Double getBkThisamount() {
+        return bkThisamount;
+    }
+
+    public void setBkThisamount(Double bkThisamount) {
+        this.bkThisamount = bkThisamount;
+    }
+
+    public String getBkStatus() {
+        return bkStatus;
+    }
+
+    public void setBkStatus(String bkStatus) {
+        this.bkStatus = bkStatus == null ? null : bkStatus.trim();
+    }
+
+    public String getBkStatuscode() {
+        return bkStatuscode;
+    }
+
+    public void setBkStatuscode(String bkStatuscode) {
+        this.bkStatuscode = bkStatuscode == null ? null : bkStatuscode.trim();
+    }
+
+    public Integer getBkRecorderid() {
+        return bkRecorderid;
+    }
+
+    public void setBkRecorderid(Integer bkRecorderid) {
+        this.bkRecorderid = bkRecorderid;
+    }
+
+    public String getBkRecorder() {
+        return bkRecorder;
+    }
+
+    public void setBkRecorder(String bkRecorder) {
+        this.bkRecorder = bkRecorder == null ? null : bkRecorder.trim();
+    }
+
+    public Date getBkRecorddate() {
+        return bkRecorddate;
+    }
+
+    public void setBkRecorddate(Date bkRecorddate) {
+        this.bkRecorddate = bkRecorddate;
+    }
+
+    public Integer getBkYm() {
+        return bkYm;
+    }
+
+    public void setBkYm(Integer bkYm) {
+        this.bkYm = bkYm;
+    }
+
+    public Integer getCompanyid() {
+        return companyid;
+    }
+
+    public void setCompanyid(Integer companyid) {
+        this.companyid = companyid;
+    }
+
+    public Integer getUpdaterid() {
+        return updaterid;
+    }
+
+    public void setUpdaterid(Integer updaterid) {
+        this.updaterid = updaterid;
+    }
+
+    public Date getUpdatetime() {
+        return updatetime;
+    }
+
+    public void setUpdatetime(Date updatetime) {
+        this.updatetime = updatetime;
+    }
+
+    public String getBkText1() {
+        return bkText1;
+    }
+
+    public void setBkText1(String bkText1) {
+        this.bkText1 = bkText1 == null ? null : bkText1.trim();
+    }
+
+    public String getBkText2() {
+        return bkText2;
+    }
+
+    public void setBkText2(String bkText2) {
+        this.bkText2 = bkText2 == null ? null : bkText2.trim();
+    }
+
+    public String getBkText3() {
+        return bkText3;
+    }
+
+    public void setBkText3(String bkText3) {
+        this.bkText3 = bkText3 == null ? null : bkText3.trim();
+    }
+
+    public String getBkText4() {
+        return bkText4;
+    }
+
+    public void setBkText4(String bkText4) {
+        this.bkText4 = bkText4 == null ? null : bkText4.trim();
+    }
+
+    public String getBkText5() {
+        return bkText5;
+    }
+
+    public void setBkText5(String bkText5) {
+        this.bkText5 = bkText5 == null ? null : bkText5.trim();
+    }
+
+    public String getBkRemark() {
+        return bkRemark;
+    }
+
+    public void setBkRemark(String bkRemark) {
+        this.bkRemark = bkRemark == null ? null : bkRemark.trim();
+    }
+}

+ 1 - 0
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/CustomerList.java

@@ -109,4 +109,5 @@ public class CustomerList extends CommonBaseEntity{
 
     private String cc_text5;
 
+    private Integer cc_default;
 }

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

@@ -29,4 +29,6 @@ public class Customercontact extends CommonBaseEntity implements Serializable {
 
     private String cc_text5;
 
+    private Integer cc_default;
+
 }

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

@@ -0,0 +1,128 @@
+package com.usoftchina.saas.document.entities;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+public class VendorList implements Serializable {
+
+    /* 主表字段 */
+    private Long ve_id;
+    /**
+     * 供应商编号
+     */
+    private String ve_code;
+    /**
+     * 供应商名称
+     */
+    private String ve_name;
+    /**
+     * 供应商UU
+     */
+    private String ve_uu;
+    /**
+     * 供应商类型
+     */
+    private String ve_type;
+    /**
+     * 期初日期
+     */
+    private Date ve_begindate;
+    /**
+     * 期初应付
+     */
+    private long ve_beginapamount;
+    /**
+     * 期初预付
+     */
+    private long ve_beginprepayamount;
+    /**
+     * 承付天数
+     */
+    private long ve_promisedays;
+    /**
+     * 税率
+     */
+    private double ve_taxrate;
+    /**
+     * 纳税人识别号
+     */
+    private String ve_nsrzh;
+    /**
+     * 银行账号
+     */
+    private String ve_bankaccount;
+    /**
+     * 银行行号
+     */
+    private String ve_bankcode;
+    /**
+     * 状态   defualt "启用"
+     */
+    private String ve_status;
+    /**
+     * 状态码
+     */
+    private String ve_statuscode;
+    /**
+     * 录入人ID
+     */
+    private long ve_recordid;
+    /**
+     * 录入人
+     */
+    private String ve_recordname;
+    /**
+     * 建立日期
+     */
+    private Date ve_initdate;
+    /**
+     * 自定义字段
+     */
+    private String ve_text1;
+    /**
+     * 自定义字段
+     */
+    private String ve_text2;
+    /**
+     * 自定义字段
+     */
+    private String ve_text3;
+    /**
+     * 自定义字段
+     */
+    private String ve_text4;
+    /**
+     * 自定义字段
+     */
+    private String ve_text5;
+
+    /* 从表字段 */
+
+    private Integer vc_veid;
+
+    private Integer vc_detno;
+
+    private String vc_name;
+
+    private Integer vc_tel;
+
+    private String vc_qq;
+
+    private String vc_email;
+
+    private String vc_text1;
+
+    private String vc_text2;
+
+    private String vc_text3;
+
+    private String vc_text4;
+
+    private String vc_text5;
+
+    private String vc_default;
+
+}

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

@@ -6,7 +6,7 @@ import java.io.Serializable;
 import java.util.Date;
 
 public class Vendorcontact extends CommonBaseEntity implements Serializable {
-    private Integer vc_veid;
+    private Long vc_veid;
 
     private Integer vc_detno;
 
@@ -18,21 +18,23 @@ public class Vendorcontact extends CommonBaseEntity implements Serializable {
 
     private String vc_email;
 
-    private String ve_text1;
+    private String vc_text1;
 
-    private String ve_text2;
+    private String vc_text2;
 
-    private String ve_text3;
+    private String vc_text3;
 
-    private String ve_text4;
+    private String vc_text4;
 
-    private String ve_text5;
+    private String vc_text5;
 
-    public Integer getVc_veid() {
+    private String vc_default;
+
+    public Long getVc_veid() {
         return vc_veid;
     }
 
-    public void setVc_veid(Integer vc_veid) {
+    public void setVc_veid(Long vc_veid) {
         this.vc_veid = vc_veid;
     }
 
@@ -49,7 +51,7 @@ public class Vendorcontact extends CommonBaseEntity implements Serializable {
     }
 
     public void setVc_name(String vc_name) {
-        this.vc_name = vc_name == null ? null : vc_name.trim();
+        this.vc_name = vc_name;
     }
 
     public Integer getVc_tel() {
@@ -65,7 +67,7 @@ public class Vendorcontact extends CommonBaseEntity implements Serializable {
     }
 
     public void setVc_qq(String vc_qq) {
-        this.vc_qq = vc_qq == null ? null : vc_qq.trim();
+        this.vc_qq = vc_qq;
     }
 
     public String getVc_email() {
@@ -73,46 +75,54 @@ public class Vendorcontact extends CommonBaseEntity implements Serializable {
     }
 
     public void setVc_email(String vc_email) {
-        this.vc_email = vc_email == null ? null : vc_email.trim();
+        this.vc_email = vc_email;
+    }
+
+    public String getVc_text1() {
+        return vc_text1;
+    }
+
+    public void setVc_text1(String vc_text1) {
+        this.vc_text1 = vc_text1;
     }
 
-    public String getVe_text1() {
-        return ve_text1;
+    public String getVc_text2() {
+        return vc_text2;
     }
 
-    public void setVe_text1(String ve_text1) {
-        this.ve_text1 = ve_text1 == null ? null : ve_text1.trim();
+    public void setVc_text2(String vc_text2) {
+        this.vc_text2 = vc_text2;
     }
 
-    public String getVe_text2() {
-        return ve_text2;
+    public String getVc_text3() {
+        return vc_text3;
     }
 
-    public void setVe_text2(String ve_text2) {
-        this.ve_text2 = ve_text2 == null ? null : ve_text2.trim();
+    public void setVc_text3(String vc_text3) {
+        this.vc_text3 = vc_text3;
     }
 
-    public String getVe_text3() {
-        return ve_text3;
+    public String getVc_text4() {
+        return vc_text4;
     }
 
-    public void setVe_text3(String ve_text3) {
-        this.ve_text3 = ve_text3 == null ? null : ve_text3.trim();
+    public void setVc_text4(String vc_text4) {
+        this.vc_text4 = vc_text4;
     }
 
-    public String getVe_text4() {
-        return ve_text4;
+    public String getVc_text5() {
+        return vc_text5;
     }
 
-    public void setVe_text4(String ve_text4) {
-        this.ve_text4 = ve_text4 == null ? null : ve_text4.trim();
+    public void setVc_text5(String vc_text5) {
+        this.vc_text5 = vc_text5;
     }
 
-    public String getVe_text5() {
-        return ve_text5;
+    public String getVc_default() {
+        return vc_default;
     }
 
-    public void setVe_text5(String ve_text5) {
-        this.ve_text5 = ve_text5 == null ? null : ve_text5.trim();
+    public void setVc_default(String vc_default) {
+        this.vc_default = vc_default;
     }
 }

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

@@ -6,17 +6,28 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
 import org.springframework.cloud.openfeign.EnableFeignClients;
 import org.springframework.transaction.annotation.EnableTransactionManagement;
+import org.springframework.web.servlet.config.annotation.CorsRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
 
 @SpringBootApplication
 @EnableEurekaClient
 //@EnableAuthClient
 @EnableTransactionManagement
-@EnableFeignClients
+@EnableFeignClients("com.usoftchina.saas")
 @MapperScan("com.usoftchina.saas.document.mapper")
-public class DocumentApplication {
+public class DocumentApplication extends WebMvcConfigurerAdapter {
 
     public static void main(String[] args) {
         SpringApplication.run(DocumentApplication.class);
     }
 
+    @Override
+    public void addCorsMappings(CorsRegistry registry) {
+        registry.addMapping("/**")
+                .allowCredentials(true)
+                .allowedHeaders("*")
+                .allowedOrigins("*")
+                .allowedMethods("*");
+    }
+
 }

+ 38 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/BankinformationController.java

@@ -0,0 +1,38 @@
+package com.usoftchina.saas.document.controller;
+
+import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.document.entities.Bankinformation;
+import com.usoftchina.saas.document.service.BankinformationService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * @author heqw
+ * @date 2018/10/25 15:33
+ **/
+@RestController
+@RequestMapping("/Bankinformation")
+public class BankinformationController {
+    @Autowired
+    BankinformationService bankinformationService;
+
+    @PostMapping("/save")
+    public Result save(@RequestBody Bankinformation bankinformation){
+        bankinformationService.save(bankinformation);
+        return Result.success();
+    }
+
+    @PostMapping("/delete/{id}")
+    public Result delete(@PathVariable("id") int id){
+        bankinformationService.removeByPrimaryKey(id);
+        return Result.success();
+    }
+
+    @GetMapping("/getAll")
+    public Result getAll(){
+        List<Bankinformation> bankinformationList = bankinformationService.findAll();
+        return Result.success(bankinformationList);
+    }
+}

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

@@ -34,4 +34,9 @@ public class CustomerkindController {
         return Result.success(customerkindList);
     }
 
+    @GetMapping("/getCombo")
+    public Result getCombo(){
+        List<Customerkind> customerkindList = customerkindService.getCombo();
+        return Result.success(customerkindList);
+    }
 }

+ 28 - 2
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductController.java

@@ -6,10 +6,12 @@ import com.usoftchina.saas.base.Result;
 
 import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.commons.dto.DocReqDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.document.dto.ProductDTO;
 import com.usoftchina.saas.document.entities.Product;
 import com.usoftchina.saas.document.service.ProductService;
 import com.usoftchina.saas.page.PageRequest;
+import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -22,9 +24,15 @@ public class ProductController {
     @Autowired
     private ProductService productService;
 
+    /**
+     * 通过条件查找物料
+     * @param page      分页对象
+     * @param listReqDTO    条件对象
+     * @return  Result<List<ProductDTO>>
+     */
     @RequestMapping("/getProductsByCondition")
-    public Result<List<ProductDTO>> getProductsByCondition(PageRequest page, DocReqDTO docReqDTO){
-        PageInfo<ProductDTO> productList = productService.getProductsByCondition(page, docReqDTO);
+    public Result<List<ProductDTO>> getProductsByCondition(PageRequest page, ListReqDTO listReqDTO){
+        PageInfo<ProductDTO> productList = productService.getProductsByCondition(page, listReqDTO);
         return Result.success(productList);
     }
 
@@ -44,4 +52,22 @@ public class ProductController {
         return productService.getProductsByPK(id);
     }
 
+    @PostMapping("/save")
+    public Result save(@RequestBody Product product){
+        productService.save(product);
+        return Result.success();
+    }
+
+    @PostMapping("/delete/{id}")
+    public Result delete(@PathVariable("id") Long id){
+        productService.removeByPrimaryKey(id);
+        return Result.success();
+    }
+
+    @PostMapping("/close/{id}")
+    public Result close(@PathVariable("id") Long id){
+        productService.close(id);
+        return Result.success();
+    }
+
 }

+ 69 - 2
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/VendorController.java

@@ -3,10 +3,12 @@ package com.usoftchina.saas.document.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.DocReqDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.document.dto.VendorDTO;
 import com.usoftchina.saas.document.dto.VendorListDTO;
+import com.usoftchina.saas.document.entities.VendorList;
 import com.usoftchina.saas.document.service.VendorService;
 import com.usoftchina.saas.page.PageRequest;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -21,16 +23,81 @@ public class VendorController {
     @Autowired
     private VendorService vendorService;
 
+    /**
+     * 获取供应商信息
+     * @param page
+     * @param listReqDTO
+     * @return
+     */
     @GetMapping("/getVendorsByCondition")
     public Result<List<VendorDTO>> getVendorsByCondition(PageRequest page, ListReqDTO listReqDTO){
         PageInfo<VendorDTO> vendorList = vendorService.getVendorsByCondition(page, listReqDTO);
         return Result.success(vendorList);
     }
 
+    /**
+     * 通过供应商ID查找  供应商主从表数据
+     * @param id
+     * @return
+     */
     @GetMapping("/getListById/{id}")
     public Result<VendorListDTO> getDataById(@PathVariable("id") Long id){
-//        List<> vendorService.getListById(id);
-        return null;
+        VendorListDTO vendorListDTO = vendorService.getListById(id);
+        return Result.success(vendorListDTO);
+    }
+
+    /**
+     * 获取 供应商列表数据,包含供应商主表、从表数据
+     * @param listReqDTO
+     * @return
+     */
+    @GetMapping("/getListDataByCondition")
+    public Result<List<VendorList>> getListDataByCondition(ListReqDTO listReqDTO){
+        return Result.success(vendorService.getListDataByCondition(listReqDTO));
+    }
+
+    /**
+     * 保存供应商资料, 主从表数据
+     * @param vendorListDTO
+     * @return
+     */
+    @PostMapping("/save")
+    public Result saveFormData(@RequestBody VendorListDTO vendorListDTO){
+        DocBaseDTO docBaseDTO = vendorService.saveFormData(vendorListDTO);
+        return Result.success(docBaseDTO);
+    }
+
+    /**
+     * 删除
+     * @param id
+     * @return
+     */
+    @PostMapping("/delete/{id}")
+    public Result delete(@PathVariable("id") Long id){
+        vendorService.deleteById(id);
+        return Result.success();
+    }
+
+    /**
+     * 关闭
+     * @param id
+     * @return
+     */
+    @PostMapping("/close/{id}")
+    public Result close(@PathVariable("id") Long id){
+        vendorService.close(id);
+        return Result.success();
+    }
+
+    /**
+     * 开启
+     * @param id
+     * @return
+     */
+    @PostMapping("/open/{id}")
+    public Result open(@PathVariable("id") Long id){
+        vendorService.open(id);
+        return Result.success();
     }
 
 }

+ 20 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/BankinformationMapper.java

@@ -0,0 +1,20 @@
+package com.usoftchina.saas.document.mapper;
+
+import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.document.entities.Bankinformation;
+
+public interface BankinformationMapper extends CommonBaseMapper<Bankinformation> {
+    int deleteByPrimaryKey(Integer bkId);
+
+    int insert(Bankinformation record);
+
+    int insertSelective(Bankinformation record);
+
+    Bankinformation selectByPrimaryKey(Integer bkId);
+
+    int updateByPrimaryKeySelective(Bankinformation record);
+
+    int updateByPrimaryKeyWithBLOBs(Bankinformation record);
+
+    int updateByPrimaryKey(Bankinformation record);
+}

+ 3 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomerMapper.java

@@ -4,7 +4,7 @@ import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 import com.usoftchina.saas.document.entities.Customer;
 
 public interface CustomerMapper extends CommonBaseMapper<Customer> {
-    int deleteByPrimaryKey(Integer cu_id);
+    int deleteByPrimaryKey(Long cu_id);
 
     int insertSelective(Customer record);
 
@@ -13,4 +13,6 @@ public interface CustomerMapper extends CommonBaseMapper<Customer> {
     int updateByPrimaryKeySelective(Customer record);
 
     int updateByPrimaryKey(Customer record);
+
+    String selectCodeById(Long id);
 }

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

@@ -22,4 +22,6 @@ public interface CustomeraddressMapper extends CommonBaseMapper<Customer> {
     void batchInsert(List<Customeraddress> list);
 
     void batchUpdate(List<Customeraddress> list);
+
+    void deleteByFK(Long id);
 }

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

@@ -21,4 +21,6 @@ public interface CustomercontactMapper extends CommonBaseMapper<Customercontact>
     void batchInsert(List<Customercontact> insertDetail1);
 
     void batchUpdate(List<Customercontact> updateDetail1);
+
+    void deleteByFK(Long id);
 }

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

@@ -3,6 +3,8 @@ package com.usoftchina.saas.document.mapper;
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 import com.usoftchina.saas.document.entities.Customerkind;
 
+import java.util.List;
+
 public interface CustomerkindMapper extends CommonBaseMapper<Customerkind> {
     int deleteByPrimaryKey(Long id);
 
@@ -15,4 +17,6 @@ public interface CustomerkindMapper extends CommonBaseMapper<Customerkind> {
     int updateByPrimaryKeySelective(Customerkind record);
 
     int updateByPrimaryKey(Customerkind record);
+
+    List<Customerkind> getCombo();
 }

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

@@ -6,12 +6,13 @@ import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.commons.dto.DocReqDTO;
 import com.usoftchina.saas.document.dto.ProductDTO;
 import com.usoftchina.saas.document.entities.Product;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
 public interface ProductMapper extends CommonBaseMapper<Product> {
 
-    List<ProductDTO> getProductsByCondition(DocReqDTO docReqDTO);
+    List<ProductDTO> getProductsByCondition(@Param("condition") String condition, @Param("companyId") Long companyId);
     List<ComboDTO> getProdUnit();
     void updateLatestPurchasePrice(Long pu_id);
 

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

@@ -4,7 +4,9 @@ import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 
 
 import com.usoftchina.saas.document.dto.VendorDTO;
+import com.usoftchina.saas.document.dto.VendorListDTO;
 import com.usoftchina.saas.document.entities.Vendor;
+import com.usoftchina.saas.document.entities.VendorList;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -13,4 +15,5 @@ public interface VendorMapper extends CommonBaseMapper<Vendor> {
 
     List<VendorDTO> getVendorsByCondition(@Param("condition") String condition, @Param("companyId") Long companyId);
 
+    List<VendorList> getListDataByCondition(@Param("condition") String condition, @Param("companyId") Long companyId);
 }

+ 10 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/VendorcontactMapper.java

@@ -3,6 +3,8 @@ package com.usoftchina.saas.document.mapper;
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 import com.usoftchina.saas.document.entities.Vendorcontact;
 
+import java.util.List;
+
 public interface VendorcontactMapper extends CommonBaseMapper<Vendorcontact> {
     int deleteByPrimaryKey(Long vc_id);
 
@@ -15,4 +17,12 @@ public interface VendorcontactMapper extends CommonBaseMapper<Vendorcontact> {
     int updateByPrimaryKeySelective(Vendorcontact record);
 
     int updateByPrimaryKey(Vendorcontact record);
+
+    List<Vendorcontact> selectByFK(Long id);
+
+    void batchInsert(List<Vendorcontact> vendorcontactList);
+
+    void batchUpdate(List<Vendorcontact> vendorcontactList);
+
+    void deleteByFK(Long id);
 }

+ 15 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/BankinformationService.java

@@ -0,0 +1,15 @@
+package com.usoftchina.saas.document.service;
+
+import com.usoftchina.saas.base.service.CommonBaseService;
+import com.usoftchina.saas.document.entities.Bankinformation;
+import com.usoftchina.saas.document.mapper.BankinformationMapper;
+
+/**
+ * @author heqw
+ * @date 2018/10/25 15:36
+ **/
+public interface BankinformationService extends CommonBaseService<BankinformationMapper, Bankinformation> {
+    boolean save(Bankinformation bankinformation);
+
+    boolean removeByPrimaryKey(int id);
+}

+ 4 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/CustomerkindService.java

@@ -4,6 +4,10 @@ import com.usoftchina.saas.base.service.CommonBaseService;
 import com.usoftchina.saas.document.entities.Customerkind;
 import com.usoftchina.saas.document.mapper.CustomerkindMapper;
 
+import java.util.List;
+
 public interface CustomerkindService extends CommonBaseService<CustomerkindMapper, Customerkind> {
 
+    List<Customerkind> getCombo();
+
 }

+ 30 - 3
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProductService.java

@@ -5,7 +5,8 @@ import com.usoftchina.saas.base.service.CommonBaseService;
 
 
 import com.usoftchina.saas.commons.dto.ComboDTO;
-import com.usoftchina.saas.commons.dto.DocReqDTO;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.document.dto.ProductDTO;
 import com.usoftchina.saas.document.entities.Product;
 import com.usoftchina.saas.document.mapper.ProductMapper;
@@ -16,12 +17,38 @@ import java.util.List;
 
 public interface ProductService extends CommonBaseService<ProductMapper, Product> {
 
-
-    PageInfo<ProductDTO> getProductsByCondition(PageRequest page, DocReqDTO docReqDTO);
+    /**
+     * 获取物料
+     * @param page      分页对象
+     * @param listReqDTO    条件对象
+     * @return  PageInfo<ProductDTO>
+     */
+    PageInfo<ProductDTO> getProductsByCondition(PageRequest page, ListReqDTO listReqDTO);
 
     List<ComboDTO> getProdUnit();
 
     void updateLatestPurchasePrice(Long pu_id);
 
     Product getProductsByPK(Long id);
+
+    /**
+     * 保存/更新
+     * @param product
+     * @return
+     */
+    DocBaseDTO saveData(Product product);
+
+    /**
+     * 关闭
+     * @param id
+     * @return
+     */
+    boolean close(Long id);
+
+    /**
+     * 开启
+     * @param id
+     * @return
+     */
+    boolean open(Long id);
 }

+ 51 - 2
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/VendorService.java

@@ -3,18 +3,67 @@ package com.usoftchina.saas.document.service;
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.service.CommonBaseService;
 
-
-import com.usoftchina.saas.commons.dto.DocReqDTO;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.document.dto.VendorDTO;
+import com.usoftchina.saas.document.dto.VendorListDTO;
 import com.usoftchina.saas.document.entities.Vendor;
+import com.usoftchina.saas.document.entities.VendorList;
 import com.usoftchina.saas.document.mapper.VendorMapper;
 
 import com.usoftchina.saas.page.PageRequest;
 
+import java.util.List;
+
 
 public interface VendorService extends CommonBaseService<VendorMapper, Vendor>{
 
+    /**
+     * 获取主表数据
+     * @param page      分页对象
+     * @param listReqDTO    条件对象
+     * @return  PageInfo<VendorDTO>
+     */
     PageInfo<VendorDTO> getVendorsByCondition(PageRequest page, ListReqDTO listReqDTO);
 
+    /**
+     * 通过ID 获取主从表数据
+     * @param id
+     * @return VendorListDTO
+     */
+    VendorListDTO getListById(Long id);
+
+    /**
+     * 获取供应商资料列表
+     * @param listReqDTO  条件对象
+     * @return List<VendorList>
+     */
+    List<VendorList> getListDataByCondition(ListReqDTO listReqDTO);
+
+    /**
+     * 保存主从表数据
+     * @param vendorListDTO
+     * @return  DocBaseDTO
+     */
+    DocBaseDTO saveFormData(VendorListDTO vendorListDTO);
+
+    /**
+     * 通过主表ID  删除主从表数据
+     * @param id
+     */
+    void deleteById(Long id);
+
+    /**
+     * 关闭
+     * @param id
+     * @return  boolean
+     */
+    boolean close(Long id);
+
+    /**
+     * 开启
+     * @param id
+     * @return  boolean
+     */
+    boolean open(Long id);
 }

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

@@ -1,6 +1,10 @@
 package com.usoftchina.saas.document.service.impl;
 
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.commons.api.MessageLogService;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.po.Messagelog;
+import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.entities.Address;
 import com.usoftchina.saas.document.mapper.AddressMapper;
 import com.usoftchina.saas.document.service.AddressService;
@@ -12,6 +16,10 @@ public class AddressServiceImpl extends CommonBaseServiceImpl<AddressMapper, Add
 
     @Autowired
     private AddressMapper addressMapper;
+    @Autowired
+    private MessageLogService messageLogService;
+
+
 
     /**
      * 保存
@@ -20,7 +28,16 @@ public class AddressServiceImpl extends CommonBaseServiceImpl<AddressMapper, Add
      */
     @Override
     public boolean save(Address address){
-        addressMapper.insertSelective(address);
+        if(address.getId() == 0){
+            address.setCompanyId(BaseContextHolder.getCompanyId());
+            addressMapper.insertSelective(address);
+            //记录LOG
+            messageLogService.save(generateMsgObj(address.getId()));
+        }else{
+            addressMapper.updateByPrimaryKeySelective(address);
+            //记录LOG
+            messageLogService.update(generateMsgObj(address.getId()));
+        }
         return true;
     }
 
@@ -33,6 +50,7 @@ public class AddressServiceImpl extends CommonBaseServiceImpl<AddressMapper, Add
     public boolean removeByPrimaryKey(Long id){
         if(id != null && id > 0){
             addressMapper.deleteByPrimaryKey(id);
+            messageLogService.delete(generateMsgObj(id));
         }
         return true;
     }
@@ -47,4 +65,8 @@ public class AddressServiceImpl extends CommonBaseServiceImpl<AddressMapper, Add
             addressMapper.deleteByIds(ids);
         }
     }
+
+    private DocBaseDTO generateMsgObj(Long id){
+        return new DocBaseDTO(id, "", "Address");
+    }
 }

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

@@ -0,0 +1,34 @@
+package com.usoftchina.saas.document.service.impl;
+
+import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.document.entities.Bankinformation;
+import com.usoftchina.saas.document.mapper.BankinformationMapper;
+import com.usoftchina.saas.document.service.BankinformationService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author heqw
+ * @date 2018/10/25 15:36
+ **/
+@Service
+public class BankinformationServiceImpl extends CommonBaseServiceImpl<BankinformationMapper, Bankinformation> implements BankinformationService {
+    @Autowired
+    private BankinformationMapper bankinformationMapper;
+
+    @Override
+    public boolean save(Bankinformation bankinformation){
+        if(bankinformation.getBkId() == 0){
+            bankinformationMapper.insertSelective(bankinformation);
+        }else{
+            bankinformationMapper.updateByPrimaryKeySelective(bankinformation);
+        }
+        return true;
+    }
+
+    @Override
+    public boolean removeByPrimaryKey(int id){
+        bankinformationMapper.deleteByPrimaryKey(id);
+        return true;
+    }
+}

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

@@ -150,7 +150,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
             if (insertDetail2.size()>0) {
                 customeraddressMapper.batchInsert(insertDetail2);
             }
-//            baseDTO = getBaseDTOById(pu_id);
+            baseDTO = getBaseDTOById(cu_id);
             //日志记录
 //            messageLogService.save(baseDTO);
             return baseDTO;
@@ -202,7 +202,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
         }
 
 
-        //            baseDTO = getBaseDTOById(pu_id);
+        baseDTO = getBaseDTOById(cu_id);
         //日志记录
 //            messageLogService.save(baseDTO);
         return baseDTO;
@@ -210,21 +210,40 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
 
     @Override
     public void delete(Long id) {
+        singleDelete(id);
+    }
 
+    private void singleDelete(Long id) {
+        if (null!=id) {
+            //主表删除
+            getMapper().deleteByPrimaryKey(id);
+            //从表删除
+            customercontactMapper.deleteByFK(id);
+            customeraddressMapper.deleteByFK(id);
+            //日志
+//            messageLogService.delete(docBaseDTO);
+        }
     }
 
     @Override
-    public void close(long id) {
+    public void batchDelete(BatchDealBaseDTO baseDTOs) {
+        if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
+                baseDTOs.getBaseDTOs().size() == 0) {
+            return;
+        }
 
+        for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
+            singleDelete(base.getId());
+        }
     }
 
     @Override
-    public void open(long id) {
+    public void close(long id) {
 
     }
 
     @Override
-    public void batchDelete(BatchDealBaseDTO baseDTOs) {
+    public void open(long id) {
 
     }
 
@@ -242,4 +261,21 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
         }
         return list;
     }
+
+    /**
+     * @Description
+     * @Param: [id]
+     * @return: com.usoftchina.saas.commons.dto.DocBaseDTO
+     * @Author: guq
+     * @Date: 2018/10/22
+     */
+    private DocBaseDTO getBaseDTOById(Long id) {
+        if (null == id) {
+            return null;
+        }
+        String code = getMapper().selectCodeById(id);
+        DocBaseDTO baseDTO = new DocBaseDTO(id, code, "Customer");
+        return baseDTO;
+    }
+
 }

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

@@ -1,17 +1,24 @@
 package com.usoftchina.saas.document.service.impl;
 
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.commons.api.MessageLogService;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.entities.Customerkind;
 import com.usoftchina.saas.document.mapper.CustomerkindMapper;
 import com.usoftchina.saas.document.service.CustomerkindService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 @Service
 public class CustomerkindServiceImpl extends CommonBaseServiceImpl<CustomerkindMapper, Customerkind> implements CustomerkindService {
 
     @Autowired
     private CustomerkindMapper customerkindMapper;
+    @Autowired
+    private MessageLogService messageLogService;
 
     /**
      * 保存
@@ -21,17 +28,44 @@ public class CustomerkindServiceImpl extends CommonBaseServiceImpl<CustomerkindM
     @Override
     public boolean save(Customerkind customerkind){
         if(customerkind.getId() == 0){
+            customerkind.setCompanyId(BaseContextHolder.getCompanyId());
             customerkindMapper.insertSelective(customerkind);
+            //记录LOG
+            messageLogService.save(generateMsgObj(customerkind.getId()));
         }else{
             customerkindMapper.updateByPrimaryKeySelective(customerkind);
+            //记录LOG
+            messageLogService.update(generateMsgObj(customerkind.getId()));
         }
         return true;
     }
 
+    /**
+     * 删除
+     * @param id
+     * @return
+     */
     @Override
     public boolean removeByPrimaryKey(Long id){
-        customerkindMapper.deleteByPrimaryKey(id);
+        if(id != null && id > 0){
+            customerkindMapper.deleteByPrimaryKey(id);
+            messageLogService.delete(generateMsgObj(id));
+        }
         return true;
     }
 
+    /**
+     * 构造 记录日志对象
+     * @param id
+     * @return
+     */
+    private DocBaseDTO generateMsgObj(Long id){
+        return new DocBaseDTO(id, "", "CustomerKind");
+    }
+
+    @Override
+    public List<Customerkind> getCombo() {
+        List<Customerkind> customerkindList = getMapper().getCombo();
+        return customerkindList;
+    }
 }

+ 21 - 2
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/FundinouttypeServiceImpl.java

@@ -1,10 +1,14 @@
 package com.usoftchina.saas.document.service.impl;
 
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.commons.api.MessageLogService;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.po.Messagelog;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.entities.Fundinouttype;
 import com.usoftchina.saas.document.mapper.FundinouttypeMapper;
 import com.usoftchina.saas.document.service.FundinouttypeService;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
@@ -12,6 +16,9 @@ import java.util.List;
 @Service
 public class FundinouttypeServiceImpl extends CommonBaseServiceImpl<FundinouttypeMapper, Fundinouttype> implements FundinouttypeService {
 
+    @Autowired
+    private MessageLogService messageLogService;
+
     /**
      * 保存/更新
      * @param fundinouttype
@@ -19,11 +26,15 @@ public class FundinouttypeServiceImpl extends CommonBaseServiceImpl<Fundinouttyp
      */
     @Override
     public boolean save(Fundinouttype fundinouttype){
-        fundinouttype.setCompanyId(BaseContextHolder.getCompanyId());
         if(fundinouttype.getId() == 0){
+            fundinouttype.setCompanyId(BaseContextHolder.getCompanyId());
             getMapper().insertSelective(fundinouttype);
+            //记录LOG
+            messageLogService.save(generateMsgObj(fundinouttype.getId()));
         }else{
             getMapper().updateByPrimaryKeySelective(fundinouttype);
+            //记录LOG
+            messageLogService.update(generateMsgObj(fundinouttype.getId()));
         }
         return true;
     }
@@ -35,8 +46,16 @@ public class FundinouttypeServiceImpl extends CommonBaseServiceImpl<Fundinouttyp
      */
     @Override
     public boolean removeByPrimaryKey(Long id){
-        getMapper().deleteByPrimaryKey(id);
+        if(id != null && id > 0){
+            getMapper().deleteByPrimaryKey(id);
+            //记录LOG
+            messageLogService.delete(generateMsgObj(id));
+        }
         return true;
     }
 
+    private DocBaseDTO generateMsgObj(Long id){
+        return new DocBaseDTO(id, null, "FundInOutType");
+    }
+
 }

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

@@ -3,13 +3,20 @@ 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.api.MessageLogService;
 import com.usoftchina.saas.commons.dto.ComboDTO;
-import com.usoftchina.saas.commons.dto.DocReqDTO;
+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.Status;
+import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.dto.ProductDTO;
 import com.usoftchina.saas.document.entities.Product;
 import com.usoftchina.saas.document.mapper.ProductMapper;
 import com.usoftchina.saas.document.service.ProductService;
+import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.page.PageRequest;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
@@ -17,8 +24,11 @@ import java.util.List;
 @Service
 public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Product> implements ProductService {
 
+    @Autowired
+    private MessageLogService messageLogService;
+
     @Override
-    public PageInfo<ProductDTO> getProductsByCondition(PageRequest page, DocReqDTO docReqDTO) {
+    public PageInfo<ProductDTO> getProductsByCondition(PageRequest page, ListReqDTO listReqDTO) {
         //设置分页
         if (null == page || page.getSize() == 0 || page.getNumber() == 0) {
             page = new PageRequest();
@@ -26,7 +36,7 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
             page.setSize(10);
         }
         PageHelper.startPage(page.getNumber(), page.getSize());
-        List<ProductDTO> productList = getMapper().getProductsByCondition(docReqDTO);
+        List<ProductDTO> productList = getList(listReqDTO);
         //取分页信息
         PageInfo<ProductDTO> pageInfo = new PageInfo<ProductDTO>(productList);
         return pageInfo;
@@ -40,13 +50,90 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
     @Override
     public void updateLatestPurchasePrice(Long pu_id) {
         getMapper().updateLatestPurchasePrice(pu_id);
+        messageLogService.update(generateMsgObj(pu_id));
     }
 
     @Override
     public Product getProductsByPK(Long id) {
-        if (null == id) {
+        if (null != id) {
             return getMapper().selectByPrimaryKey(id);
         }
         return null;
     }
+
+    @Override
+    public DocBaseDTO saveData(Product product){
+        DocBaseDTO docBaseDTO = null;
+        if(product.getId() == 0){
+            product.setCompanyId(BaseContextHolder.getCompanyId());
+            getMapper().insertSelective(product);
+            docBaseDTO = generateMsgObj(product.getId());
+            //记录LOG
+            messageLogService.save(docBaseDTO);
+        }else{
+            getMapper().updateByPrimaryKeySelective(product);
+            docBaseDTO = generateMsgObj(product.getId());
+            //记录LOG
+            messageLogService.update(docBaseDTO);
+        }
+        return docBaseDTO;
+    }
+
+    @Override
+    public boolean close(Long id) {
+        if(id != null && id > 0){
+            Product product = new Product();
+            product.setId(id);
+            product.setPr_status(Status.CLOSE.getDisplay());
+            product.setPr_statuscode(Status.CLOSE.name());
+            getMapper().updateByPrimaryKeySelective(product);
+            //记录LOG
+            messageLogService.close(generateMsgObj(id));
+            return true;
+        }else{
+            throw new BizException(BizExceptionCode.ILLEGAL_ID);
+        }
+    }
+
+    @Override
+    public boolean open(Long id) {
+        if(id != null && id > 0){
+            Product product = getMapper().selectByPrimaryKey(id);
+            if (product == null) {
+                throw new BizException(BizExceptionCode.NO_DATA);
+            }
+            if (!Status.CLOSE.getDisplay().equals(product.getPr_status())){
+                throw new BizException(BizExceptionCode.BIZ_OPEN);
+            }else{
+                product.setId(id);
+                product.setPr_statuscode(Status.OPEN.name());
+                product.setPr_status(Status.OPEN.getDisplay());
+                getMapper().updateByPrimaryKeySelective(product);
+                //记录LOG
+                messageLogService.open(generateMsgObj(id));
+                return true;
+            }
+        }else{
+            throw new BizException(BizExceptionCode.ILLEGAL_ID);
+        }
+    }
+
+    private List<ProductDTO> getList(ListReqDTO listReqDTO){
+        Long companyId = BaseContextHolder.getCompanyId();
+        String condition = listReqDTO.getFinalCondition();
+        if(condition == null){
+            condition = "1=1";
+        }
+        List<ProductDTO> productDTOList = getMapper().getProductsByCondition(condition, companyId);
+        return productDTOList;
+    }
+
+    /**
+     * 构造日记记录对象
+     * @param id
+     * @return
+     */
+    private DocBaseDTO generateMsgObj(Long id){
+        return new DocBaseDTO(id, "", "Product");
+    }
 }

+ 7 - 6
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductbrandServiceImpl.java

@@ -1,6 +1,7 @@
 package com.usoftchina.saas.document.service.impl;
 
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.commons.api.MessageLogService;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.entities.Productbrand;
@@ -14,10 +15,10 @@ public class ProductbrandServiceImpl extends CommonBaseServiceImpl<ProductbrandM
 
     @Autowired
     private ProductbrandMapper productbrandMapper;
-//    @Autowired
-//    private MessageLogService messageLogService;
+    @Autowired
+    private MessageLogService messageLogService;
 
-    private final String LOG_NAME = "物料品牌";
+    private final String LOG_NAME = "ProductBrand";
 
     @Override
     public boolean save(Productbrand productbrand){
@@ -26,12 +27,12 @@ public class ProductbrandServiceImpl extends CommonBaseServiceImpl<ProductbrandM
             productbrandMapper.insertSelective(productbrand);
             //记录日志
             DocBaseDTO docBaseDTO = new DocBaseDTO(productbrand.getId(), null, LOG_NAME);
-//            messageLogService.save(docBaseDTO);
+            messageLogService.save(docBaseDTO);
         }else{
             productbrandMapper.updateByPrimaryKeySelective(productbrand);
             //记录日志
             DocBaseDTO docBaseDTO = new DocBaseDTO(productbrand.getId(), null, LOG_NAME);
-//            messageLogService.update(docBaseDTO);
+            messageLogService.update(docBaseDTO);
         }
         return true;
     }
@@ -41,7 +42,7 @@ public class ProductbrandServiceImpl extends CommonBaseServiceImpl<ProductbrandM
         productbrandMapper.deleteByPrimaryKey(id);
         //记录日志
         DocBaseDTO docBaseDTO = new DocBaseDTO(id, null, LOG_NAME);
-//        messageLogService.delete(docBaseDTO);
+        messageLogService.delete(docBaseDTO);
         return true;
     }
 

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

@@ -1,6 +1,9 @@
 package com.usoftchina.saas.document.service.impl;
 
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.commons.api.MessageLogService;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.entities.Producttype;
 import com.usoftchina.saas.document.mapper.ProducttypeMapper;
 import com.usoftchina.saas.document.service.ProducttypeService;
@@ -14,6 +17,8 @@ public class ProducttypeServiceImpl extends CommonBaseServiceImpl<ProducttypeMap
 
     @Autowired
     private ProducttypeMapper producttypeMapper;
+    @Autowired
+    private MessageLogService messageLogService;
 
     /**
      * 保存
@@ -23,9 +28,14 @@ public class ProducttypeServiceImpl extends CommonBaseServiceImpl<ProducttypeMap
     @Override
     public boolean save(Producttype producttype){
         if(producttype.getId() == 0){
+            producttype.setCompanyId(BaseContextHolder.getCompanyId());
             producttypeMapper.insertSelective(producttype);
+            //记录LOG
+            messageLogService.save(generateMsgObj(producttype.getId()));
         }else{
             producttypeMapper.updateByPrimaryKeySelective(producttype);
+            //记录LOG
+            messageLogService.update(generateMsgObj(producttype.getId()));
         }
         return true;
     }
@@ -37,8 +47,21 @@ public class ProducttypeServiceImpl extends CommonBaseServiceImpl<ProducttypeMap
      */
     @Override
     public boolean removeByPrimaryKey(Long id){
-        producttypeMapper.deleteByPrimaryKey(id);
+        if(id != null && id > 0){
+            producttypeMapper.deleteByPrimaryKey(id);
+            //记录LOG
+            messageLogService.delete(generateMsgObj(id));
+        }
         return true;
     }
 
+    /**
+     * 构造 记录日志对象
+     * @param id
+     * @return
+     */
+    private DocBaseDTO generateMsgObj(Long id){
+        return new DocBaseDTO(id, "", "ProductType");
+    }
+
 }

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

@@ -1,10 +1,13 @@
 package com.usoftchina.saas.document.service.impl;
 
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.commons.api.MessageLogService;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.entities.Productunit;
 import com.usoftchina.saas.document.mapper.ProductunitMapper;
 import com.usoftchina.saas.document.service.ProductunitService;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
@@ -12,20 +15,31 @@ import java.util.List;
 @Service
 public class ProductunitServiceImpl extends CommonBaseServiceImpl<ProductunitMapper, Productunit> implements ProductunitService {
 
+    @Autowired
+    private MessageLogService messageLogService;
+
     @Override
     public boolean save(Productunit productunit){
-        productunit.setCompanyId(BaseContextHolder.getCompanyId());
         if(productunit.getId() == 0){
+            productunit.setCompanyId(BaseContextHolder.getCompanyId());
             getMapper().insertSelective(productunit);
+            //记录LOG
+            messageLogService.save(generateMsgObj(productunit.getId()));
         }else{
             getMapper().updateByPrimaryKeySelective(productunit);
+            //记录LOG
+            messageLogService.update(generateMsgObj(productunit.getId()));
         }
         return true;
     }
 
     @Override
     public boolean removeByPrimaryKey(Long id){
-        getMapper().deleteByPrimaryKey(id);
+        if(id != null && id > 0){
+            getMapper().deleteByPrimaryKey(id);
+            //记录LOG
+            messageLogService.delete(generateMsgObj(id));
+        }
         return true;
     }
 
@@ -35,4 +49,13 @@ public class ProductunitServiceImpl extends CommonBaseServiceImpl<ProductunitMap
         return productunitList;
     }
 
+    /**
+     * 构造 记录日志对象
+     * @param id
+     * @return
+     */
+    private DocBaseDTO generateMsgObj(Long id){
+        return new DocBaseDTO(id, "", "ProductUnit");
+    }
+
 }

+ 144 - 2
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/VendorServiceImpl.java

@@ -3,15 +3,23 @@ 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.DocReqDTO;
+import com.usoftchina.saas.commons.api.MessageLogService;
+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.Status;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.dto.VendorDTO;
+import com.usoftchina.saas.document.dto.VendorListDTO;
 import com.usoftchina.saas.document.entities.Vendor;
+import com.usoftchina.saas.document.entities.VendorList;
+import com.usoftchina.saas.document.entities.Vendorcontact;
 import com.usoftchina.saas.document.mapper.VendorMapper;
+import com.usoftchina.saas.document.mapper.VendorcontactMapper;
 import com.usoftchina.saas.document.service.VendorService;
+import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.page.PageRequest;
-import com.usoftchina.saas.utils.BeanMapper;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
@@ -23,6 +31,11 @@ import java.util.List;
 @Service
 public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendor> implements VendorService {
 
+    @Autowired
+    private VendorcontactMapper vendorcontactMapper;
+    @Autowired
+    private MessageLogService messageLogService;
+
     @Override
     public PageInfo<VendorDTO> getVendorsByCondition(PageRequest page, ListReqDTO listReqDTO) {
         //设置分页
@@ -38,6 +51,126 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
         return pageInfo;
     }
 
+    /**
+     * 通过ID查找主从表数据
+     * @param id
+     * @return
+     */
+    @Override
+    public VendorListDTO getListById(Long id) {
+        VendorListDTO vendorListDTO = new VendorListDTO();
+        Vendor vendor = getMapper().selectByPrimaryKey(id);
+        List<Vendorcontact> vendorcontactList = vendorcontactMapper.selectByFK(id);
+        //设置主从表信息
+        vendorListDTO.setMain(vendor);
+        vendorListDTO.setItems(vendorcontactList);
+        return vendorListDTO;
+    }
+
+    /**
+     * 返回列表数据
+     * @return
+     */
+    public List<VendorList> getListDataByCondition(ListReqDTO listReqDTO){
+        String condition = listReqDTO.getFinalCondition();
+        return getMapper().getListDataByCondition(condition, BaseContextHolder.getCompanyId());
+    }
+
+    /**
+     * 保存主从表数据
+     * @param vendorListDTO
+     */
+    @Override
+    public DocBaseDTO saveFormData(VendorListDTO vendorListDTO) {
+        Vendor main = vendorListDTO.getMain();
+        main.setCompanyId(BaseContextHolder.getCompanyId());
+        List<Vendorcontact> items = vendorListDTO.getItems();
+        if(main.getId() == 0){
+            //保存主表信息
+            getMapper().insertSelective(main);
+            Long mainId = main.getId();
+            //更新明细表vc_veid
+            for(Vendorcontact item : items){
+                item.setVc_veid(mainId);
+                item.setCompanyId(BaseContextHolder.getCompanyId());
+            }
+            //保存明细表信息
+            vendorcontactMapper.batchInsert(items);
+            //记录LOG
+            messageLogService.save(generateMsgObj(mainId));
+        }else{
+            getMapper().updateByPrimaryKeySelective(main);
+            vendorcontactMapper.batchUpdate(items);
+            //记录LOG
+            messageLogService.update(generateMsgObj(main.getId()));
+        }
+        return generateMsgObj(main.getId());
+    }
+
+    /**
+     * 删除主从表数据
+     * @param id
+     */
+    @Override
+    public void deleteById(Long id) {
+        if(id != null && id > 0){
+            getMapper().deleteByPrimaryKey(id);
+            vendorcontactMapper.deleteByFK(id);
+            //记录LOG
+            messageLogService.delete(generateMsgObj(id));
+        }
+    }
+
+    /**
+     * 关闭
+     * @param id
+     * @return
+     */
+    @Override
+    public boolean close(Long id){
+        if(id != null && id > 0){
+            Vendor vendor = new Vendor();
+            vendor.setId(id);
+            vendor.setVe_status(Status.CLOSE.getDisplay());
+            vendor.setVe_statuscode(Status.CLOSE.name());
+            getMapper().updateByPrimaryKeySelective(vendor);
+            //记录LOG
+            messageLogService.close(generateMsgObj(id));
+            return true;
+        }else{
+            throw new BizException(BizExceptionCode.ILLEGAL_ID);
+        }
+    }
+
+    /**
+     * 开启
+     * @param id
+     * @return
+     */
+    @Override
+    public boolean open(Long id){
+        if (id != null && id > 0){
+            Vendor vendor = getMapper().selectByPrimaryKey(id);
+            if(vendor == null){
+                throw new BizException(BizExceptionCode.NO_DATA);
+            }
+            if (Status.CLOSE.name().equals(vendor.getVe_statuscode())){
+                vendor = new Vendor();
+                vendor.setId(id);
+                vendor.setVe_statuscode(Status.OPEN.name());
+                vendor.setVe_status(Status.OPEN.getDisplay());
+                getMapper().updateByPrimaryKeySelective(vendor);
+                //记录LOG
+                messageLogService.open(generateMsgObj(id));
+                return true;
+            }else {
+                throw new BizException(BizExceptionCode.BIZ_OPEN);
+            }
+        }else {
+            throw new BizException(BizExceptionCode.ILLEGAL_ID);
+        }
+    }
+
     private List<VendorDTO> getList(ListReqDTO listReqDTO){
         Long companyId = BaseContextHolder.getCompanyId();
         String condition = listReqDTO.getFinalCondition();
@@ -48,4 +181,13 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
         return vendorDTOList;
     }
 
+    /**
+     * 构造日记记录对象
+     * @param id
+     * @return
+     */
+    private DocBaseDTO generateMsgObj(Long id){
+        return new DocBaseDTO(id, "", "Vendor");
+    }
+
 }

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

@@ -1,6 +1,9 @@
 package com.usoftchina.saas.document.service.impl;
 
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.commons.api.MessageLogService;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.entities.Vendorkind;
 import com.usoftchina.saas.document.mapper.VendorkindMapper;
 import com.usoftchina.saas.document.service.VendorkindService;
@@ -12,21 +15,40 @@ public class VendorkindServiceImpl extends CommonBaseServiceImpl<VendorkindMappe
 
     @Autowired
     private VendorkindMapper vendorkindMapper;
+    @Autowired
+    private MessageLogService messageLogService;
 
     @Override
     public boolean save(Vendorkind vendorkind){
         if(vendorkind.getId() == 0){
+            vendorkind.setCompanyId(BaseContextHolder.getCompanyId());
             vendorkindMapper.insertSelective(vendorkind);
+            //记录LOG
+            messageLogService.save(generateMsgObj(vendorkind.getId()));
         }else{
             vendorkindMapper.updateByPrimaryKeySelective(vendorkind);
+            //记录LOG
+            messageLogService.update(generateMsgObj(vendorkind.getId()));
         }
         return true;
     }
 
     @Override
     public boolean removeByPrimaryKey(Long id){
-        vendorkindMapper.deleteByPrimaryKey(id);
+        if(id != null && id > 0){
+            vendorkindMapper.deleteByPrimaryKey(id);
+            //记录LOG
+            messageLogService.delete(generateMsgObj(id));
+        }
         return true;
     }
 
+    /**
+     * 构造 记录日志对象
+     * @param id
+     * @return
+     */
+    private DocBaseDTO generateMsgObj(Long id){
+        return new DocBaseDTO(id, "", "VendorKind");
+    }
 }

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

@@ -1,10 +1,13 @@
 package com.usoftchina.saas.document.service.impl;
 
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.commons.api.MessageLogService;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.entities.Warehouse;
 import com.usoftchina.saas.document.mapper.WarehouseMapper;
 import com.usoftchina.saas.document.service.WarehouseService;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.HashMap;
@@ -13,6 +16,9 @@ import java.util.Map;
 @Service
 public class WarehouseServiceImpl extends CommonBaseServiceImpl<WarehouseMapper, Warehouse> implements WarehouseService {
 
+    @Autowired
+    private MessageLogService messageLogService;
+
     /**
      * 过账
      * @param map
@@ -48,7 +54,16 @@ public class WarehouseServiceImpl extends CommonBaseServiceImpl<WarehouseMapper,
      */
     @Override
     public int insertSelective(Warehouse record) {
-        int count = getMapper().insertSelective(record);
+        int count = 0;
+        if(record.getId() == 0){
+            count = getMapper().insertSelective(record);
+            //记录LOG
+            messageLogService.save(generateMsgObj(record.getId()));
+        }else{
+            getMapper().updateByPrimaryKeySelective(record);
+            //记录LOG
+            messageLogService.update(generateMsgObj(record.getId()));
+        }
         return count;
     }
 
@@ -60,4 +75,13 @@ public class WarehouseServiceImpl extends CommonBaseServiceImpl<WarehouseMapper,
     public void unPost(Map<String, Object> map) {
         getMapper().unPost(map);
     }
+
+    /**
+     * 构造 记录日志对象
+     * @param id
+     * @return
+     */
+    private DocBaseDTO generateMsgObj(Long id){
+        return new DocBaseDTO(id, "", "Warehouse");
+    }
 }

+ 329 - 0
applications/document/document-server/src/main/resources/mapper/BankinformationMapper.xml

@@ -0,0 +1,329 @@
+<?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.BankinformationMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.document.po.Bankinformation" >
+    <id column="bk_id" property="bkId" jdbcType="INTEGER" />
+    <result column="bk_bankcode" property="bkBankcode" jdbcType="VARCHAR" />
+    <result column="bk_bankname" property="bkBankname" jdbcType="VARCHAR" />
+    <result column="bk_date" property="bkDate" jdbcType="TIMESTAMP" />
+    <result column="bk_type" property="bkType" jdbcType="VARCHAR" />
+    <result column="bk_beginamount" property="bkBeginamount" jdbcType="DOUBLE" />
+    <result column="bk_thisamount" property="bkThisamount" jdbcType="DOUBLE" />
+    <result column="bk_status" property="bkStatus" jdbcType="VARCHAR" />
+    <result column="bk_statuscode" property="bkStatuscode" jdbcType="VARCHAR" />
+    <result column="bk_recorderid" property="bkRecorderid" jdbcType="INTEGER" />
+    <result column="bk_recorder" property="bkRecorder" jdbcType="VARCHAR" />
+    <result column="bk_recorddate" property="bkRecorddate" jdbcType="TIMESTAMP" />
+    <result column="bk_ym" property="bkYm" jdbcType="INTEGER" />
+    <result column="companyid" property="companyid" jdbcType="INTEGER" />
+    <result column="updaterid" property="updaterid" jdbcType="INTEGER" />
+    <result column="updatetime" property="updatetime" jdbcType="TIMESTAMP" />
+    <result column="bk_text1" property="bkText1" jdbcType="VARCHAR" />
+    <result column="bk_text2" property="bkText2" jdbcType="VARCHAR" />
+    <result column="bk_text3" property="bkText3" jdbcType="VARCHAR" />
+    <result column="bk_text4" property="bkText4" jdbcType="VARCHAR" />
+    <result column="bk_text5" property="bkText5" jdbcType="VARCHAR" />
+  </resultMap>
+  <resultMap id="ResultMapWithBLOBs" type="com.usoftchina.saas.document.po.Bankinformation" extends="BaseResultMap" >
+    <result column="bk_remark" property="bkRemark" jdbcType="LONGVARCHAR" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    bk_id, bk_bankcode, bk_bankname, bk_date, bk_type, bk_beginamount, bk_thisamount, 
+    bk_status, bk_statuscode, bk_recorderid, bk_recorder, bk_recorddate, bk_ym, companyid, 
+    updaterid, updatetime, bk_text1, bk_text2, bk_text3, bk_text4, bk_text5
+  </sql>
+  <sql id="Blob_Column_List" >
+    bk_remark
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Integer" >
+    select 
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from bankinformation
+    where bk_id = #{bkId,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+    delete from bankinformation
+    where bk_id = #{bkId,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.saas.document.po.Bankinformation" >
+    insert into bankinformation (bk_id, bk_bankcode, bk_bankname, 
+      bk_date, bk_type, bk_beginamount, 
+      bk_thisamount, bk_status, bk_statuscode, 
+      bk_recorderid, bk_recorder, bk_recorddate, 
+      bk_ym, companyid, updaterid, 
+      updatetime, bk_text1, bk_text2, 
+      bk_text3, bk_text4, bk_text5, 
+      bk_remark)
+    values (#{bkId,jdbcType=INTEGER}, #{bkBankcode,jdbcType=VARCHAR}, #{bkBankname,jdbcType=VARCHAR}, 
+      #{bkDate,jdbcType=TIMESTAMP}, #{bkType,jdbcType=VARCHAR}, #{bkBeginamount,jdbcType=DOUBLE}, 
+      #{bkThisamount,jdbcType=DOUBLE}, #{bkStatus,jdbcType=VARCHAR}, #{bkStatuscode,jdbcType=VARCHAR}, 
+      #{bkRecorderid,jdbcType=INTEGER}, #{bkRecorder,jdbcType=VARCHAR}, #{bkRecorddate,jdbcType=TIMESTAMP}, 
+      #{bkYm,jdbcType=INTEGER}, #{companyid,jdbcType=INTEGER}, #{updaterid,jdbcType=INTEGER}, 
+      #{updatetime,jdbcType=TIMESTAMP}, #{bkText1,jdbcType=VARCHAR}, #{bkText2,jdbcType=VARCHAR}, 
+      #{bkText3,jdbcType=VARCHAR}, #{bkText4,jdbcType=VARCHAR}, #{bkText5,jdbcType=VARCHAR}, 
+      #{bkRemark,jdbcType=LONGVARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.document.po.Bankinformation" >
+    insert into bankinformation
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="bkId != null" >
+        bk_id,
+      </if>
+      <if test="bkBankcode != null" >
+        bk_bankcode,
+      </if>
+      <if test="bkBankname != null" >
+        bk_bankname,
+      </if>
+      <if test="bkDate != null" >
+        bk_date,
+      </if>
+      <if test="bkType != null" >
+        bk_type,
+      </if>
+      <if test="bkBeginamount != null" >
+        bk_beginamount,
+      </if>
+      <if test="bkThisamount != null" >
+        bk_thisamount,
+      </if>
+      <if test="bkStatus != null" >
+        bk_status,
+      </if>
+      <if test="bkStatuscode != null" >
+        bk_statuscode,
+      </if>
+      <if test="bkRecorderid != null" >
+        bk_recorderid,
+      </if>
+      <if test="bkRecorder != null" >
+        bk_recorder,
+      </if>
+      <if test="bkRecorddate != null" >
+        bk_recorddate,
+      </if>
+      <if test="bkYm != null" >
+        bk_ym,
+      </if>
+      <if test="companyid != null" >
+        companyid,
+      </if>
+      <if test="updaterid != null" >
+        updaterid,
+      </if>
+      <if test="updatetime != null" >
+        updatetime,
+      </if>
+      <if test="bkText1 != null" >
+        bk_text1,
+      </if>
+      <if test="bkText2 != null" >
+        bk_text2,
+      </if>
+      <if test="bkText3 != null" >
+        bk_text3,
+      </if>
+      <if test="bkText4 != null" >
+        bk_text4,
+      </if>
+      <if test="bkText5 != null" >
+        bk_text5,
+      </if>
+      <if test="bkRemark != null" >
+        bk_remark,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="bkId != null" >
+        #{bkId,jdbcType=INTEGER},
+      </if>
+      <if test="bkBankcode != null" >
+        #{bkBankcode,jdbcType=VARCHAR},
+      </if>
+      <if test="bkBankname != null" >
+        #{bkBankname,jdbcType=VARCHAR},
+      </if>
+      <if test="bkDate != null" >
+        #{bkDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="bkType != null" >
+        #{bkType,jdbcType=VARCHAR},
+      </if>
+      <if test="bkBeginamount != null" >
+        #{bkBeginamount,jdbcType=DOUBLE},
+      </if>
+      <if test="bkThisamount != null" >
+        #{bkThisamount,jdbcType=DOUBLE},
+      </if>
+      <if test="bkStatus != null" >
+        #{bkStatus,jdbcType=VARCHAR},
+      </if>
+      <if test="bkStatuscode != null" >
+        #{bkStatuscode,jdbcType=VARCHAR},
+      </if>
+      <if test="bkRecorderid != null" >
+        #{bkRecorderid,jdbcType=INTEGER},
+      </if>
+      <if test="bkRecorder != null" >
+        #{bkRecorder,jdbcType=VARCHAR},
+      </if>
+      <if test="bkRecorddate != null" >
+        #{bkRecorddate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="bkYm != null" >
+        #{bkYm,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="bkText1 != null" >
+        #{bkText1,jdbcType=VARCHAR},
+      </if>
+      <if test="bkText2 != null" >
+        #{bkText2,jdbcType=VARCHAR},
+      </if>
+      <if test="bkText3 != null" >
+        #{bkText3,jdbcType=VARCHAR},
+      </if>
+      <if test="bkText4 != null" >
+        #{bkText4,jdbcType=VARCHAR},
+      </if>
+      <if test="bkText5 != null" >
+        #{bkText5,jdbcType=VARCHAR},
+      </if>
+      <if test="bkRemark != null" >
+        #{bkRemark,jdbcType=LONGVARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.po.Bankinformation" >
+    update bankinformation
+    <set >
+      <if test="bkBankcode != null" >
+        bk_bankcode = #{bkBankcode,jdbcType=VARCHAR},
+      </if>
+      <if test="bkBankname != null" >
+        bk_bankname = #{bkBankname,jdbcType=VARCHAR},
+      </if>
+      <if test="bkDate != null" >
+        bk_date = #{bkDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="bkType != null" >
+        bk_type = #{bkType,jdbcType=VARCHAR},
+      </if>
+      <if test="bkBeginamount != null" >
+        bk_beginamount = #{bkBeginamount,jdbcType=DOUBLE},
+      </if>
+      <if test="bkThisamount != null" >
+        bk_thisamount = #{bkThisamount,jdbcType=DOUBLE},
+      </if>
+      <if test="bkStatus != null" >
+        bk_status = #{bkStatus,jdbcType=VARCHAR},
+      </if>
+      <if test="bkStatuscode != null" >
+        bk_statuscode = #{bkStatuscode,jdbcType=VARCHAR},
+      </if>
+      <if test="bkRecorderid != null" >
+        bk_recorderid = #{bkRecorderid,jdbcType=INTEGER},
+      </if>
+      <if test="bkRecorder != null" >
+        bk_recorder = #{bkRecorder,jdbcType=VARCHAR},
+      </if>
+      <if test="bkRecorddate != null" >
+        bk_recorddate = #{bkRecorddate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="bkYm != null" >
+        bk_ym = #{bkYm,jdbcType=INTEGER},
+      </if>
+      <if test="companyid != null" >
+        companyid = #{companyid,jdbcType=INTEGER},
+      </if>
+      <if test="updaterid != null" >
+        updaterid = #{updaterid,jdbcType=INTEGER},
+      </if>
+      <if test="updatetime != null" >
+        updatetime = #{updatetime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="bkText1 != null" >
+        bk_text1 = #{bkText1,jdbcType=VARCHAR},
+      </if>
+      <if test="bkText2 != null" >
+        bk_text2 = #{bkText2,jdbcType=VARCHAR},
+      </if>
+      <if test="bkText3 != null" >
+        bk_text3 = #{bkText3,jdbcType=VARCHAR},
+      </if>
+      <if test="bkText4 != null" >
+        bk_text4 = #{bkText4,jdbcType=VARCHAR},
+      </if>
+      <if test="bkText5 != null" >
+        bk_text5 = #{bkText5,jdbcType=VARCHAR},
+      </if>
+      <if test="bkRemark != null" >
+        bk_remark = #{bkRemark,jdbcType=LONGVARCHAR},
+      </if>
+    </set>
+    where bk_id = #{bkId,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.saas.document.po.Bankinformation" >
+    update bankinformation
+    set bk_bankcode = #{bkBankcode,jdbcType=VARCHAR},
+      bk_bankname = #{bkBankname,jdbcType=VARCHAR},
+      bk_date = #{bkDate,jdbcType=TIMESTAMP},
+      bk_type = #{bkType,jdbcType=VARCHAR},
+      bk_beginamount = #{bkBeginamount,jdbcType=DOUBLE},
+      bk_thisamount = #{bkThisamount,jdbcType=DOUBLE},
+      bk_status = #{bkStatus,jdbcType=VARCHAR},
+      bk_statuscode = #{bkStatuscode,jdbcType=VARCHAR},
+      bk_recorderid = #{bkRecorderid,jdbcType=INTEGER},
+      bk_recorder = #{bkRecorder,jdbcType=VARCHAR},
+      bk_recorddate = #{bkRecorddate,jdbcType=TIMESTAMP},
+      bk_ym = #{bkYm,jdbcType=INTEGER},
+      companyid = #{companyid,jdbcType=INTEGER},
+      updaterid = #{updaterid,jdbcType=INTEGER},
+      updatetime = #{updatetime,jdbcType=TIMESTAMP},
+      bk_text1 = #{bkText1,jdbcType=VARCHAR},
+      bk_text2 = #{bkText2,jdbcType=VARCHAR},
+      bk_text3 = #{bkText3,jdbcType=VARCHAR},
+      bk_text4 = #{bkText4,jdbcType=VARCHAR},
+      bk_text5 = #{bkText5,jdbcType=VARCHAR},
+      bk_remark = #{bkRemark,jdbcType=LONGVARCHAR}
+    where bk_id = #{bkId,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.po.Bankinformation" >
+    update bankinformation
+    set bk_bankcode = #{bkBankcode,jdbcType=VARCHAR},
+      bk_bankname = #{bkBankname,jdbcType=VARCHAR},
+      bk_date = #{bkDate,jdbcType=TIMESTAMP},
+      bk_type = #{bkType,jdbcType=VARCHAR},
+      bk_beginamount = #{bkBeginamount,jdbcType=DOUBLE},
+      bk_thisamount = #{bkThisamount,jdbcType=DOUBLE},
+      bk_status = #{bkStatus,jdbcType=VARCHAR},
+      bk_statuscode = #{bkStatuscode,jdbcType=VARCHAR},
+      bk_recorderid = #{bkRecorderid,jdbcType=INTEGER},
+      bk_recorder = #{bkRecorder,jdbcType=VARCHAR},
+      bk_recorddate = #{bkRecorddate,jdbcType=TIMESTAMP},
+      bk_ym = #{bkYm,jdbcType=INTEGER},
+      companyid = #{companyid,jdbcType=INTEGER},
+      updaterid = #{updaterid,jdbcType=INTEGER},
+      updatetime = #{updatetime,jdbcType=TIMESTAMP},
+      bk_text1 = #{bkText1,jdbcType=VARCHAR},
+      bk_text2 = #{bkText2,jdbcType=VARCHAR},
+      bk_text3 = #{bkText3,jdbcType=VARCHAR},
+      bk_text4 = #{bkText4,jdbcType=VARCHAR},
+      bk_text5 = #{bkText5,jdbcType=VARCHAR}
+    where bk_id = #{bkId,jdbcType=INTEGER}
+  </update>
+
+  <select id="selectAll" resultMap="BaseResultMap">
+    SELECT * FROM bankinformation
+  </select>
+</mapper>

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

@@ -2,7 +2,32 @@
 <!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.CustomerListMapper">
   <resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.CustomerList">
-    <id column="cc_id" jdbcType="INTEGER" property="id" />
+    <id column="cu_id" jdbcType="INTEGER" property="id" />
+    <result column="cu_code" jdbcType="VARCHAR" property="cu_code" />
+    <result column="cu_name" jdbcType="VARCHAR" property="cu_name" />
+    <result column="cu_uu" jdbcType="VARCHAR" property="cu_uu" />
+    <result column="cu_type" jdbcType="VARCHAR" property="cu_type" />
+    <result column="cu_begindate" jdbcType="TIMESTAMP" property="cu_begindate" />
+    <result column="cu_beginaramount" jdbcType="DOUBLE" property="cu_beginaramount" />
+    <result column="cu_beginprerecamount" jdbcType="DOUBLE" property="cu_beginprerecamount" />
+    <result column="cu_promisedays" jdbcType="DOUBLE" property="cu_promisedays" />
+    <result column="cu_taxrate" jdbcType="DOUBLE" property="cu_taxrate" />
+    <result column="cu_sellerid" jdbcType="INTEGER" property="cu_sellerid" />
+    <result column="cu_sellercode" jdbcType="VARCHAR" property="cu_sellercode" />
+    <result column="cu_sellername" jdbcType="VARCHAR" property="cu_sellername" />
+    <result column="cu_credit" jdbcType="DOUBLE" property="cu_credit" />
+    <result column="cu_status" jdbcType="VARCHAR" property="cu_status" />
+    <result column="cu_statuscode" jdbcType="VARCHAR" property="cu_statuscode" />
+    <result column="cu_recordmanid" jdbcType="INTEGER" property="cu_recordmanid" />
+    <result column="cu_recordman" jdbcType="VARCHAR" property="cu_recordman" />
+    <result column="cu_recorddate" jdbcType="TIMESTAMP" property="cu_recorddate" />
+    <result column="cu_leftamount" jdbcType="DOUBLE" property="cu_leftamount" />
+    <result column="cu_recamount" jdbcType="DOUBLE" property="cu_recamount" />
+    <result column="ca_cuid" jdbcType="INTEGER" property="ca_cuid" />
+    <result column="ca_detno" jdbcType="INTEGER" property="ca_detno" />
+    <result column="ca_person" jdbcType="VARCHAR" property="ca_person" />
+    <result column="ca_phone" jdbcType="INTEGER" property="ca_phone" />
+    <result column="ca_default" jdbcType="INTEGER" property="ca_default" />
     <result column="cc_cuid" jdbcType="INTEGER" property="cc_cuid" />
     <result column="cc_detno" jdbcType="INTEGER" property="cc_detno" />
     <result column="cc_name" jdbcType="VARCHAR" property="cc_name" />
@@ -20,12 +45,14 @@
     <result column="cc_tel" jdbcType="INTEGER" property="cc_tel" />
     <result column="cc_qq" jdbcType="VARCHAR" property="cc_qq" />
     <result column="cc_email" jdbcType="VARCHAR" property="cc_email" />
+    <result column="cc_default" jdbcType="INTEGER" property="cc_default" />
 
   </resultMap>
 
 
   <select id="selectCustomerListByCondition"  resultMap="BaseResultMap">
-    select  *  from customer left join customeraddress on cu_id=ca_cuid left join customercontact on cu_id = cc_cuid
+    select  *  from customer left join customeraddress on cu_id=ca_cuid and customeraddress.ca_default = 1  left join customercontact on cu_id = cc_cuid
+    and customercontact.cc_default=1
     <where>
       <if test="con != null">
         ${con}

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

@@ -39,13 +39,13 @@
     updaterid, updatetime, cu_text1, cu_text2, cu_text3, cu_text4, cu_text5, cu_leftamount, 
     cu_recamount
   </sql>
-  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
     select 
     <include refid="Base_Column_List" />
     from customer
     where cu_id = #{cu_id,jdbcType=INTEGER}
   </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
     delete from customer
     where cu_id = #{cu_id,jdbcType=INTEGER}
   </delete>
@@ -286,14 +286,14 @@
       <if test="cu_recorddate != null">
         cu_recorddate = #{cu_recorddate,jdbcType=TIMESTAMP},
       </if>
-      <if test="companyid != null">
-        companyid = #{companyid,jdbcType=INTEGER},
+      <if test="companyId != null">
+        companyid = #{companyId,jdbcType=INTEGER},
       </if>
-      <if test="updaterid != null">
-        updaterid = #{updaterid,jdbcType=INTEGER},
+      <if test="updaterId != null">
+        updaterid = #{updaterId,jdbcType=INTEGER},
       </if>
-      <if test="updatetime != null">
-        updatetime = #{updatetime,jdbcType=TIMESTAMP},
+      <if test="updateTime != null">
+        updatetime = #{updateTime,jdbcType=TIMESTAMP},
       </if>
       <if test="cu_text1 != null">
         cu_text1 = #{cu_text1,jdbcType=VARCHAR},
@@ -351,4 +351,12 @@
       cu_recamount = #{cu_recamount,jdbcType=DOUBLE}
     where cu_id = #{id,jdbcType=INTEGER}
   </update>
+
+  <select id="selectCodeById" parameterType="java.lang.Long" resultType="string">
+    select
+    cu_code
+    from customer
+    where cu_id = #{id,jdbcType=INTEGER}
+  </select>
+
 </mapper>

+ 5 - 0
applications/document/document-server/src/main/resources/mapper/CustomeraddressMapper.xml

@@ -355,5 +355,10 @@
     </foreach>
   </update>
 
+  <delete id="deleteByFK" parameterType="java.lang.Long">
+    delete from customeraddress
+    where ca_cuid = #{id,jdbcType=INTEGER}
+  </delete>
+
 
 </mapper>

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

@@ -17,10 +17,11 @@
     <result column="cc_text3" jdbcType="VARCHAR" property="cc_text3" />
     <result column="cc_text4" jdbcType="VARCHAR" property="cc_text4" />
     <result column="cc_text5" jdbcType="VARCHAR" property="cc_text5" />
+    <result column="cc_default" jdbcType="INTEGER" property="cc_default" />
   </resultMap>
   <sql id="Base_Column_List">
     cc_id, cc_cuid, cc_detno, cc_name, cc_tel, cc_qq, cc_email, companyid, updaterid, 
-    updatetime, cc_text1, cc_text2, cc_text3, cc_text4, cc_text5
+    updatetime, cc_text1, cc_text2, cc_text3, cc_text4, cc_text5,cc_default
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     select 
@@ -81,6 +82,9 @@
       <if test="cc_text5 != null">
         cc_text5,
       </if>
+      <if test="cc_default != null">
+        cc_default,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
 
@@ -126,6 +130,11 @@
       <if test="cc_text5 != null">
         #{cc_text5,jdbcType=VARCHAR},
       </if>
+      <if test="cc_default != null">
+        #{cc_default,jdbcType=INTEGER},
+      </if>
+
+
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Customercontact">
@@ -173,6 +182,9 @@
       <if test="cc_text5 != null">
         cc_text5 = #{cc_text5,jdbcType=VARCHAR},
       </if>
+      <if test="cc_default != null">
+        cc_default = #{cc_default,jdbcType=INTEGER},
+      </if>
     </set>
     where cc_id = #{id,jdbcType=INTEGER}
   </update>
@@ -180,7 +192,7 @@
     select
     <include refid="Base_Column_List" />
     from customercontact
-    where cc_cuid = #{fk_i,jdbcType=INTEGER}
+    where cc_cuid = #{fk_i,jdbcType=INTEGER} order by cc_detno
   </select>
 
   <insert id="batchInsert" parameterType="java.util.List" >
@@ -212,7 +224,10 @@
           updaterid,
         </if>
         <if test="item.updateTime != null">
-          updatetime
+          updatetime,
+        </if>
+        <if test="item.cc_default != null">
+          cc_default,
         </if>
       </trim>
       <trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -240,9 +255,12 @@
         <if test="item.updaterId != null">
           #{item.updaterId,jdbcType=INTEGER},
         </if>
-        <if test="item.updatetime != null">
+        <if test="item.updateTime != null">
           #{item.updateTime,jdbcType=TIMESTAMP},
         </if>
+        <if test="item.cc_default != null">
+          #{item.cc_default,jdbcType=INTEGER},
+        </if>
       </trim>
     </foreach>
   </insert>
@@ -294,10 +312,19 @@
         <if test="item.cc_text5 != null">
           cc_text5 = #{item.cc_text5,jdbcType=VARCHAR},
         </if>
+        <if test="item.cc_default != null">
+          cc_default = #{item.cc_default,jdbcType=INTEGER},
+        </if>
       </set>
       where cc_id = #{item.id,jdbcType=INTEGER}
     </foreach>
   </update>
 
+  <delete id="deleteByFK" parameterType="java.lang.Long">
+    delete from customercontact
+    where cc_cuid = #{id,jdbcType=INTEGER}
+  </delete>
+
+
 
 </mapper>

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

@@ -122,4 +122,7 @@
   <select id="selectAll" resultMap="BaseResultMap">
     SELECT * FROM CUSTOMERKIND
   </select>
+  <select id="getCombo" resultType="com.usoftchina.saas.commons.dto.ComboDTO">
+    SELECT ck_name display,ck_name value FROM CUSTOMERKIND
+  </select>
 </mapper>

+ 49 - 0
applications/document/document-server/src/main/resources/mapper/VendorMapper.xml

@@ -50,5 +50,54 @@
         ORDER BY VE_ID
     </select>
 
+    <resultMap id="VendorListResultMapper" type="com.usoftchina.saas.document.entities.VendorList">
+        <id column="ve_id" property="ve_id" jdbcType="INTEGER" />
+        <result column="ve_code" property="ve_code" jdbcType="VARCHAR" />
+        <result column="ve_uu" property="ve_uu" jdbcType="VARCHAR" />
+        <result column="ve_name" property="ve_name" jdbcType="VARCHAR" />
+        <result column="ve_type" property="ve_type" jdbcType="VARCHAR" />
+        <result column="ve_begindate" property="ve_begindate" jdbcType="TIMESTAMP" />
+        <result column="ve_beginapamount" property="ve_beginapamount" jdbcType="INTEGER" />
+        <result column="ve_beginprepayamount" property="ve_beginprepayamount" jdbcType="INTEGER" />
+        <result column="ve_promisedays" property="ve_promisedays" jdbcType="INTEGER" />
+        <result column="ve_taxrate" property="ve_taxrate" jdbcType="DOUBLE" />
+        <result column="ve_nsrzh" property="ve_nsrzh" jdbcType="VARCHAR" />
+        <result column="ve_bankaccount" property="ve_bankaccount" jdbcType="VARCHAR" />
+        <result column="ve_bankcode" property="ve_bankcode" jdbcType="VARCHAR" />
+        <result column="ve_status" property="ve_status" jdbcType="VARCHAR" />
+        <result column="ve_statuscode" property="ve_statuscode" jdbcType="VARCHAR" />
+        <result column="ve_recordid" property="ve_recordid" jdbcType="INTEGER" />
+        <result column="ve_recordname" property="ve_recordname" jdbcType="VARCHAR" />
+        <result column="ve_initdate" property="ve_initdate" jdbcType="TIMESTAMP" />
+        <result column="ve_text1" property="ve_text1" jdbcType="VARCHAR" />
+        <result column="ve_text2" property="ve_text2" jdbcType="VARCHAR" />
+        <result column="ve_text3" property="ve_text3" jdbcType="VARCHAR" />
+        <result column="ve_text4" property="ve_text4" jdbcType="VARCHAR" />
+        <result column="ve_text5" property="ve_text5" jdbcType="VARCHAR" />
+        <result column="vc_veid" property="vc_veid" jdbcType="INTEGER" />
+        <result column="vc_detno" property="vc_detno" jdbcType="INTEGER" />
+        <result column="vc_name" property="vc_name" jdbcType="VARCHAR" />
+        <result column="vc_tel" property="vc_tel" jdbcType="INTEGER" />
+        <result column="vc_qq" property="vc_qq" jdbcType="VARCHAR" />
+        <result column="vc_email" property="vc_email" jdbcType="VARCHAR" />
+        <result column="vc_text1" property="vc_text1" jdbcType="VARCHAR" />
+        <result column="vc_text2" property="vc_text2" jdbcType="VARCHAR" />
+        <result column="vc_text3" property="vc_text3" jdbcType="VARCHAR" />
+        <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" />
+    </resultMap>
+
+    <select id="getListDataByCondition" resultMap="VendorListResultMapper">
+        SELECT * FROM VENDOR LEFT JOIN VENDORCONTACT ON VE_ID = VC_VEID
+        <where>
+            <if test="condition!=null">
+                ${condition}
+            </if>
+            AND VENDOR.COMPANYID = #{companyId}
+        </where>
+        order by VE_ID,VC_DETNO
+    </select>
+
 </mapper>
 

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

@@ -12,15 +12,16 @@
     <result column="companyId" property="companyId" jdbcType="INTEGER" />
     <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
     <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
-    <result column="ve_text1" property="ve_text1" jdbcType="VARCHAR" />
-    <result column="ve_text2" property="ve_text2" jdbcType="VARCHAR" />
-    <result column="ve_text3" property="ve_text3" jdbcType="VARCHAR" />
-    <result column="ve_text4" property="ve_text4" jdbcType="VARCHAR" />
-    <result column="ve_text5" property="ve_text5" jdbcType="VARCHAR" />
+    <result column="vc_text1" property="vc_text1" jdbcType="VARCHAR" />
+    <result column="vc_text2" property="vc_text2" jdbcType="VARCHAR" />
+    <result column="vc_text3" property="vc_text3" jdbcType="VARCHAR" />
+    <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" />
   </resultMap>
   <sql id="Base_Column_List" >
     vc_id, vc_veid, vc_detno, vc_name, vc_tel, vc_qq, vc_email, companyId, updaterId, 
-    updateTime, ve_text1, ve_text2, ve_text3, ve_text4, ve_text5
+    updateTime, vc_text1, vc_text2, vc_text3, vc_text4, vc_text5, ve_default
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
     select 
@@ -28,22 +29,33 @@
     from vendorcontact
     where vc_id = #{id}
   </select>
+  <select id="selectByFK" resultMap="BaseResultMap" parameterType="java.lang.Long" >
+    select
+    <include refid="Base_Column_List" />
+    from vendorcontact
+    where vc_veid = #{id}
+  </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
     delete from vendorcontact
     where vc_id = #{id}
   </delete>
+  <delete id="deleteByFK" parameterType="java.lang.Long">
+    DELETE FROM VENDORCONTACT
+    WHERE VC_VEID=#{id}
+  </delete>
   <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Vendorcontact" >
     insert into vendorcontact (vc_veid, vc_detno,
       vc_name, vc_tel, vc_qq, 
       vc_email, companyId, updaterId, 
-      updateTime, ve_text1, ve_text2, 
-      ve_text3, ve_text4, ve_text5
+      updateTime, vc_text1, vc_text2, 
+      vc_text3, vc_text4, vc_text5, ve_default
       )
-    values (#{vc_veid,jdbcType=INTEGER}, #{vc_detno,jdbcType=INTEGER},
+    values (#{vc_veid}, #{vc_detno,jdbcType=INTEGER},
       #{vc_name,jdbcType=VARCHAR}, #{vc_tel,jdbcType=INTEGER}, #{vc_qq,jdbcType=VARCHAR}, 
       #{vc_email,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER}, #{updaterId,jdbcType=INTEGER}, 
-      #{updateTime,jdbcType=TIMESTAMP}, #{ve_text1,jdbcType=VARCHAR}, #{ve_text2,jdbcType=VARCHAR}, 
-      #{ve_text3,jdbcType=VARCHAR}, #{ve_text4,jdbcType=VARCHAR}, #{ve_text5,jdbcType=VARCHAR}
+      #{updateTime,jdbcType=TIMESTAMP}, #{vc_text1,jdbcType=VARCHAR}, #{vc_text2,jdbcType=VARCHAR}, 
+      #{vc_text3,jdbcType=VARCHAR}, #{vc_text4,jdbcType=VARCHAR}, #{vc_text5,jdbcType=VARCHAR},
+      #{ve_default,jdbcType=VARCHAR}
       )
   </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Vendorcontact" >
@@ -76,25 +88,28 @@
       <if test="updateTime != null" >
         updateTime,
       </if>
-      <if test="ve_text1 != null" >
-        ve_text1,
+      <if test="vc_text1 != null" >
+        vc_text1,
+      </if>
+      <if test="vc_text2 != null" >
+        vc_text2,
       </if>
-      <if test="ve_text2 != null" >
-        ve_text2,
+      <if test="vc_text3 != null" >
+        vc_text3,
       </if>
-      <if test="ve_text3 != null" >
-        ve_text3,
+      <if test="vc_text4 != null" >
+        vc_text4,
       </if>
-      <if test="ve_text4 != null" >
-        ve_text4,
+      <if test="vc_text5 != null" >
+        vc_text5,
       </if>
-      <if test="ve_text5 != null" >
-        ve_text5,
+      <if test="ve_default != null" >
+        ve_default,
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="vc_veid != null" >
-        #{vc_veid,jdbcType=INTEGER},
+        #{vc_veid},
       </if>
       <if test="vc_detno != null" >
         #{vc_detno,jdbcType=INTEGER},
@@ -120,20 +135,23 @@
       <if test="updateTime != null" >
         #{updateTime,jdbcType=TIMESTAMP},
       </if>
-      <if test="ve_text1 != null" >
-        #{ve_text1,jdbcType=VARCHAR},
+      <if test="vc_text1 != null" >
+        #{vc_text1,jdbcType=VARCHAR},
+      </if>
+      <if test="vc_text2 != null" >
+        #{vc_text2,jdbcType=VARCHAR},
       </if>
-      <if test="ve_text2 != null" >
-        #{ve_text2,jdbcType=VARCHAR},
+      <if test="vc_text3 != null" >
+        #{vc_text3,jdbcType=VARCHAR},
       </if>
-      <if test="ve_text3 != null" >
-        #{ve_text3,jdbcType=VARCHAR},
+      <if test="vc_text4 != null" >
+        #{vc_text4,jdbcType=VARCHAR},
       </if>
-      <if test="ve_text4 != null" >
-        #{ve_text4,jdbcType=VARCHAR},
+      <if test="vc_text5 != null" >
+        #{vc_text5,jdbcType=VARCHAR},
       </if>
-      <if test="ve_text5 != null" >
-        #{ve_text5,jdbcType=VARCHAR},
+      <if test="ve_default != null" >
+        #{ve_default,jdbcType=VARCHAR},
       </if>
     </trim>
   </insert>
@@ -141,7 +159,7 @@
     update vendorcontact
     <set >
       <if test="vc_veid != null" >
-        vc_veid = #{vc_veid,jdbcType=INTEGER},
+        vc_veid = #{vc_veid},
       </if>
       <if test="vc_detno != null" >
         vc_detno = #{vc_detno,jdbcType=INTEGER},
@@ -167,27 +185,30 @@
       <if test="updateTime != null" >
         updateTime = #{updateTime,jdbcType=TIMESTAMP},
       </if>
-      <if test="ve_text1 != null" >
-        ve_text1 = #{ve_text1,jdbcType=VARCHAR},
+      <if test="vc_text1 != null" >
+        vc_text1 = #{vc_text1,jdbcType=VARCHAR},
       </if>
-      <if test="ve_text2 != null" >
-        ve_text2 = #{ve_text2,jdbcType=VARCHAR},
+      <if test="vc_text2 != null" >
+        vc_text2 = #{vc_text2,jdbcType=VARCHAR},
       </if>
-      <if test="ve_text3 != null" >
-        ve_text3 = #{ve_text3,jdbcType=VARCHAR},
+      <if test="vc_text3 != null" >
+        vc_text3 = #{vc_text3,jdbcType=VARCHAR},
       </if>
-      <if test="ve_text4 != null" >
-        ve_text4 = #{ve_text4,jdbcType=VARCHAR},
+      <if test="vc_text4 != null" >
+        vc_text4 = #{vc_text4,jdbcType=VARCHAR},
       </if>
-      <if test="ve_text5 != null" >
-        ve_text5 = #{ve_text5,jdbcType=VARCHAR},
+      <if test="vc_text5 != null" >
+        vc_text5 = #{vc_text5,jdbcType=VARCHAR},
+      </if>
+      <if test="ve_default != null" >
+        ve_default = #{ve_default,jdbcType=VARCHAR},
       </if>
     </set>
     where vc_id = #{id}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Vendorcontact" >
     update vendorcontact
-    set vc_veid = #{vc_veid,jdbcType=INTEGER},
+    set vc_veid = #{vc_veid},
       vc_detno = #{vc_detno,jdbcType=INTEGER},
       vc_name = #{vc_name,jdbcType=VARCHAR},
       vc_tel = #{vc_tel,jdbcType=INTEGER},
@@ -196,11 +217,160 @@
       companyId = #{companyId,jdbcType=INTEGER},
       updaterId = #{updaterId,jdbcType=INTEGER},
       updateTime = #{updateTime,jdbcType=TIMESTAMP},
-      ve_text1 = #{ve_text1,jdbcType=VARCHAR},
-      ve_text2 = #{ve_text2,jdbcType=VARCHAR},
-      ve_text3 = #{ve_text3,jdbcType=VARCHAR},
-      ve_text4 = #{ve_text4,jdbcType=VARCHAR},
-      ve_text5 = #{ve_text5,jdbcType=VARCHAR}
+      vc_text1 = #{vc_text1,jdbcType=VARCHAR},
+      vc_text2 = #{vc_text2,jdbcType=VARCHAR},
+      vc_text3 = #{vc_text3,jdbcType=VARCHAR},
+      vc_text4 = #{vc_text4,jdbcType=VARCHAR},
+      vc_text5 = #{vc_text5,jdbcType=VARCHAR},
+      ve_default = #{ve_default,jdbcType=VARCHAR}
     where vc_id = #{id}
   </update>
+  <insert id="batchInsert" parameterType="java.util.List">
+    <foreach collection="list" item="item" separator=",">
+      INSERT INTO VENDORCONTACT
+      <trim prefix="(" suffix=")" suffixOverrides=",">
+        <if test="item.vc_veid != null" >
+          vc_veid,
+        </if>
+        <if test="item.vc_detno != null" >
+          vc_detno,
+        </if>
+        <if test="item.vc_name != null" >
+          vc_name,
+        </if>
+        <if test="item.vc_tel != null" >
+          vc_tel,
+        </if>
+        <if test="item.vc_qq != null" >
+          vc_qq,
+        </if>
+        <if test="item.vc_email != null" >
+          vc_email,
+        </if>
+        <if test="item.companyId != null" >
+          companyId,
+        </if>
+        <if test="item.updaterId != null" >
+          updaterId,
+        </if>
+        <if test="item.updateTime != null" >
+          updateTime,
+        </if>
+        <if test="item.vc_text1 != null" >
+          vc_text1,
+        </if>
+        <if test="item.vc_text2 != null" >
+          vc_text2,
+        </if>
+        <if test="item.vc_text3 != null" >
+          vc_text3,
+        </if>
+        <if test="item.vc_text4 != null" >
+          vc_text4,
+        </if>
+        <if test="item.vc_text5 != null" >
+          vc_text5,
+        </if>
+        <if test="item.ve_default != null" >
+          ve_default,
+        </if>
+      </trim>
+      <trim prefix="(" suffix=")" suffixOverrides=",">
+        <if test="item.vc_veid != null" >
+          #{item.vc_veid},
+        </if>
+        <if test="item.vc_detno != null" >
+          #{item.vc_detno,jdbcType=INTEGER},
+        </if>
+        <if test="item.vc_name != null" >
+          #{item.vc_name,jdbcType=VARCHAR},
+        </if>
+        <if test="item.vc_tel != null" >
+          #{item.vc_tel,jdbcType=INTEGER},
+        </if>
+        <if test="item.vc_qq != null" >
+          #{item.vc_qq,jdbcType=VARCHAR},
+        </if>
+        <if test="item.vc_email != null" >
+          #{item.vc_email,jdbcType=VARCHAR},
+        </if>
+        <if test="item.companyId != null" >
+          #{item.companyId,jdbcType=INTEGER},
+        </if>
+        <if test="item.updaterId != null" >
+          #{item.updaterId,jdbcType=INTEGER},
+        </if>
+        <if test="item.updateTime != null" >
+          #{item.updateTime,jdbcType=TIMESTAMP},
+        </if>
+        <if test="item.vc_text1 != null" >
+          #{item.vc_text1,jdbcType=VARCHAR},
+        </if>
+        <if test="item.vc_text2 != null" >
+          #{item.vc_text2,jdbcType=VARCHAR},
+        </if>
+        <if test="item.vc_text3 != null" >
+          #{item.vc_text3,jdbcType=VARCHAR},
+        </if>
+        <if test="item.vc_text4 != null" >
+          #{item.vc_text4,jdbcType=VARCHAR},
+        </if>
+        <if test="item.vc_text5 != null" >
+          #{item.vc_text5,jdbcType=VARCHAR},
+        </if>
+        <if test="item.ve_default != null" >
+          #{item.ve_default,jdbcType=VARCHAR},
+        </if>
+      </trim>
+    </foreach>
+  </insert>
+  <update id="batchUpdate" parameterType="com.usoftchina.saas.document.entities.Vendorcontact">
+    <foreach collection="list" item="item" index="index" separator=";">
+      UPDATE VENDORCONTACT
+      <if test="item.vc_detno != null" >
+        vc_detno = #{item.vc_detno,jdbcType=INTEGER},
+      </if>
+      <if test="item.vc_name != null" >
+        vc_name = #{item.vc_name,jdbcType=VARCHAR},
+      </if>
+      <if test="item.vc_tel != null" >
+        vc_tel = #{item.vc_tel,jdbcType=INTEGER},
+      </if>
+      <if test="item.vc_qq != null" >
+        vc_qq = #{item.vc_qq,jdbcType=VARCHAR},
+      </if>
+      <if test="item.vc_email != null" >
+        vc_email = #{item.vc_email,jdbcType=VARCHAR},
+      </if>
+      <if test="item.companyId != null" >
+        companyId = #{item.companyId,jdbcType=INTEGER},
+      </if>
+      <if test="item.updaterId != null" >
+        updaterId = #{item.updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="item.updateTime != null" >
+        updateTime = #{item.updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="item.vc_text1 != null" >
+        vc_text1 = #{item.vc_text1,jdbcType=VARCHAR},
+      </if>
+      <if test="item.vc_text2 != null" >
+        vc_text2 = #{item.vc_text2,jdbcType=VARCHAR},
+      </if>
+      <if test="item.vc_text3 != null" >
+        vc_text3 = #{item.vc_text3,jdbcType=VARCHAR},
+      </if>
+      <if test="item.vc_text4 != null" >
+        vc_text4 = #{item.vc_text4,jdbcType=VARCHAR},
+      </if>
+      <if test="item.vc_text5 != null" >
+        vc_text5 = #{item.vc_text5,jdbcType=VARCHAR},
+      </if>
+      <if test="item.ve_default != null" >
+        ve_default = #{item.ve_default,jdbcType=VARCHAR},
+      </if>
+      WHERE VC_ID= #{item.id,jdbcType=INTEGER}
+    </foreach>
+  </update>
+
 </mapper>

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

@@ -58,7 +58,7 @@ public class CustomeraddressMapperTest {
         List<Customeraddress> list = new ArrayList<>();
         Customeraddress customeraddress = new Customeraddress();
         customeraddress.setId(new Long(2));
-        customeraddress.setCa_person("人2");
+        customeraddress.setCa_person("人3");
         list.add(customeraddress);
         customeraddressMapper.batchUpdate(list);
     }

+ 1 - 5
applications/document/document-server/src/test/java/com/usoftchina/saas/document/mapper/CustomercontactMapperTest.java

@@ -52,11 +52,7 @@ public class CustomercontactMapperTest {
         customercontact.setCc_detno(1);
         customercontact.setCc_name("zdw");
         customercontact.setCc_tel(1881);
-        customercontact.setCc_qq("qq");
-        customercontact.setCc_email("@qq");
-        customercontact.setCompanyId(1);
-        customercontact.setUpdaterId(1);
-        customercontact.setUpdateTime(new Date());
+
         insertDetail1.add(customercontact);
         customercontactMapper.batchInsert(insertDetail1);
     }

+ 1 - 3
applications/money/money-server/pom.xml

@@ -78,9 +78,7 @@
         </dependency>
         <dependency>
             <groupId>com.usoftchina.saas</groupId>
-            <artifactId>commons-server</artifactId>
-            <version>1.0.0-SNAPSHOT</version>
-            <scope>compile</scope>
+            <artifactId>commons-api</artifactId>
         </dependency>
     </dependencies>
 

+ 60 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/OthreceiptsController.java

@@ -0,0 +1,60 @@
+package com.usoftchina.saas.money.controller;
+
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.money.po.Othreceipts;
+import com.usoftchina.saas.money.po.Othte;
+import com.usoftchina.saas.money.service.OthreceiptsService;
+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.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author heqw
+ * @date 2018/10/24 17:26
+ **/
+@RestController
+@RequestMapping("/money/othreceipts")
+public class OthreceiptsController {
+    @Autowired
+    private OthreceiptsService othreceiptsService;
+
+    @RequestMapping("/save")
+    public Result insert(@RequestBody Othte body) {
+        int id = othreceiptsService.insert(body);
+        return Result.success(id);
+    }
+
+
+    @GetMapping("/delete")
+    public Result deletePaybalance(int id){
+        othreceiptsService.delete(id);
+        return Result.success();
+    }
+
+    @GetMapping("/read")
+    public Result getPaybalance(int id){
+        return Result.success(othreceiptsService.select(id));
+    }
+
+    @GetMapping("/List")
+    public Result getPaybalanceList(PageRequest page){
+        PageInfo<Othreceipts> list = othreceiptsService.selectList(page);
+        return Result.success(list);
+    }
+
+    @RequestMapping("/audit")
+    public Result audit(@RequestBody Othte body){
+        othreceiptsService.audit(body);
+        return Result.success();
+    }
+
+    @GetMapping("/unAudit")
+    public Result unAudit(int id){
+        othreceiptsService.unAudit(id);
+        return Result.success();
+    }
+}

+ 63 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/OthspengdingsController.java

@@ -0,0 +1,63 @@
+package com.usoftchina.saas.money.controller;
+
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.money.po.Othreceipts;
+import com.usoftchina.saas.money.po.Othsp;
+import com.usoftchina.saas.money.po.Othspendings;
+import com.usoftchina.saas.money.po.Othte;
+import com.usoftchina.saas.money.service.OthspendingsService;
+import com.usoftchina.saas.page.PageRequest;
+import io.swagger.annotations.Api;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author heqw
+ * @date 2018/10/24 22:15
+ **/
+@RestController
+@RequestMapping("/money/othspengdings")
+public class OthspengdingsController {
+    @Autowired
+    private OthspendingsService othspendingsService;
+
+    @RequestMapping("/save")
+    public Result insert(@RequestBody Othsp body) {
+        int id = othspendingsService.insert(body);
+        return Result.success(id);
+    }
+
+
+    @GetMapping("/delete")
+    public Result deletePaybalance(int id){
+        othspendingsService.delete(id);
+        return Result.success();
+    }
+
+    @GetMapping("/read")
+    public Result getPaybalance(int id){
+        return Result.success(othspendingsService.select(id));
+    }
+
+    @GetMapping("/List")
+    public Result getPaybalanceList(PageRequest page){
+        PageInfo<Othspendings> list = othspendingsService.selectList(page);
+        return Result.success(list);
+    }
+
+    @RequestMapping("/audit")
+    public Result audit(@RequestBody Othsp body){
+        othspendingsService.audit(body);
+        return Result.success();
+    }
+
+    @GetMapping("/unAudit")
+    public Result unAudit(int id){
+        othspendingsService.unAudit(id);
+        return Result.success();
+    }
+}

+ 19 - 13
applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/PaybalanceController.java

@@ -23,33 +23,39 @@ public class PaybalanceController {
     @Autowired
     private PaybalanceService paybalanceService;
 
-    @RequestMapping("/insertPaybalance")
-    public Result insertPaybalance(@RequestBody Pay body) {
+    @RequestMapping("/save")
+    public Result insert(@RequestBody Pay body) {
         int id = paybalanceService.insert(body);
         return Result.success(id);
     }
 
 
-    @RequestMapping("/updatePaybalance")
-    public Result updatePaybalance(@RequestBody Pay body){
-        paybalanceService.updatePaybalance(body);
-        return Result.success();
-    }
-
-    @GetMapping("/deletePaybalance")
+    @GetMapping("/delete")
     public Result deletePaybalance(int id){
-        paybalanceService.deletePaybalance(id);
+        paybalanceService.delete(id);
         return Result.success();
     }
 
-    @GetMapping("/getPaybalance")
+    @GetMapping("/read")
     public Result getPaybalance(int id){
-        return Result.success(paybalanceService.selectByPrimaryKey(id));
+        return Result.success(paybalanceService.select(id));
     }
 
-    @GetMapping("/getPaybalanceList")
+    @GetMapping("/List")
     public Result getPaybalanceList(PageRequest page){
         PageInfo<Paybalance> list = paybalanceService.selectList(page);
         return Result.success(list);
     }
+
+    @RequestMapping("/audit")
+    public Result audit(@RequestBody Pay body){
+        paybalanceService.audit(body);
+        return Result.success();
+    }
+
+    @GetMapping("/unAudit")
+    public Result unAudit(int id){
+        paybalanceService.unAudit(id);
+        return Result.success();
+    }
 }

+ 28 - 18
applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/RecbalanceContorller.java

@@ -3,47 +3,57 @@ package com.usoftchina.saas.money.controller;
 import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.money.po.Rec;
 import com.usoftchina.saas.money.service.RecbalanceService;
+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.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 /**
  * @author heqw
  * @date 2018/10/23 15:40
  **/
 @RestController
-@RequestMapping("/money")
+@RequestMapping("/money/recbalance")
 public class RecbalanceContorller {
     @Autowired
     private RecbalanceService recbalanceService;
 
-    @RequestMapping("/insertRecbalance")
+    @RequestMapping("/save")
     public Result insert(@RequestBody Rec body){
         recbalanceService.insert(body);
         return Result.success();
     }
 
-    @GetMapping("/deleteRecbalance")
-    public Result deleteRecbalance(int id){
-        recbalanceService.delectRecbalance(id);
+    @GetMapping("/delete")
+    public Result delete(int id){
+        recbalanceService.delect(id);
         return Result.success();
     }
 
-    @RequestMapping("/updateRecbalance")
-    public Result updateRecbalance(@RequestBody Rec body){
-        recbalanceService.updateRecbalance(body);
+    @GetMapping("/deleteItem/{id}")
+    public Result deleteItem(@PathVariable int id){
+        recbalanceService.delectItem(id);
         return Result.success();
     }
 
-    @GetMapping("/selectRecbalance")
-    public Result selectRecbalance(int id){
-        return Result.success(recbalanceService.selectRecbalance(id));
+    @GetMapping("/read/{id}")
+    public Result selectRecbalance(@PathVariable int id){
+        return Result.success(recbalanceService.select(id));
     }
 
-    @GetMapping("/selectRecbalanceList")
-    public Result selectRecbalanceList(){
-        return Result.success(recbalanceService.selectRecbalanceList());
+    @GetMapping("/list")
+    public Result selectRecbalanceList(PageRequest page){
+        return Result.success(recbalanceService.selectList(page));
+    }
+
+    @RequestMapping("/audit")
+    public Result audit(@RequestBody Rec body){
+        recbalanceService.audit(body);
+        return Result.success();
+    }
+
+    @GetMapping("/unAudit")
+    public Result unAudit(int id){
+        recbalanceService.unAudit(id);
+        return Result.success();
     }
 }

+ 21 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/OthreceiptsMapper.java

@@ -0,0 +1,21 @@
+package com.usoftchina.saas.money.mapper;
+
+import com.usoftchina.saas.money.po.Othreceipts;
+import com.usoftchina.saas.page.PageRequest;
+
+import java.util.List;
+
+public interface OthreceiptsMapper {
+    int deleteByPrimaryKey(Integer orId);
+
+    int insert(Othreceipts record);
+
+    int insertSelective(Othreceipts record);
+
+    Othreceipts selectByPrimaryKey(Integer orId);
+    List<Othreceipts> selectList();
+
+    int updateByPrimaryKeySelective(Othreceipts record);
+
+    int updateByPrimaryKey(Othreceipts record);
+}

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

@@ -0,0 +1,18 @@
+package com.usoftchina.saas.money.mapper;
+
+import com.usoftchina.saas.money.po.Othreceiptsdetail;
+
+public interface OthreceiptsdetailMapper {
+    int deleteByPrimaryKey(Integer ordId);
+    int deleteItem(int id);
+
+    int insert(Othreceiptsdetail record);
+
+    int insertSelective(Othreceiptsdetail record);
+
+    Othreceiptsdetail selectByPrimaryKey(Integer ordId);
+
+    int updateByPrimaryKeySelective(Othreceiptsdetail record);
+
+    int updateByPrimaryKey(Othreceiptsdetail record);
+}

+ 21 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/OthspendingsMapper.java

@@ -0,0 +1,21 @@
+package com.usoftchina.saas.money.mapper;
+
+import com.usoftchina.saas.money.po.Othspendings;
+
+import java.util.List;
+
+public interface OthspendingsMapper {
+    int deleteByPrimaryKey(Integer osId);
+
+    int insert(Othspendings record);
+
+    int insertSelective(Othspendings record);
+
+    Othspendings selectByPrimaryKey(Integer osId);
+
+    List<Othspendings> selectList();
+
+    int updateByPrimaryKeySelective(Othspendings record);
+
+    int updateByPrimaryKey(Othspendings record);
+}

+ 18 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/OthspendingsdetailMapper.java

@@ -0,0 +1,18 @@
+package com.usoftchina.saas.money.mapper;
+
+import com.usoftchina.saas.money.po.Othspendingsdetail;
+
+public interface OthspendingsdetailMapper {
+    int deleteByPrimaryKey(Integer osdId);
+    int deleteItem(int id);
+
+    int insert(Othspendingsdetail record);
+
+    int insertSelective(Othspendingsdetail record);
+
+    Othspendingsdetail selectByPrimaryKey(Integer osdId);
+
+    int updateByPrimaryKeySelective(Othspendingsdetail record);
+
+    int updateByPrimaryKey(Othspendingsdetail record);
+}

+ 6 - 2
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/PaybalancedetMapper.java

@@ -2,16 +2,20 @@ package com.usoftchina.saas.money.mapper;
 
 import com.usoftchina.saas.money.po.Paybalancedet;
 
+import java.util.List;
+
 public interface PaybalancedetMapper {
     int deleteByPrimaryKey(Integer pdId);
 
-    int insert(Paybalancedet record);
+    int deleteItem(int id);
+
+    int insert(List<Paybalancedet> record);
 
     int insertSelective(Paybalancedet record);
 
     Paybalancedet selectByPrimaryKey(Integer pdId);
 
-    int updateByPrimaryKeySelective(Paybalancedet record);
+    int updateByPrimaryKeySelective(List<Paybalancedet> record);
 
     int updateByPrimaryKey(Paybalancedet record);
 }

+ 6 - 2
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/PaybalancedetailMapper.java

@@ -3,10 +3,14 @@ package com.usoftchina.saas.money.mapper;
 
 import com.usoftchina.saas.money.po.Paybalancedetail;
 
+import java.util.List;
+
 public interface PaybalancedetailMapper {
     int deleteByPrimaryKey(Integer pbdId);
 
-    int insert(Paybalancedetail record);
+    int deleteItem(int id);
+
+    int insert(List<Paybalancedetail> record);
 
     int insertSelective(Paybalancedetail record);
 
@@ -14,5 +18,5 @@ public interface PaybalancedetailMapper {
 
     int updateByPrimaryKeySelective(Paybalancedetail record);
 
-    int updateByPrimaryKey(Paybalancedetail record);
+//    int updateByPrimaryKey(Paybalancedetail record);
 }

+ 2 - 2
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/RecbalancedetMapper.java

@@ -11,11 +11,11 @@ import org.apache.ibatis.annotations.Param;
 public interface RecbalancedetMapper extends CommonBaseMapper<Recbalancedet> {
     int countByExample(RecbalancedetExample example);
 
-    int deleteByExample(RecbalancedetExample example);
+    int deleteItem(int id);
 
     int deleteByPrimaryKey(Integer rd_id);
 
-    int insert(Recbalancedet record);
+    int insert(List<Recbalancedet> record);
 
     int insertSelective(Recbalancedet record);
 

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

@@ -2,10 +2,13 @@ package com.usoftchina.saas.money.mapper;
 
 import com.usoftchina.saas.money.po.Recbalancedetail;
 
+import java.util.List;
+
 public interface RecbalancedetailMapper {
     int deleteByPrimaryKey(Integer rbdId);
+    int deleteItem(Integer rbdId);
 
-    int insert(Recbalancedetail record);
+    int insert(List<Recbalancedetail> record);
 
     int insertSelective(Recbalancedetail record);
 

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

@@ -0,0 +1,245 @@
+package com.usoftchina.saas.money.po;
+
+import java.util.Date;
+
+public class Othreceipts {
+    private Integer orId;
+
+    private String orCode;
+
+    private Date orDate;
+
+    private Integer orCustid;
+
+    private String orCustcode;
+
+    private String orCustname;
+
+    private String orBankcode;
+
+    private Integer orBankid;
+
+    private String orBankname;
+
+    private Double orAmount;
+
+    private Integer orRecorderid;
+
+    private String orRecorder;
+
+    private Date orRecorddate;
+
+    private String orStatus;
+
+    private String orStatuscode;
+
+    private String orRemark;
+
+    private Integer companyid;
+
+    private Integer updaterid;
+
+    private Date updatedate;
+
+    private String orText1;
+
+    private String orText2;
+
+    private String orText3;
+
+    private String orText4;
+
+    private String orText5;
+
+    public Integer getOrId() {
+        return orId;
+    }
+
+    public void setOrId(Integer orId) {
+        this.orId = orId;
+    }
+
+    public String getOrCode() {
+        return orCode;
+    }
+
+    public void setOrCode(String orCode) {
+        this.orCode = orCode == null ? null : orCode.trim();
+    }
+
+    public Date getOrDate() {
+        return orDate;
+    }
+
+    public void setOrDate(Date orDate) {
+        this.orDate = orDate;
+    }
+
+    public Integer getOrCustid() {
+        return orCustid;
+    }
+
+    public void setOrCustid(Integer orCustid) {
+        this.orCustid = orCustid;
+    }
+
+    public String getOrCustcode() {
+        return orCustcode;
+    }
+
+    public void setOrCustcode(String orCustcode) {
+        this.orCustcode = orCustcode == null ? null : orCustcode.trim();
+    }
+
+    public String getOrCustname() {
+        return orCustname;
+    }
+
+    public void setOrCustname(String orCustname) {
+        this.orCustname = orCustname == null ? null : orCustname.trim();
+    }
+
+    public String getOrBankcode() {
+        return orBankcode;
+    }
+
+    public void setOrBankcode(String orBankcode) {
+        this.orBankcode = orBankcode == null ? null : orBankcode.trim();
+    }
+
+    public Integer getOrBankid() {
+        return orBankid;
+    }
+
+    public void setOrBankid(Integer orBankid) {
+        this.orBankid = orBankid;
+    }
+
+    public String getOrBankname() {
+        return orBankname;
+    }
+
+    public void setOrBankname(String orBankname) {
+        this.orBankname = orBankname == null ? null : orBankname.trim();
+    }
+
+    public Double getOrAmount() {
+        return orAmount;
+    }
+
+    public void setOrAmount(Double orAmount) {
+        this.orAmount = orAmount;
+    }
+
+    public Integer getOrRecorderid() {
+        return orRecorderid;
+    }
+
+    public void setOrRecorderid(Integer orRecorderid) {
+        this.orRecorderid = orRecorderid;
+    }
+
+    public String getOrRecorder() {
+        return orRecorder;
+    }
+
+    public void setOrRecorder(String orRecorder) {
+        this.orRecorder = orRecorder == null ? null : orRecorder.trim();
+    }
+
+    public Date getOrRecorddate() {
+        return orRecorddate;
+    }
+
+    public void setOrRecorddate(Date orRecorddate) {
+        this.orRecorddate = orRecorddate;
+    }
+
+    public String getOrStatus() {
+        return orStatus;
+    }
+
+    public void setOrStatus(String orStatus) {
+        this.orStatus = orStatus;
+    }
+
+    public String getOrStatuscode() {
+        return orStatuscode;
+    }
+
+    public void setOrStatuscode(String orStatuscode) {
+        this.orStatuscode = orStatuscode;
+    }
+
+    public String getOrRemark() {
+        return orRemark;
+    }
+
+    public void setOrRemark(String orRemark) {
+        this.orRemark = orRemark == null ? null : orRemark.trim();
+    }
+
+    public Integer getCompanyid() {
+        return companyid;
+    }
+
+    public void setCompanyid(Integer companyid) {
+        this.companyid = companyid;
+    }
+
+    public Integer getUpdaterid() {
+        return updaterid;
+    }
+
+    public void setUpdaterid(Integer updaterid) {
+        this.updaterid = updaterid;
+    }
+
+    public Date getUpdatedate() {
+        return updatedate;
+    }
+
+    public void setUpdatedate(Date updatedate) {
+        this.updatedate = updatedate;
+    }
+
+    public String getOrText1() {
+        return orText1;
+    }
+
+    public void setOrText1(String orText1) {
+        this.orText1 = orText1 == null ? null : orText1.trim();
+    }
+
+    public String getOrText2() {
+        return orText2;
+    }
+
+    public void setOrText2(String orText2) {
+        this.orText2 = orText2 == null ? null : orText2.trim();
+    }
+
+    public String getOrText3() {
+        return orText3;
+    }
+
+    public void setOrText3(String orText3) {
+        this.orText3 = orText3 == null ? null : orText3.trim();
+    }
+
+    public String getOrText4() {
+        return orText4;
+    }
+
+    public void setOrText4(String orText4) {
+        this.orText4 = orText4 == null ? null : orText4.trim();
+    }
+
+    public String getOrText5() {
+        return orText5;
+    }
+
+    public void setOrText5(String orText5) {
+        this.orText5 = orText5 == null ? null : orText5.trim();
+    }
+}

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

@@ -0,0 +1,155 @@
+package com.usoftchina.saas.money.po;
+
+import java.util.Date;
+
+public class Othreceiptsdetail {
+    private Integer ordId;
+
+    private Integer ordOrid;
+
+    private Integer ordDetno;
+
+    private Integer ordYm;
+
+    private String ordType;
+
+    private Double ordNowbalance;
+
+    private String ordRemark;
+
+    private Integer companyid;
+
+    private Integer updaterid;
+
+    private Date updatedate;
+
+    private String ordText1;
+
+    private String ordText2;
+
+    private String ordText3;
+
+    private String ordText4;
+
+    private String ordText5;
+
+    public Integer getOrdId() {
+        return ordId;
+    }
+
+    public void setOrdId(Integer ordId) {
+        this.ordId = ordId;
+    }
+
+    public Integer getOrdOrid() {
+        return ordOrid;
+    }
+
+    public void setOrdOrid(Integer ordOrid) {
+        this.ordOrid = ordOrid;
+    }
+
+    public Integer getOrdDetno() {
+        return ordDetno;
+    }
+
+    public void setOrdDetno(Integer ordDetno) {
+        this.ordDetno = ordDetno;
+    }
+
+    public Integer getOrdYm() {
+        return ordYm;
+    }
+
+    public void setOrdYm(Integer ordYm) {
+        this.ordYm = ordYm;
+    }
+
+    public String getOrdType() {
+        return ordType;
+    }
+
+    public void setOrdType(String ordType) {
+        this.ordType = ordType == null ? null : ordType.trim();
+    }
+
+    public Double getOrdNowbalance() {
+        return ordNowbalance;
+    }
+
+    public void setOrdNowbalance(Double ordNowbalance) {
+        this.ordNowbalance = ordNowbalance;
+    }
+
+    public String getOrdRemark() {
+        return ordRemark;
+    }
+
+    public void setOrdRemark(String ordRemark) {
+        this.ordRemark = ordRemark == null ? null : ordRemark.trim();
+    }
+
+    public Integer getCompanyid() {
+        return companyid;
+    }
+
+    public void setCompanyid(Integer companyid) {
+        this.companyid = companyid;
+    }
+
+    public Integer getUpdaterid() {
+        return updaterid;
+    }
+
+    public void setUpdaterid(Integer updaterid) {
+        this.updaterid = updaterid;
+    }
+
+    public Date getUpdatedate() {
+        return updatedate;
+    }
+
+    public void setUpdatedate(Date updatedate) {
+        this.updatedate = updatedate;
+    }
+
+    public String getOrdText1() {
+        return ordText1;
+    }
+
+    public void setOrdText1(String ordText1) {
+        this.ordText1 = ordText1 == null ? null : ordText1.trim();
+    }
+
+    public String getOrdText2() {
+        return ordText2;
+    }
+
+    public void setOrdText2(String ordText2) {
+        this.ordText2 = ordText2 == null ? null : ordText2.trim();
+    }
+
+    public String getOrdText3() {
+        return ordText3;
+    }
+
+    public void setOrdText3(String ordText3) {
+        this.ordText3 = ordText3 == null ? null : ordText3.trim();
+    }
+
+    public String getOrdText4() {
+        return ordText4;
+    }
+
+    public void setOrdText4(String ordText4) {
+        this.ordText4 = ordText4 == null ? null : ordText4.trim();
+    }
+
+    public String getOrdText5() {
+        return ordText5;
+    }
+
+    public void setOrdText5(String ordText5) {
+        this.ordText5 = ordText5 == null ? null : ordText5.trim();
+    }
+}

+ 28 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othsp.java

@@ -0,0 +1,28 @@
+package com.usoftchina.saas.money.po;
+
+import java.util.List;
+
+/**
+ * @author heqw
+ * @date 2018/10/24 17:42
+ **/
+public class Othsp {
+    private Othspendings main;
+    private List<Othspendingsdetail> items;
+
+    public Othspendings getMain() {
+        return main;
+    }
+
+    public void setMain(Othspendings main) {
+        this.main = main;
+    }
+
+    public List<Othspendingsdetail> getItems() {
+        return items;
+    }
+
+    public void setItems(List<Othspendingsdetail> items) {
+        this.items = items;
+    }
+}

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

@@ -0,0 +1,245 @@
+package com.usoftchina.saas.money.po;
+
+import java.util.Date;
+
+public class Othspendings {
+    private Integer osId;
+
+    private String osCode;
+
+    private Date osDate;
+
+    private Integer osVendid;
+
+    private String osVendcode;
+
+    private String osVendname;
+
+    private Integer osBankid;
+
+    private String osBankcode;
+
+    private String osBankname;
+
+    private Double osAmount;
+
+    private Integer osRecorderid;
+
+    private String osRecorder;
+
+    private Date osRecorddate;
+
+    private String osStatus;
+
+    private String osStatuscode;
+
+    private String osRemark;
+
+    private Integer companyid;
+
+    private Integer updaterid;
+
+    private Date updatedate;
+
+    private String osText1;
+
+    private String osText2;
+
+    private String osText3;
+
+    private String osText4;
+
+    private String osText5;
+
+    public Integer getOsId() {
+        return osId;
+    }
+
+    public void setOsId(Integer osId) {
+        this.osId = osId;
+    }
+
+    public String getOsCode() {
+        return osCode;
+    }
+
+    public void setOsCode(String osCode) {
+        this.osCode = osCode == null ? null : osCode.trim();
+    }
+
+    public Date getOsDate() {
+        return osDate;
+    }
+
+    public void setOsDate(Date osDate) {
+        this.osDate = osDate;
+    }
+
+    public Integer getOsVendid() {
+        return osVendid;
+    }
+
+    public void setOsVendid(Integer osVendid) {
+        this.osVendid = osVendid;
+    }
+
+    public String getOsVendcode() {
+        return osVendcode;
+    }
+
+    public void setOsVendcode(String osVendcode) {
+        this.osVendcode = osVendcode == null ? null : osVendcode.trim();
+    }
+
+    public String getOsVendname() {
+        return osVendname;
+    }
+
+    public void setOsVendname(String osVendname) {
+        this.osVendname = osVendname == null ? null : osVendname.trim();
+    }
+
+    public Integer getOsBankid() {
+        return osBankid;
+    }
+
+    public void setOsBankid(Integer osBankid) {
+        this.osBankid = osBankid;
+    }
+
+    public String getOsBankcode() {
+        return osBankcode;
+    }
+
+    public void setOsBankcode(String osBankcode) {
+        this.osBankcode = osBankcode == null ? null : osBankcode.trim();
+    }
+
+    public String getOsBankname() {
+        return osBankname;
+    }
+
+    public void setOsBankname(String osBankname) {
+        this.osBankname = osBankname == null ? null : osBankname.trim();
+    }
+
+    public Double getOsAmount() {
+        return osAmount;
+    }
+
+    public void setOsAmount(Double osAmount) {
+        this.osAmount = osAmount;
+    }
+
+    public Integer getOsRecorderid() {
+        return osRecorderid;
+    }
+
+    public void setOsRecorderid(Integer osRecorderid) {
+        this.osRecorderid = osRecorderid;
+    }
+
+    public String getOsRecorder() {
+        return osRecorder;
+    }
+
+    public void setOsRecorder(String osRecorder) {
+        this.osRecorder = osRecorder == null ? null : osRecorder.trim();
+    }
+
+    public Date getOsRecorddate() {
+        return osRecorddate;
+    }
+
+    public void setOsRecorddate(Date osRecorddate) {
+        this.osRecorddate = osRecorddate;
+    }
+
+    public String getOsStatus() {
+        return osStatus;
+    }
+
+    public void setOsStatus(String osStatus) {
+        this.osStatus = osStatus;
+    }
+
+    public String getOsStatuscode() {
+        return osStatuscode;
+    }
+
+    public void setOsStatuscode(String osStatuscode) {
+        this.osStatuscode = osStatuscode;
+    }
+
+    public String getOsRemark() {
+        return osRemark;
+    }
+
+    public void setOsRemark(String osRemark) {
+        this.osRemark = osRemark == null ? null : osRemark.trim();
+    }
+
+    public Integer getCompanyid() {
+        return companyid;
+    }
+
+    public void setCompanyid(Integer companyid) {
+        this.companyid = companyid;
+    }
+
+    public Integer getUpdaterid() {
+        return updaterid;
+    }
+
+    public void setUpdaterid(Integer updaterid) {
+        this.updaterid = updaterid;
+    }
+
+    public Date getUpdatedate() {
+        return updatedate;
+    }
+
+    public void setUpdatedate(Date updatedate) {
+        this.updatedate = updatedate;
+    }
+
+    public String getOsText1() {
+        return osText1;
+    }
+
+    public void setOsText1(String osText1) {
+        this.osText1 = osText1 == null ? null : osText1.trim();
+    }
+
+    public String getOsText2() {
+        return osText2;
+    }
+
+    public void setOsText2(String osText2) {
+        this.osText2 = osText2 == null ? null : osText2.trim();
+    }
+
+    public String getOsText3() {
+        return osText3;
+    }
+
+    public void setOsText3(String osText3) {
+        this.osText3 = osText3 == null ? null : osText3.trim();
+    }
+
+    public String getOsText4() {
+        return osText4;
+    }
+
+    public void setOsText4(String osText4) {
+        this.osText4 = osText4 == null ? null : osText4.trim();
+    }
+
+    public String getOsText5() {
+        return osText5;
+    }
+
+    public void setOsText5(String osText5) {
+        this.osText5 = osText5 == null ? null : osText5.trim();
+    }
+}

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

@@ -0,0 +1,155 @@
+package com.usoftchina.saas.money.po;
+
+import java.util.Date;
+
+public class Othspendingsdetail {
+    private Integer osdId;
+
+    private Integer osdOrid;
+
+    private Integer osdDetno;
+
+    private Integer osdYm;
+
+    private String osdType;
+
+    private Double osdNowbalance;
+
+    private String osdRemark;
+
+    private Integer companyid;
+
+    private Integer updaterid;
+
+    private Date updatedate;
+
+    private String osdText1;
+
+    private String osdText2;
+
+    private String osdText3;
+
+    private String osdText4;
+
+    private String osdText5;
+
+    public Integer getOsdId() {
+        return osdId;
+    }
+
+    public void setOsdId(Integer osdId) {
+        this.osdId = osdId;
+    }
+
+    public Integer getOsdOrid() {
+        return osdOrid;
+    }
+
+    public void setOsdOrid(Integer osdOrid) {
+        this.osdOrid = osdOrid;
+    }
+
+    public Integer getOsdDetno() {
+        return osdDetno;
+    }
+
+    public void setOsdDetno(Integer osdDetno) {
+        this.osdDetno = osdDetno;
+    }
+
+    public Integer getOsdYm() {
+        return osdYm;
+    }
+
+    public void setOsdYm(Integer osdYm) {
+        this.osdYm = osdYm;
+    }
+
+    public String getOsdType() {
+        return osdType;
+    }
+
+    public void setOsdType(String osdType) {
+        this.osdType = osdType == null ? null : osdType.trim();
+    }
+
+    public Double getOsdNowbalance() {
+        return osdNowbalance;
+    }
+
+    public void setOsdNowbalance(Double osdNowbalance) {
+        this.osdNowbalance = osdNowbalance;
+    }
+
+    public String getOsdRemark() {
+        return osdRemark;
+    }
+
+    public void setOsdRemark(String osdRemark) {
+        this.osdRemark = osdRemark == null ? null : osdRemark.trim();
+    }
+
+    public Integer getCompanyid() {
+        return companyid;
+    }
+
+    public void setCompanyid(Integer companyid) {
+        this.companyid = companyid;
+    }
+
+    public Integer getUpdaterid() {
+        return updaterid;
+    }
+
+    public void setUpdaterid(Integer updaterid) {
+        this.updaterid = updaterid;
+    }
+
+    public Date getUpdatedate() {
+        return updatedate;
+    }
+
+    public void setUpdatedate(Date updatedate) {
+        this.updatedate = updatedate;
+    }
+
+    public String getOsdText1() {
+        return osdText1;
+    }
+
+    public void setOsdText1(String osdText1) {
+        this.osdText1 = osdText1 == null ? null : osdText1.trim();
+    }
+
+    public String getOsdText2() {
+        return osdText2;
+    }
+
+    public void setOsdText2(String osdText2) {
+        this.osdText2 = osdText2 == null ? null : osdText2.trim();
+    }
+
+    public String getOsdText3() {
+        return osdText3;
+    }
+
+    public void setOsdText3(String osdText3) {
+        this.osdText3 = osdText3 == null ? null : osdText3.trim();
+    }
+
+    public String getOsdText4() {
+        return osdText4;
+    }
+
+    public void setOsdText4(String osdText4) {
+        this.osdText4 = osdText4 == null ? null : osdText4.trim();
+    }
+
+    public String getOsdText5() {
+        return osdText5;
+    }
+
+    public void setOsdText5(String osdText5) {
+        this.osdText5 = osdText5 == null ? null : osdText5.trim();
+    }
+}

+ 28 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othte.java

@@ -0,0 +1,28 @@
+package com.usoftchina.saas.money.po;
+
+import java.util.List;
+
+/**
+ * @author heqw
+ * @date 2018/10/24 17:37
+ **/
+public class Othte {
+    private Othreceipts main;
+    private List<Othreceiptsdetail> items;
+
+    public Othreceipts getMain() {
+        return main;
+    }
+
+    public void setMain(Othreceipts main) {
+        this.main = main;
+    }
+
+    public List<Othreceiptsdetail> getItems() {
+        return items;
+    }
+
+    public void setItems(List<Othreceiptsdetail> items) {
+        this.items = items;
+    }
+}

+ 17 - 15
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Pay.java

@@ -1,35 +1,37 @@
 package com.usoftchina.saas.money.po;
 
+import java.util.List;
+
 /**
  * @author heqw
  * @date 2018/10/23 10:19
  **/
 public class Pay {
-    private Paybalance paybalance;
-    private Paybalancedet paybalancedet;
-    private Paybalancedetail paybalancedetail;
+    private Paybalance main;
+    private List<Paybalancedet> items1;
+    private List<Paybalancedetail> items2;
 
-    public Paybalance getPaybalance() {
-        return paybalance;
+    public Paybalance getMain() {
+        return main;
     }
 
-    public void setPaybalance(Paybalance paybalance) {
-        this.paybalance = paybalance;
+    public void setMain(Paybalance main) {
+        this.main = main;
     }
 
-    public Paybalancedet getPaybalancedet() {
-        return paybalancedet;
+    public List<Paybalancedet> getItems1() {
+        return items1;
     }
 
-    public void setPaybalancedet(Paybalancedet paybalancedet) {
-        this.paybalancedet = paybalancedet;
+    public void setItems1(List<Paybalancedet> items1) {
+        this.items1 = items1;
     }
 
-    public Paybalancedetail getPaybalancedetail() {
-        return paybalancedetail;
+    public List<Paybalancedetail> getItems2() {
+        return items2;
     }
 
-    public void setPaybalancedetail(Paybalancedetail paybalancedetail) {
-        this.paybalancedetail = paybalancedetail;
+    public void setItems2(List<Paybalancedetail> items2) {
+        this.items2 = items2;
     }
 }

+ 6 - 6
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Paybalance.java

@@ -45,9 +45,9 @@ public class Paybalance extends CommonBaseEntity implements Serializable {
 
     private Date pb_recorddate;
 
-    private Integer pb_status;
+    private String pb_status;
 
-    private BigDecimal pb_statuscode;
+    private String pb_statuscode;
 
     private String pb_remark;
 
@@ -189,19 +189,19 @@ public class Paybalance extends CommonBaseEntity implements Serializable {
         this.pb_recorddate = pb_recorddate;
     }
 
-    public Integer getPb_status() {
+    public String getPb_status() {
         return pb_status;
     }
 
-    public void setPb_status(Integer pb_status) {
+    public void setPb_status(String pb_status) {
         this.pb_status = pb_status;
     }
 
-    public BigDecimal getPb_statuscode() {
+    public String getPb_statuscode() {
         return pb_statuscode;
     }
 
-    public void setPb_statuscode(BigDecimal pb_statuscode) {
+    public void setPb_statuscode(String pb_statuscode) {
         this.pb_statuscode = pb_statuscode;
     }
 

+ 17 - 15
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Rec.java

@@ -1,35 +1,37 @@
 package com.usoftchina.saas.money.po;
 
+import java.util.List;
+
 /**
  * @author heqw
  * @date 2018/10/23 15:59
  **/
 public class Rec {
-    private Recbalance recbalance;
-    private Recbalancedet recbalancedet;
-    private Recbalancedetail recbalancedetail;
+    private Recbalance main;
+    private List<Recbalancedet> items1;
+    private List<Recbalancedetail> items2;
 
-    public Recbalance getRecbalance() {
-        return recbalance;
+    public Recbalance getMain() {
+        return main;
     }
 
-    public void setRecbalance(Recbalance recbalance) {
-        this.recbalance = recbalance;
+    public void setMain(Recbalance main) {
+        this.main = main;
     }
 
-    public Recbalancedet getRecbalancedet() {
-        return recbalancedet;
+    public List<Recbalancedet> getItems1() {
+        return items1;
     }
 
-    public void setRecbalancedet(Recbalancedet recbalancedet) {
-        this.recbalancedet = recbalancedet;
+    public void setItems1(List<Recbalancedet> items1) {
+        this.items1 = items1;
     }
 
-    public Recbalancedetail getRecbalancedetail() {
-        return recbalancedetail;
+    public List<Recbalancedetail> getItems2() {
+        return items2;
     }
 
-    public void setRecbalancedetail(Recbalancedetail recbalancedetail) {
-        this.recbalancedetail = recbalancedetail;
+    public void setItems2(List<Recbalancedetail> items2) {
+        this.items2 = items2;
     }
 }

+ 6 - 6
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalance.java

@@ -44,9 +44,9 @@ public class Recbalance extends CommonBaseEntity implements Serializable {
 
     private Date rb_recorddate;
 
-    private Integer rb_status;
+    private String rb_status;
 
-    private Long rb_statuscode;
+    private String rb_statuscode;
 
     private String rb_remark;
 
@@ -188,19 +188,19 @@ public class Recbalance extends CommonBaseEntity implements Serializable {
         this.rb_recorddate = rb_recorddate;
     }
 
-    public Integer getRb_status() {
+    public String getRb_status() {
         return rb_status;
     }
 
-    public void setRb_status(Integer rb_status) {
+    public void setRb_status(String rb_status) {
         this.rb_status = rb_status;
     }
 
-    public Long getRb_statuscode() {
+    public String getRb_statuscode() {
         return rb_statuscode;
     }
 
-    public void setRb_statuscode(Long rb_statuscode) {
+    public void setRb_statuscode(String rb_statuscode) {
         this.rb_statuscode = rb_statuscode;
     }
 

+ 3 - 7
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalancedetail.java

@@ -28,7 +28,7 @@ public class Recbalancedetail extends CommonBaseEntity implements Serializable {
 
     private String rbdRemark;
 
-    private Integer companyid;
+    private Integer companyId;
 
     private Integer updaterid;
 
@@ -132,12 +132,8 @@ public class Recbalancedetail extends CommonBaseEntity implements Serializable {
         this.rbdRemark = rbdRemark == null ? null : rbdRemark.trim();
     }
 
-    public Integer getCompanyid() {
-        return companyid;
-    }
-
-    public void setCompanyid(Integer companyid) {
-        this.companyid = companyid;
+    public void setCompanyId(Integer companyId) {
+        this.companyId = companyId;
     }
 
     public Integer getUpdaterid() {

+ 28 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/OthreceiptsService.java

@@ -0,0 +1,28 @@
+package com.usoftchina.saas.money.service;
+
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.money.po.Othreceipts;
+import com.usoftchina.saas.money.po.Othte;
+import com.usoftchina.saas.money.po.Pay;
+import com.usoftchina.saas.money.po.Paybalance;
+import com.usoftchina.saas.page.PageRequest;
+
+/**
+ * @author heqw
+ * @date 2018/10/24 17:30
+ **/
+public interface OthreceiptsService {
+    int insert(Othte othte);
+
+    void audit(Othte othte);
+
+    void unAudit(int id);
+
+    void delete(int id);
+
+    void deleteItem(int id);
+
+    Othte select(int id);
+
+    PageInfo<Othreceipts> selectList(PageRequest page);
+}

+ 29 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/OthspendingsService.java

@@ -0,0 +1,29 @@
+package com.usoftchina.saas.money.service;
+
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.money.po.Othreceipts;
+import com.usoftchina.saas.money.po.Othsp;
+import com.usoftchina.saas.money.po.Othspendings;
+import com.usoftchina.saas.money.po.Othte;
+import com.usoftchina.saas.page.PageRequest;
+
+/**
+ * @author heqw
+ * @date 2018/10/24 18:24
+ **/
+public interface OthspendingsService {
+
+    int insert(Othsp othsp);
+
+    void delete(int id);
+
+    void delectItem(int id);
+
+    Othsp select(int id);
+
+    PageInfo<Othspendings> selectList(PageRequest page);
+
+    void audit(Othsp othsp);
+
+    void unAudit(int id);
+}

+ 7 - 4
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/PaybalanceService.java

@@ -5,7 +5,6 @@ import com.usoftchina.saas.money.po.Pay;
 import com.usoftchina.saas.money.po.Paybalance;
 import com.usoftchina.saas.page.PageRequest;
 
-import java.util.List;
 
 /**
  * @author heqw
@@ -14,11 +13,15 @@ import java.util.List;
 public interface PaybalanceService {
     int insert(Pay pay);
 
-    void updatePaybalance(Pay pay);
+    void audit(Pay pay);
 
-    void deletePaybalance(int id);
+    void unAudit(int id);
 
-    Pay selectByPrimaryKey(int id);
+    void delete(int id);
+
+    void delectItem(int id);
+
+    Pay select(int id);
 
     PageInfo<Paybalance> selectList(PageRequest page);
 }

+ 11 - 5
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/RecbalanceService.java

@@ -1,9 +1,10 @@
 package com.usoftchina.saas.money.service;
 
+import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.money.po.Rec;
 import com.usoftchina.saas.money.po.Recbalance;
+import com.usoftchina.saas.page.PageRequest;
 
-import java.util.List;
 
 /**
  * @author heqw
@@ -11,8 +12,13 @@ import java.util.List;
  **/
 public interface RecbalanceService {
     int insert(Rec rec);
-    void delectRecbalance(int id);
-    void updateRecbalance(Rec rec);
-    Rec selectRecbalance(int id);
-    List<Recbalance> selectRecbalanceList();
+    void delect(int id);
+    void delectItem(int id);
+    Rec select(int id);
+
+    void audit(Rec rec);
+
+    void unAudit(int id);
+
+    PageInfo<Recbalance> selectList(PageRequest page);
 }

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

@@ -0,0 +1,105 @@
+package com.usoftchina.saas.money.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.commons.po.Status;
+import com.usoftchina.saas.money.mapper.OthreceiptsMapper;
+import com.usoftchina.saas.money.mapper.OthreceiptsdetailMapper;
+import com.usoftchina.saas.money.po.*;
+import com.usoftchina.saas.money.service.OthreceiptsService;
+import com.usoftchina.saas.page.PageRequest;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * @author heqw
+ * @date 2018/10/24 17:48
+ **/
+@Service
+public class OthreceiptsServiceImpl implements OthreceiptsService {
+
+    @Autowired
+    private OthreceiptsMapper othreceiptsMapper;
+    @Autowired
+    private OthreceiptsdetailMapper othreceiptsdetailMapper;
+
+    @Override
+    public int insert(Othte othte) {
+        Othreceipts othreceipts = othte.getMain();
+        List<Othreceiptsdetail> othreceiptsdetail = othte.getItems();
+
+        if (othreceipts.getOrId() > 0){
+            othreceiptsMapper.updateByPrimaryKeySelective(othreceipts);
+        }else {
+            othreceiptsMapper.insert(othreceipts);
+        }
+
+        Iterator isdet = othreceiptsdetail.iterator();
+        while (isdet.hasNext()){
+            Othreceiptsdetail othreceiptsdetail1 = (Othreceiptsdetail) isdet.next();
+            if (othreceiptsdetail1.getOrdId() > 0 ){
+                othreceiptsdetailMapper.updateByPrimaryKey(othreceiptsdetail1);
+            }else {
+                othreceiptsdetailMapper.insertSelective(othreceiptsdetail1);
+            }
+        }
+        return 0;
+    }
+
+    @Override
+    public void audit(Othte othte) {
+        int id = othte.getMain().getOrId();
+        Othreceipts othreceipts = othreceiptsMapper.selectByPrimaryKey(id);
+        if ( othreceipts == null || "".equals(othreceipts)){
+            this.insert(othte);
+        }else {
+            othreceiptsMapper.updateByPrimaryKey(othreceipts);
+        }
+    }
+
+    @Override
+    public void unAudit(int id) {
+        Othreceipts othreceipts = new Othreceipts();
+        othreceipts.setOrId(id);
+        othreceipts.setOrStatus(com.usoftchina.saas.commons.po.Status.UNAUDITED.getDisplay());
+        othreceipts.setOrStatuscode(Status.UNAUDITED.name());
+        othreceiptsMapper.updateByPrimaryKey(othreceipts);
+    }
+
+
+    @Override
+    public void delete(int id) {
+        othreceiptsMapper.deleteByPrimaryKey(id);
+        othreceiptsdetailMapper.deleteByPrimaryKey(id);
+    }
+
+    public void deleteItem(int id) {
+        othreceiptsdetailMapper.deleteItem(id);
+    }
+
+    @Override
+    public Othte select(int id) {
+        Othte othte = new Othte();
+        othte.setMain(othreceiptsMapper.selectByPrimaryKey(id));
+        othte.setItems((List<Othreceiptsdetail>) othreceiptsdetailMapper.selectByPrimaryKey(id));
+        return othte;
+    }
+
+    @Override
+    public PageInfo<Othreceipts> selectList(PageRequest page) {
+        //设置默认分页
+        if (null == page || page.getSize() == 0 || page.getNumber() == 0) {
+            page = new PageRequest();
+            page.setNumber(1);
+            page.setSize(10);
+        }
+        PageHelper.startPage(page.getNumber(), page.getSize());
+        List<Othreceipts> othreceipts = othreceiptsMapper.selectList();
+        //取分页信息
+        PageInfo<Othreceipts> pageInfo = new PageInfo<>(othreceipts);
+        return pageInfo;
+    }
+}

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

@@ -0,0 +1,106 @@
+package com.usoftchina.saas.money.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.commons.po.Status;
+import com.usoftchina.saas.money.mapper.OthreceiptsMapper;
+import com.usoftchina.saas.money.mapper.OthreceiptsdetailMapper;
+import com.usoftchina.saas.money.mapper.OthspendingsMapper;
+import com.usoftchina.saas.money.mapper.OthspendingsdetailMapper;
+import com.usoftchina.saas.money.po.*;
+import com.usoftchina.saas.money.service.OthspendingsService;
+import com.usoftchina.saas.page.PageRequest;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * @author heqw
+ * @date 2018/10/24 22:22
+ **/
+@Service
+public class OthspendingsServiceImpl implements OthspendingsService {
+    @Autowired
+    private OthspendingsMapper othspendingsMapper;
+    @Autowired
+    private OthspendingsdetailMapper othspendingsdetailMapper;
+
+    @Override
+    public int insert(Othsp othsp) {
+        Othspendings othspendings = othsp.getMain();
+        List<Othspendingsdetail> othspendingsdetails = othsp.getItems();
+
+        if (othspendings.getOsId() > 0){
+            othspendingsMapper.updateByPrimaryKeySelective(othspendings);
+        }else {
+            othspendingsMapper.insert(othspendings);
+        }
+
+        Iterator isdet = othspendingsdetails.iterator();
+        while (isdet.hasNext()){
+            Othspendingsdetail othspendingsdetail = (Othspendingsdetail) isdet.next();
+            if (othspendingsdetail.getOsdId() > 0 ){
+                othspendingsdetailMapper.updateByPrimaryKey(othspendingsdetail);
+            }else {
+                othspendingsdetailMapper.insertSelective(othspendingsdetail);
+            }
+        }
+        return 0;
+    }
+
+    @Override
+    public void delete(int id) {
+        othspendingsMapper.deleteByPrimaryKey(id);
+        othspendingsdetailMapper.deleteItem(id);
+    }
+
+    @Override
+    public void delectItem(int id) {
+        othspendingsdetailMapper.deleteItem(id);
+    }
+
+    @Override
+    public Othsp select(int id) {
+        Othsp othsp = new Othsp();
+        othsp.setMain(othspendingsMapper.selectByPrimaryKey(id));
+        othsp.setItems((List<Othspendingsdetail>) othspendingsdetailMapper.selectByPrimaryKey(id));
+        return othsp;
+    }
+
+    @Override
+    public PageInfo<Othspendings> selectList(PageRequest page) {
+        //设置默认分页
+        if (null == page || page.getSize() == 0 || page.getNumber() == 0) {
+            page = new PageRequest();
+            page.setNumber(1);
+            page.setSize(10);
+        }
+        PageHelper.startPage(page.getNumber(), page.getSize());
+        List<Othspendings> othspendings = othspendingsMapper.selectList();
+        //取分页信息
+        PageInfo<Othspendings> pageInfo = new PageInfo<>(othspendings);
+        return pageInfo;
+    }
+
+    @Override
+    public void audit(Othsp othsp) {
+        int id = othsp.getMain().getOsId();
+        Othspendings othspendings = othspendingsMapper.selectByPrimaryKey(id);
+        if ( othspendings == null || "".equals(othspendings)){
+            this.insert(othsp);
+        }else {
+            othspendingsMapper.updateByPrimaryKey(othspendings);
+        }
+    }
+
+    @Override
+    public void unAudit(int id) {
+        Othspendings othspendings = new Othspendings();
+        othspendings.setOsId(id);
+        othspendings.setOsStatus(com.usoftchina.saas.commons.po.Status.UNAUDITED.getDisplay());
+        othspendings.setOsStatuscode(Status.UNAUDITED.name());
+        othspendingsMapper.updateByPrimaryKey(othspendings);
+    }
+}

+ 61 - 22
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/PaybalanceServiceImpl.java

@@ -2,18 +2,17 @@ package com.usoftchina.saas.money.service.impl;
 
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.commons.po.Status;
 import com.usoftchina.saas.money.mapper.PaybalanceMapper;
 import com.usoftchina.saas.money.mapper.PaybalancedetMapper;
 import com.usoftchina.saas.money.mapper.PaybalancedetailMapper;
-import com.usoftchina.saas.money.po.Pay;
-import com.usoftchina.saas.money.po.Paybalance;
-import com.usoftchina.saas.money.po.Paybalancedet;
-import com.usoftchina.saas.money.po.Paybalancedetail;
+import com.usoftchina.saas.money.po.*;
 import com.usoftchina.saas.money.service.PaybalanceService;
 import com.usoftchina.saas.page.PageRequest;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.Iterator;
 import java.util.List;
 
 /**
@@ -30,36 +29,76 @@ public class PaybalanceServiceImpl implements PaybalanceService {
     private PaybalancedetailMapper paybalancedetailMapper;
 
     public int insert(Pay pay) {
-        Paybalance paybalance = pay.getPaybalance();
-        Paybalancedet paybalancedet = pay.getPaybalancedet();
-        Paybalancedetail paybalancedetail = pay.getPaybalancedetail();
-        paybalanceMapper.insert(paybalance);
-        paybalancedetMapper.insert(paybalancedet);
-        paybalancedetailMapper.insert(paybalancedetail);
+        Paybalance paybalance = pay.getMain();
+        List<Paybalancedet> paybalancedet = pay.getItems1();
+        List<Paybalancedetail> paybalancedetail = pay.getItems2();
+        if (paybalance.getPb_id() > 0){
+            paybalanceMapper.updateByPrimaryKeySelective(paybalance);
+        }else {
+            paybalanceMapper.insert(paybalance);
+        }
+
+        Iterator isdet = paybalancedet.iterator();
+        while (isdet.hasNext()){
+            Paybalancedet paybalancedet1 = (Paybalancedet) isdet.next();
+            if (paybalancedet1.getPdId() > 0 ){
+                paybalancedetMapper.updateByPrimaryKey(paybalancedet1);
+            }else {
+                paybalancedetMapper.insertSelective(paybalancedet1);
+            }
+        }
+
+        Iterator isdetl = paybalancedetail.iterator();
+        while (isdetl.hasNext()){
+            Paybalancedetail paybalancedetail1 = (Paybalancedetail) isdetl.next();
+            if (paybalancedetail1.getPbdId() > 0 ){
+                paybalancedetailMapper.updateByPrimaryKeySelective(paybalancedetail1);
+            }else {
+                paybalancedetailMapper.insertSelective(paybalancedetail1);
+            }
+        }
         return 0;
     }
 
+
+    @Override
+    public void audit(Pay pay) {
+        int id = pay.getMain().getPb_id();
+        Paybalance paybalance = paybalanceMapper.selectByPrimaryKey(id);
+        if ( paybalance == null || "".equals(paybalance)){
+            this.insert(pay);
+        }else {
+            paybalanceMapper.updateByPrimaryKey(paybalance);
+        }
+    }
+
     @Override
-    public void updatePaybalance(Pay pay) {
-        Paybalance paybalance = pay.getPaybalance();
-        Paybalancedet paybalancedet = pay.getPaybalancedet();
-        Paybalancedetail paybalancedetail = pay.getPaybalancedetail();
-        paybalanceMapper.updateByPrimaryKeySelective(paybalance);
-        paybalancedetMapper.updateByPrimaryKeySelective(paybalancedet);
-        paybalancedetailMapper.updateByPrimaryKeySelective(paybalancedetail);
+    public void unAudit(int id) {
+        Paybalance paybalance = new Paybalance();
+        paybalance.setPb_id(id);
+        paybalance.setPb_status(com.usoftchina.saas.commons.po.Status.UNAUDITED.getDisplay());
+        paybalance.setPb_statuscode(Status.UNAUDITED.name());
+        paybalanceMapper.updateByPrimaryKey(paybalance);
     }
 
-    public void deletePaybalance(int id){
+
+    public void delete(int id){
         paybalanceMapper.deleteByPrimaryKey(id);
         paybalancedetailMapper.deleteByPrimaryKey(id);
         paybalancedetMapper.deleteByPrimaryKey(id);
     }
 
-    public Pay selectByPrimaryKey(int id){
+    @Override
+    public void delectItem(int id) {
+        paybalancedetailMapper.deleteItem(id);
+        paybalancedetMapper.deleteItem(id);
+    }
+
+    public Pay select(int id){
         Pay pay = new Pay();
-        pay.setPaybalance(paybalanceMapper.selectByPrimaryKey(id));
-        pay.setPaybalancedet(paybalancedetMapper.selectByPrimaryKey(id));
-        pay.setPaybalancedetail(paybalancedetailMapper.selectByPrimaryKey(id));
+        pay.setMain(paybalanceMapper.selectByPrimaryKey(id));
+        pay.setItems1((List<Paybalancedet>) paybalancedetMapper.selectByPrimaryKey(id));
+        pay.setItems2((List<Paybalancedetail>) paybalancedetailMapper.selectByPrimaryKey(id));
         return pay;
     }
 

+ 75 - 24
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/RecbalanceServiceImpl.java

@@ -1,16 +1,18 @@
 package com.usoftchina.saas.money.service.impl;
 
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.commons.po.Status;
 import com.usoftchina.saas.money.mapper.RecbalanceMapper;
 import com.usoftchina.saas.money.mapper.RecbalancedetMapper;
 import com.usoftchina.saas.money.mapper.RecbalancedetailMapper;
-import com.usoftchina.saas.money.po.Rec;
-import com.usoftchina.saas.money.po.Recbalance;
-import com.usoftchina.saas.money.po.Recbalancedet;
-import com.usoftchina.saas.money.po.Recbalancedetail;
+import com.usoftchina.saas.money.po.*;
 import com.usoftchina.saas.money.service.RecbalanceService;
+import com.usoftchina.saas.page.PageRequest;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.Iterator;
 import java.util.List;
 
 /**
@@ -28,46 +30,95 @@ public class RecbalanceServiceImpl implements RecbalanceService {
 
     @Override
     public int insert(Rec rec) {
-        Recbalance recbalance = rec.getRecbalance();
-        Recbalancedet recbalancedet = rec.getRecbalancedet();
-        Recbalancedetail recbalancedetail = rec.getRecbalancedetail();
-        recbalanceMapper.insert(recbalance);
-        recbalancedetMapper.insert(recbalancedet);
-        recbalancedetailMapper.insert(recbalancedetail);
+        Recbalance recbalance = rec.getMain();
+        List<Recbalancedet> recbalancedet = rec.getItems1();
+        List<Recbalancedetail> recbalancedetail = rec.getItems2();
+        System.out.println("recbalance:" + recbalance);
+
+        if (recbalance.getRb_id() > 0){
+            recbalanceMapper.updateByPrimaryKey(recbalance);
+        }else {
+            recbalanceMapper.insert(recbalance);
+        }
+
+        Iterator isdet = recbalancedet.iterator();
+        while (isdet.hasNext()){
+            Recbalancedet recbalancedet1 = (Recbalancedet) isdet.next();
+            if (recbalancedet1.getRd_id() > 0 ){
+                recbalancedetMapper.updateByPrimaryKey(recbalancedet1);
+            }else {
+                recbalancedetMapper.insertSelective(recbalancedet1);
+            }
+        }
+
+        Iterator isdetl = recbalancedetail.iterator();
+        while (isdetl.hasNext()){
+            Recbalancedetail recbalancedetail1 = (Recbalancedetail) isdetl.next();
+            if (recbalancedetail1.getRbdId() > 0 ){
+                recbalancedetailMapper.updateByPrimaryKey(recbalancedetail1);
+            }else {
+                recbalancedetailMapper.insertSelective(recbalancedetail1);
+            }
+        }
         return 0;
     }
 
     @Override
-    public void delectRecbalance(int id) {
+    public void delect(int id) {
         recbalanceMapper.deleteByPrimaryKey(id);
         recbalancedetMapper.deleteByPrimaryKey(id);
         recbalancedetailMapper.deleteByPrimaryKey(id);
     }
 
     @Override
-    public void updateRecbalance(Rec rec) {
-        Recbalance recbalance = rec.getRecbalance();
-        Recbalancedet recbalancedet = rec.getRecbalancedet();
-        Recbalancedetail recbalancedetail = rec.getRecbalancedetail();
-        recbalanceMapper.updateByPrimaryKey(recbalance);
-        recbalancedetMapper.updateByPrimaryKey(recbalancedet);
-        recbalancedetailMapper.updateByPrimaryKey(recbalancedetail);
+    public void delectItem(int id) {
+        recbalancedetMapper.deleteItem(id);
+        recbalancedetailMapper.deleteItem(id);
     }
 
     @Override
-    public Rec selectRecbalance(int id) {
+    public Rec select(int id) {
         Recbalance recbalance = recbalanceMapper.selectByPrimaryKey(id);
         Recbalancedet recbalancedet = recbalancedetMapper.selectByPrimaryKey(id);
         Recbalancedetail recbalancedetail = recbalancedetailMapper.selectByPrimaryKey(id);
         Rec rec = new Rec();
-        rec.setRecbalance(recbalance);
-        rec.setRecbalancedet(recbalancedet);
-        rec.setRecbalancedetail(recbalancedetail);
+        rec.setMain(recbalance);
+        rec.setItems1((List<Recbalancedet>) recbalancedet);
+        rec.setItems2((List<Recbalancedetail>) recbalancedetail);
         return rec;
     }
 
     @Override
-    public List<Recbalance> selectRecbalanceList() {
-        return recbalanceMapper.selectList();
+    public void audit(Rec rec) {
+        int id = rec.getMain().getRb_id();
+        Recbalance recbalance = recbalanceMapper.selectByPrimaryKey(id);
+        if ( recbalance == null || "".equals(recbalance)){
+            this.insert(rec);
+        }else {
+            recbalanceMapper.updateByPrimaryKey(recbalance);
+        }
+    }
+
+    @Override
+    public void unAudit(int id) {
+        Recbalance recbalance = new Recbalance();
+        recbalance.setRb_id(id);
+        recbalance.setRb_status(Status.UNAUDITED.getDisplay());
+        recbalance.setRb_statuscode(Status.UNAUDITED.name());
+        recbalanceMapper.updateByPrimaryKey(recbalance);
+    }
+
+    public PageInfo<Recbalance> selectList(PageRequest page) {
+        //设置默认分页
+        if (null == page || page.getSize() == 0 || page.getNumber() == 0) {
+            page = new PageRequest();
+            page.setNumber(1);
+            page.setSize(10);
+        }
+        PageHelper.startPage(page.getNumber(), page.getSize());
+        List<Recbalance> recbalancesList = recbalanceMapper.selectList();
+        //取分页信息
+        PageInfo<Recbalance> pageInfo = new PageInfo<Recbalance>(recbalancesList);
+        return pageInfo;
     }
 }

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

@@ -3,13 +3,13 @@ package com.usoftchina.saas.money.service.impl;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.commons.api.MaxnumberService;
+import com.usoftchina.saas.commons.api.MessageLogService;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.DocSavedDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.commons.exception.BizExceptionCode;
 import com.usoftchina.saas.commons.po.Operation;
-import com.usoftchina.saas.commons.service.MaxnumberService;
-import com.usoftchina.saas.commons.service.MessageLogService;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.money.dto.*;
@@ -42,7 +42,7 @@ public class VerificationServiceImpl extends CommonBaseServiceImpl<VerificationM
     @Autowired
     private VerificationListMapper verificationListMapper;
 //    @Autowired
-//    private MessageLogService messageLogService;
+ //   private MessageLogService messageLogService;
 
 
     @Override
@@ -223,8 +223,8 @@ public class VerificationServiceImpl extends CommonBaseServiceImpl<VerificationM
                 id = saveDTO.getId();
             }
             Verification verification = new Verification();
-//          verification.setVc_status(Operation.AUDIT.getTitle());
-//          verification.setVc_statuscode(Status.AUDITED.name());
+           // verification.setVc_status(Operation.AUDIT.getTitle());
+           // verification.setVc_statuscode(Status.AUDITED.name());
             verificationMapper.updateByPrimaryKeySelective(verification);
         }
         savedDTO.setId(id);

+ 326 - 0
applications/money/money-server/src/main/resources/mapper/OthreceiptsMapper.xml

@@ -0,0 +1,326 @@
+<?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.money.mapper.OthreceiptsMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.money.po.Othreceipts" >
+    <id column="or_id" property="orId" jdbcType="INTEGER" />
+    <result column="or_code" property="orCode" jdbcType="VARCHAR" />
+    <result column="or_date" property="orDate" jdbcType="TIMESTAMP" />
+    <result column="or_custid" property="orCustid" jdbcType="INTEGER" />
+    <result column="or_custcode" property="orCustcode" jdbcType="VARCHAR" />
+    <result column="or_custname" property="orCustname" jdbcType="VARCHAR" />
+    <result column="or_bankcode" property="orBankcode" jdbcType="VARCHAR" />
+    <result column="or_bankid" property="orBankid" jdbcType="INTEGER" />
+    <result column="or_bankname" property="orBankname" jdbcType="VARCHAR" />
+    <result column="or_amount" property="orAmount" jdbcType="DOUBLE" />
+    <result column="or_recorderid" property="orRecorderid" jdbcType="INTEGER" />
+    <result column="or_recorder" property="orRecorder" jdbcType="VARCHAR" />
+    <result column="or_recorddate" property="orRecorddate" jdbcType="TIMESTAMP" />
+    <result column="or_status" property="orStatus" jdbcType="VARCHAR" />
+    <result column="or_statuscode" property="orStatuscode" jdbcType="VARCHAR" />
+    <result column="or_remark" property="orRemark" jdbcType="VARCHAR" />
+    <result column="companyId" property="companyid" jdbcType="INTEGER" />
+    <result column="updaterId" property="updaterid" jdbcType="INTEGER" />
+    <result column="updatedate" property="updatedate" jdbcType="TIMESTAMP" />
+    <result column="or_text1" property="orText1" jdbcType="VARCHAR" />
+    <result column="or_text2" property="orText2" jdbcType="VARCHAR" />
+    <result column="or_text3" property="orText3" jdbcType="VARCHAR" />
+    <result column="or_text4" property="orText4" jdbcType="VARCHAR" />
+    <result column="or_text5" property="orText5" jdbcType="VARCHAR" />
+  </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_recorderid, or_recorder, or_recorddate, or_status, or_statuscode, 
+    or_remark, companyId, updaterId, updatedate, or_text1, or_text2, or_text3, or_text4, 
+    or_text5
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+    select 
+    <include refid="Base_Column_List" />
+    from othreceipts
+    where or_id = #{orId,jdbcType=INTEGER}
+  </select>
+
+  <select id="selectList" resultMap="BaseResultMap">
+    select
+    <include refid="Base_Column_List" />
+    from othreceipts
+  </select>
+
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+    delete from othreceipts
+    where or_id = #{orId,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.saas.money.po.Othreceipts" >
+    insert into othreceipts (or_id, or_code, or_date, 
+      or_custid, or_custcode, or_custname, 
+      or_bankcode, or_bankid, or_bankname, 
+      or_amount, or_recorderid, or_recorder, 
+      or_recorddate, or_status, or_statuscode, 
+      or_remark, companyId, updaterId, 
+      updatedate, or_text1, or_text2, 
+      or_text3, or_text4, or_text5
+      )
+    values (#{orId,jdbcType=INTEGER}, #{orCode,jdbcType=VARCHAR}, #{orDate,jdbcType=TIMESTAMP}, 
+      #{orCustid,jdbcType=INTEGER}, #{orCustcode,jdbcType=VARCHAR}, #{orCustname,jdbcType=VARCHAR}, 
+      #{orBankcode,jdbcType=VARCHAR}, #{orBankid,jdbcType=INTEGER}, #{orBankname,jdbcType=VARCHAR}, 
+      #{orAmount,jdbcType=DOUBLE}, #{orRecorderid,jdbcType=INTEGER}, #{orRecorder,jdbcType=VARCHAR}, 
+      #{orRecorddate,jdbcType=TIMESTAMP}, #{orStatus,jdbcType=INTEGER}, #{orStatuscode,jdbcType=DECIMAL}, 
+      #{orRemark,jdbcType=VARCHAR}, #{companyid,jdbcType=INTEGER}, #{updaterid,jdbcType=INTEGER}, 
+      #{updatedate,jdbcType=TIMESTAMP}, #{orText1,jdbcType=VARCHAR}, #{orText2,jdbcType=VARCHAR}, 
+      #{orText3,jdbcType=VARCHAR}, #{orText4,jdbcType=VARCHAR}, #{orText5,jdbcType=VARCHAR}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.money.po.Othreceipts" >
+    insert into othreceipts
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="orId != null" >
+        or_id,
+      </if>
+      <if test="orCode != null" >
+        or_code,
+      </if>
+      <if test="orDate != null" >
+        or_date,
+      </if>
+      <if test="orCustid != null" >
+        or_custid,
+      </if>
+      <if test="orCustcode != null" >
+        or_custcode,
+      </if>
+      <if test="orCustname != null" >
+        or_custname,
+      </if>
+      <if test="orBankcode != null" >
+        or_bankcode,
+      </if>
+      <if test="orBankid != null" >
+        or_bankid,
+      </if>
+      <if test="orBankname != null" >
+        or_bankname,
+      </if>
+      <if test="orAmount != null" >
+        or_amount,
+      </if>
+      <if test="orRecorderid != null" >
+        or_recorderid,
+      </if>
+      <if test="orRecorder != null" >
+        or_recorder,
+      </if>
+      <if test="orRecorddate != null" >
+        or_recorddate,
+      </if>
+      <if test="orStatus != null" >
+        or_status,
+      </if>
+      <if test="orStatuscode != null" >
+        or_statuscode,
+      </if>
+      <if test="orRemark != null" >
+        or_remark,
+      </if>
+      <if test="companyid != null" >
+        companyId,
+      </if>
+      <if test="updaterid != null" >
+        updaterId,
+      </if>
+      <if test="updatedate != null" >
+        updatedate,
+      </if>
+      <if test="orText1 != null" >
+        or_text1,
+      </if>
+      <if test="orText2 != null" >
+        or_text2,
+      </if>
+      <if test="orText3 != null" >
+        or_text3,
+      </if>
+      <if test="orText4 != null" >
+        or_text4,
+      </if>
+      <if test="orText5 != null" >
+        or_text5,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="orId != null" >
+        #{orId,jdbcType=INTEGER},
+      </if>
+      <if test="orCode != null" >
+        #{orCode,jdbcType=VARCHAR},
+      </if>
+      <if test="orDate != null" >
+        #{orDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="orCustid != null" >
+        #{orCustid,jdbcType=INTEGER},
+      </if>
+      <if test="orCustcode != null" >
+        #{orCustcode,jdbcType=VARCHAR},
+      </if>
+      <if test="orCustname != null" >
+        #{orCustname,jdbcType=VARCHAR},
+      </if>
+      <if test="orBankcode != null" >
+        #{orBankcode,jdbcType=VARCHAR},
+      </if>
+      <if test="orBankid != null" >
+        #{orBankid,jdbcType=INTEGER},
+      </if>
+      <if test="orBankname != null" >
+        #{orBankname,jdbcType=VARCHAR},
+      </if>
+      <if test="orAmount != null" >
+        #{orAmount,jdbcType=DOUBLE},
+      </if>
+      <if test="orRecorderid != null" >
+        #{orRecorderid,jdbcType=INTEGER},
+      </if>
+      <if test="orRecorder != null" >
+        #{orRecorder,jdbcType=VARCHAR},
+      </if>
+      <if test="orRecorddate != null" >
+        #{orRecorddate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="orStatus != null" >
+        #{orStatus,jdbcType=INTEGER},
+      </if>
+      <if test="orStatuscode != null" >
+        #{orStatuscode,jdbcType=DECIMAL},
+      </if>
+      <if test="orRemark != null" >
+        #{orRemark,jdbcType=VARCHAR},
+      </if>
+      <if test="companyid != null" >
+        #{companyid,jdbcType=INTEGER},
+      </if>
+      <if test="updaterid != null" >
+        #{updaterid,jdbcType=INTEGER},
+      </if>
+      <if test="updatedate != null" >
+        #{updatedate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="orText1 != null" >
+        #{orText1,jdbcType=VARCHAR},
+      </if>
+      <if test="orText2 != null" >
+        #{orText2,jdbcType=VARCHAR},
+      </if>
+      <if test="orText3 != null" >
+        #{orText3,jdbcType=VARCHAR},
+      </if>
+      <if test="orText4 != null" >
+        #{orText4,jdbcType=VARCHAR},
+      </if>
+      <if test="orText5 != null" >
+        #{orText5,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.money.po.Othreceipts" >
+    update othreceipts
+    <set >
+      <if test="orCode != null" >
+        or_code = #{orCode,jdbcType=VARCHAR},
+      </if>
+      <if test="orDate != null" >
+        or_date = #{orDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="orCustid != null" >
+        or_custid = #{orCustid,jdbcType=INTEGER},
+      </if>
+      <if test="orCustcode != null" >
+        or_custcode = #{orCustcode,jdbcType=VARCHAR},
+      </if>
+      <if test="orCustname != null" >
+        or_custname = #{orCustname,jdbcType=VARCHAR},
+      </if>
+      <if test="orBankcode != null" >
+        or_bankcode = #{orBankcode,jdbcType=VARCHAR},
+      </if>
+      <if test="orBankid != null" >
+        or_bankid = #{orBankid,jdbcType=INTEGER},
+      </if>
+      <if test="orBankname != null" >
+        or_bankname = #{orBankname,jdbcType=VARCHAR},
+      </if>
+      <if test="orAmount != null" >
+        or_amount = #{orAmount,jdbcType=DOUBLE},
+      </if>
+      <if test="orRecorderid != null" >
+        or_recorderid = #{orRecorderid,jdbcType=INTEGER},
+      </if>
+      <if test="orRecorder != null" >
+        or_recorder = #{orRecorder,jdbcType=VARCHAR},
+      </if>
+      <if test="orRecorddate != null" >
+        or_recorddate = #{orRecorddate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="orStatus != null" >
+        or_status = #{orStatus,jdbcType=INTEGER},
+      </if>
+      <if test="orStatuscode != null" >
+        or_statuscode = #{orStatuscode,jdbcType=DECIMAL},
+      </if>
+      <if test="orRemark != null" >
+        or_remark = #{orRemark,jdbcType=VARCHAR},
+      </if>
+      <if test="companyid != null" >
+        companyId = #{companyid,jdbcType=INTEGER},
+      </if>
+      <if test="updaterid != null" >
+        updaterId = #{updaterid,jdbcType=INTEGER},
+      </if>
+      <if test="updatedate != null" >
+        updatedate = #{updatedate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="orText1 != null" >
+        or_text1 = #{orText1,jdbcType=VARCHAR},
+      </if>
+      <if test="orText2 != null" >
+        or_text2 = #{orText2,jdbcType=VARCHAR},
+      </if>
+      <if test="orText3 != null" >
+        or_text3 = #{orText3,jdbcType=VARCHAR},
+      </if>
+      <if test="orText4 != null" >
+        or_text4 = #{orText4,jdbcType=VARCHAR},
+      </if>
+      <if test="orText5 != null" >
+        or_text5 = #{orText5,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where or_id = #{orId,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.money.po.Othreceipts" >
+    update othreceipts
+    set or_code = #{orCode,jdbcType=VARCHAR},
+      or_date = #{orDate,jdbcType=TIMESTAMP},
+      or_custid = #{orCustid,jdbcType=INTEGER},
+      or_custcode = #{orCustcode,jdbcType=VARCHAR},
+      or_custname = #{orCustname,jdbcType=VARCHAR},
+      or_bankcode = #{orBankcode,jdbcType=VARCHAR},
+      or_bankid = #{orBankid,jdbcType=INTEGER},
+      or_bankname = #{orBankname,jdbcType=VARCHAR},
+      or_amount = #{orAmount,jdbcType=DOUBLE},
+      or_recorderid = #{orRecorderid,jdbcType=INTEGER},
+      or_recorder = #{orRecorder,jdbcType=VARCHAR},
+      or_recorddate = #{orRecorddate,jdbcType=TIMESTAMP},
+      or_status = #{orStatus,jdbcType=INTEGER},
+      or_statuscode = #{orStatuscode,jdbcType=DECIMAL},
+      or_remark = #{orRemark,jdbcType=VARCHAR},
+      companyId = #{companyid,jdbcType=INTEGER},
+      updaterId = #{updaterid,jdbcType=INTEGER},
+      updatedate = #{updatedate,jdbcType=TIMESTAMP},
+      or_text1 = #{orText1,jdbcType=VARCHAR},
+      or_text2 = #{orText2,jdbcType=VARCHAR},
+      or_text3 = #{orText3,jdbcType=VARCHAR},
+      or_text4 = #{orText4,jdbcType=VARCHAR},
+      or_text5 = #{orText5,jdbcType=VARCHAR}
+    where or_id = #{orId,jdbcType=INTEGER}
+  </update>
+</mapper>

+ 218 - 0
applications/money/money-server/src/main/resources/mapper/OthreceiptsdetailMapper.xml

@@ -0,0 +1,218 @@
+<?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.money.mapper.OthreceiptsdetailMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.money.po.Othreceiptsdetail" >
+    <id column="ord_id" property="ordId" jdbcType="INTEGER" />
+    <result column="ord_orid" property="ordOrid" jdbcType="INTEGER" />
+    <result column="ord_detno" property="ordDetno" jdbcType="INTEGER" />
+    <result column="ord_ym" property="ordYm" jdbcType="INTEGER" />
+    <result column="ord_type" property="ordType" jdbcType="VARCHAR" />
+    <result column="ord_nowbalance" property="ordNowbalance" jdbcType="DOUBLE" />
+    <result column="ord_remark" property="ordRemark" jdbcType="VARCHAR" />
+    <result column="companyId" property="companyid" jdbcType="INTEGER" />
+    <result column="updaterId" property="updaterid" jdbcType="INTEGER" />
+    <result column="updatedate" property="updatedate" jdbcType="TIMESTAMP" />
+    <result column="ord_text1" property="ordText1" jdbcType="VARCHAR" />
+    <result column="ord_text2" property="ordText2" jdbcType="VARCHAR" />
+    <result column="ord_text3" property="ordText3" jdbcType="VARCHAR" />
+    <result column="ord_text4" property="ordText4" jdbcType="VARCHAR" />
+    <result column="ord_text5" property="ordText5" jdbcType="VARCHAR" />
+  </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
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+    select 
+    <include refid="Base_Column_List" />
+    from othreceiptsdetail
+    where ord_id = #{ordId,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+    delete from othreceiptsdetail
+    where ord_orid = #{ordOrid,jdbcType=INTEGER}
+  </delete>
+
+  <delete id="deleteItem" parameterType="java.lang.Integer" >
+    delete from othreceiptsdetail
+    where ord_orid = #{ordOrid,jdbcType=INTEGER}
+  </delete>
+
+  <insert id="insert" parameterType="com.usoftchina.saas.money.po.Othreceiptsdetail" >
+    insert into othreceiptsdetail (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
+      )
+    values (#{ordId,jdbcType=INTEGER}, #{ordOrid,jdbcType=INTEGER}, #{ordDetno,jdbcType=INTEGER}, 
+      #{ordYm,jdbcType=INTEGER}, #{ordType,jdbcType=VARCHAR}, #{ordNowbalance,jdbcType=DOUBLE}, 
+      #{ordRemark,jdbcType=VARCHAR}, #{companyid,jdbcType=INTEGER}, #{updaterid,jdbcType=INTEGER}, 
+      #{updatedate,jdbcType=TIMESTAMP}, #{ordText1,jdbcType=VARCHAR}, #{ordText2,jdbcType=VARCHAR}, 
+      #{ordText3,jdbcType=VARCHAR}, #{ordText4,jdbcType=VARCHAR}, #{ordText5,jdbcType=VARCHAR}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.money.po.Othreceiptsdetail" >
+    insert into othreceiptsdetail
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="ordId != null" >
+        ord_id,
+      </if>
+      <if test="ordOrid != null" >
+        ord_orid,
+      </if>
+      <if test="ordDetno != null" >
+        ord_detno,
+      </if>
+      <if test="ordYm != null" >
+        ord_ym,
+      </if>
+      <if test="ordType != null" >
+        ord_type,
+      </if>
+      <if test="ordNowbalance != null" >
+        ord_nowbalance,
+      </if>
+      <if test="ordRemark != null" >
+        ord_remark,
+      </if>
+      <if test="companyid != null" >
+        companyId,
+      </if>
+      <if test="updaterid != null" >
+        updaterId,
+      </if>
+      <if test="updatedate != null" >
+        updatedate,
+      </if>
+      <if test="ordText1 != null" >
+        ord_text1,
+      </if>
+      <if test="ordText2 != null" >
+        ord_text2,
+      </if>
+      <if test="ordText3 != null" >
+        ord_text3,
+      </if>
+      <if test="ordText4 != null" >
+        ord_text4,
+      </if>
+      <if test="ordText5 != null" >
+        ord_text5,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="ordId != null" >
+        #{ordId,jdbcType=INTEGER},
+      </if>
+      <if test="ordOrid != null" >
+        #{ordOrid,jdbcType=INTEGER},
+      </if>
+      <if test="ordDetno != null" >
+        #{ordDetno,jdbcType=INTEGER},
+      </if>
+      <if test="ordYm != null" >
+        #{ordYm,jdbcType=INTEGER},
+      </if>
+      <if test="ordType != null" >
+        #{ordType,jdbcType=VARCHAR},
+      </if>
+      <if test="ordNowbalance != null" >
+        #{ordNowbalance,jdbcType=DOUBLE},
+      </if>
+      <if test="ordRemark != null" >
+        #{ordRemark,jdbcType=VARCHAR},
+      </if>
+      <if test="companyid != null" >
+        #{companyid,jdbcType=INTEGER},
+      </if>
+      <if test="updaterid != null" >
+        #{updaterid,jdbcType=INTEGER},
+      </if>
+      <if test="updatedate != null" >
+        #{updatedate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="ordText1 != null" >
+        #{ordText1,jdbcType=VARCHAR},
+      </if>
+      <if test="ordText2 != null" >
+        #{ordText2,jdbcType=VARCHAR},
+      </if>
+      <if test="ordText3 != null" >
+        #{ordText3,jdbcType=VARCHAR},
+      </if>
+      <if test="ordText4 != null" >
+        #{ordText4,jdbcType=VARCHAR},
+      </if>
+      <if test="ordText5 != null" >
+        #{ordText5,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.money.po.Othreceiptsdetail" >
+    update othreceiptsdetail
+    <set >
+      <if test="ordOrid != null" >
+        ord_orid = #{ordOrid,jdbcType=INTEGER},
+      </if>
+      <if test="ordDetno != null" >
+        ord_detno = #{ordDetno,jdbcType=INTEGER},
+      </if>
+      <if test="ordYm != null" >
+        ord_ym = #{ordYm,jdbcType=INTEGER},
+      </if>
+      <if test="ordType != null" >
+        ord_type = #{ordType,jdbcType=VARCHAR},
+      </if>
+      <if test="ordNowbalance != null" >
+        ord_nowbalance = #{ordNowbalance,jdbcType=DOUBLE},
+      </if>
+      <if test="ordRemark != null" >
+        ord_remark = #{ordRemark,jdbcType=VARCHAR},
+      </if>
+      <if test="companyid != null" >
+        companyId = #{companyid,jdbcType=INTEGER},
+      </if>
+      <if test="updaterid != null" >
+        updaterId = #{updaterid,jdbcType=INTEGER},
+      </if>
+      <if test="updatedate != null" >
+        updatedate = #{updatedate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="ordText1 != null" >
+        ord_text1 = #{ordText1,jdbcType=VARCHAR},
+      </if>
+      <if test="ordText2 != null" >
+        ord_text2 = #{ordText2,jdbcType=VARCHAR},
+      </if>
+      <if test="ordText3 != null" >
+        ord_text3 = #{ordText3,jdbcType=VARCHAR},
+      </if>
+      <if test="ordText4 != null" >
+        ord_text4 = #{ordText4,jdbcType=VARCHAR},
+      </if>
+      <if test="ordText5 != null" >
+        ord_text5 = #{ordText5,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where ord_id = #{ordId,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.money.po.Othreceiptsdetail" >
+    update othreceiptsdetail
+    set ord_orid = #{ordOrid,jdbcType=INTEGER},
+      ord_detno = #{ordDetno,jdbcType=INTEGER},
+      ord_ym = #{ordYm,jdbcType=INTEGER},
+      ord_type = #{ordType,jdbcType=VARCHAR},
+      ord_nowbalance = #{ordNowbalance,jdbcType=DOUBLE},
+      ord_remark = #{ordRemark,jdbcType=VARCHAR},
+      companyId = #{companyid,jdbcType=INTEGER},
+      updaterId = #{updaterid,jdbcType=INTEGER},
+      updatedate = #{updatedate,jdbcType=TIMESTAMP},
+      ord_text1 = #{ordText1,jdbcType=VARCHAR},
+      ord_text2 = #{ordText2,jdbcType=VARCHAR},
+      ord_text3 = #{ordText3,jdbcType=VARCHAR},
+      ord_text4 = #{ordText4,jdbcType=VARCHAR},
+      ord_text5 = #{ordText5,jdbcType=VARCHAR}
+    where ord_id = #{ordId,jdbcType=INTEGER}
+  </update>
+</mapper>

+ 319 - 0
applications/money/money-server/src/main/resources/mapper/OthspendingsMapper.xml

@@ -0,0 +1,319 @@
+<?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.money.mapper.OthspendingsMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.money.po.Othspendings" >
+    <id column="os_id" property="osId" jdbcType="INTEGER" />
+    <result column="os_code" property="osCode" jdbcType="VARCHAR" />
+    <result column="os_date" property="osDate" jdbcType="TIMESTAMP" />
+    <result column="os_vendid" property="osVendid" jdbcType="INTEGER" />
+    <result column="os_vendcode" property="osVendcode" jdbcType="VARCHAR" />
+    <result column="os_vendname" property="osVendname" jdbcType="VARCHAR" />
+    <result column="os_bankid" property="osBankid" jdbcType="INTEGER" />
+    <result column="os_bankcode" property="osBankcode" jdbcType="VARCHAR" />
+    <result column="os_bankname" property="osBankname" jdbcType="VARCHAR" />
+    <result column="os_amount" property="osAmount" jdbcType="DOUBLE" />
+    <result column="os_recorderid" property="osRecorderid" jdbcType="INTEGER" />
+    <result column="os_recorder" property="osRecorder" jdbcType="VARCHAR" />
+    <result column="os_recorddate" property="osRecorddate" jdbcType="TIMESTAMP" />
+    <result column="os_status" property="osStatus" jdbcType="VARCHAR" />
+    <result column="os_statuscode" property="osStatuscode" jdbcType="VARCHAR" />
+    <result column="os_remark" property="osRemark" jdbcType="VARCHAR" />
+    <result column="companyId" property="companyid" jdbcType="INTEGER" />
+    <result column="updaterId" property="updaterid" jdbcType="INTEGER" />
+    <result column="updatedate" property="updatedate" jdbcType="TIMESTAMP" />
+    <result column="os_text1" property="osText1" jdbcType="VARCHAR" />
+    <result column="os_text2" property="osText2" jdbcType="VARCHAR" />
+    <result column="os_text3" property="osText3" jdbcType="VARCHAR" />
+    <result column="os_text4" property="osText4" jdbcType="VARCHAR" />
+    <result column="os_text5" property="osText5" jdbcType="VARCHAR" />
+  </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_recorderid, os_recorder, os_recorddate, os_status, os_statuscode, 
+    os_remark, companyId, updaterId, updatedate, os_text1, os_text2, os_text3, os_text4, 
+    os_text5
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+    select 
+    <include refid="Base_Column_List" />
+    from othspendings
+    where os_id = #{osId,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+    delete from othspendings
+    where os_id = #{osId,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.saas.money.po.Othspendings" >
+    insert into othspendings (os_id, os_code, os_date, 
+      os_vendid, os_vendcode, os_vendname, 
+      os_bankid, os_bankcode, os_bankname, 
+      os_amount, os_recorderid, os_recorder, 
+      os_recorddate, os_status, os_statuscode, 
+      os_remark, companyId, updaterId, 
+      updatedate, os_text1, os_text2, 
+      os_text3, os_text4, os_text5
+      )
+    values (#{osId,jdbcType=INTEGER}, #{osCode,jdbcType=VARCHAR}, #{osDate,jdbcType=TIMESTAMP}, 
+      #{osVendid,jdbcType=INTEGER}, #{osVendcode,jdbcType=VARCHAR}, #{osVendname,jdbcType=VARCHAR}, 
+      #{osBankid,jdbcType=INTEGER}, #{osBankcode,jdbcType=VARCHAR}, #{osBankname,jdbcType=VARCHAR}, 
+      #{osAmount,jdbcType=DOUBLE}, #{osRecorderid,jdbcType=INTEGER}, #{osRecorder,jdbcType=VARCHAR}, 
+      #{osRecorddate,jdbcType=TIMESTAMP}, #{osStatus,jdbcType=INTEGER}, #{osStatuscode,jdbcType=DECIMAL}, 
+      #{osRemark,jdbcType=VARCHAR}, #{companyid,jdbcType=INTEGER}, #{updaterid,jdbcType=INTEGER}, 
+      #{updatedate,jdbcType=TIMESTAMP}, #{osText1,jdbcType=VARCHAR}, #{osText2,jdbcType=VARCHAR}, 
+      #{osText3,jdbcType=VARCHAR}, #{osText4,jdbcType=VARCHAR}, #{osText5,jdbcType=VARCHAR}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.money.po.Othspendings" >
+    insert into othspendings
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="osId != null" >
+        os_id,
+      </if>
+      <if test="osCode != null" >
+        os_code,
+      </if>
+      <if test="osDate != null" >
+        os_date,
+      </if>
+      <if test="osVendid != null" >
+        os_vendid,
+      </if>
+      <if test="osVendcode != null" >
+        os_vendcode,
+      </if>
+      <if test="osVendname != null" >
+        os_vendname,
+      </if>
+      <if test="osBankid != null" >
+        os_bankid,
+      </if>
+      <if test="osBankcode != null" >
+        os_bankcode,
+      </if>
+      <if test="osBankname != null" >
+        os_bankname,
+      </if>
+      <if test="osAmount != null" >
+        os_amount,
+      </if>
+      <if test="osRecorderid != null" >
+        os_recorderid,
+      </if>
+      <if test="osRecorder != null" >
+        os_recorder,
+      </if>
+      <if test="osRecorddate != null" >
+        os_recorddate,
+      </if>
+      <if test="osStatus != null" >
+        os_status,
+      </if>
+      <if test="osStatuscode != null" >
+        os_statuscode,
+      </if>
+      <if test="osRemark != null" >
+        os_remark,
+      </if>
+      <if test="companyid != null" >
+        companyId,
+      </if>
+      <if test="updaterid != null" >
+        updaterId,
+      </if>
+      <if test="updatedate != null" >
+        updatedate,
+      </if>
+      <if test="osText1 != null" >
+        os_text1,
+      </if>
+      <if test="osText2 != null" >
+        os_text2,
+      </if>
+      <if test="osText3 != null" >
+        os_text3,
+      </if>
+      <if test="osText4 != null" >
+        os_text4,
+      </if>
+      <if test="osText5 != null" >
+        os_text5,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="osId != null" >
+        #{osId,jdbcType=INTEGER},
+      </if>
+      <if test="osCode != null" >
+        #{osCode,jdbcType=VARCHAR},
+      </if>
+      <if test="osDate != null" >
+        #{osDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="osVendid != null" >
+        #{osVendid,jdbcType=INTEGER},
+      </if>
+      <if test="osVendcode != null" >
+        #{osVendcode,jdbcType=VARCHAR},
+      </if>
+      <if test="osVendname != null" >
+        #{osVendname,jdbcType=VARCHAR},
+      </if>
+      <if test="osBankid != null" >
+        #{osBankid,jdbcType=INTEGER},
+      </if>
+      <if test="osBankcode != null" >
+        #{osBankcode,jdbcType=VARCHAR},
+      </if>
+      <if test="osBankname != null" >
+        #{osBankname,jdbcType=VARCHAR},
+      </if>
+      <if test="osAmount != null" >
+        #{osAmount,jdbcType=DOUBLE},
+      </if>
+      <if test="osRecorderid != null" >
+        #{osRecorderid,jdbcType=INTEGER},
+      </if>
+      <if test="osRecorder != null" >
+        #{osRecorder,jdbcType=VARCHAR},
+      </if>
+      <if test="osRecorddate != null" >
+        #{osRecorddate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="osStatus != null" >
+        #{osStatus,jdbcType=INTEGER},
+      </if>
+      <if test="osStatuscode != null" >
+        #{osStatuscode,jdbcType=DECIMAL},
+      </if>
+      <if test="osRemark != null" >
+        #{osRemark,jdbcType=VARCHAR},
+      </if>
+      <if test="companyid != null" >
+        #{companyid,jdbcType=INTEGER},
+      </if>
+      <if test="updaterid != null" >
+        #{updaterid,jdbcType=INTEGER},
+      </if>
+      <if test="updatedate != null" >
+        #{updatedate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="osText1 != null" >
+        #{osText1,jdbcType=VARCHAR},
+      </if>
+      <if test="osText2 != null" >
+        #{osText2,jdbcType=VARCHAR},
+      </if>
+      <if test="osText3 != null" >
+        #{osText3,jdbcType=VARCHAR},
+      </if>
+      <if test="osText4 != null" >
+        #{osText4,jdbcType=VARCHAR},
+      </if>
+      <if test="osText5 != null" >
+        #{osText5,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.money.po.Othspendings" >
+    update othspendings
+    <set >
+      <if test="osCode != null" >
+        os_code = #{osCode,jdbcType=VARCHAR},
+      </if>
+      <if test="osDate != null" >
+        os_date = #{osDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="osVendid != null" >
+        os_vendid = #{osVendid,jdbcType=INTEGER},
+      </if>
+      <if test="osVendcode != null" >
+        os_vendcode = #{osVendcode,jdbcType=VARCHAR},
+      </if>
+      <if test="osVendname != null" >
+        os_vendname = #{osVendname,jdbcType=VARCHAR},
+      </if>
+      <if test="osBankid != null" >
+        os_bankid = #{osBankid,jdbcType=INTEGER},
+      </if>
+      <if test="osBankcode != null" >
+        os_bankcode = #{osBankcode,jdbcType=VARCHAR},
+      </if>
+      <if test="osBankname != null" >
+        os_bankname = #{osBankname,jdbcType=VARCHAR},
+      </if>
+      <if test="osAmount != null" >
+        os_amount = #{osAmount,jdbcType=DOUBLE},
+      </if>
+      <if test="osRecorderid != null" >
+        os_recorderid = #{osRecorderid,jdbcType=INTEGER},
+      </if>
+      <if test="osRecorder != null" >
+        os_recorder = #{osRecorder,jdbcType=VARCHAR},
+      </if>
+      <if test="osRecorddate != null" >
+        os_recorddate = #{osRecorddate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="osStatus != null" >
+        os_status = #{osStatus,jdbcType=INTEGER},
+      </if>
+      <if test="osStatuscode != null" >
+        os_statuscode = #{osStatuscode,jdbcType=DECIMAL},
+      </if>
+      <if test="osRemark != null" >
+        os_remark = #{osRemark,jdbcType=VARCHAR},
+      </if>
+      <if test="companyid != null" >
+        companyId = #{companyid,jdbcType=INTEGER},
+      </if>
+      <if test="updaterid != null" >
+        updaterId = #{updaterid,jdbcType=INTEGER},
+      </if>
+      <if test="updatedate != null" >
+        updatedate = #{updatedate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="osText1 != null" >
+        os_text1 = #{osText1,jdbcType=VARCHAR},
+      </if>
+      <if test="osText2 != null" >
+        os_text2 = #{osText2,jdbcType=VARCHAR},
+      </if>
+      <if test="osText3 != null" >
+        os_text3 = #{osText3,jdbcType=VARCHAR},
+      </if>
+      <if test="osText4 != null" >
+        os_text4 = #{osText4,jdbcType=VARCHAR},
+      </if>
+      <if test="osText5 != null" >
+        os_text5 = #{osText5,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where os_id = #{osId,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.money.po.Othspendings" >
+    update othspendings
+    set os_code = #{osCode,jdbcType=VARCHAR},
+      os_date = #{osDate,jdbcType=TIMESTAMP},
+      os_vendid = #{osVendid,jdbcType=INTEGER},
+      os_vendcode = #{osVendcode,jdbcType=VARCHAR},
+      os_vendname = #{osVendname,jdbcType=VARCHAR},
+      os_bankid = #{osBankid,jdbcType=INTEGER},
+      os_bankcode = #{osBankcode,jdbcType=VARCHAR},
+      os_bankname = #{osBankname,jdbcType=VARCHAR},
+      os_amount = #{osAmount,jdbcType=DOUBLE},
+      os_recorderid = #{osRecorderid,jdbcType=INTEGER},
+      os_recorder = #{osRecorder,jdbcType=VARCHAR},
+      os_recorddate = #{osRecorddate,jdbcType=TIMESTAMP},
+      os_status = #{osStatus,jdbcType=INTEGER},
+      os_statuscode = #{osStatuscode,jdbcType=DECIMAL},
+      os_remark = #{osRemark,jdbcType=VARCHAR},
+      companyId = #{companyid,jdbcType=INTEGER},
+      updaterId = #{updaterid,jdbcType=INTEGER},
+      updatedate = #{updatedate,jdbcType=TIMESTAMP},
+      os_text1 = #{osText1,jdbcType=VARCHAR},
+      os_text2 = #{osText2,jdbcType=VARCHAR},
+      os_text3 = #{osText3,jdbcType=VARCHAR},
+      os_text4 = #{osText4,jdbcType=VARCHAR},
+      os_text5 = #{osText5,jdbcType=VARCHAR}
+    where os_id = #{osId,jdbcType=INTEGER}
+  </update>
+</mapper>

+ 218 - 0
applications/money/money-server/src/main/resources/mapper/OthspendingsdetailMapper.xml

@@ -0,0 +1,218 @@
+<?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.money.mapper.OthspendingsdetailMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.money.po.Othspendingsdetail" >
+    <id column="osd_id" property="osdId" jdbcType="INTEGER" />
+    <result column="osd_orid" property="osdOrid" jdbcType="INTEGER" />
+    <result column="osd_detno" property="osdDetno" jdbcType="INTEGER" />
+    <result column="osd_ym" property="osdYm" jdbcType="INTEGER" />
+    <result column="osd_type" property="osdType" jdbcType="VARCHAR" />
+    <result column="osd_nowbalance" property="osdNowbalance" jdbcType="DOUBLE" />
+    <result column="osd_remark" property="osdRemark" jdbcType="VARCHAR" />
+    <result column="companyId" property="companyid" jdbcType="INTEGER" />
+    <result column="updaterId" property="updaterid" jdbcType="INTEGER" />
+    <result column="updatedate" property="updatedate" jdbcType="TIMESTAMP" />
+    <result column="osd_text1" property="osdText1" jdbcType="VARCHAR" />
+    <result column="osd_text2" property="osdText2" jdbcType="VARCHAR" />
+    <result column="osd_text3" property="osdText3" jdbcType="VARCHAR" />
+    <result column="osd_text4" property="osdText4" jdbcType="VARCHAR" />
+    <result column="osd_text5" property="osdText5" jdbcType="VARCHAR" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    osd_id, osd_orid, osd_detno, osd_ym, osd_type, osd_nowbalance, osd_remark, companyId, 
+    updaterId, updatedate, osd_text1, osd_text2, osd_text3, osd_text4, osd_text5
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+    select 
+    <include refid="Base_Column_List" />
+    from othspendingsdetail
+    where osd_id = #{osdId,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+    delete from othspendingsdetail
+    where osd_id = #{osdId,jdbcType=INTEGER}
+  </delete>
+
+  <delete id="deleteItem" parameterType="java.lang.Integer" >
+    delete from othspendingsdetail
+    where osd_orid = #{osdOrid,jdbcType=INTEGER}
+  </delete>
+
+  <insert id="insert" parameterType="com.usoftchina.saas.money.po.Othspendingsdetail" >
+    insert into othspendingsdetail (osd_orid, osd_detno,
+      osd_ym, osd_type, osd_nowbalance, 
+      osd_remark, companyId, updaterId, 
+      updatedate, osd_text1, osd_text2, 
+      osd_text3, osd_text4, osd_text5
+      )
+    values (#{osdOrid,jdbcType=INTEGER}, #{osdDetno,jdbcType=INTEGER},
+      #{osdYm,jdbcType=INTEGER}, #{osdType,jdbcType=VARCHAR}, #{osdNowbalance,jdbcType=DOUBLE}, 
+      #{osdRemark,jdbcType=VARCHAR}, #{companyid,jdbcType=INTEGER}, #{updaterid,jdbcType=INTEGER}, 
+      #{updatedate,jdbcType=TIMESTAMP}, #{osdText1,jdbcType=VARCHAR}, #{osdText2,jdbcType=VARCHAR}, 
+      #{osdText3,jdbcType=VARCHAR}, #{osdText4,jdbcType=VARCHAR}, #{osdText5,jdbcType=VARCHAR}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.money.po.Othspendingsdetail" >
+    insert into othspendingsdetail
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="osdId != null" >
+        osd_id,
+      </if>
+      <if test="osdOrid != null" >
+        osd_orid,
+      </if>
+      <if test="osdDetno != null" >
+        osd_detno,
+      </if>
+      <if test="osdYm != null" >
+        osd_ym,
+      </if>
+      <if test="osdType != null" >
+        osd_type,
+      </if>
+      <if test="osdNowbalance != null" >
+        osd_nowbalance,
+      </if>
+      <if test="osdRemark != null" >
+        osd_remark,
+      </if>
+      <if test="companyid != null" >
+        companyId,
+      </if>
+      <if test="updaterid != null" >
+        updaterId,
+      </if>
+      <if test="updatedate != null" >
+        updatedate,
+      </if>
+      <if test="osdText1 != null" >
+        osd_text1,
+      </if>
+      <if test="osdText2 != null" >
+        osd_text2,
+      </if>
+      <if test="osdText3 != null" >
+        osd_text3,
+      </if>
+      <if test="osdText4 != null" >
+        osd_text4,
+      </if>
+      <if test="osdText5 != null" >
+        osd_text5,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="osdId != null" >
+        #{osdId,jdbcType=INTEGER},
+      </if>
+      <if test="osdOrid != null" >
+        #{osdOrid,jdbcType=INTEGER},
+      </if>
+      <if test="osdDetno != null" >
+        #{osdDetno,jdbcType=INTEGER},
+      </if>
+      <if test="osdYm != null" >
+        #{osdYm,jdbcType=INTEGER},
+      </if>
+      <if test="osdType != null" >
+        #{osdType,jdbcType=VARCHAR},
+      </if>
+      <if test="osdNowbalance != null" >
+        #{osdNowbalance,jdbcType=DOUBLE},
+      </if>
+      <if test="osdRemark != null" >
+        #{osdRemark,jdbcType=VARCHAR},
+      </if>
+      <if test="companyid != null" >
+        #{companyid,jdbcType=INTEGER},
+      </if>
+      <if test="updaterid != null" >
+        #{updaterid,jdbcType=INTEGER},
+      </if>
+      <if test="updatedate != null" >
+        #{updatedate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="osdText1 != null" >
+        #{osdText1,jdbcType=VARCHAR},
+      </if>
+      <if test="osdText2 != null" >
+        #{osdText2,jdbcType=VARCHAR},
+      </if>
+      <if test="osdText3 != null" >
+        #{osdText3,jdbcType=VARCHAR},
+      </if>
+      <if test="osdText4 != null" >
+        #{osdText4,jdbcType=VARCHAR},
+      </if>
+      <if test="osdText5 != null" >
+        #{osdText5,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.money.po.Othspendingsdetail" >
+    update othspendingsdetail
+    <set >
+      <if test="osdOrid != null" >
+        osd_orid = #{osdOrid,jdbcType=INTEGER},
+      </if>
+      <if test="osdDetno != null" >
+        osd_detno = #{osdDetno,jdbcType=INTEGER},
+      </if>
+      <if test="osdYm != null" >
+        osd_ym = #{osdYm,jdbcType=INTEGER},
+      </if>
+      <if test="osdType != null" >
+        osd_type = #{osdType,jdbcType=VARCHAR},
+      </if>
+      <if test="osdNowbalance != null" >
+        osd_nowbalance = #{osdNowbalance,jdbcType=DOUBLE},
+      </if>
+      <if test="osdRemark != null" >
+        osd_remark = #{osdRemark,jdbcType=VARCHAR},
+      </if>
+      <if test="companyid != null" >
+        companyId = #{companyid,jdbcType=INTEGER},
+      </if>
+      <if test="updaterid != null" >
+        updaterId = #{updaterid,jdbcType=INTEGER},
+      </if>
+      <if test="updatedate != null" >
+        updatedate = #{updatedate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="osdText1 != null" >
+        osd_text1 = #{osdText1,jdbcType=VARCHAR},
+      </if>
+      <if test="osdText2 != null" >
+        osd_text2 = #{osdText2,jdbcType=VARCHAR},
+      </if>
+      <if test="osdText3 != null" >
+        osd_text3 = #{osdText3,jdbcType=VARCHAR},
+      </if>
+      <if test="osdText4 != null" >
+        osd_text4 = #{osdText4,jdbcType=VARCHAR},
+      </if>
+      <if test="osdText5 != null" >
+        osd_text5 = #{osdText5,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where osd_id = #{osdId,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.money.po.Othspendingsdetail" >
+    update othspendingsdetail
+    set osd_orid = #{osdOrid,jdbcType=INTEGER},
+      osd_detno = #{osdDetno,jdbcType=INTEGER},
+      osd_ym = #{osdYm,jdbcType=INTEGER},
+      osd_type = #{osdType,jdbcType=VARCHAR},
+      osd_nowbalance = #{osdNowbalance,jdbcType=DOUBLE},
+      osd_remark = #{osdRemark,jdbcType=VARCHAR},
+      companyId = #{companyid,jdbcType=INTEGER},
+      updaterId = #{updaterid,jdbcType=INTEGER},
+      updatedate = #{updatedate,jdbcType=TIMESTAMP},
+      osd_text1 = #{osdText1,jdbcType=VARCHAR},
+      osd_text2 = #{osdText2,jdbcType=VARCHAR},
+      osd_text3 = #{osdText3,jdbcType=VARCHAR},
+      osd_text4 = #{osdText4,jdbcType=VARCHAR},
+      osd_text5 = #{osdText5,jdbcType=VARCHAR}
+    where osd_id = #{osdId,jdbcType=INTEGER}
+  </update>
+</mapper>

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

@@ -18,8 +18,8 @@
     <result column="pb_recorderid" jdbcType="INTEGER" property="pb_recorderid" />
     <result column="pb_recorder" jdbcType="VARCHAR" property="pb_recorder" />
     <result column="pb_recorddate" jdbcType="TIMESTAMP" property="pb_recorddate" />
-    <result column="pb_status" jdbcType="INTEGER" property="pb_status" />
-    <result column="pb_statuscode" jdbcType="DECIMAL" property="pb_statuscode" />
+    <result column="pb_status" jdbcType="VARCHAR" property="pb_status" />
+    <result column="pb_statuscode" jdbcType="VARCHAR" property="pb_statuscode" />
     <result column="pb_remark" jdbcType="VARCHAR" property="pb_remark" />
     <result column="companyid" jdbcType="INTEGER" property="companyId" />
     <result column="updaterId" jdbcType="INTEGER" property="updaterId" />

+ 22 - 14
applications/money/money-server/src/main/resources/mapper/PaybalancedetMapper.xml

@@ -31,28 +31,36 @@
     select 
     <include refid="Base_Column_List" />
     from paybalancedet
-    where pd_id = #{pdId,jdbcType=INTEGER}
+    where pd_rbid = #{pdRbId,jdbcType=INTEGER}
   </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+  <delete id="deleteItem" parameterType="java.lang.Integer" >
     delete from paybalancedet
     where pd_id = #{pdId,jdbcType=INTEGER}
   </delete>
+
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+    delete from paybalancedet
+    where pd_rbid = #{pdRbid,jdbcType=INTEGER}
+  </delete>
+
+  <!--<insert id="insert" parameterType="com.usoftchina.saas.money.po.Paybalancedet" >-->
   <insert id="insert" parameterType="com.usoftchina.saas.money.po.Paybalancedet" >
-    insert into paybalancedet (pd_id, pd_rbid, pd_detno, 
-      pd_ym, pd_bankid, pd_bankcode, 
-      pd_bankname, pd_amount, pd_paymethod, 
-      pd_paycode, pd_remark, companyId, 
-      updaterId, updatedate, pd_text1, 
-      pd_text2, pd_text3, pd_text4, 
+    insert into paybalancedet (pd_id, pd_rbid, pd_detno,
+      pd_ym, pd_bankid, pd_bankcode,
+      pd_bankname, pd_amount, pd_paymethod,
+      pd_paycode, pd_remark, companyId,
+      updaterId, updatedate, pd_text1,
+      pd_text2, pd_text3, pd_text4,
       pd_text5)
-    values (#{pdId,jdbcType=INTEGER}, #{pdRbid,jdbcType=INTEGER}, #{pdDetno,jdbcType=INTEGER}, 
-      #{pdYm,jdbcType=INTEGER}, #{pdBankid,jdbcType=INTEGER}, #{pdBankcode,jdbcType=VARCHAR}, 
-      #{pdBankname,jdbcType=VARCHAR}, #{pdAmount,jdbcType=DOUBLE}, #{pdPaymethod,jdbcType=VARCHAR}, 
-      #{pdPaycode,jdbcType=VARCHAR}, #{pdRemark,jdbcType=VARCHAR}, #{companyid,jdbcType=INTEGER}, 
-      #{updaterid,jdbcType=INTEGER}, #{updatedate,jdbcType=TIMESTAMP}, #{pdText1,jdbcType=VARCHAR}, 
-      #{pdText2,jdbcType=VARCHAR}, #{pdText3,jdbcType=VARCHAR}, #{pdText4,jdbcType=VARCHAR}, 
+    values (#{pdId,jdbcType=INTEGER}, #{pdRbid,jdbcType=INTEGER}, #{pdDetno,jdbcType=INTEGER},
+      #{pdYm,jdbcType=INTEGER}, #{pdBankid,jdbcType=INTEGER}, #{pdBankcode,jdbcType=VARCHAR},
+      #{pdBankname,jdbcType=VARCHAR}, #{pdAmount,jdbcType=DOUBLE}, #{pdPaymethod,jdbcType=VARCHAR},
+      #{pdPaycode,jdbcType=VARCHAR}, #{pdRemark,jdbcType=VARCHAR}, #{companyid,jdbcType=INTEGER},
+      #{updaterid,jdbcType=INTEGER}, #{updatedate,jdbcType=TIMESTAMP}, #{pdText1,jdbcType=VARCHAR},
+      #{pdText2,jdbcType=VARCHAR}, #{pdText3,jdbcType=VARCHAR}, #{pdText4,jdbcType=VARCHAR},
       #{pdText5,jdbcType=VARCHAR})
   </insert>
+
   <insert id="insertSelective" parameterType="com.usoftchina.saas.money.po.Paybalancedet" >
     insert into paybalancedet
     <trim prefix="(" suffix=")" suffixOverrides="," >

+ 19 - 13
applications/money/money-server/src/main/resources/mapper/PaybalancedetailMapper.xml

@@ -35,22 +35,28 @@
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
     delete from paybalancedetail
-    where pbd_id = #{pbdId,jdbcType=INTEGER}
+    where pbd_pbid = #{pbdPbid,jdbcType=INTEGER}
+  </delete>
+
+  <delete id="deleteByItem" parameterType="java.lang.Integer" >
+    delete from paybalancedetail
+    where pbd_id = #{pdbId,jdbcType=INTEGER}
   </delete>
+
   <insert id="insert" parameterType="com.usoftchina.saas.money.po.Paybalancedetail" >
-    insert into paybalancedetail (pbd_id, pbd_pbid, pbd_detno, 
-      pbd_ym, pbd_sild, pbd_slcode, 
-      pbd_slkind, pbd_sldate, pbd_amount, 
-      pbd_nowbalance, pbd_remark, companyId, 
-      updaterId, updatedate, pbd_text1, 
-      pbd_text2, pbd_text3, pbd_text4, 
+    insert into paybalancedetail (pbd_id, pbd_pbid, pbd_detno,
+      pbd_ym, pbd_sild, pbd_slcode,
+      pbd_slkind, pbd_sldate, pbd_amount,
+      pbd_nowbalance, pbd_remark, companyId,
+      updaterId, updatedate, pbd_text1,
+      pbd_text2, pbd_text3, pbd_text4,
       pbd_text5)
-    values (#{pbdId,jdbcType=INTEGER}, #{pbdPbid,jdbcType=INTEGER}, #{pbdDetno,jdbcType=INTEGER}, 
-      #{pbdYm,jdbcType=INTEGER}, #{pbdSild,jdbcType=INTEGER}, #{pbdSlcode,jdbcType=VARCHAR}, 
-      #{pbdSlkind,jdbcType=VARCHAR}, #{pbdSldate,jdbcType=TIMESTAMP}, #{pbdAmount,jdbcType=DOUBLE}, 
-      #{pbdNowbalance,jdbcType=DOUBLE}, #{pbdRemark,jdbcType=VARCHAR}, #{companyid,jdbcType=INTEGER}, 
-      #{updaterid,jdbcType=INTEGER}, #{updatedate,jdbcType=TIMESTAMP}, #{pbdText1,jdbcType=VARCHAR}, 
-      #{pbdText2,jdbcType=VARCHAR}, #{pbdText3,jdbcType=VARCHAR}, #{pbdText4,jdbcType=VARCHAR}, 
+    values (#{pbdId,jdbcType=INTEGER}, #{pbdPbid,jdbcType=INTEGER}, #{pbdDetno,jdbcType=INTEGER},
+      #{pbdYm,jdbcType=INTEGER}, #{pbdSild,jdbcType=INTEGER}, #{pbdSlcode,jdbcType=VARCHAR},
+      #{pbdSlkind,jdbcType=VARCHAR}, #{pbdSldate,jdbcType=TIMESTAMP}, #{pbdAmount,jdbcType=DOUBLE},
+      #{pbdNowbalance,jdbcType=DOUBLE}, #{pbdRemark,jdbcType=VARCHAR}, #{companyid,jdbcType=INTEGER},
+      #{updaterid,jdbcType=INTEGER}, #{updatedate,jdbcType=TIMESTAMP}, #{pbdText1,jdbcType=VARCHAR},
+      #{pbdText2,jdbcType=VARCHAR}, #{pbdText3,jdbcType=VARCHAR}, #{pbdText4,jdbcType=VARCHAR},
       #{pbdText5,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.saas.money.po.Paybalancedetail" >

+ 16 - 16
applications/money/money-server/src/main/resources/mapper/RecbalanceMapper.xml

@@ -18,12 +18,12 @@
     <result column="rb_recorderid" jdbcType="INTEGER" property="rb_recorderid" />
     <result column="rb_recorder" jdbcType="VARCHAR" property="rb_recorder" />
     <result column="rb_recorddate" jdbcType="TIMESTAMP" property="rb_recorddate" />
-    <result column="rb_status" jdbcType="INTEGER" property="rb_status" />
-    <result column="rb_statuscode" jdbcType="DECIMAL" property="rb_statuscode" />
+    <result column="rb_status" jdbcType="VARCHAR" property="rb_status" />
+    <result column="rb_statuscode" jdbcType="VARCHAR" property="rb_statuscode" />
     <result column="rb_remark" jdbcType="VARCHAR" property="rb_remark" />
     <result column="companyId" jdbcType="INTEGER" property="companyId" />
     <result column="updaterId" jdbcType="INTEGER" property="updaterId" />
-    <result column="updatedate" jdbcType="TIMESTAMP" property="updatedate" />
+    <result column="updatedate" jdbcType="TIMESTAMP" property="updateTime" />
     <result column="rb_text1" jdbcType="VARCHAR" property="rb_text1" />
     <result column="rb_text2" jdbcType="VARCHAR" property="rb_text2" />
     <result column="rb_text3" jdbcType="VARCHAR" property="rb_text3" />
@@ -132,7 +132,7 @@
     </if>
   </delete>
   <insert id="insert" parameterType="com.usoftchina.saas.money.po.Recbalance">
-    insert into recbalance (rb_id, rb_code, rb_kind, 
+    insert into recbalance (rb_code, rb_kind,
       rb_date, rb_custid, rb_custcode, 
       rb_custname, rb_manname, rb_rdamount, 
       rb_rbdamount, rb_preamount, rb_discounts, 
@@ -142,14 +142,14 @@
       updatedate, rb_text1, rb_text2, 
       rb_text3, rb_text4, rb_text5
       )
-    values (#{rb_id,jdbcType=INTEGER}, #{rb_code,jdbcType=VARCHAR}, #{rb_kind,jdbcType=VARCHAR}, 
+    values (#{rb_code,jdbcType=VARCHAR}, #{rb_kind,jdbcType=VARCHAR},
       #{rb_date,jdbcType=TIMESTAMP}, #{rb_custid,jdbcType=INTEGER}, #{rb_custcode,jdbcType=VARCHAR}, 
       #{rb_custname,jdbcType=VARCHAR}, #{rb_manname,jdbcType=VARCHAR}, #{rb_rdamount,jdbcType=DOUBLE}, 
       #{rb_rbdamount,jdbcType=DOUBLE}, #{rb_preamount,jdbcType=DOUBLE}, #{rb_discounts,jdbcType=DOUBLE}, 
       #{rb_havebalance,jdbcType=DOUBLE}, #{rb_recorderid,jdbcType=INTEGER}, #{rb_recorder,jdbcType=VARCHAR}, 
       #{rb_recorddate,jdbcType=TIMESTAMP}, #{rb_status,jdbcType=INTEGER}, #{rb_statuscode,jdbcType=DECIMAL}, 
       #{rb_remark,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER}, #{updaterId,jdbcType=INTEGER},
-      #{updatedate,jdbcType=TIMESTAMP}, #{rb_text1,jdbcType=VARCHAR}, #{rb_text2,jdbcType=VARCHAR}, 
+      #{updateTime,jdbcType=TIMESTAMP}, #{rb_text1,jdbcType=VARCHAR}, #{rb_text2,jdbcType=VARCHAR},
       #{rb_text3,jdbcType=VARCHAR}, #{rb_text4,jdbcType=VARCHAR}, #{rb_text5,jdbcType=VARCHAR}
       )
   </insert>
@@ -219,8 +219,8 @@
       <if test="updaterId != null">
         updaterId,
       </if>
-      <if test="updatedate != null">
-        updatedate,
+      <if test="updateTime != null">
+        updateTime,
       </if>
       <if test="rb_text1 != null">
         rb_text1,
@@ -302,8 +302,8 @@
       <if test="updaterId != null">
         #{updaterId,jdbcType=INTEGER},
       </if>
-      <if test="updatedate != null">
-        #{updatedate,jdbcType=TIMESTAMP},
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
       </if>
       <if test="rb_text1 != null">
         #{rb_text1,jdbcType=VARCHAR},
@@ -394,8 +394,8 @@
       <if test="record.updaterId != null">
         updaterId = #{record.updaterId,jdbcType=INTEGER},
       </if>
-      <if test="record.updatedate != null">
-        updatedate = #{record.updatedate,jdbcType=TIMESTAMP},
+      <if test="record.updateTime != null">
+        updatedate = #{record.updateTime,jdbcType=TIMESTAMP},
       </if>
       <if test="record.rb_text1 != null">
         rb_text1 = #{record.rb_text1,jdbcType=VARCHAR},
@@ -440,7 +440,7 @@
       rb_remark = #{record.rb_remark,jdbcType=VARCHAR},
       companyId = #{record.companyId,jdbcType=INTEGER},
       updaterId = #{record.updaterId,jdbcType=INTEGER},
-      updatedate = #{record.updatedate,jdbcType=TIMESTAMP},
+      updatedate = #{record.updateTime,jdbcType=TIMESTAMP},
       rb_text1 = #{record.rb_text1,jdbcType=VARCHAR},
       rb_text2 = #{record.rb_text2,jdbcType=VARCHAR},
       rb_text3 = #{record.rb_text3,jdbcType=VARCHAR},
@@ -513,8 +513,8 @@
       <if test="updaterId != null">
         updaterId = #{updaterId,jdbcType=INTEGER},
       </if>
-      <if test="updatedate != null">
-        updatedate = #{updatedate,jdbcType=TIMESTAMP},
+      <if test="updateTime != null">
+        updatedate = #{updateTime,jdbcType=TIMESTAMP},
       </if>
       <if test="rb_text1 != null">
         rb_text1 = #{rb_text1,jdbcType=VARCHAR},
@@ -556,7 +556,7 @@
       rb_remark = #{rb_remark,jdbcType=VARCHAR},
       companyId = #{companyId,jdbcType=INTEGER},
       updaterId = #{updaterId,jdbcType=INTEGER},
-      updatedate = #{updatedate,jdbcType=TIMESTAMP},
+      updatedate = #{updateTime,jdbcType=TIMESTAMP},
       rb_text1 = #{rb_text1,jdbcType=VARCHAR},
       rb_text2 = #{rb_text2,jdbcType=VARCHAR},
       rb_text3 = #{rb_text3,jdbcType=VARCHAR},

+ 28 - 22
applications/money/money-server/src/main/resources/mapper/RecbalancedetMapper.xml

@@ -15,7 +15,7 @@
     <result column="rd_remark" jdbcType="VARCHAR" property="rd_remark" />
     <result column="companyid" jdbcType="INTEGER" property="companyId" />
     <result column="updaterId" jdbcType="INTEGER" property="updaterId" />
-    <result column="updatedate" jdbcType="TIMESTAMP" property="updatedate" />
+    <result column="updatedate" jdbcType="TIMESTAMP" property="updateTime" />
     <result column="rd_text1" jdbcType="VARCHAR" property="rd_text1" />
     <result column="rd_text2" jdbcType="VARCHAR" property="rd_text2" />
     <result column="rd_text3" jdbcType="VARCHAR" property="rd_text3" />
@@ -105,10 +105,16 @@
     from recbalancedet
     where rd_id = #{rd_id,jdbcType=INTEGER}
   </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+  <delete id="deleteItem" parameterType="java.lang.Integer">
     delete from recbalancedet
     where rd_id = #{rd_id,jdbcType=INTEGER}
   </delete>
+
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    delete from recbalancedet
+    where rd_rbid = #{rd_rbid,jdbcType=INTEGER}
+  </delete>
+
   <delete id="deleteByExample" parameterType="com.usoftchina.saas.money.po.RecbalancedetExample">
     delete from recbalancedet
     <if test="_parameter != null">
@@ -116,19 +122,19 @@
     </if>
   </delete>
   <insert id="insert" parameterType="com.usoftchina.saas.money.po.Recbalancedet">
-    insert into recbalancedet (rd_id, rd_rbid, rd_detno, 
-      rd_ym, rd_bankid, rd_bankcode, 
-      rd_bankname, rd_amount, rd_paymethod, 
+    insert into recbalancedet (rd_id, rd_rbid, rd_detno,
+      rd_ym, rd_bankid, rd_bankcode,
+      rd_bankname, rd_amount, rd_paymethod,
       rd_paycode, rd_remark, companyId,
-      updaterId, updatedate, rd_text1, 
-      rd_text2, rd_text3, rd_text4, 
+      updaterId, updatedate, rd_text1,
+      rd_text2, rd_text3, rd_text4,
       rd_text5)
-    values (#{rd_id,jdbcType=INTEGER}, #{rd_rbid,jdbcType=INTEGER}, #{rd_detno,jdbcType=INTEGER}, 
-      #{rd_ym,jdbcType=INTEGER}, #{rd_bankid,jdbcType=INTEGER}, #{rd_bankcode,jdbcType=VARCHAR}, 
-      #{rd_bankname,jdbcType=VARCHAR}, #{rd_amount,jdbcType=DOUBLE}, #{rd_paymethod,jdbcType=VARCHAR}, 
+    values (#{rd_id,jdbcType=INTEGER}, #{rd_rbid,jdbcType=INTEGER}, #{rd_detno,jdbcType=INTEGER},
+      #{rd_ym,jdbcType=INTEGER}, #{rd_bankid,jdbcType=INTEGER}, #{rd_bankcode,jdbcType=VARCHAR},
+      #{rd_bankname,jdbcType=VARCHAR}, #{rd_amount,jdbcType=DOUBLE}, #{rd_paymethod,jdbcType=VARCHAR},
       #{rd_paycode,jdbcType=VARCHAR}, #{rd_remark,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER},
-      #{updaterId,jdbcType=INTEGER}, #{updatedate,jdbcType=TIMESTAMP}, #{rd_text1,jdbcType=VARCHAR}, 
-      #{rd_text2,jdbcType=VARCHAR}, #{rd_text3,jdbcType=VARCHAR}, #{rd_text4,jdbcType=VARCHAR}, 
+      #{updaterId,jdbcType=INTEGER}, #{updatedate,jdbcType=TIMESTAMP}, #{rd_text1,jdbcType=VARCHAR},
+      #{rd_text2,jdbcType=VARCHAR}, #{rd_text3,jdbcType=VARCHAR}, #{rd_text4,jdbcType=VARCHAR},
       #{rd_text5,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.saas.money.po.Recbalancedet">
@@ -173,8 +179,8 @@
       <if test="updaterId != null">
         updaterId,
       </if>
-      <if test="updatedate != null">
-        updatedate,
+      <if test="updateTime != null">
+        updateTime,
       </if>
       <if test="rd_text1 != null">
         rd_text1,
@@ -232,8 +238,8 @@
       <if test="updaterId != null">
         #{updaterId,jdbcType=INTEGER},
       </if>
-      <if test="updatedate != null">
-        #{updatedate,jdbcType=TIMESTAMP},
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
       </if>
       <if test="rd_text1 != null">
         #{rd_text1,jdbcType=VARCHAR},
@@ -300,8 +306,8 @@
       <if test="record.updaterId != null">
         updaterId = #{record.updaterId,jdbcType=INTEGER},
       </if>
-      <if test="record.updatedate != null">
-        updatedate = #{record.updatedate,jdbcType=TIMESTAMP},
+      <if test="record.updateTime != null">
+        updatedate = #{record.updateTime,jdbcType=TIMESTAMP},
       </if>
       <if test="record.rd_text1 != null">
         rd_text1 = #{record.rd_text1,jdbcType=VARCHAR},
@@ -338,7 +344,7 @@
       rd_remark = #{record.rd_remark,jdbcType=VARCHAR},
       companyId = #{record.companyId,jdbcType=INTEGER},
       updaterId = #{record.updaterId,jdbcType=INTEGER},
-      updatedate = #{record.updatedate,jdbcType=TIMESTAMP},
+      updatedate = #{record.updateTime,jdbcType=TIMESTAMP},
       rd_text1 = #{record.rd_text1,jdbcType=VARCHAR},
       rd_text2 = #{record.rd_text2,jdbcType=VARCHAR},
       rd_text3 = #{record.rd_text3,jdbcType=VARCHAR},
@@ -387,8 +393,8 @@
       <if test="updaterId != null">
         updaterId = #{updaterId,jdbcType=INTEGER},
       </if>
-      <if test="updatedate != null">
-        updatedate = #{updatedate,jdbcType=TIMESTAMP},
+      <if test="updateTime != null">
+        updatedate = #{updateTime,jdbcType=TIMESTAMP},
       </if>
       <if test="rd_text1 != null">
         rd_text1 = #{rd_text1,jdbcType=VARCHAR},
@@ -422,7 +428,7 @@
       rd_remark = #{rd_remark,jdbcType=VARCHAR},
       companyId = #{companyId,jdbcType=INTEGER},
       updaterId = #{updaterId,jdbcType=INTEGER},
-      updatedate = #{updatedate,jdbcType=TIMESTAMP},
+      updatedate = #{updateTime,jdbcType=TIMESTAMP},
       rd_text1 = #{rd_text1,jdbcType=VARCHAR},
       rd_text2 = #{rd_text2,jdbcType=VARCHAR},
       rd_text3 = #{rd_text3,jdbcType=VARCHAR},

+ 25 - 19
applications/money/money-server/src/main/resources/mapper/RecbalancedetailMapper.xml

@@ -15,7 +15,7 @@
     <result column="rbd_remark" property="rbdRemark" jdbcType="VARCHAR" />
     <result column="companyId" property="companyId" jdbcType="INTEGER" />
     <result column="updaterId" property="updaterid" jdbcType="INTEGER" />
-    <result column="updatedate" property="updatedate" jdbcType="TIMESTAMP" />
+    <result column="updatedate" property="updateTime" jdbcType="TIMESTAMP" />
     <result column="rbd_text1" property="rbdText1" jdbcType="VARCHAR" />
     <result column="rbd_text2" property="rbdText2" jdbcType="VARCHAR" />
     <result column="rbd_text3" property="rbdText3" jdbcType="VARCHAR" />
@@ -33,24 +33,30 @@
     from recbalancedetail
     where rbd_id = #{rbdId,jdbcType=INTEGER}
   </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+  <delete id="deleteItem" parameterType="java.lang.Integer" >
     delete from recbalancedetail
     where rbd_id = #{rbdId,jdbcType=INTEGER}
   </delete>
+
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+    delete from recbalancedetail
+    where rbd_rbid = #{rbdRbid,jdbcType=INTEGER}
+  </delete>
+
   <insert id="insert" parameterType="com.usoftchina.saas.money.po.Recbalancedetail" >
-    insert into recbalancedetail (rbd_id, rbd_rbid, rbd_detno, 
-      rbd_ym, rbd_slid, rbd_slcode, 
-      rbd_slkind, rbd_sldate, rbd_amount, 
+    insert into recbalancedetail (rbd_id, rbd_rbid, rbd_detno,
+      rbd_ym, rbd_slid, rbd_slcode,
+      rbd_slkind, rbd_sldate, rbd_amount,
       rbd_nowbalance, rbd_remark, companyId,
-      updaterId, updatedate, rbd_text1, 
-      rbd_text2, rbd_text3, rbd_text4, 
+      updaterId, updatedate, rbd_text1,
+      rbd_text2, rbd_text3, rbd_text4,
       rbd_text5)
-    values (#{rbdId,jdbcType=INTEGER}, #{rbdRbid,jdbcType=INTEGER}, #{rbdDetno,jdbcType=INTEGER}, 
-      #{rbdYm,jdbcType=INTEGER}, #{rbdSlid,jdbcType=INTEGER}, #{rbdSlcode,jdbcType=VARCHAR}, 
-      #{rbdSlkind,jdbcType=VARCHAR}, #{rbdSldate,jdbcType=TIMESTAMP}, #{rbdAmount,jdbcType=DOUBLE}, 
+    values (#{rbdId,jdbcType=INTEGER}, #{rbdRbid,jdbcType=INTEGER}, #{rbdDetno,jdbcType=INTEGER},
+      #{rbdYm,jdbcType=INTEGER}, #{rbdSlid,jdbcType=INTEGER}, #{rbdSlcode,jdbcType=VARCHAR},
+      #{rbdSlkind,jdbcType=VARCHAR}, #{rbdSldate,jdbcType=TIMESTAMP}, #{rbdAmount,jdbcType=DOUBLE},
       #{rbdNowbalance,jdbcType=DOUBLE}, #{rbdRemark,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER},
-      #{updaterid,jdbcType=INTEGER}, #{updatedate,jdbcType=TIMESTAMP}, #{rbdText1,jdbcType=VARCHAR}, 
-      #{rbdText2,jdbcType=VARCHAR}, #{rbdText3,jdbcType=VARCHAR}, #{rbdText4,jdbcType=VARCHAR}, 
+      #{updaterid,jdbcType=INTEGER}, #{updatedate,jdbcType=TIMESTAMP}, #{rbdText1,jdbcType=VARCHAR},
+      #{rbdText2,jdbcType=VARCHAR}, #{rbdText3,jdbcType=VARCHAR}, #{rbdText4,jdbcType=VARCHAR},
       #{rbdText5,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.saas.money.po.Recbalancedetail" >
@@ -95,8 +101,8 @@
       <if test="updaterid != null" >
         updaterId,
       </if>
-      <if test="updatedate != null" >
-        updatedate,
+      <if test="updateTime != null" >
+        updateTime,
       </if>
       <if test="rbdText1 != null" >
         rbd_text1,
@@ -154,8 +160,8 @@
       <if test="updaterid != null" >
         #{updaterid,jdbcType=INTEGER},
       </if>
-      <if test="updatedate != null" >
-        #{updatedate,jdbcType=TIMESTAMP},
+      <if test="updateTime != null" >
+        #{updateTime,jdbcType=TIMESTAMP},
       </if>
       <if test="rbdText1 != null" >
         #{rbdText1,jdbcType=VARCHAR},
@@ -213,8 +219,8 @@
       <if test="updaterid != null" >
         updaterId = #{updaterid,jdbcType=INTEGER},
       </if>
-      <if test="updatedate != null" >
-        updatedate = #{updatedate,jdbcType=TIMESTAMP},
+      <if test="updateTime != null" >
+        updatedate = #{updateTime,jdbcType=TIMESTAMP},
       </if>
       <if test="rbdText1 != null" >
         rbd_text1 = #{rbdText1,jdbcType=VARCHAR},
@@ -248,7 +254,7 @@
       rbd_remark = #{rbdRemark,jdbcType=VARCHAR},
       companyId = #{companyId,jdbcType=INTEGER},
       updaterId = #{updaterid,jdbcType=INTEGER},
-      updatedate = #{updatedate,jdbcType=TIMESTAMP},
+      updatedate = #{updateTime,jdbcType=TIMESTAMP},
       rbd_text1 = #{rbdText1,jdbcType=VARCHAR},
       rbd_text2 = #{rbdText2,jdbcType=VARCHAR},
       rbd_text3 = #{rbdText3,jdbcType=VARCHAR},

+ 7 - 6
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/PurchaseController.java

@@ -1,8 +1,10 @@
 package com.usoftchina.saas.purchase.controller;
 
 import com.github.pagehelper.PageInfo;
+import com.netflix.discovery.converters.Auto;
 import com.usoftchina.saas.base.Result;
 
+import com.usoftchina.saas.commons.api.MessageLogService;
 import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
@@ -13,6 +15,7 @@ import com.usoftchina.saas.purchase.service.PurchaseService;
 
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.context.request.async.DeferredResult;
 
 
 /**
@@ -69,7 +72,7 @@ public class PurchaseController {
      * @param id
      * @return
      */
-    @GetMapping("/delete/{id}")
+    @PostMapping("/delete/{id}")
     public Result delete(@PathVariable("id") Long id) {
         purchaseService.delete(id);
         return Result.success();
@@ -81,7 +84,7 @@ public class PurchaseController {
      * @param id
      * @return
      */
-    @GetMapping("/deleteDetail/{id}")
+    @PostMapping("/deleteDetail/{id}")
     public Result deleteDetail(@PathVariable("id") Long id) {
         purchaseService.deleteDetail(id);
         return Result.success();
@@ -105,7 +108,7 @@ public class PurchaseController {
      * @param id
      * @return
      */
-    @GetMapping("/unAudit/{id}")
+    @PostMapping("/unAudit/{id}")
     public Result unAudit(@PathVariable("id") Long id) {
         purchaseService.unAudit(id);
         return Result.success();
@@ -159,12 +162,10 @@ public class PurchaseController {
         return Result.success();
     }
 
-    @GetMapping("/turnProdin/{id}")
+    @PostMapping("/turnProdin/{id}")
     public Result turnProdin(@PathVariable("id") Long id){
         purchaseService.turnProdin(id);
         return Result.success();
     }
 
-
-
 }

+ 3 - 2
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/PurchaseMapper.java

@@ -23,9 +23,10 @@ public interface PurchaseMapper extends CommonBaseMapper<Purchase>{
 
     String validateBatchUnAudit(List<DocBaseDTO> baseDTOs);
 
-    Integer validateCodeWhenInsert(String code);
+    Integer validateCodeWhenInsert(@Param("code") String code, @Param("companyId") Long companyId);
 
-    Integer validateCodeWhenUpdate(@Param("code") String code,@Param("id") Long id);
+    Integer validateCodeWhenUpdate(@Param("code") String code, @Param("id") Long id,
+                                   @Param("companyId") Long companyId);
 
     String selectCodeById(Long id);
 }

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

@@ -339,8 +339,9 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         if (null == code) {
             throw new BizException(BizExceptionCode.NULL_CODE);
         }
-        Integer count = "0".equals(String.valueOf(id)) ? purchaseMapper.validateCodeWhenInsert(code) :
-                purchaseMapper.validateCodeWhenUpdate(code, id);
+        Long companyId = BaseContextHolder.getCompanyId();
+        Integer count = "0".equals(String.valueOf(id)) ? purchaseMapper.validateCodeWhenInsert(code, companyId) :
+                purchaseMapper.validateCodeWhenUpdate(code, id, companyId);
         return maxnumberService.pushMaxnubmer(count, code, "Purchase").toString();
     }
 

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