Browse Source

1.添加事务回滚
2.修改支付方式选项统一

heqinwei 7 years ago
parent
commit
9a5f9ec14a

+ 9 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/FundtransferController.java

@@ -10,6 +10,7 @@ import com.usoftchina.saas.money.po.Fundtransfer;
 import com.usoftchina.saas.money.service.FundtransferService;
 import com.usoftchina.saas.page.PageRequest;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 
 /**
@@ -22,6 +23,7 @@ public class FundtransferController {
     @Autowired
     private FundtransferService fundtransferService;
 
+    @Transactional
     @RequestMapping("/save")
     public Result insert(@RequestBody Fundtran body) {
         DocBaseDTO docBaseDTO = fundtransferService.insert(body);
@@ -29,30 +31,35 @@ public class FundtransferController {
     }
 
 
+    @Transactional
     @PostMapping("/delete/{id}")
     public Result delete(@PathVariable("id") int id){
         fundtransferService.delete(id);
         return Result.success();
     }
 
+    @Transactional
     @PostMapping("/deleteDetail/{id}")
     public Result deleteItem(@PathVariable("id") int id){
         fundtransferService.deleteItem(id);
         return Result.success();
     }
 
+    @Transactional
     @PostMapping("/batchDelete")
     public Result funBatchDelete(@RequestBody BatchDealBaseDTO body){
         fundtransferService.fundtransferDelete(body);
         return Result.success();
     }
 
+    @Transactional
     @PostMapping("/batchAudit")
     public Result funBatchAudit(@RequestBody BatchDealBaseDTO body){
         fundtransferService.fundtransferBatchAudit(body);
         return Result.success();
     }
 
+    @Transactional
     @PostMapping("/batchUnAudit")
     public Result funBatchUnAudit(@RequestBody BatchDealBaseDTO body){
         fundtransferService.fundtransferBatchUnAudit(body);
@@ -70,12 +77,14 @@ public class FundtransferController {
         return Result.success(list);
     }
 
+    @Transactional
     @RequestMapping("/audit")
     public Result audit(@RequestBody Fundtran body){
         fundtransferService.audit(body);
         return Result.success();
     }
 
+    @Transactional
     @PostMapping("/unAudit/{id}")
     public Result unAudit(@PathVariable("id") int id){
         fundtransferService.unAudit(id);

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

@@ -10,6 +10,7 @@ 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.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 
 /**
@@ -22,6 +23,7 @@ public class OthreceiptsController {
     @Autowired
     private OthreceiptsService othreceiptsService;
 
+    @Transactional
     @RequestMapping("/save")
     public Result insert(@RequestBody Othte body) {
         DocBaseDTO docBaseDTO = othreceiptsService.insert(body);
@@ -29,12 +31,14 @@ public class OthreceiptsController {
     }
 
 
+    @Transactional
     @PostMapping("/delete/{id}")
     public Result deletePaybalance(@PathVariable("id") int id){
         othreceiptsService.delete(id);
         return Result.success();
     }
 
+    @Transactional
     @PostMapping("/deleteDetail/{id}")
     public Result deleteItem(@PathVariable("id") int id){
         othreceiptsService.deleteItem(id);
@@ -52,30 +56,35 @@ public class OthreceiptsController {
         return Result.success(list);
     }
 
+    @Transactional
     @RequestMapping("/audit")
     public Result audit(@RequestBody Othte body){
         othreceiptsService.audit(body);
         return Result.success();
     }
 
+    @Transactional
     @PostMapping("/unAudit/{id}")
     public Result unAudit(@PathVariable("id") int id){
         othreceiptsService.unAudit(id);
         return Result.success();
     }
 
+    @Transactional
     @PostMapping("/batchDelete")
     public Result othreceiptsBatchDelete(@RequestBody BatchDealBaseDTO body){
         othreceiptsService.othreceiptsDelete(body);
         return Result.success();
     }
 
+    @Transactional
     @PostMapping("/batchAudit")
     public Result othreceiptsBatchAudit(@RequestBody BatchDealBaseDTO body){
         othreceiptsService.othreceiptsBatchAudit(body);
         return Result.success();
     }
 
+    @Transactional
     @PostMapping("/batchUnAudit")
     public Result othreceiptsBatchUnAudit(@RequestBody BatchDealBaseDTO body){
         othreceiptsService.othreceiptsBatchUnAudit(body);

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

@@ -13,6 +13,7 @@ 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.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 
 /**
@@ -25,6 +26,7 @@ public class OthspengdingsController {
     @Autowired
     private OthspendingsService othspendingsService;
 
+    @Transactional
     @RequestMapping("/save")
     public Result insert(@RequestBody Othsp body) {
         DocBaseDTO docBaseDTO = othspendingsService.insert(body);
@@ -32,12 +34,14 @@ public class OthspengdingsController {
     }
 
 
+    @Transactional
     @PostMapping("/delete/{id}")
     public Result deletePaybalance(@PathVariable("id") int id){
         othspendingsService.delete(id);
         return Result.success();
     }
 
+    @Transactional
     @PostMapping("/deleteDetail/{id}")
     public Result deleteItem(@PathVariable("id") int id){
         othspendingsService.deleteItem(id);
@@ -55,30 +59,35 @@ public class OthspengdingsController {
         return Result.success(list);
     }
 
+    @Transactional
     @RequestMapping("/audit")
     public Result audit(@RequestBody Othsp body){
         othspendingsService.audit(body);
         return Result.success();
     }
 
+    @Transactional
     @PostMapping("/unAudit/{id}")
     public Result unAudit(@PathVariable("id") int id){
         othspendingsService.unAudit(id);
         return Result.success();
     }
 
+    @Transactional
     @PostMapping("/batchDelete")
     public Result othspendingsBatchDelete(@RequestBody BatchDealBaseDTO body){
         othspendingsService.othspendingBatchDelete(body);
         return Result.success();
     }
 
+    @Transactional
     @PostMapping("/batchAudit")
     public Result othspendingsBatchAudit(@RequestBody BatchDealBaseDTO body){
         othspendingsService.othspendingBatchAudit(body);
         return Result.success();
     }
 
+    @Transactional
     @PostMapping("/batchUnAudit")
     public Result othspendingsBatchUnAudit(@RequestBody BatchDealBaseDTO body){
         othspendingsService.othspendingBatchUnAudit(body);

+ 6 - 1
applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/PaybalanceController.java

@@ -30,19 +30,21 @@ public class PaybalanceController {
         return Result.success(docBaseDTO);
     }
 
-
+    @Transactional
     @PostMapping("/delete/{id}")
     public Result deletePaybalance(@PathVariable("id") int id){
         paybalanceService.delete(id);
         return Result.success();
     }
 
+    @Transactional
     @PostMapping("/deleteDetail/{id}")
     public Result deleteItem(@PathVariable("id") int id){
         paybalanceService.deleteItem(id);
         return Result.success();
     }
 
+    @Transactional
     @PostMapping("/deleteDetai2/{id}")
     public Result deleteItems(@PathVariable("id") int id){
         paybalanceService.deleteItems(id);
@@ -74,18 +76,21 @@ public class PaybalanceController {
         return Result.success();
     }
 
+    @Transactional
     @PostMapping("/batchDelete")
     public Result payBatchDelete(@RequestBody BatchDealBaseDTO body){
         paybalanceService.paybalanceDelete(body);
         return Result.success();
     }
 
+    @Transactional
     @PostMapping("/batchAudit")
     public Result payBatchAudit(@RequestBody BatchDealBaseDTO body){
         paybalanceService.paybalanceBatchAudit(body);
         return Result.success();
     }
 
+    @Transactional
     @PostMapping("/batchUnAudit")
     public Result payBatchUnAudit(@RequestBody BatchDealBaseDTO body){
         paybalanceService.paybalanceBatchUnAudit(body);

+ 6 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/RecbalanceContorller.java

@@ -32,18 +32,21 @@ public class RecbalanceContorller {
         return Result.success(docBaseDTO);
     }
 
+    @Transactional
     @PostMapping("/delete/{id}")
     public Result delete(@PathVariable("id") int id){
         recbalanceService.delete(id);
         return Result.success();
     }
 
+    @Transactional
     @PostMapping("/deleteDetail1/{id}")
     public Result deleteItem(@PathVariable("id") int id){
         recbalanceService.deleteItem(id);
         return Result.success();
     }
 
+    @Transactional
     @PostMapping("/deleteDetail2/{id}")
     public Result deleteItems(@PathVariable("id") int id){
         recbalanceService.deleteItems(id);
@@ -74,18 +77,21 @@ public class RecbalanceContorller {
         return Result.success();
     }
 
+    @Transactional
     @PostMapping("/batchDelete")
     public Result recbalanceBatchDelete(@RequestBody BatchDealBaseDTO body){
         recbalanceService.recbalanceDelete(body);
         return Result.success();
     }
 
+    @Transactional
     @PostMapping("/batchAudit")
     public Result recbalanceBatchAudit(@RequestBody BatchDealBaseDTO body){
         recbalanceService.recbalanceBatchAudit(body);
         return Result.success();
     }
 
+    @Transactional
     @PostMapping("/batchUnAudit")
     public Result recbalanceBatchUnAudit(@RequestBody BatchDealBaseDTO body){
         recbalanceService.recbalanceBatchUnAudit(body);

+ 15 - 18
frontend/saas-web/app/view/money/fundtransfer/FormPanel.js

@@ -140,28 +140,25 @@ Ext.define('saas.view.money.fundtransfer.FormPanel', {
             }, {
                 text : "结算方式", 
                 width : 150.0, 
-                dataIndex : "ftd_paymethod", 
-                xtype : "", 
-                items : null,
-                editor:{
-                    xtype: 'combobox',
-                    name: 'ftd_paymethod',
+                dataIndex : "ftd_paymethod",
+                editor : {
+                    xtype:'combo',
                     queryMode: 'local',
-                    displayField: 'ftd_paymethod_d',
-                    valueField: 'ftd_paymethod',
-                    editable:false,
-                    store: Ext.create('Ext.data.ArrayStore', {
-                        fields: ['ftd_paymethod', 'ftd_paymethod_d'],
-                        data: [
-                            ["无", "无"],
-                            ["支付宝转账", "支付宝转账"],
-                            ["微信转账", "微信转账"],
-                            ["现金", "现金"],
-                            ["银行转账", "银行转账"]
+                    displayField: 'display',
+                    valueField: 'value',
+                    store:Ext.create('Ext.data.Store', {
+                        fields: ['value', 'display'],
+                        data : [
+                            {value:"信用卡", display:"信用卡"},
+                            {value:"支票", display:"支票"},
+                            {value:"汇票", display:"汇票"},
+                            {value:"现金", display:"现金"},
+                            {value:"银行转账", display:"银行转账"},
+                            {value:"支付宝转账", display:"支付宝转账"},
+                            {value:"微信转账", display:"微信转账"}
                         ]
                     })
                 }
-                
             }, {
                 text : "备注", 
                 dataIndex : "ftd_remark",

+ 6 - 2
frontend/saas-web/app/view/money/payBalance/FormPanel.js

@@ -156,11 +156,15 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
                 valueField: 'value',
                 store:Ext.create('Ext.data.Store', {
                     fields: ['value', 'display'],
-                    data : [{value:"信用卡", display:"信用卡"},
+                    data : [
+                        {value:"信用卡", display:"信用卡"},
                         {value:"支票", display:"支票"},
                         {value:"汇票", display:"汇票"},
                         {value:"现金", display:"现金"},
-                        {value:"银行转账", display:"银行转账"}]
+                        {value:"银行转账", display:"银行转账"},
+                        {value:"支付宝转账", display:"支付宝转账"},
+                        {value:"微信转账", display:"微信转账"}
+                        ]
                 })
             }
         }, {

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

@@ -36,7 +36,7 @@ Ext.define('saas.view.money.paybalance.QueryPanel', {
         addXtype: 'money-paybalance-formpanel',
         defaultCondition:'1=1',
         baseVastUrl: '/api/money/paybalance/',
-        // baseVastUrl: 'http://192.168.253.129:8881/paybalance/',
+        // baseVastUrl: 'http://192.168.253.139:8881/paybalance/',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',

+ 10 - 5
frontend/saas-web/app/view/money/recBalance/FormPanel.js

@@ -22,9 +22,10 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
     _unAuditUrl: '/api/money/recbalance/unAudit/',
     _deleteUrl: '/api/money/recbalance/delete/',
 
-    // _saveUrl: 'http://192.168.253.35:8880/recbalance/save/',
-    // _auditUrl: 'http://192.168.253.35:8880/recbalance/audit/',
-    // _unAuditUrl: 'http://192.168.253.35:8880/recbalance/unAudit/',
+    // _readUrl: 'http://localhost:8880/recbalance/read/',
+    // _saveUrl: 'http://localhost:8880/recbalance/save/',
+    // _auditUrl: 'http://localhost:8880/recbalance/audit/',
+    // _unAuditUrl: 'http://localhost:8880/recbalance/unAudit/',
 
 
     initId: 0,
@@ -160,11 +161,15 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
                 valueField: 'value',
                 store:Ext.create('Ext.data.Store', {
                     fields: ['value', 'display'],
-                    data : [{value:"信用卡", display:"信用卡"},
+                    data :[
+                        {value:"信用卡", display:"信用卡"},
                         {value:"支票", display:"支票"},
                         {value:"汇票", display:"汇票"},
                         {value:"现金", display:"现金"},
-                        {value:"银行转账", display:"银行转账"}]
+                        {value:"银行转账", display:"银行转账"},
+                        {value:"支付宝转账", display:"支付宝转账"},
+                        {value:"微信转账", display:"微信转账"}
+                    ]
                 })
             }
         }, {