Selaa lähdekoodia

Merge branch 'test-merge' of http://219.151.181.73:3000/zhuwei/bladex into test-merge

lvy 1 päivä sitten
vanhempi
commit
23caea3f90

+ 26 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/InformationQueryServiceImpl.java

@@ -82,6 +82,7 @@ public class InformationQueryServiceImpl extends BaseServiceImpl<InformationQuer
     private final ContractClient contractClient;
 
     private final JdbcTemplate jdbcTemplate;
+    private final IOperationLogService operationLogService;
 
     @Autowired
     StringRedisTemplate RedisTemplate;
@@ -1137,8 +1138,33 @@ public class InformationQueryServiceImpl extends BaseServiceImpl<InformationQuer
         }else{
             return R.fail("type有误,无法处理该业务");
         }
+        List<InformationQuery> list = this.list(Wrappers.<InformationQuery>lambdaQuery().in(InformationQuery::getId, strList));
+        recordResignLog("电签检测", ids, list, new HashMap<String, Object>() {{
+            put("ids", ids);
+            put("classify", classify);
+            put("type", type);
+        }}, list.get(0).getProjectId()+"", list.get(0).getContractId()+"");
         return R.success("操作成功");
     }
+    public void recordResignLog(String module, String businessIds, Object data, Object requestData, String projectId, String contractId){
+        try {
+            OperationLog resignLog = new OperationLog();
+            resignLog.setProjectId(StringUtil.isNumeric(projectId) ? Long.parseLong(projectId) : null);
+            resignLog.setContractId(StringUtil.isNumeric(contractId) ? Long.parseLong(contractId) : null);
+            resignLog.setOperationType(33);
+            resignLog.setOperationModule(module);
+            resignLog.setOperationContent(JSON.toJSONString(requestData));
+            resignLog.setSaveData(JSON.toJSONString(data));
+            resignLog.setOperationTime(DateUtil.formatTime(DateUtil.now()));
+            resignLog.setOperationView("");
+            resignLog.setBusinessId(businessIds);
+            resignLog.setCreateUser(AuthUtil.getUserId());
+            resignLog.setOperationAccount(AuthUtil.getNickName());
+            operationLogService.save(resignLog);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
     @Override
     public ChekPdfPaceVo getCheckPdfPaceInfo(String contractId, String classify) {
        /* ChekPdfPaceVo da = new ChekPdfPaceVo();

+ 12 - 5
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TaskServiceImpl.java

@@ -3,6 +3,7 @@ package org.springblade.business.service.impl;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
@@ -1251,7 +1252,9 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
             Map<String, List<TaskParallel>> finalTaskParallelGroupMap = taskParallelGroupMap;
             //获取每条任务对应的节点信息
             List<String> dataIdList = taskList.stream().map(Task::getFormDataId).filter(ObjectUtil::isNotEmpty).collect(Collectors.toList());
-            Map<String, String> queryMap = jdbcTemplate.query("select * from u_information_query where id in(" + StringUtils.join(dataIdList, ",") + ")", new BeanPropertyRowMapper<>(InformationQuery.class)).stream().collect(Collectors.toMap(l -> l.getId() + "", l -> l.getWbsId() + ""));
+            //Map<String, String> queryMap = jdbcTemplate.query("select * from u_information_query where id in(" + StringUtils.join(dataIdList, ",") + ")", new BeanPropertyRowMapper<>(InformationQuery.class)).stream().collect(Collectors.toMap(l -> l.getId() + "", l -> l.getWbsId() + ""));
+            List<InformationQuery> list = informationQueryService.list(new LambdaQueryWrapper<InformationQuery>().in(InformationQuery::getId, dataIdList));
+            Map<String, String> queryMap=list.stream().collect(Collectors.toMap(l -> l.getId() + "", l -> l.getWbsId() + ""));
             Map<String, String> typeMap = jdbcTemplate.query("select * from u_information_query where id in(" + StringUtils.join(dataIdList, ",") + ")", new BeanPropertyRowMapper<>(InformationQuery.class)).stream().collect(Collectors.toMap(l -> l.getId() + "", l -> l.getClassify() + ""));
 
             try {
@@ -1324,7 +1327,7 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
                     String taskIds = StringUtils.join(taskList, ",");
                     removeUserAndName(taskIds, userId, userName);
                 }*/
-                recordResignLog("一键重签-试验", StringUtils.join(dataIdList, ","), queryMap, dto, dto.getProjectId(), null);
+                recordResignLog("一键重签-试验", StringUtils.join(dataIdList, ","), list, dto, dto.getProjectId(), null);
             } catch (Exception e) {
                 e.printStackTrace();
                 throw new ServiceException("重新保存PDF信息失败,原因:" + e.getMessage());
@@ -1971,6 +1974,8 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
                     .set(InformationQuery::getSaveAgain, 0)
                     .ne(InformationQuery::getSaveAgain, 1)
                     .in(InformationQuery::getId, newIds));
+            List<InformationQuery> list = informationQueryService.list(new LambdaQueryWrapper<>(InformationQuery.class).in(InformationQuery::getId, newIds));
+            recordResignLog("save-again", StringUtils.join(newIds, ","), list, dtos, dtos.get(0).getProjectId()+"", dtos.get(0).getContractId()+"");
         }
         return R.success("操作成功");
     }
@@ -2007,7 +2012,9 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
             Map<String, List<TaskParallel>> finalTaskParallelGroupMap = taskParallelGroupMap;
             //获取每条任务对应的节点信息
             List<String> dataIdList = taskList.stream().map(Task::getFormDataId).filter(ObjectUtil::isNotEmpty).collect(Collectors.toList());
-            Map<String, String> queryMap = jdbcTemplate.query("select * from u_information_query where id in(" + StringUtils.join(dataIdList, ",") + ")", new BeanPropertyRowMapper<>(InformationQuery.class)).stream().collect(Collectors.toMap(l -> l.getId() + "", l -> l.getWbsId() + ""));
+            //Map<String, String> queryMap = jdbcTemplate.query("select * from u_information_query where id in(" + StringUtils.join(dataIdList, ",") + ")", new BeanPropertyRowMapper<>(InformationQuery.class)).stream().collect(Collectors.toMap(l -> l.getId() + "", l -> l.getWbsId() + ""));
+            List<InformationQuery> list = informationQueryService.list(Wrappers.<InformationQuery>lambdaQuery().in(InformationQuery::getId, dataIdList));
+            Map<String, String> queryMap=list.stream().collect(Collectors.toMap(l -> l.getId() + "", l -> l.getWbsId() + ""));
             Map<String, String> typeMap = jdbcTemplate.query("select * from u_information_query where id in(" + StringUtils.join(dataIdList, ",") + ")", new BeanPropertyRowMapper<>(InformationQuery.class)).stream().collect(Collectors.toMap(l -> l.getId() + "", l -> l.getClassify() + ""));
 
             try {
@@ -2225,7 +2232,7 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
                     //满足去除当前填报人的条件 去除当前任务的填报人中当前操作人的信息
                     removeUserAndName(taskIds, userId, userName);
                 }
-                recordResignLog("一键重签-质检",StringUtils.join(dataIdList, ","), queryMap, new HashMap<String, Object>() {{
+                recordResignLog("一键重签-质检",StringUtils.join(dataIdList, ","), list, new HashMap<String, Object>() {{
                     put("taskIds", taskIds);
                     put("contractId", contractId);
                     put("projectId", projectId);
@@ -2383,7 +2390,7 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
             resignLog.setOperationView("");
             resignLog.setBusinessId(businessIds);
             resignLog.setCreateUser(AuthUtil.getUserId());
-            resignLog.setOperationContent(AuthUtil.getNickName());
+            resignLog.setOperationAccount(AuthUtil.getNickName());
             operationLogService.save(resignLog);
         } catch (Exception e) {
             e.printStackTrace();

+ 1 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/WbsTreePrivateMapper.xml

@@ -387,7 +387,7 @@
             m_wbs_tree_private d
         WHERE
             d.is_deleted = 0
-        <if test="type != null and wbsType != '' and type =1">
+        <if test="type ==1">
           AND  (d.is_add_conceal != 1 OR d.is_add_conceal IS NULL)
         </if>
         AND d.parent_id = #{parentId}