Browse Source

merge处理

hy 7 years ago
parent
commit
7dc0354c00
100 changed files with 2695 additions and 3149 deletions
  1. 5 1
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/BillCodeSeq.java
  2. 6 4
      applications/document/document-api/src/main/java/com/usoftchina/saas/document/api/WarehouseApi.java
  3. 4 4
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/WarehouseController.java
  4. 4 1
      applications/money/money-server/pom.xml
  5. 20 18
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/OthreceiptsController.java
  6. 21 19
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/OthspengdingsController.java
  7. 11 10
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/PaybalanceController.java
  8. 16 8
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/RecbalanceContorller.java
  9. 1 1
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/BanksubledgerMapper.java
  10. 10 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/OthreceiptsMapper.java
  11. 3 1
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/OthreceiptsdetailMapper.java
  12. 10 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/OthspendingsMapper.java
  13. 3 1
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/OthspendingsdetailMapper.java
  14. 10 4
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/PaybalanceMapper.java
  15. 3 1
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/PaybalancedetMapper.java
  16. 9 2
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/RecbalanceMapper.java
  17. 1 8
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/RecbalancedetMapper.java
  18. 2 3
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/RecbalancedetailMapper.java
  19. 1 1
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/VerificationMapper.java
  20. 1 1
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/VerificationdetMapper.java
  21. 1 2
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/VerificationdetailMapper.java
  22. 104 130
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othreceipts.java
  23. 59 85
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othreceiptsdetail.java
  24. 104 129
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othspendings.java
  25. 59 85
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othspendingsdetail.java
  26. 5 5
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Paybalance.java
  27. 75 123
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Paybalancedet.java
  28. 75 123
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Paybalancedetail.java
  29. 6 5
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalance.java
  30. 6 5
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalancedet.java
  31. 104 122
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalancedetail.java
  32. 7 5
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/OthreceiptsService.java
  33. 7 5
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/OthspendingsService.java
  34. 4 2
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/PaybalanceService.java
  35. 10 3
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/RecbalanceService.java
  36. 85 27
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthreceiptsServiceImpl.java
  37. 77 22
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthspendingsServiceImpl.java
  38. 76 10
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/PaybalanceServiceImpl.java
  39. 89 19
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/RecbalanceServiceImpl.java
  40. 177 144
      applications/money/money-server/src/main/resources/mapper/OthreceiptsMapper.xml
  41. 80 95
      applications/money/money-server/src/main/resources/mapper/OthreceiptsdetailMapper.xml
  42. 69 39
      applications/money/money-server/src/main/resources/mapper/OthspendingsMapper.xml
  43. 85 91
      applications/money/money-server/src/main/resources/mapper/OthspendingsdetailMapper.xml
  44. 51 139
      applications/money/money-server/src/main/resources/mapper/PaybalanceMapper.xml
  45. 119 97
      applications/money/money-server/src/main/resources/mapper/PaybalancedetMapper.xml
  46. 119 147
      applications/money/money-server/src/main/resources/mapper/PaybalancedetailMapper.xml
  47. 42 12
      applications/money/money-server/src/main/resources/mapper/RecbalanceMapper.xml
  48. 8 152
      applications/money/money-server/src/main/resources/mapper/RecbalancedetMapper.xml
  49. 114 142
      applications/money/money-server/src/main/resources/mapper/RecbalancedetailMapper.xml
  50. 25 0
      frontend/saas-web/app/model/money/PayBalance1.js
  51. 25 0
      frontend/saas-web/app/model/money/PayBalance2.js
  52. 6 2
      frontend/saas-web/app/model/money/RecBalance1.js
  53. 7 6
      frontend/saas-web/app/model/money/RecBalance2.js
  54. 1 0
      frontend/saas-web/app/model/purchase/prodIODetail.js
  55. 4 7
      frontend/saas-web/app/util/BaseUtil.js
  56. 3 3
      frontend/saas-web/app/util/Errors.js
  57. 26 7
      frontend/saas-web/app/util/FormUtil.js
  58. 0 47
      frontend/saas-web/app/util/GridUtil.js
  59. 0 200
      frontend/saas-web/app/util/QueryUtil.js
  60. 1 1
      frontend/saas-web/app/view/auth/LoginController.js
  61. 1 0
      frontend/saas-web/app/view/core/baseform/FormPanel.js
  62. 6 7
      frontend/saas-web/app/view/core/baseform/GridPanel.js
  63. 1 2
      frontend/saas-web/app/view/core/dbfind/MultiDbfindGridPanel.js
  64. 0 2
      frontend/saas-web/app/view/core/dbfind/MultiDbfindTrigger.js
  65. 19 20
      frontend/saas-web/app/view/core/form/FormPanelController.js
  66. 24 8
      frontend/saas-web/app/view/core/form/field/DetailGridField.js
  67. 9 0
      frontend/saas-web/app/view/core/form/field/DetailGridField.scss
  68. 0 58
      frontend/saas-web/app/view/core/query/MoreQueryFormPanel.js
  69. 20 15
      frontend/saas-web/app/view/core/query/QueryGridPanel.js
  70. 6 0
      frontend/saas-web/app/view/core/query/QueryPanel.js
  71. 0 9
      frontend/saas-web/app/view/document/customer/list/FormPanel.js
  72. 10 10
      frontend/saas-web/app/view/document/customer/panel/FormController.js
  73. 5 5
      frontend/saas-web/app/view/document/kind/ChildForm.js
  74. 5 5
      frontend/saas-web/app/view/document/kind/KindController.js
  75. 10 10
      frontend/saas-web/app/view/document/product/panel/FormController.js
  76. 10 10
      frontend/saas-web/app/view/document/vendor/panel/FormController.js
  77. 8 8
      frontend/saas-web/app/view/money/othreceipts/FormPanel.js
  78. 11 25
      frontend/saas-web/app/view/money/othreceipts/FormPanelController.js
  79. 10 23
      frontend/saas-web/app/view/money/othreceipts/QueryPanelController.js
  80. 5 4
      frontend/saas-web/app/view/money/othspendings/FormPanel.js
  81. 2 2
      frontend/saas-web/app/view/money/othspendings/FormPanelController.js
  82. 2 2
      frontend/saas-web/app/view/money/othspendings/QueryPanelController.js
  83. 136 62
      frontend/saas-web/app/view/money/payBalance/FormPanel.js
  84. 31 79
      frontend/saas-web/app/view/money/payBalance/FormPanelController.js
  85. 35 155
      frontend/saas-web/app/view/money/payBalance/QueryPanel.js
  86. 1 1
      frontend/saas-web/app/view/money/payBalance/QueryPanelController.js
  87. 138 80
      frontend/saas-web/app/view/money/recBalance/FormPanel.js
  88. 70 22
      frontend/saas-web/app/view/money/recBalance/FormPanelController.js
  89. 24 146
      frontend/saas-web/app/view/money/recBalance/QueryPanel.js
  90. 1 1
      frontend/saas-web/app/view/money/recBalance/QueryPanelController.js
  91. 4 4
      frontend/saas-web/app/view/purchase/purchase/FormPanel.js
  92. 6 6
      frontend/saas-web/app/view/purchase/purchase/FormPanelController.js
  93. 1 1
      frontend/saas-web/app/view/purchase/purchase/QueryPanelController.js
  94. 6 6
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js
  95. 1 1
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanelController.js
  96. 1 1
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js
  97. 1 1
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanelController.js
  98. 13 26
      frontend/saas-web/app/view/sale/sale/FormPanel.js
  99. 5 5
      frontend/saas-web/app/view/sale/sale/FormPanelController.js
  100. 1 1
      frontend/saas-web/app/view/sale/sale/QueryPanel.js

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

@@ -38,7 +38,11 @@ public enum  BillCodeSeq {
 
     RECBALANCE("收款单", "RecBalance"),
 
-    VERIFICATION("核价单", "Verification");
+    VERIFICATION("核价单", "Verification"),
+
+    OTHRECEIPTS("其他收入单", "Otherceipts"),
+
+    OTHSPENDINGS("其他收入单", "Otherceipts");
 
     BillCodeSeq(String name, String caller) {
         this.name = name;

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

@@ -3,16 +3,18 @@ package com.usoftchina.saas.document.api;
 import com.usoftchina.saas.base.Result;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
 
 import java.util.Map;
 
 @FeignClient(name = "document-server")
 public interface WarehouseApi {
 
-    @GetMapping("/warehouse/post")
-    public Result post(Map<String, Object> param);
+    @PostMapping("/warehouse/post")
+    public Result post(@RequestBody Map<String, Object> map);
 
-    @GetMapping("/warehouse/unPost")
-    public Result unPost(Map<String, Object> param);
+    @PostMapping("/warehouse/unPost")
+    public Result unPost(@RequestBody Map<String, Object> map);
 
 }

+ 4 - 4
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/WarehouseController.java

@@ -23,8 +23,8 @@ public class WarehouseController {
      * 过账
      * @return
      */
-    @GetMapping("/post")
-    public Result post(Map<String, Object> map){
+    @PostMapping("/post")
+    public Result post(@RequestBody Map<String, Object> map){
         warehouseService.post(map);
         return Result.success(map.get("result"));
     }
@@ -34,8 +34,8 @@ public class WarehouseController {
      * @param map
      * @return
      */
-    @GetMapping("/unPost")
-    public Result unPost(Map<String, Object> map){
+    @PostMapping("/unPost")
+    public Result unPost(@RequestBody Map<String, Object> map){
         warehouseService.unPost(map);
         return Result.success();
     }

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

@@ -11,7 +11,10 @@
 
     <artifactId>money-server</artifactId>
     <dependencies>
-
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>server-starter</artifactId>
+        </dependency>
         <!--test-->
         <dependency>
             <groupId>org.springframework.boot</groupId>

+ 20 - 18
applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/OthreceiptsController.java

@@ -2,6 +2,8 @@ package com.usoftchina.saas.money.controller;
 
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.money.po.Othreceipts;
 import com.usoftchina.saas.money.po.Othte;
 import com.usoftchina.saas.money.service.OthreceiptsService;
@@ -21,8 +23,8 @@ public class OthreceiptsController {
 
     @RequestMapping("/save")
     public Result insert(@RequestBody Othte body) {
-        int id = othreceiptsService.insert(body);
-        return Result.success(id);
+        DocBaseDTO docBaseDTO = othreceiptsService.insert(body);
+        return Result.success(docBaseDTO);
     }
 
 
@@ -33,26 +35,26 @@ public class OthreceiptsController {
     }
 
 
-    @GetMapping("/read")
-    public Result getPaybalance(int id){
+    @GetMapping("/read/{id}")
+    public Result getPaybalance(@PathVariable("id")int id){
         return Result.success(othreceiptsService.select(id));
     }
 
-    @GetMapping("/List")
-    public Result getPaybalanceList(PageRequest page){
-        PageInfo<Othreceipts> list = othreceiptsService.selectList(page);
+    @GetMapping("/list")
+    public Result getPaybalanceList(PageRequest page, ListReqDTO condition){
+        PageInfo<Othreceipts> list = othreceiptsService.selectList(page, condition);
         return Result.success(list);
     }
 
-    @RequestMapping("/audit")
-    public Result audit(@RequestBody Othte body){
-        othreceiptsService.audit(body);
-        return Result.success();
-    }
-
-    @PostMapping("/unAudit")
-    public Result unAudit(@RequestBody int id){
-        othreceiptsService.unAudit(id);
-        return Result.success();
-    }
+//    @RequestMapping("/audit")
+//    public Result audit(@RequestBody Othte body){
+//        othreceiptsService.audit(body);
+//        return Result.success();
+//    }
+//
+//    @PostMapping("/unAudit")
+//    public Result unAudit(@RequestBody int id){
+//        othreceiptsService.unAudit(id);
+//        return Result.success();
+//    }
 }

+ 21 - 19
applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/OthspengdingsController.java

@@ -2,6 +2,8 @@ package com.usoftchina.saas.money.controller;
 
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.money.po.Othreceipts;
 import com.usoftchina.saas.money.po.Othsp;
 import com.usoftchina.saas.money.po.Othspendings;
@@ -24,8 +26,8 @@ public class OthspengdingsController {
 
     @RequestMapping("/save")
     public Result insert(@RequestBody Othsp body) {
-        int id = othspendingsService.insert(body);
-        return Result.success(id);
+        DocBaseDTO docBaseDTO = othspendingsService.insert(body);
+        return Result.success(docBaseDTO);
     }
 
 
@@ -35,32 +37,32 @@ public class OthspengdingsController {
         return Result.success();
     }
 
-    @PostMapping("/deleteItem/")
+    @PostMapping("/deleteItem")
     public Result deleteItem(@RequestBody int id){
         othspendingsService.deleteItem(id);
         return Result.success();
     }
 
-    @GetMapping("/read")
-    public Result getPaybalance(int id){
+    @GetMapping("/read/{id}")
+    public Result getPaybalance(@PathVariable("id")int id){
         return Result.success(othspendingsService.select(id));
     }
 
-    @GetMapping("/List")
-    public Result getPaybalanceList(PageRequest page){
-        PageInfo<Othspendings> list = othspendingsService.selectList(page);
+    @GetMapping("/list")
+    public Result getPaybalanceList(PageRequest page, ListReqDTO condition){
+        PageInfo<Othspendings> list = othspendingsService.selectList(page, condition);
         return Result.success(list);
     }
 
-    @RequestMapping("/audit")
-    public Result audit(@RequestBody Othsp body){
-        othspendingsService.audit(body);
-        return Result.success();
-    }
-
-    @PostMapping("/unAudit")
-    public Result unAudit(@RequestBody int id){
-        othspendingsService.unAudit(id);
-        return Result.success();
-    }
+//    @RequestMapping("/audit")
+//    public Result audit(@RequestBody Othsp body){
+//        othspendingsService.audit(body);
+//        return Result.success();
+//    }
+//
+//    @PostMapping("/unAudit")
+//    public Result unAudit(@RequestBody int id){
+//        othspendingsService.unAudit(id);
+//        return Result.success();
+//    }
 }

+ 11 - 10
applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/PaybalanceController.java

@@ -1,8 +1,9 @@
 package com.usoftchina.saas.money.controller;
 
-import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.money.po.Pay;
 import com.usoftchina.saas.money.po.Paybalance;
 import com.usoftchina.saas.money.service.PaybalanceService;
@@ -15,15 +16,15 @@ import org.springframework.web.bind.annotation.*;
  * @date 2018/10/22 15:03
  **/
 @RestController
-@RequestMapping("/money/Paybalance")
+@RequestMapping("/money/paybalance")
 public class PaybalanceController {
     @Autowired
     private PaybalanceService paybalanceService;
 
     @RequestMapping("/save")
-    public Result insert(@RequestBody Pay body) {
-        int id = paybalanceService.insert(body);
-        return Result.success(id);
+    public Result saveFormData(@RequestBody Pay body) {
+        DocBaseDTO docBaseDTO = paybalanceService.insert(body);
+        return Result.success(docBaseDTO);
     }
 
 
@@ -39,14 +40,14 @@ public class PaybalanceController {
         return Result.success();
     }
 
-    @GetMapping("/read")
-    public Result getPaybalance(int id){
+    @GetMapping("/read/{id}")
+    public Result getPaybalance(@PathVariable("id")int id){
         return Result.success(paybalanceService.select(id));
     }
 
-    @GetMapping("/List")
-    public Result getPaybalanceList(PageRequest page){
-        PageInfo<Paybalance> list = paybalanceService.selectList(page);
+    @GetMapping("/list")
+    public Result getPaybalanceList(PageRequest page, ListReqDTO condition){
+        PageInfo<Paybalance> list = paybalanceService.selectList(page, condition);
         return Result.success(list);
     }
 

+ 16 - 8
applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/RecbalanceContorller.java

@@ -1,6 +1,8 @@
 package com.usoftchina.saas.money.controller;
 
 import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.money.po.Rec;
 import com.usoftchina.saas.money.service.RecbalanceService;
 import com.usoftchina.saas.page.PageRequest;
@@ -18,9 +20,9 @@ public class RecbalanceContorller {
     private RecbalanceService recbalanceService;
 
     @RequestMapping("/save")
-    public Result insert(@RequestBody Rec body){
-        recbalanceService.insert(body);
-        return Result.success();
+    public Result saveFormData(@RequestBody Rec body){
+        DocBaseDTO docBaseDTO = recbalanceService.insert(body);
+        return Result.success(docBaseDTO);
     }
 
     @PostMapping("/delete")
@@ -29,20 +31,26 @@ public class RecbalanceContorller {
         return Result.success();
     }
 
-    @PostMapping("/deleteItem/")
+    @PostMapping("/deleteItems1")
     public Result deleteItem(@RequestBody int id){
         recbalanceService.deleteItem(id);
         return Result.success();
     }
 
+    @PostMapping("/deleteItems2")
+    public Result deleteItems(@RequestBody int id){
+        recbalanceService.deleteItems(id);
+        return Result.success();
+    }
+
     @GetMapping("/read/{id}")
-    public Result selectRecbalance(@PathVariable int id){
+    public Result getFormData(@PathVariable("id")int id){
         return Result.success(recbalanceService.select(id));
     }
 
     @GetMapping("/list")
-    public Result selectRecbalanceList(PageRequest page){
-        return Result.success(recbalanceService.selectList(page));
+    public Result getListData(PageRequest page, ListReqDTO condition){
+        return Result.success(recbalanceService.selectList(page, condition));
     }
 
     @RequestMapping("/audit")
@@ -52,7 +60,7 @@ public class RecbalanceContorller {
     }
 
     @PostMapping("/unAudit")
-    public Result unAudit(@RequestBody int id){
+    public Result unAudit(@RequestBody Long id){
         recbalanceService.unAudit(id);
         return Result.success();
     }

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

@@ -19,7 +19,7 @@ public interface BanksubledgerMapper extends CommonBaseMapper<Banksubledger> {
 
     int deleteByPrimaryKey(Integer bl_id);
 
-    int insert(Banksubledger record);
+    Long insert(Banksubledger record);
 
     int insertSelective(Banksubledger record);
 

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

@@ -1,7 +1,9 @@
 package com.usoftchina.saas.money.mapper;
 
 import com.usoftchina.saas.money.po.Othreceipts;
+import com.usoftchina.saas.money.po.Recbalance;
 import com.usoftchina.saas.page.PageRequest;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -18,4 +20,12 @@ public interface OthreceiptsMapper {
     int updateByPrimaryKeySelective(Othreceipts record);
 
     int updateByPrimaryKey(Othreceipts record);
+
+    Integer validateCodeWhenInsert(@Param("code") String code, @Param("companyId") Long companyId);
+
+    Integer validateCodeWhenUpdate(@Param("code") String code, @Param("id") Long id,
+                                   @Param("companyId") Long companyId);
+
+    List<Othreceipts> selectOthreceiptsBycondition(@Param("con") String con, @Param("companyId") Long companyId);
+    List<Othreceipts> selectOthreceiptsListByCondition(@Param("con") String con, @Param("companyId") Long companyId);
 }

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

@@ -2,6 +2,8 @@ package com.usoftchina.saas.money.mapper;
 
 import com.usoftchina.saas.money.po.Othreceiptsdetail;
 
+import java.util.List;
+
 public interface OthreceiptsdetailMapper {
     int deleteByPrimaryKey(Integer ordId);
     int deleteItem(int id);
@@ -10,7 +12,7 @@ public interface OthreceiptsdetailMapper {
 
     int insertSelective(Othreceiptsdetail record);
 
-    Othreceiptsdetail selectByPrimaryKey(Integer ordId);
+    List<Othreceiptsdetail> selectByPrimaryKey(Integer ordId);
 
     int updateByPrimaryKeySelective(Othreceiptsdetail record);
 

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

@@ -1,6 +1,8 @@
 package com.usoftchina.saas.money.mapper;
 
+import com.usoftchina.saas.money.po.Othreceipts;
 import com.usoftchina.saas.money.po.Othspendings;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -18,4 +20,12 @@ public interface OthspendingsMapper {
     int updateByPrimaryKeySelective(Othspendings record);
 
     int updateByPrimaryKey(Othspendings record);
+
+    Integer validateCodeWhenInsert(@Param("code") String code, @Param("companyId") Long companyId);
+
+    Integer validateCodeWhenUpdate(@Param("code") String code, @Param("id") Long id,
+                                   @Param("companyId") Long companyId);
+
+    List<Othspendings> selectOthspendingsBycondition(@Param("con") String con, @Param("companyId") Long companyId);
+    List<Othspendings> selectOthspendingsListByCondition(@Param("con") String con, @Param("companyId") Long companyId);
 }

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

@@ -2,6 +2,8 @@ package com.usoftchina.saas.money.mapper;
 
 import com.usoftchina.saas.money.po.Othspendingsdetail;
 
+import java.util.List;
+
 public interface OthspendingsdetailMapper {
     int deleteByPrimaryKey(Integer osdId);
     int deleteItem(int id);
@@ -10,7 +12,7 @@ public interface OthspendingsdetailMapper {
 
     int insertSelective(Othspendingsdetail record);
 
-    Othspendingsdetail selectByPrimaryKey(Integer osdId);
+    List<Othspendingsdetail> selectByPrimaryKey(Integer osdId);
 
     int updateByPrimaryKeySelective(Othspendingsdetail record);
 

+ 10 - 4
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/PaybalanceMapper.java

@@ -2,24 +2,30 @@ package com.usoftchina.saas.money.mapper;
 
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 import com.usoftchina.saas.money.po.Paybalance;
+import com.usoftchina.saas.money.po.Recbalance;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
-import org.apache.ibatis.annotations.Param;
-
 public interface PaybalanceMapper extends CommonBaseMapper<Paybalance> {
 
     int deleteByPrimaryKey(Integer pb_id);
 
-    int insert(Paybalance record);
+    Long insert(Paybalance record);
 
     int insertSelective(Paybalance record);
 
-    List<Paybalance> selectList();
+    List<Paybalance> selectPaybalanceBycondition(@Param("con") String con, @Param("companyId") Long companyId);
+    List<Paybalance> selectPaybalanceListByCondition(@Param("con") String con, @Param("companyId") Long companyId);
 
     Paybalance selectByPrimaryKey(Integer pb_id);
 
     int updateByPrimaryKeySelective(Paybalance record);
 
     int updateByPrimaryKey(Paybalance record);
+
+    Integer validateCodeWhenInsert(@Param("code") String code, @Param("companyId") Long companyId);
+
+    Integer validateCodeWhenUpdate(@Param("code") String code, @Param("id") Long id,
+                                   @Param("companyId") Long companyId);
 }

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

@@ -1,11 +1,12 @@
 package com.usoftchina.saas.money.mapper;
 
 import com.usoftchina.saas.money.po.Paybalancedet;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
 public interface PaybalancedetMapper {
-    int deleteByPrimaryKey(Integer pdId);
+    int deleteByPrimaryKey(Integer id);
 
     int deleteItem(int id);
 
@@ -18,4 +19,5 @@ public interface PaybalancedetMapper {
     int updateByPrimaryKeySelective(List<Paybalancedet> record);
 
     int updateByPrimaryKey(Paybalancedet record);
+
 }

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

@@ -1,6 +1,7 @@
 package com.usoftchina.saas.money.mapper;
 
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.money.po.Recbalance;
 
 import java.util.List;
@@ -20,11 +21,12 @@ public interface RecbalanceMapper extends CommonBaseMapper<Recbalance> {
 
     int deleteByPrimaryKey(Integer rb_id);
 
-    int insert(Recbalance record);
+    Long insert(Recbalance record);
 
     int insertSelective(Recbalance record);
 
-    List<Recbalance> selectList();
+    List<Recbalance> selectRecbalanceBycondition(@Param("con") String con, @Param("companyId") Long companyId);
+    List<Recbalance> selectRecbalanceListByCondition(@Param("con") String con, @Param("companyId") Long companyId);
 
     Recbalance selectByPrimaryKey(Integer rb_id);
 
@@ -35,4 +37,9 @@ public interface RecbalanceMapper extends CommonBaseMapper<Recbalance> {
     int updateByPrimaryKeySelective(Recbalance record);
 
     int updateByPrimaryKey(Recbalance record);
+
+    Integer validateCodeWhenInsert(@Param("code") String code, @Param("companyId") Long companyId);
+
+    Integer validateCodeWhenUpdate(@Param("code") String code, @Param("id") Long id,
+                                   @Param("companyId") Long companyId);
 }

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

@@ -9,7 +9,6 @@ import com.usoftchina.saas.money.po.RecbalancedetExample;
 import org.apache.ibatis.annotations.Param;
 
 public interface RecbalancedetMapper extends CommonBaseMapper<Recbalancedet> {
-    int countByExample(RecbalancedetExample example);
 
     int deleteItem(int id);
 
@@ -19,13 +18,7 @@ public interface RecbalancedetMapper extends CommonBaseMapper<Recbalancedet> {
 
     int insertSelective(Recbalancedet record);
 
-    List<Recbalancedet> selectByExample(RecbalancedetExample example);
-
-    Recbalancedet selectByPrimaryKey(Integer rd_id);
-
-    int updateByExampleSelective(@Param("record") Recbalancedet record, @Param("example") RecbalancedetExample example);
-
-    int updateByExample(@Param("record") Recbalancedet record, @Param("example") RecbalancedetExample example);
+    List<Recbalancedet> selectByPrimaryKey(Integer rd_id);
 
     int updateByPrimaryKeySelective(Recbalancedet record);
 

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

@@ -5,16 +5,15 @@ import com.usoftchina.saas.money.po.Recbalancedetail;
 import java.util.List;
 
 public interface RecbalancedetailMapper {
-    int deleteByPrimaryKey(Integer rbdId);
     int deleteItem(Integer rbdId);
 
     int insert(List<Recbalancedetail> record);
 
     int insertSelective(Recbalancedetail record);
 
-    Recbalancedetail selectByPrimaryKey(Integer rbdId);
+    List<Recbalancedetail> selectByPrimaryKey(Integer rbdId);
 
     int updateByPrimaryKeySelective(Recbalancedetail record);
+    void deleteByPrimaryKey(Integer id);
 
-    int updateByPrimaryKey(Recbalancedetail record);
 }

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

@@ -17,7 +17,7 @@ public interface VerificationMapper extends CommonBaseMapper<Verification> {
 
     int deleteByPrimaryKey(Integer vc_id);
 
-    int insert(Verification record);
+    Long insert(Verification record);
 
     int insertSelective(Verification record);
 

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

@@ -17,7 +17,7 @@ public interface VerificationdetMapper extends CommonBaseMapper<Verificationdet>
 
     int deleteByPrimaryKey(Integer vd_id);
 
-    int insert(Verificationdet record);
+    Long insert(Verificationdet record);
 
     int insertSelective(Verificationdet record);
 

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

@@ -1,7 +1,6 @@
 package com.usoftchina.saas.money.mapper;
 
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
-import com.usoftchina.saas.money.po.Verificationdet;
 import com.usoftchina.saas.money.po.Verificationdetail;
 import java.util.List;
 
@@ -19,7 +18,7 @@ public interface VerificationdetailMapper extends CommonBaseMapper<Verificationd
 
     int deleteByPrimaryKey(Integer vcd_id);
 
-    int insert(Verificationdetail record);
+    Long insert(Verificationdetail record);
 
     int insertSelective(Verificationdetail record);
 

+ 104 - 130
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othreceipts.java

@@ -1,198 +1,172 @@
 package com.usoftchina.saas.money.po;
 
-import java.util.Date;
-
-public class Othreceipts {
-    private Integer orId;
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
 
-    private String orCode;
+import java.io.Serializable;
+import java.util.Date;
 
-    private Date orDate;
+public class Othreceipts extends CommonBaseEntity implements Serializable {
 
-    private Integer orCustid;
+    private String or_code;
 
-    private String orCustcode;
+    private Date or_date;
 
-    private String orCustname;
+    private Integer or_custid;
 
-    private String orBankcode;
+    private String or_custcode;
 
-    private Integer orBankid;
+    private String or_custname;
 
-    private String orBankname;
+    private String or_bankcode;
 
-    private Double orAmount;
+    private Integer or_bankid;
 
-    private Integer orRecorderid;
+    private String or_bankname;
 
-    private String orRecorder;
+    private Double or_amount;
 
-    private Date orRecorddate;
+    private Integer or_recorderid;
 
-    private String orStatus;
+    private String or_recorder;
 
-    private String orStatuscode;
+    private Date or_recorddate;
 
-    private String orRemark;
+    private String or_status;
 
-    private Integer companyid;
+    private String or_statuscode;
 
-    private Integer updaterid;
+    private String or_remark;
 
     private Date updatedate;
 
-    private String orText1;
-
-    private String orText2;
+    private String or_text1;
 
-    private String orText3;
+    private String or_text2;
 
-    private String orText4;
+    private String or_text3;
 
-    private String orText5;
-
-    public Integer getOrId() {
-        return orId;
-    }
-
-    public void setOrId(Integer orId) {
-        this.orId = orId;
-    }
+    private String or_text4;
 
-    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;
-    }
+    private String or_text5;
 
-    public Integer getOrCustid() {
-        return orCustid;
+    public String getOr_code() {
+        return or_code;
     }
 
-    public void setOrCustid(Integer orCustid) {
-        this.orCustid = orCustid;
+    public void setOr_code(String or_code) {
+        this.or_code = or_code;
     }
 
-    public String getOrCustcode() {
-        return orCustcode;
+    public Date getOr_date() {
+        return or_date;
     }
 
-    public void setOrCustcode(String orCustcode) {
-        this.orCustcode = orCustcode == null ? null : orCustcode.trim();
+    public void setOr_date(Date or_date) {
+        this.or_date = or_date;
     }
 
-    public String getOrCustname() {
-        return orCustname;
+    public Integer getOr_custid() {
+        return or_custid;
     }
 
-    public void setOrCustname(String orCustname) {
-        this.orCustname = orCustname == null ? null : orCustname.trim();
+    public void setOr_custid(Integer or_custid) {
+        this.or_custid = or_custid;
     }
 
-    public String getOrBankcode() {
-        return orBankcode;
+    public String getOr_custcode() {
+        return or_custcode;
     }
 
-    public void setOrBankcode(String orBankcode) {
-        this.orBankcode = orBankcode == null ? null : orBankcode.trim();
+    public void setOr_custcode(String or_custcode) {
+        this.or_custcode = or_custcode;
     }
 
-    public Integer getOrBankid() {
-        return orBankid;
+    public String getOr_custname() {
+        return or_custname;
     }
 
-    public void setOrBankid(Integer orBankid) {
-        this.orBankid = orBankid;
+    public void setOr_custname(String or_custname) {
+        this.or_custname = or_custname;
     }
 
-    public String getOrBankname() {
-        return orBankname;
+    public String getOr_bankcode() {
+        return or_bankcode;
     }
 
-    public void setOrBankname(String orBankname) {
-        this.orBankname = orBankname == null ? null : orBankname.trim();
+    public void setOr_bankcode(String or_bankcode) {
+        this.or_bankcode = or_bankcode;
     }
 
-    public Double getOrAmount() {
-        return orAmount;
+    public Integer getOr_bankid() {
+        return or_bankid;
     }
 
-    public void setOrAmount(Double orAmount) {
-        this.orAmount = orAmount;
+    public void setOr_bankid(Integer or_bankid) {
+        this.or_bankid = or_bankid;
     }
 
-    public Integer getOrRecorderid() {
-        return orRecorderid;
+    public String getOr_bankname() {
+        return or_bankname;
     }
 
-    public void setOrRecorderid(Integer orRecorderid) {
-        this.orRecorderid = orRecorderid;
+    public void setOr_bankname(String or_bankname) {
+        this.or_bankname = or_bankname;
     }
 
-    public String getOrRecorder() {
-        return orRecorder;
+    public Double getOr_amount() {
+        return or_amount;
     }
 
-    public void setOrRecorder(String orRecorder) {
-        this.orRecorder = orRecorder == null ? null : orRecorder.trim();
+    public void setOr_amount(Double or_amount) {
+        this.or_amount = or_amount;
     }
 
-    public Date getOrRecorddate() {
-        return orRecorddate;
+    public Integer getOr_recorderid() {
+        return or_recorderid;
     }
 
-    public void setOrRecorddate(Date orRecorddate) {
-        this.orRecorddate = orRecorddate;
+    public void setOr_recorderid(Integer or_recorderid) {
+        this.or_recorderid = or_recorderid;
     }
 
-    public String getOrStatus() {
-        return orStatus;
+    public String getOr_recorder() {
+        return or_recorder;
     }
 
-    public void setOrStatus(String orStatus) {
-        this.orStatus = orStatus;
+    public void setOr_recorder(String or_recorder) {
+        this.or_recorder = or_recorder;
     }
 
-    public String getOrStatuscode() {
-        return orStatuscode;
+    public Date getOr_recorddate() {
+        return or_recorddate;
     }
 
-    public void setOrStatuscode(String orStatuscode) {
-        this.orStatuscode = orStatuscode;
+    public void setOr_recorddate(Date or_recorddate) {
+        this.or_recorddate = or_recorddate;
     }
 
-    public String getOrRemark() {
-        return orRemark;
+    public String getOr_status() {
+        return or_status;
     }
 
-    public void setOrRemark(String orRemark) {
-        this.orRemark = orRemark == null ? null : orRemark.trim();
+    public void setOr_status(String or_status) {
+        this.or_status = or_status;
     }
 
-    public Integer getCompanyid() {
-        return companyid;
+    public String getOr_statuscode() {
+        return or_statuscode;
     }
 
-    public void setCompanyid(Integer companyid) {
-        this.companyid = companyid;
+    public void setOr_statuscode(String or_statuscode) {
+        this.or_statuscode = or_statuscode;
     }
 
-    public Integer getUpdaterid() {
-        return updaterid;
+    public String getOr_remark() {
+        return or_remark;
     }
 
-    public void setUpdaterid(Integer updaterid) {
-        this.updaterid = updaterid;
+    public void setOr_remark(String or_remark) {
+        this.or_remark = or_remark;
     }
 
     public Date getUpdatedate() {
@@ -203,43 +177,43 @@ public class Othreceipts {
         this.updatedate = updatedate;
     }
 
-    public String getOrText1() {
-        return orText1;
+    public String getOr_text1() {
+        return or_text1;
     }
 
-    public void setOrText1(String orText1) {
-        this.orText1 = orText1 == null ? null : orText1.trim();
+    public void setOr_text1(String or_text1) {
+        this.or_text1 = or_text1;
     }
 
-    public String getOrText2() {
-        return orText2;
+    public String getOr_text2() {
+        return or_text2;
     }
 
-    public void setOrText2(String orText2) {
-        this.orText2 = orText2 == null ? null : orText2.trim();
+    public void setOr_text2(String or_text2) {
+        this.or_text2 = or_text2;
     }
 
-    public String getOrText3() {
-        return orText3;
+    public String getOr_text3() {
+        return or_text3;
     }
 
-    public void setOrText3(String orText3) {
-        this.orText3 = orText3 == null ? null : orText3.trim();
+    public void setOr_text3(String or_text3) {
+        this.or_text3 = or_text3;
     }
 
-    public String getOrText4() {
-        return orText4;
+    public String getOr_text4() {
+        return or_text4;
     }
 
-    public void setOrText4(String orText4) {
-        this.orText4 = orText4 == null ? null : orText4.trim();
+    public void setOr_text4(String or_text4) {
+        this.or_text4 = or_text4;
     }
 
-    public String getOrText5() {
-        return orText5;
+    public String getOr_text5() {
+        return or_text5;
     }
 
-    public void setOrText5(String orText5) {
-        this.orText5 = orText5 == null ? null : orText5.trim();
+    public void setOr_text5(String or_text5) {
+        this.or_text5 = or_text5;
     }
 }

+ 59 - 85
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othreceiptsdetail.java

@@ -1,108 +1,82 @@
 package com.usoftchina.saas.money.po;
 
-import java.util.Date;
-
-public class Othreceiptsdetail {
-    private Integer ordId;
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
 
-    private Integer ordOrid;
+import java.io.Serializable;
+import java.util.Date;
 
-    private Integer ordDetno;
+public class Othreceiptsdetail extends CommonBaseEntity implements Serializable {
 
-    private Integer ordYm;
+    private Integer ord_orid;
 
-    private String ordType;
+    private Integer ord_detno;
 
-    private Double ordNowbalance;
+    private Integer ord_ym;
 
-    private String ordRemark;
+    private String ord_type;
 
-    private Integer companyid;
+    private Double ord_nowbalance;
 
-    private Integer updaterid;
+    private String ord_remark;
 
     private Date updatedate;
 
-    private String ordText1;
-
-    private String ordText2;
+    private String ord_text1;
 
-    private String ordText3;
+    private String ord_text2;
 
-    private String ordText4;
+    private String ord_text3;
 
-    private String ordText5;
-
-    public Integer getOrdId() {
-        return ordId;
-    }
-
-    public void setOrdId(Integer ordId) {
-        this.ordId = ordId;
-    }
+    private String ord_text4;
 
-    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;
-    }
+    private String ord_text5;
 
-    public Integer getOrdYm() {
-        return ordYm;
+    public Integer getOrd_orid() {
+        return ord_orid;
     }
 
-    public void setOrdYm(Integer ordYm) {
-        this.ordYm = ordYm;
+    public void setOrd_orid(Integer ord_orid) {
+        this.ord_orid = ord_orid;
     }
 
-    public String getOrdType() {
-        return ordType;
+    public Integer getOrd_detno() {
+        return ord_detno;
     }
 
-    public void setOrdType(String ordType) {
-        this.ordType = ordType == null ? null : ordType.trim();
+    public void setOrd_detno(Integer ord_detno) {
+        this.ord_detno = ord_detno;
     }
 
-    public Double getOrdNowbalance() {
-        return ordNowbalance;
+    public Integer getOrd_ym() {
+        return ord_ym;
     }
 
-    public void setOrdNowbalance(Double ordNowbalance) {
-        this.ordNowbalance = ordNowbalance;
+    public void setOrd_ym(Integer ord_ym) {
+        this.ord_ym = ord_ym;
     }
 
-    public String getOrdRemark() {
-        return ordRemark;
+    public String getOrd_type() {
+        return ord_type;
     }
 
-    public void setOrdRemark(String ordRemark) {
-        this.ordRemark = ordRemark == null ? null : ordRemark.trim();
+    public void setOrd_type(String ord_type) {
+        this.ord_type = ord_type;
     }
 
-    public Integer getCompanyid() {
-        return companyid;
+    public Double getOrd_nowbalance() {
+        return ord_nowbalance;
     }
 
-    public void setCompanyid(Integer companyid) {
-        this.companyid = companyid;
+    public void setOrd_nowbalance(Double ord_nowbalance) {
+        this.ord_nowbalance = ord_nowbalance;
     }
 
-    public Integer getUpdaterid() {
-        return updaterid;
+    public String getOrd_remark() {
+        return ord_remark;
     }
 
-    public void setUpdaterid(Integer updaterid) {
-        this.updaterid = updaterid;
+    public void setOrd_remark(String ord_remark) {
+        this.ord_remark = ord_remark;
     }
 
     public Date getUpdatedate() {
@@ -113,43 +87,43 @@ public class Othreceiptsdetail {
         this.updatedate = updatedate;
     }
 
-    public String getOrdText1() {
-        return ordText1;
+    public String getOrd_text1() {
+        return ord_text1;
     }
 
-    public void setOrdText1(String ordText1) {
-        this.ordText1 = ordText1 == null ? null : ordText1.trim();
+    public void setOrd_text1(String ord_text1) {
+        this.ord_text1 = ord_text1;
     }
 
-    public String getOrdText2() {
-        return ordText2;
+    public String getOrd_text2() {
+        return ord_text2;
     }
 
-    public void setOrdText2(String ordText2) {
-        this.ordText2 = ordText2 == null ? null : ordText2.trim();
+    public void setOrd_text2(String ord_text2) {
+        this.ord_text2 = ord_text2;
     }
 
-    public String getOrdText3() {
-        return ordText3;
+    public String getOrd_text3() {
+        return ord_text3;
     }
 
-    public void setOrdText3(String ordText3) {
-        this.ordText3 = ordText3 == null ? null : ordText3.trim();
+    public void setOrd_text3(String ord_text3) {
+        this.ord_text3 = ord_text3;
     }
 
-    public String getOrdText4() {
-        return ordText4;
+    public String getOrd_text4() {
+        return ord_text4;
     }
 
-    public void setOrdText4(String ordText4) {
-        this.ordText4 = ordText4 == null ? null : ordText4.trim();
+    public void setOrd_text4(String ord_text4) {
+        this.ord_text4 = ord_text4;
     }
 
-    public String getOrdText5() {
-        return ordText5;
+    public String getOrd_text5() {
+        return ord_text5;
     }
 
-    public void setOrdText5(String ordText5) {
-        this.ordText5 = ordText5 == null ? null : ordText5.trim();
+    public void setOrd_text5(String ord_text5) {
+        this.ord_text5 = ord_text5;
     }
 }

+ 104 - 129
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othspendings.java

@@ -1,198 +1,173 @@
 package com.usoftchina.saas.money.po;
 
-import java.util.Date;
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
 
-public class Othspendings {
-    private Integer osId;
+import java.io.Serializable;
+import java.util.Date;
 
-    private String osCode;
+public class Othspendings extends CommonBaseEntity implements Serializable {
 
-    private Date osDate;
+    private String os_code;
 
-    private Integer osVendid;
+    private Date os_date;
 
-    private String osVendcode;
+    private Integer os_vendid;
 
-    private String osVendname;
+    private String os_vendcode;
 
-    private Integer osBankid;
+    private String os_vendname;
 
-    private String osBankcode;
+    private Integer os_bankid;
 
-    private String osBankname;
+    private String os_bankcode;
 
-    private Double osAmount;
+    private String os_bankname;
 
-    private Integer osRecorderid;
+    private Double os_amount;
 
-    private String osRecorder;
+    private Integer os_recorderid;
 
-    private Date osRecorddate;
+    private String os_recorder;
 
-    private String osStatus;
+    private Date os_recorddate;
 
-    private String osStatuscode;
+    private String os_status;
 
-    private String osRemark;
+    private String os_statuscode;
 
-    private Integer companyid;
+    private String os_remark;
 
-    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;
-    }
+    private String os_text1;
 
-    public void setOsId(Integer osId) {
-        this.osId = osId;
-    }
+    private String os_text2;
 
-    public String getOsCode() {
-        return osCode;
-    }
+    private String os_text3;
 
-    public void setOsCode(String osCode) {
-        this.osCode = osCode == null ? null : osCode.trim();
-    }
+    private String os_text4;
 
-    public Date getOsDate() {
-        return osDate;
-    }
-
-    public void setOsDate(Date osDate) {
-        this.osDate = osDate;
-    }
+    private String os_text5;
 
-    public Integer getOsVendid() {
-        return osVendid;
+    public String getOs_code() {
+        return os_code;
     }
 
-    public void setOsVendid(Integer osVendid) {
-        this.osVendid = osVendid;
+    public void setOs_code(String os_code) {
+        this.os_code = os_code;
     }
 
-    public String getOsVendcode() {
-        return osVendcode;
+    public Date getOs_date() {
+        return os_date;
     }
 
-    public void setOsVendcode(String osVendcode) {
-        this.osVendcode = osVendcode == null ? null : osVendcode.trim();
+    public void setOs_date(Date os_date) {
+        this.os_date = os_date;
     }
 
-    public String getOsVendname() {
-        return osVendname;
+    public Integer getOs_vendid() {
+        return os_vendid;
     }
 
-    public void setOsVendname(String osVendname) {
-        this.osVendname = osVendname == null ? null : osVendname.trim();
+    public void setOs_vendid(Integer os_vendid) {
+        this.os_vendid = os_vendid;
     }
 
-    public Integer getOsBankid() {
-        return osBankid;
+    public String getOs_vendcode() {
+        return os_vendcode;
     }
 
-    public void setOsBankid(Integer osBankid) {
-        this.osBankid = osBankid;
+    public void setOs_vendcode(String os_vendcode) {
+        this.os_vendcode = os_vendcode;
     }
 
-    public String getOsBankcode() {
-        return osBankcode;
+    public String getOs_vendname() {
+        return os_vendname;
     }
 
-    public void setOsBankcode(String osBankcode) {
-        this.osBankcode = osBankcode == null ? null : osBankcode.trim();
+    public void setOs_vendname(String os_vendname) {
+        this.os_vendname = os_vendname;
     }
 
-    public String getOsBankname() {
-        return osBankname;
+    public Integer getOs_bankid() {
+        return os_bankid;
     }
 
-    public void setOsBankname(String osBankname) {
-        this.osBankname = osBankname == null ? null : osBankname.trim();
+    public void setOs_bankid(Integer os_bankid) {
+        this.os_bankid = os_bankid;
     }
 
-    public Double getOsAmount() {
-        return osAmount;
+    public String getOs_bankcode() {
+        return os_bankcode;
     }
 
-    public void setOsAmount(Double osAmount) {
-        this.osAmount = osAmount;
+    public void setOs_bankcode(String os_bankcode) {
+        this.os_bankcode = os_bankcode;
     }
 
-    public Integer getOsRecorderid() {
-        return osRecorderid;
+    public String getOs_bankname() {
+        return os_bankname;
     }
 
-    public void setOsRecorderid(Integer osRecorderid) {
-        this.osRecorderid = osRecorderid;
+    public void setOs_bankname(String os_bankname) {
+        this.os_bankname = os_bankname;
     }
 
-    public String getOsRecorder() {
-        return osRecorder;
+    public Double getOs_amount() {
+        return os_amount;
     }
 
-    public void setOsRecorder(String osRecorder) {
-        this.osRecorder = osRecorder == null ? null : osRecorder.trim();
+    public void setOs_amount(Double os_amount) {
+        this.os_amount = os_amount;
     }
 
-    public Date getOsRecorddate() {
-        return osRecorddate;
+    public Integer getOs_recorderid() {
+        return os_recorderid;
     }
 
-    public void setOsRecorddate(Date osRecorddate) {
-        this.osRecorddate = osRecorddate;
+    public void setOs_recorderid(Integer os_recorderid) {
+        this.os_recorderid = os_recorderid;
     }
 
-    public String getOsStatus() {
-        return osStatus;
+    public String getOs_recorder() {
+        return os_recorder;
     }
 
-    public void setOsStatus(String osStatus) {
-        this.osStatus = osStatus;
+    public void setOs_recorder(String os_recorder) {
+        this.os_recorder = os_recorder;
     }
 
-    public String getOsStatuscode() {
-        return osStatuscode;
+    public Date getOs_recorddate() {
+        return os_recorddate;
     }
 
-    public void setOsStatuscode(String osStatuscode) {
-        this.osStatuscode = osStatuscode;
+    public void setOs_recorddate(Date os_recorddate) {
+        this.os_recorddate = os_recorddate;
     }
 
-    public String getOsRemark() {
-        return osRemark;
+    public String getOs_status() {
+        return os_status;
     }
 
-    public void setOsRemark(String osRemark) {
-        this.osRemark = osRemark == null ? null : osRemark.trim();
+    public void setOs_status(String os_status) {
+        this.os_status = os_status;
     }
 
-    public Integer getCompanyid() {
-        return companyid;
+    public String getOs_statuscode() {
+        return os_statuscode;
     }
 
-    public void setCompanyid(Integer companyid) {
-        this.companyid = companyid;
+    public void setOs_statuscode(String os_statuscode) {
+        this.os_statuscode = os_statuscode;
     }
 
-    public Integer getUpdaterid() {
-        return updaterid;
+    public String getOs_remark() {
+        return os_remark;
     }
 
-    public void setUpdaterid(Integer updaterid) {
-        this.updaterid = updaterid;
+    public void setOs_remark(String os_remark) {
+        this.os_remark = os_remark;
     }
 
     public Date getUpdatedate() {
@@ -203,43 +178,43 @@ public class Othspendings {
         this.updatedate = updatedate;
     }
 
-    public String getOsText1() {
-        return osText1;
+    public String getOs_text1() {
+        return os_text1;
     }
 
-    public void setOsText1(String osText1) {
-        this.osText1 = osText1 == null ? null : osText1.trim();
+    public void setOs_text1(String os_text1) {
+        this.os_text1 = os_text1;
     }
 
-    public String getOsText2() {
-        return osText2;
+    public String getOs_text2() {
+        return os_text2;
     }
 
-    public void setOsText2(String osText2) {
-        this.osText2 = osText2 == null ? null : osText2.trim();
+    public void setOs_text2(String os_text2) {
+        this.os_text2 = os_text2;
     }
 
-    public String getOsText3() {
-        return osText3;
+    public String getOs_text3() {
+        return os_text3;
     }
 
-    public void setOsText3(String osText3) {
-        this.osText3 = osText3 == null ? null : osText3.trim();
+    public void setOs_text3(String os_text3) {
+        this.os_text3 = os_text3;
     }
 
-    public String getOsText4() {
-        return osText4;
+    public String getOs_text4() {
+        return os_text4;
     }
 
-    public void setOsText4(String osText4) {
-        this.osText4 = osText4 == null ? null : osText4.trim();
+    public void setOs_text4(String os_text4) {
+        this.os_text4 = os_text4;
     }
 
-    public String getOsText5() {
-        return osText5;
+    public String getOs_text5() {
+        return os_text5;
     }
 
-    public void setOsText5(String osText5) {
-        this.osText5 = osText5 == null ? null : osText5.trim();
+    public void setOs_text5(String os_text5) {
+        this.os_text5 = os_text5;
     }
 }

+ 59 - 85
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othspendingsdetail.java

@@ -1,108 +1,82 @@
 package com.usoftchina.saas.money.po;
 
-import java.util.Date;
-
-public class Othspendingsdetail {
-    private Integer osdId;
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
 
-    private Integer osdOrid;
+import java.io.Serializable;
+import java.util.Date;
 
-    private Integer osdDetno;
+public class Othspendingsdetail extends CommonBaseEntity implements Serializable {
 
-    private Integer osdYm;
+    private Integer osd_orid;
 
-    private String osdType;
+    private Integer osd_detno;
 
-    private Double osdNowbalance;
+    private Integer osd_ym;
 
-    private String osdRemark;
+    private String osd_type;
 
-    private Integer companyid;
+    private Double osd_nowbalance;
 
-    private Integer updaterid;
+    private String osd_remark;
 
     private Date updatedate;
 
-    private String osdText1;
-
-    private String osdText2;
+    private String osd_text1;
 
-    private String osdText3;
+    private String osd_text2;
 
-    private String osdText4;
+    private String osd_text3;
 
-    private String osdText5;
-
-    public Integer getOsdId() {
-        return osdId;
-    }
-
-    public void setOsdId(Integer osdId) {
-        this.osdId = osdId;
-    }
+    private String osd_text4;
 
-    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;
-    }
+    private String osd_text5;
 
-    public Integer getOsdYm() {
-        return osdYm;
+    public Integer getOsd_orid() {
+        return osd_orid;
     }
 
-    public void setOsdYm(Integer osdYm) {
-        this.osdYm = osdYm;
+    public void setOsd_orid(Integer osd_orid) {
+        this.osd_orid = osd_orid;
     }
 
-    public String getOsdType() {
-        return osdType;
+    public Integer getOsd_detno() {
+        return osd_detno;
     }
 
-    public void setOsdType(String osdType) {
-        this.osdType = osdType == null ? null : osdType.trim();
+    public void setOsd_detno(Integer osd_detno) {
+        this.osd_detno = osd_detno;
     }
 
-    public Double getOsdNowbalance() {
-        return osdNowbalance;
+    public Integer getOsd_ym() {
+        return osd_ym;
     }
 
-    public void setOsdNowbalance(Double osdNowbalance) {
-        this.osdNowbalance = osdNowbalance;
+    public void setOsd_ym(Integer osd_ym) {
+        this.osd_ym = osd_ym;
     }
 
-    public String getOsdRemark() {
-        return osdRemark;
+    public String getOsd_type() {
+        return osd_type;
     }
 
-    public void setOsdRemark(String osdRemark) {
-        this.osdRemark = osdRemark == null ? null : osdRemark.trim();
+    public void setOsd_type(String osd_type) {
+        this.osd_type = osd_type;
     }
 
-    public Integer getCompanyid() {
-        return companyid;
+    public Double getOsd_nowbalance() {
+        return osd_nowbalance;
     }
 
-    public void setCompanyid(Integer companyid) {
-        this.companyid = companyid;
+    public void setOsd_nowbalance(Double osd_nowbalance) {
+        this.osd_nowbalance = osd_nowbalance;
     }
 
-    public Integer getUpdaterid() {
-        return updaterid;
+    public String getOsd_remark() {
+        return osd_remark;
     }
 
-    public void setUpdaterid(Integer updaterid) {
-        this.updaterid = updaterid;
+    public void setOsd_remark(String osd_remark) {
+        this.osd_remark = osd_remark;
     }
 
     public Date getUpdatedate() {
@@ -113,43 +87,43 @@ public class Othspendingsdetail {
         this.updatedate = updatedate;
     }
 
-    public String getOsdText1() {
-        return osdText1;
+    public String getOsd_text1() {
+        return osd_text1;
     }
 
-    public void setOsdText1(String osdText1) {
-        this.osdText1 = osdText1 == null ? null : osdText1.trim();
+    public void setOsd_text1(String osd_text1) {
+        this.osd_text1 = osd_text1;
     }
 
-    public String getOsdText2() {
-        return osdText2;
+    public String getOsd_text2() {
+        return osd_text2;
     }
 
-    public void setOsdText2(String osdText2) {
-        this.osdText2 = osdText2 == null ? null : osdText2.trim();
+    public void setOsd_text2(String osd_text2) {
+        this.osd_text2 = osd_text2;
     }
 
-    public String getOsdText3() {
-        return osdText3;
+    public String getOsd_text3() {
+        return osd_text3;
     }
 
-    public void setOsdText3(String osdText3) {
-        this.osdText3 = osdText3 == null ? null : osdText3.trim();
+    public void setOsd_text3(String osd_text3) {
+        this.osd_text3 = osd_text3;
     }
 
-    public String getOsdText4() {
-        return osdText4;
+    public String getOsd_text4() {
+        return osd_text4;
     }
 
-    public void setOsdText4(String osdText4) {
-        this.osdText4 = osdText4 == null ? null : osdText4.trim();
+    public void setOsd_text4(String osd_text4) {
+        this.osd_text4 = osd_text4;
     }
 
-    public String getOsdText5() {
-        return osdText5;
+    public String getOsd_text5() {
+        return osd_text5;
     }
 
-    public void setOsdText5(String osdText5) {
-        this.osdText5 = osdText5 == null ? null : osdText5.trim();
+    public void setOsd_text5(String osd_text5) {
+        this.osd_text5 = osd_text5;
     }
 }

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

@@ -13,7 +13,6 @@ import java.util.Date;
  */
 @Data
 public class Paybalance extends CommonBaseEntity implements Serializable {
-    private Integer pb_id;
 
     private String pb_code;
 
@@ -50,6 +49,7 @@ public class Paybalance extends CommonBaseEntity implements Serializable {
     private String pb_statuscode;
 
     private String pb_remark;
+    private Date updatedate;
 
     private String pb_text1;
 
@@ -61,12 +61,12 @@ public class Paybalance extends CommonBaseEntity implements Serializable {
 
     private String pb_text5;
 
-    public Integer getPb_id() {
-        return pb_id;
+    public Date getUpdatedate() {
+        return updatedate;
     }
 
-    public void setPb_id(Integer pb_id) {
-        this.pb_id = pb_id;
+    public void setUpdatedate(Date updatedate) {
+        this.updatedate = updatedate;
     }
 
     public String getPb_code() {

+ 75 - 123
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Paybalancedet.java

@@ -6,146 +6,117 @@ import java.io.Serializable;
 import java.util.Date;
 
 public class Paybalancedet extends CommonBaseEntity implements Serializable {
-    private Integer pdId;
 
-    private Integer pdRbid;
+    private Integer pd_rbid;
 
-    private Integer pdDetno;
+    private Integer pd_detno;
 
-    private Integer pdYm;
+    private Integer pd_ym;
 
-    private Integer pdBankid;
+    private Integer pd_bankid;
 
-    private String pdBankcode;
+    private String pd_bankcode;
 
-    private String pdBankname;
+    private String pd_bankname;
 
-    private Double pdAmount;
+    private Double pd_amount;
 
-    private String pdPaymethod;
+    private String pd_paymethod;
 
-    private String pdPaycode;
+    private String pd_paycode;
 
-    private String pdRemark;
-
-    private Integer companyid;
-
-    private Integer updaterid;
+    private String pd_remark;
 
     private Date updatedate;
 
-    private String pdText1;
-
-    private String pdText2;
-
-    private String pdText3;
-
-    private String pdText4;
-
-    private String pdText5;
+    private String pd_text1;
 
-    public Integer getPdId() {
-        return pdId;
-    }
-
-    public void setPdId(Integer pdId) {
-        this.pdId = pdId;
-    }
+    private String pd_text2;
 
-    public Integer getPdRbid() {
-        return pdRbid;
-    }
-
-    public void setPdRbid(Integer pdRbid) {
-        this.pdRbid = pdRbid;
-    }
+    private String pd_text3;
 
-    public Integer getPdDetno() {
-        return pdDetno;
-    }
+    private String pd_text4;
 
-    public void setPdDetno(Integer pdDetno) {
-        this.pdDetno = pdDetno;
-    }
+    private String pd_text5;
 
-    public Integer getPdYm() {
-        return pdYm;
+    public Integer getPd_rbid() {
+        return pd_rbid;
     }
 
-    public void setPdYm(Integer pdYm) {
-        this.pdYm = pdYm;
+    public void setPd_rbid(Integer pd_rbid) {
+        this.pd_rbid = pd_rbid;
     }
 
-    public Integer getPdBankid() {
-        return pdBankid;
+    public Integer getPd_detno() {
+        return pd_detno;
     }
 
-    public void setPdBankid(Integer pdBankid) {
-        this.pdBankid = pdBankid;
+    public void setPd_detno(Integer pd_detno) {
+        this.pd_detno = pd_detno;
     }
 
-    public String getPdBankcode() {
-        return pdBankcode;
+    public Integer getPd_ym() {
+        return pd_ym;
     }
 
-    public void setPdBankcode(String pdBankcode) {
-        this.pdBankcode = pdBankcode == null ? null : pdBankcode.trim();
+    public void setPd_ym(Integer pd_ym) {
+        this.pd_ym = pd_ym;
     }
 
-    public String getPdBankname() {
-        return pdBankname;
+    public Integer getPd_bankid() {
+        return pd_bankid;
     }
 
-    public void setPdBankname(String pdBankname) {
-        this.pdBankname = pdBankname == null ? null : pdBankname.trim();
+    public void setPd_bankid(Integer pd_bankid) {
+        this.pd_bankid = pd_bankid;
     }
 
-    public Double getPdAmount() {
-        return pdAmount;
+    public String getPd_bankcode() {
+        return pd_bankcode;
     }
 
-    public void setPdAmount(Double pdAmount) {
-        this.pdAmount = pdAmount;
+    public void setPd_bankcode(String pd_bankcode) {
+        this.pd_bankcode = pd_bankcode;
     }
 
-    public String getPdPaymethod() {
-        return pdPaymethod;
+    public String getPd_bankname() {
+        return pd_bankname;
     }
 
-    public void setPdPaymethod(String pdPaymethod) {
-        this.pdPaymethod = pdPaymethod == null ? null : pdPaymethod.trim();
+    public void setPd_bankname(String pd_bankname) {
+        this.pd_bankname = pd_bankname;
     }
 
-    public String getPdPaycode() {
-        return pdPaycode;
+    public Double getPd_amount() {
+        return pd_amount;
     }
 
-    public void setPdPaycode(String pdPaycode) {
-        this.pdPaycode = pdPaycode == null ? null : pdPaycode.trim();
+    public void setPd_amount(Double pd_amount) {
+        this.pd_amount = pd_amount;
     }
 
-    public String getPdRemark() {
-        return pdRemark;
+    public String getPd_paymethod() {
+        return pd_paymethod;
     }
 
-    public void setPdRemark(String pdRemark) {
-        this.pdRemark = pdRemark == null ? null : pdRemark.trim();
+    public void setPd_paymethod(String pd_paymethod) {
+        this.pd_paymethod = pd_paymethod;
     }
 
-    public Integer getCompanyid() {
-        return companyid;
+    public String getPd_paycode() {
+        return pd_paycode;
     }
 
-    public void setCompanyid(Integer companyid) {
-        this.companyid = companyid;
+    public void setPd_paycode(String pd_paycode) {
+        this.pd_paycode = pd_paycode;
     }
 
-    public Integer getUpdaterid() {
-        return updaterid;
+    public String getPd_remark() {
+        return pd_remark;
     }
 
-    public void setUpdaterid(Integer updaterid) {
-        this.updaterid = updaterid;
+    public void setPd_remark(String pd_remark) {
+        this.pd_remark = pd_remark;
     }
 
     public Date getUpdatedate() {
@@ -156,62 +127,43 @@ public class Paybalancedet extends CommonBaseEntity implements Serializable {
         this.updatedate = updatedate;
     }
 
-    public String getPdText1() {
-        return pdText1;
-    }
-
-    public void setPdText1(String pdText1) {
-        this.pdText1 = pdText1 == null ? null : pdText1.trim();
-    }
-
-    public String getPdText2() {
-        return pdText2;
+    public String getPd_text1() {
+        return pd_text1;
     }
 
-    public void setPdText2(String pdText2) {
-        this.pdText2 = pdText2 == null ? null : pdText2.trim();
+    public void setPd_text1(String pd_text1) {
+        this.pd_text1 = pd_text1;
     }
 
-    public String getPdText3() {
-        return pdText3;
+    public String getPd_text2() {
+        return pd_text2;
     }
 
-    public void setPdText3(String pdText3) {
-        this.pdText3 = pdText3 == null ? null : pdText3.trim();
+    public void setPd_text2(String pd_text2) {
+        this.pd_text2 = pd_text2;
     }
 
-    public String getPdText4() {
-        return pdText4;
+    public String getPd_text3() {
+        return pd_text3;
     }
 
-    public void setPdText4(String pdText4) {
-        this.pdText4 = pdText4 == null ? null : pdText4.trim();
+    public void setPd_text3(String pd_text3) {
+        this.pd_text3 = pd_text3;
     }
 
-    public String getPdText5() {
-        return pdText5;
+    public String getPd_text4() {
+        return pd_text4;
     }
 
-    public void setPdText5(String pdText5) {
-        this.pdText5 = pdText5 == null ? null : pdText5.trim();
+    public void setPd_text4(String pd_text4) {
+        this.pd_text4 = pd_text4;
     }
-    @Override
-    public void setCreatorId(long creatorId) {
 
+    public String getPd_text5() {
+        return pd_text5;
     }
 
-    @Override
-    public void setUpdaterId(long updaterId) {
-
-    }
-
-    @Override
-    public long getCompanyId() {
-        return 0;
-    }
-
-    @Override
-    public void setCompanyId(long companyId) {
-
+    public void setPd_text5(String pd_text5) {
+        this.pd_text5 = pd_text5;
     }
 }

+ 75 - 123
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Paybalancedetail.java

@@ -6,146 +6,117 @@ import java.io.Serializable;
 import java.util.Date;
 
 public class Paybalancedetail extends CommonBaseEntity implements Serializable {
-    private Integer pbdId;
 
-    private Integer pbdPbid;
+    private Integer pbd_pbid;
 
-    private Integer pbdDetno;
+    private Integer pbd_detno;
 
-    private Integer pbdYm;
+    private Integer pbd_ym;
 
-    private Integer pbdSild;
+    private Integer pbd_sild;
 
-    private String pbdSlcode;
+    private String pbd_slcode;
 
-    private String pbdSlkind;
+    private String pbd_slkind;
 
-    private Date pbdSldate;
+    private Date pbd_sldate;
 
-    private Double pbdAmount;
+    private Double pbd_amount;
 
-    private Double pbdNowbalance;
+    private Double pbd_nowbalance;
 
-    private String pbdRemark;
-
-    private Integer companyid;
-
-    private Integer updaterid;
+    private String pbd_remark;
 
     private Date updatedate;
 
-    private String pbdText1;
-
-    private String pbdText2;
-
-    private String pbdText3;
-
-    private String pbdText4;
-
-    private String pbdText5;
+    private String pbd_text1;
 
-    public Integer getPbdId() {
-        return pbdId;
-    }
-
-    public void setPbdId(Integer pbdId) {
-        this.pbdId = pbdId;
-    }
+    private String pbd_text2;
 
-    public Integer getPbdPbid() {
-        return pbdPbid;
-    }
-
-    public void setPbdPbid(Integer pbdPbid) {
-        this.pbdPbid = pbdPbid;
-    }
+    private String pbd_text3;
 
-    public Integer getPbdDetno() {
-        return pbdDetno;
-    }
+    private String pbd_text4;
 
-    public void setPbdDetno(Integer pbdDetno) {
-        this.pbdDetno = pbdDetno;
-    }
+    private String pbd_text5;
 
-    public Integer getPbdYm() {
-        return pbdYm;
+    public Integer getPbd_pbid() {
+        return pbd_pbid;
     }
 
-    public void setPbdYm(Integer pbdYm) {
-        this.pbdYm = pbdYm;
+    public void setPbd_pbid(Integer pbd_pbid) {
+        this.pbd_pbid = pbd_pbid;
     }
 
-    public Integer getPbdSild() {
-        return pbdSild;
+    public Integer getPbd_detno() {
+        return pbd_detno;
     }
 
-    public void setPbdSild(Integer pbdSild) {
-        this.pbdSild = pbdSild;
+    public void setPbd_detno(Integer pbd_detno) {
+        this.pbd_detno = pbd_detno;
     }
 
-    public String getPbdSlcode() {
-        return pbdSlcode;
+    public Integer getPbd_ym() {
+        return pbd_ym;
     }
 
-    public void setPbdSlcode(String pbdSlcode) {
-        this.pbdSlcode = pbdSlcode == null ? null : pbdSlcode.trim();
+    public void setPbd_ym(Integer pbd_ym) {
+        this.pbd_ym = pbd_ym;
     }
 
-    public String getPbdSlkind() {
-        return pbdSlkind;
+    public Integer getPbd_sild() {
+        return pbd_sild;
     }
 
-    public void setPbdSlkind(String pbdSlkind) {
-        this.pbdSlkind = pbdSlkind == null ? null : pbdSlkind.trim();
+    public void setPbd_sild(Integer pbd_sild) {
+        this.pbd_sild = pbd_sild;
     }
 
-    public Date getPbdSldate() {
-        return pbdSldate;
+    public String getPbd_slcode() {
+        return pbd_slcode;
     }
 
-    public void setPbdSldate(Date pbdSldate) {
-        this.pbdSldate = pbdSldate;
+    public void setPbd_slcode(String pbd_slcode) {
+        this.pbd_slcode = pbd_slcode;
     }
 
-    public Double getPbdAmount() {
-        return pbdAmount;
+    public String getPbd_slkind() {
+        return pbd_slkind;
     }
 
-    public void setPbdAmount(Double pbdAmount) {
-        this.pbdAmount = pbdAmount;
+    public void setPbd_slkind(String pbd_slkind) {
+        this.pbd_slkind = pbd_slkind;
     }
 
-    public Double getPbdNowbalance() {
-        return pbdNowbalance;
+    public Date getPbd_sldate() {
+        return pbd_sldate;
     }
 
-    public void setPbdNowbalance(Double pbdNowbalance) {
-        this.pbdNowbalance = pbdNowbalance;
+    public void setPbd_sldate(Date pbd_sldate) {
+        this.pbd_sldate = pbd_sldate;
     }
 
-    public String getPbdRemark() {
-        return pbdRemark;
+    public Double getPbd_amount() {
+        return pbd_amount;
     }
 
-    public void setPbdRemark(String pbdRemark) {
-        this.pbdRemark = pbdRemark == null ? null : pbdRemark.trim();
+    public void setPbd_amount(Double pbd_amount) {
+        this.pbd_amount = pbd_amount;
     }
 
-    public Integer getCompanyid() {
-        return companyid;
+    public Double getPbd_nowbalance() {
+        return pbd_nowbalance;
     }
 
-    public void setCompanyid(Integer companyid) {
-        this.companyid = companyid;
+    public void setPbd_nowbalance(Double pbd_nowbalance) {
+        this.pbd_nowbalance = pbd_nowbalance;
     }
 
-    public Integer getUpdaterid() {
-        return updaterid;
+    public String getPbd_remark() {
+        return pbd_remark;
     }
 
-    public void setUpdaterid(Integer updaterid) {
-        this.updaterid = updaterid;
+    public void setPbd_remark(String pbd_remark) {
+        this.pbd_remark = pbd_remark;
     }
 
     public Date getUpdatedate() {
@@ -156,62 +127,43 @@ public class Paybalancedetail extends CommonBaseEntity implements Serializable {
         this.updatedate = updatedate;
     }
 
-    public String getPbdText1() {
-        return pbdText1;
-    }
-
-    public void setPbdText1(String pbdText1) {
-        this.pbdText1 = pbdText1 == null ? null : pbdText1.trim();
-    }
-
-    public String getPbdText2() {
-        return pbdText2;
+    public String getPbd_text1() {
+        return pbd_text1;
     }
 
-    public void setPbdText2(String pbdText2) {
-        this.pbdText2 = pbdText2 == null ? null : pbdText2.trim();
+    public void setPbd_text1(String pbd_text1) {
+        this.pbd_text1 = pbd_text1;
     }
 
-    public String getPbdText3() {
-        return pbdText3;
+    public String getPbd_text2() {
+        return pbd_text2;
     }
 
-    public void setPbdText3(String pbdText3) {
-        this.pbdText3 = pbdText3 == null ? null : pbdText3.trim();
+    public void setPbd_text2(String pbd_text2) {
+        this.pbd_text2 = pbd_text2;
     }
 
-    public String getPbdText4() {
-        return pbdText4;
+    public String getPbd_text3() {
+        return pbd_text3;
     }
 
-    public void setPbdText4(String pbdText4) {
-        this.pbdText4 = pbdText4 == null ? null : pbdText4.trim();
+    public void setPbd_text3(String pbd_text3) {
+        this.pbd_text3 = pbd_text3;
     }
 
-    public String getPbdText5() {
-        return pbdText5;
+    public String getPbd_text4() {
+        return pbd_text4;
     }
 
-    public void setPbdText5(String pbdText5) {
-        this.pbdText5 = pbdText5 == null ? null : pbdText5.trim();
+    public void setPbd_text4(String pbd_text4) {
+        this.pbd_text4 = pbd_text4;
     }
-    @Override
-    public void setCreatorId(long creatorId) {
 
+    public String getPbd_text5() {
+        return pbd_text5;
     }
 
-    @Override
-    public void setUpdaterId(long updaterId) {
-
-    }
-
-    @Override
-    public long getCompanyId() {
-        return 0;
-    }
-
-    @Override
-    public void setCompanyId(long companyId) {
-
+    public void setPbd_text5(String pbd_text5) {
+        this.pbd_text5 = pbd_text5;
     }
 }

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

@@ -12,7 +12,6 @@ import java.util.Date;
  */
 @Data
 public class Recbalance extends CommonBaseEntity implements Serializable {
-    private Integer rb_id;
 
     private String rb_code;
 
@@ -50,6 +49,8 @@ public class Recbalance extends CommonBaseEntity implements Serializable {
 
     private String rb_remark;
 
+    private Date updatedate;
+
     private String rb_text1;
 
     private String rb_text2;
@@ -60,12 +61,12 @@ public class Recbalance extends CommonBaseEntity implements Serializable {
 
     private String rb_text5;
 
-    public Integer getRb_id() {
-        return rb_id;
+    public Date getUpdatedate() {
+        return updatedate;
     }
 
-    public void setRb_id(Integer rb_id) {
-        this.rb_id = rb_id;
+    public void setUpdatedate(Date updatedate) {
+        this.updatedate = updatedate;
     }
 
     public String getRb_code() {

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

@@ -12,7 +12,6 @@ import java.util.Date;
  */
 @Data
 public class Recbalancedet extends CommonBaseEntity implements Serializable{
-    private Integer rd_id;
 
     private Integer rd_rbid;
 
@@ -34,6 +33,8 @@ public class Recbalancedet extends CommonBaseEntity implements Serializable{
 
     private String rd_remark;
 
+    private Date updatedate;
+
     private String rd_text1;
 
     private String rd_text2;
@@ -44,12 +45,12 @@ public class Recbalancedet extends CommonBaseEntity implements Serializable{
 
     private String rd_text5;
 
-    public Integer getRd_id() {
-        return rd_id;
+    public Date getUpdatedate() {
+        return updatedate;
     }
 
-    public void setRd_id(Integer rd_id) {
-        this.rd_id = rd_id;
+    public void setUpdatedate(Date updatedate) {
+        this.updatedate = updatedate;
     }
 
     public Integer getRd_rbid() {

+ 104 - 122
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalancedetail.java

@@ -6,209 +6,191 @@ import java.io.Serializable;
 import java.util.Date;
 
 public class Recbalancedetail extends CommonBaseEntity implements Serializable {
-    private Integer rbdId;
 
-    private Integer rbdRbid;
+    private Integer rbd_rbid;
 
-    private Integer rbdDetno;
+    private Integer rbd_detno;
 
-    private Integer rbdYm;
+    private Integer rbd_ym;
 
-    private Integer rbdSlid;
+    private Integer rbd_slid;
 
-    private String rbdSlcode;
+    private String rbd_slcode;
 
-    private String rbdSlkind;
+    private String rbd_slkind;
 
-    private Date rbdSldate;
+    private Date rbd_sldate;
 
-    private Double rbdAmount;
+    private Double rbd_amount;
 
-    private Double rbdNowbalance;
-
-    private String rbdRemark;
-
-    private Integer companyId;
-
-    private Integer updaterid;
+    private Double rbd_nowbalance;
 
+    private String rbd_remark;
     private Date updatedate;
 
-    private String rbdText1;
+    private String rbd_text1;
 
-    private String rbdText2;
+    private String rbd_text2;
 
-    private String rbdText3;
+    private String rbd_text3;
 
-    private String rbdText4;
+    private String rbd_text4;
 
-    private String rbdText5;
-
-    public Integer getRbdId() {
-        return rbdId;
-    }
-
-    public void setRbdId(Integer rbdId) {
-        this.rbdId = rbdId;
-    }
-
-    public Integer getRbdRbid() {
-        return rbdRbid;
-    }
+    private String rbd_text5;
 
-    public void setRbdRbid(Integer rbdRbid) {
-        this.rbdRbid = rbdRbid;
+    public Integer getRbd_rbid() {
+        return rbd_rbid;
     }
 
-    public Integer getRbdDetno() {
-        return rbdDetno;
+    public void setRbd_rbid(Integer rbd_rbid) {
+        this.rbd_rbid = rbd_rbid;
     }
 
-    public void setRbdDetno(Integer rbdDetno) {
-        this.rbdDetno = rbdDetno;
+    public Integer getRbd_detno() {
+        return rbd_detno;
     }
 
-    public Integer getRbdYm() {
-        return rbdYm;
+    public void setRbd_detno(Integer rbd_detno) {
+        this.rbd_detno = rbd_detno;
     }
 
-    public void setRbdYm(Integer rbdYm) {
-        this.rbdYm = rbdYm;
+    public Integer getRbd_ym() {
+        return rbd_ym;
     }
 
-    public Integer getRbdSlid() {
-        return rbdSlid;
+    public void setRbd_ym(Integer rbd_ym) {
+        this.rbd_ym = rbd_ym;
     }
 
-    public void setRbdSlid(Integer rbdSlid) {
-        this.rbdSlid = rbdSlid;
+    public Integer getRbd_slid() {
+        return rbd_slid;
     }
 
-    public String getRbdSlcode() {
-        return rbdSlcode;
+    public void setRbd_slid(Integer rbd_slid) {
+        this.rbd_slid = rbd_slid;
     }
 
-    public void setRbdSlcode(String rbdSlcode) {
-        this.rbdSlcode = rbdSlcode == null ? null : rbdSlcode.trim();
+    public String getRbd_slcode() {
+        return rbd_slcode;
     }
 
-    public String getRbdSlkind() {
-        return rbdSlkind;
+    public void setRbd_slcode(String rbd_slcode) {
+        this.rbd_slcode = rbd_slcode;
     }
 
-    public void setRbdSlkind(String rbdSlkind) {
-        this.rbdSlkind = rbdSlkind == null ? null : rbdSlkind.trim();
+    public String getRbd_slkind() {
+        return rbd_slkind;
     }
 
-    public Date getRbdSldate() {
-        return rbdSldate;
+    public void setRbd_slkind(String rbd_slkind) {
+        this.rbd_slkind = rbd_slkind;
     }
 
-    public void setRbdSldate(Date rbdSldate) {
-        this.rbdSldate = rbdSldate;
+    public Date getRbd_sldate() {
+        return rbd_sldate;
     }
 
-    public Double getRbdAmount() {
-        return rbdAmount;
+    public void setRbd_sldate(Date rbd_sldate) {
+        this.rbd_sldate = rbd_sldate;
     }
 
-    public void setRbdAmount(Double rbdAmount) {
-        this.rbdAmount = rbdAmount;
+    public Double getRbd_amount() {
+        return rbd_amount;
     }
 
-    public Double getRbdNowbalance() {
-        return rbdNowbalance;
+    public void setRbd_amount(Double rbd_amount) {
+        this.rbd_amount = rbd_amount;
     }
 
-    public void setRbdNowbalance(Double rbdNowbalance) {
-        this.rbdNowbalance = rbdNowbalance;
+    public Double getRbd_nowbalance() {
+        return rbd_nowbalance;
     }
 
-    public String getRbdRemark() {
-        return rbdRemark;
+    public void setRbd_nowbalance(Double rbd_nowbalance) {
+        this.rbd_nowbalance = rbd_nowbalance;
     }
 
-    public void setRbdRemark(String rbdRemark) {
-        this.rbdRemark = rbdRemark == null ? null : rbdRemark.trim();
+    public String getRbd_remark() {
+        return rbd_remark;
     }
 
-    public void setCompanyId(Integer companyId) {
-        this.companyId = companyId;
+    public void setRbd_remark(String rbd_remark) {
+        this.rbd_remark = rbd_remark;
     }
 
-    public Integer getUpdaterid() {
-        return updaterid;
+    public String getRbd_text1() {
+        return rbd_text1;
     }
 
-    public void setUpdaterid(Integer updaterid) {
-        this.updaterid = updaterid;
-    }
-
-    public Date getUpdatedate() {
-        return updatedate;
-    }
-
-    public void setUpdatedate(Date updatedate) {
-        this.updatedate = updatedate;
+    public void setRbd_text1(String rbd_text1) {
+        this.rbd_text1 = rbd_text1;
     }
 
-    public String getRbdText1() {
-        return rbdText1;
+    public String getRbd_text2() {
+        return rbd_text2;
     }
 
-    public void setRbdText1(String rbdText1) {
-        this.rbdText1 = rbdText1 == null ? null : rbdText1.trim();
+    public void setRbd_text2(String rbd_text2) {
+        this.rbd_text2 = rbd_text2;
     }
 
-    public String getRbdText2() {
-        return rbdText2;
+    public String getRbd_text3() {
+        return rbd_text3;
     }
 
-    public void setRbdText2(String rbdText2) {
-        this.rbdText2 = rbdText2 == null ? null : rbdText2.trim();
+    public void setRbd_text3(String rbd_text3) {
+        this.rbd_text3 = rbd_text3;
     }
 
-    public String getRbdText3() {
-        return rbdText3;
+    public String getRbd_text4() {
+        return rbd_text4;
     }
 
-    public void setRbdText3(String rbdText3) {
-        this.rbdText3 = rbdText3 == null ? null : rbdText3.trim();
+    public void setRbd_text4(String rbd_text4) {
+        this.rbd_text4 = rbd_text4;
     }
 
-    public String getRbdText4() {
-        return rbdText4;
+    public String getRbd_text5() {
+        return rbd_text5;
     }
 
-    public void setRbdText4(String rbdText4) {
-        this.rbdText4 = rbdText4 == null ? null : rbdText4.trim();
+    public void setRbd_text5(String rbd_text5) {
+        this.rbd_text5 = rbd_text5;
     }
 
-    public String getRbdText5() {
-        return rbdText5;
-    }
-
-    public void setRbdText5(String rbdText5) {
-        this.rbdText5 = rbdText5 == null ? null : rbdText5.trim();
-    }
-
-    @Override
-    public void setCreatorId(long creatorId) {
-
-    }
-
-    @Override
-    public void setUpdaterId(long updaterId) {
-
+    public Date getUpdatedate() {
+        return updatedate;
     }
 
-    @Override
-    public long getCompanyId() {
-        return 0;
+    public void setUpdatedate(Date updatedate) {
+        this.updatedate = updatedate;
     }
 
     @Override
-    public void setCompanyId(long companyId) {
-
+    public String toString() {
+        return "Recbalancedetail{" +
+                "rbd_rbid=" + rbd_rbid +
+                ", rbd_detno=" + rbd_detno +
+                ", rbd_ym=" + rbd_ym +
+                ", rbd_slid=" + rbd_slid +
+                ", rbd_slcode='" + rbd_slcode + '\'' +
+                ", rbd_slkind='" + rbd_slkind + '\'' +
+                ", rbd_sldate=" + rbd_sldate +
+                ", rbd_amount=" + rbd_amount +
+                ", rbd_nowbalance=" + rbd_nowbalance +
+                ", rbd_remark='" + rbd_remark + '\'' +
+                ", updatedate=" + updatedate +
+                ", rbd_text1='" + rbd_text1 + '\'' +
+                ", rbd_text2='" + rbd_text2 + '\'' +
+                ", rbd_text3='" + rbd_text3 + '\'' +
+                ", rbd_text4='" + rbd_text4 + '\'' +
+                ", rbd_text5='" + rbd_text5 + '\'' +
+                ", id=" + id +
+                ", companyId=" + companyId +
+                ", createTime=" + createTime +
+                ", creatorId=" + creatorId +
+                ", updateTime=" + updateTime +
+                ", updaterId=" + updaterId +
+                '}';
     }
 }

+ 7 - 5
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/OthreceiptsService.java

@@ -1,6 +1,8 @@
 package com.usoftchina.saas.money.service;
 
 import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.money.po.Othreceipts;
 import com.usoftchina.saas.money.po.Othte;
 import com.usoftchina.saas.money.po.Pay;
@@ -12,11 +14,11 @@ import com.usoftchina.saas.page.PageRequest;
  * @date 2018/10/24 17:30
  **/
 public interface OthreceiptsService {
-    int insert(Othte othte);
+    DocBaseDTO insert(Othte othte);
 
-    void audit(Othte othte);
-
-    void unAudit(int id);
+//    void audit(Othte othte);
+//
+//    void unAudit(int id);
 
     void delete(int id);
 
@@ -24,5 +26,5 @@ public interface OthreceiptsService {
 
     Othte select(int id);
 
-    PageInfo<Othreceipts> selectList(PageRequest page);
+    PageInfo<Othreceipts> selectList(PageRequest page, ListReqDTO reqDTO);
 }

+ 7 - 5
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/OthspendingsService.java

@@ -1,6 +1,8 @@
 package com.usoftchina.saas.money.service;
 
 import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.money.po.Othreceipts;
 import com.usoftchina.saas.money.po.Othsp;
 import com.usoftchina.saas.money.po.Othspendings;
@@ -13,7 +15,7 @@ import com.usoftchina.saas.page.PageRequest;
  **/
 public interface OthspendingsService {
 
-    int insert(Othsp othsp);
+    DocBaseDTO insert(Othsp othsp);
 
     void delete(int id);
 
@@ -21,9 +23,9 @@ public interface OthspendingsService {
 
     Othsp select(int id);
 
-    PageInfo<Othspendings> selectList(PageRequest page);
+    PageInfo<Othspendings> selectList(PageRequest page, ListReqDTO reqDTO);
 
-    void audit(Othsp othsp);
-
-    void unAudit(int id);
+//    void audit(Othsp othsp);
+//
+//    void unAudit(int id);
 }

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

@@ -1,6 +1,8 @@
 package com.usoftchina.saas.money.service;
 
 import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.money.po.Pay;
 import com.usoftchina.saas.money.po.Paybalance;
 import com.usoftchina.saas.page.PageRequest;
@@ -11,7 +13,7 @@ import com.usoftchina.saas.page.PageRequest;
  * @date 2018/10/22 14:25
  **/
 public interface PaybalanceService {
-    int insert(Pay pay);
+    DocBaseDTO insert(Pay pay);
 
     void audit(Pay pay);
 
@@ -23,5 +25,5 @@ public interface PaybalanceService {
 
     Pay select(int id);
 
-    PageInfo<Paybalance> selectList(PageRequest page);
+    PageInfo<Paybalance> selectList(PageRequest page, ListReqDTO reqDTO);
 }

+ 10 - 3
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/RecbalanceService.java

@@ -1,6 +1,8 @@
 package com.usoftchina.saas.money.service;
 
 import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.money.po.Rec;
 import com.usoftchina.saas.money.po.Recbalance;
 import com.usoftchina.saas.page.PageRequest;
@@ -11,7 +13,7 @@ import com.usoftchina.saas.page.PageRequest;
  * @date 2018/10/23 16:02
  **/
 public interface RecbalanceService {
-    int insert(Rec rec);
+    DocBaseDTO insert(Rec rec);
     void delect(int id);
 
     void deleteItem(int id);
@@ -19,9 +21,14 @@ public interface RecbalanceService {
     Rec select(int id);
 
 
+    void deleteItems(int id);
+
     void audit(Rec rec);
 
-    void unAudit(int id);
 
-    PageInfo<Recbalance> selectList(PageRequest page);
+    void unAudit(Long id);
+
+    PageInfo<Recbalance> selectList(PageRequest page, ListReqDTO reqDTO);
+
+
 }

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

@@ -2,7 +2,14 @@ package com.usoftchina.saas.money.service.impl;
 
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.commons.api.MaxnumberService;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.commons.exception.BizExceptionCode;
+import com.usoftchina.saas.commons.po.BillCodeSeq;
 import com.usoftchina.saas.commons.po.Status;
+import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.money.mapper.OthreceiptsMapper;
 import com.usoftchina.saas.money.mapper.OthreceiptsdetailMapper;
 import com.usoftchina.saas.money.po.*;
@@ -10,6 +17,7 @@ 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 org.springframework.util.StringUtils;
 
 import java.util.Iterator;
 import java.util.List;
@@ -25,49 +33,64 @@ public class OthreceiptsServiceImpl implements OthreceiptsService {
     private OthreceiptsMapper othreceiptsMapper;
     @Autowired
     private OthreceiptsdetailMapper othreceiptsdetailMapper;
+    @Autowired
+    private MaxnumberService maxnumberService;
 
     @Override
-    public int insert(Othte othte) {
+    public DocBaseDTO insert(Othte othte) {
         Othreceipts othreceipts = othte.getMain();
         List<Othreceiptsdetail> othreceiptsdetail = othte.getItems();
 
-        if (othreceipts.getOrId() > 0){
+        String or_code = othreceipts.getOr_code();
+
+        //编号校验
+        or_code = pushMaxnubmer(or_code, othreceipts.getId());
+        //单号赋值
+        othreceipts.setOr_code(or_code);
+
+        Long id = othreceipts.getId();
+
+        if (othreceipts.getId() > 0){
             othreceiptsMapper.updateByPrimaryKeySelective(othreceipts);
         }else {
-            othreceiptsMapper.insert(othreceipts);
+            othreceipts.setCompanyId(BaseContextHolder.getCompanyId());
+            othreceiptsMapper.insertSelective(othreceipts);
+            id = othreceipts.getId();
         }
 
         Iterator isdet = othreceiptsdetail.iterator();
         while (isdet.hasNext()){
             Othreceiptsdetail othreceiptsdetail1 = (Othreceiptsdetail) isdet.next();
-            if (othreceiptsdetail1.getOrdId() > 0 ){
+            othreceiptsdetail1.setOrd_orid(Math.toIntExact(id));
+            othreceiptsdetail1.setCompanyId(BaseContextHolder.getCompanyId());
+            if (othreceiptsdetail1.getId() > 0 ){
                 othreceiptsdetailMapper.updateByPrimaryKey(othreceiptsdetail1);
             }else {
                 othreceiptsdetailMapper.insertSelective(othreceiptsdetail1);
             }
         }
-        return 0;
+        return new DocBaseDTO(id, or_code, BillCodeSeq.OTHERIN.getCaller());
     }
 
-    @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 audit(Othte othte) {
+//        int id = Math.toIntExact(othte.getMain().getId());
+//        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.set(id);
+//        othreceipts.setOrStatus(com.usoftchina.saas.commons.po.Status.UNAUDITED.getDisplay());
+//        othreceipts.setOrStatuscode(Status.UNAUDITED.name());
+//        othreceiptsMapper.updateByPrimaryKey(othreceipts);
+//    }
 
 
     @Override
@@ -84,12 +107,12 @@ public class OthreceiptsServiceImpl implements OthreceiptsService {
     public Othte select(int id) {
         Othte othte = new Othte();
         othte.setMain(othreceiptsMapper.selectByPrimaryKey(id));
-        othte.setItems((List<Othreceiptsdetail>) othreceiptsdetailMapper.selectByPrimaryKey(id));
+        othte.setItems(othreceiptsdetailMapper.selectByPrimaryKey(id));
         return othte;
     }
 
     @Override
-    public PageInfo<Othreceipts> selectList(PageRequest page) {
+    public PageInfo<Othreceipts> selectList(PageRequest page, ListReqDTO reqDTO) {
         //设置默认分页
         if (null == page || page.getSize() == 0 || page.getNumber() == 0) {
             page = new PageRequest();
@@ -97,9 +120,44 @@ public class OthreceiptsServiceImpl implements OthreceiptsService {
             page.setSize(10);
         }
         PageHelper.startPage(page.getNumber(), page.getSize());
-        List<Othreceipts> othreceipts = othreceiptsMapper.selectList();
+        List<Othreceipts> othreceipts = this.getListByMode(reqDTO);
         //取分页信息
         PageInfo<Othreceipts> pageInfo = new PageInfo<>(othreceipts);
         return pageInfo;
     }
+
+    /**
+     * @Description: 检验获取并更新单号
+     * @Param: [code, id]
+     * @return: java.lang.String
+     * @Author: guq
+     * @Date: 2018/10/19
+     */
+    private String pushMaxnubmer(String code, Long id) {
+        if (null == code) {
+            throw new BizException(BizExceptionCode.NULL_CODE);
+        }
+        Long companyId = BaseContextHolder.getCompanyId();
+        Integer count = "0".equals(String.valueOf(id)) ? othreceiptsMapper.validateCodeWhenInsert(code, companyId) :
+                othreceiptsMapper.validateCodeWhenUpdate(code, id, companyId);
+        return maxnumberService.pushMaxnubmer(count, code, BillCodeSeq.OTHRECEIPTS.getCaller()).getData();
+    }
+
+    private List<Othreceipts> getListByMode(ListReqDTO req) {
+        List<Othreceipts> othreceiptsList = null;
+        Long companyId = BaseContextHolder.getCompanyId();
+        if (StringUtils.isEmpty(req)) {
+            return  null;
+        }
+        String con = req.getFinalCondition();
+        if (null == con) {
+            con = "1=1";
+        }
+        if (StringUtils.isEmpty(req.getMode()) || "MAIN".equals(req.getMode())) {
+            othreceiptsList = othreceiptsMapper.selectOthreceiptsBycondition(con, companyId);
+        } else {
+            othreceiptsList = othreceiptsMapper.selectOthreceiptsListByCondition(con, companyId);
+        }
+        return othreceiptsList;
+    }
 }

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

@@ -2,7 +2,14 @@ package com.usoftchina.saas.money.service.impl;
 
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.commons.api.MaxnumberService;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.commons.exception.BizExceptionCode;
+import com.usoftchina.saas.commons.po.BillCodeSeq;
 import com.usoftchina.saas.commons.po.Status;
+import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.money.mapper.OthreceiptsMapper;
 import com.usoftchina.saas.money.mapper.OthreceiptsdetailMapper;
 import com.usoftchina.saas.money.mapper.OthspendingsMapper;
@@ -12,6 +19,7 @@ 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 org.springframework.util.StringUtils;
 
 import java.util.Iterator;
 import java.util.List;
@@ -26,13 +34,25 @@ public class OthspendingsServiceImpl implements OthspendingsService {
     private OthspendingsMapper othspendingsMapper;
     @Autowired
     private OthspendingsdetailMapper othspendingsdetailMapper;
+    @Autowired
+    private MaxnumberService maxnumberService;
 
     @Override
-    public int insert(Othsp othsp) {
+    public DocBaseDTO insert(Othsp othsp) {
         Othspendings othspendings = othsp.getMain();
         List<Othspendingsdetail> othspendingsdetails = othsp.getItems();
 
-        if (othspendings.getOsId() > 0){
+        String os_code = othspendings.getOs_code();
+
+        //编号校验
+        os_code = pushMaxnubmer(os_code, othspendings.getId());
+        //单号赋值
+        othspendings.setOs_code(os_code);
+
+        Long id = othspendings.getId();
+
+
+        if (othspendings.getId() > 0){
             othspendingsMapper.updateByPrimaryKeySelective(othspendings);
         }else {
             othspendingsMapper.insert(othspendings);
@@ -41,13 +61,13 @@ public class OthspendingsServiceImpl implements OthspendingsService {
         Iterator isdet = othspendingsdetails.iterator();
         while (isdet.hasNext()){
             Othspendingsdetail othspendingsdetail = (Othspendingsdetail) isdet.next();
-            if (othspendingsdetail.getOsdId() > 0 ){
+            if (othspendingsdetail.getOsd_orid() > 0 ){
                 othspendingsdetailMapper.updateByPrimaryKey(othspendingsdetail);
             }else {
                 othspendingsdetailMapper.insertSelective(othspendingsdetail);
             }
         }
-        return 0;
+        return new DocBaseDTO(id, os_code, BillCodeSeq.OTHSPENDINGS.getCaller());
     }
 
     @Override
@@ -65,12 +85,12 @@ public class OthspendingsServiceImpl implements OthspendingsService {
     public Othsp select(int id) {
         Othsp othsp = new Othsp();
         othsp.setMain(othspendingsMapper.selectByPrimaryKey(id));
-        othsp.setItems((List<Othspendingsdetail>) othspendingsdetailMapper.selectByPrimaryKey(id));
+        othsp.setItems(othspendingsdetailMapper.selectByPrimaryKey(id));
         return othsp;
     }
 
     @Override
-    public PageInfo<Othspendings> selectList(PageRequest page) {
+    public PageInfo<Othspendings> selectList(PageRequest page, ListReqDTO reqDTO) {
         //设置默认分页
         if (null == page || page.getSize() == 0 || page.getNumber() == 0) {
             page = new PageRequest();
@@ -78,29 +98,64 @@ public class OthspendingsServiceImpl implements OthspendingsService {
             page.setSize(10);
         }
         PageHelper.startPage(page.getNumber(), page.getSize());
-        List<Othspendings> othspendings = othspendingsMapper.selectList();
+        List<Othspendings> othspendings = this.getListByMode(reqDTO);
         //取分页信息
         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 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);
+//    }
+
+    /**
+     * @Description: 检验获取并更新单号
+     * @Param: [code, id]
+     * @return: java.lang.String
+     * @Author: guq
+     * @Date: 2018/10/19
+     */
+    private String pushMaxnubmer(String code, Long id) {
+        if (null == code) {
+            throw new BizException(BizExceptionCode.NULL_CODE);
         }
+        Long companyId = BaseContextHolder.getCompanyId();
+        Integer count = "0".equals(String.valueOf(id)) ? othspendingsMapper.validateCodeWhenInsert(code, companyId) :
+                othspendingsMapper.validateCodeWhenUpdate(code, id, companyId);
+        return maxnumberService.pushMaxnubmer(count, code, BillCodeSeq.OTHRECEIPTS.getCaller()).getData();
     }
 
-    @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);
+    private List<Othspendings> getListByMode(ListReqDTO req) {
+        List<Othspendings> othspendingsList = null;
+        Long companyId = BaseContextHolder.getCompanyId();
+        if (StringUtils.isEmpty(req)) {
+            return  null;
+        }
+        String con = req.getFinalCondition();
+        if (null == con) {
+            con = "1=1";
+        }
+        if (StringUtils.isEmpty(req.getMode()) || "MAIN".equals(req.getMode())) {
+            othspendingsList = othspendingsMapper.selectOthspendingsBycondition(con, companyId);
+        } else {
+            othspendingsList = othspendingsMapper.selectOthspendingsListByCondition(con, companyId);
+        }
+        return othspendingsList;
     }
 }

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

@@ -2,7 +2,14 @@ package com.usoftchina.saas.money.service.impl;
 
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.commons.api.MaxnumberService;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.commons.exception.BizExceptionCode;
+import com.usoftchina.saas.commons.po.BillCodeSeq;
 import com.usoftchina.saas.commons.po.Status;
+import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.money.mapper.PaybalanceMapper;
 import com.usoftchina.saas.money.mapper.PaybalancedetMapper;
 import com.usoftchina.saas.money.mapper.PaybalancedetailMapper;
@@ -11,6 +18,7 @@ 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 org.springframework.util.StringUtils;
 
 import java.util.Iterator;
 import java.util.List;
@@ -27,21 +35,38 @@ public class PaybalanceServiceImpl implements PaybalanceService {
     private PaybalancedetMapper paybalancedetMapper;
     @Autowired
     private PaybalancedetailMapper paybalancedetailMapper;
+    @Autowired
+    private MaxnumberService maxnumberService;
 
-    public int insert(Pay pay) {
+    public DocBaseDTO insert(Pay pay) {
         Paybalance paybalance = pay.getMain();
         List<Paybalancedet> paybalancedet = pay.getItems1();
         List<Paybalancedetail> paybalancedetail = pay.getItems2();
-        if (paybalance.getPb_id() > 0){
+
+        System.out.println("paybal:"+paybalance);
+        String pb_code = paybalance.getPb_code();
+        //编号校验
+        pb_code = pushMaxnubmer(pb_code, paybalance.getId());
+        //单号赋值
+        paybalance.setPb_code(pb_code);
+
+        Long rbId = paybalance.getId();
+
+        if (paybalance.getId() > 0){
             paybalanceMapper.updateByPrimaryKeySelective(paybalance);
         }else {
-            paybalanceMapper.insert(paybalance);
+            paybalance.setCompanyId(BaseContextHolder.getCompanyId());
+            paybalanceMapper.insertSelective(paybalance);
+            rbId = paybalance.getId();
+            System.out.println("rbid:" + rbId);
         }
 
         Iterator isdet = paybalancedet.iterator();
         while (isdet.hasNext()){
             Paybalancedet paybalancedet1 = (Paybalancedet) isdet.next();
-            if (paybalancedet1.getPdId() > 0 ){
+            paybalancedet1.setPd_rbid(Math.toIntExact(rbId));
+            paybalancedet1.setCompanyId(BaseContextHolder.getCompanyId());
+            if (paybalancedet1.getId() > 0 ){
                 paybalancedetMapper.updateByPrimaryKey(paybalancedet1);
             }else {
                 paybalancedetMapper.insertSelective(paybalancedet1);
@@ -51,20 +76,26 @@ public class PaybalanceServiceImpl implements PaybalanceService {
         Iterator isdetl = paybalancedetail.iterator();
         while (isdetl.hasNext()){
             Paybalancedetail paybalancedetail1 = (Paybalancedetail) isdetl.next();
-            if (paybalancedetail1.getPbdId() > 0 ){
+            paybalancedetail1.setPbd_pbid(Math.toIntExact(rbId));
+            paybalancedetail1.setCompanyId(BaseContextHolder.getCompanyId());
+            if (paybalancedetail1.getId() > 0 ){
                 paybalancedetailMapper.updateByPrimaryKeySelective(paybalancedetail1);
             }else {
                 paybalancedetailMapper.insertSelective(paybalancedetail1);
             }
         }
-        return 0;
+        return new DocBaseDTO(rbId, pb_code, BillCodeSeq.PAYBALANCE.getCaller());
     }
 
 
     @Override
     public void audit(Pay pay) {
-        int id = pay.getMain().getPb_id();
+        Long companyId = BaseContextHolder.getCompanyId();
+        int id = Math.toIntExact(pay.getMain().getId());
         Paybalance paybalance = paybalanceMapper.selectByPrimaryKey(id);
+        paybalance.setPb_status(Status.AUDITED.getDisplay());
+        paybalance.setPb_statuscode(Status.AUDITED.name());
+        paybalance.setCompanyId(companyId);
         if ( paybalance == null || "".equals(paybalance)){
             this.insert(pay);
         }else {
@@ -75,7 +106,7 @@ public class PaybalanceServiceImpl implements PaybalanceService {
     @Override
     public void unAudit(int id) {
         Paybalance paybalance = new Paybalance();
-        paybalance.setPb_id(id);
+        paybalance.setId(Long.valueOf(id));
         paybalance.setPb_status(com.usoftchina.saas.commons.po.Status.UNAUDITED.getDisplay());
         paybalance.setPb_statuscode(Status.UNAUDITED.name());
         paybalanceMapper.updateByPrimaryKey(paybalance);
@@ -102,7 +133,7 @@ public class PaybalanceServiceImpl implements PaybalanceService {
         return pay;
     }
 
-    public PageInfo<Paybalance> selectList(PageRequest page){
+    public PageInfo<Paybalance> selectList(PageRequest page, ListReqDTO reqDTO){
         //设置默认分页
         if (null == page || page.getSize() == 0 || page.getNumber() == 0) {
             page = new PageRequest();
@@ -110,9 +141,44 @@ public class PaybalanceServiceImpl implements PaybalanceService {
             page.setSize(10);
         }
         PageHelper.startPage(page.getNumber(), page.getSize());
-        List<Paybalance> paybalances = paybalanceMapper.selectList();
+        List<Paybalance> paybalances = this.getListByMode(reqDTO);
         //取分页信息
         PageInfo<Paybalance> pageInfo = new PageInfo<Paybalance>(paybalances);
         return pageInfo;
     }
+
+    /**
+     * @Description: 检验获取并更新单号
+     * @Param: [code, id]
+     * @return: java.lang.String
+     * @Author: guq
+     * @Date: 2018/10/19
+     */
+    private String pushMaxnubmer(String code, Long id) {
+        if (null == code) {
+            throw new BizException(BizExceptionCode.NULL_CODE);
+        }
+        Long companyId = BaseContextHolder.getCompanyId();
+        Integer count = "0".equals(String.valueOf(id)) ? paybalanceMapper.validateCodeWhenInsert(code, companyId) :
+                paybalanceMapper.validateCodeWhenUpdate(code, id, companyId);
+        return maxnumberService.pushMaxnubmer(count, code, BillCodeSeq.RECBALANCE.getCaller()).getData();
+    }
+
+    private List<Paybalance> getListByMode(ListReqDTO req) {
+        List<Paybalance> paybalanceList = null;
+        Long companyId = BaseContextHolder.getCompanyId();
+        if (StringUtils.isEmpty(req)) {
+            return  null;
+        }
+        String con = req.getFinalCondition();
+        if (null == con) {
+            con = "1=1";
+        }
+        if (StringUtils.isEmpty(req.getMode()) || "MAIN".equals(req.getMode())) {
+            paybalanceList = paybalanceMapper.selectPaybalanceBycondition(con, companyId);
+        } else {
+            paybalanceList = paybalanceMapper.selectPaybalanceListByCondition(con, companyId);
+        }
+        return paybalanceList;
+    }
 }

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

@@ -2,7 +2,14 @@ package com.usoftchina.saas.money.service.impl;
 
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.commons.api.MaxnumberService;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.commons.exception.BizExceptionCode;
+import com.usoftchina.saas.commons.po.BillCodeSeq;
 import com.usoftchina.saas.commons.po.Status;
+import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.money.mapper.RecbalanceMapper;
 import com.usoftchina.saas.money.mapper.RecbalancedetMapper;
 import com.usoftchina.saas.money.mapper.RecbalancedetailMapper;
@@ -11,6 +18,7 @@ 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 org.springframework.util.StringUtils;
 
 import java.util.Iterator;
 import java.util.List;
@@ -27,24 +35,40 @@ public class RecbalanceServiceImpl implements RecbalanceService {
     RecbalancedetMapper recbalancedetMapper;
     @Autowired
     RecbalancedetailMapper recbalancedetailMapper;
+    @Autowired
+    private MaxnumberService maxnumberService;
 
     @Override
-    public int insert(Rec rec) {
+    public DocBaseDTO insert(Rec rec) {
         Recbalance recbalance = rec.getMain();
         List<Recbalancedet> recbalancedet = rec.getItems1();
         List<Recbalancedetail> recbalancedetail = rec.getItems2();
         System.out.println("recbalance:" + recbalance);
 
-        if (recbalance.getRb_id() > 0){
+
+        String pu_code = recbalance.getRb_code();
+
+        //编号校验
+        pu_code = pushMaxnubmer(pu_code, recbalance.getId());
+        //单号赋值
+        recbalance.setRb_code(pu_code);
+
+        Long rbId = recbalance.getId();
+        if (rbId > 0){
             recbalanceMapper.updateByPrimaryKey(recbalance);
         }else {
-            recbalanceMapper.insert(recbalance);
+            recbalance.setCompanyId(BaseContextHolder.getCompanyId());
+            recbalanceMapper.insertSelective(recbalance);
+            rbId = recbalance.getId();
+            System.out.println("rbid:" + rbId);
         }
 
         Iterator isdet = recbalancedet.iterator();
         while (isdet.hasNext()){
             Recbalancedet recbalancedet1 = (Recbalancedet) isdet.next();
-            if (recbalancedet1.getRd_id() > 0 ){
+            recbalancedet1.setRd_rbid(Math.toIntExact(rbId));
+            recbalancedet1.setCompanyId(BaseContextHolder.getCompanyId());
+            if (recbalancedet1.getId() > 0 ){
                 recbalancedetMapper.updateByPrimaryKey(recbalancedet1);
             }else {
                 recbalancedetMapper.insertSelective(recbalancedet1);
@@ -54,13 +78,16 @@ public class RecbalanceServiceImpl implements RecbalanceService {
         Iterator isdetl = recbalancedetail.iterator();
         while (isdetl.hasNext()){
             Recbalancedetail recbalancedetail1 = (Recbalancedetail) isdetl.next();
-            if (recbalancedetail1.getRbdId() > 0 ){
-                recbalancedetailMapper.updateByPrimaryKey(recbalancedetail1);
+            recbalancedetail1.setRbd_rbid(Math.toIntExact(rbId));
+            recbalancedetail1.setCompanyId(BaseContextHolder.getCompanyId());
+            System.out.println("rectail:" + recbalancedetail1);
+            if (recbalancedetail1.getId() > 0 ){
+                recbalancedetailMapper.updateByPrimaryKeySelective(recbalancedetail1);
             }else {
                 recbalancedetailMapper.insertSelective(recbalancedetail1);
             }
         }
-        return 0;
+        return new DocBaseDTO(rbId, pu_code, BillCodeSeq.RECBALANCE.getCaller());
     }
 
     @Override
@@ -73,42 +100,50 @@ public class RecbalanceServiceImpl implements RecbalanceService {
     @Override
     public Rec select(int id) {
         Recbalance recbalance = recbalanceMapper.selectByPrimaryKey(id);
-        Recbalancedet recbalancedet = recbalancedetMapper.selectByPrimaryKey(id);
-        Recbalancedetail recbalancedetail = recbalancedetailMapper.selectByPrimaryKey(id);
+        List<Recbalancedet> recbalancedet = recbalancedetMapper.selectByPrimaryKey(id);
+        List<Recbalancedetail> recbalancedetail = recbalancedetailMapper.selectByPrimaryKey(id);
         Rec rec = new Rec();
         rec.setMain(recbalance);
-        rec.setItems1((List<Recbalancedet>) recbalancedet);
-        rec.setItems2((List<Recbalancedetail>) recbalancedetail);
+        rec.setItems1( recbalancedet);
+        rec.setItems2(recbalancedetail);
         return rec;
     }
 
     @Override
     public void deleteItem(int id) {
-        recbalancedetailMapper.deleteItem(id);
         recbalancedetMapper.deleteItem(id);
     }
 
+    @Override
+    public void deleteItems(int id) {
+        recbalancedetailMapper.deleteItem(id);
+    }
+
     @Override
     public void audit(Rec rec) {
-        int id = rec.getMain().getRb_id();
+        Long companyId = BaseContextHolder.getCompanyId();
+        Integer id = Math.toIntExact(rec.getMain().getId());
         Recbalance recbalance = recbalanceMapper.selectByPrimaryKey(id);
+        recbalance.setRb_status(Status.AUDITED.getDisplay());
+        recbalance.setRb_statuscode(Status.AUDITED.name());
+        recbalance.setCompanyId(companyId);
         if ( recbalance == null || "".equals(recbalance)){
             this.insert(rec);
         }else {
-            recbalanceMapper.updateByPrimaryKey(recbalance);
+            recbalanceMapper.updateByPrimaryKeySelective(recbalance);
         }
     }
 
     @Override
-    public void unAudit(int id) {
+    public void unAudit(Long id) {
         Recbalance recbalance = new Recbalance();
-        recbalance.setRb_id(id);
+        recbalance.setId(id);
         recbalance.setRb_status(Status.UNAUDITED.getDisplay());
         recbalance.setRb_statuscode(Status.UNAUDITED.name());
-        recbalanceMapper.updateByPrimaryKey(recbalance);
+        recbalanceMapper.updateByPrimaryKeySelective(recbalance);
     }
 
-    public PageInfo<Recbalance> selectList(PageRequest page) {
+    public PageInfo<Recbalance> selectList(PageRequest page, ListReqDTO reqDTO) {
         //设置默认分页
         if (null == page || page.getSize() == 0 || page.getNumber() == 0) {
             page = new PageRequest();
@@ -116,9 +151,44 @@ public class RecbalanceServiceImpl implements RecbalanceService {
             page.setSize(10);
         }
         PageHelper.startPage(page.getNumber(), page.getSize());
-        List<Recbalance> recbalancesList = recbalanceMapper.selectList();
+        List<Recbalance> recbalancesList = this.getListByMode(reqDTO);
         //取分页信息
         PageInfo<Recbalance> pageInfo = new PageInfo<Recbalance>(recbalancesList);
         return pageInfo;
     }
+
+    /**
+     * @Description: 检验获取并更新单号
+     * @Param: [code, id]
+     * @return: java.lang.String
+     * @Author: guq
+     * @Date: 2018/10/19
+     */
+    private String pushMaxnubmer(String code, Long id) {
+        if (null == code) {
+            throw new BizException(BizExceptionCode.NULL_CODE);
+        }
+        Long companyId = BaseContextHolder.getCompanyId();
+        Integer count = "0".equals(String.valueOf(id)) ? recbalanceMapper.validateCodeWhenInsert(code, companyId) :
+                recbalanceMapper.validateCodeWhenUpdate(code, id, companyId);
+        return maxnumberService.pushMaxnubmer(count, code, BillCodeSeq.RECBALANCE.getCaller()).getData();
+    }
+
+    private List<Recbalance> getListByMode(ListReqDTO req) {
+        List<Recbalance> recbalancesList = null;
+        Long companyId = BaseContextHolder.getCompanyId();
+        if (StringUtils.isEmpty(req)) {
+            return  null;
+        }
+        String con = req.getFinalCondition();
+        if (null == con) {
+            con = "1=1";
+        }
+        if (StringUtils.isEmpty(req.getMode()) || "MAIN".equals(req.getMode())) {
+            recbalancesList = recbalanceMapper.selectRecbalanceBycondition(con, companyId);
+        } else {
+            recbalancesList = recbalanceMapper.selectRecbalanceListByCondition(con, companyId);
+        }
+        return recbalancesList;
+    }
 }

+ 177 - 144
applications/money/money-server/src/main/resources/mapper/OthreceiptsMapper.xml

@@ -2,30 +2,30 @@
 <!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" />
+    <id column="or_id" property="id" jdbcType="INTEGER" />
+    <result column="or_code" property="or_code" jdbcType="VARCHAR" />
+    <result column="or_date" property="or_date" jdbcType="TIMESTAMP" />
+    <result column="or_custid" property="or_custid" jdbcType="INTEGER" />
+    <result column="or_custcode" property="or_custcode" jdbcType="VARCHAR" />
+    <result column="or_custname" property="or_custname" jdbcType="VARCHAR" />
+    <result column="or_bankcode" property="or_bankcode" jdbcType="VARCHAR" />
+    <result column="or_bankid" property="or_bankid" jdbcType="INTEGER" />
+    <result column="or_bankname" property="or_bankname" jdbcType="VARCHAR" />
+    <result column="or_amount" property="or_amount" jdbcType="DOUBLE" />
+    <result column="or_recorderid" property="or_recorderid" jdbcType="INTEGER" />
+    <result column="or_recorder" property="or_recorder" jdbcType="VARCHAR" />
+    <result column="or_recorddate" property="or_recorddate" jdbcType="TIMESTAMP" />
+    <result column="or_status" property="or_status" jdbcType="VARCHAR" />
+    <result column="or_statuscode" property="or_statuscode" jdbcType="VARCHAR" />
+    <result column="or_remark" property="or_remark" 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" />
+    <result column="or_text1" property="or_text1" jdbcType="VARCHAR" />
+    <result column="or_text2" property="or_text2" jdbcType="VARCHAR" />
+    <result column="or_text3" property="or_text3" jdbcType="VARCHAR" />
+    <result column="or_text4" property="or_text4" jdbcType="VARCHAR" />
+    <result column="or_text5" property="or_text5" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Base_Column_List" >
     or_id, or_code, or_date, or_custid, or_custcode, or_custname, or_bankcode, or_bankid, 
@@ -37,7 +37,7 @@
     select 
     <include refid="Base_Column_List" />
     from othreceipts
-    where or_id = #{orId,jdbcType=INTEGER}
+    where or_id = #{id,jdbcType=INTEGER}
   </select>
 
   <select id="selectList" resultMap="BaseResultMap">
@@ -48,7 +48,7 @@
 
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
     delete from othreceipts
-    where or_id = #{orId,jdbcType=INTEGER}
+    where or_id = #{id,jdbcType=INTEGER}
   </delete>
   <insert id="insert" parameterType="com.usoftchina.saas.money.po.Othreceipts" >
     insert into othreceipts (or_id, or_code, or_date, 
@@ -65,7 +65,7 @@
       #{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}, 
+      #{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}
       )
@@ -73,228 +73,225 @@
   <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" >
+      <if test="or_code != null" >
         or_code,
       </if>
-      <if test="orDate != null" >
+      <if test="or_date != null" >
         or_date,
       </if>
-      <if test="orCustid != null" >
+      <if test="or_custid != null" >
         or_custid,
       </if>
-      <if test="orCustcode != null" >
+      <if test="or_custcode != null" >
         or_custcode,
       </if>
-      <if test="orCustname != null" >
+      <if test="or_custname != null" >
         or_custname,
       </if>
-      <if test="orBankcode != null" >
+      <if test="or_bankcode != null" >
         or_bankcode,
       </if>
-      <if test="orBankid != null" >
+      <if test="or_bankid != null" >
         or_bankid,
       </if>
-      <if test="orBankname != null" >
+      <if test="or_bankname != null" >
         or_bankname,
       </if>
-      <if test="orAmount != null" >
+      <if test="or_amount != null" >
         or_amount,
       </if>
-      <if test="orRecorderid != null" >
+      <if test="or_recorderid != null" >
         or_recorderid,
       </if>
-      <if test="orRecorder != null" >
+      <if test="or_recorder != null" >
         or_recorder,
       </if>
-      <if test="orRecorddate != null" >
+      <if test="or_recorddate != null" >
         or_recorddate,
       </if>
-      <if test="orStatus != null" >
+      <if test="or_status != null" >
         or_status,
       </if>
-      <if test="orStatuscode != null" >
+      <if test="or_statuscode != null" >
         or_statuscode,
       </if>
-      <if test="orRemark != null" >
+      <if test="or_remark != null" >
         or_remark,
       </if>
-      <if test="companyid != null" >
+      <if test="companyId != null" >
         companyId,
       </if>
-      <if test="updaterid != null" >
+      <if test="updaterId != null" >
         updaterId,
       </if>
       <if test="updatedate != null" >
         updatedate,
       </if>
-      <if test="orText1 != null" >
+      <if test="or_text1 != null" >
         or_text1,
       </if>
-      <if test="orText2 != null" >
+      <if test="or_text2 != null" >
         or_text2,
       </if>
-      <if test="orText3 != null" >
+      <if test="or_text3 != null" >
         or_text3,
       </if>
-      <if test="orText4 != null" >
+      <if test="or_text4 != null" >
         or_text4,
       </if>
-      <if test="orText5 != null" >
+      <if test="or_text5 != null" >
         or_text5,
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
-      <if test="orId != null" >
-        #{orId,jdbcType=INTEGER},
+      <if test="or_code != null" >
+        #{or_code,jdbcType=VARCHAR},
       </if>
-      <if test="orCode != null" >
-        #{orCode,jdbcType=VARCHAR},
+      <if test="or_date != null" >
+        #{or_date,jdbcType=TIMESTAMP},
       </if>
-      <if test="orDate != null" >
-        #{orDate,jdbcType=TIMESTAMP},
+      <if test="or_custid != null" >
+        #{or_custid,jdbcType=INTEGER},
       </if>
-      <if test="orCustid != null" >
-        #{orCustid,jdbcType=INTEGER},
+      <if test="or_custcode != null" >
+        #{or_custcode,jdbcType=VARCHAR},
       </if>
-      <if test="orCustcode != null" >
-        #{orCustcode,jdbcType=VARCHAR},
+      <if test="or_custname != null" >
+        #{or_custname,jdbcType=VARCHAR},
       </if>
-      <if test="orCustname != null" >
-        #{orCustname,jdbcType=VARCHAR},
+      <if test="or_bankcode != null" >
+        #{or_bankcode,jdbcType=VARCHAR},
       </if>
-      <if test="orBankcode != null" >
-        #{orBankcode,jdbcType=VARCHAR},
+      <if test="or_bankid != null" >
+        #{or_bankid,jdbcType=INTEGER},
       </if>
-      <if test="orBankid != null" >
-        #{orBankid,jdbcType=INTEGER},
+      <if test="or_bankname != null" >
+        #{or_bankname,jdbcType=VARCHAR},
       </if>
-      <if test="orBankname != null" >
-        #{orBankname,jdbcType=VARCHAR},
+      <if test="or_amount != null" >
+        #{or_amount,jdbcType=DOUBLE},
       </if>
-      <if test="orAmount != null" >
-        #{orAmount,jdbcType=DOUBLE},
+      <if test="or_recorderid != null" >
+        #{or_recorderid,jdbcType=INTEGER},
       </if>
-      <if test="orRecorderid != null" >
-        #{orRecorderid,jdbcType=INTEGER},
+      <if test="or_recorder != null" >
+        #{or_recorder,jdbcType=VARCHAR},
       </if>
-      <if test="orRecorder != null" >
-        #{orRecorder,jdbcType=VARCHAR},
+      <if test="or_recorddate != null" >
+        #{or_recorddate,jdbcType=TIMESTAMP},
       </if>
-      <if test="orRecorddate != null" >
-        #{orRecorddate,jdbcType=TIMESTAMP},
+      <if test="or_status != null" >
+        #{or_status,jdbcType=VARCHAR},
       </if>
-      <if test="orStatus != null" >
-        #{orStatus,jdbcType=INTEGER},
+      <if test="or_statuscode != null" >
+        #{or_statuscode,jdbcType=VARCHAR},
       </if>
-      <if test="orStatuscode != null" >
-        #{orStatuscode,jdbcType=DECIMAL},
+      <if test="or_remark != null" >
+        #{or_remark,jdbcType=VARCHAR},
       </if>
-      <if test="orRemark != null" >
-        #{orRemark,jdbcType=VARCHAR},
+      <if test="companyId != null" >
+        #{companyId,jdbcType=INTEGER},
       </if>
-      <if test="companyid != null" >
-        #{companyid,jdbcType=INTEGER},
-      </if>
-      <if test="updaterid != null" >
-        #{updaterid,jdbcType=INTEGER},
+      <if test="updaterId != null" >
+        #{updaterId,jdbcType=INTEGER},
       </if>
       <if test="updatedate != null" >
         #{updatedate,jdbcType=TIMESTAMP},
       </if>
-      <if test="orText1 != null" >
-        #{orText1,jdbcType=VARCHAR},
+      <if test="or_text1 != null" >
+        #{or_text1,jdbcType=VARCHAR},
       </if>
-      <if test="orText2 != null" >
-        #{orText2,jdbcType=VARCHAR},
+      <if test="or_text2 != null" >
+        #{or_text2,jdbcType=VARCHAR},
       </if>
-      <if test="orText3 != null" >
-        #{orText3,jdbcType=VARCHAR},
+      <if test="or_text3 != null" >
+        #{or_text3,jdbcType=VARCHAR},
       </if>
-      <if test="orText4 != null" >
-        #{orText4,jdbcType=VARCHAR},
+      <if test="or_text4 != null" >
+        #{or_text4,jdbcType=VARCHAR},
       </if>
-      <if test="orText5 != null" >
-        #{orText5,jdbcType=VARCHAR},
+      <if test="or_text5 != null" >
+        #{or_text5,jdbcType=VARCHAR},
       </if>
     </trim>
+    <selectKey resultType="Long" keyProperty="id" order="AFTER">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.money.po.Othreceipts" >
     update othreceipts
     <set >
-      <if test="orCode != null" >
-        or_code = #{orCode,jdbcType=VARCHAR},
+      <if test="or_code != null" >
+        or_code = #{or_code,jdbcType=VARCHAR},
       </if>
-      <if test="orDate != null" >
-        or_date = #{orDate,jdbcType=TIMESTAMP},
+      <if test="or_date != null" >
+        or_date = #{or_date,jdbcType=TIMESTAMP},
       </if>
-      <if test="orCustid != null" >
-        or_custid = #{orCustid,jdbcType=INTEGER},
+      <if test="or_custid != null" >
+        or_custid = #{or_custid,jdbcType=INTEGER},
       </if>
-      <if test="orCustcode != null" >
-        or_custcode = #{orCustcode,jdbcType=VARCHAR},
+      <if test="or_custcode != null" >
+        or_custcode = #{or_custcode,jdbcType=VARCHAR},
       </if>
-      <if test="orCustname != null" >
-        or_custname = #{orCustname,jdbcType=VARCHAR},
+      <if test="or_custname != null" >
+        or_custname = #{or_custname,jdbcType=VARCHAR},
       </if>
-      <if test="orBankcode != null" >
-        or_bankcode = #{orBankcode,jdbcType=VARCHAR},
+      <if test="or_bankcode != null" >
+        or_bankcode = #{or_bankcode,jdbcType=VARCHAR},
       </if>
-      <if test="orBankid != null" >
-        or_bankid = #{orBankid,jdbcType=INTEGER},
+      <if test="or_bankid != null" >
+        or_bankid = #{or_bankid,jdbcType=INTEGER},
       </if>
-      <if test="orBankname != null" >
-        or_bankname = #{orBankname,jdbcType=VARCHAR},
+      <if test="or_bankname != null" >
+        or_bankname = #{or_bankname,jdbcType=VARCHAR},
       </if>
-      <if test="orAmount != null" >
-        or_amount = #{orAmount,jdbcType=DOUBLE},
+      <if test="or_amount != null" >
+        or_amount = #{or_amount,jdbcType=DOUBLE},
       </if>
-      <if test="orRecorderid != null" >
-        or_recorderid = #{orRecorderid,jdbcType=INTEGER},
+      <if test="or_recorderid != null" >
+        or_recorderid = #{or_recorderid,jdbcType=INTEGER},
       </if>
-      <if test="orRecorder != null" >
-        or_recorder = #{orRecorder,jdbcType=VARCHAR},
+      <if test="or_recorder != null" >
+        or_recorder = #{or_recorder,jdbcType=VARCHAR},
       </if>
-      <if test="orRecorddate != null" >
-        or_recorddate = #{orRecorddate,jdbcType=TIMESTAMP},
+      <if test="or_recorddate != null" >
+        or_recorddate = #{or_recorddate,jdbcType=TIMESTAMP},
       </if>
-      <if test="orStatus != null" >
-        or_status = #{orStatus,jdbcType=INTEGER},
+      <if test="or_status != null" >
+        or_status = #{or_status,jdbcType=VARCHAR},
       </if>
-      <if test="orStatuscode != null" >
-        or_statuscode = #{orStatuscode,jdbcType=DECIMAL},
+      <if test="or_statuscode != null" >
+        or_statuscode = #{or_statuscode,jdbcType=VARCHAR},
       </if>
-      <if test="orRemark != null" >
-        or_remark = #{orRemark,jdbcType=VARCHAR},
+      <if test="or_remark != null" >
+        or_remark = #{or_remark,jdbcType=VARCHAR},
       </if>
-      <if test="companyid != null" >
-        companyId = #{companyid,jdbcType=INTEGER},
+      <if test="companyId != null" >
+        companyId = #{companyId,jdbcType=INTEGER},
       </if>
-      <if test="updaterid != null" >
-        updaterId = #{updaterid,jdbcType=INTEGER},
+      <if test="updaterId != null" >
+        updaterId = #{updaterId,jdbcType=INTEGER},
       </if>
       <if test="updatedate != null" >
         updatedate = #{updatedate,jdbcType=TIMESTAMP},
       </if>
-      <if test="orText1 != null" >
-        or_text1 = #{orText1,jdbcType=VARCHAR},
+      <if test="or_text1 != null" >
+        or_text1 = #{or_text1,jdbcType=VARCHAR},
       </if>
-      <if test="orText2 != null" >
-        or_text2 = #{orText2,jdbcType=VARCHAR},
+      <if test="or_text2 != null" >
+        or_text2 = #{or_text2,jdbcType=VARCHAR},
       </if>
-      <if test="orText3 != null" >
-        or_text3 = #{orText3,jdbcType=VARCHAR},
+      <if test="or_text3 != null" >
+        or_text3 = #{or_text3,jdbcType=VARCHAR},
       </if>
-      <if test="orText4 != null" >
-        or_text4 = #{orText4,jdbcType=VARCHAR},
+      <if test="or_text4 != null" >
+        or_text4 = #{or_text4,jdbcType=VARCHAR},
       </if>
-      <if test="orText5 != null" >
-        or_text5 = #{orText5,jdbcType=VARCHAR},
+      <if test="or_text5 != null" >
+        or_text5 = #{or_text5,jdbcType=VARCHAR},
       </if>
     </set>
-    where or_id = #{orId,jdbcType=INTEGER}
+    where or_id = #{id,jdbcType=INTEGER}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.money.po.Othreceipts" >
     update othreceipts
@@ -313,7 +310,7 @@
       or_status = #{orStatus,jdbcType=INTEGER},
       or_statuscode = #{orStatuscode,jdbcType=DECIMAL},
       or_remark = #{orRemark,jdbcType=VARCHAR},
-      companyId = #{companyid,jdbcType=INTEGER},
+      companyId = #{companyId,jdbcType=INTEGER},
       updaterId = #{updaterid,jdbcType=INTEGER},
       updatedate = #{updatedate,jdbcType=TIMESTAMP},
       or_text1 = #{orText1,jdbcType=VARCHAR},
@@ -323,4 +320,40 @@
       or_text5 = #{orText5,jdbcType=VARCHAR}
     where or_id = #{orId,jdbcType=INTEGER}
   </update>
+
+  <select id="validateCodeWhenInsert" resultType="int">
+    select count(1) from othreceipts where or_code = #{code} and companyId =#{companyId}
+  </select>
+  <select id="validateCodeWhenUpdate" resultType="int" >
+    select count(1) from othreceipts where or_code = #{code} and or_id != #{id} and companyId =#{companyId}
+  </select>
+
+  <select id="selectOthreceiptsBycondition" resultMap="BaseResultMap">
+    select
+    <include refid="Base_Column_List" />
+    from Othreceipts
+    <where>
+      <if test="con != null">
+        ${con}
+      </if>
+      <if test="companyId != null">
+        and   othreceipts.companyId = #{companyId}
+      </if>
+    </where>  order by or_id
+  </select>
+
+  <select id="selectOthreceiptsListByCondition" resultMap="BaseResultMap">
+    select
+    <include refid="Base_Column_List" />
+    from Othreceipts
+    left join othreceiptsdetail on or_id=ord_orid 
+    <where>
+      <if test="con != null">
+        ${con}
+      </if>
+      <if test="companyId != null">
+        and   othreceipts.companyId = #{companyId}
+      </if>
+    </where>  order by or_id
+  </select>
 </mapper>

+ 80 - 95
applications/money/money-server/src/main/resources/mapper/OthreceiptsdetailMapper.xml

@@ -2,21 +2,21 @@
 <!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" />
+    <id column="ord_id" property="id" jdbcType="INTEGER" />
+    <result column="ord_orid" property="ord_orid" jdbcType="INTEGER" />
+    <result column="ord_detno" property="ord_detno" jdbcType="INTEGER" />
+    <result column="ord_ym" property="ord_ym" jdbcType="INTEGER" />
+    <result column="ord_type" property="ord_type" jdbcType="VARCHAR" />
+    <result column="ord_nowbalance" property="ord_nowbalance" jdbcType="DOUBLE" />
+    <result column="ord_remark" property="ord_remark" 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" />
+    <result column="ord_text1" property="ord_text1" jdbcType="VARCHAR" />
+    <result column="ord_text2" property="ord_text2" jdbcType="VARCHAR" />
+    <result column="ord_text3" property="ord_text3" jdbcType="VARCHAR" />
+    <result column="ord_text4" property="ord_text4" jdbcType="VARCHAR" />
+    <result column="ord_text5" property="ord_text5" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Base_Column_List" >
     ord_id, ord_orid, ord_detno, ord_ym, ord_type, ord_nowbalance, ord_remark, companyId, 
@@ -26,16 +26,16 @@
     select 
     <include refid="Base_Column_List" />
     from othreceiptsdetail
-    where ord_id = #{ordId,jdbcType=INTEGER}
+    where ord_id = #{id,jdbcType=INTEGER}
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
     delete from othreceiptsdetail
-    where ord_orid = #{ordOrid,jdbcType=INTEGER}
+    where ord_orid = #{id,jdbcType=INTEGER}
   </delete>
 
   <delete id="deleteItem" parameterType="java.lang.Integer" >
     delete from othreceiptsdetail
-    where ord_orid = #{ordOrid,jdbcType=INTEGER}
+    where ord_id = #{id,jdbcType=INTEGER}
   </delete>
 
   <insert id="insert" parameterType="com.usoftchina.saas.money.po.Othreceiptsdetail" >
@@ -47,7 +47,7 @@
       )
     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}, 
+      #{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}
       )
@@ -55,147 +55,132 @@
   <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" >
+      <if test="ord_detno != null" >
         ord_detno,
       </if>
-      <if test="ordYm != null" >
+      <if test="ord_ym != null" >
         ord_ym,
       </if>
-      <if test="ordType != null" >
+      <if test="ord_type != null" >
         ord_type,
       </if>
-      <if test="ordNowbalance != null" >
+      <if test="ord_nowbalance != null" >
         ord_nowbalance,
       </if>
-      <if test="ordRemark != null" >
+      <if test="ord_remark != null" >
         ord_remark,
       </if>
-      <if test="companyid != null" >
+      <if test="companyId != null" >
         companyId,
       </if>
-      <if test="updaterid != null" >
+      <if test="updaterId != null" >
         updaterId,
       </if>
       <if test="updatedate != null" >
         updatedate,
       </if>
-      <if test="ordText1 != null" >
+      <if test="ord_text1 != null" >
         ord_text1,
       </if>
-      <if test="ordText2 != null" >
+      <if test="ord_text2 != null" >
         ord_text2,
       </if>
-      <if test="ordText3 != null" >
+      <if test="ord_text3 != null" >
         ord_text3,
       </if>
-      <if test="ordText4 != null" >
+      <if test="ord_text4 != null" >
         ord_text4,
       </if>
-      <if test="ordText5 != null" >
+      <if test="ord_text5 != 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 test="ord_detno != null" >
+        #{ord_detno,jdbcType=INTEGER},
       </if>
-      <if test="ordDetno != null" >
-        #{ordDetno,jdbcType=INTEGER},
+      <if test="ord_ym != null" >
+        #{ord_ym,jdbcType=INTEGER},
       </if>
-      <if test="ordYm != null" >
-        #{ordYm,jdbcType=INTEGER},
+      <if test="ord_type != null" >
+        #{ord_type,jdbcType=VARCHAR},
       </if>
-      <if test="ordType != null" >
-        #{ordType,jdbcType=VARCHAR},
+      <if test="ord_nowbalance != null" >
+        #{ord_nowbalance,jdbcType=DOUBLE},
       </if>
-      <if test="ordNowbalance != null" >
-        #{ordNowbalance,jdbcType=DOUBLE},
+      <if test="ord_remark != null" >
+        #{ord_remark,jdbcType=VARCHAR},
       </if>
-      <if test="ordRemark != null" >
-        #{ordRemark,jdbcType=VARCHAR},
+      <if test="companyId != null" >
+        #{companyId,jdbcType=INTEGER},
       </if>
-      <if test="companyid != null" >
-        #{companyid,jdbcType=INTEGER},
-      </if>
-      <if test="updaterid != null" >
-        #{updaterid,jdbcType=INTEGER},
+      <if test="updaterId != null" >
+        #{updaterId,jdbcType=INTEGER},
       </if>
       <if test="updatedate != null" >
         #{updatedate,jdbcType=TIMESTAMP},
       </if>
-      <if test="ordText1 != null" >
-        #{ordText1,jdbcType=VARCHAR},
+      <if test="ord_text1 != null" >
+        #{ord_text1,jdbcType=VARCHAR},
       </if>
-      <if test="ordText2 != null" >
-        #{ordText2,jdbcType=VARCHAR},
+      <if test="ord_text2 != null" >
+        #{ord_text2,jdbcType=VARCHAR},
       </if>
-      <if test="ordText3 != null" >
-        #{ordText3,jdbcType=VARCHAR},
+      <if test="ord_text3 != null" >
+        #{ord_text3,jdbcType=VARCHAR},
       </if>
-      <if test="ordText4 != null" >
-        #{ordText4,jdbcType=VARCHAR},
+      <if test="ord_text4 != null" >
+        #{ord_text4,jdbcType=VARCHAR},
       </if>
-      <if test="ordText5 != null" >
-        #{ordText5,jdbcType=VARCHAR},
+      <if test="ord_text5 != null" >
+        #{ord_text5,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 test="ord_detno != null" >
+        ord_detno = #{ord_detno,jdbcType=INTEGER},
       </if>
-      <if test="ordYm != null" >
-        ord_ym = #{ordYm,jdbcType=INTEGER},
+      <if test="ord_ym != null" >
+        ord_ym = #{ord_ym,jdbcType=INTEGER},
       </if>
-      <if test="ordType != null" >
-        ord_type = #{ordType,jdbcType=VARCHAR},
+      <if test="ord_type != null" >
+        ord_type = #{ord_type,jdbcType=VARCHAR},
       </if>
-      <if test="ordNowbalance != null" >
-        ord_nowbalance = #{ordNowbalance,jdbcType=DOUBLE},
+      <if test="ord_nowbalance != null" >
+        ord_nowbalance = #{ord_nowbalance,jdbcType=DOUBLE},
       </if>
-      <if test="ordRemark != null" >
-        ord_remark = #{ordRemark,jdbcType=VARCHAR},
+      <if test="ord_remark != null" >
+        ord_remark = #{ord_remark,jdbcType=VARCHAR},
       </if>
-      <if test="companyid != null" >
-        companyId = #{companyid,jdbcType=INTEGER},
+      <if test="companyId != null" >
+        companyId = #{companyId,jdbcType=INTEGER},
       </if>
-      <if test="updaterid != null" >
-        updaterId = #{updaterid,jdbcType=INTEGER},
+      <if test="updaterId != null" >
+        updaterId = #{updaterId,jdbcType=INTEGER},
       </if>
       <if test="updatedate != null" >
         updatedate = #{updatedate,jdbcType=TIMESTAMP},
       </if>
-      <if test="ordText1 != null" >
-        ord_text1 = #{ordText1,jdbcType=VARCHAR},
+      <if test="ord_text1 != null" >
+        ord_text1 = #{ord_text1,jdbcType=VARCHAR},
       </if>
-      <if test="ordText2 != null" >
-        ord_text2 = #{ordText2,jdbcType=VARCHAR},
+      <if test="ord_text2 != null" >
+        ord_text2 = #{ord_text2,jdbcType=VARCHAR},
       </if>
-      <if test="ordText3 != null" >
-        ord_text3 = #{ordText3,jdbcType=VARCHAR},
+      <if test="ord_text3 != null" >
+        ord_text3 = #{ord_text3,jdbcType=VARCHAR},
       </if>
-      <if test="ordText4 != null" >
-        ord_text4 = #{ordText4,jdbcType=VARCHAR},
+      <if test="ord_text4 != null" >
+        ord_text4 = #{ord_text4,jdbcType=VARCHAR},
       </if>
-      <if test="ordText5 != null" >
-        ord_text5 = #{ordText5,jdbcType=VARCHAR},
+      <if test="ord_text5 != null" >
+        ord_text5 = #{ord_text5,jdbcType=VARCHAR},
       </if>
     </set>
-    where ord_id = #{ordId,jdbcType=INTEGER}
+    where ord_id = #{id,jdbcType=INTEGER}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.money.po.Othreceiptsdetail" >
     update othreceiptsdetail
@@ -205,7 +190,7 @@
       ord_type = #{ordType,jdbcType=VARCHAR},
       ord_nowbalance = #{ordNowbalance,jdbcType=DOUBLE},
       ord_remark = #{ordRemark,jdbcType=VARCHAR},
-      companyId = #{companyid,jdbcType=INTEGER},
+      companyId = #{companyId,jdbcType=INTEGER},
       updaterId = #{updaterid,jdbcType=INTEGER},
       updatedate = #{updatedate,jdbcType=TIMESTAMP},
       ord_text1 = #{ordText1,jdbcType=VARCHAR},

+ 69 - 39
applications/money/money-server/src/main/resources/mapper/OthspendingsMapper.xml

@@ -2,30 +2,30 @@
 <!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" />
+    <id column="os_id" property="id" jdbcType="INTEGER" />
+    <result column="os_code" property="os_code" jdbcType="VARCHAR" />
+    <result column="os_date" property="os_date" jdbcType="TIMESTAMP" />
+    <result column="os_vendid" property="os_vendid" jdbcType="INTEGER" />
+    <result column="os_vendcode" property="os_vendcode" jdbcType="VARCHAR" />
+    <result column="os_vendname" property="os_vendname" jdbcType="VARCHAR" />
+    <result column="os_bankid" property="os_bankid" jdbcType="INTEGER" />
+    <result column="os_bankcode" property="os_bankcode" jdbcType="VARCHAR" />
+    <result column="os_bankname" property="os_bankname" jdbcType="VARCHAR" />
+    <result column="os_amount" property="os_amount" jdbcType="DOUBLE" />
+    <result column="os_recorderid" property="os_recorderid" jdbcType="INTEGER" />
+    <result column="os_recorder" property="os_recorder" jdbcType="VARCHAR" />
+    <result column="os_recorddate" property="os_recorddate" jdbcType="TIMESTAMP" />
+    <result column="os_status" property="os_status" jdbcType="VARCHAR" />
+    <result column="os_statuscode" property="os_statuscode" jdbcType="VARCHAR" />
+    <result column="os_remark" property="os_remark" 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" />
+    <result column="os_text1" property="os_text1" jdbcType="VARCHAR" />
+    <result column="os_text2" property="os_text2" jdbcType="VARCHAR" />
+    <result column="os_text3" property="os_text3" jdbcType="VARCHAR" />
+    <result column="os_text4" property="os_text4" jdbcType="VARCHAR" />
+    <result column="os_text5" property="os_text5" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Base_Column_List" >
     os_id, os_code, os_date, os_vendid, os_vendcode, os_vendname, os_bankid, os_bankcode, 
@@ -37,11 +37,11 @@
     select 
     <include refid="Base_Column_List" />
     from othspendings
-    where os_id = #{osId,jdbcType=INTEGER}
+    where os_id = #{id,jdbcType=INTEGER}
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
     delete from othspendings
-    where os_id = #{osId,jdbcType=INTEGER}
+    where os_id = #{id,jdbcType=INTEGER}
   </delete>
   <insert id="insert" parameterType="com.usoftchina.saas.money.po.Othspendings" >
     insert into othspendings (os_id, os_code, os_date, 
@@ -58,7 +58,7 @@
       #{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}, 
+      #{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}
       )
@@ -66,9 +66,6 @@
   <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>
@@ -114,7 +111,7 @@
       <if test="osRemark != null" >
         os_remark,
       </if>
-      <if test="companyid != null" >
+      <if test="companyId != null" >
         companyId,
       </if>
       <if test="updaterid != null" >
@@ -140,9 +137,6 @@
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
-      <if test="osId != null" >
-        #{osId,jdbcType=INTEGER},
-      </if>
       <if test="osCode != null" >
         #{osCode,jdbcType=VARCHAR},
       </if>
@@ -188,8 +182,8 @@
       <if test="osRemark != null" >
         #{osRemark,jdbcType=VARCHAR},
       </if>
-      <if test="companyid != null" >
-        #{companyid,jdbcType=INTEGER},
+      <if test="companyId != null" >
+        #{companyId,jdbcType=INTEGER},
       </if>
       <if test="updaterid != null" >
         #{updaterid,jdbcType=INTEGER},
@@ -262,8 +256,8 @@
       <if test="osRemark != null" >
         os_remark = #{osRemark,jdbcType=VARCHAR},
       </if>
-      <if test="companyid != null" >
-        companyId = #{companyid,jdbcType=INTEGER},
+      <if test="companyId != null" >
+        companyId = #{companyId,jdbcType=INTEGER},
       </if>
       <if test="updaterid != null" >
         updaterId = #{updaterid,jdbcType=INTEGER},
@@ -287,7 +281,7 @@
         os_text5 = #{osText5,jdbcType=VARCHAR},
       </if>
     </set>
-    where os_id = #{osId,jdbcType=INTEGER}
+    where os_id = #{id,jdbcType=INTEGER}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.money.po.Othspendings" >
     update othspendings
@@ -306,7 +300,7 @@
       os_status = #{osStatus,jdbcType=INTEGER},
       os_statuscode = #{osStatuscode,jdbcType=DECIMAL},
       os_remark = #{osRemark,jdbcType=VARCHAR},
-      companyId = #{companyid,jdbcType=INTEGER},
+      companyId = #{companyId,jdbcType=INTEGER},
       updaterId = #{updaterid,jdbcType=INTEGER},
       updatedate = #{updatedate,jdbcType=TIMESTAMP},
       os_text1 = #{osText1,jdbcType=VARCHAR},
@@ -316,4 +310,40 @@
       os_text5 = #{osText5,jdbcType=VARCHAR}
     where os_id = #{osId,jdbcType=INTEGER}
   </update>
+
+  <select id="validateCodeWhenInsert" resultType="int">
+    select count(1) from othspendings where os_code = #{code} and companyId =#{companyId}
+  </select>
+  <select id="validateCodeWhenUpdate" resultType="int" >
+    select count(1) from othspendings where os_code = #{code} and os_id != #{id} and companyId =#{companyId}
+  </select>
+
+  <select id="selectOthspendingsBycondition" resultMap="BaseResultMap">
+    select
+    <include refid="Base_Column_List" />
+    from Othspendings
+    <where>
+      <if test="con != null">
+        ${con}
+      </if>
+      <if test="companyId != null">
+        and   othspendings.companyId = #{companyId}
+      </if>
+    </where>  order by os_id
+  </select>
+
+  <select id="selectOthspendingsListByCondition" resultMap="BaseResultMap">
+    select
+    <include refid="Base_Column_List" />
+    from Othspendings
+    left join othspendingsdetail on os_id=osd_orid
+    <where>
+      <if test="con != null">
+        ${con}
+      </if>
+      <if test="companyId != null">
+        and   othspendings.companyId = #{companyId}
+      </if>
+    </where>  order by os_id
+  </select>
 </mapper>

+ 85 - 91
applications/money/money-server/src/main/resources/mapper/OthspendingsdetailMapper.xml

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

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

@@ -2,7 +2,7 @@
 <!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.PaybalanceMapper">
   <resultMap id="BaseResultMap" type="com.usoftchina.saas.money.po.Paybalance">
-    <id column="pb_id" jdbcType="INTEGER" property="pb_id" />
+    <id column="pb_id" jdbcType="INTEGER" property="id" />
     <result column="pb_code" jdbcType="VARCHAR" property="pb_code" />
     <result column="pb_kind" jdbcType="VARCHAR" property="pb_kind" />
     <result column="pb_date" jdbcType="TIMESTAMP" property="pb_date" />
@@ -21,7 +21,7 @@
     <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="companyId" jdbcType="INTEGER" property="companyId" />
     <result column="updaterId" jdbcType="INTEGER" property="updaterId" />
     <result column="updatedate" jdbcType="TIMESTAMP" property="updateTime" />
     <result column="pb_text1" jdbcType="VARCHAR" property="pb_text1" />
@@ -104,11 +104,11 @@
     select 
     <include refid="Base_Column_List" />
     from paybalance
-    where pb_id = #{pb_id,jdbcType=INTEGER}
+    where pb_id = #{id,jdbcType=INTEGER}
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
     delete from paybalance
-    where pb_id = #{pb_id,jdbcType=INTEGER}
+    where pb_id = #{id,jdbcType=INTEGER}
   </delete>
   <delete id="deleteByExample" parameterType="com.usoftchina.saas.money.po.PaybalanceExample">
     delete from paybalance
@@ -141,9 +141,6 @@
   <insert id="insertSelective" parameterType="com.usoftchina.saas.money.po.Paybalance">
     insert into paybalance
     <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="pb_id != null">
-        pb_id,
-      </if>
       <if test="pb_code != null">
         pb_code,
       </if>
@@ -198,8 +195,8 @@
       <if test="pb_remark != null">
         pb_remark,
       </if>
-      <if test="companyid != null">
-        companyid,
+      <if test="companyId != null">
+        companyId,
       </if>
       <if test="updaterId != null">
         updaterId,
@@ -224,9 +221,6 @@
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="pb_id != null">
-        #{pb_id,jdbcType=INTEGER},
-      </if>
       <if test="pb_code != null">
         #{pb_code,jdbcType=VARCHAR},
       </if>
@@ -281,8 +275,8 @@
       <if test="pb_remark != null">
         #{pb_remark,jdbcType=VARCHAR},
       </if>
-      <if test="companyid != null">
-        #{companyid,jdbcType=INTEGER},
+      <if test="companyId != null">
+        #{companyId,jdbcType=INTEGER},
       </if>
       <if test="updaterId != null">
         #{updaterId,jdbcType=INTEGER},
@@ -306,6 +300,9 @@
         #{pb_text5,jdbcType=VARCHAR},
       </if>
     </trim>
+    <selectKey resultType="Long" keyProperty="id" order="AFTER">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
   </insert>
   <select id="countByExample" parameterType="com.usoftchina.saas.money.po.PaybalanceExample" resultType="java.lang.Integer">
     select count(*) from paybalance
@@ -313,128 +310,7 @@
       <include refid="Example_Where_Clause" />
     </if>
   </select>
-  <update id="updateByExampleSelective" parameterType="map">
-    update paybalance
-    <set>
-      <if test="record.pb_id != null">
-        pb_id = #{record.pb_id,jdbcType=INTEGER},
-      </if>
-      <if test="record.pb_code != null">
-        pb_code = #{record.pb_code,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pb_kind != null">
-        pb_kind = #{record.pb_kind,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pb_date != null">
-        pb_date = #{record.pb_date,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.pb_vendid != null">
-        pb_vendid = #{record.pb_vendid,jdbcType=INTEGER},
-      </if>
-      <if test="record.pb_vendcode != null">
-        pb_vendcode = #{record.pb_vendcode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pb_vendname != null">
-        pb_vendname = #{record.pb_vendname,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pb_manname != null">
-        pb_manname = #{record.pb_manname,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pb_pdamount != null">
-        pb_pdamount = #{record.pb_pdamount,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pb_pbdamount != null">
-        pb_pbdamount = #{record.pb_pbdamount,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pb_preamount != null">
-        pb_preamount = #{record.pb_preamount,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pb_discounts != null">
-        pb_discounts = #{record.pb_discounts,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pb_havebalance != null">
-        pb_havebalance = #{record.pb_havebalance,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pb_recorderid != null">
-        pb_recorderid = #{record.pb_recorderid,jdbcType=INTEGER},
-      </if>
-      <if test="record.pb_recorder != null">
-        pb_recorder = #{record.pb_recorder,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pb_recorddate != null">
-        pb_recorddate = #{record.pb_recorddate,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.pb_status != null">
-        pb_status = #{record.pb_status,jdbcType=INTEGER},
-      </if>
-      <if test="record.pb_statuscode != null">
-        pb_statuscode = #{record.pb_statuscode,jdbcType=DECIMAL},
-      </if>
-      <if test="record.pb_remark != null">
-        pb_remark = #{record.pb_remark,jdbcType=VARCHAR},
-      </if>
-      <if test="record.companyid != null">
-        companyid = #{record.companyid,jdbcType=INTEGER},
-      </if>
-      <if test="record.updaterId != null">
-        updaterId = #{record.updaterId,jdbcType=INTEGER},
-      </if>
-      <if test="record.updatedate != null">
-        updatedate = #{record.updatedate,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.pb_text1 != null">
-        pb_text1 = #{record.pb_text1,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pb_text2 != null">
-        pb_text2 = #{record.pb_text2,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pb_text3 != null">
-        pb_text3 = #{record.pb_text3,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pb_text4 != null">
-        pb_text4 = #{record.pb_text4,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pb_text5 != null">
-        pb_text5 = #{record.pb_text5,jdbcType=VARCHAR},
-      </if>
-    </set>
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByExample" parameterType="map">
-    update paybalance
-    set pb_id = #{record.pb_id,jdbcType=INTEGER},
-      pb_code = #{record.pb_code,jdbcType=VARCHAR},
-      pb_kind = #{record.pb_kind,jdbcType=VARCHAR},
-      pb_date = #{record.pb_date,jdbcType=TIMESTAMP},
-      pb_vendid = #{record.pb_vendid,jdbcType=INTEGER},
-      pb_vendcode = #{record.pb_vendcode,jdbcType=VARCHAR},
-      pb_vendname = #{record.pb_vendname,jdbcType=VARCHAR},
-      pb_manname = #{record.pb_manname,jdbcType=VARCHAR},
-      pb_pdamount = #{record.pb_pdamount,jdbcType=DOUBLE},
-      pb_pbdamount = #{record.pb_pbdamount,jdbcType=DOUBLE},
-      pb_preamount = #{record.pb_preamount,jdbcType=DOUBLE},
-      pb_discounts = #{record.pb_discounts,jdbcType=DOUBLE},
-      pb_havebalance = #{record.pb_havebalance,jdbcType=DOUBLE},
-      pb_recorderid = #{record.pb_recorderid,jdbcType=INTEGER},
-      pb_recorder = #{record.pb_recorder,jdbcType=VARCHAR},
-      pb_recorddate = #{record.pb_recorddate,jdbcType=TIMESTAMP},
-      pb_status = #{record.pb_status,jdbcType=INTEGER},
-      pb_statuscode = #{record.pb_statuscode,jdbcType=DECIMAL},
-      pb_remark = #{record.pb_remark,jdbcType=VARCHAR},
-      companyid = #{record.companyid,jdbcType=INTEGER},
-      updaterId = #{record.updaterId,jdbcType=INTEGER},
-      updatedate = #{record.updatedate,jdbcType=TIMESTAMP},
-      pb_text1 = #{record.pb_text1,jdbcType=VARCHAR},
-      pb_text2 = #{record.pb_text2,jdbcType=VARCHAR},
-      pb_text3 = #{record.pb_text3,jdbcType=VARCHAR},
-      pb_text4 = #{record.pb_text4,jdbcType=VARCHAR},
-      pb_text5 = #{record.pb_text5,jdbcType=VARCHAR}
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
+
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.money.po.Paybalance">
     update paybalance
     <set>
@@ -517,7 +393,7 @@
         pb_text5 = #{pb_text5,jdbcType=VARCHAR},
       </if>
     </set>
-    where pb_id = #{pb_id,jdbcType=INTEGER}
+    where pb_id = #{id,jdbcType=INTEGER}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.money.po.Paybalance">
     update paybalance
@@ -539,7 +415,7 @@
       pb_status = #{pb_status,jdbcType=INTEGER},
       pb_statuscode = #{pb_statuscode,jdbcType=DECIMAL},
       pb_remark = #{pb_remark,jdbcType=VARCHAR},
-      companyid = #{companyid,jdbcType=INTEGER},
+      companyId = #{companyId,jdbcType=INTEGER},
       updaterId = #{updaterId,jdbcType=INTEGER},
       updatedate = #{updatedate,jdbcType=TIMESTAMP},
       pb_text1 = #{pb_text1,jdbcType=VARCHAR},
@@ -547,7 +423,43 @@
       pb_text3 = #{pb_text3,jdbcType=VARCHAR},
       pb_text4 = #{pb_text4,jdbcType=VARCHAR},
       pb_text5 = #{pb_text5,jdbcType=VARCHAR}
-    where pb_id = #{pb_id,jdbcType=INTEGER}
+    where pb_id = #{id,jdbcType=INTEGER}
   </update>
 
+  <select id="selectPaybalanceBycondition" resultMap="BaseResultMap">
+    select
+    <include refid="Base_Column_List" />
+    from Paybalance
+    <where>
+      <if test="con != null">
+        ${con}
+      </if>
+      <if test="companyId != null">
+        and   paybalance.companyId = #{companyId}
+      </if>
+    </where>  order by pb_id
+  </select>
+
+  <select id="selectPaybalanceListByCondition" resultMap="BaseResultMap">
+  select
+  <include refid="Base_Column_List" />
+  from paybalance
+    left join paybalancedet on pb_id=pd_rbid left join paybalancedetail on pb_id=pbd_rbid
+    <where>
+      <if test="con != null">
+        ${con}
+      </if>
+      <if test="companyId != null">
+        and   paybalance.companyId = #{companyId}
+      </if>
+    </where>  order by pb_id
+  </select>
+
+  <select id="validateCodeWhenInsert" resultType="int">
+    select count(1) from paybalance where pb_code = #{code} and companyId =#{companyId}
+  </select>
+  <select id="validateCodeWhenUpdate" resultType="int" >
+    select count(1) from paybalance where pb_code = #{code} and pb_id != #{id} and companyId =#{companyId}
+  </select>
+
 </mapper>

+ 119 - 97
applications/money/money-server/src/main/resources/mapper/PaybalancedetMapper.xml

@@ -13,7 +13,7 @@
     <result column="pd_paymethod" property="pdPaymethod" jdbcType="VARCHAR" />
     <result column="pd_paycode" property="pdPaycode" jdbcType="VARCHAR" />
     <result column="pd_remark" property="pdRemark" jdbcType="VARCHAR" />
-    <result column="companyId" property="companyid" jdbcType="INTEGER" />
+    <result column="companyId" property="companyId" jdbcType="INTEGER" />
     <result column="updaterId" property="updaterid" jdbcType="INTEGER" />
     <result column="updatedate" property="updatedate" jdbcType="TIMESTAMP" />
     <result column="pd_text1" property="pdText1" jdbcType="VARCHAR" />
@@ -35,12 +35,12 @@
   </select>
   <delete id="deleteItem" parameterType="java.lang.Integer" >
     delete from paybalancedet
-    where pd_id = #{pdId,jdbcType=INTEGER}
+    where pd_id = #{id,jdbcType=INTEGER}
   </delete>
 
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
     delete from paybalancedet
-    where pd_rbid = #{pdRbid,jdbcType=INTEGER}
+    where pd_rbid = #{id,jdbcType=INTEGER}
   </delete>
 
   <!--<insert id="insert" parameterType="com.usoftchina.saas.money.po.Paybalancedet" >-->
@@ -55,7 +55,7 @@
     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},
+      #{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})
@@ -64,183 +64,177 @@
   <insert id="insertSelective" parameterType="com.usoftchina.saas.money.po.Paybalancedet" >
     insert into paybalancedet
     <trim prefix="(" suffix=")" suffixOverrides="," >
-      <if test="pdId != null" >
-        pd_id,
-      </if>
-      <if test="pdRbid != null" >
+      <if test="pd_rbid != null" >
         pd_rbid,
       </if>
-      <if test="pdDetno != null" >
+      <if test="pd_detno != null" >
         pd_detno,
       </if>
-      <if test="pdYm != null" >
+      <if test="pd_ym != null" >
         pd_ym,
       </if>
-      <if test="pdBankid != null" >
+      <if test="pd_bankid != null" >
         pd_bankid,
       </if>
-      <if test="pdBankcode != null" >
+      <if test="pd_bankcode != null" >
         pd_bankcode,
       </if>
-      <if test="pdBankname != null" >
+      <if test="pd_bankname != null" >
         pd_bankname,
       </if>
-      <if test="pdAmount != null" >
+      <if test="pd_amount != null" >
         pd_amount,
       </if>
-      <if test="pdPaymethod != null" >
+      <if test="pd_paymethod != null" >
         pd_paymethod,
       </if>
-      <if test="pdPaycode != null" >
+      <if test="pd_paycode != null" >
         pd_paycode,
       </if>
-      <if test="pdRemark != null" >
+      <if test="pd_remark != null" >
         pd_remark,
       </if>
-      <if test="companyid != null" >
+      <if test="companyId != null" >
         companyId,
       </if>
-      <if test="updaterid != null" >
+      <if test="updaterId != null" >
         updaterId,
       </if>
       <if test="updatedate != null" >
         updatedate,
       </if>
-      <if test="pdText1 != null" >
+      <if test="pd_text1 != null" >
         pd_text1,
       </if>
-      <if test="pdText2 != null" >
+      <if test="pd_text2 != null" >
         pd_text2,
       </if>
-      <if test="pdText3 != null" >
+      <if test="pd_text3 != null" >
         pd_text3,
       </if>
-      <if test="pdText4 != null" >
+      <if test="pd_text4 != null" >
         pd_text4,
       </if>
-      <if test="pdText5 != null" >
+      <if test="pd_text5 != null" >
         pd_text5,
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
-      <if test="pdId != null" >
-        #{pdId,jdbcType=INTEGER},
+      <if test="pd_rbid != null" >
+        #{pd_rbid,jdbcType=INTEGER},
       </if>
-      <if test="pdRbid != null" >
-        #{pdRbid,jdbcType=INTEGER},
+      <if test="pd_detno != null" >
+        #{pd_detno,jdbcType=INTEGER},
       </if>
-      <if test="pdDetno != null" >
-        #{pdDetno,jdbcType=INTEGER},
+      <if test="pd_ym != null" >
+        #{pd_ym,jdbcType=INTEGER},
       </if>
-      <if test="pdYm != null" >
-        #{pdYm,jdbcType=INTEGER},
+      <if test="pd_bankid != null" >
+        #{pd_bankid,jdbcType=INTEGER},
       </if>
-      <if test="pdBankid != null" >
-        #{pdBankid,jdbcType=INTEGER},
+      <if test="pd_bankcode != null" >
+        #{pd_bankcode,jdbcType=VARCHAR},
       </if>
-      <if test="pdBankcode != null" >
-        #{pdBankcode,jdbcType=VARCHAR},
+      <if test="pd_bankname != null" >
+        #{pd_bankname,jdbcType=VARCHAR},
       </if>
-      <if test="pdBankname != null" >
-        #{pdBankname,jdbcType=VARCHAR},
+      <if test="pd_amount != null" >
+        #{pd_amount,jdbcType=DOUBLE},
       </if>
-      <if test="pdAmount != null" >
-        #{pdAmount,jdbcType=DOUBLE},
+      <if test="pd_paymethod != null" >
+        #{pd_paymethod,jdbcType=VARCHAR},
       </if>
-      <if test="pdPaymethod != null" >
-        #{pdPaymethod,jdbcType=VARCHAR},
+      <if test="pd_paycode != null" >
+        #{pd_paycode,jdbcType=VARCHAR},
       </if>
-      <if test="pdPaycode != null" >
-        #{pdPaycode,jdbcType=VARCHAR},
+      <if test="pd_remark != null" >
+        #{pd_remark,jdbcType=VARCHAR},
       </if>
-      <if test="pdRemark != null" >
-        #{pdRemark,jdbcType=VARCHAR},
+      <if test="companyId != null" >
+        #{companyId,jdbcType=INTEGER},
       </if>
-      <if test="companyid != null" >
-        #{companyid,jdbcType=INTEGER},
-      </if>
-      <if test="updaterid != null" >
-        #{updaterid,jdbcType=INTEGER},
+      <if test="updaterId != null" >
+        #{updaterId,jdbcType=INTEGER},
       </if>
       <if test="updatedate != null" >
         #{updatedate,jdbcType=TIMESTAMP},
       </if>
-      <if test="pdText1 != null" >
-        #{pdText1,jdbcType=VARCHAR},
+      <if test="pd_text1 != null" >
+        #{pd_text1,jdbcType=VARCHAR},
       </if>
-      <if test="pdText2 != null" >
-        #{pdText2,jdbcType=VARCHAR},
+      <if test="pd_text2 != null" >
+        #{pd_text2,jdbcType=VARCHAR},
       </if>
-      <if test="pdText3 != null" >
-        #{pdText3,jdbcType=VARCHAR},
+      <if test="pd_text3 != null" >
+        #{pd_text3,jdbcType=VARCHAR},
       </if>
-      <if test="pdText4 != null" >
-        #{pdText4,jdbcType=VARCHAR},
+      <if test="pd_text4 != null" >
+        #{pd_text4,jdbcType=VARCHAR},
       </if>
-      <if test="pdText5 != null" >
-        #{pdText5,jdbcType=VARCHAR},
+      <if test="pd_text5 != null" >
+        #{pd_text5,jdbcType=VARCHAR},
       </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.money.po.Paybalancedet" >
     update paybalancedet
     <set >
-      <if test="pdRbid != null" >
-        pd_rbid = #{pdRbid,jdbcType=INTEGER},
+      <if test="pd_rbid != null" >
+        pd_rbid = #{pd_rbid,jdbcType=INTEGER},
       </if>
-      <if test="pdDetno != null" >
-        pd_detno = #{pdDetno,jdbcType=INTEGER},
+      <if test="pd_detno != null" >
+        pd_detno = #{pd_detno,jdbcType=INTEGER},
       </if>
-      <if test="pdYm != null" >
-        pd_ym = #{pdYm,jdbcType=INTEGER},
+      <if test="pd_ym != null" >
+        pd_ym = #{pd_ym,jdbcType=INTEGER},
       </if>
-      <if test="pdBankid != null" >
-        pd_bankid = #{pdBankid,jdbcType=INTEGER},
+      <if test="pd_bankid != null" >
+        pd_bankid = #{pd_bankid,jdbcType=INTEGER},
       </if>
-      <if test="pdBankcode != null" >
-        pd_bankcode = #{pdBankcode,jdbcType=VARCHAR},
+      <if test="pd_bankcode != null" >
+        pd_bankcode = #{pd_bankcode,jdbcType=VARCHAR},
       </if>
-      <if test="pdBankname != null" >
-        pd_bankname = #{pdBankname,jdbcType=VARCHAR},
+      <if test="pd_bankname != null" >
+        pd_bankname = #{pd_bankname,jdbcType=VARCHAR},
       </if>
-      <if test="pdAmount != null" >
-        pd_amount = #{pdAmount,jdbcType=DOUBLE},
+      <if test="pd_amount != null" >
+        pd_amount = #{pd_amount,jdbcType=DOUBLE},
       </if>
-      <if test="pdPaymethod != null" >
-        pd_paymethod = #{pdPaymethod,jdbcType=VARCHAR},
+      <if test="pd_paymethod != null" >
+        pd_paymethod = #{pd_paymethod,jdbcType=VARCHAR},
       </if>
-      <if test="pdPaycode != null" >
-        pd_paycode = #{pdPaycode,jdbcType=VARCHAR},
+      <if test="pd_paycode != null" >
+        pd_paycode = #{pd_paycode,jdbcType=VARCHAR},
       </if>
-      <if test="pdRemark != null" >
-        pd_remark = #{pdRemark,jdbcType=VARCHAR},
+      <if test="pd_remark != null" >
+        pd_remark = #{pd_remark,jdbcType=VARCHAR},
       </if>
-      <if test="companyid != null" >
-        companyId = #{companyid,jdbcType=INTEGER},
+      <if test="companyId != null" >
+        companyId = #{companyId,jdbcType=INTEGER},
       </if>
-      <if test="updaterid != null" >
-        updaterId = #{updaterid,jdbcType=INTEGER},
+      <if test="updaterId != null" >
+        updaterId = #{updaterId,jdbcType=INTEGER},
       </if>
       <if test="updatedate != null" >
         updatedate = #{updatedate,jdbcType=TIMESTAMP},
       </if>
-      <if test="pdText1 != null" >
-        pd_text1 = #{pdText1,jdbcType=VARCHAR},
+      <if test="pd_text1 != null" >
+        pd_text1 = #{pd_text1,jdbcType=VARCHAR},
       </if>
-      <if test="pdText2 != null" >
-        pd_text2 = #{pdText2,jdbcType=VARCHAR},
+      <if test="pd_text2 != null" >
+        pd_text2 = #{pd_text2,jdbcType=VARCHAR},
       </if>
-      <if test="pdText3 != null" >
-        pd_text3 = #{pdText3,jdbcType=VARCHAR},
+      <if test="pd_text3 != null" >
+        pd_text3 = #{pd_text3,jdbcType=VARCHAR},
       </if>
-      <if test="pdText4 != null" >
-        pd_text4 = #{pdText4,jdbcType=VARCHAR},
+      <if test="pd_text4 != null" >
+        pd_text4 = #{pd_text4,jdbcType=VARCHAR},
       </if>
-      <if test="pdText5 != null" >
-        pd_text5 = #{pdText5,jdbcType=VARCHAR},
+      <if test="pd_text5 != null" >
+        pd_text5 = #{pd_text5,jdbcType=VARCHAR},
       </if>
     </set>
-    where pd_id = #{pdId,jdbcType=INTEGER}
+    where pd_id = #{id,jdbcType=INTEGER}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.money.po.Paybalancedet" >
     update paybalancedet
@@ -254,7 +248,7 @@
       pd_paymethod = #{pdPaymethod,jdbcType=VARCHAR},
       pd_paycode = #{pdPaycode,jdbcType=VARCHAR},
       pd_remark = #{pdRemark,jdbcType=VARCHAR},
-      companyId = #{companyid,jdbcType=INTEGER},
+      companyId = #{companyId,jdbcType=INTEGER},
       updaterId = #{updaterid,jdbcType=INTEGER},
       updatedate = #{updatedate,jdbcType=TIMESTAMP},
       pd_text1 = #{pdText1,jdbcType=VARCHAR},
@@ -264,4 +258,32 @@
       pd_text5 = #{pdText5,jdbcType=VARCHAR}
     where pd_id = #{pdId,jdbcType=INTEGER}
   </update>
+  <select id="selectPaybalanceBycondition" resultMap="BaseResultMap">
+    select
+    <include refid="Base_Column_List" />
+    from paybalance
+    <where>
+      <if test="con != null">
+        ${con}
+      </if>
+      <if test="companyId != null">
+        and   paybalance.companyId = #{companyId}
+      </if>
+    </where>  order by pb_id
+  </select>
+
+  <select id="selectPaybalanceListByCondition" resultMap="BaseResultMap">
+    select
+    <include refid="Base_Column_List" />
+    from paybalance
+    left join paybalancedet on pb_id=pd_rbid left join paybalancedetail on pb_id=pbd_rbid
+    <where>
+      <if test="con != null">
+        ${con}
+      </if>
+      <if test="companyId != null">
+        and   paybalance.companyId = #{companyId}
+      </if>
+    </where>  order by pb_id
+  </select>
 </mapper>

+ 119 - 147
applications/money/money-server/src/main/resources/mapper/PaybalancedetailMapper.xml

@@ -2,45 +2,45 @@
 <!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.PaybalancedetailMapper" >
   <resultMap id="BaseResultMap" type="com.usoftchina.saas.money.po.Paybalancedetail" >
-    <id column="pbd_id" property="pbdId" jdbcType="INTEGER" />
-    <result column="pbd_pbid" property="pbdPbid" jdbcType="INTEGER" />
-    <result column="pbd_detno" property="pbdDetno" jdbcType="INTEGER" />
-    <result column="pbd_ym" property="pbdYm" jdbcType="INTEGER" />
-    <result column="pbd_sild" property="pbdSild" jdbcType="INTEGER" />
-    <result column="pbd_slcode" property="pbdSlcode" jdbcType="VARCHAR" />
-    <result column="pbd_slkind" property="pbdSlkind" jdbcType="VARCHAR" />
-    <result column="pbd_sldate" property="pbdSldate" jdbcType="TIMESTAMP" />
-    <result column="pbd_amount" property="pbdAmount" jdbcType="DOUBLE" />
-    <result column="pbd_nowbalance" property="pbdNowbalance" jdbcType="DOUBLE" />
-    <result column="pbd_remark" property="pbdRemark" jdbcType="VARCHAR" />
-    <result column="companyId" property="companyid" jdbcType="INTEGER" />
-    <result column="updaterId" property="updaterid" jdbcType="INTEGER" />
+    <id column="pbd_id" property="id" jdbcType="INTEGER" />
+    <result column="pbd_pbid" property="pbd_pbid" jdbcType="INTEGER" />
+    <result column="pbd_detno" property="pbd_detno" jdbcType="INTEGER" />
+    <result column="pbd_ym" property="pbd_ym" jdbcType="INTEGER" />
+    <result column="pbd_sild" property="pbd_sild" jdbcType="INTEGER" />
+    <result column="pbd_slcode" property="pbd_slcode" jdbcType="VARCHAR" />
+    <result column="pbd_slkind" property="pbd_slkind" jdbcType="VARCHAR" />
+    <result column="pbd_sldate" property="pbd_sldate" jdbcType="TIMESTAMP" />
+    <result column="pbd_amount" property="pbd_amount" jdbcType="DOUBLE" />
+    <result column="pbd_nowbalance" property="pbd_nowbalance" jdbcType="DOUBLE" />
+    <result column="pbd_remark" property="pbd_remark" 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="pbd_text1" property="pbdText1" jdbcType="VARCHAR" />
-    <result column="pbd_text2" property="pbdText2" jdbcType="VARCHAR" />
-    <result column="pbd_text3" property="pbdText3" jdbcType="VARCHAR" />
-    <result column="pbd_text4" property="pbdText4" jdbcType="VARCHAR" />
-    <result column="pbd_text5" property="pbdText5" jdbcType="VARCHAR" />
+    <result column="pbd_text1" property="pbd_text1" jdbcType="VARCHAR" />
+    <result column="pbd_text2" property="pbd_text2" jdbcType="VARCHAR" />
+    <result column="pbd_text3" property="pbd_text3" jdbcType="VARCHAR" />
+    <result column="pbd_text4" property="pbd_text4" jdbcType="VARCHAR" />
+    <result column="pbd_text5" property="pbd_text5" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Base_Column_List" >
-    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_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
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
-    select 
+    select
     <include refid="Base_Column_List" />
     from paybalancedetail
-    where pbd_id = #{pbdId,jdbcType=INTEGER}
+    where pbd_id = #{id,jdbcType=INTEGER}
   </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+  <delete id="deleteItem" parameterType="java.lang.Integer" >
     delete from paybalancedetail
-    where pbd_pbid = #{pbdPbid,jdbcType=INTEGER}
+    where pbd_id = #{id,jdbcType=INTEGER}
   </delete>
 
-  <delete id="deleteByItem" parameterType="java.lang.Integer" >
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
     delete from paybalancedetail
-    where pbd_id = #{pdbId,jdbcType=INTEGER}
+    where rbd_rbid = #{id,jdbcType=INTEGER}
   </delete>
 
   <insert id="insert" parameterType="com.usoftchina.saas.money.po.Paybalancedetail" >
@@ -51,215 +51,187 @@
       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},
-      #{pbdText5,jdbcType=VARCHAR})
+    values (#{id,jdbcType=INTEGER}, #{pbd_pbid,jdbcType=INTEGER}, #{pbd_detno,jdbcType=INTEGER},
+      #{pbd_ym,jdbcType=INTEGER}, #{pbd_sild,jdbcType=INTEGER}, #{pbd_slcode,jdbcType=VARCHAR},
+      #{pbd_slkind,jdbcType=VARCHAR}, #{pbd_sldate,jdbcType=TIMESTAMP}, #{pbd_amount,jdbcType=DOUBLE},
+      #{pbd_nowbalance,jdbcType=DOUBLE}, #{pbd_remark,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER},
+      #{updaterId,jdbcType=INTEGER}, #{updatedate,jdbcType=TIMESTAMP}, #{pbd_text1,jdbcType=VARCHAR},
+      #{pbd_text2,jdbcType=VARCHAR}, #{pbd_text3,jdbcType=VARCHAR}, #{pbd_text4,jdbcType=VARCHAR},
+      #{pbd_text5,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.saas.money.po.Paybalancedetail" >
     insert into paybalancedetail
     <trim prefix="(" suffix=")" suffixOverrides="," >
-      <if test="pbdId != null" >
-        pbd_id,
-      </if>
-      <if test="pbdPbid != null" >
+      <if test="pbd_pbid != null" >
         pbd_pbid,
       </if>
-      <if test="pbdDetno != null" >
+      <if test="pbd_detno != null" >
         pbd_detno,
       </if>
-      <if test="pbdYm != null" >
+      <if test="pbd_ym != null" >
         pbd_ym,
       </if>
-      <if test="pbdSild != null" >
+      <if test="pbd_sild != null" >
         pbd_sild,
       </if>
-      <if test="pbdSlcode != null" >
+      <if test="pbd_slcode != null" >
         pbd_slcode,
       </if>
-      <if test="pbdSlkind != null" >
+      <if test="pbd_slkind != null" >
         pbd_slkind,
       </if>
-      <if test="pbdSldate != null" >
+      <if test="pbd_sldate != null" >
         pbd_sldate,
       </if>
-      <if test="pbdAmount != null" >
+      <if test="pbd_amount != null" >
         pbd_amount,
       </if>
-      <if test="pbdNowbalance != null" >
+      <if test="pbd_nowbalance != null" >
         pbd_nowbalance,
       </if>
-      <if test="pbdRemark != null" >
+      <if test="pbd_remark != null" >
         pbd_remark,
       </if>
-      <if test="companyid != null" >
+      <if test="companyId != null" >
         companyId,
       </if>
-      <if test="updaterid != null" >
+      <if test="updaterId != null" >
         updaterId,
       </if>
       <if test="updatedate != null" >
         updatedate,
       </if>
-      <if test="pbdText1 != null" >
+      <if test="pbd_text1 != null" >
         pbd_text1,
       </if>
-      <if test="pbdText2 != null" >
+      <if test="pbd_text2 != null" >
         pbd_text2,
       </if>
-      <if test="pbdText3 != null" >
+      <if test="pbd_text3 != null" >
         pbd_text3,
       </if>
-      <if test="pbdText4 != null" >
+      <if test="pbd_text4 != null" >
         pbd_text4,
       </if>
-      <if test="pbdText5 != null" >
+      <if test="pbd_text5 != null" >
         pbd_text5,
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
-      <if test="pbdId != null" >
-        #{pbdId,jdbcType=INTEGER},
+      <if test="pbd_pbid != null" >
+        #{pbd_pbid,jdbcType=INTEGER},
       </if>
-      <if test="pbdPbid != null" >
-        #{pbdPbid,jdbcType=INTEGER},
+      <if test="pbd_detno != null" >
+        #{pbd_detno,jdbcType=INTEGER},
       </if>
-      <if test="pbdDetno != null" >
-        #{pbdDetno,jdbcType=INTEGER},
+      <if test="pbd_ym != null" >
+        #{pbd_ym,jdbcType=INTEGER},
       </if>
-      <if test="pbdYm != null" >
-        #{pbdYm,jdbcType=INTEGER},
+      <if test="pbd_sild != null" >
+        #{pbd_sild,jdbcType=INTEGER},
       </if>
-      <if test="pbdSild != null" >
-        #{pbdSild,jdbcType=INTEGER},
+      <if test="pbd_slcode != null" >
+        #{pbd_slcode,jdbcType=VARCHAR},
       </if>
-      <if test="pbdSlcode != null" >
-        #{pbdSlcode,jdbcType=VARCHAR},
+      <if test="pbd_slkind != null" >
+        #{pbd_slkind,jdbcType=VARCHAR},
       </if>
-      <if test="pbdSlkind != null" >
-        #{pbdSlkind,jdbcType=VARCHAR},
+      <if test="pbd_sldate != null" >
+        #{pbd_sldate,jdbcType=TIMESTAMP},
       </if>
-      <if test="pbdSldate != null" >
-        #{pbdSldate,jdbcType=TIMESTAMP},
+      <if test="pbd_amount != null" >
+        #{pbd_amount,jdbcType=DOUBLE},
       </if>
-      <if test="pbdAmount != null" >
-        #{pbdAmount,jdbcType=DOUBLE},
+      <if test="pbd_nowbalance != null" >
+        #{pbd_nowbalance,jdbcType=DOUBLE},
       </if>
-      <if test="pbdNowbalance != null" >
-        #{pbdNowbalance,jdbcType=DOUBLE},
+      <if test="pbd_remark != null" >
+        #{pbd_remark,jdbcType=VARCHAR},
       </if>
-      <if test="pbdRemark != null" >
-        #{pbdRemark,jdbcType=VARCHAR},
+      <if test="companyId != null" >
+        #{companyId,jdbcType=INTEGER},
       </if>
-      <if test="companyid != null" >
-        #{companyid,jdbcType=INTEGER},
-      </if>
-      <if test="updaterid != null" >
-        #{updaterid,jdbcType=INTEGER},
+      <if test="updaterId != null" >
+        #{updaterId,jdbcType=INTEGER},
       </if>
       <if test="updatedate != null" >
         #{updatedate,jdbcType=TIMESTAMP},
       </if>
-      <if test="pbdText1 != null" >
-        #{pbdText1,jdbcType=VARCHAR},
+      <if test="pbd_text1 != null" >
+        #{pbd_text1,jdbcType=VARCHAR},
       </if>
-      <if test="pbdText2 != null" >
-        #{pbdText2,jdbcType=VARCHAR},
+      <if test="pbd_text2 != null" >
+        #{pbd_text2,jdbcType=VARCHAR},
       </if>
-      <if test="pbdText3 != null" >
-        #{pbdText3,jdbcType=VARCHAR},
+      <if test="pbd_text3 != null" >
+        #{pbd_text3,jdbcType=VARCHAR},
       </if>
-      <if test="pbdText4 != null" >
-        #{pbdText4,jdbcType=VARCHAR},
+      <if test="pbd_text4 != null" >
+        #{pbd_text4,jdbcType=VARCHAR},
       </if>
-      <if test="pbdText5 != null" >
-        #{pbdText5,jdbcType=VARCHAR},
+      <if test="pbd_text5 != null" >
+        #{pbd_text5,jdbcType=VARCHAR},
       </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.money.po.Paybalancedetail" >
     update paybalancedetail
     <set >
-      <if test="pbdPbid != null" >
-        pbd_pbid = #{pbdPbid,jdbcType=INTEGER},
+      <if test="pbd_pbid != null" >
+        pbd_pbid = #{pbd_pbid,jdbcType=INTEGER},
       </if>
-      <if test="pbdDetno != null" >
-        pbd_detno = #{pbdDetno,jdbcType=INTEGER},
+      <if test="pbd_detno != null" >
+        pbd_detno = #{pbd_detno,jdbcType=INTEGER},
       </if>
-      <if test="pbdYm != null" >
-        pbd_ym = #{pbdYm,jdbcType=INTEGER},
+      <if test="pbd_ym != null" >
+        pbd_ym = #{pbd_ym,jdbcType=INTEGER},
       </if>
-      <if test="pbdSild != null" >
-        pbd_sild = #{pbdSild,jdbcType=INTEGER},
+      <if test="pbd_sild != null" >
+        pbd_sild = #{pbd_sild,jdbcType=INTEGER},
       </if>
-      <if test="pbdSlcode != null" >
-        pbd_slcode = #{pbdSlcode,jdbcType=VARCHAR},
+      <if test="pbd_slcode != null" >
+        pbd_slcode = #{pbd_slcode,jdbcType=VARCHAR},
       </if>
-      <if test="pbdSlkind != null" >
-        pbd_slkind = #{pbdSlkind,jdbcType=VARCHAR},
+      <if test="pbd_slkind != null" >
+        pbd_slkind = #{pbd_slkind,jdbcType=VARCHAR},
       </if>
-      <if test="pbdSldate != null" >
-        pbd_sldate = #{pbdSldate,jdbcType=TIMESTAMP},
+      <if test="pbd_sldate != null" >
+        pbd_sldate = #{pbd_sldate,jdbcType=TIMESTAMP},
       </if>
-      <if test="pbdAmount != null" >
-        pbd_amount = #{pbdAmount,jdbcType=DOUBLE},
+      <if test="pbd_amount != null" >
+        pbd_amount = #{pbd_amount,jdbcType=DOUBLE},
       </if>
-      <if test="pbdNowbalance != null" >
-        pbd_nowbalance = #{pbdNowbalance,jdbcType=DOUBLE},
+      <if test="pbd_nowbalance != null" >
+        pbd_nowbalance = #{pbd_nowbalance,jdbcType=DOUBLE},
       </if>
-      <if test="pbdRemark != null" >
-        pbd_remark = #{pbdRemark,jdbcType=VARCHAR},
+      <if test="pbd_remark != null" >
+        pbd_remark = #{pbd_remark,jdbcType=VARCHAR},
       </if>
-      <if test="companyid != null" >
-        companyId = #{companyid,jdbcType=INTEGER},
+      <if test="companyId != null" >
+        companyId = #{companyId,jdbcType=INTEGER},
       </if>
-      <if test="updaterid != null" >
-        updaterId = #{updaterid,jdbcType=INTEGER},
+      <if test="updaterId != null" >
+        updaterId = #{updaterId,jdbcType=INTEGER},
       </if>
       <if test="updatedate != null" >
         updatedate = #{updatedate,jdbcType=TIMESTAMP},
       </if>
-      <if test="pbdText1 != null" >
-        pbd_text1 = #{pbdText1,jdbcType=VARCHAR},
+      <if test="pbd_text1 != null" >
+        pbd_text1 = #{pbd_text1,jdbcType=VARCHAR},
       </if>
-      <if test="pbdText2 != null" >
-        pbd_text2 = #{pbdText2,jdbcType=VARCHAR},
+      <if test="pbd_text2 != null" >
+        pbd_text2 = #{pbd_text2,jdbcType=VARCHAR},
       </if>
-      <if test="pbdText3 != null" >
-        pbd_text3 = #{pbdText3,jdbcType=VARCHAR},
+      <if test="pbd_text3 != null" >
+        pbd_text3 = #{pbd_text3,jdbcType=VARCHAR},
       </if>
-      <if test="pbdText4 != null" >
-        pbd_text4 = #{pbdText4,jdbcType=VARCHAR},
+      <if test="pbd_text4 != null" >
+        pbd_text4 = #{pbd_text4,jdbcType=VARCHAR},
       </if>
-      <if test="pbdText5 != null" >
-        pbd_text5 = #{pbdText5,jdbcType=VARCHAR},
+      <if test="pbd_text5 != null" >
+        pbd_text5 = #{pbd_text5,jdbcType=VARCHAR},
       </if>
     </set>
-    where pbd_id = #{pbdId,jdbcType=INTEGER}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.money.po.Paybalancedetail" >
-    update paybalancedetail
-    set pbd_pbid = #{pbdPbid,jdbcType=INTEGER},
-      pbd_detno = #{pbdDetno,jdbcType=INTEGER},
-      pbd_ym = #{pbdYm,jdbcType=INTEGER},
-      pbd_sild = #{pbdSild,jdbcType=INTEGER},
-      pbd_slcode = #{pbdSlcode,jdbcType=VARCHAR},
-      pbd_slkind = #{pbdSlkind,jdbcType=VARCHAR},
-      pbd_sldate = #{pbdSldate,jdbcType=TIMESTAMP},
-      pbd_amount = #{pbdAmount,jdbcType=DOUBLE},
-      pbd_nowbalance = #{pbdNowbalance,jdbcType=DOUBLE},
-      pbd_remark = #{pbdRemark,jdbcType=VARCHAR},
-      companyId = #{companyid,jdbcType=INTEGER},
-      updaterId = #{updaterid,jdbcType=INTEGER},
-      updatedate = #{updatedate,jdbcType=TIMESTAMP},
-      pbd_text1 = #{pbdText1,jdbcType=VARCHAR},
-      pbd_text2 = #{pbdText2,jdbcType=VARCHAR},
-      pbd_text3 = #{pbdText3,jdbcType=VARCHAR},
-      pbd_text4 = #{pbdText4,jdbcType=VARCHAR},
-      pbd_text5 = #{pbdText5,jdbcType=VARCHAR}
-    where pbd_id = #{pbdId,jdbcType=INTEGER}
+    where pbd_id = #{id,jdbcType=INTEGER}
   </update>
 </mapper>

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

@@ -2,7 +2,7 @@
 <!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.RecbalanceMapper">
   <resultMap id="BaseResultMap" type="com.usoftchina.saas.money.po.Recbalance">
-    <id column="rb_id" jdbcType="INTEGER" property="rb_id" />
+    <id column="rb_id" jdbcType="INTEGER" property="id" />
     <result column="rb_code" jdbcType="VARCHAR" property="rb_code" />
     <result column="rb_kind" jdbcType="VARCHAR" property="rb_kind" />
     <result column="rb_date" jdbcType="TIMESTAMP" property="rb_date" />
@@ -112,18 +112,41 @@
     select 
     <include refid="Base_Column_List" />
     from recbalance
-    where rb_id = #{rb_id,jdbcType=INTEGER}
+    where rb_id = #{id,jdbcType=INTEGER}
   </select>
 
-  <select id="selectList" resultMap="BaseResultMap">
+  <select id="selectRecbalanceBycondition" resultMap="BaseResultMap">
     select
     <include refid="Base_Column_List" />
     from recbalance
+    <where>
+      <if test="con != null">
+        ${con}
+      </if>
+      <if test="companyId != null">
+        and   recbalance.companyId = #{companyId}
+      </if>
+    </where>  order by rb_id
+  </select>
+
+  <select id="selectRecbalanceListByCondition" resultMap="BaseResultMap">
+    select
+    <include refid="Base_Column_List" />
+    from recbalance
+    left join recbalancedet on rb_id=rd_rbid left join recbalancedetail on rb_id=rbd_rbid
+    <where>
+      <if test="con != null">
+        ${con}
+      </if>
+      <if test="companyId != null">
+        and   recbalance.companyId = #{companyId}
+      </if>
+    </where>  order by rb_id
   </select>
 
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
     delete from recbalance
-    where rb_id = #{rb_id,jdbcType=INTEGER}
+    where rb_id = #{id,jdbcType=INTEGER}
   </delete>
   <delete id="deleteByExample" parameterType="com.usoftchina.saas.money.po.RecbalanceExample">
     delete from recbalance
@@ -152,13 +175,13 @@
       #{updateTime,jdbcType=TIMESTAMP}, #{rb_text1,jdbcType=VARCHAR}, #{rb_text2,jdbcType=VARCHAR},
       #{rb_text3,jdbcType=VARCHAR}, #{rb_text4,jdbcType=VARCHAR}, #{rb_text5,jdbcType=VARCHAR}
       )
+    <selectKey resultType="Long" keyProperty="id" order="AFTER">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
   </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.saas.money.po.Recbalance">
     insert into recbalance
     <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="rb_id != null">
-        rb_id,
-      </if>
       <if test="rb_code != null">
         rb_code,
       </if>
@@ -239,9 +262,6 @@
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="rb_id != null">
-        #{rb_id,jdbcType=INTEGER},
-      </if>
       <if test="rb_code != null">
         #{rb_code,jdbcType=VARCHAR},
       </if>
@@ -321,6 +341,9 @@
         #{rb_text5,jdbcType=VARCHAR},
       </if>
     </trim>
+    <selectKey resultType="Long" keyProperty="id" order="AFTER">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
   </insert>
   <select id="countByExample" parameterType="com.usoftchina.saas.money.po.RecbalanceExample" resultType="java.lang.Integer">
     select count(*) from recbalance
@@ -532,7 +555,7 @@
         rb_text5 = #{rb_text5,jdbcType=VARCHAR},
       </if>
     </set>
-    where rb_id = #{rb_id,jdbcType=INTEGER}
+    where rb_id = #{id,jdbcType=INTEGER}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.money.po.Recbalance">
     update recbalance
@@ -562,7 +585,14 @@
       rb_text3 = #{rb_text3,jdbcType=VARCHAR},
       rb_text4 = #{rb_text4,jdbcType=VARCHAR},
       rb_text5 = #{rb_text5,jdbcType=VARCHAR}
-    where rb_id = #{rb_id,jdbcType=INTEGER}
+    where rb_id = #{id,jdbcType=INTEGER}
   </update>
 
+  <select id="validateCodeWhenInsert" resultType="int">
+    select count(1) from recbalance where rb_code = #{code} and companyId =#{companyId}
+  </select>
+  <select id="validateCodeWhenUpdate" resultType="int" >
+    select count(1) from recbalance where rb_code = #{code} and rb_id != #{id} and companyId =#{companyId}
+  </select>
+
 </mapper>

+ 8 - 152
applications/money/money-server/src/main/resources/mapper/RecbalancedetMapper.xml

@@ -2,7 +2,7 @@
 <!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.RecbalancedetMapper">
   <resultMap id="BaseResultMap" type="com.usoftchina.saas.money.po.Recbalancedet">
-    <id column="rd_id" jdbcType="INTEGER" property="rd_id" />
+    <id column="rd_id" jdbcType="INTEGER" property="id" />
     <result column="rd_rbid" jdbcType="INTEGER" property="rd_rbid" />
     <result column="rd_detno" jdbcType="INTEGER" property="rd_detno" />
     <result column="rd_ym" jdbcType="INTEGER" property="rd_ym" />
@@ -85,29 +85,15 @@
     rd_paymethod, rd_paycode, rd_remark, companyId, updaterId, updatedate, rd_text1,
     rd_text2, rd_text3, rd_text4, rd_text5
   </sql>
-  <select id="selectByExample" parameterType="com.usoftchina.saas.money.po.RecbalancedetExample" resultMap="BaseResultMap">
-    select
-    <if test="distinct">
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    from recbalancedet
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-    <if test="orderByClause != null">
-      order by ${orderByClause}
-    </if>
-  </select>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     select 
     <include refid="Base_Column_List" />
     from recbalancedet
-    where rd_id = #{rd_id,jdbcType=INTEGER}
+    where rd_id = #{id,jdbcType=INTEGER}
   </select>
   <delete id="deleteItem" parameterType="java.lang.Integer">
     delete from recbalancedet
-    where rd_id = #{rd_id,jdbcType=INTEGER}
+    where rd_id = #{id,jdbcType=INTEGER}
   </delete>
 
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
@@ -115,12 +101,6 @@
     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">
-      <include refid="Example_Where_Clause" />
-    </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,
@@ -129,7 +109,7 @@
       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},
+    values (#{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},
@@ -140,9 +120,6 @@
   <insert id="insertSelective" parameterType="com.usoftchina.saas.money.po.Recbalancedet">
     insert into recbalancedet
     <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="rd_id != null">
-        rd_id,
-      </if>
       <if test="rd_rbid != null">
         rd_rbid,
       </if>
@@ -180,7 +157,7 @@
         updaterId,
       </if>
       <if test="updateTime != null">
-        updateTime,
+        updatedate,
       </if>
       <if test="rd_text1 != null">
         rd_text1,
@@ -199,9 +176,6 @@
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="rd_id != null">
-        #{rd_id,jdbcType=INTEGER},
-      </if>
       <if test="rd_rbid != null">
         #{rd_rbid,jdbcType=INTEGER},
       </if>
@@ -258,107 +232,11 @@
       </if>
     </trim>
   </insert>
-  <select id="countByExample" parameterType="com.usoftchina.saas.money.po.RecbalancedetExample" resultType="java.lang.Integer">
-    select count(*) from recbalancedet
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </select>
-  <update id="updateByExampleSelective" parameterType="map">
-    update recbalancedet
-    <set>
-      <if test="record.rd_id != null">
-        rd_id = #{record.rd_id,jdbcType=INTEGER},
-      </if>
-      <if test="record.rd_rbid != null">
-        rd_rbid = #{record.rd_rbid,jdbcType=INTEGER},
-      </if>
-      <if test="record.rd_detno != null">
-        rd_detno = #{record.rd_detno,jdbcType=INTEGER},
-      </if>
-      <if test="record.rd_ym != null">
-        rd_ym = #{record.rd_ym,jdbcType=INTEGER},
-      </if>
-      <if test="record.rd_bankid != null">
-        rd_bankid = #{record.rd_bankid,jdbcType=INTEGER},
-      </if>
-      <if test="record.rd_bankcode != null">
-        rd_bankcode = #{record.rd_bankcode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.rd_bankname != null">
-        rd_bankname = #{record.rd_bankname,jdbcType=VARCHAR},
-      </if>
-      <if test="record.rd_amount != null">
-        rd_amount = #{record.rd_amount,jdbcType=DOUBLE},
-      </if>
-      <if test="record.rd_paymethod != null">
-        rd_paymethod = #{record.rd_paymethod,jdbcType=VARCHAR},
-      </if>
-      <if test="record.rd_paycode != null">
-        rd_paycode = #{record.rd_paycode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.rd_remark != null">
-        rd_remark = #{record.rd_remark,jdbcType=VARCHAR},
-      </if>
-      <if test="record.companyId != null">
-        companyId = #{record.companyId,jdbcType=INTEGER},
-      </if>
-      <if test="record.updaterId != null">
-        updaterId = #{record.updaterId,jdbcType=INTEGER},
-      </if>
-      <if test="record.updateTime != null">
-        updatedate = #{record.updateTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.rd_text1 != null">
-        rd_text1 = #{record.rd_text1,jdbcType=VARCHAR},
-      </if>
-      <if test="record.rd_text2 != null">
-        rd_text2 = #{record.rd_text2,jdbcType=VARCHAR},
-      </if>
-      <if test="record.rd_text3 != null">
-        rd_text3 = #{record.rd_text3,jdbcType=VARCHAR},
-      </if>
-      <if test="record.rd_text4 != null">
-        rd_text4 = #{record.rd_text4,jdbcType=VARCHAR},
-      </if>
-      <if test="record.rd_text5 != null">
-        rd_text5 = #{record.rd_text5,jdbcType=VARCHAR},
-      </if>
-    </set>
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByExample" parameterType="map">
-    update recbalancedet
-    set rd_id = #{record.rd_id,jdbcType=INTEGER},
-      rd_rbid = #{record.rd_rbid,jdbcType=INTEGER},
-      rd_detno = #{record.rd_detno,jdbcType=INTEGER},
-      rd_ym = #{record.rd_ym,jdbcType=INTEGER},
-      rd_bankid = #{record.rd_bankid,jdbcType=INTEGER},
-      rd_bankcode = #{record.rd_bankcode,jdbcType=VARCHAR},
-      rd_bankname = #{record.rd_bankname,jdbcType=VARCHAR},
-      rd_amount = #{record.rd_amount,jdbcType=DOUBLE},
-      rd_paymethod = #{record.rd_paymethod,jdbcType=VARCHAR},
-      rd_paycode = #{record.rd_paycode,jdbcType=VARCHAR},
-      rd_remark = #{record.rd_remark,jdbcType=VARCHAR},
-      companyId = #{record.companyId,jdbcType=INTEGER},
-      updaterId = #{record.updaterId,jdbcType=INTEGER},
-      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},
-      rd_text4 = #{record.rd_text4,jdbcType=VARCHAR},
-      rd_text5 = #{record.rd_text5,jdbcType=VARCHAR}
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.money.po.Recbalancedet">
     update recbalancedet
     <set>
-      <if test="rd_rbid != null">
-        rd_rbid = #{rd_rbid,jdbcType=INTEGER},
+      <if test="id != null">
+        rd_rbid = #{id,jdbcType=INTEGER},
       </if>
       <if test="rd_detno != null">
         rd_detno = #{rd_detno,jdbcType=INTEGER},
@@ -412,29 +290,7 @@
         rd_text5 = #{rd_text5,jdbcType=VARCHAR},
       </if>
     </set>
-    where rd_id = #{rd_id,jdbcType=INTEGER}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.money.po.Recbalancedet">
-    update recbalancedet
-    set rd_rbid = #{rd_rbid,jdbcType=INTEGER},
-      rd_detno = #{rd_detno,jdbcType=INTEGER},
-      rd_ym = #{rd_ym,jdbcType=INTEGER},
-      rd_bankid = #{rd_bankid,jdbcType=INTEGER},
-      rd_bankcode = #{rd_bankcode,jdbcType=VARCHAR},
-      rd_bankname = #{rd_bankname,jdbcType=VARCHAR},
-      rd_amount = #{rd_amount,jdbcType=DOUBLE},
-      rd_paymethod = #{rd_paymethod,jdbcType=VARCHAR},
-      rd_paycode = #{rd_paycode,jdbcType=VARCHAR},
-      rd_remark = #{rd_remark,jdbcType=VARCHAR},
-      companyId = #{companyId,jdbcType=INTEGER},
-      updaterId = #{updaterId,jdbcType=INTEGER},
-      updatedate = #{updateTime,jdbcType=TIMESTAMP},
-      rd_text1 = #{rd_text1,jdbcType=VARCHAR},
-      rd_text2 = #{rd_text2,jdbcType=VARCHAR},
-      rd_text3 = #{rd_text3,jdbcType=VARCHAR},
-      rd_text4 = #{rd_text4,jdbcType=VARCHAR},
-      rd_text5 = #{rd_text5,jdbcType=VARCHAR}
-    where rd_id = #{rd_id,jdbcType=INTEGER}
+    where rd_id = #{id,jdbcType=INTEGER}
   </update>
 
 </mapper>

+ 114 - 142
applications/money/money-server/src/main/resources/mapper/RecbalancedetailMapper.xml

@@ -2,25 +2,25 @@
 <!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.RecbalancedetailMapper" >
   <resultMap id="BaseResultMap" type="com.usoftchina.saas.money.po.Recbalancedetail" >
-    <id column="rbd_id" property="rbdId" jdbcType="INTEGER" />
-    <result column="rbd_rbid" property="rbdRbid" jdbcType="INTEGER" />
-    <result column="rbd_detno" property="rbdDetno" jdbcType="INTEGER" />
-    <result column="rbd_ym" property="rbdYm" jdbcType="INTEGER" />
-    <result column="rbd_slid" property="rbdSlid" jdbcType="INTEGER" />
-    <result column="rbd_slcode" property="rbdSlcode" jdbcType="VARCHAR" />
-    <result column="rbd_slkind" property="rbdSlkind" jdbcType="VARCHAR" />
-    <result column="rbd_sldate" property="rbdSldate" jdbcType="TIMESTAMP" />
-    <result column="rbd_amount" property="rbdAmount" jdbcType="DOUBLE" />
-    <result column="rbd_nowbalance" property="rbdNowbalance" jdbcType="DOUBLE" />
-    <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="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" />
-    <result column="rbd_text4" property="rbdText4" jdbcType="VARCHAR" />
-    <result column="rbd_text5" property="rbdText5" jdbcType="VARCHAR" />
+    <id column="rbd_id" property="id" jdbcType="INTEGER" />
+    <result column="rbd_rbid" property="rbd_rbid" jdbcType="INTEGER" />
+    <result column="rbd_detno" property="rbd_detno" jdbcType="INTEGER" />
+    <result column="rbd_ym" property="rbd_ym" jdbcType="INTEGER" />
+    <result column="rbd_slid" property="rbd_slid" jdbcType="INTEGER" />
+    <result column="rbd_slcode" property="rbd_slcode" jdbcType="VARCHAR" />
+    <result column="rbd_slkind" property="rbd_slkind" jdbcType="VARCHAR" />
+    <result column="rbd_sldate" property="rbd_sldate" jdbcType="TIMESTAMP" />
+    <result column="rbd_amount" property="rbd_amount" jdbcType="DOUBLE" />
+    <result column="rbd_nowbalance" property="rbd_nowbalance" jdbcType="DOUBLE" />
+    <result column="rbd_remark" property="rbd_remark" 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="rbd_text1" property="rbd_text1" jdbcType="VARCHAR" />
+    <result column="rbd_text2" property="rbd_text2" jdbcType="VARCHAR" />
+    <result column="rbd_text3" property="rbd_text3" jdbcType="VARCHAR" />
+    <result column="rbd_text4" property="rbd_text4" jdbcType="VARCHAR" />
+    <result column="rbd_text5" property="rbd_text5" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Base_Column_List" >
     rbd_id, rbd_rbid, rbd_detno, rbd_ym, rbd_slid, rbd_slcode, rbd_slkind, rbd_sldate, 
@@ -31,16 +31,16 @@
     select 
     <include refid="Base_Column_List" />
     from recbalancedetail
-    where rbd_id = #{rbdId,jdbcType=INTEGER}
+    where rd_rbid = #{id,jdbcType=INTEGER}
   </select>
   <delete id="deleteItem" parameterType="java.lang.Integer" >
     delete from recbalancedetail
-    where rbd_id = #{rbdId,jdbcType=INTEGER}
+    where rbd_id = #{id,jdbcType=INTEGER}
   </delete>
 
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
     delete from recbalancedetail
-    where rbd_rbid = #{rbdRbid,jdbcType=INTEGER}
+    where rbd_rbid = #{id,jdbcType=INTEGER}
   </delete>
 
   <insert id="insert" parameterType="com.usoftchina.saas.money.po.Recbalancedetail" >
@@ -51,215 +51,187 @@
       updaterId, updatedate, rbd_text1,
       rbd_text2, rbd_text3, rbd_text4,
       rbd_text5)
-    values (#{rbdId,jdbcType=INTEGER}, #{rbdRbid,jdbcType=INTEGER}, #{rbdDetno,jdbcType=INTEGER},
+    values (#{id,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},
+      #{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" >
     insert into recbalancedetail
     <trim prefix="(" suffix=")" suffixOverrides="," >
-      <if test="rbdId != null" >
-        rbd_id,
-      </if>
-      <if test="rbdRbid != null" >
+      <if test="rbd_rbid != null" >
         rbd_rbid,
       </if>
-      <if test="rbdDetno != null" >
+      <if test="rbd_detno != null" >
         rbd_detno,
       </if>
-      <if test="rbdYm != null" >
+      <if test="rbd_ym != null" >
         rbd_ym,
       </if>
-      <if test="rbdSlid != null" >
+      <if test="rbd_slid != null" >
         rbd_slid,
       </if>
-      <if test="rbdSlcode != null" >
+      <if test="rbd_slcode != null" >
         rbd_slcode,
       </if>
-      <if test="rbdSlkind != null" >
+      <if test="rbd_slkind != null" >
         rbd_slkind,
       </if>
-      <if test="rbdSldate != null" >
+      <if test="rbd_sldate != null" >
         rbd_sldate,
       </if>
-      <if test="rbdAmount != null" >
+      <if test="rbd_amount != null" >
         rbd_amount,
       </if>
-      <if test="rbdNowbalance != null" >
+      <if test="rbd_nowbalance != null" >
         rbd_nowbalance,
       </if>
-      <if test="rbdRemark != null" >
+      <if test="rbd_remark != null" >
         rbd_remark,
       </if>
       <if test="companyId != null" >
-        companyId,
+        companyid,
       </if>
-      <if test="updaterid != null" >
+      <if test="updaterId != null" >
         updaterId,
       </if>
-      <if test="updateTime != null" >
-        updateTime,
+      <if test="updatedate != null" >
+        updatedate,
       </if>
-      <if test="rbdText1 != null" >
+      <if test="rbd_text1 != null" >
         rbd_text1,
       </if>
-      <if test="rbdText2 != null" >
+      <if test="rbd_text2 != null" >
         rbd_text2,
       </if>
-      <if test="rbdText3 != null" >
+      <if test="rbd_text3 != null" >
         rbd_text3,
       </if>
-      <if test="rbdText4 != null" >
+      <if test="rbd_text4 != null" >
         rbd_text4,
       </if>
-      <if test="rbdText5 != null" >
+      <if test="rbd_text5 != null" >
         rbd_text5,
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
-      <if test="rbdId != null" >
-        #{rbdId,jdbcType=INTEGER},
-      </if>
-      <if test="rbdRbid != null" >
-        #{rbdRbid,jdbcType=INTEGER},
+      <if test="rbd_rbid != null" >
+        #{rbd_rbid,jdbcType=INTEGER},
       </if>
-      <if test="rbdDetno != null" >
-        #{rbdDetno,jdbcType=INTEGER},
+      <if test="rbd_detno != null" >
+        #{rbd_detno,jdbcType=INTEGER},
       </if>
-      <if test="rbdYm != null" >
-        #{rbdYm,jdbcType=INTEGER},
+      <if test="rbd_ym != null" >
+        #{rbd_ym,jdbcType=INTEGER},
       </if>
-      <if test="rbdSlid != null" >
-        #{rbdSlid,jdbcType=INTEGER},
+      <if test="rbd_slid != null" >
+        #{rbd_slid,jdbcType=INTEGER},
       </if>
-      <if test="rbdSlcode != null" >
-        #{rbdSlcode,jdbcType=VARCHAR},
+      <if test="rbd_slcode != null" >
+        #{rbd_slcode,jdbcType=VARCHAR},
       </if>
-      <if test="rbdSlkind != null" >
-        #{rbdSlkind,jdbcType=VARCHAR},
+      <if test="rbd_slkind != null" >
+        #{rbd_slkind,jdbcType=VARCHAR},
       </if>
-      <if test="rbdSldate != null" >
-        #{rbdSldate,jdbcType=TIMESTAMP},
+      <if test="rbd_sldate != null" >
+        #{rbd_sldate,jdbcType=TIMESTAMP},
       </if>
-      <if test="rbdAmount != null" >
-        #{rbdAmount,jdbcType=DOUBLE},
+      <if test="rbd_amount != null" >
+        #{rbd_amount,jdbcType=DOUBLE},
       </if>
-      <if test="rbdNowbalance != null" >
-        #{rbdNowbalance,jdbcType=DOUBLE},
+      <if test="rbd_nowbalance != null" >
+        #{rbd_nowbalance,jdbcType=DOUBLE},
       </if>
-      <if test="rbdRemark != null" >
-        #{rbdRemark,jdbcType=VARCHAR},
+      <if test="rbd_remark != null" >
+        #{rbd_remark,jdbcType=VARCHAR},
       </if>
       <if test="companyId != null" >
         #{companyId,jdbcType=INTEGER},
       </if>
-      <if test="updaterid != null" >
-        #{updaterid,jdbcType=INTEGER},
+      <if test="updaterId != null" >
+        #{updaterId,jdbcType=INTEGER},
       </if>
-      <if test="updateTime != null" >
-        #{updateTime,jdbcType=TIMESTAMP},
+      <if test="updatedate != null" >
+        #{updatedate,jdbcType=TIMESTAMP},
       </if>
-      <if test="rbdText1 != null" >
-        #{rbdText1,jdbcType=VARCHAR},
+      <if test="rbd_text1 != null" >
+        #{rbd_text1,jdbcType=VARCHAR},
       </if>
-      <if test="rbdText2 != null" >
-        #{rbdText2,jdbcType=VARCHAR},
+      <if test="rbd_text2 != null" >
+        #{rbd_text2,jdbcType=VARCHAR},
       </if>
-      <if test="rbdText3 != null" >
-        #{rbdText3,jdbcType=VARCHAR},
+      <if test="rbd_text3 != null" >
+        #{rbd_text3,jdbcType=VARCHAR},
       </if>
-      <if test="rbdText4 != null" >
-        #{rbdText4,jdbcType=VARCHAR},
+      <if test="rbd_text4 != null" >
+        #{rbd_text4,jdbcType=VARCHAR},
       </if>
-      <if test="rbdText5 != null" >
-        #{rbdText5,jdbcType=VARCHAR},
+      <if test="rbd_text5 != null" >
+        #{rbd_text5,jdbcType=VARCHAR},
       </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.money.po.Recbalancedetail" >
     update recbalancedetail
     <set >
-      <if test="rbdRbid != null" >
-        rbd_rbid = #{rbdRbid,jdbcType=INTEGER},
+      <if test="id != null" >
+        rbd_rbid = #{id,jdbcType=INTEGER},
       </if>
-      <if test="rbdDetno != null" >
-        rbd_detno = #{rbdDetno,jdbcType=INTEGER},
+      <if test="rbd_detno != null" >
+        rbd_detno = #{rbd_detno,jdbcType=INTEGER},
       </if>
-      <if test="rbdYm != null" >
-        rbd_ym = #{rbdYm,jdbcType=INTEGER},
+      <if test="rbd_ym != null" >
+        rbd_ym = #{rbd_ym,jdbcType=INTEGER},
       </if>
-      <if test="rbdSlid != null" >
-        rbd_slid = #{rbdSlid,jdbcType=INTEGER},
+      <if test="rbd_slid != null" >
+        rbd_slid = #{rbd_slid,jdbcType=INTEGER},
       </if>
-      <if test="rbdSlcode != null" >
-        rbd_slcode = #{rbdSlcode,jdbcType=VARCHAR},
+      <if test="rbd_slcode != null" >
+        rbd_slcode = #{rbd_slcode,jdbcType=VARCHAR},
       </if>
-      <if test="rbdSlkind != null" >
-        rbd_slkind = #{rbdSlkind,jdbcType=VARCHAR},
+      <if test="rbd_slkind != null" >
+        rbd_slkind = #{rbd_slkind,jdbcType=VARCHAR},
       </if>
-      <if test="rbdSldate != null" >
-        rbd_sldate = #{rbdSldate,jdbcType=TIMESTAMP},
+      <if test="rbd_sldate != null" >
+        rbd_sldate = #{rbd_sldate,jdbcType=TIMESTAMP},
       </if>
-      <if test="rbdAmount != null" >
-        rbd_amount = #{rbdAmount,jdbcType=DOUBLE},
+      <if test="rbd_amount != null" >
+        rbd_amount = #{rbd_amount,jdbcType=DOUBLE},
       </if>
-      <if test="rbdNowbalance != null" >
-        rbd_nowbalance = #{rbdNowbalance,jdbcType=DOUBLE},
+      <if test="rbd_nowbalance != null" >
+        rbd_nowbalance = #{rbd_nowbalance,jdbcType=DOUBLE},
       </if>
-      <if test="rbdRemark != null" >
-        rbd_remark = #{rbdRemark,jdbcType=VARCHAR},
+      <if test="rbd_remark != null" >
+        rbd_remark = #{rbd_remark,jdbcType=VARCHAR},
       </if>
-      <if test="companyId != null" >
-        companyId = #{companyId,jdbcType=INTEGER},
+      <if test="companyid != null" >
+        companyid = #{companyid,jdbcType=INTEGER},
       </if>
-      <if test="updaterid != null" >
-        updaterId = #{updaterid,jdbcType=INTEGER},
+      <if test="updaterId != null" >
+        updaterId = #{updaterId,jdbcType=INTEGER},
       </if>
-      <if test="updateTime != null" >
-        updatedate = #{updateTime,jdbcType=TIMESTAMP},
+      <if test="updatedate != null" >
+        updatedate = #{updatedate,jdbcType=TIMESTAMP},
       </if>
-      <if test="rbdText1 != null" >
-        rbd_text1 = #{rbdText1,jdbcType=VARCHAR},
+      <if test="rbd_text1 != null" >
+        rbd_text1 = #{rbd_text1,jdbcType=VARCHAR},
       </if>
-      <if test="rbdText2 != null" >
-        rbd_text2 = #{rbdText2,jdbcType=VARCHAR},
+      <if test="rbd_text2 != null" >
+        rbd_text2 = #{rbd_text2,jdbcType=VARCHAR},
       </if>
-      <if test="rbdText3 != null" >
-        rbd_text3 = #{rbdText3,jdbcType=VARCHAR},
+      <if test="rbd_text3 != null" >
+        rbd_text3 = #{rbd_text3,jdbcType=VARCHAR},
       </if>
-      <if test="rbdText4 != null" >
-        rbd_text4 = #{rbdText4,jdbcType=VARCHAR},
+      <if test="rbd_text4 != null" >
+        rbd_text4 = #{rbd_text4,jdbcType=VARCHAR},
       </if>
-      <if test="rbdText5 != null" >
-        rbd_text5 = #{rbdText5,jdbcType=VARCHAR},
+      <if test="rbd_text5 != null" >
+        rbd_text5 = #{rbd_text5,jdbcType=VARCHAR},
       </if>
     </set>
-    where rbd_id = #{rbdId,jdbcType=INTEGER}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.money.po.Recbalancedetail" >
-    update recbalancedetail
-    set rbd_rbid = #{rbdRbid,jdbcType=INTEGER},
-      rbd_detno = #{rbdDetno,jdbcType=INTEGER},
-      rbd_ym = #{rbdYm,jdbcType=INTEGER},
-      rbd_slid = #{rbdSlid,jdbcType=INTEGER},
-      rbd_slcode = #{rbdSlcode,jdbcType=VARCHAR},
-      rbd_slkind = #{rbdSlkind,jdbcType=VARCHAR},
-      rbd_sldate = #{rbdSldate,jdbcType=TIMESTAMP},
-      rbd_amount = #{rbdAmount,jdbcType=DOUBLE},
-      rbd_nowbalance = #{rbdNowbalance,jdbcType=DOUBLE},
-      rbd_remark = #{rbdRemark,jdbcType=VARCHAR},
-      companyId = #{companyId,jdbcType=INTEGER},
-      updaterId = #{updaterid,jdbcType=INTEGER},
-      updatedate = #{updateTime,jdbcType=TIMESTAMP},
-      rbd_text1 = #{rbdText1,jdbcType=VARCHAR},
-      rbd_text2 = #{rbdText2,jdbcType=VARCHAR},
-      rbd_text3 = #{rbdText3,jdbcType=VARCHAR},
-      rbd_text4 = #{rbdText4,jdbcType=VARCHAR},
-      rbd_text5 = #{rbdText5,jdbcType=VARCHAR}
-    where rbd_id = #{rbdId,jdbcType=INTEGER}
+    where rbd_id = #{id,jdbcType=INTEGER}
   </update>
 </mapper>

+ 25 - 0
frontend/saas-web/app/model/money/PayBalance1.js

@@ -0,0 +1,25 @@
+Ext.define('saas.model.money.PayBalance1', {
+    extend: 'saas.model.Base',
+    fields: [
+        { name: 'id', type: 'int' },
+        { name: 'pd_id', type: 'int' },
+        { name: 'pd_rbid', type: 'int' },
+        { name: 'pd_detno', type: 'int' },
+        { name: 'pd_ym', type: 'int' },
+        { name: 'pd_bankid', type: 'int' },
+        { name: 'pd_bankcode', type: 'string' },
+        { name: 'pd_bankname', type: 'string' },
+        { name: 'pd_amount', type: 'float' },
+        { name: 'pd_paymethod', type: 'string' },
+        { name: 'pd_paycode', type: 'string' },
+        { name: 'pd_remark', type: 'string' },
+        { name: 'companyid', type: 'int' },
+        { name: 'updaterId', type: 'int' },
+        { name: 'updatedate', type: 'date' },
+        { name: 'pd_text1', type: 'string' },
+        { name: 'pd_text2', type: 'string' },
+        { name: 'pd_text3', type: 'string' },
+        { name: 'pd_text4', type: 'string' },
+        { name: 'pd_text5', type: 'string' }
+    ]
+});

+ 25 - 0
frontend/saas-web/app/model/money/PayBalance2.js

@@ -0,0 +1,25 @@
+Ext.define('saas.model.money.PayBalance2', {
+    extend: 'saas.model.Base',
+    fields: [
+        { name: 'id', type: 'int' },
+        { name: 'pbd_id', type: 'int' },
+        { name: 'pbd_pbid', type: 'int' },
+        { name: 'pbd_detno', type: 'int' },
+        { name: 'pbd_ym', type: 'int' },
+        { name: 'pbd_slid', type: 'int' },
+        { name: 'pbd_slcode', type: 'string' },
+        { name: 'pbd_slkind', type: 'string' },
+        { name: 'pbd_sldate', type: 'date' },
+        { name: 'pbd_amount', type: 'float' },
+        { name: 'pbd_nowbalance', type: 'float' },
+        { name: 'pbd_remark', type: 'string' },
+        { name: 'companyid', type: 'int' },
+        { name: 'updaterId', type: 'int' },
+        { name: 'updatedate', type: 'date' },
+        { name: 'pd_text1', type: 'string' },
+        { name: 'pd_text2', type: 'string' },
+        { name: 'pd_text3', type: 'string' },
+        { name: 'pd_text4', type: 'string' },
+        { name: 'pd_text5', type: 'string' }
+    ]
+});

+ 6 - 2
frontend/saas-web/app/model/money/RecBalance1.js

@@ -1,9 +1,13 @@
 Ext.define('saas.model.money.RecBalance1', {
     extend: 'saas.model.Base',
     fields: [
-        { name: 'rd_detno', type: 'number' },
+        { name: 'id', type: 'int' },
+        { name: 'rd_detno', type: 'int' },
+        { name: 'rd_ym', type: 'int' },
+        { name: 'rd_bankid', type: 'int' },
+        { name: 'rd_bankcode', type: 'string' },
         { name: 'rd_bankname', type: 'string' },
-        { name: 'rd_amount', type: 'number' },
+        { name: 'rd_amount', type: 'float' },
         { name: 'rd_paymethod', type: 'string' },
         { name: 'rd_paycode', type: 'string' },
         { name: 'rd_remark', type: 'string' }

+ 7 - 6
frontend/saas-web/app/model/money/RecBalance2.js

@@ -1,14 +1,15 @@
 Ext.define('saas.model.money.RecBalance2', {
     extend: 'saas.model.Base',
     fields: [
-        { name: 'rbd_detno', type: 'number' },
+        { name: 'id', type: 'int' },
+        { name: 'rbd_detno', type: 'int' },
+        { name: 'rbd_ym', type: 'int' },
+        { name: 'rbd_slid', type: 'int' },
         { name: 'rbd_slcode', type: 'string' },
         { name: 'rbd_slkind', type: 'string' },
         { name: 'rbd_sldate', type: 'date' },
-        { name: 'rbd_amount', type: 'number' },
-        { name: 'rbd_remark', type: 'number' },
-        { name: 'pbd_nowbalance', type: 'number' },
-        { name: 'pbd_nowbalance', type: 'number' },
-        { name: 'pbd_nowbalance', type: 'number' }
+        { name: 'rbd_amount', type: 'float' },
+        { name: 'rbd_nowbalance', type: 'float' },
+        { name: 'rbd_remark', type: 'string' }
     ]
 });

+ 1 - 0
frontend/saas-web/app/model/purchase/prodIODetail.js

@@ -36,6 +36,7 @@ Ext.define('saas.model.purchase.ProdIODetail', {
         { name: 'pd_yqty', type: 'int' },
         { name: 'pd_remark', type: 'string' },
         { name: 'pd_ioid', type: 'int' },
+        { name: 'pd_delivery', type: 'date' }
     ],
     //一对一映射
     associations: [{ type: 'hasOne', model: 'saas.model.document.Product', associationKey: 'product'}]

+ 4 - 7
frontend/saas-web/app/util/BaseUtil.js

@@ -2,8 +2,7 @@ Ext.define('saas.util.BaseUtil', {
 
     /**
      * 发起Ajax请求
-     * @param url: 请求路径
-     * @param params: 请求参数
+     * @param config: 请求参数
      */
     request: function (config) {
         var url = config.url,
@@ -27,20 +26,18 @@ Ext.define('saas.util.BaseUtil', {
                 success: function (response, opts) {
                     var res = Ext.decode(response.responseText);
                     if(res.success) {
-                        return resolve(response);
+                        return resolve(res);
                     }else {
-                        // Ext.toast(res.message || '请求错误');
                         console.error('server request failure with code ' + res.code + '.');
                         console.error('failure message: ' + res.message);
-                        return reject(response);
+                        return reject(res);
                     }
                 },
                 failure: function (response, opts) {
-                    // Ext.toast('请求错误');
                     console.error('server-side failure with status code ' + response);
                     return reject(response);
                 }
             });
         })
-    }
+    },
 });

+ 3 - 3
frontend/saas-web/app/util/Errors.js

@@ -42,16 +42,16 @@ Ext.define('saas.util.Errors', {
                 if (error.code === -32096) {    // READONLY_SESSION
                     // The session is read-only (demo version), let's display a temporary message
                     // and return false since this exception should not be considered as an error.
-                    Ext.toast(error.message, 2000);
+                    showToast(error.message);
                     return false;
                 }
                 if (error.code === -32001 && form) {
                     form.setErrors(this.toForm(error));
                 } else {
-                    Ext.Msg.alert(error.name + ' Error', error.message);
+                    showToast(error.name + ' Error:' + error.message);
                 }
             } else if (Ext.isString(error)) {
-                Ext.Msg.alert('Error', error);
+                showToast('Error:' + error);
             }
 
             return true;

+ 26 - 7
frontend/saas-web/app/util/FormUtil.js

@@ -23,8 +23,7 @@ Ext.define('saas.util.FormUtil', {
         brr = brr.concat(form.defaultItems);
 
         this.BaseUtil.request({url, async: false})
-        .then(function(response) {
-            var res = Ext.decode(response.responseText);
+        .then(function(res) {
             if(res.success) {
                 var config = res.data || true, items = defaultItems || [];
                 if(config) {
@@ -36,6 +35,13 @@ Ext.define('saas.util.FormUtil', {
                         Ext.apply(item, cusItem);
                     });
                     Ext.Array.each(items, function(item) {
+                        if(item.xtype == 'numberfield') {
+                            Ext.applyIf(item, {
+                                hideTrigger: true, // 隐藏trigger
+                                mouseWheelEnabled: false // 取消滚轮事件
+                            });
+                        }
+
                         // 设置必填
                         if(item.allowBlank==false){
                             // TODO 需要判断类型
@@ -52,7 +58,22 @@ Ext.define('saas.util.FormUtil', {
                                 return c.dataIndex
                             });
 
-                            //默认绑定序号
+                            Ext.Array.each(columns, function(c) {
+
+                                // 不可锁定
+                                Ext.applyIf(c, {
+                                    lockable: false
+                                });
+                                
+                                var editor = c.editor;
+                                if(editor && editor.xtype == 'numberfield') {
+                                    Ext.applyIf(editor, {
+                                        hideTrigger: true, // 隐藏trigger
+                                        mouseWheelEnabled: false // 取消滚轮事件
+                                    });
+                                }
+                            });
+
                             cnames.push(item.detnoColumn);
 
                             formModel.set('detail' + index + '.detailBindFields', cnames);
@@ -91,9 +112,8 @@ Ext.define('saas.util.FormUtil', {
         if(form.initId && form.initId!=0) {
             var url = form._readUrl + form.initId;
             me.BaseUtil.request({url })
-            .then(function(response) {
+            .then(function(res) {
                 form.setLoading(false);
-                var res = Ext.decode(response.responseText);
                 if(res.success) {
                     var d = res.data;
                     var o = {
@@ -126,9 +146,8 @@ Ext.define('saas.util.FormUtil', {
                     caller:form.caller
                 },
                 method: 'POST',
-            }).then(function(response) {
+            }).then(function(res) {
                 form.setLoading(false);
-                var res = Ext.decode(response.responseText);
                 if(res.success){
                     var code = res.data;
                     var viewModel = form.getViewModel();

+ 0 - 47
frontend/saas-web/app/util/GridUtil.js

@@ -1,47 +0,0 @@
-Ext.define('saas.util.GridUtil', {
-
-    BaseUtil: Ext.create('saas.util.BaseUtil'),
-
-    /**
-     * 获取grid列配置
-     * @param grid grid组件
-     * @param url 请求url
-     */
-    setColumns: function(grid, url) {
-        this.BaseUtil.request({url})
-        .then(function(response) {
-            var columns = Ext.decode(response.responseText);
-            var fields = columns.map(column => column.dataIndex);
-            var store = Ext.create('Ext.data.Store', {
-                fields,
-            });
-            if(grid.showIndex) {
-                columns.unshift({ xtype: 'rownumberer' });
-            }
-            grid.reconfigure(store, columns);
-
-            grid.fireEvent('afterSetColumns', grid, columns);
-        })
-        .catch(function(response) {
-            // something...
-        });
-    },
-
-    /**
-     * 获取grid数据
-     * @param grid grid组件
-     * @param url 请求url
-     */
-    loadData: function(grid, url) {
-        this.BaseUtil.request({url})
-        .then(function(response) {
-            var data = Ext.decode(response.responseText);
-                grid.getStore().loadData(data);
-
-                grid.fireEvent('afterLoadData', grid, data);
-        })
-        .catch(function(response) {
-            // something...
-        });
-    }
-});

+ 0 - 200
frontend/saas-web/app/util/QueryUtil.js

@@ -1,200 +0,0 @@
-Ext.define('saas.util.QueryUtil', {
-
-    BaseUtil: Ext.create('saas.util.BaseUtil'),
-
-     /**
-     * 获得form的字段查询条件
-     * @param form: form组件
-     * @returns Mode: 字段模式,默认MAIN 当f.fieldMode = "DETAIL",Mode->"DETAIL"
-     */
-    getStoreMode: function(form,Mode){
-        var Mode = "MAIN";
-        if(form.items.items.find(function(item) {
-            return !Ext.isEmpty(item.value)&&item.fieldMode == "DETAIL";
-        })) {
-            Mode = "DETAIL";
-        }
-        return Mode;
-    },
-    turnRelativeGrid:function(grid,queryForm,queryMoreForm){
-        var me = this,
-            Mode = me.getStoreMode(queryForm);
-        if(queryMoreForm){//更多查询
-            if(Mode=="MAIN"){
-                me.getStoreMode(queryMoreForm);
-            }
-        }
-        if(Mode=="MAIN"){
-            grid.Mode = Mode;
-            grid.reconfigure(grid.store, grid.baseColumn);
-            grid.store.loadPage(1);
-        }else{
-            //若明细字段含明细字段注意切换数据源 grid.reconfigure(store, columns);
-            //关联viewName = 关联viewName+"-RelativeGrid" selModel
-            //grid.selModel = '';
-            grid.Mode = Mode;
-            grid.reconfigure(grid.store, grid.relativeColumn);
-            grid.store.loadPage(1);
-        }
-    },
-      /**
-     * 获得form的字段查询条件
-     * @param form: form组件
-     */
-    getFormCondition: function(form){
-        var condition = "",
-        me = this;
-        Ext.each(form.items.items, function(f){
-				if((f.xtype == 'checkbox' || f.xtype == 'radio')&&f.logic){
-					if(f.value == true) {
-						if(condition == ''){
-							condition += "("+f.logic+")";
-						} else {
-							condition += ' AND (' + f.logic+')';
-						}
-					}
-				} else if (f.xtype == 'condatefield' && f.value != null ){
-                    if(f.value.from != null){
-                        if(condition == ''){
-                            condition += " ( date("+f.name+") between '"+Ext.Date.format(f.value.from,"Y-m-d H:i:s")+"' and '"+Ext.Date.format(f.value.to,"Y-m-d H:i:s")+"' )";
-                        } else {
-                            condition += " AND ( date("+f.name+") between '"+Ext.Date.format(f.value.from,"Y-m-d H:i:s")+"' and '"+Ext.Date.format(f.value.to,"Y-m-d H:i:s")+"' )";
-                        }
-                    }
-                }else if(f.xtype == 'datefield' && f.value != null && f.value != '' ){
-					var v = Ext.Date.format(new Date(f.value), 'Y-m-d');
-					if(condition == ''){
-						condition += "date("+f.name+")='"+v+"'";
-					} else {
-						condition += " AND date("+f.name+")='"+v+"'";
-					}
-				} else if(f.xtype == 'datetimefield' && f.value != null){
-                    var v = Ext.Date.format(new Date(f.value), 'Y-m-d H:i:s');
-					if(condition == ''){
-						condition += 'date('+f.name + ")= '" + v + "'";
-					} else {
-						condition += ' AND date('+f.name + ")= '" + v + "'";
-					}
-				} else if(f.xtype == 'numberfield' && f.value != null && f.value != ''){
-					var endChar = '=';
-					if(condition == ''){
-						condition += f.name + endChar + f.value;
-					} else {
-						condition += ' AND ' + f.name + endChar + f.value;
-					}
-				} else if(f.xtype == 'combobox' ){
-                    if(f.value != '$ALL'&& f.value!=null){
-                        if(condition == ''){
-                            condition = f.name+" = '"+f.value+"' ";
-                        } else {
-                            condition += ' AND '+f.name+" = '"+f.value+"' ";
-                        }
-                    }
-				} else if(f.xtype == 'multicombo' ){
-				    if(f.value && f.value.length > 0){
-                        var text = f.value.map(function(v) {
-                            return '\'' + v.value + '\'';
-                        }).join(',');
-                        if(condition == ''){
-                            condition = f.name + " in (" + text +")";
-                        } else {
-                            condition += ' AND ' +  f.name + " in (" + text +")";
-                        }
-                    }
-
-                } else {
-                    if(!Ext.isEmpty(f.value)){
-                        if(me.contains(f.value.toString(), 'BETWEEN', true) && me.contains(f.value.toString(), 'AND', true)){
-                            if(condition == ''){
-                                condition += f.name + " " + f.value;
-                            } else {
-                                condition += ' AND (' + f.name + " " + f.value + ")";
-                            }
-                        } else if(me.contains(f.value.toString(), '||', true)){
-                            var str = '';
-                            Ext.each(f.value.split('||'), function(v){
-                                if(v != null && v != ''){
-                                    if(str == ''){
-                                        str += f.name + "='" + v + "'";
-                                    } else {
-                                        str += ' OR ' + f.name + "='" + v + "'";
-                                    }
-                                }
-                            });
-                            if(condition == ''){
-                                condition += "(" + str + ")";
-                            } else {
-                                condition += ' AND (' + str + ")";
-                            }
-                        } else if(f.value.toString().charAt(0) == '!'){ 
-                            if(condition == ''){
-                                condition += 'nvl(' + f.name + ",' ')<>'" + f.value.substr(1) + "'";
-                            } else {
-                                condition += ' AND (nvl(' + f.name + ",' ')<>'" + f.value.substr(1) + "')";
-                            }
-                        } else {
-                            if(f.value.toString().indexOf('%') >= 0) {
-                                if(condition == ''){
-                                    condition += f.name + " like '" + f.value + "'";
-                                } else {
-                                    condition += ' AND (' + f.name + " like '" + f.value + "')";
-                                }
-                            } else {
-                                if(f.queryType=='VAG'){
-                                    if(condition == ''){
-                                        if(me.contains(f.name.toString(), '#', true)){
-                                            var nameArr = f.name.split("#");
-                                            Ext.each(nameArr, function(nameItem,index) {
-                                                if(index==0){
-                                                    condition = (nameItem+ " like '%" +f.value + "%'");
-                                                }else{
-                                                    condition += " or "+nameItem+ " like '%" +f.value + "%' ";
-                                                }
-                                            });
-                                        }else{
-                                            condition += '('+ f.name + " like '%" + f.value + "%')";
-                                        }
-                                    } else {
-                                        if(me.contains(f.name.toString(), '#', true)){
-                                            var nameArr = f.name.split("#");
-                                            Ext.each(nameArr, function(nameItem,index) {
-                                                if(index==0){
-                                                    condition += ' AND ('+(nameItem+ " like '%" +f.value + "%'");
-                                                }else{
-                                                    condition += " or "+nameItem+ " like '%" +f.value + "%' ";
-                                                }
-                                            });
-                                            condition+=')';
-                                        }else{
-                                            condition += ' AND (' + f.name + " like '%" + f.value + "%')";
-                                        }
-                                    }
-                                }else{
-                                    if(condition == ''){
-                                        condition += '('+f.name + "='" + f.value + "')";
-                                    } else {
-                                        condition += ' AND (' + f.name + "='" + f.value + "')";
-                                    }
-                                }
-                            }
-                        }
-                    }
-                    
-				}
-        });
-        return condition;
-    },
-    /**
-	 * string:原始字符串
-	 * substr:子字符串
-	 * isIgnoreCase:忽略大小写
-	 */
-    contains: function(string, substr, isIgnoreCase){
-		if (string == null || substr == null) return false;
-		if (isIgnoreCase === undefined || isIgnoreCase === true) {
-			string = string.toLowerCase();
-			substr = substr.toLowerCase();
-		}
-		return string.indexOf(substr) > -1;
-    }
-});

+ 1 - 1
frontend/saas-web/app/view/auth/LoginController.js

@@ -18,7 +18,7 @@ Ext.define('saas.view.auth.LoginController', {
         //         me.fireEvent('login', session);
         //     })
         //     .catch(function(error) {
-        //         Ext.toast(error);
+        //         showToast(error);
         //     })
         //     .then(function(session) {
         //         me.getView().setMasked(false);

+ 1 - 0
frontend/saas-web/app/view/core/baseform/FormPanel.js

@@ -12,6 +12,7 @@ Ext.define('saas.view.core.baseform.FormPanel', {
     layout: 'column',
     autoScroll: true,
     border: 1,
+    bodyPadding: 5,
     searchField:[],
 
     fieldDefaults: {

+ 6 - 7
frontend/saas-web/app/view/core/baseform/GridPanel.js

@@ -152,14 +152,14 @@ Ext.define('saas.view.core.baseform.GridPanel', {
                     async:false
                 })
                 .then(function() {
-                    Ext.Msg.alert('提示','操作成功');
+                    showToast('操作成功');
                 })
                 .catch(function(response) {
-                    Ext.Msg.alert('提示','操作失败');
+                    showToast('操作失败');
                 });
                 grid.store.load();
         }else{
-            Ext.Msg.alert('提示','请勾选至少一条明细。');
+            showToast('请勾选至少一条明细。');
         }
     },
 
@@ -179,16 +179,15 @@ Ext.define('saas.view.core.baseform.GridPanel', {
                         url: form._deleteUrl+id,
                         method: 'POST',
                     })
-                    .then(function(res) {
-                        var localJson = new Ext.decode(res.responseText);
+                    .then(function(localJson) {
                         if(localJson.success){
                             //解析参数
-                            Ext.Msg.alert('提示','删除成功');
+                            showToast('删除成功');
                             view.ownerCt.store.load();
                         }
                     })
                     .catch(function() {
-                        Ext.Msg.alert('提示','删除失败');
+                        showToast('删除失败');
                     });
                 }
             }

+ 1 - 2
frontend/saas-web/app/view/core/dbfind/MultiDbfindGridPanel.js

@@ -1,8 +1,7 @@
 Ext.define('saas.view.core.dbfind.MultiDbfindGridPanel', {
     extend: 'Ext.grid.Panel',
     xtype: 'multidbfindgridpanel',
-    GridUtil: Ext.create('saas.util.GridUtil'),
-    BaseUtil: Ext.create('saas.util.BaseUtil'),
+
     dataUrl: '',
     dbSearchFields: [],
     condition:'',

+ 0 - 2
frontend/saas-web/app/view/core/dbfind/MultiDbfindTrigger.js

@@ -10,8 +10,6 @@ Ext.define('saas.view.core.dbfind.MultiDbfindTrigger', {
     displayField: 'dispaly',
     valueField: 'value',
     triggerCls: 'x-form-search-trigger',
-    GridUtil: Ext.create('saas.util.GridUtil'),
-    BaseUtil: Ext.create('saas.util.BaseUtil'),
     minChars:1, // 设置用户输入字符多少时触发查询
     tpl: '',
     enableKeyEvents:true,

+ 19 - 20
frontend/saas-web/app/view/core/form/FormPanelController.js

@@ -31,17 +31,17 @@ Ext.define('saas.view.core.form.FormPanelController', {
                 url: form._deleteUrl+id.value,
                 method: 'POST',
             })
-            .then(function(res) {
-                var localJson = new Ext.decode(res.responseText);
+            .then(function(localJson) {
                 if(localJson.success){
                     var mainTab = Ext.getCmp('main-tab-panel');
                     mainTab.getActiveTab().close();
                     //解析参数
-                    Ext.toast('删除成功');
+                    showToast('删除成功');
                 }
             })
-            .catch(function() {
-                Ext.toast('删除失败');
+            .catch(function(res) {
+                console.error(res);
+                showToast('删除失败: ' + res.message);
             });
         }
     },
@@ -51,11 +51,11 @@ Ext.define('saas.view.core.form.FormPanelController', {
         form = this.getView();
 
         if(form.getForm().wasDirty==false){
-            Ext.toast('未修改数据,请修改后保存');
+            showToast('未修改数据,请修改后保存');
             return false;
         }
         if(form.getForm().wasValid==false){
-            Ext.toast('表单校验有误,请检查');
+            showToast('表单校验有误,请检查');
             return false;
         }
         //form里面数据
@@ -111,16 +111,16 @@ Ext.define('saas.view.core.form.FormPanelController', {
             params: JSON.stringify(params),
             method: 'POST',
         })
-        .then(function(res) {
-            var localJson = new Ext.decode(res.responseText);
+        .then(function(localJson) {
             if(localJson.success){
-                Ext.toast('保存成功');
                 form.initId = localJson.data.id;
                 form.FormUtil.loadData(form);
+                showToast('保存成功');
             }
         })
-        .catch(function() {
-            Ext.toast('保存失败');
+        .catch(function(res) {
+            console.error(res);
+            showToast('保存失败: ' + res.message);
         });
     },
 
@@ -132,11 +132,11 @@ Ext.define('saas.view.core.form.FormPanelController', {
         modelData = viewModel.getData();
         
         if(form.getForm().wasDirty==false){
-            Ext.toast('未修改数据,请修改后保存');
+            showToast('未修改数据,请修改后保存');
             return false;
         }
         if(form.getForm().wasValid==false){
-            Ext.toast('表单校验有误,请检查');
+            showToast('表单校验有误,请检查');
             return false;
         }
         //form里面数据
@@ -181,17 +181,16 @@ Ext.define('saas.view.core.form.FormPanelController', {
             params: JSON.stringify(params),
             method: 'POST',
         })
-        .then(function(res) {
-            var localJson = new Ext.decode(res.responseText);
+        .then(function(localJson) {
             if(localJson.success){
-                Ext.toast('审核成功');
-                form.initId = localJson.data.id;
                 form.FormUtil.loadData(form);
                 viewModel.set('base.editable', false);
+                showToast('审核成功');
             }
         })
-        .catch(function() {
-            Ext.toast('审核失败');
+        .catch(function(res) {
+            console.error(res);
+            showToast('审核失败: ' + res.message);
         });
     },
     unAudit: function() {

+ 24 - 8
frontend/saas-web/app/view/core/form/field/DetailGridField.js

@@ -2,7 +2,7 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
     extend: 'Ext.grid.Panel',
     xtype: 'detailGridField',
 
-    GridUtil: Ext.create('saas.util.GridUtil'),
+    cls: 'x-detailgridfield',
 
     border: 1,
     margin: '0 5 5 0', // formpanel的fieldDefaults未生效
@@ -30,7 +30,21 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
         var me = this;
         me.initColumns();
         me.setSummary();
+
+        addRows = function(id) {
+            var grid = Ext.getCmp(id);
+            grid.addDetail(0);
+        };
+
         Ext.apply(me, {
+            viewConfig: {
+                deferEmptyText: false,
+                emptyText: '无数据'
+            },
+            lockedViewConfig: {
+                deferEmptyText: false,
+                emptyText: '<div style="width: 100%; text-align: center; cursor: pointer; color: green;" class="fa fa-plus" title="新增行" onclick="addRows(\'' + me.id + '\')"></div>',
+            },
             listeners: {
                 itemmouseenter: function(grid, record, item, index, e, eOpts) {
                     var lockedItems = grid.el.dom.parentElement.parentElement.getElementsByClassName('x-grid-scrollbar-clipper-locked')[0].getElementsByClassName('x-grid-item');
@@ -79,17 +93,17 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
             format:'0',
             summaryType: 'count',
             locked:true,
+            lockable: false,
             summaryRenderer: function(value, summaryData, dataIndex) {
                 return Ext.String.format('合计', value);
             },
             renderer: function(value, a, record, index) {
                 return '<div class="text">' + value + '</div>' +
                 '<div class="icons" style="height: 19px; display: none;">' + 
-                    '<div style="line-height: 19px; flex: 1; color: green; cursor: pointer; margin-right: 2px;" class="x-row-insert fa fa-plus" title="插入"></div>'+
-                    '<div style="line-height: 19px; flex: 1; color: red; cursor: pointer; margin-left: 2px;" class="x-row-delete fa fa-minus" title="删除"></div>'+
+                    '<div style="line-height: 19px; flex: 1; color: green; cursor: pointer; margin-right: 2px;" class="x-row-insert fa fa-plus" title="插入"></div>'+
+                    '<div style="line-height: 19px; flex: 1; color: red; cursor: pointer; margin-left: 2px;" class="x-row-delete fa fa-minus" title="删除"></div>'+
                 '</div>';
             },
-            emptyCellText: 'null'
         };
         if (detnoField) {
             Ext.apply(me, { columns: [indexColumn].concat(columns) });
@@ -116,16 +130,18 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
         });
     },
 
-    add10EmptyRow: function() {
+    add10EmptyRow: function(num) {
         var me = this,
         detnoColumn = me.detnoColumn,
         store = me.getStore(),
         selectedRecord = me.selModel.lastSelected,
         datas = [];
 
+        num = num || 3
+
         //当前行后序号全部加1
         var detno = selectedRecord ? selectedRecord.data[detnoColumn] : 0;
-        Ext.Array.each(new Array(10), function() {
+        Ext.Array.each(new Array(num), function() {
             detno += 1;
             var data = {};
             data[detnoColumn] = detno;
@@ -181,11 +197,11 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
                 success: function (response, opts) {
                     store.remove(selectedRecord);
                     //解析参数
-                    Ext.toast('删除成功');
+                    showToast('删除成功');
                 },
                 failure: function (response, opts) {
                     //失败
-                    Ext.toast('删除失败');
+                    showToast('删除失败');
                 }
             });
         }else{

+ 9 - 0
frontend/saas-web/app/view/core/form/field/DetailGridField.scss

@@ -0,0 +1,9 @@
+.x-detailgridfield {
+
+    .x-grid-view {
+        
+        .x-grid-empty {
+            padding: 8px 10px;
+        }
+    }
+}

+ 0 - 58
frontend/saas-web/app/view/core/query/MoreQueryFormPanel.js

@@ -1,58 +0,0 @@
-Ext.define('saas.view.core.query.MoreQueryFormPanel', {
-    extend: 'Ext.form.Panel',
-    xtype: 'core-query-morequeryformpanel',
-
-    layout: 'column',
-    autoScroll: true,
-    buttonAlign : 'center',
-    bodyPadding: 5,
-    frame:true,
-    defaults: {
-        xtype:'textfield',
-        margin: '0 5 5 0',
-        labelAlign: 'right',
-        labelWidth: 90,
-        columnWidth: 0.5,
-        blankText: '该字段不能为空'
-    },
-
-    initComponent: function() {
-        var me = this;
-        Ext.apply(me, {
-            dockedItems: [{
-                xtype: 'toolbar',
-                dock: 'bottom',
-                style: {
-                    'border-bottom': '1px solid #35baf6 !important'
-                },
-                items: [{
-                    xtype: 'button',
-                    text: '重置',
-                    handler: function(btn){
-                        btn.ownerCt.ownerCt.reset();
-                    }
-                },'->',{
-                    xtype: 'button',
-                    text: '查询',
-                    handler: me.onQueryMore
-                }, {
-                    xtype: 'button',
-                    text: '关闭',
-                    handler: function(btn){
-                        var win = Ext.getCmp('queryMoreWin');
-                        win.close();
-                        win.destroy();
-                    }
-                }]
-            }]
-        });
-        me.callParent(arguments);
-    },
-    onQueryMore: function(btn){
-        var me = this,
-            queryMoreForm = me.up('core-query-queryformpanel'),
-            parentForm = queryMoreForm.up('core-query-formpanel')
-            parentForm.QueryUtil.turnRelativeGrid(grid,queryForm,queryMoreForm);
-    }
-    
-});

+ 20 - 15
frontend/saas-web/app/view/core/query/QueryGridPanel.js

@@ -3,8 +3,6 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
     xtype: 'core-query-querygridpanel',
 
     //工具类
-    QueryUtil: Ext.create('saas.util.QueryUtil'),
-    GridUtil: Ext.create('saas.util.GridUtil'),
     BaseUtil: Ext.create('saas.util.BaseUtil'),
     //字段属性
     baseColumn: [],
@@ -47,6 +45,12 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
                         type: 'json',
                         rootProperty: 'data.list',
                         totalProperty: 'data.total',
+                    },
+                    listeners: {
+                        exception: function(proxy, response, operation, eOpts) {
+                            console.error('exception: ', response.responseJson.message);
+                            showToast('exception:' + response.responseJson.message);
+                        }
                     }
                 },
                 listeners: {
@@ -250,20 +254,21 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
         if(data&&data.length>0){
             var params = JSON.stringify({baseDTOs:data});
             me.BaseUtil.request({
-                    url: me.baseVastUrl+type,
-                    params: params,
-                    method: 'POST',
-                    async:false
-                })
-                .then(function() {
-                    Ext.toast('提示','操作成功');
-                })
-                .catch(function(response) {
-                    Ext.toast('提示','操作失败');
-                });
-                me.getStore().loadPage(1);
+                url: me.baseVastUrl+type,
+                params: params,
+                method: 'POST',
+                async:false
+            })
+            .then(function() {
+                showToast('操作成功');
+            })
+            .catch(function(res) {
+                console.error(res);
+                showToast('操作失败: ' + res.message);
+            });
+            me.getStore().loadPage(1);
         }else{
-            Ext.toast('提示','请勾选至少一条明细。');
+            showToast('请勾选至少一条明细。');
         }
     },
     /**

+ 6 - 0
frontend/saas-web/app/view/core/query/QueryPanel.js

@@ -58,6 +58,12 @@ Ext.define('saas.view.core.query.QueryPanel', {
             ignore = item.ignore,
             defaultValue = item.defaultValue;
 
+            if(item.xtype == 'numberfield') {
+                Ext.applyIf(item, {
+                    hideTrigger: true, // 隐藏trigger
+                    mouseWheelEnabled: false // 取消滚轮事件
+                });
+            }
             // 设置model绑定
             if(!ignore) {
                 if(bind) {

+ 0 - 9
frontend/saas-web/app/view/document/customer/list/FormPanel.js

@@ -4,15 +4,6 @@ Ext.define('saas.view.document.customer.list.FormPanel', {
     controller: 'customer-list-formpanel',
     viewModel: 'customer-list-formpanel',
 
-    //工具类
-    FormUtil: Ext.create('saas.util.FormUtil'),
-    BaseUtil: Ext.create('saas.util.BaseUtil'),
-
-    //基础属性
-    layout: 'fit',
-    autoScroll: true,
-    border: 1,
-
     fieldDefaults: {
         margin: '0 5 5 0',
         labelAlign: 'right',

+ 10 - 10
frontend/saas-web/app/view/document/customer/panel/FormController.js

@@ -25,17 +25,17 @@ Ext.define('saas.view.document.customer.panel.FormController', {
             params: '',
             method: 'POST',
         })
-        .then(function(res) {
-            var localJson = new Ext.decode(res.responseText);
+        .then(function(localJson) {
             if(localJson.success){
-                Ext.Msg.alert('提示','启用成功');
+                showToast('启用成功');
                 form.initId = localJson.data.id;
                 form.FormUtil.loadData(form);
                 viewModel.set('base.editable', false);
             }
         })
-        .catch(function() {
-            Ext.Msg.alert('提示','启用失败');
+        .catch(function(res) {
+            console.error(res);
+            showToast('启用失败: ' + res.message);
         });
     },
     unAudit: function() {
@@ -48,17 +48,17 @@ Ext.define('saas.view.document.customer.panel.FormController', {
             params: '',
             method: 'POST',
         })
-        .then(function(res) {
-            var localJson = new Ext.decode(res.responseText);
+        .then(function(localJson) {
             if(localJson.success){
-                Ext.Msg.alert('提示','禁用成功');
+                showToast('禁用成功');
                 form.initId = localJson.data.id;
                 form.FormUtil.loadData(form);
                 viewModel.set('base.editable', false);
             }
         })
-        .catch(function() {
-            Ext.Msg.alert('提示','禁用失败');
+        .catch(function(res) {
+            console.log(res);
+            showToast('禁用失败: ' + res.message);
         });
     }
 });

+ 5 - 5
frontend/saas-web/app/view/document/kind/ChildForm.js

@@ -174,10 +174,9 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
             params: JSON.stringify(params),
             method: 'POST',
         })
-        .then(function(res) {
-            var localJson = new Ext.decode(res.responseText);
+        .then(function(localJson) {
             if(localJson.success){
-                Ext.Msg.alert('提示','保存成功');
+                showToast('保存成功');
                 var grid = form.ownerCt._parent.lookup('document-kind-Grid');
                 if(grid){
                     grid.store.load();
@@ -185,8 +184,9 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 form.ownerCt.close();
             }
         })
-        .catch(function() {
-            Ext.Msg.alert('提示','保存失败');
+        .catch(function(res) {
+            console.error(res);
+            showToast('保存失败: ' + res.message);
         });
     },
     onCancel:function(){

+ 5 - 5
frontend/saas-web/app/view/document/kind/KindController.js

@@ -80,15 +80,15 @@ Ext.define('saas.view.document.kind.KindController', {
             url: view.etc[dataKind].delUrl+'/'+keyV,
             method: 'POST'
         })
-        .then(function(res) {
-            var localJson = new Ext.decode(res.responseText);
+        .then(function(localJson) {
             if(localJson.success){
-                Ext.Msg.alert('提示','删除成功');
+                showToast('删除成功');
                 grid.store.load();
             }
         })
-        .catch(function() {
-            Ext.Msg.alert('提示','删除失败');
+        .catch(function(res) {
+            console.error(res);
+            showToast('删除失败: ' + res.message);
         });
     },
     createDialog: function(dataKind,record) {

+ 10 - 10
frontend/saas-web/app/view/document/product/panel/FormController.js

@@ -136,17 +136,17 @@ Ext.define('saas.view.document.product.panel.FormController', {
             params: '',
             method: 'POST',
         })
-        .then(function(res) {
-            var localJson = new Ext.decode(res.responseText);
+        .then(function(localJson) {
             if(localJson.success){
-                Ext.Msg.alert('提示','启用成功');
+                showToast('启用成功');
                 form.initId = localJson.data.id;
                 form.FormUtil.loadData(form);
                 viewModel.set('base.editable', false);
             }
         })
-        .catch(function() {
-            Ext.Msg.alert('提示','启用失败');
+        .catch(function(res) {
+            console.error(res);
+            showToast('启用失败: ' + res.message);
         });
     },
     unAudit: function() {
@@ -159,17 +159,17 @@ Ext.define('saas.view.document.product.panel.FormController', {
             params: '',
             method: 'POST',
         })
-        .then(function(res) {
-            var localJson = new Ext.decode(res.responseText);
+        .then(function(localJson) {
             if(localJson.success){
-                Ext.Msg.alert('提示','禁用成功');
+                showToast('禁用成功');
                 form.initId = localJson.data.id;
                 form.FormUtil.loadData(form);
                 viewModel.set('base.editable', false);
             }
         })
-        .catch(function() {
-            Ext.Msg.alert('提示','禁用失败');
+        .catch(function(res) {
+            console.error(res);
+            showToast('禁用失败: ' + res.message);
         });
     }
 });

+ 10 - 10
frontend/saas-web/app/view/document/vendor/panel/FormController.js

@@ -25,17 +25,17 @@ Ext.define('saas.view.document.vendor.panel.FormController', {
             params: '',
             method: 'POST',
         })
-        .then(function(res) {
-            var localJson = new Ext.decode(res.responseText);
+        .then(function(localJson) {
             if(localJson.success){
-                Ext.Msg.alert('提示','启用成功');
+                showToast('启用成功');
                 form.initId = localJson.data.id;
                 form.FormUtil.loadData(form);
                 viewModel.set('base.editable', false);
             }
         })
-        .catch(function() {
-            Ext.Msg.alert('提示','启用失败');
+        .catch(function(res) {
+            console.error(res);
+            showToast('启用失败: ' + res.message);
         });
     },
     unAudit: function() {
@@ -48,17 +48,17 @@ Ext.define('saas.view.document.vendor.panel.FormController', {
             params: '',
             method: 'POST',
         })
-        .then(function(res) {
-            var localJson = new Ext.decode(res.responseText);
+        .then(function(localJson) {
             if(localJson.success){
-                Ext.Msg.alert('提示','禁用成功');
+                showToast('禁用成功');
                 form.initId = localJson.data.id;
                 form.FormUtil.loadData(form);
                 viewModel.set('base.editable', false);
             }
         })
-        .catch(function() {
-            Ext.Msg.alert('提示','禁用失败');
+        .catch(function(res) {
+            console.error(res);
+            showToast('禁用失败: ' + res.message);
         });
     }
 });

+ 8 - 8
frontend/saas-web/app/view/money/othreceipts/FormPanel.js

@@ -18,9 +18,7 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
      _relationColumn: 'ord_orid',
      _readUrl:basePath+'money/othreceipts/read/',
      _saveUrl:basePath+'money/othreceipts/save',
-     _auditUrl:'',
      _deleteUrl:basePath+'money/othreceipts/delete/',
-     _turnOutUrl:'', 
      initId:0,
 
     defaultItems: [{
@@ -62,7 +60,8 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
             {
                 text : "id", 
                 dataIndex : "id", 
-                xtype : "hidden"
+                xtype : "numbercolumn",
+                width:0
             }, {
                 text : "期间", 
                 dataIndex : "ord_ym", 
@@ -80,7 +79,7 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
                 items : null,
                 editor : {
                     xtype : "remotecombo", 
-                    storeUrl:basePath+'ducument/fundinoutType/getAll',
+                    storeUrl:basePath+'ducument/fundinoutType/list',
                     name : "ord_type", 
                     fieldLabel : "收入类别", 
                     allowBlank : true, 
@@ -89,21 +88,22 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
                     valueField: 'value',
                     columnWidth : 0.25,
                     etc:{
-                        vendorkind:{
+                        inoutkind:{
                             keyField:'id',
-                            dataField:'vk_name',
+                            dataField:'ft_name',
                             reqUrl:basePath+'ducument/fundinoutType/save',
                             delUrl:basePath+'ducument/fundinoutType/delete'
                         }
                     },
                     addHandler:function(b){
+                        //this.ownerCmp.etc['inoutkind'],
                         var form = this.ownerCmp.ownerCt;
                         this.dialog = form.getController().getView().add({
-                            xtype: 'document-inoutkind-childwin',
+                            xtype: 'document-kind-childwin',
                             bind: {
                                 title: '新增收入类型'
                             },
-                            dataKind:'vendorkind',
+                            dataKind:'inoutkind',
                             belong:this.ownerCmp.etc['inoutkind'],
                             _parent:form,
                             record:null,

+ 11 - 25
frontend/saas-web/app/view/money/othreceipts/FormPanelController.js

@@ -22,53 +22,44 @@ Ext.define('saas.view.money.othreceipts.FormPanelController', {
                             field:'cu_name',width:100
                         }],
                         dbColumns:[{
-                            conditionCode:'id',
                             "text": "客户ID",
                             "flex": 0,
                             "dataIndex": "id",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "xtype": ""
                         },{
-                            conditionCode:'cu_code',
                             "text": "客户编号",
                             "flex": 1,
                             "dataIndex": "cu_code",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "xtype": ""
                         }, {
-                            conditionCode:'cu_name',
                             "text": "客户名称",
                             "flex": 1,
                             "dataIndex": "cu_name",
-                            "xtype": "",
-                            "items": null
+                            "xtype": ""
                         }, {
-                            conditionCode:'cu_type',
                             "text": "客户类型",
                             "flex": 0,
                             "dataIndex": "cu_type",
                             "width": 200,
-                            "xtype": "",
-                            "items": null
+                            "xtype": ""
                         }]
                     }) ;   
 
                 }
-            },
+          },
             //放大镜赋值关系 以及 tpl模板
             'dbfindtrigger[name=or_bankname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        conditionCode:'or_bankcode',
                         dataUrl:basePath+'document/bankinformation/list',
                         dbfinds:[{
                             from:'bk_bankcode',to:'or_bankcode'
                         },{
                             from:'bk_bankname',to:'or_bankname'
                         },{
-                            from:'bk_id',to:'or_bankid'
+                            from:'id',to:'or_bankid'
                     }],
                         dbtpls:[{
                             field:'bk_bankcode',width:100
@@ -78,36 +69,31 @@ Ext.define('saas.view.money.othreceipts.FormPanelController', {
                         dbColumns:[{
                             "text": "账户ID",
                             "flex": 0,
-                            "dataIndex": "bk_id",
+                            "dataIndex": "id",
                             "width": 0,
-                            "xtype": "",
-                            "items": null
+                            "xtype": ""
                         },{
                             "text": "账户编号",
                             "flex": 1,
                             "dataIndex": "bk_bankcode",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "xtype": ""
                         }, {
                             "text": "账户名称",
                             "flex": 1,
                             "dataIndex": "bk_bankname",
-                            "xtype": "",
-                            "items": null
+                            "xtype": ""
                         }, {
                             "text": "账户类型",
                             "flex": 0,
                             "dataIndex": "bk_type",
                             "width": 200,
-                            "xtype": "",
-                            "items": null
+                            "xtype": ""
                         }]
                     }) ;   
 
                 }
             }
         });
-
     }
 });

+ 10 - 23
frontend/saas-web/app/view/money/othreceipts/QueryPanelController.js

@@ -22,36 +22,28 @@ Ext.define('saas.view.money.othreceipts.QueryPanelController', {
                             field:'cu_name',width:100
                         }],
                         dbColumns:[{
-                            conditionCode:'id',
                             "text": "客户ID",
                             "flex": 0,
                             "dataIndex": "id",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "xtype": ""
                         },{
-                            conditionCode:'cu_code',
                             "text": "客户编号",
                             "flex": 1,
                             "dataIndex": "cu_code",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "xtype": ""
                         }, {
-                            conditionCode:'cu_name',
                             "text": "客户名称",
                             "flex": 1,
                             "dataIndex": "cu_name",
-                            "xtype": "",
-                            "items": null
+                            "xtype": ""
                         }, {
-                            conditionCode:'cu_type',
                             "text": "客户类型",
                             "flex": 0,
                             "dataIndex": "cu_type",
                             "width": 200,
-                            "xtype": "",
-                            "items": null
+                            "xtype": ""
                         }]
                     }) ;   
 
@@ -61,14 +53,13 @@ Ext.define('saas.view.money.othreceipts.QueryPanelController', {
             'dbfindtrigger[name=or_bankname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        conditionCode:'or_bankcode',
                         dataUrl:basePath+'document/bankinformation/list',
                         dbfinds:[{
                             from:'bk_bankcode',to:'or_bankcode'
                         },{
                             from:'bk_bankname',to:'or_bankname'
                         },{
-                            from:'bk_id',to:'or_bankid'
+                            from:'id',to:'or_bankid'
                     }],
                         dbtpls:[{
                             field:'bk_bankcode',width:100
@@ -78,30 +69,26 @@ Ext.define('saas.view.money.othreceipts.QueryPanelController', {
                         dbColumns:[{
                             "text": "账户ID",
                             "flex": 0,
-                            "dataIndex": "bk_id",
+                            "dataIndex": "id",
                             "width": 0,
-                            "xtype": "",
-                            "items": null
+                            "xtype": ""
                         },{
                             "text": "账户编号",
                             "flex": 1,
                             "dataIndex": "bk_bankcode",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "xtype": ""
                         }, {
                             "text": "账户名称",
                             "flex": 1,
                             "dataIndex": "bk_bankname",
-                            "xtype": "",
-                            "items": null
+                            "xtype": ""
                         }, {
                             "text": "账户类型",
                             "flex": 0,
                             "dataIndex": "bk_type",
                             "width": 200,
-                            "xtype": "",
-                            "items": null
+                            "xtype": ""
                         }]
                     }) ;   
 

+ 5 - 4
frontend/saas-web/app/view/money/othspendings/FormPanel.js

@@ -59,7 +59,8 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
             {
                 text : "id", 
                 dataIndex : "id", 
-                xtype : "hidden"
+                xtype : "numbercolumn",
+                width:0
             }, {
                 text : "期间", 
                 dataIndex : "osd_ym", 
@@ -77,7 +78,7 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
                 items : null,
                 editor : {
                     xtype : "remotecombo", 
-                    storeUrl:basePath+'ducument/fundinoutType/getAll',
+                    storeUrl:basePath+'ducument/fundinoutType/list',
                     name : "osd_type", 
                     fieldLabel : "支出类别", 
                     allowBlank : true, 
@@ -96,11 +97,11 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
                     addHandler:function(b){
                         var form = this.ownerCmp.ownerCt;
                         this.dialog = form.getController().getView().add({
-                            xtype: 'document-inoutkind-childwin',
+                            xtype: 'document-kind-childwin',
                             bind: {
                                 title: '新增收入类型'
                             },
-                            dataKind:'vendorkind',
+                            dataKind:'inoutkind',
                             belong:this.ownerCmp.etc['inoutkind'],
                             _parent:form,
                             record:null,

+ 2 - 2
frontend/saas-web/app/view/money/othspendings/FormPanelController.js

@@ -8,7 +8,7 @@ Ext.define('saas.view.money.othspendings.FormPanelController', {
             'dbfindtrigger[name=os_vendname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:basePath+'document/vendor/getVendorsByCondition',
+                        dataUrl:basePath+'document/vendor/list',
                         dbfinds:[{
                             from:'id',to:'os_vendid'
                         },{
@@ -56,7 +56,7 @@ Ext.define('saas.view.money.othspendings.FormPanelController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         conditionCode:'os_bankcode',
-                        dataUrl:basePath+'document/bankinformation/getAll',
+                        dataUrl:basePath+'document/bankinformation/list',
                         dbfinds:[{
                             from:'bk_bankcode',to:'os_bankcode'
                         },{

+ 2 - 2
frontend/saas-web/app/view/money/othspendings/QueryPanelController.js

@@ -8,7 +8,7 @@ Ext.define('saas.view.money.othspendings.QueryPanelController', {
             'dbfindtrigger[name=os_vendname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:basePath+'document/vendor/getVendorsByCondition',
+                        dataUrl:basePath+'document/vendor/list',
                         dbfinds:[{
                             from:'id',to:'os_vendid'
                         },{
@@ -56,7 +56,7 @@ Ext.define('saas.view.money.othspendings.QueryPanelController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         conditionCode:'os_bankcode',
-                        dataUrl:basePath+'document/bankinformation/getAll',
+                        dataUrl:basePath+'document/bankinformation/list',
                         dbfinds:[{
                             from:'bk_bankcode',to:'os_bankcode'
                         },{

+ 136 - 62
frontend/saas-web/app/view/money/payBalance/FormPanel.js

@@ -11,16 +11,23 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
     //字段属性
     _title: '付款单',
     _idField: 'id',
-    _codeField: 'pd_code',
-    _statusField: 'pd_status',
-    _statusCodeField: 'pd_statuscode',
+    _codeField: 'pb_code',
+    _statusField: 'pb_status',
+    _statusCodeField: 'pb_statuscode',
     
     _readUrl: basePath + 'money/paybalance/read/',
-    _saveUrl: basePath + 'money/paybalance/save',
-    _auditUrl: basePath + 'money/paybalance/audit',
+    _saveUrl: basePath + 'money/paybalance/save/',
+    _auditUrl: basePath + 'money/paybalance/audit/',
     _deleteUrl: basePath + 'money/paybalance/delete/',
     _deleteDetailUrl: basePath + 'money/paybalance/deleteItem/',
-    _turnInUrl: basePath + 'money/paybalance/turnProdin/',
+
+    // _readUrl: 'http://192.168.253.129:8940/money/paybalance/read/',
+    // _saveUrl: 'http://192.168.253.129:8940/money/paybalance/save/',
+    // _auditUrl: 'http://192.168.253.129:8940/money/paybalance/audit/',
+    // _unAuditUrl: 'http://192.168.253.129:8940/money/paybalance/unAudit/',
+    // _deleteUrl: 'http://192.168.253.129:8940/money/paybalance/delete/',
+    // _deleteDetailUrl: 'http://192.168.253.129:8940/money/paybalance/deleteItem/',
+    
     initId: 0,
 
     toolBtns: [],
@@ -30,14 +37,19 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         name: 'id',
         fieldLabel: 'id'
     }, {
-        xtype: "textfield",
-        name: "pb_code",
-        fieldLabel: "付款单号"
+        xtype: 'hidden',
+        name: 'pb_kind',
+        fieldLabel: '单据类型',
+        defaultValue: '付款单'
     }, {
-        xtype: "hidden",
-        name: "pb_vendid",
-        bind: "{pb_vendid}",
-        fieldLabel: "供应商ID"
+        format: 'Y-m-d h:i:s',
+        xtype: "datefield",
+        name: "pb_date",
+        fieldLabel: "日期"
+    }, {
+        xtype: 'hidden',
+        name: 'pb_vendid',
+        fieldLabel: '供应商ID'
     }, {
         xtype: "hidden",
         name: "pb_vendcode",
@@ -46,65 +58,86 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         xtype: "dbfindtrigger",
         name: "pb_vendname",
         fieldLabel: "供应商名称"
+    }, {
+        xtype: 'textfield',
+        name: 'pb_manname',
+        fieldLabel: '收款人'
     }, {
         xtype: 'numberfield',
         name: 'pb_pdamount',
-        fieldLabel: '总欠款'
+        fieldLabel: '付款金额'
     }, {
-        xtype: "datefield",
-        name: "pb_date",
-        fieldLabel: "日期"
+        xtype: 'numberfield',
+        name: 'pb_pdamount',
+        fieldLabel: '付款金额'
+    }, {
+        xtype: "numberfield",
+        name: "pb_pbdamount",
+        fieldLabel: "本次核销金额"
+    }, {
+        xtype: "numberfield",
+        name: "pb_preamount",
+        fieldLabel: "本次预付款"
+    }, {
+        xtype: 'numberfield',
+        name: 'pb_discounts',
+        fieldLabel: '整单折扣'
+    }, {
+        xtype: 'numberfield',
+        name: 'pb_havebalance',
+        fieldLabel: '已核销金额'
     }, {
         xtype: "detailGridField",
-        storeModel: 'saas.model.purchase.purchasedetail',
-        _detnoColumn: 'pd_detno',
+        storeModel: 'saas.model.money.PayBalance1',
+        detnoColumn: 'pb_detno',
         columns: [{
-            text: "序号",
-            dataIndex: "pd_detno",
-            width: 100,
-            xtype: "numbercolumn",
-            align: 'center',
-            format: '0',
-            summaryType: 'count',
-            summaryRenderer: function (value, summaryData, dataIndex) {
-                return Ext.String.format('合计: {0}条', value);
-            },
-        }, {
-            text: '资金账户',
-            dataIndex: 'pd_bankname'
+            text: 'ID',
+            dataIndex: 'id',
+            hidden: true
+        }, {
+            text: '期间',
+            dataIndex: 'pb_ym'
+        }, {
+            text: '结算账户ID',
+            dataIndex: 'pb_bankid'
+        }, {
+            text: '结算账户编号',
+            dataIndex: 'paybalancedet'
+        }, {
+            text: '结算账户',
+            dataIndex: 'pb_bankname'
         }, {
             text: "付款金额",
-            dataIndex: "pd_amount",
+            dataIndex: "pb_amount",
         }, {
             text: "结算方式",
-            dataIndex: "pd_paymethod"
+            dataIndex: "pb_paymethod"
         }, {
             text: "结算号",
-            dataIndex: "pd_paycode"
+            dataIndex: "pb_paycode"
         }, {
             text: "备注",
-            dataIndex: "pd_remark"
+            dataIndex: "pb_remark"
         }]
     }, {
         xtype: "detailGridField",
-        storeModel: 'saas.model.purchase.purchasedetail',
-        _detnoColumn: 'pbd_detno',
+        storeModel: 'saas.model.money.PayBalance2',
+        detnoColumn: 'pbd_detno',
         columns: [{
-            text: "序号",
-            dataIndex: "pbd_detno",
-            width: 100,
-            xtype: "numbercolumn",
-            align: 'center',
-            format: '0',
-            summaryType: 'count',
-            summaryRenderer: function (value, summaryData, dataIndex) {
-                return Ext.String.format('合计: {0}条', value);
-            },
-        }, {
-            text: '来源单号',
+            text: 'ID',
+            dataIndex: 'id',
+            hidden: true
+        }, {
+            text: '期间',
+            dataIndex: 'pbd_ym'
+        }, {
+            text: '来源ID',
+            dataIndex: 'pbd_slid'
+        }, {
+            text: '源单编号',
             dataIndex: 'pbd_slcode'
         }, {
-            text: "业务类型",
+            text: "单据类型",
             dataIndex: "pbd_slkind",
         }, {
             text: "单据日期",
@@ -113,35 +146,76 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
             text: "单据金额",
             dataIndex: "pbd_amount"
         }, {
-            text: "已核销金额",
-            dataIndex: "pd_remark"
-        }, {
-            text: "未核销金额",
-            dataIndex: "pd_remark"
-        }, {
+        //     text: "已核销金额",
+        //     dataIndex: "pb_remark"
+        // }, {
+        //     text: "未核销金额",
+        //     dataIndex: "pb_remark"
+        // }, {
             text: "本次核销金额",
             dataIndex: "pbd_nowbalance"
+        }, {
+            text: '备注',
+            dataIndex: 'pbd_remark'
         }]
     }, {
-        format: "Y-m-d",
+        xtype: 'textareafield',
+        name: 'pb_remark',
+        columnWidth: 1,
+        fieldLabel: '备注'
+    }, {
+        xtype: 'textfield',
+        name: 'companyid',
+        fieldLabel: '公司ID'
+    }, {
+        xtype: 'numberfield',
+        name: 'pb_recorderid',
+        fieldLabel: '创建人ID'
+    }, {
+        xtype: 'textfield',
+        name: 'pb_recorder',
+        fieldLabel: '创建人'
+    }, {
+        format: "Y-m-d h:i:s",
         xtype: "datefield",
-        name: "createTime",
+        name: "pb_recorddate",
         fieldLabel: "创建时间"
     }, {
+        format: 'Y-m-d h:i:s',
         xtype: "datefield",
-        name: "updateTime",
+        name: "updatedate",
         fieldLabel: "更新时间"
     }, {
         xtype: "textfield",
         readOnly: true,
         editable: false,
-        name: "pd_status",
+        name: "pb_status",
         fieldLabel: "单据状态"
     }, {
         xtype: "hidden",
         readOnly: true,
         editable: false,
-        name: "pd_statuscode",
+        name: "pb_statuscode",
         fieldLabel: "单据状态码"
+    }, {
+        xtype: 'textfield',
+        name: 'pb_text1',
+        fieldLabel: '自定义字段1'
+    }, {
+        xtype: 'textfield',
+        name: 'pb_text2',
+        fieldLabel: '自定义字段2'
+    }, {
+        xtype: 'textfield',
+        name: 'pb_text3',
+        fieldLabel: '自定义字段3'
+    }, {
+        xtype: 'textfield',
+        name: 'pb_text4',
+        fieldLabel: '自定义字段4'
+    }, {
+        xtype: 'textfield',
+        name: 'pb_text5',
+        fieldLabel: '自定义字段5'
     }]
 });

+ 31 - 79
frontend/saas-web/app/view/money/payBalance/FormPanelController.js

@@ -5,56 +5,54 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
     init: function (form) {
         var me = this;
         this.control({
-            /**放大镜新增demo*/
-            "field[name=combo]":{
-                beforerender:function(f){
-                    f.addHandler=me.addCombo;
-                }
-            },
-            //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=pu_vendcode]':{
+            'dbfindtrigger[name=rb_custname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:basePath + 'document/vendor/getVendorsByCondition',
+                        //数据接口
+                        dataUrl: 'http://192.168.253.31:9480/customer/list',
+                        //赋值 
                         dbfinds:[{
-                            from:'ve_code',to:'pu_vendcode'
+                            from: 'id', to: 'rb_custid'
+                        }, {
+                            from:'cu_code', to:'rb_custcode'
                         },{
-                            from:'ve_name',to:'pu_vendname'
+                            from:'cu_name', to:'rb_custname'
                         }],
+                        //联想设置
                         dbtpls:[{
-                            field:'ve_code',width:100
+                            field:'cu_code',width:100
                         },{
-                            field:'ve_name',width:100
+                            field:'cu_name',width:100
+                        }],
+                        //联想查询条件
+                        dbCondition:"CONCAT(cu_code, cu_name) like '{0}%'",
+                        //放大镜窗口字段
+                        dbSearchFields:[{
+                            xtype : "textfield", 
+                            name : "cu_name", 
+                            conditionExpression:"cu_name like '{0}%'",//传入后台条件  替换占位符
+                            fieldLabel : "客户名称", 
+                            columnWidth : 0.25
                         }],
+                        //放大镜窗口列表
                         dbColumns:[{
-                            conditionCode:'ve_id',
-                            "text": "供应商ID",
+                            "text": "ID",
                             "flex": 0,
-                            "dataIndex": "ve_id",
+                            "dataIndex": "id",
                             "width": 0,
                             "xtype": "",
                             "items": null
                         },{
-                            conditionCode:'ve_code',
                             "text": "供应商编号",
                             "flex": 1,
-                            "dataIndex": "ve_code",
+                            "dataIndex": "cu_code",
                             "width": 100,
                             "xtype": "",
                             "items": null
                         }, {
-                            conditionCode:'ve_name',
                             "text": "供应商名称",
                             "flex": 1,
-                            "dataIndex": "ve_name",
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            conditionCode:'ve_type',
-                            "text": "供应商类型",
-                            "flex": 0,
-                            "dataIndex": "ve_type",
-                            "width": 200,
+                            "dataIndex": "cu_name",
                             "xtype": "",
                             "items": null
                         }]
@@ -62,52 +60,6 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
 
                 }
             },
-            //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=pd_prodcode]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
-                        conditionCode:'pr_code',
-                        dataUrl:basePath + 'document/product/getProductsByCondition',
-                        dbfinds:[{
-                            from:'pr_code',to:'pd_prodcode'
-                        }],
-                        dbtpls:[{
-                            field:'pr_code',width:100
-                        },{
-                            field:'pr_detail',width:100
-                        }],
-                        dbColumns:[{
-                            "text": "物料ID",
-                            "flex": 0,
-                            "dataIndex": "pr_id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
-                        },{
-                            "text": "物料编号",
-                            "flex": 1,
-                            "dataIndex": "pr_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "物料名称",
-                            "flex": 1,
-                            "dataIndex": "pr_detail",
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "物料规格",
-                            "flex": 0,
-                            "dataIndex": "pr_spec",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }]
-                    }) ;   
-
-                }
-            }
         });
 
     },
@@ -144,15 +96,15 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
             url: form._turnInUrl+id.value,
             method: 'GET',
         })
-        .then(function(res) {
-            var localJson = new Ext.decode(res.responseText);
+        .then(function(localJson) {
             if(localJson.success){
-                Ext.Msg.alert('提示','转单成功');
+                showToast('转单成功');
               
             }
         })
-        .catch(function() {
-            Ext.Msg.alert('提示','转单失败');
+        .catch(function(res) {
+            console.error(res);
+            showToast('转单失败: ' + res.message);
         });
      }
 });

+ 35 - 155
frontend/saas-web/app/view/money/payBalance/QueryPanel.js

@@ -8,189 +8,69 @@ Ext.define('saas.view.money.paybalance.QueryPanel', {
     viewName: 'money-paybalance-querypanel',
     
     queryFormItems: [{
-        xtype: 'hidden',
-        name: 'pu_id',
-        bind: '{pu_id}',
-        fieldLabel: 'ID',
-        allowBlank: true,
-        getCondition: function(value) {
-            return 'pu_id=' + value;
-        }
-    }, {
         xtype: 'textfield',
-        name: 'pu_code',
-        bind: '{pu_code}',
+        name: 'pb_code',
         fieldLabel: '单据编号'
-    }, {
-        xtype: 'condatefield',
-        name: 'pu_date',
-        bind: '{pu_date}',
-        fieldLabel: '采购日期',
-        columnWidth: 0.5,
-        operation: 'between'
-    }, {
-        xtype: 'dbfindtrigger',
-        name: 'pu_vendcode',
-        bind: '{pu_vendcode}',
-        fieldLabel: '供应商编号'
-    }, {
-        xtype: 'textfield',
-        name: 'pu_vendname',
-        bind: '{pu_vendname}',
-        fieldLabel: '供应商名称'
-    }, {
-        xtype: 'dbfindtrigger',
-        name: 'pd_prodcode',
-        bind: '{pd_prodcode}',
-        fieldLabel: '物料编号',
-        showDetail: true
-    }, {
-        xtype: 'textfield',
-        name: 'pr_detail',
-        bind: '{pr_detail}',
-        fieldLabel: '物料名称',
-        showDetail: true
-    }, {
-        xtype: 'combobox',
-        name: 'pu_statuscode',
-       // bind: '{pu_statuscode}',
-        fieldLabel: '审核状态',
-        queryMode: 'local',
-        displayField: 'pu_status',
-        valueField: 'pu_statuscode',
-        editable:false,
-        store: Ext.create('Ext.data.ArrayStore', {
-        fields: ['pu_statuscode', 'pu_status'],
-        data: [
-            ["$ALL", "全部"],
-            ["AUDITED", "已审核"],
-            ["UNAUDITED", "未审核"]
-        ]
-        })
-    }, {
-        xtype: 'multicombo',
-        name: 'pu_acceptstatuscode',
-        bind: '{pu_acceptstatuscode}',
-        fieldLabel: '入库状态',
-        datas: [
-            ["TURNIN", "已入库"],
-            ["UNTURNIN", "未入库"],
-            ["PARTIN", "部分入库"]
-        ]
-    }],
-    moreQueryFormItems: [{
-        xtype: 'textfield',
-        name: 'pu_buyername',
-        bind: '{pu_buyername}',
-        fieldLabel: '采购员'
-    }, {
-        xtype: 'textfield',
-        name: 'pu_total',
-        bind: '{pu_total}',
-        fieldLabel: '金额'
-    }, {
-        xtype: 'condatefield',
-        name: 'pu_delivery',
-        bind: '{pu_delivery}',
-        fieldLabel: '交货日期',
-        columnWidth: 1
     }],
+    moreQueryFormItems: [],
     queryGridConfig: {
-        idField: 'pu_id',
-        codeField: 'pu_code',
-        addTitle: '采购单',
-        addXtype: 'purchase-purchase-formpanel',
+        idField: 'id',
+        codeField: 'pb_code',
+        addTitle: '付款单',
+        addXtype: 'money-paybalance-formpanel',
         defaultCondition:'',
-        baseVastUrl: basePath + 'purchase/',
+        baseVastUrl: basePath + 'money/paybalance/',
+        // baseVastUrl: 'http://192.168.253.129:8940/money/paybalance/',
         baseColumn: [{
-            text: '序号',
-            width: 80,
-            xtype: 'rownumberer'
-        }, {
             text: 'id',
-            dataIndex: 'pu_id',
+            dataIndex: 'id',
             width: 100,
             xtype: 'numbercolumn'
         }, {
             text: '单据编号',
-            dataIndex: 'pu_code',
-            width: 120
-        }, {
-            text: '单据状态',
-            dataIndex: 'pu_status',
-            width: 120
-        }, {
-            text: '下单日期',
-            dataIndex: 'pu_indate',
-            xtype: 'datecolumn',
-            width: 200
-        }, {
-            text: '供应商名称',
-            dataIndex: 'pu_vendname',
-            width: 120
-        }, {
-            text: '含税金额',
-            dataIndex: 'pu_taxtotal',
-            xtype: 'numbercolumn',
+            dataIndex: 'pb_code',
             width: 120
         }, {
-            text: '金额',
-            dataIndex: 'pu_total',
-            xtype: 'numbercolumn',
-            width: 120,
-            flex: 1
-        }],
-        relativeColumn: [{
-            text: '序号',
-            width: 80,
-            xtype: 'rownumberer'
-        }, {
-            text: 'id',
-            dataIndex: 'pu_id',
-            width: 100,
-            xtype: 'numbercolumn'
-        }, {
-            text: '单据编号',
-            dataIndex: 'pu_code',
+            text: '状态',
+            dataIndex: 'pb_status',
             width: 120
         }, {
-            text: '单据状态',
-            dataIndex: 'pu_status',
+            text: '日期',
+            dataIndex: 'pb_date',
             width: 120
         }, {
-            text: '下单日期',
-            dataIndex: 'pu_indate',
-            xtype: 'datecolumn',
+            text: '供应商编号',
+            dataIndex: 'pb_vendcode',
             width: 200
         }, {
             text: '供应商名称',
-            dataIndex: 'pu_vendname',
+            dataIndex: 'pb_vendname',
             width: 120
         }, {
-            text: '采购序号',
-            dataIndex: 'pd_detno',
-            xtype: 'numbercolumn',
+            text: '收款人',
+            dataIndex: 'pb_manname',
             width: 120
         }, {
-            text: '物料编号',
-            dataIndex: 'pd_prodcode',
+            text: '付款金额',
+            dataIndex: 'pb_pdamount',
             width: 120
         }, {
-            text: '数量',
-            dataIndex: 'pd_qty',
-            xtype: 'numbercolumn',
-            width: 120
+            text: '本次核销金额',
+            dataIndex: 'pb_pbdamount',
+            width: 120,
         }, {
-            text: '单价',
-            dataIndex: 'pd_price',
-            xtype: 'numbercolumn',
-            width: 120
+            text: '本次预付款',
+            dataIndex: 'pb_preamount',
+            width: 120,
         }, {
-            text: '已转数',
-            dataIndex: 'pd_ytqy',
-            xtype: 'numbercolumn',
+            text: '整单折扣',
+            dataIndex: 'pb_discounts',
             width: 120,
-            flex: 1
-        }]
+        }, {
+            text: '已核销金额',
+            dataIndex: 'pb_havebalance',
+            width: 120,
+        }],
+        relativeColumn: []
     }
 });

+ 1 - 1
frontend/saas-web/app/view/money/payBalance/QueryPanelController.js

@@ -9,7 +9,7 @@ Ext.define('saas.view.money.paybalance.QueryPanelController', {
             'dbfindtrigger[name=pu_vendname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:basePath + 'document/vendor/getVendorsByCondition',
+                        dataUrl:basePath + 'document/vendor/list',
                         dbfinds:[{
                             from:'ve_code',to:'pu_vendcode'
                         },{

+ 138 - 80
frontend/saas-web/app/view/money/recBalance/FormPanel.js

@@ -12,16 +12,16 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
     //字段属性
     _title: '收款单',
     _idField: 'id',
-    _codeField: 'pd_code',
-    _statusField: 'pd_status',
-    _statusCodeField: 'pd_statuscode',
+    _codeField: 'rb_code',
+    _statusField: 'rb_status',
+    _statusCodeField: 'rb_statuscode',
     
-    _readUrl: 'http://192.168.253.129:8920/api/money/recbalance/read',
-    _saveUrl: 'http://192.168.253.129:8920/money/recbalance/save',
-    _auditUrl: 'http://192.168.0.181:8560/api/purchase/purchase/audit',
-    _deleteUrl: 'http://192.168.0.181:8560/api/purchase/purchase/delete/',
-    _deleteDetailUrl: 'http://192.168.0.181:8560/api/purchase/purchase/deleteItem/',
-    _turnInUrl: 'http://192.168.253.228:8800/purchase/turnProdin/',
+    _readUrl: basePath + 'money/recbalance/read/',
+    _saveUrl: basePath + 'money/recbalance/save/',
+    _auditUrl: basePath + 'money/recbalance/audit/',
+    _unAuditUrl: basePath + 'money/recbalance/unAudit/',
+    _deleteUrl: basePath + 'money/recbalance/delete/',
+    _deleteDetailUrl: basePath + 'money/recbalance/deleteItem/',
     initId: 0,
 
     defaultItems: [{
@@ -32,6 +32,11 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         xtype: 'hidden',
         name: 'rb_custid',
         fieldLabel: '客户ID'
+    }, {
+        xtype: 'hidden',
+        name: 'rb_kind',
+        fieldLabel: '单据类型',
+        defaultValue: '收款单'
     }, {
         xtype: 'hidden',
         name: 'rb_custcode',
@@ -40,13 +45,14 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         xtype: "dbfindtrigger",
         name: "rb_custname",
         fieldLabel: "客户名称",
-        dataUrl: '',
     }, {
         xtype: "numberfield",
-        name: "rb_rbdamount",
-        readOnly: true,
-        editable: false,
+        name: "rb_rdamount",
         fieldLabel: "总欠款"
+    }, {
+        xtype: 'numberfield',
+        name: 'rb_rbdamount',
+        fieldLabel: '本次核销金额'
     }, {
         xtype: "datefield",
         name: "rb_date",
@@ -68,113 +74,165 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         xtype: 'numberfield',
         name: 'rb_preamount',
         fieldLabel : '本次预收款'
+    }, {
+        xtype: 'numberfield',
+        name: 'rb_havebalance',
+        fieldLabel: '已核销金额'
     }, {
         xtype: "detailGridField",
         storeModel: 'saas.model.money.RecBalance1',
-        _detnoColumn: 'rd_detno',
+        detnoColumn: 'rd_detno',
+        _deleteDetailUrl: basePath + 'money/recbalance/audit/',
         columns: [{
-            text: "序号",
-            dataIndex: "rd_detno",
-            width: 100,
-            xtype: "numbercolumn",
-            align: 'center',
-            format: '0',
-            summaryType: 'count',
-            summaryRenderer: function (value, summaryData, dataIndex) {
-                return Ext.String.format('合计: {0}条', value);
-            },
+            text: 'ID',
+            dataIndex: 'id',
+            hidden: true
+        }, {
+            text: '期间',
+            dataIndex: 'rd_ym',
+            editor: {
+                xtype: 'numberfield'
+            }
+        }, {
+            text: '资金账户ID',
+            dataIndex: 'rd_bankid',
+            width : 100.0, 
+            editor: {
+                xtype: 'numberfield'
+            }
+        }, {
+            text: '资金账户编号',
+            dataIndex: 'rd_bankcode',
+            width : 100.0, 
+            editor: {
+                xtype: 'textfield'
+            }
         }, {
             text: '资金账户',
             dataIndex: 'rd_bankname',
             width : 200.0, 
-            editor : {
-                displayField : "display", 
-                editable : true, 
-                format : "", 
-                hideTrigger : false, 
-                maxLength : 100.0, 
-                minValue : null, 
-                positiveNum : false, 
-                queryMode : "local", 
-                store : null, 
-                valueField : "value", 
-                xtype : "dbfindtrigger"
+            editor: {
+                xtype: 'textfield'
             }
         }, {
             text: "收款金额",
             dataIndex: "rd_amount",
+            editor: {
+                xtype: 'numberfield'
+            }
         }, {
             text: "结算方式",
-            dataIndex: "rd_paymethod"
+            dataIndex: "rd_paymethod",
+            editor: {
+                xtype: 'textfield'
+            }
         }, {
             text: "结算号",
-            dataIndex: "rd_paycode"
+            dataIndex: "rd_paycode",
+            editor: {
+                xtype: 'textfield'
+            }
         }, {
             text: "备注",
-            dataIndex: "rd_remark"
+            dataIndex: "rd_remark",
+            editor: {
+                xtype: 'textfield'
+            }
         }]
     }, {
         xtype: "detailGridField",
-        storeModel: 'saas.model.money.RecBalance1',
-        _detnoColumn: 'rbd_detno',
+        storeModel: 'saas.model.money.RecBalance2',
+        detnoColumn: 'rbd_detno',
+        _deleteDetailUrl: basePath + 'money/recbalance/unAudit/',
         columns: [{
-            text: "序号",
-            dataIndex: "rbd_detno",
-            width: 100,
-            xtype: "numbercolumn",
-            align: 'center',
-            format: '0',
-            summaryType: 'count',
-            summaryRenderer: function (value, summaryData, dataIndex) {
-                return Ext.String.format('合计: {0}条', value);
-            },
+            text: 'ID',
+            dataIndex: 'id',
+            hidden: true
+        }, {
+            text: '期间',
+            dataIndex: 'rbd_ym',
+            editor: {
+                xtype: 'numberfield'
+            }
+        }, {
+            text: '来源ID',
+            dataIndex: 'rbd_slid',
+            editor: {
+                xtype: 'numberfield'
+            }
         }, {
             text: '来源单号',
-            dataIndex: 'rbd_slcode'
+            dataIndex: 'rbd_slcode',
+            editor: {
+                xtype: 'textfield'
+            }
         }, {
             text: "业务类型",
             dataIndex: "rbd_slkind",
+            editor: {
+                xtype: 'textfield'
+            }
         }, {
             text: "单据日期",
-            dataIndex: "rbd_sldate"
+            dataIndex: "rbd_sldate",
+            editor: {
+                xtype: 'datefield'
+            }
         }, {
             text: "单据金额",
-            dataIndex: "rbd_amount"
-        }, {
-            text: "已核销金额",
-            dataIndex: "rbd_nowbalance"
-        }, {
-            text: "未核销金额",
-            dataIndex: "pbd_nowbalance"
+            dataIndex: "rbd_amount",
+            editor: {
+                xtype: 'numberfield'
+            }
+        // }, {
+        //     text: "已核销金额",
+        //     dataIndex: "rbd_nowbalance",
+        //     editor: {
+        //         xtype: 'numberfield'
+        //     }
+        // }, {
+        //     text: "未核销金额",
+        //     dataIndex: "pbd_nowbalance",
+        //     editor: {
+        //         xtype: 'numberfield'
+        //     }
         }, {
             text: "本次核销金额",
-            dataIndex: "pbd_nowbalance"
+            dataIndex: "pbd_nowbalance",
+            editor: {
+                xtype: 'numberfield'
+            }
+        }, {
+            text: '备注',
+            dataIndex: 'rbd_remark',
+            editor: {
+                xtype: 'textfield'
+            }
         }]
     }, {
-        xtype: 'textfield',
+        xtype: 'numberfield',
         name: 'companyid',
         fieldLabel: '公司id'
     }, {
-        format: "Y-m-d h:i:s",
-        xtype: "datefield",
-        name: "pb_recorddate",
-        fieldLabel: "创建时间"
+        xtype: 'numberfield',
+        name: 'rb_recorderid',
+        fieldLabel: '录入人ID'
+    }, {
+        xtype: 'textfield',
+        name: 'rb_recorder',
+        fieldLabel: '录入人'
+    }, {
+        xtype: 'numberfield',
+        name: 'updaterId',
+        fieldLabel: '更新人ID'
+    }, {
+        xtype: 'datefield',
+        name: 'updatedate',
+        fieldLabel: '更新时间'
     }, {
         format: "Y-m-d h:i:s",
         xtype: "datefield",
-        name: "updatedate",
-        fieldLabel: "更新时间"
-    }, {
-        xtype: "textfield",
-        readOnly: true,
-        editable: false,
-        name: "pd_status",
-        fieldLabel: "单据状态"
-    }, {
-        xtype: "hidden",
-        readOnly: true,
-        editable: false,
-        name: "pd_statuscode",
-        fieldLabel: "单据状态码"
+        name: "rb_recorddate",
+        fieldLabel: "创建时间"
     }]
 });

+ 70 - 22
frontend/saas-web/app/view/money/recBalance/FormPanelController.js

@@ -9,57 +9,105 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         //数据接口
-                        dataUrl: 'http://192.168.253.41:9480/vendor/getVendorsByCondition',
+                        dataUrl: 'http://192.168.253.31:9480/customer/list',
                         //赋值 
                         dbfinds:[{
-                            from: 've_id', to: 'rb_custid'
+                            from: 'id', to: 'rb_custid'
                         }, {
-                            from:'ve_code', to:'rb_custcode'
+                            from:'cu_code', to:'rb_custcode'
                         },{
-                            from:'ve_name', to:'rb_custname'
+                            from:'cu_name', to:'rb_custname'
                         }],
                         //联想设置
                         dbtpls:[{
-                            field:'ve_code',width:100
+                            field:'cu_code',width:100
                         },{
-                            field:'ve_name',width:100
+                            field:'cu_name',width:100
                         }],
                         //联想查询条件
-                        dbCondition:"CONCAT(ve_code, ve_name) like '{0}%'",
+                        dbCondition:"CONCAT(cu_code, cu_name) like '{0}%'",
                         //放大镜窗口字段
                         dbSearchFields:[{
                             xtype : "textfield", 
-                            name : "ve_name", 
-                            conditionExpression:"ve_name like '{0}%'",//传入后台条件  替换占位符
-                            fieldLabel : "供应商名称", 
+                            name : "cu_name", 
+                            conditionExpression:"cu_name like '{0}%'",//传入后台条件  替换占位符
+                            fieldLabel : "客户名称", 
                             columnWidth : 0.25
                         }],
                         //放大镜窗口列表
                         dbColumns:[{
-                            "text": "供应商ID",
+                            "text": "ID",
                             "flex": 0,
-                            "dataIndex": "ve_id",
+                            "dataIndex": "id",
                             "width": 0,
                             "xtype": "",
                             "items": null
                         },{
                             "text": "供应商编号",
                             "flex": 1,
-                            "dataIndex": "ve_code",
+                            "dataIndex": "cu_code",
                             "width": 100,
                             "xtype": "",
                             "items": null
                         }, {
                             "text": "供应商名称",
                             "flex": 1,
-                            "dataIndex": "ve_name",
+                            "dataIndex": "cu_name",
                             "xtype": "",
                             "items": null
+                        }]
+                    }) ;   
+
+                }
+            },
+            'dbfindtrigger[name=rd_bankname]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        //数据接口
+                        dataUrl: 'http://192.168.253.31:9480/customer/list',
+                        //赋值 
+                        dbfinds:[{
+                            from: 'id', to: 'rb_custid'
                         }, {
-                            "text": "供应商类型",
+                            from:'cu_code', to:'rb_custcode'
+                        },{
+                            from:'cu_name', to:'rb_custname'
+                        }],
+                        //联想设置
+                        dbtpls:[{
+                            field:'cu_code',width:100
+                        },{
+                            field:'cu_name',width:100
+                        }],
+                        //联想查询条件
+                        dbCondition:"CONCAT(cu_code, cu_name) like '{0}%'",
+                        //放大镜窗口字段
+                        dbSearchFields:[{
+                            xtype : "textfield", 
+                            name : "cu_name", 
+                            conditionExpression:"cu_name like '{0}%'",//传入后台条件  替换占位符
+                            fieldLabel : "客户名称", 
+                            columnWidth : 0.25
+                        }],
+                        //放大镜窗口列表
+                        dbColumns:[{
+                            "text": "ID",
                             "flex": 0,
-                            "dataIndex": "ve_type",
-                            "width": 200,
+                            "dataIndex": "id",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "供应商编号",
+                            "flex": 1,
+                            "dataIndex": "cu_code",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "供应商名称",
+                            "flex": 1,
+                            "dataIndex": "cu_name",
                             "xtype": "",
                             "items": null
                         }]
@@ -103,15 +151,15 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
             url: form._turnInUrl+id.value,
             method: 'GET',
         })
-        .then(function(res) {
-            var localJson = new Ext.decode(res.responseText);
+        .then(function(localJson) {
             if(localJson.success){
-                Ext.Msg.alert('提示','转单成功');
+                showToast('转单成功');
               
             }
         })
-        .catch(function() {
-            Ext.Msg.alert('提示','转单失败');
+        .catch(function(res) {
+            console.error(res);
+            showToast('转单失败: ' + res.message);
         });
      }
 });

+ 24 - 146
frontend/saas-web/app/view/money/recBalance/QueryPanel.js

@@ -9,185 +9,63 @@ Ext.define('saas.view.money.recBalance.QueryPanel', {
     
     queryFormItems: [{
         xtype: 'hidden',
-        name: 'pu_id',
-        bind: '{pu_id}',
+        name: 'rb_id',
         fieldLabel: 'ID',
         allowBlank: true,
         getCondition: function(value) {
-            return 'pu_id=' + value;
+            return 'rb_id=' + value;
         }
     }, {
         xtype: 'textfield',
-        name: 'pu_code',
-        bind: '{pu_code}',
+        name: 'rb_code',
         fieldLabel: '单据编号'
     }, {
         xtype: 'condatefield',
-        name: 'pu_date',
-        bind: '{pu_date}',
-        fieldLabel: '采购日期',
+        name: 'rb_date',
+        fieldLabel: '日期',
         columnWidth: 0.5,
         operation: 'between'
-    }, {
-        xtype: 'dbfindtrigger',
-        name: 'pu_vendcode',
-        bind: '{pu_vendcode}',
-        fieldLabel: '供应商编号'
-    }, {
-        xtype: 'textfield',
-        name: 'pu_vendname',
-        bind: '{pu_vendname}',
-        fieldLabel: '供应商名称'
-    }, {
-        xtype: 'dbfindtrigger',
-        name: 'pd_prodcode',
-        bind: '{pd_prodcode}',
-        fieldLabel: '物料编号',
-        showDetail: true
-    }, {
-        xtype: 'textfield',
-        name: 'pr_detail',
-        bind: '{pr_detail}',
-        fieldLabel: '物料名称',
-        showDetail: true
-    }, {
-        xtype: 'combobox',
-        name: 'pu_statuscode',
-       // bind: '{pu_statuscode}',
-        fieldLabel: '审核状态',
-        queryMode: 'local',
-        displayField: 'pu_status',
-        valueField: 'pu_statuscode',
-        editable:false,
-        store: Ext.create('Ext.data.ArrayStore', {
-        fields: ['pu_statuscode', 'pu_status'],
-        data: [
-            ["$ALL", "全部"],
-            ["AUDITED", "已审核"],
-            ["UNAUDITED", "未审核"]
-        ]
-        })
-    }, {
-        xtype: 'multicombo',
-        name: 'pu_acceptstatuscode',
-        bind: '{pu_acceptstatuscode}',
-        fieldLabel: '入库状态',
-        datas: [
-            ["TURNIN", "已入库"],
-            ["UNTURNIN", "未入库"],
-            ["PARTIN", "部分入库"]
-        ]
-    }],
-    moreQueryFormItems: [{
-        xtype: 'textfield',
-        name: 'pu_buyername',
-        bind: '{pu_buyername}',
-        fieldLabel: '采购员'
-    }, {
-        xtype: 'textfield',
-        name: 'pu_total',
-        bind: '{pu_total}',
-        fieldLabel: '金额'
-    }, {
-        xtype: 'condatefield',
-        name: 'pu_delivery',
-        bind: '{pu_delivery}',
-        fieldLabel: '交货日期',
-        columnWidth: 1
     }],
+    moreQueryFormItems: [],
     queryGridConfig: {
-        idField: 'pu_id',
-        codeField: 'pu_code',
-        addTitle: '采购单',
-        addXtype: 'purchase-purchase-formpanel',
+        idField: 'id',
+        codeField: 'rb_code',
+        addTitle: '收款单',
+        addXtype: 'money-recbalance-formpanel',
         defaultCondition:'',
-        baseVastUrl: 'http://192.168.253.58:8800/purchase/',
+        baseVastUrl: basePath + 'money/recbalance/',
         baseColumn: [{
-            text: '序号',
-            width: 80,
-            xtype: 'rownumberer'
-        }, {
             text: 'id',
-            dataIndex: 'pu_id',
+            dataIndex: 'id',
             width: 100,
             xtype: 'numbercolumn'
         }, {
             text: '单据编号',
-            dataIndex: 'pu_code',
+            dataIndex: 'rb_code',
             width: 120
         }, {
             text: '单据状态',
-            dataIndex: 'pu_status',
+            dataIndex: 'rb_status',
             width: 120
         }, {
-            text: '下单日期',
-            dataIndex: 'pu_indate',
+            text: '日期',
+            dataIndex: 'rb_date',
             xtype: 'datecolumn',
             width: 200
         }, {
-            text: '供应商名称',
-            dataIndex: 'pu_vendname',
-            width: 120
-        }, {
-            text: '含税金额',
-            dataIndex: 'pu_taxtotal',
-            xtype: 'numbercolumn',
-            width: 120
-        }, {
-            text: '金额',
-            dataIndex: 'pu_total',
-            xtype: 'numbercolumn',
-            width: 120,
-            flex: 1
-        }],
-        relativeColumn: [{
-            text: '序号',
-            width: 80,
-            xtype: 'rownumberer'
+            text: '客户编号',
+            dataIndex: 'rb_custcode'
         }, {
-            text: 'id',
-            dataIndex: 'pu_id',
-            width: 100,
-            xtype: 'numbercolumn'
-        }, {
-            text: '单据编号',
-            dataIndex: 'pu_code',
-            width: 120
-        }, {
-            text: '单据状态',
-            dataIndex: 'pu_status',
-            width: 120
-        }, {
-            text: '下单日期',
-            dataIndex: 'pu_indate',
-            xtype: 'datecolumn',
-            width: 200
-        }, {
-            text: '供应商名称',
-            dataIndex: 'pu_vendname',
-            width: 120
-        }, {
-            text: '采购序号',
-            dataIndex: 'pd_detno',
-            xtype: 'numbercolumn',
-            width: 120
-        }, {
-            text: '物料编号',
-            dataIndex: 'pd_prodcode',
-            width: 120
-        }, {
-            text: '数量',
-            dataIndex: 'pd_qty',
-            xtype: 'numbercolumn',
-            width: 120
+            text: '客户名称',
+            dataIndex: 'rb_custname'
         }, {
-            text: '单价',
-            dataIndex: 'pd_price',
+            text: '收款人',
+            dataIndex: 'rb_manname',
             xtype: 'numbercolumn',
             width: 120
         }, {
-            text: '已转数',
-            dataIndex: 'pd_ytqy',
+            text: '收款金额',
+            dataIndex: 'rb_rdamount',
             xtype: 'numbercolumn',
             width: 120,
             flex: 1

+ 1 - 1
frontend/saas-web/app/view/money/recBalance/QueryPanelController.js

@@ -9,7 +9,7 @@ Ext.define('saas.view.money.recBalance.QueryPanelController', {
             'dbfindtrigger[name=pu_vendname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:'http://192.168.253.41:9480/api/document/vendor/getVendorsByCondition',
+                        dataUrl:'http://192.168.253.41:9480/api/document/vendor/list',
                         dbfinds:[{
                             from:'ve_code',to:'pu_vendcode'
                         },{

+ 4 - 4
frontend/saas-web/app/view/purchase/purchase/FormPanel.js

@@ -187,14 +187,15 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
                 xtype : "numbercolumn"
             }, 
             {
-                text : "未税金额", 
+                text : "未税金额", 
                 dataIndex : "pd_taxtotal", 
+                width : 120.0, 
                 xtype : "numbercolumn"
             },{
                 text : "需求日期", 
                 dataIndex : "pd_delivery", 
-                flex : 1.0, 
                 xtype:'datecolumn',
+                width : 120.0, 
                 format : "Y-m-d H:i:s", 
                 editor : {
                     xtype : "datefield",
@@ -206,8 +207,7 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
             {
                 text : "关联销售单号", 
                 dataIndex : "pd_salecode", 
-                width : 120.0,
-                flex : 1.0
+                width : 120.0
             }
         ]
     }, {

+ 6 - 6
frontend/saas-web/app/view/purchase/purchase/FormPanelController.js

@@ -9,7 +9,7 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         //数据接口
-                        dataUrl:basePath+'document/vendor/getVendorsByCondition',
+                        dataUrl:basePath+'document/vendor/list',
                         //赋值 
                         dbfinds:[{
                             from:'ve_code',to:'pu_vendcode'
@@ -200,15 +200,15 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
             url: form._turnInUrl+id.value,
             method: 'GET',
         })
-        .then(function(res) {
-            var localJson = new Ext.decode(res.responseText);
+        .then(function(localJson) {
             if(localJson.success){
-                Ext.Msg.alert('提示','转单成功');
+                showToast('转单成功');
               
             }
         })
-        .catch(function() {
-            Ext.Msg.alert('提示','转单失败');
+        .catch(function(res) {
+            console.error(res);
+            showToast('转单失败: ' + res.message);
         });
      }
 });

+ 1 - 1
frontend/saas-web/app/view/purchase/purchase/QueryPanelController.js

@@ -9,7 +9,7 @@ Ext.define('saas.view.purchase.purchase.QueryPanelController', {
             'dbfindtrigger[name=pu_vendname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:basePath+'document/vendor/getVendorsByCondition',
+                        dataUrl:basePath+'document/vendor/list',
                         dbfinds:[{
                             from:'ve_code',to:'pu_vendcode'
                         },{

+ 6 - 6
frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js

@@ -15,7 +15,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
             'dbfindtrigger[name=pu_vendcode]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:basePath+'document/vendor/getVendorsByCondition',
+                        dataUrl:basePath+'document/vendor/list',
                         dbfinds:[{
                             from:'ve_code',to:'pu_vendcode'
                         },{
@@ -158,15 +158,15 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
             url: form._turnOutUrl+id.value,
             method: 'GET',
         })
-        .then(function(res) {
-            var localJson = new Ext.decode(res.responseText);
+        .then(function(localJson) {
             if(localJson.success){
-                Ext.Msg.alert('提示','转单成功');
+                showToast('转单成功');
               
             }
         })
-        .catch(function() {
-            Ext.Msg.alert('提示','转单失败');
+        .catch(function(res) {
+            console.error(res);
+            showToast('转单失败: ' + res.message);
         });
      }
 });

+ 1 - 1
frontend/saas-web/app/view/purchase/purchaseIn/QueryPanelController.js

@@ -9,7 +9,7 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanelController', {
             'dbfindtrigger[name=pu_vendname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:basePath+'document/vendor/getVendorsByCondition',
+                        dataUrl:basePath+'document/vendor/list',
                         dbfinds:[{
                             from:'ve_code',to:'pu_vendcode'
                         },{

+ 1 - 1
frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js

@@ -14,7 +14,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
             'dbfindtrigger[name=pu_vendcode]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:basePath+'document/vendor/getVendorsByCondition',
+                        dataUrl:basePath+'document/vendor/list',
                         dbfinds:[{
                             from:'ve_code',to:'pu_vendcode'
                         },{

+ 1 - 1
frontend/saas-web/app/view/purchase/purchaseOut/QueryPanelController.js

@@ -9,7 +9,7 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanelController', {
             'dbfindtrigger[name=pu_vendname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:basePath+'document/vendor/getVendorsByCondition',
+                        dataUrl:basePath+'document/vendor/list',
                         dbfinds:[{
                             from:'ve_code',to:'pu_vendcode'
                         },{

+ 13 - 26
frontend/saas-web/app/view/sale/sale/FormPanel.js

@@ -25,7 +25,7 @@ Ext.define('saas.view.sale.sale.FormPanel', {
  
      toolBtns: [{
          xtype: 'button',
-         text: '转出货单',
+         text: '转销售出货单',
          handler: 'turnOut'
      }],
 
@@ -54,16 +54,20 @@ Ext.define('saas.view.sale.sale.FormPanel', {
     }, {
         name : "detailGridField", 
         xtype : "detailGridField", 
-        detnoColumn:  'sd_detno',
+        detnoColumn: 'sd_detno',
         storeModel:'saas.model.sale.Saledetail',
         _deleteDetailUrl:basePath+'sale/deleteItem/',
         columns : [
            {
                 text : "id", 
                 dataIndex : "id", 
-                xtype : "hidden"
-            },
-            {
+                xtype : "numbercolumn",
+                width:0
+            }, {
+                text : "物料id", 
+                dataIndex : "pd_prodid", 
+                width : 0
+            }, {
                 text : "物料编号", 
                 width : 200.0, 
                 dataIndex : "sd_prodcode", 
@@ -82,18 +86,15 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                     valueField : "value", 
                     xtype : "dbfindtrigger"
                 }
-            },
-            {
+            }, {
                 text : "名称", 
                 dataIndex : "pr_detail",
                 ignore:true,
                 width : 150.0, 
                 renderer: function (v, m, r) {
-                    debugger;
 				    return r.data["product"]?r.data["product"][m.column.dataIndex]:v;
 				}
-            },
-            {
+            }, {
                 text : "规格", 
                 dataIndex : "pr_spec",
                 ignore:true,
@@ -101,8 +102,7 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 renderer: function (v, m, r) {
 				    return r.data["product"]?r.data["product"][m.column.dataIndex]:v;
 				}
-            },
-            {
+            }, {
                 text : "数量", 
                 dataIndex : "sd_qty", 
                 editor : {
@@ -113,7 +113,7 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 format:'0,000.00',
                 items : null,
                 summaryType: 'sum'
-            },
+            }, 
             {
                 text : "单价", 
                 editor : {
@@ -171,19 +171,6 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 ignore:true,
                 flex : 1.0,
             }
-           /*  {
-                text : "已转数", 
-                dataIndex : "sd_yqty", 
-                editor : {
-                    xtype : "numberfield"
-                },
-                width : 120.0, 
-                xtype : "numbercolumn", 
-                format:'0',
-                 
-                items : null,
-                summaryType: 'sum'
-            }, */
         ]
     }, {
         xtype : "textfield", 

+ 5 - 5
frontend/saas-web/app/view/sale/sale/FormPanelController.js

@@ -119,14 +119,14 @@ Ext.define('saas.view.sale.sale.FormPanelController', {
             url: form._turnOutUrl+id.value,
             method: 'POST',
         })
-        .then(function(res) {
-            var localJson = new Ext.decode(res.responseText);
+        .then(function(localJson) {
             if(localJson.success){
-                Ext.Msg.alert('提示','转单成功');
+                showToast('转单成功');
             }
         })
-        .catch(function() {
-            Ext.Msg.alert('提示','转单失败');
+        .catch(function(res) {
+            console.error(res);
+            showToast('转单失败: ' + res.message);
         });
      }
 });

+ 1 - 1
frontend/saas-web/app/view/sale/sale/QueryPanel.js

@@ -77,7 +77,7 @@ Ext.define('saas.view.sale.sale.QueryPanel', {
         baseColumn: [{
             text: 'id',
             dataIndex: 'sa_id',
-            width: 100,
+            width: 0,
             xtype: 'numbercolumn'
         }, {
             text: '单据编号',

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