安全和质量导出bug修改
This commit is contained in:
parent
ec00346349
commit
07e1da5ea2
@ -382,6 +382,43 @@ public class DownloadController {
|
|||||||
qualityInspectionRecordService.exporExcelQualityInspectionRecord(response, map);
|
qualityInspectionRecordService.exporExcelQualityInspectionRecord(response, map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "列表查询质量检查记录信息下载", notes = "列表查询质量检查记录信息下载", httpMethod = "GET")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "regionId", value = "检查部位ID", paramType = "query", required = false, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "status", value = "状态,1无需整改,2待整改,3待复查,4待核验,5合格,6不合格", paramType = "query", required = false, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "recordStatus", value = "查询类型,1排查记录,2已闭合,3未闭合,4超期未关闭,5待整改,6待复查,7待核验", paramType = "query", required = false, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "urgentLevel", value = "紧急程度,1一般,2严重,3紧要", paramType = "query", required = false, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "level", value = "问题等级,1一级,2二级,3三级,4四级", paramType = "query", required = false, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "changeId", value = "整改人", paramType = "query", required = false, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "creatorId", value = "创建人", paramType = "query", required = false, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "reviewId", value = "复查人", paramType = "query", required = false, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "verifyManId", value = "核验人", paramType = "query", required = false, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "inspectManId", value = "检查人", paramType = "query", required = false, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "inspectStartTime", value = "检查开始时间", paramType = "query", required = false, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "inspectEndTime", value = "检查结束时间", paramType = "query", required = false, dataType = "String"),
|
||||||
|
})
|
||||||
|
@GetMapping(value = "/exportExcelXzSecurityQualityInspectionRecord")
|
||||||
|
public void exportExcelXzSecurityQualityInspectionRecord(HttpServletResponse response, String projectSn, String regionId, Integer status, Integer recordStatus, Integer urgentLevel,
|
||||||
|
Integer level, String changeId, String creatorId, String reviewId, String verifyManId, String inspectManId,
|
||||||
|
String inspectStartTime, String inspectEndTime) {
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
map.put("projectSn", projectSn);
|
||||||
|
map.put("regionId", regionId);
|
||||||
|
map.put("recordStatus", recordStatus);
|
||||||
|
map.put("urgentLevel", urgentLevel);
|
||||||
|
map.put("level", level);
|
||||||
|
map.put("changeId", changeId);
|
||||||
|
map.put("creatorId", creatorId);
|
||||||
|
map.put("verifyManId", verifyManId);
|
||||||
|
map.put("inspectManId", inspectManId);
|
||||||
|
map.put("reviewId", reviewId);
|
||||||
|
map.put("status", status);
|
||||||
|
map.put("inspectStartTime", inspectStartTime);
|
||||||
|
map.put("inspectEndTime", inspectEndTime);
|
||||||
|
qualityInspectionRecordService.exportExcelXzSecurityQualityInspectionRecord(response, map);
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "隐患检查记录统计信息下载", notes = "隐患检查记录统计信息下载", httpMethod = "GET")
|
@ApiOperation(value = "隐患检查记录统计信息下载", notes = "隐患检查记录统计信息下载", httpMethod = "GET")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String"),
|
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String"),
|
||||||
|
|||||||
@ -100,10 +100,11 @@ public class CheckingPointController {
|
|||||||
@ApiImplicitParam(name = "userId", value = "用户Id", paramType = "query", required = true, dataType = "String"),
|
@ApiImplicitParam(name = "userId", value = "用户Id", paramType = "query", required = true, dataType = "String"),
|
||||||
@ApiImplicitParam(name = "longitude", value = "经度", paramType = "query", required = true, dataType = "number"),
|
@ApiImplicitParam(name = "longitude", value = "经度", paramType = "query", required = true, dataType = "number"),
|
||||||
@ApiImplicitParam(name = "latitude", value = "维度", paramType = "query", required = true, dataType = "number"),
|
@ApiImplicitParam(name = "latitude", value = "维度", paramType = "query", required = true, dataType = "number"),
|
||||||
|
@ApiImplicitParam(name = "xzCheckingRouteTaskId", value = "星纵-巡检路线的任务Id", paramType = "query", required = false, dataType = "String"),
|
||||||
})
|
})
|
||||||
@GetMapping(value = "/checkLocation")
|
@GetMapping(value = "/checkLocation")
|
||||||
public Result<Boolean> checkLocation(Long id, Long userId, Double longitude, Double latitude) {
|
public Result<Boolean> checkLocation(Long id, Long userId, Double longitude, Double latitude, String xzCheckingRouteTaskId) {
|
||||||
return Result.success(checkingPointService.checkLocation(id, userId, longitude, latitude));
|
return Result.success(checkingPointService.checkLocation(id, userId, longitude, latitude, xzCheckingRouteTaskId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "通过id查询巡检点", notes = "通过id查询巡检点", httpMethod = "GET")
|
@ApiOperation(value = "通过id查询巡检点", notes = "通过id查询巡检点", httpMethod = "GET")
|
||||||
|
|||||||
@ -25,7 +25,7 @@ public interface CheckingPointService extends IService<CheckingPoint> {
|
|||||||
* @param latitude 纬度
|
* @param latitude 纬度
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Boolean checkLocation(Long id, Long userId, Double longitude, Double latitude);
|
Boolean checkLocation(Long id, Long userId, Double longitude, Double latitude, String xzCheckingRouteTaskId);
|
||||||
|
|
||||||
void add(CheckingPoint checkingPoint);
|
void add(CheckingPoint checkingPoint);
|
||||||
|
|
||||||
|
|||||||
@ -16,6 +16,7 @@ import com.zhgd.jeecg.common.execption.OpenPromptException;
|
|||||||
import com.zhgd.xmgl.modules.basicdata.service.INoticeService;
|
import com.zhgd.xmgl.modules.basicdata.service.INoticeService;
|
||||||
import com.zhgd.xmgl.modules.checking.entity.CheckingPoint;
|
import com.zhgd.xmgl.modules.checking.entity.CheckingPoint;
|
||||||
import com.zhgd.xmgl.modules.checking.entity.CheckingPointInfo;
|
import com.zhgd.xmgl.modules.checking.entity.CheckingPointInfo;
|
||||||
|
import com.zhgd.xmgl.modules.checking.entity.XzCheckingRouteTask;
|
||||||
import com.zhgd.xmgl.modules.checking.entity.qo.ProjectSnQO;
|
import com.zhgd.xmgl.modules.checking.entity.qo.ProjectSnQO;
|
||||||
import com.zhgd.xmgl.modules.checking.mapper.CheckingPointInfoMapper;
|
import com.zhgd.xmgl.modules.checking.mapper.CheckingPointInfoMapper;
|
||||||
import com.zhgd.xmgl.modules.checking.mapper.CheckingPointMapper;
|
import com.zhgd.xmgl.modules.checking.mapper.CheckingPointMapper;
|
||||||
@ -48,6 +49,8 @@ public class CheckingPointServiceImpl extends ServiceImpl<CheckingPointMapper, C
|
|||||||
|
|
||||||
@Value("${basePath}")
|
@Value("${basePath}")
|
||||||
String basePath;
|
String basePath;
|
||||||
|
@Autowired
|
||||||
|
XzCheckingRouteTaskServiceImpl xzCheckingRouteTaskService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<CheckingPoint> selectCheckingPointPage(ProjectSnQO projectSnQO) {
|
public IPage<CheckingPoint> selectCheckingPointPage(ProjectSnQO projectSnQO) {
|
||||||
@ -60,7 +63,7 @@ public class CheckingPointServiceImpl extends ServiceImpl<CheckingPointMapper, C
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean checkLocation(Long id, Long userId, Double longitude, Double latitude) {
|
public Boolean checkLocation(Long id, Long userId, Double longitude, Double latitude, String xzCheckingRouteTaskId) {
|
||||||
CheckingPoint checkingPoint = checkingPointMapper.selectById(id);
|
CheckingPoint checkingPoint = checkingPointMapper.selectById(id);
|
||||||
if (checkingPoint == null) {
|
if (checkingPoint == null) {
|
||||||
throw new OpenAlertException("该巡检点不存在");
|
throw new OpenAlertException("该巡检点不存在");
|
||||||
@ -73,6 +76,20 @@ public class CheckingPointServiceImpl extends ServiceImpl<CheckingPointMapper, C
|
|||||||
if (!inCircle) {
|
if (!inCircle) {
|
||||||
throw new OpenPromptException("当前用户不在自定义范围区域内!", false);
|
throw new OpenPromptException("当前用户不在自定义范围区域内!", false);
|
||||||
}
|
}
|
||||||
|
String inspectUserIds;
|
||||||
|
// 判断用户是否存在于检查人员id列表
|
||||||
|
if (StrUtil.isNotBlank(xzCheckingRouteTaskId)) {
|
||||||
|
XzCheckingRouteTask task = xzCheckingRouteTaskService.queryById(xzCheckingRouteTaskId);
|
||||||
|
inspectUserIds = task.getXzCheckingRoute().getInspectUserIds();
|
||||||
|
} else {
|
||||||
|
inspectUserIds = checkingPoint.getInspectUserIds();
|
||||||
|
}
|
||||||
|
// 判断用户是否存在于检查人员id列表
|
||||||
|
boolean userFlag = CharSequenceUtil.split(inspectUserIds, ",").contains(String.valueOf(userId));
|
||||||
|
if (!userFlag) {
|
||||||
|
throw new OpenPromptException("当前用户不具备巡检权限!", false);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -52,7 +52,7 @@ public interface QualityInspectionRecordMapper extends BaseMapper<QualityInspect
|
|||||||
|
|
||||||
Map<String, Object> selectDangerInspectCountByItemTask(@Param("itemId") Long itemId);
|
Map<String, Object> selectDangerInspectCountByItemTask(@Param("itemId") Long itemId);
|
||||||
|
|
||||||
List<EntityMap> selectExportExcelQualityInspectionRecordList(Map<String, Object> map);
|
List<EntityMap> selectExportExcelQualityInspectionRecordList(@Param("param") Map<String, Object> map);
|
||||||
|
|
||||||
EntityMap getRectificationAndNoNum(@Param("projectSn") String projectSn);
|
EntityMap getRectificationAndNoNum(@Param("projectSn") String projectSn);
|
||||||
|
|
||||||
|
|||||||
@ -51,6 +51,8 @@ public interface IQualityInspectionRecordService extends IService<QualityInspect
|
|||||||
|
|
||||||
void exporExcelQualityInspectionRecord(HttpServletResponse response, Map<String, Object> map);
|
void exporExcelQualityInspectionRecord(HttpServletResponse response, Map<String, Object> map);
|
||||||
|
|
||||||
|
void exportExcelXzSecurityQualityInspectionRecord(HttpServletResponse response, Map<String, Object> map);
|
||||||
|
|
||||||
EntityMap getRectificationAndNoNum(String projectSn);
|
EntityMap getRectificationAndNoNum(String projectSn);
|
||||||
|
|
||||||
XzSecurityXzSecurityAllAndTodayDataVO getQualityAcceptanceAndRectificationNum(String projectSn);
|
XzSecurityXzSecurityAllAndTodayDataVO getQualityAcceptanceAndRectificationNum(String projectSn);
|
||||||
|
|||||||
@ -43,6 +43,7 @@ import com.zhgd.xmgl.modules.xz.entity.XzDeductScoreRecord;
|
|||||||
import com.zhgd.xmgl.modules.xz.mapper.XzDeductScoreRecordMapper;
|
import com.zhgd.xmgl.modules.xz.mapper.XzDeductScoreRecordMapper;
|
||||||
import com.zhgd.xmgl.modules.xz.security.entity.dto.XzSecurityDepartmentRectifiedRankDto;
|
import com.zhgd.xmgl.modules.xz.security.entity.dto.XzSecurityDepartmentRectifiedRankDto;
|
||||||
import com.zhgd.xmgl.modules.xz.security.entity.vo.*;
|
import com.zhgd.xmgl.modules.xz.security.entity.vo.*;
|
||||||
|
import com.zhgd.xmgl.modules.xz.security.mapper.XzSecurityQualityInspectionRecordMapper;
|
||||||
import com.zhgd.xmgl.push.config.PushPayloads;
|
import com.zhgd.xmgl.push.config.PushPayloads;
|
||||||
import com.zhgd.xmgl.util.*;
|
import com.zhgd.xmgl.util.*;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
@ -87,6 +88,8 @@ public class QualityInspectionRecordServiceImpl extends ServiceImpl<QualityInspe
|
|||||||
@Autowired
|
@Autowired
|
||||||
private QualityInspectionRecordMapper qualityInspectionRecordMapper;
|
private QualityInspectionRecordMapper qualityInspectionRecordMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
private XzSecurityQualityInspectionRecordMapper xzSecurityQualityInspectionRecordMapper;
|
||||||
|
@Autowired
|
||||||
private QualityRectifyRecordMapper qualityRectifyRecordMapper;
|
private QualityRectifyRecordMapper qualityRectifyRecordMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private INoticeService noticeService;
|
private INoticeService noticeService;
|
||||||
@ -423,6 +426,71 @@ public class QualityInspectionRecordServiceImpl extends ServiceImpl<QualityInspe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void exportExcelXzSecurityQualityInspectionRecord(HttpServletResponse response, Map<String, Object> map) {
|
||||||
|
try {
|
||||||
|
List<EntityMap> list = xzSecurityQualityInspectionRecordMapper.selectExportExcelQualityInspectionRecordList(map);
|
||||||
|
for (EntityMap demo : list) {
|
||||||
|
Integer urgentLevel = MapUtils.getInteger(demo, "urgentLevel");
|
||||||
|
if (urgentLevel != null) {
|
||||||
|
if (urgentLevel == 1) {
|
||||||
|
demo.put("urgentlevelname", "一般");
|
||||||
|
} else if (urgentLevel == 2) {
|
||||||
|
demo.put("urgentlevelname", "严重");
|
||||||
|
} else if (urgentLevel == 3) {
|
||||||
|
demo.put("urgentlevelname", "紧要");
|
||||||
|
} else {
|
||||||
|
demo.put("urgentlevelname", "");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
demo.put("urgentlevelname", "");
|
||||||
|
}
|
||||||
|
Integer level = MapUtils.getInteger(demo, "level");
|
||||||
|
if (level != null) {
|
||||||
|
if (level == 1) {
|
||||||
|
demo.put("levelname", "一级");
|
||||||
|
} else if (level == 2) {
|
||||||
|
demo.put("levelname", "二级");
|
||||||
|
} else if (level == 3) {
|
||||||
|
demo.put("levelname", "三级");
|
||||||
|
} else if (level == 4) {
|
||||||
|
demo.put("levelname", "四级");
|
||||||
|
} else {
|
||||||
|
demo.put("levelname", "");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
demo.put("levelname", "");
|
||||||
|
}
|
||||||
|
Integer status = MapUtils.getInteger(demo, "status");
|
||||||
|
String statusName = "";
|
||||||
|
if (status != null) {
|
||||||
|
if (status == 1) {
|
||||||
|
statusName = "无需整改";
|
||||||
|
} else if (status == 2) {
|
||||||
|
statusName = "待整改";
|
||||||
|
|
||||||
|
} else if (status == 3) {
|
||||||
|
statusName = "待复查";
|
||||||
|
} else if (status == 4) {
|
||||||
|
statusName = "待核验";
|
||||||
|
} else if (status == 5) {
|
||||||
|
statusName = "合格";
|
||||||
|
} else if (status == 6) {
|
||||||
|
statusName = "不合格";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
demo.put("statusname", statusName);
|
||||||
|
}
|
||||||
|
String[] heads = {"检查结果", "检查人", "检查时间", "检查部位", "问题描述", "补充说明", "整改要求", "问题等级", "紧急程度", "整改人", "整改时限", "复查人", "核验人"};
|
||||||
|
String[] headsStr = {"statusname", "inspectManName", "inspectTime", "regionName", "dangerItemContent", "dangerDesc", "remark", "levelname",
|
||||||
|
"urgentlevelname", "changeName", "changeLimitTime", "reviewName", "verifyManName"};
|
||||||
|
JxlExcelUtils.excelExport("安全检查列表", heads, headsStr, list, response);
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("error:", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EntityMap getRectificationAndNoNum(String projectSn) {
|
public EntityMap getRectificationAndNoNum(String projectSn) {
|
||||||
return qualityInspectionRecordMapper.getRectificationAndNoNum(projectSn);
|
return qualityInspectionRecordMapper.getRectificationAndNoNum(projectSn);
|
||||||
|
|||||||
@ -49,7 +49,7 @@ public interface XzSecurityQualityInspectionRecordMapper extends BaseMapper<XzSe
|
|||||||
|
|
||||||
Map<String, Object> selectDangerInspectCountByItemTask(@Param("itemId") Long itemId);
|
Map<String, Object> selectDangerInspectCountByItemTask(@Param("itemId") Long itemId);
|
||||||
|
|
||||||
List<EntityMap> selectExportExcelQualityInspectionRecordList(Map<String, Object> map);
|
List<EntityMap> selectExportExcelQualityInspectionRecordList(@Param("param") Map<String, Object> map);
|
||||||
|
|
||||||
EntityMap getRectificationAndNoNum(@Param("projectSn") String projectSn);
|
EntityMap getRectificationAndNoNum(@Param("projectSn") String projectSn);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user