Преглед на файлове

bug

Signed-off-by: liuyc <56808083@qq.com>
liuyc преди 9 месеца
родител
ревизия
ebc461bcaa

+ 6 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/ContractInfoVO2.java

@@ -1,8 +1,10 @@
 package org.springblade.manager.vo;
 
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import org.springblade.manager.entity.ContractInfo;
 import org.springblade.manager.entity.WbsTreeContract;
+import org.springblade.meter.entity.MeterContractInfo;
 
 import java.io.Serializable;
 import java.util.List;
@@ -18,5 +20,9 @@ public class ContractInfoVO2 implements Serializable {
      * WbsTreeContractList
      */
     private List<WbsTreeContractVO3> wbsTreeContractList;
+    /**
+     * meterContractInfo
+     */
+    private MeterContractInfo meterContractInfo;
 
 }

+ 6 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ContractInfoController.java

@@ -86,6 +86,12 @@ public class ContractInfoController extends BladeController {
     @ApiOperation(value = "详情2", notes = "传入contractInfo")
     public R<ContractInfoVO2> detail2(ContractInfo contractInfo) {
         ContractInfoVO2 detail = contractInfoService.selectByCondition(contractInfo);
+        if (detail != null) {
+            MeterContractInfo meterContractInfo = jdbcTemplate.query("SELECT * FROM s_meter_contract_info WHERE contract_id = " + contractInfo.getId(), new BeanPropertyRowMapper<>(MeterContractInfo.class)).stream().findAny().orElse(null);
+            if (meterContractInfo != null) {
+                detail.setMeterContractInfo(meterContractInfo);
+            }
+        }
         return R.data(detail);
     }
 

+ 7 - 8
blade-service/blade-meter/src/main/java/org/springblade/meter/controller/TaskController.java

@@ -255,7 +255,7 @@ public class TaskController extends BladeController {
                     try {
                         this.buildTaskInfo(taskId, approvalDTO, aopParamsSet, 1);
                     } catch (Exception e) {
-                        throw new ServiceException("创建审批任务异常,操作失败:" + e.getMessage());
+                        throw new ServiceException("创建审批任务异常," + e.getMessage());
                     }
 
                     /*修改数据源状态为=待审批*/
@@ -325,7 +325,7 @@ public class TaskController extends BladeController {
                     try {
                         this.buildTaskInfo(taskId, approvalDTO, aopParamsSet, 2);
                     } catch (Exception e) {
-                        throw new ServiceException("创建审批任务异常,操作失败:" + e.getMessage());
+                        throw new ServiceException("创建审批任务异常," + e.getMessage());
                     }
 
                     /*修改数据源状态为=待审批*/
@@ -390,7 +390,7 @@ public class TaskController extends BladeController {
                     try {
                         this.buildTaskInfo(taskId, approvalDTO, aopParamsSet, 3);
                     } catch (Exception e) {
-                        throw new ServiceException("创建审批任务异常,操作失败:" + e.getMessage());
+                        throw new ServiceException("创建审批任务异常," + e.getMessage());
                     }
 
                     /*修改数据源状态为=待审批*/
@@ -488,7 +488,7 @@ public class TaskController extends BladeController {
                 try {
                     this.buildTaskInfo(taskId, approvalDTO, aopParamsSet, 4);
                 } catch (Exception e) {
-                    throw new ServiceException("创建审批任务异常,操作失败:" + e.getMessage());
+                    throw new ServiceException("创建审批任务异常," + e.getMessage());
                 }
 
                 return R.data(200, aopParamsSet, "操作成功");
@@ -535,7 +535,7 @@ public class TaskController extends BladeController {
         }
         R<Object> objectR = archiveFileTaskClient.checkTaskUserCertificateInfo(approvalDTO.getTaskUserIds());
         if (!objectR.isSuccess()) {
-            throw new ServiceException("选择的任务人没有签字证书信息,请联系管理员");
+            throw new ServiceException(objectR.getMsg());
         }
 
         /*主任务*/
@@ -571,7 +571,6 @@ public class TaskController extends BladeController {
         taskClient.saveTask(task);
 
         /*副任务*/
-
         /*1.非预设流程*/
         if (sortedMap == null) {
             Map<Long, String> nameMap = jdbcTemplate.query("select id,name from blade_user where is_deleted = 0"
@@ -2983,7 +2982,7 @@ public class TaskController extends BladeController {
                 String resultString = StringUtils.join(userIds, ",");
                 R<Object> objectR = archiveFileTaskClient.checkTaskUserCertificateInfo(resultString);
                 if (!objectR.isSuccess()) {
-                    throw new ServiceException("预设流程选择的任务人没有签字证书信息");
+                    throw new ServiceException(objectR.getMsg());
                 }
             }
 
@@ -3094,7 +3093,7 @@ public class TaskController extends BladeController {
                 String resultString = StringUtils.join(userIds, ",");
                 R<Object> objectR = archiveFileTaskClient.checkTaskUserCertificateInfo(resultString);
                 if (!objectR.isSuccess()) {
-                    throw new ServiceException("预设流程选择的任务人没有签字证书信息");
+                    throw new ServiceException(objectR.getMsg());
                 }
             }