Browse Source

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

zhoudw 7 years ago
parent
commit
1f1e8a8bdd
73 changed files with 4135 additions and 649 deletions
  1. 9 1
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/dto/ListReqDTO.java
  2. 67 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/BillCodeSeq.java
  3. 60 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/OthreceiptsController.java
  4. 63 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/OthspengdingsController.java
  5. 19 13
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/PaybalanceController.java
  6. 28 18
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/RecbalanceContorller.java
  7. 21 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/OthreceiptsMapper.java
  8. 18 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/OthreceiptsdetailMapper.java
  9. 21 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/OthspendingsMapper.java
  10. 18 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/OthspendingsdetailMapper.java
  11. 6 2
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/PaybalancedetMapper.java
  12. 6 2
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/PaybalancedetailMapper.java
  13. 2 2
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/RecbalancedetMapper.java
  14. 4 1
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/RecbalancedetailMapper.java
  15. 245 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othreceipts.java
  16. 155 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othreceiptsdetail.java
  17. 28 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othsp.java
  18. 245 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othspendings.java
  19. 155 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othspendingsdetail.java
  20. 28 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othte.java
  21. 17 15
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Pay.java
  22. 6 6
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Paybalance.java
  23. 17 15
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Rec.java
  24. 6 6
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalance.java
  25. 3 7
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalancedetail.java
  26. 28 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/OthreceiptsService.java
  27. 29 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/OthspendingsService.java
  28. 7 4
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/PaybalanceService.java
  29. 11 5
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/RecbalanceService.java
  30. 105 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthreceiptsServiceImpl.java
  31. 106 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthspendingsServiceImpl.java
  32. 61 22
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/PaybalanceServiceImpl.java
  33. 75 24
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/RecbalanceServiceImpl.java
  34. 326 0
      applications/money/money-server/src/main/resources/mapper/OthreceiptsMapper.xml
  35. 218 0
      applications/money/money-server/src/main/resources/mapper/OthreceiptsdetailMapper.xml
  36. 319 0
      applications/money/money-server/src/main/resources/mapper/OthspendingsMapper.xml
  37. 218 0
      applications/money/money-server/src/main/resources/mapper/OthspendingsdetailMapper.xml
  38. 2 2
      applications/money/money-server/src/main/resources/mapper/PaybalanceMapper.xml
  39. 22 14
      applications/money/money-server/src/main/resources/mapper/PaybalancedetMapper.xml
  40. 19 13
      applications/money/money-server/src/main/resources/mapper/PaybalancedetailMapper.xml
  41. 16 16
      applications/money/money-server/src/main/resources/mapper/RecbalanceMapper.xml
  42. 28 22
      applications/money/money-server/src/main/resources/mapper/RecbalancedetMapper.xml
  43. 25 19
      applications/money/money-server/src/main/resources/mapper/RecbalancedetailMapper.xml
  44. 12 1
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/SaleApplication.java
  45. 2 0
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/mapper/SaleMapper.java
  46. 11 0
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java
  47. 3 0
      applications/sale/sale-server/src/main/resources/mapper/SaleMapper.xml
  48. 102 94
      frontend/saas-web/Readme.md
  49. 12 0
      frontend/saas-web/app/model/document/customeraddress.js
  50. 13 0
      frontend/saas-web/app/model/document/customercontact.js
  51. 6 5
      frontend/saas-web/app/util/BaseUtil.js
  52. 5 2
      frontend/saas-web/app/util/FormUtil.js
  53. 40 18
      frontend/saas-web/app/view/core/baseform/GridPanel.js
  54. 101 36
      frontend/saas-web/app/view/core/dbfind/DbfindGridPanel.js
  55. 6 2
      frontend/saas-web/app/view/core/dbfind/DbfindTrigger.js
  56. 95 65
      frontend/saas-web/app/view/core/dbfind/MultiDbfindGridPanel.js
  57. 6 2
      frontend/saas-web/app/view/core/dbfind/MultiDbfindTrigger.js
  58. 61 18
      frontend/saas-web/app/view/core/form/FormPanel.js
  59. 52 0
      frontend/saas-web/app/view/core/form/FormPanel.scss
  60. 17 1
      frontend/saas-web/app/view/core/form/FormPanelController.js
  61. 4 0
      frontend/saas-web/app/view/core/form/FormPanelModel.js
  62. 0 124
      frontend/saas-web/app/view/document/customer/FormPanel.js
  63. 0 4
      frontend/saas-web/app/view/document/customer/FormPanelModel.js
  64. 83 0
      frontend/saas-web/app/view/document/customer/list/FormPanel.js
  65. 2 2
      frontend/saas-web/app/view/document/customer/list/FormPanelController.js
  66. 4 0
      frontend/saas-web/app/view/document/customer/list/FormPanelModel.js
  67. 202 0
      frontend/saas-web/app/view/document/customer/panel/FormController.js
  68. 6 0
      frontend/saas-web/app/view/document/customer/panel/FormModel.js
  69. 327 0
      frontend/saas-web/app/view/document/customer/panel/FormPanel.js
  70. 0 1
      frontend/saas-web/app/view/document/kind/KindController.js
  71. 3 4
      frontend/saas-web/app/view/purchase/purchase/FormPanel.js
  72. 97 40
      frontend/saas-web/app/view/purchase/purchase/FormPanelController.js
  73. 1 1
      frontend/saas-web/resources/json/navigation.json

+ 9 - 1
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/dto/ListReqDTO.java

@@ -34,6 +34,13 @@ public class ListReqDTO implements Serializable {
         this.mode = mode;
     }
 
+    /**
+    * @Description 拼最后查询条件
+    * @Param: []
+    * @return: java.lang.String
+    * @Author: guq
+    * @Date: 2018/10/25
+    */
     public String getFinalCondition() {
         try {
             JSONArray jsonArray = JSONArray.parseArray(this.condition);
@@ -76,10 +83,11 @@ public class ListReqDTO implements Serializable {
                 }
                 return finalCondition.substring(0, finalCondition.length() - 3);
             }
+            return null;
         }catch (Exception e){
             return null;
         }
-        return null;
+
     }
 }
 

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

@@ -0,0 +1,67 @@
+package com.usoftchina.saas.commons.po;
+
+/**
+ * @author: guq
+ * @create: 2018-10-25 09:36
+ **/
+public enum  BillCodeSeq {
+
+    PRODUCT("物料资料", "Product"),
+
+    CUSTOMER("客户资料", "Customer"),
+
+    VENDOR("供应商资料", "Vendor"),
+
+    WAREHOUSE("仓库资料", "Warehouse"),
+
+    PURCHASE("采购订单", "Purchase"),
+
+    PURCHASEIN("采购验收单", "PurchaseIn"),
+
+    PURCHASEOUT("采购验退单", "PurchaseOut"),
+
+    SALE("销售订单", "Sale"),
+
+    SALEOUT("销售出货单", "SaleOut"),
+
+    SALEIN("销售退货单", "SaleIn"),
+
+    OTHERIN("其它入库单", "OtherIn"),
+
+    OTHEROUT("其它出库单", "OtherOut"),
+
+    APPROPRIATIONINOUT("调拨单", "AppropriationInOut"),
+
+    MAKE("制造单", "Make"),
+
+    PAYBALANCE("付款单", "PayBalance"),
+
+    RECBALANCE("收款单", "RecBalance"),
+
+    VERIFICATION("核价单", "Verification");
+
+    BillCodeSeq(String name, String caller) {
+        this.name = name;
+        this.caller = caller;
+    }
+
+    private String name;
+    private String caller;
+
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getCaller() {
+        return caller;
+    }
+
+    public void setCaller(String caller) {
+        this.caller = caller;
+    }
+}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

+ 12 - 1
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/SaleApplication.java

@@ -4,6 +4,8 @@ import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
+import org.springframework.web.servlet.config.annotation.CorsRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
 
 /**
  * @author: guq
@@ -12,8 +14,17 @@ import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
 @SpringBootApplication
 @MapperScan("com.usoftchina.saas.sale.mapper")
 @EnableEurekaClient
-public class SaleApplication {
+public class SaleApplication extends WebMvcConfigurerAdapter {
     public static void main(String[] args) {
         SpringApplication.run(SaleApplication.class, args);
     }
+    @Override
+    public void addCorsMappings(CorsRegistry registry) {
+
+        registry.addMapping("/**")
+                .allowCredentials(true)
+                .allowedHeaders("*")
+                .allowedOrigins("*")
+                .allowedMethods("*");
+    }
 }

+ 2 - 0
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/mapper/SaleMapper.java

@@ -31,4 +31,6 @@ public interface SaleMapper {
     String validateAudit(List<DocBaseDTO> baseDTOs);
 
     Integer validateCodeWhenUpdate(@Param("code") String code,@Param("id") Long id);
+
+    void updateTotal(Long id);
 }

+ 11 - 0
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java

@@ -133,6 +133,8 @@ public class SaleServiceImpl implements SaleService{
                 saledetailMapper.batchInsert(insertDetails);
             }
             baseDTO = getBaseDTOById(sa_id);
+            //更新销售金额
+            getTotal(sa_id);
             //日志记录
             //messageLogService.save(baseDTO);
             return baseDTO;
@@ -159,6 +161,8 @@ public class SaleServiceImpl implements SaleService{
             saledetailMapper.batchUpdate(updateDetails);
         }
         baseDTO = getBaseDTOById(sa_id);
+        //更新销售金额
+        getTotal(sa_id);
         //日志
         //messageLogService.save(baseDTO);
         return baseDTO;
@@ -482,5 +486,12 @@ public class SaleServiceImpl implements SaleService{
         //messageLogService.unAudit(docBaseDTO);
     }
 
+    //更新最新销售总额
+    private void getTotal(Long id) {
+        if (null == id) {
+            return;
+        }
+        saleMapper.updateTotal(id);
+    }
 
 }

+ 3 - 0
applications/sale/sale-server/src/main/resources/mapper/SaleMapper.xml

@@ -361,4 +361,7 @@
   <select id="validateUnAudit" parameterType="long" resultType="java.lang.String">
     select sa_code from sale where sa_id = #{id} and IFNULL(sa_statuscode,'UNAUDITED')='UNAUDITED'
   </select>
+  <update id="updateTotal" parameterType="long">
+    	update sale a set sa_total=(select sum(sd_price*sd_qty) from saledetail b where b.sd_said=a.sa_id ) where sa_id=#{id};
+  </update>
 </mapper>

+ 102 - 94
frontend/saas-web/Readme.md

@@ -1,94 +1,102 @@
-# saas
-
-This folder is primarily a container for the top-level pieces of the application.
-While you can remove some files and folders that this application does not use,
-be sure to read below before deciding what can be deleted and what needs to be
-kept in source control.
-
-The following files are all needed to build and load the application.
-
- - `"app.json"` - The application descriptor which controls how the application is
-   built and loaded.
- - `"app.js"` - The file that launches the application. This is primarily used to
-   launch an instance of the `MyApp.Application` class.
- - `"index.html"` - The default web page for this application. This can be customized
-   in `"app.json"`.
- - `"build.xml"` - The entry point for Sencha Cmd to access the generated build
-   script. This file is a place where you can hook into these processes and tune
-   them. See the comments in that file for more information.
-
-These files can be ignored from source control as they are regenerated by the build
-process.
-
- - `"build"` - This folder contain the output of the build. The generated CSS file,
-   consolidated resources and concatenated JavaScript file are all stored in this
-   folder.
- - `"bootstrap.*"` - These files are generated by the build and watch commands to
-   enable the application to load in "development mode".
-
-## Basic Application Structure
-
-Applications that target a single toolkit will have the following structure.
-
-    app/                # Contains JavaScript and Theme code
-        model/          # Data model classes
-        view/           # Views as well as ViewModels and ViewControllers
-        store/          # Data stores
-        controller/     # Global / application-level controllers
-
-    overrides/          # JavaScript code that is automatically required
-
-    resources/          # Assets such as images, fonts, etc.
-
-### app/
-
-This folder contains JavaScript (.js files) and styling (.scss files) common
-for all builds of the application.
-
-#### app/controller/
-
-This folder contains the application's global controllers. ViewControllers are located
-alongside their respective view class in `"./view"`. These controllers are used for routing
-and other activities that span all views.
-
-#### app/model/
-
-This folder contains the application's (data) Model classes.
-
-#### app/view/
-
-This folder contains the views as well as ViewModels and ViewControllers depending on the
-application's architecture. Pure MVC applications may not have ViewModels, for example. For
-MVCVM applications or MVC applications that use ViewControllers, the following directory
-structure is recommended:
-
-    app/view/
-        foo/                    # Some meaningful grouping of one or more views
-            Foo.js              # The view class
-            Foo.scss            # The view class styling
-            FooController.js    # The controller for Foo (a ViewController)
-            FooModel.js         # The ViewModel for Foo
-
-This structure helps keep these closely related classes together and easily identifiable in
-most tabbed IDE's or text editors.
-
-#### app/store/
-
-This folder contains any number of store instances or types that can then be reused in the
-application.
-
-## Overrides
-
-The contents of "overrides" folders are automatically required and included in
-builds. These should not be explicitly mentioned in "requires" or "uses" in code.
-This area is intended for overrides like these:
-
-    Ext.define('saas.overrides.foo.Bar', {
-        override: 'Ext.foo.Bar',
-        ...
-    });
-
-Such overrides, while automatically required, will only be included if their target
-class ("Ext.foo.Bar" in this case) is also required. This simplifies applying
-patches or extensions to other classes.
-
+# 精简SaaS前端界面配置说明
+## 导航栏配置
+
+- 配置文件:
+```
+resources/json/navigation.json
+```
+- 格式样例:
+```json
+[{
+    "text": "采购",
+    "iconCls": "x-fa fa-shopping-basket",
+    "items": [{
+        "text": "制单",
+        "items": [{
+            "id": "purchase",
+            "text": "采购单",
+            "addType": "purchase-purchase-formpanel",
+            "viewType": "purchase-purchase-querypanel"
+        }]
+    }, {
+        "text": "报表",
+        "items": [{
+            "id": "puchasedetail",
+            "text": "采购明细表"
+        }]
+    }]
+}]
+```
+- 字段说明
+```
+text: 一级菜单项名称
+iconCls: 一级菜单项图标
+items:  二级菜单
+items[0].text:  二级菜单项标题(左)
+items[1].text: 二级菜单项标题(右)
+items[i].items: 二级菜单项
+items[i].items[i].id: 二级菜单项id
+items[i].items[i].text: 二级菜单项名称
+items[i].items[i].viewType: 点击名称进入的界面的xtype
+items[i].items[i].addType: 可选设置,添加“新增”按钮,点击进入xtype对应界面
+```
+
+## 主从表配置
+- 基础主从表组件
+```
+view: view.core.form.FormPanel
+controller: view.core.form.FormPanelController
+viewModel: view.core.form.FormPanelModel
+```
+自定义的主从表view、controller、viewModel需要继承自以上基础组件。
+
+- 配置字段说明
+
+| 字段名 | 说明 | 必填 | 样例 |
+| --- | --- | --- | --- |
+| extend | 继承,默认继承基础主从表 | √ | "saas.view.core.form.FormPanel" |
+| xtype | 格式为'-'连接的该文件全小写路径 | √ | "purchase-purchase-formpanel" |
+| controller | 控制层,可定义自定义的方法等。命名与xtype一致 | x | "purchase-purchase-formpanel" |
+| viewModel | Model层,可定义数据绑定关系等。命名与xtype一致 | x | "purchase-purchase-formpanel" |
+| viewName | 用于获取界面自定义配置 | x | "purchase-purchase-formpanel" |
+| addTitle | 新增时打开的页面标题 | √ | "采购单" |
+| idField | id字段 | √ | "id" |
+| codeField | 编号字段 | √ | "pu_code" |
+| statusField | 状态字段 | √ | "pu_status" |
+| statusCodeField | 状态码字段 | √ |  "pu_statuscode" |
+| readUrl | 取数接口 | √ | basePath + "purchase/purchase/read" |
+| saveUrl | 保存接口 | √ | basePath + "purchase/purchase/save" |
+| auditUrl | 审核接口 | √ | basePath + "purchase/purchase/audit" |
+| deleteUrl | 删除接口 | √ | basePath + "purchase/purchase/delete" |
+| deleteDetailUrl | 删除明细接口 | √ | basePath + "purchase/purchase/deleteItem" |
+| toolBtns | 自定义按钮 | x | [ Button ] |
+| defaultItems | 界面字段 | √ | [ Fields ]|
+
+主表字段配置说明
+
+_包括部分原有配置和主从表专属配置_
+
+| 字段 | 说明 | 必填 | 样例 |
+| --- | --- | --- | --- |
+| name | 字段名,根据该值设置字段绑定 | √ | "pu_vendcode" |
+| ignore | 是否忽略,为真时getFormData方法不会得到该字段值 | x | true |
+| defaultValue | 默认值 | x | "1001" |
+
+从表配置说明
+
+从表被定义为一个formfield(_xtype=detailGridField_),可以与其他字段一同放到主从表的items中。
+
+| 字段 | 说明 | 必填 | 样例 |
+| --- | --- | --- | --- |
+| storeModel | grid model | √ | "saas.model.purchase.purchasedetail" |
+| detnoColumn | 序号列 | √ | "pud_detno" |
+| columns[i].ignore | 是否忽略,为真时在调用保存方法时不会取到该列值 | x | true |
+
+
+## 查询列表配置
+- 基础组件
+```
+view: view.core.query.QueryPanel
+controller: view.core.query.QuertPanelController
+viewModel: view.core.query.QueryPanelModel
+```

+ 12 - 0
frontend/saas-web/app/model/document/customeraddress.js

@@ -0,0 +1,12 @@
+Ext.define('saas.model.document.customeraddress', {
+    extend: 'saas.model.Base',
+    fields: [
+        { name: 'id', type: 'int' },
+        { name: 'ca_detno', type: 'int' },
+        { name: 'ca_address', type: 'string' },
+        { name: 'ca_person', type: 'string' },
+        { name: 'ca_phone', type: 'string' },
+        { name: 'ca_default', type: 'string' },
+        { name: 'ca_cuid', type: 'int' }
+    ]
+});

+ 13 - 0
frontend/saas-web/app/model/document/customercontact.js

@@ -0,0 +1,13 @@
+Ext.define('saas.model.document.customercontact', {
+    extend: 'saas.model.Base',
+    fields: [
+        { name: 'id', type: 'int' },
+        { name: 'cc_detno', type: 'int' },
+        { name: 'cc_name', type: 'string' },
+        { name: 'cc_tel', type: 'string' },
+        { name: 'cc_qq', type: 'string' },
+        { name: 'cc_email', type: 'string' },
+        { name: 'cc_default', type: 'string' },
+        { name: 'cc_cuid', type: 'int' }
+    ]
+});

+ 6 - 5
frontend/saas-web/app/util/BaseUtil.js

@@ -10,7 +10,11 @@ Ext.define('saas.util.BaseUtil', {
             params = config.params,
             async = config.async || true,
             method = config.method || 'GET',
-            timeout = config.timeout || 8000;
+            timeout = config.timeout || 8000,
+            defaultHeaders = {
+                'Access-Control-Allow-Origin': '*',
+                "Content-Type": 'application/json;charset=UTF-8' 
+            };
 
         return new Ext.Promise(function (resolve, reject) {
             Ext.Ajax.request({
@@ -19,10 +23,7 @@ Ext.define('saas.util.BaseUtil', {
                 async: async,
                 method: method,
                 timeout: timeout,
-                headers: {
-                    'Access-Control-Allow-Origin': '*',
-                    "Content-Type": 'application/json;charset=UTF-8' 
-                },
+                headers: Ext.apply(defaultHeaders, config.headers),
                 success: function (response, opts) {
                     var res = Ext.decode(response.responseText);
                     if(res.success) {

+ 5 - 2
frontend/saas-web/app/util/FormUtil.js

@@ -116,6 +116,9 @@ Ext.define('saas.util.FormUtil', {
             //取后台编号
             me.BaseUtil.request({
                 url: basePath + 'commons/number/getMaxnumber',
+                headers: {
+                    "Content-Type": 'application/x-www-form-urlencoded;charset=UTF-8'
+                },
                 params: {
                     caller:form.caller
                 },
@@ -124,7 +127,7 @@ Ext.define('saas.util.FormUtil', {
                 form.setLoading(false);
                 var res = Ext.decode(response.responseText);
                 if(res.success){
-                    var code = res.data.code;
+                    var code = res.data;
                     var viewModel = form.getViewModel();
                     var detailGrids = form.query('detailGridField');
 
@@ -132,7 +135,7 @@ Ext.define('saas.util.FormUtil', {
                         grid.add10EmptyRow();
                     });
                     if(code){
-                        viewModel.set(form._codeField,code);
+                        viewModel.set('form.' + form._codeField,code);
                     }
                 }
             }).catch(function() {

+ 40 - 18
frontend/saas-web/app/view/core/baseform/GridPanel.js

@@ -5,12 +5,19 @@ Ext.define('saas.view.core.baseform.GridPanel', {
     dataUrl: '',
     dbSearchFields: [],
     condition:'',
-    frame:true,
+
+    selModel: {
+        checkOnly:true,
+        type:'checkboxmodel',
+        mode : "MULTI" ,
+        ignoreRightMouseSelection : false
+	},
 
     initComponent: function() {
         var me = this;
         if(me.columns){
             var fields = me.columns.map(column => column.dataIndex);
+            me.columns = me.insertFirstColumn(me.columns);
             me.store = Ext.create('Ext.data.Store',{
                 fields:fields,
                 autoLoad: true,
@@ -108,24 +115,17 @@ Ext.define('saas.view.core.baseform.GridPanel', {
         me.callParent(arguments);
     },
 
-    loadData: function(grid, url) {
-        this.BaseUtil.request({url})
-        .then(function(response) {
-            var data = Ext.decode(response.responseText);
-                grid.getStore().loadData(data.data);
-                grid.fireEvent('afterLoadData', grid, data.data);
-                grid.setLoading(false);
-        })
-        .catch(function(response) {
-            // something...
-        });
-    },
-
     listeners:{
-        afterrender:function(grid){
-            if(grid.dataUrl){
-                grid.setLoading(true);
-                grid.loadData(grid, grid.dataUrl);
+        itemClick: function(view,record,a,index,c) {
+            var classList = c.target.classList.value;
+            var form = view.ownerCt.ownerCt;
+            if(classList.indexOf('fa-pencil')>-1){
+                var config = {};
+                config.initId = record.get('id');
+                openTab(form._formXtype, '修改'+form._title, form._formXtype+config.initId, config);
+            }else if(classList.indexOf('fa-trash-o')>-1){
+                //删除
+                debugger
             }
         }
     },
@@ -141,5 +141,27 @@ Ext.define('saas.view.core.baseform.GridPanel', {
             condition+= ' AND ';
         }
         return condition;
+    },
+
+    insertFirstColumn:function(columns){
+        var me=this;
+        if(columns.length>0 && columns[0].xtype!='actioncolumn'){
+            return Ext.Array.insert(columns,0,[{
+                xtype:'actioncolumn',
+                width:70,
+                text:'操作',
+                items: [{
+                    tooltip: '编辑',
+                    iconCls: 'x-fa fa-pencil fa-fw',
+                    scope:this
+                },{
+                    text:'删除',
+                    iconCls:'x-fa fa-trash-o fa-fw',
+                    tooltip: '删除',
+                    scope:this
+                }]
+            }]);
+        }
+        return columns;
     }
 });

+ 101 - 36
frontend/saas-web/app/view/core/dbfind/DbfindGridPanel.js

@@ -32,12 +32,12 @@ Ext.define('saas.view.core.dbfind.DbfindGridPanel', {
                     beforeload: function (store, op) {
                         var condition = me.condition;
                         if (Ext.isEmpty(condition)) {
-                            condition = " 1=1 ";
+                            condition = '';
                         }
                         Ext.apply(store.proxy.extraParams, {
                             number: op._page,
                             size: store.pageSize,
-                            keyword: condition
+                            condition: JSON.stringify(condition)
                         });
                     }
                 }
@@ -51,17 +51,13 @@ Ext.define('saas.view.core.dbfind.DbfindGridPanel', {
                         xtype:'button',
                         text:'查询',
                         handler:function(b){
-                            var grid = me;
+                            var grid = me,items=[];
                             grid.condition = '';
-                            var fields = grid.dbSearchFields;
-                            Ext.Array.each(fields,function(f) {
+                            Ext.Array.each(grid.dbSearchFields,function(f) {
                                 var field = b.ownerCt.down('[name='+f.name+']')
-                                var c = grid.getCondition(field,f.conditionExpression);
-                                grid.condition+=c;
+                                items.push(field);
                             });
-                            if(grid.condition.length>0){
-                                grid.condition = grid.condition.substring(0,grid.condition.length-5);
-                            }
+                            grid.condition = grid.getCondition(items);
                             grid.store.loadPage(1);
                         }
                     },'->',{
@@ -83,24 +79,7 @@ Ext.define('saas.view.core.dbfind.DbfindGridPanel', {
         me.callParent(arguments);
     },
 
-    loadData: function(grid, url) {
-        this.BaseUtil.request({url})
-        .then(function(response) {
-            var data = Ext.decode(response.responseText);
-                grid.getStore().loadData(data.data);
-                grid.fireEvent('afterLoadData', grid, data.data);
-        })
-        .catch(function(response) {
-            // something...
-        });
-    },
-
     listeners:{
-        afterrender:function(grid){
-            if(grid.dataUrl){
-                grid.loadData(grid, grid.dataUrl);
-            }
-        },
         itemClick: function(view,record) {
             var me = this;
             var dbfinds = me.dbfinds;
@@ -135,16 +114,102 @@ Ext.define('saas.view.core.dbfind.DbfindGridPanel', {
         }
     },
 
-    getCondition: function(f,conditionExpression){
-        var condition = '';
-        if((f.xtype == 'checkbox' || f.xtype == 'radio')&&f.logic){
-            
-        }else if(f.xtype=='textfield'&&f.value!=''){
-            condition=conditionExpression.replace(new RegExp("\\{0}","g"), f.value);
+    /**
+     * 获得过滤条件
+     */
+    getCondition: function(items) {
+        var me = this,
+        conditions = [];
+
+        for(var i = 0; i < items.length; i++) {
+            var item = items[i];
+            var field = item.name,
+            func = item.getCondition,
+            value = item.value,
+            condition;
+
+            if(typeof func == 'function') {
+                condition = {
+                    type: 'condition',
+                    value: func(value)
+                }
+            }else {
+                var xtype = item.xtype || 'textfield',
+                type = item.fieldType || me.getDefaultFieldType(xtype),
+                operation = item.operation || me.getDefaultFieldOperation(xtype),
+                conditionValue = me.getConditionValue(xtype, value);
+    
+                if(!conditionValue) {
+                    continue;
+                }
+                condition = {
+                    type: type,
+                    field: field,
+                    operation: operation,
+                    value: conditionValue
+                }
+            }
+            conditions.push(condition);
+        };
+        return conditions;
+    },
+
+    getDefaultFieldType: function(xtype) {
+        var type;
+
+        if(Ext.Array.contains(['numberfield'], xtype)) {
+            type = 'number';
+        }else if(Ext.Array.contains(['datefield', 'condatefield'], xtype)) {
+            type = 'date';
+        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo', 'radiofield', 'radio'], xtype)) {
+            type = 'enum';
+        }else {
+            type = 'string';
+        }
+
+        return type;
+    },
+
+    getDefaultFieldOperation: function(xtype) {
+        var operation;
+
+        if(Ext.Array.contains(['numberfield'], xtype)) {
+            operation = '=';
+        }else if(Ext.Array.contains(['datefield'], xtype)) {
+            operation = '=';
+        }else if(Ext.Array.contains(['condatefield'], xtype)) {
+            operation = 'between';
+        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo'], xtype)) {
+            operation = 'in';
+        }else {
+            operation = 'like';
         }
-        if(condition.length>0){
-            condition+= ' AND ';
+
+        return operation;
+    },
+
+    /**
+     * 处理部分字段值
+     */
+    getConditionValue: function(xtype, value) {
+        var conditionValue;
+        if(xtype == 'datefield') {
+            conditionValue = Ext.Date.format(new Date(from), 'Y-m-d h:i:s');
+        }else if(xtype == 'condatefield') {
+            var from = value.from,
+            to = value.to;
+
+            conditionValue = Ext.Date.format(new Date(from), 'Y-m-d h:i:s') + ',' + Ext.Date.format(new Date(to), 'Y-m-d h:i:s');
+        }else if(xtype == 'combobox' || xtype == 'combo') {
+            conditionValue = '\'' + value + '\'';
+        }else if(xtype == 'multicombo') {
+            conditionValue = value.map(function(v) {
+                return '\'' + v.value + '\'';
+            }).join(',');
+        }else {
+            conditionValue = value;
         }
-        return condition;
+
+        return conditionValue;
     }
 });

+ 6 - 2
frontend/saas-web/app/view/core/dbfind/DbfindTrigger.js

@@ -98,8 +98,12 @@ Ext.define('saas.view.core.dbfind.DbfindTrigger', {
     onTriggerClick:function(f){
         //判断dbfindtrigger归属
         f.judge(f);//form
-        var panel = f.up('core-tab-panel');
-        var panelEl = panel.getEl();
+        var panel = f.up('core-tab-panel'),panelEl;
+        if(!f.column && f.ownerCt.ownerCt.id.indexOf('window-')>-1){
+            panelEl = f.ownerCt.ownerCt.getEl()
+        }else{
+            panelEl = panel.getEl()
+        }
         var box = panelEl.getBox();
         var height = box.height;
         var width = box.width;

+ 95 - 65
frontend/saas-web/app/view/core/dbfind/MultiDbfindGridPanel.js

@@ -80,17 +80,13 @@ Ext.define('saas.view.core.dbfind.MultiDbfindGridPanel', {
                         xtype:'button',
                         text:'查询',
                         handler:function(b){
-                            var grid = me;
+                            var grid = me,items=[];
                             grid.condition = '';
-                            var fields = grid.dbSearchFields;
-                            Ext.Array.each(fields,function(f) {
+                            Ext.Array.each(grid.dbSearchFields,function(f) {
                                 var field = b.ownerCt.down('[name='+f.name+']')
-                                var c = grid.getCondition(field,f.conditionExpression);
-                                grid.condition+=c;
+                                items.push(field);
                             });
-                            if(grid.condition.length>0){
-                                grid.condition = grid.condition.substring(0,grid.condition.length-5);
-                            }
+                            grid.condition = grid.getCondition(items);
                             grid.store.loadPage(1);
                         }
                     },'->',{
@@ -255,68 +251,102 @@ Ext.define('saas.view.core.dbfind.MultiDbfindGridPanel', {
         me.callParent(arguments);
     },
 
-    loadData: function(grid, url) {
-        this.BaseUtil.request({url})
-        .then(function(response) {
-            var data = Ext.decode(response.responseText);
-                grid.getStore().loadData(data.data);
-                grid.fireEvent('afterLoadData', grid, data.data);
-        })
-        .catch(function(response) {
-            // something...
-        });
-    },
+     /**
+     * 获得过滤条件
+     */
+    getCondition: function(items) {
+        var me = this,
+        conditions = [];
 
-    listeners:{
-        afterrender:function(grid){
-            if(grid.dataUrl){
-                grid.loadData(grid, grid.dataUrl);
+        for(var i = 0; i < items.length; i++) {
+            var item = items[i];
+            var field = item.name,
+            func = item.getCondition,
+            value = item.value,
+            condition;
+
+            if(typeof func == 'function') {
+                condition = {
+                    type: 'condition',
+                    value: func(value)
+                }
+            }else {
+                var xtype = item.xtype || 'textfield',
+                type = item.fieldType || me.getDefaultFieldType(xtype),
+                operation = item.operation || me.getDefaultFieldOperation(xtype),
+                conditionValue = me.getConditionValue(xtype, value);
+    
+                if(!conditionValue) {
+                    continue;
+                }
+                condition = {
+                    type: type,
+                    field: field,
+                    operation: operation,
+                    value: conditionValue
+                }
             }
-        }//,
-        // itemClick: function(view,record) {
-        //     var me = this;
-        //     var dbfinds = me.dbfinds;
-        //     if(dbfinds&&dbfinds.length>0){
-        //         if(me.belong=='grid'){
-        //             for (let index = 0; index < dbfinds.length; index++) {
-        //                 var item = dbfinds[index];
-        //                 var rec = me.dbfindtrigger.column.ownerCt.ownerCt.selModel.getLastSelected();
-        //                 if(rec){
-        //                     var nowRec = me.dbfindtrigger.column.ownerCt.ownerCt.store.getData().getByKey(rec.id);
-        //                     nowRec.set(item.to,record.get(item.from));
-        //                     //me.column.getEditor().setValue(record.get(item.from));
-        //                 }
-        //             }
-        //         }else if(me.belong=='form'){
-        //             for (let index = 0; index < dbfinds.length; index++) {
-        //                 var item = dbfinds[index];
-        //                 var field = me.ownerCt.belong.down('[name='+item.to+']');
-        //                 if(field){
-        //                     var val = record.get(item.from);
-        //                     if(field.xtype=='dbfindtrigger'){
-        //                         field.setValue(val);
-        //                         field.lastTriggerValue=val;
-        //                     }else{
-        //                         field.setValue(val);
-        //                     }    
-        //                 }
-        //             }
-        //         }
-        //     }
-        //     me.ownerCt.close();
-        // }
+            conditions.push(condition);
+        };
+        return conditions;
+    },
+
+    getDefaultFieldType: function(xtype) {
+        var type;
+
+        if(Ext.Array.contains(['numberfield'], xtype)) {
+            type = 'number';
+        }else if(Ext.Array.contains(['datefield', 'condatefield'], xtype)) {
+            type = 'date';
+        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo', 'radiofield', 'radio'], xtype)) {
+            type = 'enum';
+        }else {
+            type = 'string';
+        }
+
+        return type;
     },
 
-    getCondition: function(f,conditionExpression){
-        var condition = '';
-        if((f.xtype == 'checkbox' || f.xtype == 'radio')&&f.logic){
-            
-        }else if(f.xtype=='textfield'&&f.value!=''){
-            condition=conditionExpression.replace(new RegExp("\\{0}","g"), f.value);
+    getDefaultFieldOperation: function(xtype) {
+        var operation;
+
+        if(Ext.Array.contains(['numberfield'], xtype)) {
+            operation = '=';
+        }else if(Ext.Array.contains(['datefield'], xtype)) {
+            operation = '=';
+        }else if(Ext.Array.contains(['condatefield'], xtype)) {
+            operation = 'between';
+        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo'], xtype)) {
+            operation = 'in';
+        }else {
+            operation = 'like';
         }
-        if(condition.length>0){
-            condition+= ' AND ';
+
+        return operation;
+    },
+
+    /**
+     * 处理部分字段值
+     */
+    getConditionValue: function(xtype, value) {
+        var conditionValue;
+        if(xtype == 'datefield') {
+            conditionValue = Ext.Date.format(new Date(from), 'Y-m-d h:i:s');
+        }else if(xtype == 'condatefield') {
+            var from = value.from,
+            to = value.to;
+
+            conditionValue = Ext.Date.format(new Date(from), 'Y-m-d h:i:s') + ',' + Ext.Date.format(new Date(to), 'Y-m-d h:i:s');
+        }else if(xtype == 'combobox' || xtype == 'combo') {
+            conditionValue = '\'' + value + '\'';
+        }else if(xtype == 'multicombo') {
+            conditionValue = value.map(function(v) {
+                return '\'' + v.value + '\'';
+            }).join(',');
+        }else {
+            conditionValue = value;
         }
-        return condition;
+
+        return conditionValue;
     }
 });

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

@@ -104,8 +104,12 @@ Ext.define('saas.view.core.dbfind.MultiDbfindTrigger', {
     onTriggerClick:function(f){
         //判断dbfindtrigger归属
         f.judge(f);
-        var panel = f.up('core-tab-panel');
-        var panelEl = panel.getEl();
+        var panel = f.up('core-tab-panel'),panelEl;
+        if(f.ownerCt.ownerCt.id.indexOf('window-')>-1){
+            panelEl = f.ownerCt.ownerCt.getEl();
+        }else{
+            panelEl = panel.getEl()
+        }
         var box = panelEl.getBox();
         var height = box.height;
         var width = box.width;

+ 61 - 18
frontend/saas-web/app/view/core/form/FormPanel.js

@@ -1,9 +1,12 @@
 Ext.define('saas.view.core.form.FormPanel', {
     extend: 'Ext.form.Panel',
     xtype: 'core-form-formpanel',
+
     controller: 'core-form-formpanel',
     viewModel: 'core-form-formpanel',
 
+    cls: 'x-core-form',
+
     //工具类
     FormUtil: Ext.create('saas.util.FormUtil'),
     BaseUtil: Ext.create('saas.util.BaseUtil'),
@@ -46,7 +49,44 @@ Ext.define('saas.view.core.form.FormPanel', {
                 style: {
                     'border-bottom': '1px solid #35baf6 !important'
                 },
-                items: ['->'].concat(me.toolBtns.map(function(btn){
+                items: [{
+                    xtype: 'tbtext',
+                    bind: {
+                        html: '<span class="x-tb x-no">NO. </span>' +
+                        '<span class="x-tb x-code">{base.codeEditable ? "" : form.' + me._codeField + '}</span>'
+                    }
+                }, {
+                    xtype: 'textfield',
+                    minHeight: 24,
+                    maxHeight: 24,
+                    cls: 'x-codeeditor',
+                    bind: {
+                        value: '{form.' + me._codeField + '}',
+                        hidden: '{!base.codeEditable}'
+                    },
+                    listeners: {
+                        blur: 'codeEditorBlur',
+                        show: function(field, eOpts) {
+                            field.focus();
+                        }
+                    }
+                }, {
+                    xtype: 'tbtext',
+                    html: '已审核',
+                    cls: 'x-audited',
+                    hidden: true,
+                    bind: {
+                        hidden: '{!(form.' + me._statusCodeField + ' == "AUDITED")}'
+                    }
+                }, {
+                    xtype: 'button',
+                    cls: 'x-codeeditor-btn',
+                    bind: {
+                        iconCls: 'fa {base.codeEditable ? "fa-check-circle" : "fa-edit"}',
+                        hidden: '{!base.editable}'
+                    },
+                    handler: 'codeEditorClick'
+                },'->'].concat(me.toolBtns.map(function(btn){
                     btn.cls = btn.cls ? btn.cls + ' x-formpanel-btn-blue':'x-formpanel-btn-blue';
                     return btn;
                 }).concat([{
@@ -84,28 +124,29 @@ Ext.define('saas.view.core.form.FormPanel', {
      */
     initViewModel: function() {
         var me = this,
+        codeField = me._codeField,
         statusField = me._statusField,
         statusCodeField = me._statusCodeField,
         viewModel = me.getViewModel();
         
-        var o = {};
-        o[statusField] = {
-            bind: '{form.' + statusCodeField + '}',
-            get: function(value) {
-                return value == 'AUDITED' ? '已审核' : '未审核'
-            }
-        };
-        o['auditBtnText'] = {
-            bind: '{form.' + statusCodeField + '}',
-            get: function(value) {
-                return value == 'AUDITED' ? '反审核' : '审核'
-            }
-        };
-        viewModel.setFormulas(o);
-
+        viewModel.set('form.' + codeField, '--------------');
         viewModel.set('form.createTime', new Date());
         viewModel.set('form.updateTime', new Date());
-        statusCodeField ? viewModel.set('form.' + statusCodeField, "UNAUDITED") : viewModel.set('auditBtnText', "审核");
+
+        if(statusCodeField) {
+            var o = {};
+            o['auditBtnText'] = {
+                bind: '{form.' + statusCodeField + '}',
+                get: function(value) {
+                    viewModel.set('form.' + statusField, value == 'AUDITED' ? '审核' : '反审核');
+                    return value == 'AUDITED' ? '反审核' : '审核'
+                }
+            };
+            viewModel.setFormulas(o);
+            viewModel.set('form.' + statusCodeField, "UNAUDITED");
+        }else {
+            viewModel.set('auditBtnText', "审核");
+        }
     },
 
     addItems: function(items) {
@@ -151,7 +192,9 @@ Ext.define('saas.view.core.form.FormPanel', {
             detail = viewData['detail' + i],
             store = detail.detailStore;
 
-            store.loadData(detailData);
+            if(detailData){
+                store.loadData(detailData);
+            }
         }
     },
 

+ 52 - 0
frontend/saas-web/app/view/core/form/FormPanel.scss

@@ -0,0 +1,52 @@
+.x-core-form {
+
+    .x-tb {
+        color: #AEB1B5;
+    }
+    .x-no {
+        font-size: 18px;
+    }
+    .x-code {
+        font-size: 16px;
+    }
+    .x-codeeditor {
+        top: 0px !important;
+        left: 43px !important;
+
+        .x-form-trigger-wrap {
+            border-top: none;
+            border-right: none;
+            border-bottom: 1px solid #aeb1b5;
+            border-left: none;
+
+            input {
+                padding-left: 0;
+                font-size: 16px;
+                min-height: inherit;
+            }
+        }
+    }
+    .x-codeeditor-btn {
+        background-color: transparent !important;
+        border: none;
+        font-size: 18px;
+        box-shadow: none !important;
+
+        .fa-check-circle {
+            color: #52C41A;
+        }
+
+        &:hover {
+            .fa-edit {
+                color: black;
+            }
+            .fa-check-circle {
+                color: #A0D911;
+            }
+        }
+    }
+    .x-audited {
+        border: 1px solid #FF0000;
+        color: #FF0000;
+    }
+}

+ 17 - 1
frontend/saas-web/app/view/core/form/FormPanelController.js

@@ -187,6 +187,7 @@ Ext.define('saas.view.core.form.FormPanelController', {
                 Ext.Msg.alert('提示','审核成功');
                 form.initId = localJson.data.id;
                 form.FormUtil.loadData(form);
+                viewModel.set('base.editable', false);
             }
         })
         .catch(function() {
@@ -194,7 +195,22 @@ Ext.define('saas.view.core.form.FormPanelController', {
         });
     },
     unAudit: function() {
+        var me = this,
+        viewModel = me.getViewModel();
+
+        viewModel.set('base.editable', true);
         console.log('反审核');
-        return;
+    },
+    codeEditorBlur: function() {
+        var me = this,
+        viewModel = me.getViewModel();
+
+        viewModel.set('base.codeEditable', false);
+    },
+    codeEditorClick: function() {
+        var me = this,
+        viewModel = me.getViewModel();
+
+        viewModel.set('base.codeEditable', true);
     }
 });

+ 4 - 0
frontend/saas-web/app/view/core/form/FormPanelModel.js

@@ -6,6 +6,10 @@ Ext.define('saas.view.core.form.FormPanelModel', {
         form: {
             id: 0
         },
+        base: {
+            editable: true, // 单据是否可编辑
+            codeEditable: false, // 单据编号是否可编辑
+        },
         detailBindeFields: [], // 从表绑定列
         detailStore: null, // 从表store
     },

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

@@ -1,124 +0,0 @@
-Ext.define('saas.view.document.customer.FormPanel', {
-    extend: 'saas.view.core.baseform.FormPanel',
-    xtype: 'document-customer-formpanel',
-    controller: 'document-customer-formpanel',
-    viewModel: 'document-customer-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',
-        labelWidth: 90,
-        blankText: '该字段不能为空'
-    },
-
-    //字段属性
-    _title:'客户管理',
-    _dataUrl:'http://192.168.253.228:9480/customer/list',
-    _saveUrl:'http://192.168.253.228:8800/api/document/vendor/save',
-    _deleteUrl:'http://192.168.253.228:8800/api/document/vendor/delete',
-
-    initComponent: function () {
-        var me = this;
-        Ext.apply(me, {
-            items: [{
-                name : "vendorGrid", 
-                xtype : "core-baseform-gridpanel", 
-                layout:'fit',
-                margin:'',
-                dataUrl:me._dataUrl,
-                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);
-                        },
-                    }, 
-                    {
-                        editor : {
-                            displayField : "display", 
-                            editable : true, 
-                            format : "", 
-                            hideTrigger : false, 
-                            maxLength : 100.0, 
-                            minValue : null, 
-                            positiveNum : false, 
-                            queryMode : "local", 
-                            store : null, 
-                            valueField : "value", 
-                            xtype : "multidbfindtrigger"
-                        }, 
-                        text : "物料编号", 
-                        width : 200.0, 
-                        dataIndex : "pd_prodcode", 
-                        xtype : "", 
-                        items : null
-                    }, 
-                    {
-                        text : "单位", 
-                        editor : {
-                            xtype : "textfield"
-                        },
-                        dataIndex : "pd_unit", 
-                        width : 120.0, 
-                        xtype : "", 
-                        items : null
-                    }, 
-                    {
-                        text : "数量", 
-                        dataIndex : "pd_yqty", 
-                        editor : {
-                            xtype : "numberfield"
-                        },
-                        width : 120.0, 
-                        xtype : "numbercolumn", 
-                        format:'0',
-                        items : null,
-                        summaryType: 'sum'
-                    }, 
-                    {
-                        text : "单价", 
-                        editor : {
-                            xtype : "numberfield"
-                        },
-                        format:'0,000.00',
-                        dataIndex : "pd_price", 
-                        width : 120.0, 
-                        xtype : "numbercolumn",
-                        items : null,
-                        summaryType: 'sum'
-                    }, 
-                    {
-                        text : "总额", 
-                        dataIndex : "pd_total", 
-                        width : 120.0, 
-                        xtype : "numbercolumn",
-                        summaryType: 'sum'
-                    }, 
-                    {
-                        text : "税额", 
-                        dataIndex : "pd_taxtotal", 
-                        flex : 1.0, 
-                        xtype : "numbercolumn",
-                        summaryType: 'sum'
-                    }
-                ]
-            }]
-        });
-        me.callParent(arguments);
-    }
-});

+ 0 - 4
frontend/saas-web/app/view/document/customer/FormPanelModel.js

@@ -1,4 +0,0 @@
-Ext.define('saas.view.document.customer.FormPanelModel', {
-    extend: 'saas.view.core.baseform.FormPanelModel',
-    alias: 'viewmodel.document-customer-formpanel'
-});

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

@@ -0,0 +1,83 @@
+Ext.define('saas.view.document.customer.list.FormPanel', {
+    extend: 'saas.view.core.baseform.FormPanel',
+    xtype: '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',
+        labelWidth: 90,
+        blankText: '该字段不能为空'
+    },
+
+    //字段属性
+    _formXtype:'customer-panel-formpanel',
+    _title:'客户资料',
+    _dataUrl:'http://192.168.253.228:9480/customer/list',
+    _saveUrl:'http://192.168.253.228:8800/api/document/vendor/save',
+    _deleteUrl:'http://192.168.253.228:8800/api/document/vendor/delete',
+
+    initComponent: function () {
+        var me = this;
+        Ext.apply(me, {
+            items: [{
+                name : "customerGrid", 
+                xtype : "core-baseform-gridpanel", 
+                layout:'fit',
+                dataUrl:me._dataUrl,
+                columns : [{
+                    text : "客户id", 
+                    width : 0, 
+                    dataIndex : "id", 
+                    xtype : "numbercolumn", 
+                },{
+                    text : "客户编号", 
+                    width : 200.0, 
+                    dataIndex : "cu_code", 
+                    xtype : "", 
+                }, 
+                {
+                    text : "客户名称", 
+                    dataIndex : "cu_name", 
+                    width : 120.0, 
+                    xtype : "", 
+                }, 
+                {
+                    text : "客户状态", 
+                    dataIndex : "cu_status", 
+                    width : 120.0, 
+                    xtype : ""
+                }, 
+                {
+                    text : "客户UU", 
+                    dataIndex : "cu_uu", 
+                    width : 120.0, 
+                    xtype : "",
+                }, 
+                {
+                    text : "默认客户地址", 
+                    dataIndex : "ca_address", 
+                    width : 120.0, 
+                    xtype : "",
+                }, 
+                {
+                    text : "默认客户联系人", 
+                    dataIndex : "cc_name", 
+                    flex : 1.0, 
+                    xtype : "",
+                }]
+            }]
+        });
+        me.callParent(arguments);
+    }
+});

+ 2 - 2
frontend/saas-web/app/view/document/customer/FormPanelController.js → frontend/saas-web/app/view/document/customer/list/FormPanelController.js

@@ -1,8 +1,8 @@
-Ext.define('saas.view.document.customer.FormPanelController', {
+Ext.define('saas.view.document.customer.list.FormPanelController', {
     extend: 'saas.view.core.baseform.FormPanelController',
     BaseUtil: Ext.create('saas.util.BaseUtil'),
     FormUtil: Ext.create('saas.util.FormUtil'),
-    alias: 'controller.document-customer-formpanel',
+    alias: 'controller.customer-list-formpanel',
     init: function (form) {
         var me = this;
         this.control({

+ 4 - 0
frontend/saas-web/app/view/document/customer/list/FormPanelModel.js

@@ -0,0 +1,4 @@
+Ext.define('saas.view.document.customer.list.FormPanelModel', {
+    extend: 'saas.view.core.baseform.FormPanelModel',
+    alias: 'viewmodel.customer-list-formpanel'
+});

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

@@ -0,0 +1,202 @@
+Ext.define('saas.view.document.customer.panel.FormController', {
+    extend: 'saas.view.core.form.FormPanelController',
+    alias: 'controller.customer-panel-formpanel',
+    init: function (form) {
+        var me = this;
+        this.control({
+            /**放大镜新增demo*/
+            "field[name=combo]":{
+                beforerender:function(f){
+                    f.addHandler=me.addCombo;
+
+                }
+            },
+            //主表单选放大镜模板
+            'dbfindtrigger[name=pu_vendcode]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        //数据接口
+                        dataUrl:'http://192.168.253.41:9480/api/document/vendor/getVendorsByCondition',
+                        //赋值 
+                        dbfinds:[{
+                            from:'ve_code',to:'pu_vendcode'
+                        },{
+                            from:'ve_name',to:'pu_vendname'
+                        }],
+                        //联想设置
+                        dbtpls:[{
+                            field:'ve_code',width:100
+                        },{
+                            field:'ve_name',width:100
+                        }],
+                        //联想查询条件
+                        dbCondition:"CONCAT(ve_code, ve_name) like '{0}%'",
+                        //放大镜窗口字段
+                        dbSearchFields:[{
+                            xtype : "textfield", 
+                            name : "ve_name", 
+                            conditionExpression:"ve_name like '{0}%'",//传入后台条件  替换占位符
+                            fieldLabel : "供应商名称", 
+                            columnWidth : 0.25
+                        }],
+                        //放大镜窗口列表
+                        dbColumns:[{
+                            "text": "供应商ID",
+                            "flex": 0,
+                            "dataIndex": "ve_id",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "供应商编号",
+                            "flex": 1,
+                            "dataIndex": "ve_code",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "供应商名称",
+                            "flex": 1,
+                            "dataIndex": "ve_name",
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "供应商类型",
+                            "flex": 0,
+                            "dataIndex": "ve_type",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }]
+                    }) ;   
+
+                }
+            },
+            //从表单选放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pd_prodcode]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        //数据接口
+                        dataUrl:'http://192.168.253.41:9480/api/document/product/getProductsByCondition',
+                        //放大镜赋值设置
+                        dbfinds:[{
+                            from:'pr_code',to:'pd_prodcode'
+                        },{
+                            from:'pr_unit',to:'pd_unit'
+                        }],
+                        //联想查询条件
+                        dbCondition:"CONCAT(pr_code, pr_detail) like '{0}%'",
+                        //联想设置
+                        dbtpls:[{
+                            field:'pr_code',width:100
+                        },{
+                            field:'pr_detail',width:100
+                        }],
+                        //窗口字段设置
+                        dbSearchFields:[{
+                            emptyText:'输入物料编号或物料名称',
+                            xtype : "textfield", 
+                            name : "search", 
+                            conditionExpression:"CONCAT(pr_code, pr_detail) like '{0}%'",
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
+                        //窗口列设置
+                        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
+                        }]
+                    }) ;   
+
+                }
+            },
+            //从表多选放大镜赋值关系 以及 tpl模板
+            'multidbfindtrigger[name=pd_prodcode]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        //数据接口
+                        dataUrl:'http://192.168.253.41:9480/api/document/product/getProductsByCondition',
+                        //放大镜赋值设置
+                        dbfinds:[{
+                            from:'pr_code',to:'pd_prodcode'
+                        },{
+                            from:'pr_unit',to:'pd_unit'
+                        }],
+                        //联想查询条件
+                        dbCondition:"CONCAT(pr_code, pr_detail) like '{0}%'",
+                        //联想设置
+                        dbtpls:[{
+                            field:'pr_code',width:100
+                        },{
+                            field:'pr_detail',width:100
+                        }],
+                        //窗口字段设置
+                        dbSearchFields:[{
+                            emptyText:'输入物料编号或物料名称',
+                            xtype : "textfield", 
+                            name : "search", 
+                            conditionExpression:"CONCAT(pr_code, pr_detail) like '{0}%'",
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
+                        //窗口列设置
+                        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
+                        }]
+                    }) ;   
+
+                }
+            }
+        });
+
+    }
+});

+ 6 - 0
frontend/saas-web/app/view/document/customer/panel/FormModel.js

@@ -0,0 +1,6 @@
+Ext.define('saas.view.document.customer.panel.FormModel', {
+    extend: 'saas.view.core.form.FormPanelModel',
+    alias: 'viewmodel.customer-panel-formpanel',
+
+    
+});

+ 327 - 0
frontend/saas-web/app/view/document/customer/panel/FormPanel.js

@@ -0,0 +1,327 @@
+Ext.define('saas.view.document.customer.panel.FormPanel', {
+    extend: 'saas.view.core.form.FormPanel',
+    xtype: 'customer-panel-formpanel',
+
+    controller: 'customer-panel-formpanel',
+    viewModel: 'customer-panel-formpanel',
+    
+    caller:'Purchase',
+
+    //字段属性
+    _title:'客户资料',
+    _idField: 'id',
+    _codeField: 'cu_code',
+    _statusField: 'cu_status',
+    _statusCodeField: 'cu_statuscode',
+    _readUrl:'http://192.168.253.228:9480/customer/read/',
+    _saveUrl:'http://192.168.253.228:9480/customer/save',
+    _auditUrl:'http://192.168.253.228:8800/purchase/audit',
+    _deleteUrl:'http://192.168.253.228:8800/purchase/delete/',
+    _deleteDetailUrl:'http://192.168.253.228:8800/purchase/deleteItem/',
+    initId:0,
+
+    defaultItems: [{
+        xtype: 'hidden',
+        name: 'id',
+        fieldLabel: 'id',
+        allowBlank: true,
+        columnWidth: 0.25
+    },{
+        xtype: 'textfield',
+        name: 'cu_name',
+        fieldLabel: '客户名称',
+        allowBlank: false,
+        columnWidth: 0.25
+    },{
+        xtype: 'textfield',
+        name: 'cu_code',
+        fieldLabel: '客户编号',
+        allowBlank: true,
+        columnWidth: 0.25
+    },{
+        xtype: 'textfield',
+        name: 'cu_status',
+        fieldLabel: '状态',
+        allowBlank: true,
+        columnWidth: 0.25
+    },{
+        xtype: 'hidden',
+        name: 'cu_statuscode',
+        fieldLabel: '状态码',
+        allowBlank: true,
+        columnWidth: 0.25
+    },{
+        xtype : "remotecombo", 
+        storeUrl:"http://192.168.253.41:9480/customerkind/getCombo",
+        name : "cu_type", 
+        fieldLabel : "客户类型", 
+        allowBlank : true, 
+        queryMode: 'local',
+        displayField: 'display',
+        valueField: 'value',
+        columnWidth : 0.25,
+        etc:{
+            vendorkind:{
+                keyField:'id',
+                dataField:'ck_name',
+                reqUrl:'http://192.168.253.41:9480/customerkind/save',
+                delUrl:'http://192.168.253.41:9480/customerkind/delete'
+            }
+        },
+        addHandler:function(b){
+            var form = this.ownerCmp.ownerCt;
+            this.dialog = form.getController().getView().add({
+                xtype: 'document-kind-childwin',
+                bind: {
+                    title: '新增客户类型'
+                },
+                dataKind:'vendorkind',
+                belong:this.ownerCmp.etc['customerkind'],
+                _parent:form,
+                record:null,
+                session: true
+            });
+            this.dialog.show();
+        }
+    },{
+        format : "Y-m-d", 
+        xtype : "datefield", 
+        name : "createTime", 
+        fieldLabel : "创建时间", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    },{
+        format : "Y-m-d", 
+        xtype : "datefield", 
+        name : "cu_begindate", 
+        fieldLabel : "期初日期", 
+        allowBlank : true, 
+        columnWidth : 0.25  
+    },{ 
+        xtype : "numberfield", 
+        hideTrigger:true,
+        name : "cu_beginaramount", 
+        fieldLabel : "期初应收", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    },{ 
+        xtype : "numberfield", 
+        hideTrigger:true,
+        name : "cu_beginprerecamount", 
+        fieldLabel : "期初预收", 
+        allowBlank : true, 
+        columnWidth : 0.25    
+    },{ 
+        xtype : "numberfield", 
+        hideTrigger:true,
+        name : "cu_promisedays", 
+        fieldLabel : "承付天数", 
+        allowBlank : true, 
+        columnWidth : 0.25      
+    },{
+        xtype : "numberfield", 
+        name : "cu_taxrate", 
+        fieldLabel : "税率", 
+        allowBlank : true, 
+        columnWidth : 0.25   
+    },{
+        xtype : "numberfield", 
+        name : "cu_ta", 
+        fieldLabel : "应收款余额", 
+        allowBlank : true, 
+        readOnly:true,
+        editable:false,
+        columnWidth : 0.25     
+    },{
+        xtype:'textfield',
+        name : "cu_uu", 
+        fieldLabel : "客户UU", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    },{  
+        format : "Y-m-d",
+        xtype : "datefield", 
+        name : "updateTime", 
+        bind : "{updateTime}", 
+        fieldLabel : "更新时间", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "detailGridField", 
+        _detnoColumn:  'cc_detno',
+        storeModel:'saas.model.document.customercontact',
+        columns : [
+            {
+                text : "序号", 
+                dataIndex : "cc_detno", 
+                width : 100, 
+                xtype : "numbercolumn",
+                align : 'center',
+                format:'0',
+                summaryType: 'count',
+                summaryRenderer: function(value, summaryData, dataIndex) {
+                    return Ext.String.format('合计: {0}条', value);
+                },
+            },
+            {
+                text : "联系人", 
+                editor : {
+                    xtype : "textfield"
+                },
+                dataIndex : "cc_name", 
+                width : 120.0, 
+                xtype : "", 
+                items : null
+            },
+            {
+                text : "电话", 
+                editor : {
+                    xtype : "textfield"
+                },
+                dataIndex : "cc_tel", 
+                width : 120.0, 
+                xtype : "", 
+                items : null
+            },
+            {
+                text : "微信/QQ", 
+                editor : {
+                    xtype : "textfield"
+                },
+                dataIndex : "cc_qq", 
+                width : 120.0, 
+                xtype : "", 
+                items : null
+            },
+            {
+                text : "邮箱", 
+                editor : {
+                    xtype : "textfield"
+                },
+                dataIndex : "cc_email", 
+                width : 120.0, 
+                xtype : "", 
+                items : null
+            },
+            {
+                editor : {
+                    displayField : "display", 
+                    editable : true, 
+                    format : "", 
+                    hideTrigger : false, 
+                    maxLength : 100.0, 
+                    minValue : null, 
+                    positiveNum : false, 
+                    queryMode : "local", 
+                    valueField : "value", 
+                    xtype : "combo",
+                    store:{
+                        fields: ['display', 'value'],
+                        data : [
+                            {"display":"是", "value":'1'},
+                            {"display":"否", "value":'0'}
+                        ]
+                    }
+                }, 
+                text : "是否默认联系人", 
+                width : 200.0, 
+                dataIndex : "cc_default", 
+                xtype : "",
+                renderer: function (v, m, r) {
+                    if(v=='0'){
+                        return '';
+                    }else if(v=='1'){
+                        return '是';
+                    }
+                    return v;
+                }
+            }]
+    } ,{
+        xtype : "detailGridField", 
+        _detnoColumn:  'ca_detno',
+        storeModel:'saas.model.document.customeraddress',
+        columns : [
+            {
+                text : "序号", 
+                dataIndex : "ca_detno", 
+                width : 100, 
+                xtype : "numbercolumn",
+                align : 'center',
+                format:'0',
+                summaryType: 'count',
+                summaryRenderer: function(value, summaryData, dataIndex) {
+                    return Ext.String.format('合计: {0}条', value);
+                },
+            }, 
+            {
+                text : "送货地址", 
+                editor : {
+                    xtype : "textfield"
+                },
+                dataIndex : "ca_address", 
+                width : 120.0, 
+                xtype : "", 
+                items : null
+            },  
+            {
+                text : "联系人", 
+                editor : {
+                    xtype : "textfield"
+                },
+                dataIndex : "ca_person", 
+                width : 120.0, 
+                xtype : "", 
+                items : null   
+            },
+            {
+                text : "联系电话", 
+                editor : {
+                    xtype : "textfield"
+                },
+                dataIndex : "ca_phone", 
+                width : 120.0, 
+                xtype : "", 
+                items : null   
+            },
+            {
+                editor : {
+                    displayField : "display", 
+                    editable : true, 
+                    format : "", 
+                    hideTrigger : false, 
+                    maxLength : 100.0, 
+                    minValue : null, 
+                    positiveNum : false, 
+                    queryMode : "local", 
+                    valueField : "value", 
+                    xtype : "combo",
+                    store:{
+                        fields: ['display', 'value'],
+                        data : [
+                            {"display":"是", "value":'1'},
+                            {"display":"否", "value":'0'}
+                        ]
+                    },
+                    listeners:{
+                        'change':function(c,newVal,oldVal){
+                            var grid = c.ownerCt.column.ownerCt.ownerCt;
+                            var nowId = grid.selModel.lastSelected.id;
+                            var items = grid.store.data.items
+                        }
+                    }
+                }, 
+                text : "是否默认地址", 
+                width : 200.0, 
+                dataIndex : "ca_default", 
+                xtype : "",
+                renderer: function (v, m, r) {
+                    if(v=='0'){
+                        return '';
+                    }else if(v=='1'){
+                        return '是';
+                    }
+                    return v;
+                }
+            }]
+    }]
+});

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

@@ -12,7 +12,6 @@ Ext.define('saas.view.document.kind.KindController', {
         if(view.defaultType!=''){
             defaultKind = view.defaultType  //其他单表界面
             vm.setData({'dataKind':{'value':defaultKind}});
-            debugger
         }else{
             defaultKind=vm.getData()['dataKind'].value  //类别合并界面
         }

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

@@ -53,15 +53,14 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
         allowBlank : true, 
         columnWidth : 0.0
     }, {
-        xtype : "textfield", 
+        xtype : "dbfindtrigger", 
         name : "pu_vendcode", 
         bind : "{pu_vendcode}", 
         fieldLabel : "供应商编号", 
-        hidden:true,
         allowBlank : true, 
-        columnWidth : 0, 
+        columnWidth : 0.25, 
     }, {
-        xtype : "dbfindtrigger", 
+        xtype : "textfield", 
         name : "pu_vendname", 
         bind : "{pu_vendname}", 
         fieldLabel : "供应商名称", 

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

@@ -4,29 +4,36 @@ Ext.define('saas.view.purchase.purchase.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]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:basePath+'document/vendor/getVendorsByCondition',
+                        //数据接口
+                        dataUrl:'http://192.168.253.41:9480/vendor/getVendorsByCondition',
+                        //赋值 
                         dbfinds:[{
                             from:'ve_code',to:'pu_vendcode'
                         },{
                             from:'ve_name',to:'pu_vendname'
                         }],
+                        //联想设置
                         dbtpls:[{
                             field:'ve_code',width:100
                         },{
                             field:'ve_name',width:100
                         }],
+                        //联想查询条件
+                        dbCondition:"CONCAT(ve_code, ve_name) like '{0}%'",
+                        //放大镜窗口字段
+                        dbSearchFields:[{
+                            xtype : "textfield", 
+                            name : "ve_name", 
+                            conditionExpression:"ve_name like '{0}%'",//传入后台条件  替换占位符
+                            fieldLabel : "供应商名称", 
+                            columnWidth : 0.25
+                        }],
+                        //放大镜窗口列表
                         dbColumns:[{
-                            conditionCode:'ve_id',
                             "text": "供应商ID",
                             "flex": 0,
                             "dataIndex": "ve_id",
@@ -34,7 +41,6 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                             "xtype": "",
                             "items": null
                         },{
-                            conditionCode:'ve_code',
                             "text": "供应商编号",
                             "flex": 1,
                             "dataIndex": "ve_code",
@@ -42,14 +48,12 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                             "xtype": "",
                             "items": null
                         }, {
-                            conditionCode:'ve_name',
                             "text": "供应商名称",
                             "flex": 1,
                             "dataIndex": "ve_name",
                             "xtype": "",
                             "items": null
                         }, {
-                            conditionCode:'ve_type',
                             "text": "供应商类型",
                             "flex": 0,
                             "dataIndex": "ve_type",
@@ -61,20 +65,36 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
 
                 }
             },
-            //放大镜赋值关系 以及 tpl模板
+            //从表单选放大镜赋值关系 以及 tpl模板
             'dbfindtrigger[name=pd_prodcode]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        conditionCode:'pr_code',
-                        dataUrl:basePath+'document/product/getProductsByCondition',
+                        //数据接口
+                        dataUrl:'http://192.168.253.41:9480/product/getProductsByCondition',
+                        //放大镜赋值设置
                         dbfinds:[{
                             from:'pr_code',to:'pd_prodcode'
+                        },{
+                            from:'pr_unit',to:'pd_unit'
                         }],
+                        //联想查询条件
+                        dbCondition:"CONCAT(pr_code, pr_detail) like '{0}%'",
+                        //联想设置
                         dbtpls:[{
                             field:'pr_code',width:100
                         },{
                             field:'pr_detail',width:100
                         }],
+                        //窗口字段设置
+                        dbSearchFields:[{
+                            emptyText:'输入物料编号或物料名称',
+                            xtype : "textfield", 
+                            name : "search", 
+                            conditionExpression:"CONCAT(pr_code, pr_detail) like '{0}%'",
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
+                        //窗口列设置
                         dbColumns:[{
                             "text": "物料ID",
                             "flex": 0,
@@ -106,33 +126,70 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                     }) ;   
 
                 }
-            }
-        });
+            },
+            //从表多选放大镜赋值关系 以及 tpl模板
+            'multidbfindtrigger[name=pd_prodcode]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        //数据接口
+                        dataUrl:'http://192.168.253.41:9480/product/getProductsByCondition',
+                        //放大镜赋值设置
+                        dbfinds:[{
+                            from:'pr_code',to:'pd_prodcode'
+                        },{
+                            from:'pr_unit',to:'pd_unit'
+                        }],
+                        //联想查询条件
+                        dbCondition:"CONCAT(pr_code, pr_detail) like '{0}%'",
+                        //联想设置
+                        dbtpls:[{
+                            field:'pr_code',width:100
+                        },{
+                            field:'pr_detail',width:100
+                        }],
+                        //窗口字段设置
+                        dbSearchFields:[{
+                            emptyText:'输入物料编号或物料名称',
+                            xtype : "textfield", 
+                            name : "search", 
+                            conditionExpression:"CONCAT(pr_code, pr_detail) like '{0}%'",
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
+                        //窗口列设置
+                        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
+                        }]
+                    }) ;   
 
-    },
-    addCombo:function(){
-        var combo=this.ownerCmp;
-        Ext.create('Ext.window.Window',{
-            layout:'vbox',
-            bodyPadding: 15,
-            width:500,
-            items:[{
-                fieldLabel:'实际值',
-                xtype:'textfield'
-            },{
-                fieldLabel:'显示值',
-                xtype:'textfield'
-            }],
-            buttons:[{
-                text:'确认',
-                handler:function(b){
-                    combo.setValue('ok');
-                    b.up('window').close();
                 }
-            }],
-            renderTo:this.ownerCmp.ownerCt.getEl()
-        }).show();
-
+            }
+        });
     },
 
     turnIn: function() {

+ 1 - 1
frontend/saas-web/resources/json/navigation.json

@@ -161,7 +161,7 @@
         "text": "基础资料",
         "items": [{
             "text": "客户资料",
-            "viewType": "document-customer-formpanel",
+            "viewType": "customer-list-formpanel",
             "leaf": true
         }, {
             "text": "供应商管理",