Explorar o código

报销数电发票数据判定

user5 hai 1 ano
pai
achega
f127c61474

+ 9 - 4
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/controller/ReimbursementInfoController.java

@@ -200,12 +200,17 @@ public class ReimbursementInfoController {
     @ApiOperation(value = "根据发票号查询是否已经或正在报销")
     public Map<String,Object> getEffectiveDataByInvoiceNumber(String invoiceNumber,String id){
         Map map = new HashMap();
-        Integer count = service.getEffectiveDataByInvoiceNumber(invoiceNumber,id);
-        if(count>0){
+        if(org.apache.commons.lang3.StringUtils.isBlank(invoiceNumber)){
             map.put("success",false);
-            map.put("message","发票号:" + invoiceNumber + " 已发起或完成报销,请勿重复报销");
+            map.put("message","发票号不可为空");
         }else{
-            map.put("success",true);
+            Integer count = service.getEffectiveDataByInvoiceNumber(invoiceNumber,id);
+            if(count>0){
+                map.put("success",false);
+                map.put("message","发票号:" + invoiceNumber + " 已发起或完成报销,请勿重复报销");
+            }else{
+                map.put("success",true);
+            }
         }
         return map;
     }

+ 9 - 4
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/reimbursementApproval/approvalInfo/controller/CwReimbursementInfoController.java

@@ -236,12 +236,17 @@ public class CwReimbursementInfoController {
     @ApiOperation(value = "根据发票号查询是否已经或正在报销")
     public Map<String,Object> getEffectiveDataByInvoiceNumber(String invoiceNumber,String id){
         Map map = new HashMap();
-        Integer count = service.getEffectiveDataByInvoiceNumber(invoiceNumber,id);
-        if(count>0){
+        if(StringUtils.isBlank(invoiceNumber)){
             map.put("success",false);
-            map.put("message","发票号:" + invoiceNumber + " 已发起或完成报销,请勿重复报销");
+            map.put("message","发票号不可为空");
         }else{
-            map.put("success",true);
+            Integer count = service.getEffectiveDataByInvoiceNumber(invoiceNumber,id);
+            if(count>0){
+                map.put("success",false);
+                map.put("message","发票号:" + invoiceNumber + " 已发起或完成报销,请勿重复报销");
+            }else{
+                map.put("success",true);
+            }
         }
         return map;
     }