|
@@ -5,7 +5,6 @@ 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;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import lombok.AllArgsConstructor;
|
|
@@ -22,7 +21,6 @@ import org.springblade.business.feignClient.WbsTreeContractStatisticsClientImpl;
|
|
|
import org.springblade.business.mapper.TaskMapper;
|
|
|
import org.springblade.business.mapper.TrialSelfInspectionRecordMapper;
|
|
|
import org.springblade.business.service.*;
|
|
|
-import org.springblade.business.sync.TaskSync;
|
|
|
import org.springblade.business.utils.FileUtils;
|
|
|
import org.springblade.business.vo.*;
|
|
|
import org.springblade.common.constant.CommonConstant;
|
|
@@ -31,7 +29,6 @@ import org.springblade.common.utils.SnowFlakeUtil;
|
|
|
import org.springblade.core.log.exception.ServiceException;
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl;
|
|
|
import org.springblade.core.oss.model.BladeFile;
|
|
|
-import org.springblade.core.redis.cache.BladeRedis;
|
|
|
import org.springblade.core.secure.BladeUser;
|
|
|
import org.springblade.core.secure.utils.AuthUtil;
|
|
|
import org.springblade.core.secure.utils.SecureUtil;
|
|
@@ -66,7 +63,6 @@ import org.springframework.data.redis.core.StringRedisTemplate;
|
|
|
import org.springframework.jdbc.core.BeanPropertyRowMapper;
|
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
|
import org.springframework.jdbc.core.SingleColumnRowMapper;
|
|
|
-import org.springframework.scheduling.annotation.Async;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
@@ -1223,7 +1219,7 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
|
|
|
put("logPkeyId", logPkeyId);
|
|
|
put("nodePrimaryKeyId", nodePrimaryKeyId);
|
|
|
put("contractId", contractId);
|
|
|
- }}, null, contractId);
|
|
|
+ }}, null, contractId, request);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
throw new ServiceException("重新保存PDF信息失败,原因:" + e.getMessage());
|
|
@@ -1327,7 +1323,7 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
|
|
|
String taskIds = StringUtils.join(taskList, ",");
|
|
|
removeUserAndName(taskIds, userId, userName);
|
|
|
}*/
|
|
|
- recordResignLog("re-sign(试验)", StringUtils.join(dataIdList, ","), list, dto, dto.getProjectId(), null);
|
|
|
+ recordResignLog("re-sign(试验)", StringUtils.join(dataIdList, ","), list, dto, dto.getProjectId(), null, request);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
throw new ServiceException("重新保存PDF信息失败,原因:" + e.getMessage());
|
|
@@ -1434,7 +1430,7 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
|
|
|
.eq(TaskParallel::getProcessInstanceId, taskList.get(i).getProcessInstanceId()));
|
|
|
}
|
|
|
}
|
|
|
- this.recordResignLog("re-sign(委托单)", entrustIds, entrustInfos, dtos,taskList.get(0).getProjectId() , taskList.get(0).getContractId());
|
|
|
+ this.recordResignLog("re-sign(委托单)", entrustIds, entrustInfos, dtos,taskList.get(0).getProjectId() , taskList.get(0).getContractId(), request);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
throw new ServiceException("重新保存PDF信息失败,原因:" + e.getMessage());
|
|
@@ -1975,7 +1971,7 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
|
|
|
.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()+"");
|
|
|
+ recordResignLog("save-again", StringUtils.join(newIds, ","), list, dtos, dtos.get(0).getProjectId()+"", dtos.get(0).getContractId()+"", null);
|
|
|
}
|
|
|
return R.success("操作成功");
|
|
|
}
|
|
@@ -2238,7 +2234,7 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
|
|
|
put("projectId", projectId);
|
|
|
put("classify", classify);
|
|
|
put("type", type);
|
|
|
- }}, projectId, contractId);
|
|
|
+ }}, projectId, contractId, request);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
throw new ServiceException("重新保存PDF信息失败,原因:" + e.getMessage());
|
|
@@ -2371,13 +2367,13 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
|
|
|
Map<String, String> requestMap = new HashMap<>();
|
|
|
requestMap.put("ids", ids);
|
|
|
requestMap.put("userIds", userIds);
|
|
|
- recordResignLog("一键重签", ids, queryList, requestMap, null, null);
|
|
|
+ recordResignLog("一键重签", ids, queryList, requestMap, null, null, null);
|
|
|
}
|
|
|
return R.success("操作成功");
|
|
|
}
|
|
|
|
|
|
|
|
|
- public void recordResignLog(String module, String businessIds, Object data, Object requestData, String projectId, String contractId){
|
|
|
+ public void recordResignLog(String module, String businessIds, Object data, Object requestData, String projectId, String contractId, HttpServletRequest request){
|
|
|
try {
|
|
|
OperationLog resignLog = new OperationLog();
|
|
|
resignLog.setProjectId(StringUtil.isNumeric(projectId) ? Long.parseLong(projectId) : null);
|
|
@@ -2389,8 +2385,18 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
|
|
|
resignLog.setOperationTime(DateUtil.formatTime(DateUtil.now()));
|
|
|
resignLog.setOperationView("");
|
|
|
resignLog.setBusinessId(businessIds);
|
|
|
- resignLog.setCreateUser(AuthUtil.getUserId());
|
|
|
- resignLog.setOperationAccount(AuthUtil.getNickName());
|
|
|
+ if (request != null) {
|
|
|
+ BladeUser user = AuthUtil.getUser(request);
|
|
|
+ if (user != null) {
|
|
|
+ resignLog.setCreateUser(user.getUserId());
|
|
|
+ resignLog.setOperationAccount(user.getUserName());
|
|
|
+ resignLog.setCreateUserName(user.getNickName());
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ resignLog.setCreateUser(AuthUtil.getUserId());
|
|
|
+ resignLog.setOperationAccount(AuthUtil.getUserName());
|
|
|
+ resignLog.setCreateUserName(AuthUtil.getNickName());
|
|
|
+ }
|
|
|
operationLogService.save(resignLog);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|