Browse Source

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

zhoudw 7 years ago
parent
commit
8dfaf442cf

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

@@ -88,8 +88,8 @@ public enum BizExceptionCode implements BaseExceptionCode {
     CHECK_SETACOUNT_EXIS(74006, "不能删除单据日期小于等于结账期间<u>%s</u>的单据"),
     CHECK_SETACOUNT_EXIS(74006, "不能删除单据日期小于等于结账期间<u>%s</u>的单据"),
     VERIFICATION_CHECK_BALANCE(74007,"核销金额不能大于未核销金额"),
     VERIFICATION_CHECK_BALANCE(74007,"核销金额不能大于未核销金额"),
     DELETE_NOT_EXIS(74008,"删除失败,当前单据不存在!"),
     DELETE_NOT_EXIS(74008,"删除失败,当前单据不存在!"),
-    DOCUMENTS_AUDITED(74009,"审核失败,存在已审核单据"),
-    DOCUMENTS_UNAUDITED(74009,"反审核失败,存在未审核单据"),
+    DOCUMENTS_AUDITED(74009,"审核失败,存在已审核单据:%S"),
+    DOCUMENTS_UNAUDITED(74009,"反审核失败,存在未审核单据:%S"),
 
 
 
 
 
 

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

@@ -287,7 +287,8 @@ public class FundtransferServiceImpl extends CommonBaseServiceImpl<FundtransferM
             DocBaseDTO docBaseDTO = (DocBaseDTO) isList.next();
             DocBaseDTO docBaseDTO = (DocBaseDTO) isList.next();
             Fundtransfer fundtransfers = fundtransferMapper.selectByPrimaryKey(docBaseDTO.getId().intValue());
             Fundtransfer fundtransfers = fundtransferMapper.selectByPrimaryKey(docBaseDTO.getId().intValue());
             if (com.usoftchina.saas.commons.po.Status.AUDITED.getDisplay().equals(fundtransfers.getFt_status())){
             if (com.usoftchina.saas.commons.po.Status.AUDITED.getDisplay().equals(fundtransfers.getFt_status())){
-                throw new BizException(500, BizExceptionCode.DOCUMENTS_AUDITED.getMessage());
+                String message = BizExceptionCode.DOCUMENTS_AUDITED.getMessage();
+                throw new BizException(500, String.format(message, fundtransfers.getFt_code()));
             }
             }
             Fundtransfer fundtransfer = new Fundtransfer();
             Fundtransfer fundtransfer = new Fundtransfer();
             fundtransfer.setId(Long.valueOf(docBaseDTO.getId()));
             fundtransfer.setId(Long.valueOf(docBaseDTO.getId()));
@@ -307,7 +308,8 @@ public class FundtransferServiceImpl extends CommonBaseServiceImpl<FundtransferM
             DocBaseDTO docBaseDTO = (DocBaseDTO) isList.next();
             DocBaseDTO docBaseDTO = (DocBaseDTO) isList.next();
             Fundtransfer fundtransfers = fundtransferMapper.selectByPrimaryKey(docBaseDTO.getId().intValue());
             Fundtransfer fundtransfers = fundtransferMapper.selectByPrimaryKey(docBaseDTO.getId().intValue());
             if (com.usoftchina.saas.commons.po.Status.UNAUDITED.getDisplay().equals(fundtransfers.getFt_status())){
             if (com.usoftchina.saas.commons.po.Status.UNAUDITED.getDisplay().equals(fundtransfers.getFt_status())){
-                throw new BizException(500, BizExceptionCode.DOCUMENTS_UNAUDITED.getMessage());
+                String message = BizExceptionCode.DOCUMENTS_UNAUDITED.getMessage();
+                throw new BizException(500, String.format(message, fundtransfers.getFt_code()));
             }
             }
             this.unAudit(Math.toIntExact(docBaseDTO.getId()));
             this.unAudit(Math.toIntExact(docBaseDTO.getId()));
         }
         }

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

@@ -341,7 +341,8 @@ public class OthreceiptsServiceImpl extends CommonBaseServiceImpl<OthreceiptsMap
             DocBaseDTO docBaseDTO = (DocBaseDTO) isList.next();
             DocBaseDTO docBaseDTO = (DocBaseDTO) isList.next();
             Othreceipts othreceipts1 = othreceiptsMapper.selectByPrimaryKey(docBaseDTO.getId().intValue());
             Othreceipts othreceipts1 = othreceiptsMapper.selectByPrimaryKey(docBaseDTO.getId().intValue());
             if (com.usoftchina.saas.commons.po.Status.AUDITED.getDisplay().equals(othreceipts1.getOr_status())){
             if (com.usoftchina.saas.commons.po.Status.AUDITED.getDisplay().equals(othreceipts1.getOr_status())){
-                throw new BizException(500, BizExceptionCode.DOCUMENTS_AUDITED.getMessage());
+                String message = BizExceptionCode.DOCUMENTS_AUDITED.getMessage();
+                throw new BizException(500, String.format(message, othreceipts1.getOr_code()));
             }
             }
             Othreceipts othreceipts = new Othreceipts();
             Othreceipts othreceipts = new Othreceipts();
             othreceipts.setId(Long.valueOf(docBaseDTO.getId()));
             othreceipts.setId(Long.valueOf(docBaseDTO.getId()));
@@ -361,7 +362,8 @@ public class OthreceiptsServiceImpl extends CommonBaseServiceImpl<OthreceiptsMap
             DocBaseDTO docBaseDTO = (DocBaseDTO) isList.next();
             DocBaseDTO docBaseDTO = (DocBaseDTO) isList.next();
             Othreceipts othreceipts1 = othreceiptsMapper.selectByPrimaryKey(docBaseDTO.getId().intValue());
             Othreceipts othreceipts1 = othreceiptsMapper.selectByPrimaryKey(docBaseDTO.getId().intValue());
             if (com.usoftchina.saas.commons.po.Status.UNAUDITED.getDisplay().equals(othreceipts1.getOr_status())){
             if (com.usoftchina.saas.commons.po.Status.UNAUDITED.getDisplay().equals(othreceipts1.getOr_status())){
-                throw new BizException(500, BizExceptionCode.DOCUMENTS_UNAUDITED.getMessage());
+                String message = BizExceptionCode.DOCUMENTS_UNAUDITED.getMessage();
+                throw new BizException(500, String.format(message, othreceipts1.getOr_code()));
             }
             }
             this.unAudit(Math.toIntExact(docBaseDTO.getId()));
             this.unAudit(Math.toIntExact(docBaseDTO.getId()));
         }
         }

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

@@ -336,7 +336,8 @@ public class OthspendingsServiceImpl extends CommonBaseServiceImpl<OthspendingsM
             DocBaseDTO docBaseDTO = (DocBaseDTO) isList.next();
             DocBaseDTO docBaseDTO = (DocBaseDTO) isList.next();
             Othspendings othspendings1 = othspendingsMapper.selectByPrimaryKey(docBaseDTO.getId().intValue());
             Othspendings othspendings1 = othspendingsMapper.selectByPrimaryKey(docBaseDTO.getId().intValue());
             if (com.usoftchina.saas.commons.po.Status.AUDITED.getDisplay().equals(othspendings1.getOs_status())){
             if (com.usoftchina.saas.commons.po.Status.AUDITED.getDisplay().equals(othspendings1.getOs_status())){
-                throw new BizException(500, BizExceptionCode.DOCUMENTS_AUDITED.getMessage());
+                String message = BizExceptionCode.DOCUMENTS_AUDITED.getMessage();
+                throw new BizException(500, String.format(message, othspendings1.getOs_code()));
             }
             }
             Othspendings othspendings = new Othspendings();
             Othspendings othspendings = new Othspendings();
             othspendings.setId(Long.valueOf(docBaseDTO.getId()));
             othspendings.setId(Long.valueOf(docBaseDTO.getId()));
@@ -356,7 +357,8 @@ public class OthspendingsServiceImpl extends CommonBaseServiceImpl<OthspendingsM
             DocBaseDTO docBaseDTO = (DocBaseDTO) isList.next();
             DocBaseDTO docBaseDTO = (DocBaseDTO) isList.next();
             Othspendings othspendings1 = othspendingsMapper.selectByPrimaryKey(docBaseDTO.getId().intValue());
             Othspendings othspendings1 = othspendingsMapper.selectByPrimaryKey(docBaseDTO.getId().intValue());
             if (com.usoftchina.saas.commons.po.Status.UNAUDITED.getDisplay().equals(othspendings1.getOs_status())){
             if (com.usoftchina.saas.commons.po.Status.UNAUDITED.getDisplay().equals(othspendings1.getOs_status())){
-                throw new BizException(500, BizExceptionCode.DOCUMENTS_UNAUDITED.getMessage());
+                String message = BizExceptionCode.DOCUMENTS_UNAUDITED.getMessage();
+                throw new BizException(500, String.format(message, othspendings1.getOs_code()));
             }
             }
             this.unAudit(Math.toIntExact(docBaseDTO.getId()));
             this.unAudit(Math.toIntExact(docBaseDTO.getId()));
         }
         }

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

@@ -441,7 +441,8 @@ public class PaybalanceServiceImpl extends CommonBaseServiceImpl<PaybalanceMappe
             DocBaseDTO docBaseDTO = (DocBaseDTO) isList.next();
             DocBaseDTO docBaseDTO = (DocBaseDTO) isList.next();
             Paybalance paybalance1 = paybalanceMapper.selectByPrimaryKey(docBaseDTO.getId());
             Paybalance paybalance1 = paybalanceMapper.selectByPrimaryKey(docBaseDTO.getId());
             if (com.usoftchina.saas.commons.po.Status.AUDITED.getDisplay().equals(paybalance1.getPb_status())){
             if (com.usoftchina.saas.commons.po.Status.AUDITED.getDisplay().equals(paybalance1.getPb_status())){
-                throw new BizException(500, BizExceptionCode.DOCUMENTS_AUDITED.getMessage());
+                String message = BizExceptionCode.DOCUMENTS_AUDITED.getMessage();
+                throw new BizException(500, String.format(message, paybalance1.getPb_code()));
             }
             }
             Paybalance paybalance = new Paybalance();
             Paybalance paybalance = new Paybalance();
             paybalance.setId(Long.valueOf(docBaseDTO.getId()));
             paybalance.setId(Long.valueOf(docBaseDTO.getId()));
@@ -467,7 +468,8 @@ public class PaybalanceServiceImpl extends CommonBaseServiceImpl<PaybalanceMappe
             DocBaseDTO docBaseDTO = (DocBaseDTO) isList.next();
             DocBaseDTO docBaseDTO = (DocBaseDTO) isList.next();
             Paybalance paybalance1 = paybalanceMapper.selectByPrimaryKey(docBaseDTO.getId());
             Paybalance paybalance1 = paybalanceMapper.selectByPrimaryKey(docBaseDTO.getId());
             if (com.usoftchina.saas.commons.po.Status.UNAUDITED.getDisplay().equals(paybalance1.getPb_status())){
             if (com.usoftchina.saas.commons.po.Status.UNAUDITED.getDisplay().equals(paybalance1.getPb_status())){
-                throw new BizException(500, BizExceptionCode.DOCUMENTS_UNAUDITED.getMessage());
+                String message = BizExceptionCode.DOCUMENTS_UNAUDITED.getMessage();
+                throw new BizException(500, String.format(message, paybalance1.getPb_code()));
             }
             }
             this.unAudit(Math.toIntExact(docBaseDTO.getId()));
             this.unAudit(Math.toIntExact(docBaseDTO.getId()));
         }
         }

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

@@ -446,7 +446,8 @@ public class RecbalanceServiceImpl extends CommonBaseServiceImpl<RecbalanceMappe
             DocBaseDTO docBaseDTO = (DocBaseDTO) isList.next();
             DocBaseDTO docBaseDTO = (DocBaseDTO) isList.next();
             Recbalance recbalance1 = recbalanceMapper.selectByPrimaryKey(docBaseDTO.getId().intValue());
             Recbalance recbalance1 = recbalanceMapper.selectByPrimaryKey(docBaseDTO.getId().intValue());
             if (com.usoftchina.saas.commons.po.Status.AUDITED.getDisplay().equals(recbalance1.getRb_status())){
             if (com.usoftchina.saas.commons.po.Status.AUDITED.getDisplay().equals(recbalance1.getRb_status())){
-                throw new BizException(500, BizExceptionCode.DOCUMENTS_AUDITED.getMessage());
+                String message = BizExceptionCode.DOCUMENTS_AUDITED.getMessage();
+                throw new BizException(500, String.format(message, recbalance1.getRb_code()));
             }
             }
             Recbalance recbalance = new Recbalance();
             Recbalance recbalance = new Recbalance();
             recbalance.setId(Long.valueOf(docBaseDTO.getId()));
             recbalance.setId(Long.valueOf(docBaseDTO.getId()));
@@ -472,7 +473,8 @@ public class RecbalanceServiceImpl extends CommonBaseServiceImpl<RecbalanceMappe
             DocBaseDTO docBaseDTO = (DocBaseDTO) isList.next();
             DocBaseDTO docBaseDTO = (DocBaseDTO) isList.next();
             Recbalance recbalance1 = recbalanceMapper.selectByPrimaryKey(docBaseDTO.getId().intValue());
             Recbalance recbalance1 = recbalanceMapper.selectByPrimaryKey(docBaseDTO.getId().intValue());
             if (com.usoftchina.saas.commons.po.Status.UNAUDITED.getDisplay().equals(recbalance1.getRb_status())){
             if (com.usoftchina.saas.commons.po.Status.UNAUDITED.getDisplay().equals(recbalance1.getRb_status())){
-                throw new BizException(500, BizExceptionCode.DOCUMENTS_UNAUDITED.getMessage());
+                String message = BizExceptionCode.DOCUMENTS_UNAUDITED.getMessage();
+                throw new BizException(500, String.format(message, recbalance1.getRb_code()));
             }
             }
             this.unAudit(docBaseDTO.getId());
             this.unAudit(docBaseDTO.getId());
         }
         }