Commit 8a80f977 authored by tianbo's avatar tianbo

bug修改

parent 7e3a8fca
......@@ -69,7 +69,7 @@ import com.yeejoin.amos.latentdanger.common.remote.RemoteWorkFlowService;
import com.yeejoin.amos.latentdanger.core.async.AsyncTask;
import com.yeejoin.amos.latentdanger.core.common.request.LatentDangerResultPushSpcRequest;
import com.yeejoin.amos.latentdanger.core.common.response.DangerListResponse;
import com.yeejoin.amos.latentdanger.core.util.StringUtil;
//import com.yeejoin.amos.latentdanger.core.util.StringUtil;
import com.yeejoin.amos.latentdanger.dao.entity.LatentDanger;
import com.yeejoin.amos.latentdanger.dao.entity.LatentDangerFlowRecord;
import com.yeejoin.amos.latentdanger.exception.YeeException;
......@@ -585,7 +585,7 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
}
// 过滤出隐患权限菜单路径("B_1,B_2.....B_10")
Object obj = jsonArray.stream().filter(i -> i.toString().matches("^B_\\d+")).collect(Collectors.toList());
if (StringUtil.isNotEmpty(obj) && ((List<String>) obj).size() > 0) {
if (!ValidationUtil.isEmpty(obj) && ((List<String>) obj).size() > 0) {
permissions = Joiner.on(",").join((List<String>) obj);
}
return permissions;
......@@ -746,15 +746,15 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
riskVo.setBasis(basis);
riskVo.setPointName(patrolBo.getPointName());
riskVo.setPointNo(patrolBo.getPointNo());
riskVo.setPointLevel(StringUtil.isNotEmpty(patrolBo.getPointLevel()) ? patrolBo.getPointLevel() : "");
riskVo.setPointLevel(!ValidationUtil.isEmpty(patrolBo.getPointLevel()) ? patrolBo.getPointLevel() : "");
riskVo.setPlanName(patrolBo.getPlanName());
riskVo.setCheckTime(patrolBo.getCheckTime());
AgencyUserModel checkUser = remoteSecurityService.getUserById(RequestContext.getToken(), getProduct(), RequestContext.getAppKey(), patrolBo.getCheckUserId());
if (StringUtil.isNotEmpty(checkUser)) {
if (!ValidationUtil.isEmpty(checkUser)) {
riskVo.setCheckUser(checkUser.getRealName());
}
// TODO 使用远程调用替换
// RiskFactorBo riskFactorBo = StringUtil.isNotEmpty(patrolBo.getClassifyOriginalId()) ? riskFactorMapper.getById(Long.valueOf(patrolBo.getClassifyOriginalId())) : null;
// RiskFactorBo riskFactorBo = !ValidationUtil.isEmpty(patrolBo.getClassifyOriginalId()) ? riskFactorMapper.getById(Long.valueOf(patrolBo.getClassifyOriginalId())) : null;
// if (riskFactorBo != null && riskFactorBo.getEquipmentDepartmentId() != null) {
// DepartmentModel department = remoteSecurityService.getDepartmentByDeptId(RequestContext.getToken(), getProduct(), RequestContext.getAppKey(), riskFactorBo.getEquipmentDepartmentId().toString());
// if (department != null) {
......@@ -886,9 +886,9 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
}
if (reviewRecordBo != null) {
AgencyUserModel reviewUser = userMap.get(reviewRecordBo.getExecuteUserId());
reviewInfo.put("reviewUserName", StringUtil.isNotEmpty(reviewUser) ? reviewUser.getRealName() : "");
reviewInfo.put("reviewDate", StringUtil.isNotEmpty(reviewUser) ? reviewRecordBo.getUpdateDate() : "");
reviewInfo.put("reviewResult", StringUtil.isNotEmpty(reviewUser) ? reviewRecordBo.getExecuteResult() : "");
reviewInfo.put("reviewUserName", !ValidationUtil.isEmpty(reviewUser) ? reviewUser.getRealName() : "");
reviewInfo.put("reviewDate", !ValidationUtil.isEmpty(reviewUser) ? reviewRecordBo.getUpdateDate() : "");
reviewInfo.put("reviewResult", !ValidationUtil.isEmpty(reviewUser) ? reviewRecordBo.getExecuteResult() : "");
}
result.put("baseInfo", baseInfo);
result.put("dangerInfo", dangerInfo);
......@@ -1346,7 +1346,7 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
String userId, String userRealName, String departmentId,
String departmentName, DangerExecuteSubmitDto executeSubmitDto,
ReginParams reginParams) {
if (StringUtil.isNotEmpty(param.getReformLimitDate())) {
if (!ValidationUtil.isEmpty(param.getReformLimitDate())) {
param.setReformLimitDate(param.getReformLimitDate() + " 23:59:59");
}
LatentDangerExecuteTypeEnum executeTypeEnum = LatentDangerExecuteTypeEnum.getByCode(param.getExecuteType());
......@@ -1357,7 +1357,7 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
}
// 延期治理时,根据用户选择是否需要公司来构造参数调用工作流
if (StringUtil.isNotEmpty(param.getNeedCompanyVerify())
if (!ValidationUtil.isEmpty(param.getNeedCompanyVerify())
&& executeTypeEnum.equals(LatentDangerExecuteTypeEnum.隐患延期治理车间部门审核通过)) {
String requestBody = "";
if (param.getNeedCompanyVerify() == 0) {// 延期治理申请 不需要公司审核
......@@ -1648,7 +1648,7 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
// return;
// }
// LatentDangerPatrolBo patrolBo = latentDangerPatrolMapper.getByDangerId(latentDangerBo.getId());
// if (patrolBo != null && StringUtil.isNotEmpty(patrolBo.getPointOriginalId())) {
// if (patrolBo != null && !ValidationUtil.isEmpty(patrolBo.getPointOriginalId())) {
// iRiskJudgmentTaskService.freshRiskJudgmentLangerCount(Long.parseLong(patrolBo.getPointOriginalId()));
// }
}
......@@ -1738,7 +1738,7 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
Set<String> userIdSet = Sets.newHashSet();
result.forEach(r -> {
userIdSet.add((String) r.get("executeUserId"));
if (StringUtil.isNotEmpty(r.get("handleUserIds"))) {
if (!ValidationUtil.isEmpty(r.get("handleUserIds"))) {
List<String> handleUserIds = Arrays.asList(r.get("handleUserIds").toString().split(","));
userIdSet.addAll(handleUserIds);
}
......@@ -1746,13 +1746,13 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
userIdSet.removeAll(Collections.singleton(null));
List<AgencyUserModel> userModels = remoteSecurityService.listUserByUserIds(Joiner.on(",").join(userIdSet));
if (StringUtil.isNotEmpty(userModels)) {
if (!ValidationUtil.isEmpty(userModels)) {
Map<String, AgencyUserModel> userMap = Maps.uniqueIndex(userModels, AgencyUserModel::getUserId);
result.forEach(r -> {
r.put("executeUserName", StringUtil.isNotEmpty(r.get("executeUserId")) ? userMap.get(r.get(
r.put("executeUserName", !ValidationUtil.isEmpty(r.get("executeUserId")) ? userMap.get(r.get(
"executeUserId")).getRealName() : "");
List<String> handleUserNames = Lists.newArrayList();
if (StringUtil.isNotEmpty(r.get("handleUserIds"))) {
if (!ValidationUtil.isEmpty(r.get("handleUserIds"))) {
List<String> handleUserIds = Arrays.asList(r.get("handleUserIds").toString().split(","));
handleUserIds.forEach(id -> handleUserNames.add(userMap.get(id).getRealName()));
}
......@@ -1780,7 +1780,7 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
List allTaskList;
String idsStr = (String) pageParam.get("dangerIds");
List<String> dangerIdList = Lists.newArrayList();
if (StringUtil.isNotEmpty(idsStr)) {
if (!ValidationUtil.isEmpty(idsStr)) {
// 查询指定隐患
dangerIdList = Lists.newArrayList(idsStr.split(","));
}
......@@ -1902,7 +1902,7 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
@Override
public List<DangerListResponse> export(PageParam pageParam) {
String idsStr = (String) pageParam.get("dangerIds");
if (StringUtil.isNotEmpty(idsStr)) {
if (!ValidationUtil.isEmpty(idsStr)) {
List<String> dangerIdList = Lists.newArrayList(idsStr.split(","));
pageParam.put("dangerIds", dangerIdList);
}
......@@ -1951,7 +1951,7 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
DictBo dangerLevel =
dangerLevelList.stream().filter(item -> item.getDictDataKey().equals(e.getDangerLevel())).collect(Collectors.toList()).get(0);
e.setDangerLevel(dangerLevel.getDictDataValue());
e.setReformType(!StringUtil.isNotEmpty(e.getReformType()) ? "" :
e.setReformType(!!ValidationUtil.isEmpty(e.getReformType()) ? "" :
LatentDangerReformTypeEnum.getEnumByCode(e.getReformType()).getName());
e.setOvertimeState("0".equals(e.getOvertimeState()) ? "否" : "是");
e.setDangerTypeName(LatentDangerTypeEnum.getEnumName(e.getDangerType()));
......
......@@ -95,4 +95,4 @@ control.fegin.name=JCS-API-CONTROL
supervision.feign.name=AMOS-SUPERVISION-API
jcs.fegin.name=JCS
onSite.confirm.roleName="Person_charge_unit_fire_protection_supervision_inspection"
\ No newline at end of file
onSite.confirm.roleName=Person_charge_unit_fire_protection_supervision_inspection
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment