bug修改
This commit is contained in:
parent
5abc225caf
commit
8136a62e90
|
|
@ -563,7 +563,7 @@ public class SecurityCheckController extends BaseController {
|
||||||
@SysLog(title = "隐患整改审批", businessType = OperaType.EXPORT, logType = 0, module = "隐患整改审批->导出隐患整改审批列表数据")
|
@SysLog(title = "隐患整改审批", businessType = OperaType.EXPORT, logType = 0, module = "隐患整改审批->导出隐患整改审批列表数据")
|
||||||
public void exportHiddenDangerRectificationApprovalList(HttpServletResponse response, @RequestBody SecurityCheckDto dto) {
|
public void exportHiddenDangerRectificationApprovalList(HttpServletResponse response, @RequestBody SecurityCheckDto dto) {
|
||||||
try {
|
try {
|
||||||
List<HiddenDangerRectificationVo> list = service.getHiddenDangerRectificationApprovalList(dto);
|
List<HiddenDangerRectificationVo> list = service.getHiddenDangerRectificationApprovalListByPage(dto);
|
||||||
ExcelUtil<HiddenDangerRectificationVo> util = new ExcelUtil<>(HiddenDangerRectificationVo.class);
|
ExcelUtil<HiddenDangerRectificationVo> util = new ExcelUtil<>(HiddenDangerRectificationVo.class);
|
||||||
util.exportExcel(response, list, "隐患整改审批列表导出");
|
util.exportExcel(response, list, "隐患整改审批列表导出");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
||||||
|
|
@ -134,6 +134,7 @@ public interface SecurityCheckService {
|
||||||
* @return 隐患整改审批列表
|
* @return 隐患整改审批列表
|
||||||
*/
|
*/
|
||||||
List<HiddenDangerRectificationVo> getHiddenDangerRectificationApprovalList(SecurityCheckDto dto);
|
List<HiddenDangerRectificationVo> getHiddenDangerRectificationApprovalList(SecurityCheckDto dto);
|
||||||
|
List<HiddenDangerRectificationVo> getHiddenDangerRectificationApprovalListByPage(SecurityCheckDto dto);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 整改方隐患问题整改回传状态修改
|
* 整改方隐患问题整改回传状态修改
|
||||||
|
|
|
||||||
|
|
@ -222,8 +222,7 @@ public class SecurityCheckServiceImpl implements SecurityCheckService {
|
||||||
}
|
}
|
||||||
mapper.updateSecurityCheckRecordForm(dto);
|
mapper.updateSecurityCheckRecordForm(dto);
|
||||||
Long[] fileIds = dto.getFileId();
|
Long[] fileIds = dto.getFileId();
|
||||||
if (fileIds != null && fileIds.length > 0)
|
if (fileIds != null && fileIds.length > 0) {
|
||||||
{
|
|
||||||
//删除附件
|
//删除附件
|
||||||
mapper.deleteFiles(dto.getFileId());
|
mapper.deleteFiles(dto.getFileId());
|
||||||
}
|
}
|
||||||
|
|
@ -236,7 +235,7 @@ public class SecurityCheckServiceImpl implements SecurityCheckService {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.toString(), e);
|
log.error(e.toString(), e);
|
||||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||||
return AjaxResult.error();
|
return AjaxResult.error("图片或文件格式错误,请重新上传");
|
||||||
}
|
}
|
||||||
|
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
|
|
@ -356,6 +355,7 @@ public class SecurityCheckServiceImpl implements SecurityCheckService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 延期申请撤回
|
* 延期申请撤回
|
||||||
|
*
|
||||||
* @param id 隐患整改id
|
* @param id 隐患整改id
|
||||||
* @return 撤回结果
|
* @return 撤回结果
|
||||||
*/
|
*/
|
||||||
|
|
@ -469,8 +469,7 @@ public class SecurityCheckServiceImpl implements SecurityCheckService {
|
||||||
dto.setIsCheck("1");
|
dto.setIsCheck("1");
|
||||||
result = mapper.updateHiddenDangerRectification(dto);
|
result = mapper.updateHiddenDangerRectification(dto);
|
||||||
Long[] fileIds = dto.getFileId();
|
Long[] fileIds = dto.getFileId();
|
||||||
if (fileIds != null && fileIds.length > 0)
|
if (fileIds != null && fileIds.length > 0) {
|
||||||
{
|
|
||||||
//删除附件
|
//删除附件
|
||||||
result = mapper.deleteFiles(dto.getFileId());
|
result = mapper.deleteFiles(dto.getFileId());
|
||||||
}
|
}
|
||||||
|
|
@ -546,6 +545,39 @@ public class SecurityCheckServiceImpl implements SecurityCheckService {
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public List<HiddenDangerRectificationVo> getHiddenDangerRectificationApprovalListByPage(SecurityCheckDto dto) {
|
||||||
|
RequestEntity entity = new RequestEntity();
|
||||||
|
//数据查询
|
||||||
|
Map<String, String> checkMaps = Maps.newHashMap();
|
||||||
|
if ("1".equals(dto.getStatus())) {
|
||||||
|
entity.setUserId(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||||
|
AjaxResult ajaxResult = flowTaskService.getStayFlow(entity);
|
||||||
|
if (ajaxResult.isSuccess()) {
|
||||||
|
List<Map<String, Object>> data = (List<Map<String, Object>>) ajaxResult.get("data");
|
||||||
|
List<String> proInsId = new ArrayList<>();
|
||||||
|
data.forEach(map -> {
|
||||||
|
proInsId.add((String) map.get("proInsId"));
|
||||||
|
checkMaps.put((String) map.get("proInsId"), (String) map.get("finalCheck"));
|
||||||
|
});
|
||||||
|
if (com.bonus.common.core.utils.StringUtils.isNotEmpty(data)) {
|
||||||
|
dto.setDataType(1);
|
||||||
|
dto.setProInsId(proInsId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
List<HiddenDangerRectificationVo> list = mapper.getHiddenDangerRectificationApprovalList(dto);
|
||||||
|
list.forEach(data -> {
|
||||||
|
if ("1".equals(data.getStatus()) && dto.getDataType() == 1) {
|
||||||
|
if ("2".equals(data.getIntoStatus())) {
|
||||||
|
data.setIntoStatus("1");
|
||||||
|
}
|
||||||
|
data.setFinalCheck(checkMaps.get(data.getProcInsId()));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return list;
|
||||||
|
}
|
||||||
// @Override
|
// @Override
|
||||||
// public List<HiddenDangerRectificationVo> getHiddenDangerRectificationApprovalList(SecurityCheckDto dto) {
|
// public List<HiddenDangerRectificationVo> getHiddenDangerRectificationApprovalList(SecurityCheckDto dto) {
|
||||||
// List<HiddenDangerRectificationVo> list = mapper.getHiddenDangerRectificationApprovalList(dto);
|
// List<HiddenDangerRectificationVo> list = mapper.getHiddenDangerRectificationApprovalList(dto);
|
||||||
|
|
@ -561,6 +593,7 @@ public class SecurityCheckServiceImpl implements SecurityCheckService {
|
||||||
// }
|
// }
|
||||||
// return list;
|
// return list;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 整改方隐患问题整改回传状态修改
|
* 整改方隐患问题整改回传状态修改
|
||||||
*
|
*
|
||||||
|
|
@ -642,6 +675,7 @@ public class SecurityCheckServiceImpl implements SecurityCheckService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据当前日期、整改时间和延期时间计算检查状态
|
* 根据当前日期、整改时间和延期时间计算检查状态
|
||||||
|
*
|
||||||
* @param date 当前日期
|
* @param date 当前日期
|
||||||
* @param correctionTime 整改时间
|
* @param correctionTime 整改时间
|
||||||
* @param delayTime 延期时间
|
* @param delayTime 延期时间
|
||||||
|
|
@ -850,6 +884,7 @@ public class SecurityCheckServiceImpl implements SecurityCheckService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上传文件到文件服务器
|
* 上传文件到文件服务器
|
||||||
|
*
|
||||||
* @param files 文件
|
* @param files 文件
|
||||||
* @param id id
|
* @param id id
|
||||||
* @param bigType 大类 3 违章
|
* @param bigType 大类 3 违章
|
||||||
|
|
@ -878,6 +913,7 @@ public class SecurityCheckServiceImpl implements SecurityCheckService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存文件信息
|
* 保存文件信息
|
||||||
|
*
|
||||||
* @param filePath 文件路径
|
* @param filePath 文件路径
|
||||||
* @param id id
|
* @param id id
|
||||||
* @param fileSize 文件大小
|
* @param fileSize 文件大小
|
||||||
|
|
@ -907,7 +943,4 @@ public class SecurityCheckServiceImpl implements SecurityCheckService {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@
|
||||||
pci.cont_name like concat('%',#{keyWord},'%')
|
pci.cont_name like concat('%',#{keyWord},'%')
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
<if test="status != null and status != '' and status != 1 and status != '1' and status != '2' and status != 2 ">
|
<if test="status != null and status != ''">
|
||||||
and lpc.into_status = #{status}
|
and lpc.into_status = #{status}
|
||||||
</if>
|
</if>
|
||||||
<if test='dataType==1'>
|
<if test='dataType==1'>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue