Commit 5d71d5fe authored by kongfm's avatar kongfm

Merge branch 'developer' of 172.16.10.76:moa/amos-boot-biz into developer

parents 73c75df5 e0a9c4f3
...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.FieldFill; ...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity; import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -12,6 +13,9 @@ import lombok.experimental.Accessors; ...@@ -12,6 +13,9 @@ import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date; import java.util.Date;
import java.util.List;
import java.util.Map;
/** /**
* 消防员思想谈话记录 * 消防员思想谈话记录
* *
...@@ -51,6 +55,10 @@ public class FirefightersThought extends BaseEntity { ...@@ -51,6 +55,10 @@ public class FirefightersThought extends BaseEntity {
@ApiModelProperty(value = "附件") @ApiModelProperty(value = "附件")
private String enclosure; private String enclosure;
@ApiModelProperty(value = "附件")
@TableField(exist = false)
private Map<String, List<AttachmentDto>> attachments;
@ApiModelProperty(value = "更新时间") @ApiModelProperty(value = "更新时间")
@TableField(fill=FieldFill.UPDATE) @TableField(fill=FieldFill.UPDATE)
private Date updateTime; private Date updateTime;
......
package com.yeejoin.amos.boot.module.common.biz.controller; package com.yeejoin.amos.boot.module.common.biz.controller;
import java.util.Arrays; import java.util.*;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import com.yeejoin.amos.boot.module.common.api.entity.SourceFile;
import com.yeejoin.amos.boot.module.common.biz.service.impl.SourceFileServiceImpl;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
...@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
...@@ -52,6 +53,8 @@ public class FirefightersThoughtController extends BaseController { ...@@ -52,6 +53,8 @@ public class FirefightersThoughtController extends BaseController {
FirefightersThoughtServiceImpl iFirefightersThoughtService; FirefightersThoughtServiceImpl iFirefightersThoughtService;
@Autowired @Autowired
RedisUtils redisUtils; RedisUtils redisUtils;
@Autowired
SourceFileServiceImpl sourceFileService;
@Value("${redis.cache.failure.time}") @Value("${redis.cache.failure.time}")
private long time; private long time;
/** /**
...@@ -63,10 +66,13 @@ public class FirefightersThoughtController extends BaseController { ...@@ -63,10 +66,13 @@ public class FirefightersThoughtController extends BaseController {
@ApiOperation(httpMethod = "POST", value = "新增消防员思想谈话记录", notes = "新增消防员思想谈话记录") @ApiOperation(httpMethod = "POST", value = "新增消防员思想谈话记录", notes = "新增消防员思想谈话记录")
public ResponseModel<FirefightersThought> saveFirefightersThought(HttpServletRequest request, @RequestBody FirefightersThought firefightersThought){ public ResponseModel<FirefightersThought> saveFirefightersThought(HttpServletRequest request, @RequestBody FirefightersThought firefightersThought){
iFirefightersThoughtService.save(firefightersThought); iFirefightersThoughtService.save(firefightersThought);
if (!firefightersThought.getAttachments().isEmpty()){
sourceFileService.saveAttachments(firefightersThought.getSequenceNbr(),firefightersThought.getAttachments());
}
return ResponseHelper.buildResponse(firefightersThought); return ResponseHelper.buildResponse(firefightersThought);
} }
/** /**
* 根据id删除 * 根据id删除
* @param id * @param id
...@@ -97,7 +103,12 @@ public class FirefightersThoughtController extends BaseController { ...@@ -97,7 +103,12 @@ public class FirefightersThoughtController extends BaseController {
@RequestMapping(value = "/updateById", method = RequestMethod.PUT) @RequestMapping(value = "/updateById", method = RequestMethod.PUT)
@ApiOperation(httpMethod = "PUT", value = "修改消防员思想谈话记录", notes = "修改消防员思想谈话记录") @ApiOperation(httpMethod = "PUT", value = "修改消防员思想谈话记录", notes = "修改消防员思想谈话记录")
public ResponseModel<FirefightersThought> updateByIdFirefightersThought(HttpServletRequest request, @RequestBody FirefightersThought firefightersThought){ public ResponseModel<FirefightersThought> updateByIdFirefightersThought(HttpServletRequest request, @RequestBody FirefightersThought firefightersThought){
if (!firefightersThought.getAttachments().isEmpty()){
sourceFileService.saveAttachments(firefightersThought.getSequenceNbr(),firefightersThought.getAttachments());
}
iFirefightersThoughtService.updateById(firefightersThought); iFirefightersThoughtService.updateById(firefightersThought);
//删除缓存 //删除缓存
redisUtils.del(RedisKey.THOUGHT_ID+firefightersThought.getSequenceNbr()); redisUtils.del(RedisKey.THOUGHT_ID+firefightersThought.getSequenceNbr());
return ResponseHelper.buildResponse(firefightersThought); return ResponseHelper.buildResponse(firefightersThought);
...@@ -116,15 +127,21 @@ public class FirefightersThoughtController extends BaseController { ...@@ -116,15 +127,21 @@ public class FirefightersThoughtController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "根据消防员id查询", notes = "根据消防员id查询") @ApiOperation(httpMethod = "GET", value = "根据消防员id查询", notes = "根据消防员id查询")
public ResponseModel<Object> selectById(HttpServletRequest request, @PathVariable Long id){ public ResponseModel<Object> selectById(HttpServletRequest request, @PathVariable Long id){
if(redisUtils.hasKey(RedisKey.THOUGHT_ID+id)){ if(redisUtils.hasKey(RedisKey.THOUGHT_ID+id)){
Object obj= redisUtils.get(RedisKey.THOUGHT_ID+id); Object obj= redisUtils.get(RedisKey.THOUGHT_ID+id);
return ResponseHelper.buildResponse(obj); Map<String, Object> mainMap = Bean.BeantoMap(obj);
}else{ mainMap.put("attachments", sourceFileService.getAttachments(id));
FirefightersThought firefightersThought= iFirefightersThoughtService.getById(id); return ResponseHelper.buildResponse(mainMap);
}else{ FirefightersThought firefightersThought= iFirefightersThoughtService.getById(id);
redisUtils.set(RedisKey.THOUGHT_ID+id, JSON.toJSON(firefightersThought),time); redisUtils.set(RedisKey.THOUGHT_ID+id, JSON.toJSON(firefightersThought),time);
return ResponseHelper.buildResponse(firefightersThought); Map<String, Object> mainMap = Bean.BeantoMap(firefightersThought);
mainMap.put("attachments", sourceFileService.getAttachments(id));
return ResponseHelper.buildResponse(mainMap);
} }
} }
......
...@@ -361,9 +361,13 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -361,9 +361,13 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
if (!ObjectUtils.isEmpty(req.get("personNumber"))) { if (!ObjectUtils.isEmpty(req.get("personNumber"))) {
map.put("personNumber", req.get("personNumber")); map.put("personNumber", req.get("personNumber"));
} }
/*BUG2680 查询部门人员错误 传递参数类型不正确 修改为string 2021-09-14 陈召 开始*/
OrgUsr parent = this.getById(Long.valueOf(req.get("parentId").toString())); if (req.get("parentId") != null && req.get("parentId") != ""){
OrgUsr parent = this.getById(req.get("parentId").toString());
map.put("bizOrgCode", ObjectUtils.isEmpty(parent) ? null : parent.getBizOrgCode()); map.put("bizOrgCode", ObjectUtils.isEmpty(parent) ? null : parent.getBizOrgCode());
}
/*BUG2680 查询部门人员错误 传递参数类型不正确 修改为string 2021-09-14 陈召 开始*/
req.remove("bizOrgName"); req.remove("bizOrgName");
req.remove("pageSize"); req.remove("pageSize");
req.remove("pageNum"); req.remove("pageNum");
...@@ -547,8 +551,11 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -547,8 +551,11 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
} }
// 机场人员AMOS角色丢失修正, by litw end 2021年9月10日 // 机场人员AMOS角色丢失修正, by litw end 2021年9月10日
result = Bean.BeantoMap(orgUsr); result = Bean.BeantoMap(orgUsr);
/*bug 2869 部门为空人员详情报空指针 2021-09-14 陈召 开始*/
if (getById(orgUsr.getParentId()) != null){
result.put("parenName", getById(orgUsr.getParentId()).getBizOrgName()); result.put("parenName", getById(orgUsr.getParentId()).getBizOrgName());
}
/*bug 2869 部门为空人员详情报空指针 2021-09-14 陈召 结束*/
// 放入所有动态表单数据 // 放入所有动态表单数据
for (DynamicFormColumn alertForm : alertForms) { for (DynamicFormColumn alertForm : alertForms) {
result.put(alertForm.getFieldCode(), null); result.put(alertForm.getFieldCode(), null);
...@@ -1441,6 +1448,8 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -1441,6 +1448,8 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
List<OrgUsr> orgUsrList = this.baseMapper.selectList(wrapper); List<OrgUsr> orgUsrList = this.baseMapper.selectList(wrapper);
return orgUsrList; return orgUsrList;
} }
} }
package com.yeejoin.amos.supervision.business.controller; package com.yeejoin.amos.supervision.business.controller;
import java.io.ByteArrayInputStream; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import java.io.File; import com.yeejoin.amos.supervision.business.constants.XJConstant;
import java.io.FileInputStream; import com.yeejoin.amos.supervision.business.dto.CheckDto;
import java.io.IOException; import com.yeejoin.amos.supervision.business.param.CheckInfoPageParam;
import java.io.InputStream; import com.yeejoin.amos.supervision.business.param.CheckPageParam;
import java.util.Date; import com.yeejoin.amos.supervision.business.param.CheckRecordParam;
import java.util.HashMap; import com.yeejoin.amos.supervision.business.param.CheckStatisticalParam;
import java.util.List; import com.yeejoin.amos.supervision.business.service.intfc.ICheckService;
import java.util.Map; import com.yeejoin.amos.supervision.business.service.intfc.IPlanTaskService;
import com.yeejoin.amos.supervision.business.service.intfc.ISafety3DDataSendService;
import javax.servlet.http.HttpServletResponse; import com.yeejoin.amos.supervision.business.util.*;
import javax.xml.transform.Result;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import com.yeejoin.amos.supervision.business.vo.CheckAnalysisVo; import com.yeejoin.amos.supervision.business.vo.CheckAnalysisVo;
import com.yeejoin.amos.supervision.business.vo.CheckInfoVo; import com.yeejoin.amos.supervision.business.vo.CheckInfoVo;
import com.yeejoin.amos.supervision.business.vo.CheckVo;
import com.yeejoin.amos.supervision.core.async.AsyncTask; import com.yeejoin.amos.supervision.core.async.AsyncTask;
import com.yeejoin.amos.supervision.core.common.request.CommonPageable;
import com.yeejoin.amos.supervision.core.common.request.CommonRequest;
import com.yeejoin.amos.supervision.core.common.response.AppPointCheckRespone;
import com.yeejoin.amos.supervision.core.common.response.GraphInitDataResponse;
import com.yeejoin.amos.supervision.core.framework.PersonIdentify; import com.yeejoin.amos.supervision.core.framework.PersonIdentify;
import com.yeejoin.amos.supervision.core.util.DateUtil;
import com.yeejoin.amos.supervision.core.util.StringUtil; import com.yeejoin.amos.supervision.core.util.StringUtil;
import com.yeejoin.amos.supervision.mqtt.WebMqttComponent; import com.yeejoin.amos.supervision.mqtt.WebMqttComponent;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.BooleanUtils; import org.apache.commons.lang.BooleanUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
...@@ -35,48 +34,22 @@ import org.springframework.beans.factory.annotation.Value; ...@@ -35,48 +34,22 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.supervision.business.constants.XJConstant;
import com.yeejoin.amos.supervision.business.dto.CheckDto;
import com.yeejoin.amos.supervision.business.param.CheckInfoPageParam;
import com.yeejoin.amos.supervision.business.param.CheckRecordParam;
import com.yeejoin.amos.supervision.business.param.CheckStatisticalParam;
import com.yeejoin.amos.supervision.business.service.intfc.ICheckService;
import com.yeejoin.amos.supervision.business.service.intfc.IPlanTaskService;
import com.yeejoin.amos.supervision.business.service.intfc.ISafety3DDataSendService;
import com.yeejoin.amos.supervision.business.util.CheckPageParamUtil;
import com.yeejoin.amos.supervision.business.util.CheckParamUtil;
import com.yeejoin.amos.supervision.business.util.CommonResponse;
import com.yeejoin.amos.supervision.business.util.CommonResponseUtil;
import com.yeejoin.amos.supervision.business.util.DaoCriteria;
import com.yeejoin.amos.supervision.business.util.FileHelper;
import com.yeejoin.amos.supervision.business.util.Toke;
import com.yeejoin.amos.supervision.business.util.ToolUtils;
import com.yeejoin.amos.supervision.common.enums.PlanTaskFinishStatusEnum;
import com.yeejoin.amos.supervision.core.common.request.CommonPageable;
import com.yeejoin.amos.supervision.core.common.request.CommonRequest;
import com.yeejoin.amos.supervision.core.common.response.AppPointCheckRespone;
import com.yeejoin.amos.supervision.core.common.response.GraphInitDataResponse;
import com.yeejoin.amos.supervision.dao.entity.PlanTask;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletResponse;
import javax.xml.transform.*;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import java.io.*;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@RestController @RestController
@RequestMapping(value = "/api/check") @RequestMapping(value = "/api/check")
@Api(tags = "巡检记录api") @Api(tags = "巡检记录api")
...@@ -100,7 +73,7 @@ public class CheckController extends AbstractBaseController { ...@@ -100,7 +73,7 @@ public class CheckController extends AbstractBaseController {
@Value("${linux.img.path}") @Value("${linux.img.path}")
private String linuxImgPath; private String linuxImgPath;
// @Value("${file.ip}") // @Value("${file.ip}")
// private String fileIp; // private String fileIp;
// //
// @Value("${file.port}") // @Value("${file.port}")
...@@ -572,7 +545,7 @@ public class CheckController extends AbstractBaseController { ...@@ -572,7 +545,7 @@ public class CheckController extends AbstractBaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "保存检查记录", notes = "保存检查记录") @ApiOperation(value = "保存检查记录", notes = "保存检查记录")
@RequestMapping(value = "/saveRecord", produces = "application/json;charset=UTF-8", method = RequestMethod.POST) @RequestMapping(value = "/saveRecord", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public ResponseModel saveSupervisionCheckRecord( @ApiParam(value = "检查信息", required = false) @RequestBody(required = true) CheckRecordParam requestParam) { public ResponseModel saveSupervisionCheckRecord(@ApiParam(value = "检查信息", required = false) @RequestBody(required = true) CheckRecordParam requestParam) {
try { try {
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
String orgCode = getOrgCode(reginParams); String orgCode = getOrgCode(reginParams);
...@@ -585,4 +558,26 @@ public class CheckController extends AbstractBaseController { ...@@ -585,4 +558,26 @@ public class CheckController extends AbstractBaseController {
} }
} }
/**
* 分页查询检查项
*
* @param queryRequests
* @param pageable
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "分页查询检查记录", notes = "分页查询检查记录")
@RequestMapping(value = "/queryPage", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse queryPage(
@ApiParam(value = "组合查询条件", required = false, defaultValue = "[]") @RequestBody(required = false) List<CommonRequest> queryRequests,
@ApiParam(value = "分页参数", required = false, defaultValue = "current=0&pageSize=10或pageNumber0&pageSize=10") CommonPageable pageable) {
ReginParams reginParams = getSelectedOrgInfo();
String loginOrgCode = getOrgCode(reginParams);
HashMap<String, Object> paramMap = new HashMap<String, Object>();
paramMap.put("orgCode", loginOrgCode);
CheckPageParam criterias = CheckParamUtil.fillCheckPageParam(queryRequests, pageable, paramMap);
Page<CheckVo> page = checkService.queryPage(criterias);
return CommonResponseUtil.success(page);
}
} }
...@@ -91,4 +91,23 @@ public class RoutePointItemController extends AbstractBaseController { ...@@ -91,4 +91,23 @@ public class RoutePointItemController extends AbstractBaseController {
Page<RoutePointItemVo> page = routePointItemService.queryPage(criterias); Page<RoutePointItemVo> page = routePointItemService.queryPage(criterias);
return CommonResponseUtil.success(page); return CommonResponseUtil.success(page);
} }
/**
* 删除巡检路线点项关系
*
* @param ids
* @return CommonResponse
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "删除巡检路线点项关系", notes = "删除巡检路线点项关系")
@PostMapping(value = "/deleteByIdIn", produces = "application/json;charset=UTF-8")
public CommonResponse deleteByIdIn(@ApiParam(value = "ids", required = true) @RequestParam List<Long> ids) {
try {
routePointItemService.deleteByIdIn(ids);
return CommonResponseUtil.success();
} catch (Exception e) {
log.error(e.getMessage(), e);
return CommonResponseUtil.failure("删除巡检路线点项关系失败!");
}
}
} }
package com.yeejoin.amos.supervision.business.dao.mapper; package com.yeejoin.amos.supervision.business.dao.mapper;
import java.util.HashMap; import com.yeejoin.amos.supervision.business.entity.mybatis.*;
import java.util.List; import com.yeejoin.amos.supervision.business.param.*;
import java.util.Map;
import com.yeejoin.amos.supervision.business.param.CheckStatisticalParam;
import com.yeejoin.amos.supervision.business.util.CheckDetailInputPageParam; import com.yeejoin.amos.supervision.business.util.CheckDetailInputPageParam;
import org.apache.ibatis.annotations.Param;
import com.yeejoin.amos.supervision.business.entity.mybatis.CheckDetailBo;
import com.yeejoin.amos.supervision.business.entity.mybatis.CheckInfoBo;
import com.yeejoin.amos.supervision.business.entity.mybatis.CheckInputBo;
import com.yeejoin.amos.supervision.business.entity.mybatis.CheckTraListBo;
import com.yeejoin.amos.supervision.business.entity.mybatis.CheckUserBo;
import com.yeejoin.amos.supervision.business.param.CheckInfoListPageParam;
import com.yeejoin.amos.supervision.business.param.CheckInfoPageParam;
import com.yeejoin.amos.supervision.business.param.CheckPtListPageParam;
import com.yeejoin.amos.supervision.business.param.CheckRecordParam;
import com.yeejoin.amos.supervision.business.vo.CheckAnalysisVo; import com.yeejoin.amos.supervision.business.vo.CheckAnalysisVo;
import com.yeejoin.amos.supervision.business.vo.CheckInfoVo; import com.yeejoin.amos.supervision.business.vo.CheckInfoVo;
import com.yeejoin.amos.supervision.business.vo.CheckVo;
import com.yeejoin.amos.supervision.core.common.response.PointCheckInfoBusinessRespone; import com.yeejoin.amos.supervision.core.common.response.PointCheckInfoBusinessRespone;
import com.yeejoin.amos.supervision.core.common.response.PointCheckInfoRespone; import com.yeejoin.amos.supervision.core.common.response.PointCheckInfoRespone;
import com.yeejoin.amos.supervision.business.entity.mybatis.PlanRoutePointBo; import org.apache.ibatis.annotations.Param;
import com.yeejoin.amos.supervision.business.entity.mybatis.PointCheckDetailBo;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public interface CheckMapper extends BaseMapper { public interface CheckMapper extends BaseMapper {
...@@ -30,40 +20,43 @@ public interface CheckMapper extends BaseMapper { ...@@ -30,40 +20,43 @@ public interface CheckMapper extends BaseMapper {
List<CheckInfoVo> getCheckInfo(CheckInfoPageParam param); List<CheckInfoVo> getCheckInfo(CheckInfoPageParam param);
List<Map> queryUnqualifiedInputItem(@Param(value="checkId") int checkId); List<Map> queryUnqualifiedInputItem(@Param(value = "checkId") int checkId);
List<Map> queryCheckPointInputItem(@Param(value="planTaskId") int planTaskId, @Param(value="pointId") int pointId); List<Map> queryCheckPointInputItem(@Param(value = "planTaskId") int planTaskId, @Param(value = "pointId") int pointId);
List<PointCheckDetailBo> findCheckPointInputItem(@Param(value="checkId") long checkId); List<PointCheckDetailBo> findCheckPointInputItem(@Param(value = "checkId") long checkId);
int checkHasRecord(CheckRecordParam requestParam); int checkHasRecord(CheckRecordParam requestParam);
List<Map<String, Object>> queryCheckPointImgs(@Param(value="planTaskId") int planTaskId, @Param(value="pointId") int pointId); List<Map<String, Object>> queryCheckPointImgs(@Param(value = "planTaskId") int planTaskId, @Param(value = "pointId") int pointId);
/** /**
* 巡检日历饼图数据 * 巡检日历饼图数据
*
* @param param * @param param
* @return * @return
*/ */
Map<String,Object> pieChartData(CheckRecordParam param); Map<String, Object> pieChartData(CheckRecordParam param);
/** /**
* 巡检日历日历数据 * 巡检日历日历数据
*
* @param param * @param param
* @return * @return
*/ */
List<Map<String,Object>> calendarData(CheckRecordParam param); List<Map<String, Object>> calendarData(CheckRecordParam param);
List<Map<String, Object>> queryRecordByPointId(HashMap<String, Object> req); List<Map<String, Object>> queryRecordByPointId(HashMap<String, Object> req);
Map<String, Object> queryCheckById(@Param(value="checkId") int checkId); Map<String, Object> queryCheckById(@Param(value = "checkId") int checkId);
List<Map<String, Object>> queryCheckInputItems(@Param(value="checkId") int checkId); List<Map<String, Object>> queryCheckInputItems(@Param(value = "checkId") int checkId);
List<Map<String, Object>> queryCheckImgs(@Param(value="checkId") int checkId); List<Map<String, Object>> queryCheckImgs(@Param(value = "checkId") int checkId);
/** /**
* 查询所有巡检记录图片 * 查询所有巡检记录图片
*
* @param param * @param param
* @return * @return
*/ */
...@@ -71,20 +64,23 @@ public interface CheckMapper extends BaseMapper { ...@@ -71,20 +64,23 @@ public interface CheckMapper extends BaseMapper {
/** /**
* 根据巡检记录id获取所有图片 * 根据巡检记录id获取所有图片
*
* @param ids * @param ids
* @return * @return
*/ */
List<Map<String, Object>> getCheckInfoImgsByCheckIdsList(@Param(value="checkIds") Long[] ids); List<Map<String, Object>> getCheckInfoImgsByCheckIdsList(@Param(value = "checkIds") Long[] ids);
/** /**
* 根据ids获取巡检记录 * 根据ids获取巡检记录
*
* @param ids * @param ids
* @return * @return
*/ */
List<CheckInfoVo> getSelectedCheckInfoList(@Param(value="checkIds") Long[] ids); List<CheckInfoVo> getSelectedCheckInfoList(@Param(value = "checkIds") Long[] ids);
/** /**
* 月巡检情况统计 * 月巡检情况统计
*
* @param param * @param param
* @return * @return
*/ */
...@@ -92,6 +88,7 @@ public interface CheckMapper extends BaseMapper { ...@@ -92,6 +88,7 @@ public interface CheckMapper extends BaseMapper {
/** /**
* 月巡检情况统计 * 月巡检情况统计
*
* @return * @return
*/ */
List<HashMap<String, Object>> getCountMonthChkNew(); List<HashMap<String, Object>> getCountMonthChkNew();
...@@ -129,7 +126,6 @@ public interface CheckMapper extends BaseMapper { ...@@ -129,7 +126,6 @@ public interface CheckMapper extends BaseMapper {
long countCheckInputByMybatis(@Param(value = "checkID") Long checkID); long countCheckInputByMybatis(@Param(value = "checkID") Long checkID);
/** /**
* 根据巡检记录ID查询装备个数 * 根据巡检记录ID查询装备个数
* *
...@@ -152,7 +148,7 @@ public interface CheckMapper extends BaseMapper { ...@@ -152,7 +148,7 @@ public interface CheckMapper extends BaseMapper {
* @param param * @param param
* @return * @return
*/ */
List<HashMap<String,Object>> getEquipInputByCheckId(CheckDetailInputPageParam param); List<HashMap<String, Object>> getEquipInputByCheckId(CheckDetailInputPageParam param);
/** /**
* 根据巡检记录ID查询巡检装备 * 根据巡检记录ID查询巡检装备
...@@ -160,14 +156,16 @@ public interface CheckMapper extends BaseMapper { ...@@ -160,14 +156,16 @@ public interface CheckMapper extends BaseMapper {
* @param checkID * @param checkID
* @return * @return
*/ */
List<HashMap<String,Object>> getCheckEquipByCheckID(Long checkID); List<HashMap<String, Object>> getCheckEquipByCheckID(Long checkID);
/** /**
* 根据巡检记录ID获取图片信息 * 根据巡检记录ID获取图片信息
* *
* @param param * @param param
* @return * @return
*/ */
List<HashMap<String,Object>> getEquipInfoImgsByCheckIdsList(Long checkID); List<HashMap<String, Object>> getEquipInfoImgsByCheckIdsList(Long checkID);
/** /**
* 根据巡检记录ID和点ID获取巡检记录详情 * 根据巡检记录ID和点ID获取巡检记录详情
* *
...@@ -202,6 +200,7 @@ public interface CheckMapper extends BaseMapper { ...@@ -202,6 +200,7 @@ public interface CheckMapper extends BaseMapper {
/** /**
* 根据检查id获取检查信息 * 根据检查id获取检查信息
*
* @param checkId * @param checkId
* @return * @return
*/ */
...@@ -209,6 +208,7 @@ public interface CheckMapper extends BaseMapper { ...@@ -209,6 +208,7 @@ public interface CheckMapper extends BaseMapper {
/** /**
* 计划路线点最新巡检记录查询 * 计划路线点最新巡检记录查询
*
* @param params * @param params
* @return * @return
*/ */
...@@ -216,6 +216,7 @@ public interface CheckMapper extends BaseMapper { ...@@ -216,6 +216,7 @@ public interface CheckMapper extends BaseMapper {
/** /**
* 计划路线点最新巡检记录分页统计用 * 计划路线点最新巡检记录分页统计用
*
* @param params * @param params
* @return * @return
*/ */
...@@ -228,6 +229,7 @@ public interface CheckMapper extends BaseMapper { ...@@ -228,6 +229,7 @@ public interface CheckMapper extends BaseMapper {
* @return * @return
*/ */
long countCheckInfoListData(CheckInfoListPageParam params); long countCheckInfoListData(CheckInfoListPageParam params);
long countCheckInfoListData1(CheckInfoListPageParam params); long countCheckInfoListData1(CheckInfoListPageParam params);
/** /**
...@@ -238,15 +240,18 @@ public interface CheckMapper extends BaseMapper { ...@@ -238,15 +240,18 @@ public interface CheckMapper extends BaseMapper {
*/ */
List<CheckInfoBo> getCheckInfoList(CheckInfoListPageParam params); List<CheckInfoBo> getCheckInfoList(CheckInfoListPageParam params);
List<Map<String,Object>> getCheckInfoList1(CheckInfoListPageParam params); List<Map<String, Object>> getCheckInfoList1(CheckInfoListPageParam params);
/** /**
* 查询点及线路信息 * 查询点及线路信息
*
* @return * @return
*/ */
public List<Map<String,Object>> getRoutesAndPointsInfo(); public List<Map<String, Object>> getRoutesAndPointsInfo();
/** /**
* 巡检情况统计分析 * 巡检情况统计分析
*
* @param param * @param param
* @return * @return
*/ */
...@@ -254,6 +259,7 @@ public interface CheckMapper extends BaseMapper { ...@@ -254,6 +259,7 @@ public interface CheckMapper extends BaseMapper {
/** /**
* 根据orgCode查询公司累计巡检次数 * 根据orgCode查询公司累计巡检次数
*
* @param loginOrgCode * @param loginOrgCode
* @return * @return
*/ */
...@@ -261,6 +267,7 @@ public interface CheckMapper extends BaseMapper { ...@@ -261,6 +267,7 @@ public interface CheckMapper extends BaseMapper {
/** /**
* 根据条件查询日巡检次数 * 根据条件查询日巡检次数
*
* @param param * @param param
* @return * @return
*/ */
...@@ -271,7 +278,7 @@ public interface CheckMapper extends BaseMapper { ...@@ -271,7 +278,7 @@ public interface CheckMapper extends BaseMapper {
List<String> getLivePhotos(@Param(value = "checkId") Long checkID); List<String> getLivePhotos(@Param(value = "checkId") Long checkID);
List<String> getPhotosByCheckIDAndInputId(@Param(value = "checkId") int checkId, @Param(value = "checkInputId")int checkInputId, @Param(value = "classifyId")int classifyId); List<String> getPhotosByCheckIDAndInputId(@Param(value = "checkId") int checkId, @Param(value = "checkInputId") int checkInputId, @Param(value = "classifyId") int classifyId);
List<Long> getPlanCheckDataCount(HashMap<String, Object> param); List<Long> getPlanCheckDataCount(HashMap<String, Object> param);
...@@ -285,4 +292,7 @@ public interface CheckMapper extends BaseMapper { ...@@ -285,4 +292,7 @@ public interface CheckMapper extends BaseMapper {
int checkHasRecord(@Param(value = "planTaskId") Long planTaskId, @Param(value = "pointId") Long pointId); int checkHasRecord(@Param(value = "planTaskId") Long planTaskId, @Param(value = "pointId") Long pointId);
long queryPageCount(CheckPageParam param);
List<CheckVo> queryPage(CheckPageParam param);
} }
...@@ -7,9 +7,9 @@ import com.yeejoin.amos.supervision.dao.entity.RoutePointItem; ...@@ -7,9 +7,9 @@ import com.yeejoin.amos.supervision.dao.entity.RoutePointItem;
import java.util.List; import java.util.List;
public interface RoutePointItemMapper extends BaseMapper{ public interface RoutePointItemMapper extends BaseMapper {
public void updateRoutePointItem( RoutePointItem pointItem); public void updateRoutePointItem(RoutePointItem pointItem);
int delRoutePointItemByRouteId(Long routeId); int delRoutePointItemByRouteId(Long routeId);
......
...@@ -22,7 +22,7 @@ public interface IRoutePointItemDao extends BaseDao<RoutePointItem, Long> { ...@@ -22,7 +22,7 @@ public interface IRoutePointItemDao extends BaseDao<RoutePointItem, Long> {
@Modifying @Modifying
@Transactional @Transactional
@Query(value = "delete from p_route_point_item WHERE id in (?1)", nativeQuery = true) @Query(value = "delete from p_route_point_item WHERE id in (?1)", nativeQuery = true)
void deleteByRoutePointItemId(List<Long> delRoutePointItemIds); int deleteByRoutePointItemId(List<Long> delRoutePointItemIds);
@Modifying @Modifying
@Transactional @Transactional
......
package com.yeejoin.amos.supervision.business.param;
import com.yeejoin.amos.supervision.core.common.request.CommonPageable;
import lombok.Data;
@Data
public class CheckPageParam extends CommonPageable {
private Long planId;
private Long companyId;
private String orgCode;
}
...@@ -13,6 +13,8 @@ public class InputItemPageParam extends CommonPageable { ...@@ -13,6 +13,8 @@ public class InputItemPageParam extends CommonPageable {
private String itemNo; private String itemNo;
private String checkTypeId; private String checkTypeId;
private String itemStart; private String itemStart;
private Long planId;
private String itemTypeClassifyIds;
/** /**
* 机构 * 机构
*/ */
...@@ -111,4 +113,20 @@ public class InputItemPageParam extends CommonPageable { ...@@ -111,4 +113,20 @@ public class InputItemPageParam extends CommonPageable {
public void setItemStart(String itemStart) { public void setItemStart(String itemStart) {
this.itemStart = itemStart; this.itemStart = itemStart;
} }
public Long getPlanId() {
return planId;
}
public void setPlanId(Long planId) {
this.planId = planId;
}
public String getItemTypeClassifyIds() {
return itemTypeClassifyIds;
}
public void setItemTypeClassifyIds(String itemTypeClassifyIds) {
this.itemTypeClassifyIds = itemTypeClassifyIds;
}
} }
...@@ -52,7 +52,7 @@ public class RoutePointItemServiceImpl implements IRoutePointItemService { ...@@ -52,7 +52,7 @@ public class RoutePointItemServiceImpl implements IRoutePointItemService {
if (status) { if (status) {
planDao.updatePlanStatus(PlanStatusEnum.EXAMINE_DEVELOPED.getValue(), planId); planDao.updatePlanStatus(PlanStatusEnum.EXAMINE_DEVELOPED.getValue(), planId);
} }
routePointItemDao.deleteByPlanId(planId); // routePointItemDao.deleteByPlanId(planId);
List<InputItem> inputItemList = inputItemMapper.findByIdIn(inputItemIds); List<InputItem> inputItemList = inputItemMapper.findByIdIn(inputItemIds);
List<RoutePoint> routePointList = routePointDao.findByRouteId(routeId); List<RoutePoint> routePointList = routePointDao.findByRouteId(routeId);
if (CollectionUtils.isNotEmpty(inputItemList) && CollectionUtils.isNotEmpty(routePointList)) { if (CollectionUtils.isNotEmpty(inputItemList) && CollectionUtils.isNotEmpty(routePointList)) {
...@@ -84,4 +84,12 @@ public class RoutePointItemServiceImpl implements IRoutePointItemService { ...@@ -84,4 +84,12 @@ public class RoutePointItemServiceImpl implements IRoutePointItemService {
Page<RoutePointItemVo> result = new PageImpl<RoutePointItemVo>(content, param, total); Page<RoutePointItemVo> result = new PageImpl<RoutePointItemVo>(content, param, total);
return result; return result;
} }
@Override
public Integer deleteByIdIn(List<Long> ids) {
if (CollectionUtils.isNotEmpty(ids)) {
return routePointItemDao.deleteByRoutePointItemId(ids);
}
return 0;
}
} }
package com.yeejoin.amos.supervision.business.service.intfc; package com.yeejoin.amos.supervision.business.service.intfc;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.supervision.business.vo.CheckAnalysisVo;
import com.yeejoin.amos.supervision.business.vo.CheckInfoVo;
import com.yeejoin.amos.supervision.core.common.request.CommonPageable;
import com.yeejoin.amos.supervision.exception.YeeException;
import org.springframework.data.domain.Page;
import org.springframework.transaction.annotation.Transactional;
import com.yeejoin.amos.boot.biz.common.bo.DepartmentBo;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.supervision.business.dto.CheckDto; import com.yeejoin.amos.supervision.business.dto.CheckDto;
import com.yeejoin.amos.supervision.business.dto.CheckRecordDto; import com.yeejoin.amos.supervision.business.dto.CheckRecordDto;
import com.yeejoin.amos.supervision.business.entity.mybatis.CheckDetailBo; import com.yeejoin.amos.supervision.business.entity.mybatis.*;
import com.yeejoin.amos.supervision.business.entity.mybatis.CheckInfoBo; import com.yeejoin.amos.supervision.business.param.*;
import com.yeejoin.amos.supervision.business.entity.mybatis.CheckInputBo;
import com.yeejoin.amos.supervision.business.entity.mybatis.CheckTraListBo;
import com.yeejoin.amos.supervision.business.entity.mybatis.CheckUserBo;
import com.yeejoin.amos.supervision.business.entity.mybatis.PlanRoutePointBo;
import com.yeejoin.amos.supervision.business.param.CheckInfoListPageParam;
import com.yeejoin.amos.supervision.business.param.CheckInfoPageParam;
import com.yeejoin.amos.supervision.business.param.CheckPtListPageParam;
import com.yeejoin.amos.supervision.business.param.CheckRecordParam;
import com.yeejoin.amos.supervision.business.param.CheckStatisticalParam;
import com.yeejoin.amos.supervision.business.util.CheckDetailInputPageParam; import com.yeejoin.amos.supervision.business.util.CheckDetailInputPageParam;
import com.yeejoin.amos.supervision.business.util.Toke; import com.yeejoin.amos.supervision.business.vo.CheckAnalysisVo;
import com.yeejoin.amos.supervision.business.vo.CheckInfoVo;
import com.yeejoin.amos.supervision.business.vo.CheckVo;
import com.yeejoin.amos.supervision.core.common.request.CommonPageable;
import com.yeejoin.amos.supervision.core.common.response.AppPointCheckRespone; import com.yeejoin.amos.supervision.core.common.response.AppPointCheckRespone;
import com.yeejoin.amos.supervision.core.common.response.CommonPage; import com.yeejoin.amos.supervision.core.common.response.CommonPage;
import com.yeejoin.amos.supervision.core.common.response.GraphInitDataResponse; import com.yeejoin.amos.supervision.core.common.response.GraphInitDataResponse;
import com.yeejoin.amos.supervision.core.common.response.QueryCriteriaRespone; import com.yeejoin.amos.supervision.core.common.response.QueryCriteriaRespone;
import com.yeejoin.amos.supervision.dao.entity.CheckShot; import com.yeejoin.amos.supervision.dao.entity.CheckShot;
import com.yeejoin.amos.supervision.exception.YeeException;
import org.springframework.data.domain.Page;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public interface ICheckService { public interface ICheckService {
/** /**
...@@ -65,9 +53,9 @@ public interface ICheckService { ...@@ -65,9 +53,9 @@ public interface ICheckService {
*/ */
List<Map> queryUnqualifiedInputItem(int checkId); List<Map> queryUnqualifiedInputItem(int checkId);
AppPointCheckRespone queryCheckPointDetail(String toke,String product,String appKey,long checkId); AppPointCheckRespone queryCheckPointDetail(String toke, String product, String appKey, long checkId);
AppPointCheckRespone queryCheckPointDetailInVersion2(String toke,String product,String appKey,long checkId); AppPointCheckRespone queryCheckPointDetailInVersion2(String toke, String product, String appKey, long checkId);
/** /**
* 巡检统计 * 巡检统计
...@@ -93,7 +81,7 @@ public interface ICheckService { ...@@ -93,7 +81,7 @@ public interface ICheckService {
*/ */
Map<String, Object> queryRecordById(int checkId); Map<String, Object> queryRecordById(int checkId);
List<CheckInfoVo> getCheckInfoList(String toke,String product,String appKey,CheckInfoPageParam param); List<CheckInfoVo> getCheckInfoList(String toke, String product, String appKey, CheckInfoPageParam param);
/** /**
* 查询巡检记录所有图片 * 查询巡检记录所有图片
...@@ -117,7 +105,7 @@ public interface ICheckService { ...@@ -117,7 +105,7 @@ public interface ICheckService {
* @param ids * @param ids
* @return * @return
*/ */
List<CheckInfoVo> getSelectedCheckInfoList(String toke,String product,String appKey,Long[] ids); List<CheckInfoVo> getSelectedCheckInfoList(String toke, String product, String appKey, Long[] ids);
/** /**
* 本月隐患治理趋势统计 * 本月隐患治理趋势统计
...@@ -135,7 +123,7 @@ public interface ICheckService { ...@@ -135,7 +123,7 @@ public interface ICheckService {
* @param userInfo * @param userInfo
* @return * @return
*/ */
QueryCriteriaRespone getQueryCriteriaInit(String toke,String product,String appKey,String loginOrgCode, String roleTypeName, String departmentId, String companyId); QueryCriteriaRespone getQueryCriteriaInit(String toke, String product, String appKey, String loginOrgCode, String roleTypeName, String departmentId, String companyId);
List<HashMap<String, String>> getCalCountChkInfo(HashMap<String, Object> paramMap); List<HashMap<String, String>> getCalCountChkInfo(HashMap<String, Object> paramMap);
...@@ -161,7 +149,8 @@ public interface ICheckService { ...@@ -161,7 +149,8 @@ public interface ICheckService {
* @param param * @param param
* @return * @return
*/ */
List<HashMap<String,Object>> getEquipInputByCheckId(CheckDetailInputPageParam param); List<HashMap<String, Object>> getEquipInputByCheckId(CheckDetailInputPageParam param);
/** /**
* 根据巡检记录ID和巡检点ID获取巡检记录详情 * 根据巡检记录ID和巡检点ID获取巡检记录详情
* *
...@@ -202,7 +191,7 @@ public interface ICheckService { ...@@ -202,7 +191,7 @@ public interface ICheckService {
* @param user * @param user
* @return * @return
*/ */
QueryCriteriaRespone findCheckSystemInit(String toke,String product,String appKey,String type, String orgCode, String roleTypeName, String departmentId, String companyId); QueryCriteriaRespone findCheckSystemInit(String toke, String product, String appKey, String type, String orgCode, String roleTypeName, String departmentId, String companyId);
/** /**
* 巡检记录查询 * 巡检记录查询
...@@ -212,7 +201,7 @@ public interface ICheckService { ...@@ -212,7 +201,7 @@ public interface ICheckService {
*/ */
Page<CheckInfoBo> getCheckInfoList(CheckInfoListPageParam params); Page<CheckInfoBo> getCheckInfoList(CheckInfoListPageParam params);
Page<Map<String, Object>> getCheckInfoList1(String toke,String product,String appKey,CheckInfoListPageParam params); Page<Map<String, Object>> getCheckInfoList1(String toke, String product, String appKey, CheckInfoListPageParam params);
/** /**
* 视图模块初始化数据 * 视图模块初始化数据
...@@ -245,25 +234,27 @@ public interface ICheckService { ...@@ -245,25 +234,27 @@ public interface ICheckService {
*/ */
List<Long> getCheckDataCount(HashMap<String, Object> param); List<Long> getCheckDataCount(HashMap<String, Object> param);
List<String> getCheckPhotosByCheckAndInputId(int checkId, int checkInputId,int classifyId); List<String> getCheckPhotosByCheckAndInputId(int checkId, int checkInputId, int classifyId);
List<String> getLivePhotos(Long checkID); List<String> getLivePhotos(Long checkID);
List<Long> getPlanCheckDataCount(HashMap<String, Object> param); List<Long> getPlanCheckDataCount(HashMap<String, Object> param);
/** /**
* 查询巡检装备 * 查询巡检装备
* *
* @param param * @param param
* @return * @return
*/ */
List<HashMap<String,Object>> getEquipByCheckId(CheckDetailInputPageParam param); List<HashMap<String, Object>> getEquipByCheckId(CheckDetailInputPageParam param);
/** /**
* 最近一次漏检记录 * 最近一次漏检记录
*
* @param relationId 关系id * @param relationId 关系id
* @return CheckRecordDto * @return CheckRecordDto
*/ */
Map<String,CheckRecordDto> obtainLastCheckRecord(String[] relationId); Map<String, CheckRecordDto> obtainLastCheckRecord(String[] relationId);
Page<HashMap<String, Object>> getPlanExecuteInfo(HashMap<String, Object> map, CommonPageable page); Page<HashMap<String, Object>> getPlanExecuteInfo(HashMap<String, Object> map, CommonPageable page);
...@@ -273,6 +264,7 @@ public interface ICheckService { ...@@ -273,6 +264,7 @@ public interface ICheckService {
/** /**
* 保存检查记录 * 保存检查记录
*
* @param recordParam 填写记录 * @param recordParam 填写记录
* @param reginParams 权限信息 * @param reginParams 权限信息
* @return CheckDto * @return CheckDto
...@@ -281,9 +273,12 @@ public interface ICheckService { ...@@ -281,9 +273,12 @@ public interface ICheckService {
/** /**
* 校验是否已经填写过 * 校验是否已经填写过
*
* @param planTaskId * @param planTaskId
* @param pointId * @param pointId
* @return * @return
*/ */
int checkHasRecord(Long planTaskId, Long pointId); int checkHasRecord(Long planTaskId, Long pointId);
Page<CheckVo> queryPage(CheckPageParam criterias);
} }
...@@ -13,4 +13,6 @@ public interface IRoutePointItemService { ...@@ -13,4 +13,6 @@ public interface IRoutePointItemService {
List<RoutePointItem> addRoutePointItemList(Plan plan, List<Long> inputItemIds, Boolean status, String userId); List<RoutePointItem> addRoutePointItemList(Plan plan, List<Long> inputItemIds, Boolean status, String userId);
Page<RoutePointItemVo> queryPage(InputItemPageParam criterias); Page<RoutePointItemVo> queryPage(InputItemPageParam criterias);
Integer deleteByIdIn(List<Long> ids);
} }
package com.yeejoin.amos.supervision.business.util; package com.yeejoin.amos.supervision.business.util;
import java.text.SimpleDateFormat; import com.yeejoin.amos.supervision.business.param.CheckPageParam;
import java.util.List;
import com.yeejoin.amos.supervision.business.param.CheckRecordParam; import com.yeejoin.amos.supervision.business.param.CheckRecordParam;
import com.yeejoin.amos.supervision.core.common.request.CommonPageable;
import com.yeejoin.amos.supervision.core.common.request.CommonRequest;
import com.yeejoin.amos.supervision.core.enums.QueryOperatorEnum; import com.yeejoin.amos.supervision.core.enums.QueryOperatorEnum;
import org.springframework.util.ObjectUtils;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.List;
public class CheckParamUtil { public class CheckParamUtil {
public static CheckRecordParam checkCalendar(List<DaoCriteria> daoCriterias){ public static CheckRecordParam checkCalendar(List<DaoCriteria> daoCriterias) {
CheckRecordParam param = new CheckRecordParam(); CheckRecordParam param = new CheckRecordParam();
for(int i=0;i<daoCriterias.size();i++){ for (int i = 0; i < daoCriterias.size(); i++) {
DaoCriteria daoCriteria = daoCriterias.get(i); DaoCriteria daoCriteria = daoCriterias.get(i);
String operator = daoCriteria.getOperator(); String operator = daoCriteria.getOperator();
String name = daoCriteria.getPropertyName(); String name = daoCriteria.getPropertyName();
if("checkTime".equals(name)){ if ("checkTime".equals(name)) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
param.setCheckTime(daoCriterias.get(i).getValue().toString()); param.setCheckTime(daoCriterias.get(i).getValue().toString());
}else if("routeId".equals(name)){ } else if ("routeId".equals(name)) {
param.setRouteId(Long.valueOf(daoCriterias.get(i).getValue().toString())); param.setRouteId(Long.valueOf(daoCriterias.get(i).getValue().toString()));
}else if("orgCode".equals(name) && operator.equals(QueryOperatorEnum.EQUAL.getName())){ } else if ("orgCode".equals(name) && operator.equals(QueryOperatorEnum.EQUAL.getName())) {
param.setOrgCode(daoCriterias.get(i).getValue().toString()+"%"); param.setOrgCode(daoCriterias.get(i).getValue().toString() + "%");
}
}
return param;
}
public static CheckPageParam fillCheckPageParam(List<CommonRequest> queryRequests, CommonPageable commonPageable,
HashMap<String, Object> perMap) {
CheckPageParam param = new CheckPageParam();
if (queryRequests != null && !queryRequests.isEmpty()) {
for (int i = 0; i < queryRequests.size(); i++) {
String name = queryRequests.get(i).getName();
if (ObjectUtils.isEmpty(queryRequests.get(i).getValue())) {
continue;
}
if ("planId".equals(name)) {
param.setPlanId(Long.parseLong(queryRequests.get(i).getValue().toString()));
} else if ("companyId".equals(name)) {
param.setCompanyId(Long.parseLong(queryRequests.get(i).getValue().toString()));
}
}
} }
param.setOrgCode(perMap.get("orgCode").toString());
if (commonPageable != null) {
param.setOffset(Integer.parseInt(String.valueOf(commonPageable.getOffset())));
param.setPageNumber(commonPageable.getPageNumber());
param.setPageSize(commonPageable.getPageSize());
} }
return param; return param;
......
...@@ -60,6 +60,10 @@ public class InputItemParamUtil { ...@@ -60,6 +60,10 @@ public class InputItemParamUtil {
param.setCheckTypeId(toString(queryRequests.get(i).getValue())); param.setCheckTypeId(toString(queryRequests.get(i).getValue()));
} else if ("itemStart".equals(name)) { } else if ("itemStart".equals(name)) {
param.setItemStart(toString(queryRequests.get(i).getValue())); param.setItemStart(toString(queryRequests.get(i).getValue()));
} else if ("planId".equals(name)) {
param.setPlanId(Long.parseLong(queryRequests.get(i).getValue().toString()));
} else if ("itemTypeClassifyIds".equals(name)) {
param.setItemTypeClassifyIds(toString(queryRequests.get(i).getValue()));
} }
} }
} }
......
package com.yeejoin.amos.supervision.business.vo;
import lombok.Data;
import java.util.Date;
@Data
public class CheckVo {
/**
* 检查项ID
*/
private Long inputItemId;
/**
* 检查项名称
*/
private String inputItemName;
/**
* 安全隐患个数
*/
private Integer safetyDangerNum;
/**
* 重大隐患个数
*/
private Integer majorDangerNum;
/**
* 检查时间
*/
private Date checkTime;
/**
* 检查人
*/
private String userName;
/**
* 责任单位ID
*/
private String companyId;
/**
* 责任单位
*/
private String companyName;
/**
* 扩展属性
*/
private String ext;
}
package com.yeejoin.amos.supervision.business.vo; package com.yeejoin.amos.supervision.business.vo;
import java.util.Date; import lombok.Data;
@Data
public class RoutePointItemVo { public class RoutePointItemVo {
private Long id;
/** /**
* 检查项ID * 检查项ID
*/ */
private Long inputItemId; private Long itemId;
/** /**
* 检查项名称 * 检查项名称
*/ */
private String inputItemName; private String itemName;
private String itemType;
/** private String inputClassify;
* 安全隐患个数 private String checkType;
*/ private String itemClassify;
private Integer safetyDangerNum; private String itemTypeClassify;
private String itemLevel;
/**
* 重大隐患个数
*/
private Integer majorDangerNum;
/**
* 检查时间
*/
private Date checkTime;
/**
* 检查人
*/
private String userName;
/**
* 责任单位
*/
private String companyName;
/**
* 扩展属性
*/
private String ext;
} }
\ No newline at end of file
...@@ -324,6 +324,7 @@ ...@@ -324,6 +324,7 @@
'调派任务状态(执行中:executing,已完成:finished)'; '调派任务状态(执行中:executing,已完成:finished)';
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="chenhao" id="2021-09-13-chenhao-1"> <changeSet author="chenhao" id="2021-09-13-chenhao-1">
<comment>update data cb_firefighters_workexperience</comment> <comment>update data cb_firefighters_workexperience</comment>
<sql> <sql>
...@@ -341,4 +342,119 @@ ...@@ -341,4 +342,119 @@
ALTER TABLE `cb_firefighters` add residence_detail_val varchar(255) COMMENT '现居住地详细地址'; ALTER TABLE `cb_firefighters` add residence_detail_val varchar(255) COMMENT '现居住地详细地址';
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="chenzhao" id="2021-09-07-chenzhao">
<preConditions onFail="MARK_RAN">
<tableExists tableName="cb_data_dictionary" />
<primaryKeyExists primaryKeyName="sequence_nbr" tableName="cb_data_dictionary"/>
</preConditions>
<comment>add data cb_data_dictionary</comment>
<sql>
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1173,'394','GTC屋顶','GISDT','http://172.19.80.22:6080/arcgis/rest/services/ZLXY/GTCWD_BASE_ZLXY/MapServer');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1174,'386','T1航站楼二层','GISDT','http://172.19.80.22:6080/arcgis/rest/services/ZLXY/T1F2_BASE_ZLXY1/MapServer');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1175,'397','T1航站楼一层','GISDT','http://172.19.80.22:6080/arcgis/rest/services/ZLXY/T1F1_BASE_ZLXY1/MapServer');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1176,'387','T2航站楼二层','GISDT','http://172.19.80.22:6080/arcgis/rest/services/ZLXY/T2F2_BASE_ZLXY/MapServer');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1177,'398','T2航站楼地下一层','GISDT','http://172.19.80.22:6080/arcgis/rest/services/ZLXY/T2B1_BASE_ZLXY/MapServer');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1178,'399','T2航站楼一层','GISDT','http://172.19.80.22:6080/arcgis/rest/services/ZLXY/T2F1_BASE_ZLXY/MapServer');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1179,'400','T2航站楼一层夹层','GISDT','http://172.19.80.22:6080/arcgis/rest/services/ZLXY/T2F1J_BASE_ZLXY/MapServer');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1180,'965','南指廊二层夹层','GISDT','http://172.19.80.22:6080/arcgis/rest/services/ZLXY/NZLF2J_BASE_ZLXY/MapServer');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1181,'389','南指廊二层','GISDT','http://172.19.80.22:6080/arcgis/rest/services/ZLXY/NZLF2_BASE_ZLXY/MapServer');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1182,'867','南指廊一层','GISDT','http://172.19.80.22:6080/arcgis/rest/services/ZLXY/NZLF1_BASE_ZLXY/MapServer');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1183,'412','T3航站楼二层夹层','GISDT','http://172.19.80.22:6080/arcgis/rest/services/ZLXY/T3F2J_BASE_LT/MapServer');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1184,'411','T3航站楼二层','GISDT','http://172.19.80.22:6080/arcgis/rest/services/ZLXY/T3F2_BASE_ZLXY1/MapServer');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1185,'410','T3航站楼一层夹层','GISDT','http://172.19.80.22:6080/arcgis/rest/services/ZLXY/T3F1J_BASE_ZLXY/MapServer');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1186,'409','T3航站楼一层','GISDT','http://172.19.80.22:6080/arcgis/rest/services/ZLXY/T3F1_BASE_ZLXY1/MapServer');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1187,'407','T3航站楼地下一层','GISDT','http://172.19.80.22:6080/arcgis/rest/services/ZLXY/T3B1_BASE_ZLXY/MapServer');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1188,'408','T3航站楼地下二层','GISDT','http://172.19.80.22:6080/arcgis/rest/services/ZLXY/T3B2_BASE_ZLXY/MapServer');
</sql>
</changeSet>
<changeSet author="chenzhao" id="2021-09-08-chenzhao">
<preConditions onFail="MARK_RAN">
<tableExists tableName="cb_data_dictionary" />
<primaryKeyExists primaryKeyName="sequence_nbr" tableName="cb_data_dictionary"/>
</preConditions>
<comment>add data cb_data_dictionary</comment>
<sql>
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type) VALUES (1189,'1189','T1航站楼GIS','GISDT');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type) VALUES (1190,'1190','T2航站楼GIS','GISDT');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type) VALUES (1191,'1191','T3航站楼GIS','GISDT');
</sql>
</changeSet>
<changeSet author="chenzhao" id="2021-09-08-chenzhao-2">
<comment>update data cb_data_dictionary</comment>
<sql>
update cb_data_dictionary set parent = 1189 where sequence_nbr = 1174 ;
update cb_data_dictionary set parent = 1189 where sequence_nbr = 1175 ;
update cb_data_dictionary set parent = 1190 where sequence_nbr = 1176 ;
update cb_data_dictionary set parent = 1190 where sequence_nbr = 1177 ;
update cb_data_dictionary set parent = 1190 where sequence_nbr = 1178 ;
update cb_data_dictionary set parent = 1190 where sequence_nbr = 1179 ;
update cb_data_dictionary set parent = 1191 where sequence_nbr = 1180 ;
update cb_data_dictionary set parent = 1191 where sequence_nbr = 1181 ;
update cb_data_dictionary set parent = 1191 where sequence_nbr = 1182 ;
update cb_data_dictionary set parent = 1191 where sequence_nbr = 1183 ;
update cb_data_dictionary set parent = 1191 where sequence_nbr = 1184 ;
update cb_data_dictionary set parent = 1191 where sequence_nbr = 1185 ;
update cb_data_dictionary set parent = 1191 where sequence_nbr = 1186 ;
update cb_data_dictionary set parent = 1191 where sequence_nbr = 1187 ;
update cb_data_dictionary set parent = 1191 where sequence_nbr = 1188 ;
</sql>
</changeSet>
<changeSet author="chenzhao" id="2021-09-13-chenzhao">
<preConditions onFail="MARK_RAN">
<tableExists tableName="cb_data_dictionary" />
<primaryKeyExists primaryKeyName="sequence_nbr" tableName="cb_data_dictionary"/>
</preConditions>
<comment>add data cb_data_dictionary</comment>
<sql>
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1192,'1192',' 8T 吊车','JYZBLX','救援装备类型');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1193,'1193',' 16T 吊车','JYZBLX','救援装备类型');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1194,'1194',' 50T 吊车','JYZBLX','救援装备类型');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1195,'1195',' 70T 吊车','JYZBLX','救援装备类型');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1196,'1196',' 100T 吊车','JYZBLX','救援装备类型');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1197,'1197',' 130T 吊车','JYZBLX','救援装备类型');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1198,'1198',' 180T 吊车','JYZBLX','救援装备类型');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1199,'1199',' 260T 吊车','JYZBLX','救援装备类型');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1200,'1200',' 300T 吊车','JYZBLX','救援装备类型');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1201,'1201',' 350T 吊车','JYZBLX','救援装备类型');
</sql>
</changeSet>
<changeSet author="chenzhao" id="2021-09-13-chenzhao-2">
<preConditions onFail="MARK_RAN">
<tableExists tableName="cb_data_dictionary" />
<primaryKeyExists primaryKeyName="sequence_nbr" tableName="cb_data_dictionary"/>
</preConditions>
<comment>add data cb_data_dictionary</comment>
<sql>
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1202,'1202','副支队长','XFRYGW','消防人员岗位');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1203,'1203','党支部副书记','XFRYGW','消防人员岗位');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1204,'1204','大队长','XFRYGW','消防人员岗位');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1205,'1205','支队长助理','XFRYGW','消防人员岗位');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1206,'1206','班组长','XFRYGW','消防人员岗位');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1207,'1207','中队长 ','XFRYGW','消防人员岗位');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1208,'1208','代理大队长 ','XFRYGW','消防人员岗位');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1209,'1209','代理副大队长 ','XFRYGW','消防人员岗位');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1210,'1210','指挥员','XFRYGW','消防人员岗位');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1211,'1211','副中队长 ','XFRYGW','消防人员岗位');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1212,'1212','内勤','XFRYGW','消防人员岗位');
INSERT INTO cb_data_dictionary (sequence_nbr,code,name,type,type_desc) VALUES (1213,'1213','支队长','XFRYGW','消防人员岗位');
</sql>
</changeSet>
</databaseChangeLog> </databaseChangeLog>
...@@ -249,4 +249,15 @@ ...@@ -249,4 +249,15 @@
ALTER TABLE `p_route_point_item` ADD COLUMN `plan_id` bigint(20) DEFAULT NULL COMMENT '计划ID'; ALTER TABLE `p_route_point_item` ADD COLUMN `plan_id` bigint(20) DEFAULT NULL COMMENT '计划ID';
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="gaojianqiang" id="1630567666-4">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="p_input_item" columnName="item_type_classify_ids"/>
</not>
</preConditions>
<comment>p_input_item ADD COLUMN item_type_classify_ids</comment>
<sql>
ALTER TABLE `p_input_item` ADD COLUMN `item_type_classify_ids` varchar(64) DEFAULT NULL COMMENT '检查类别IDS';
</sql>
</changeSet>
</databaseChangeLog> </databaseChangeLog>
\ No newline at end of file
...@@ -1981,5 +1981,56 @@ ...@@ -1981,5 +1981,56 @@
c.point_id = #{pointId} c.point_id = #{pointId}
and c.plan_task_id = #{planTaskId} and c.plan_task_id = #{planTaskId}
</select> </select>
<select id="queryPageCount" resultType="long">
SELECT
COUNT(1)
FROM
p_check c
LEFT JOIN p_check_input ci ON ci.check_id = c.id
LEFT JOIN p_input_item i ON i.id = ci.input_id
<where>
<if test="planId != null">
c.plan_id = #{planId}
</if>
<if test="companyId != null">
AND c.company_id = #{companyId}
</if>
<if test="orgCode != null">
c.org_code = #{orgCode}
</if>
</where>
</select>
<select id="queryPage" resultType="com.yeejoin.amos.supervision.business.vo.CheckVo">
SELECT
i.id,
i.`name`,
ci.safety_danger_num,
ci.major_danger_num,
c.check_time,
c.user_name,
c.company_id,
c.company_name,
IF
( c.check_time IS NULL, 0, 1 ) AS ext
FROM
p_check c
LEFT JOIN p_check_input ci ON ci.check_id = c.id
LEFT JOIN p_input_item i ON i.id = ci.input_id
<where>
<if test="planId != null">
c.plan_id = #{planId}
</if>
<if test="companyId != null">
AND c.company_id = #{companyId}
</if>
<if test="orgCode != null">
c.org_code = #{orgCode}
</if>
ORDER BY c.check_time DESC
<choose>
<when test="pageSize==-1"></when>
<when test="pageSize!=-1">limit #{offset},#{pageSize}</when>
</choose>
</where>
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -84,13 +84,12 @@ ...@@ -84,13 +84,12 @@
where a.is_delete = '0' and a.input_type != '1' where a.is_delete = '0' and a.input_type != '1'
<if test="name!=null and name!=''"> and a.name like concat(concat("%",#{name}),"%")</if> <if test="name!=null and name!=''"> and a.name like concat(concat("%",#{name}),"%")</if>
<if test="itemNo!=null"> and a.item_no like concat(concat("%",#{itemNo}),"%")</if> <if test="itemNo!=null"> and a.item_no like concat(concat("%",#{itemNo}),"%")</if>
<if test="inputClassify != null"> and a.input_classify = #{inputClassify}</if>
<if test="itemType!=null"> and a.item_Type = #{itemType} </if> <if test="itemType!=null"> and a.item_Type = #{itemType} </if>
<!-- <if test="orgCode!=null"> and a.org_Code = #{orgCode}</if> -->
<if test="checkTypeId!=null and checkTypeId!=''"> and a.check_type_id = #{checkTypeId} </if> <if test="checkTypeId!=null and checkTypeId!=''"> and a.check_type_id = #{checkTypeId} </if>
<if test="itemStart!=null"> and a.item_start = #{itemStart} </if> <if test="itemStart!=null"> and a.item_start = #{itemStart} </if>
<!-- <if test="orgCode!=null"> and a.org_Code = #{orgCode}</if>--> <if test="orgCode!=null"> and a.org_Code = #{orgCode}</if>
<if test="itemClassify != null"> and a.item_classify = #{itemClassify}</if> <if test="itemClassify != null"> and a.item_classify = #{itemClassify}</if>
<if test="itemTypeClassifyIds != null"> and FIND_IN_SET(#{itemTypeClassifyIds}, a.item_type_classify_ids)</if>
order by a.id desc order by a.id desc
</select> </select>
<!--查询 --> <!--查询 -->
...@@ -132,8 +131,9 @@ ...@@ -132,8 +131,9 @@
<if test="itemType!=null"> and a.item_Type = #{itemType} </if> <if test="itemType!=null"> and a.item_Type = #{itemType} </if>
<if test="checkTypeId!=null and checkTypeId!=''"> and a.check_type_id = #{checkTypeId} </if> <if test="checkTypeId!=null and checkTypeId!=''"> and a.check_type_id = #{checkTypeId} </if>
<if test="itemStart!=null"> and a.item_start = #{itemStart} </if> <if test="itemStart!=null"> and a.item_start = #{itemStart} </if>
<!-- <if test="orgCode!=null"> and a.org_Code = #{orgCode}</if>--> <if test="orgCode!=null"> and a.org_Code = #{orgCode}</if>
<if test="itemClassify != null"> and a.item_classify = #{itemClassify}</if> <if test="itemClassify != null"> and a.item_classify = #{itemClassify}</if>
<if test="itemTypeClassifyIds != null"> and FIND_IN_SET(#{itemTypeClassifyIds}, a.item_type_classify_ids)</if>
order by a.id desc order by a.id desc
<choose> <choose>
<when test="pageSize==-1"></when> <when test="pageSize==-1"></when>
......
...@@ -46,59 +46,33 @@ ...@@ -46,59 +46,33 @@
<!--统计 --> <!--统计 -->
<select id="queryPageCount" resultType="long"> <select id="queryPageCount" resultType="long">
SELECT SELECT
count(1) AS total_num COUNT(1)
FROM FROM
p_input_item a p_route_point_item pi
where a.is_delete = '0' and a.input_type != '1' LEFT JOIN p_input_item i ON i.id = pi.input_item_id
<if test="name!=null"> and a.name like concat(concat("%",#{name}),"%")</if> <if test="name!=null"> and i.name like concat(concat("%",#{name}),"%")</if>
<if test="itemNo!=null"> and a.item_no like concat(concat("%",#{itemNo}),"%")</if> <if test="itemTypeClassifyIds != null and itemTypeClassifyIds != ''"> and i.item_type_classify_ids = #{itemTypeClassifyIds}</if>
<if test="inputClassify != null"> and a.input_classify = #{inputClassify}</if> <if test="planId!=null"> and pi.plan_id = #{planId} </if>
<if test="itemType!=null"> and a.item_Type = #{itemType} </if> <if test="orgCode!=null"> and i.org_Code = #{orgCode}</if>
<if test="orgCode!=null"> and a.org_Code = #{orgCode}</if>
order by a.id desc
</select> </select>
<!--查询 --> <!--查询 -->
<select id="queryPage" resultMap="com.yeejoin.amos.supervision.business.vo.RoutePointItemVo"> <select id="queryPage" resultMap="com.yeejoin.amos.supervision.business.vo.RoutePointItemVo">
SELECT SELECT
a.id, pi.id,
a.NAME, i.id AS itemId,
a.item_no, i.`name` AS itemName,
a.item_type, i.item_type,
a.is_must, i.input_classify,
a.default_value, i.check_type,
a.is_score, i.item_classify,
b.NAME AS catalog_name, i.item_type_classify,i.item_level
a.remark,
a.LEVEL,
a.risk_desc,
a.maintenance_content,
a.test_requirement,
a.check_method,
a.create_date,
a.input_classify,
a.check_type,
a.item_parent,
a.item_classify,
a.item_type_classify,
a.item_level,
a.item_start,
IF
( i.input_item_id IS NULL, 0, 1 ) AS ext
FROM FROM
p_input_item a p_route_point_item pi
LEFT JOIN p_catalog_tree b ON a.catalog_id = b.id LEFT JOIN p_input_item i ON i.id = pi.input_item_id
LEFT JOIN p_route_point_item i ON a.id = i.input_item_id <if test="name!=null"> and i.name like concat(concat("%",#{name}),"%")</if>
WHERE <if test="itemTypeClassifyIds != null and itemTypeClassifyIds != ''"> and i.item_type_classify_ids = #{itemTypeClassifyIds}</if>
a.is_delete = '0' <if test="planId!=null"> and pi.plan_id = #{planId} </if>
AND a.input_type != '1' <if test="orgCode!=null"> and i.org_Code = #{orgCode}</if>
<if test="name!=null"> and a.name like concat(concat("%",#{name}),"%")</if>
<if test="itemNo!=null"> and a.item_no like concat(concat("%",#{itemNo}),"%")</if>
<if test="itemType!=null"> and a.item_Type = #{itemType} </if>
<if test="checkTypeId!=null"> and a.check_type_Val = #{checkTypeId} </if>
<if test="itemStart!=null"> and a.item_start = #{itemStart} </if>
<!-- <if test="orgCode!=null"> and a.org_Code = #{orgCode}</if>-->
<if test="itemClassify != null"> and a.item_classify = #{itemClassify}</if>
order by a.id desc
<choose> <choose>
<when test="pageSize==-1"></when> <when test="pageSize==-1"></when>
<when test="pageSize!=-1">limit #{offset},#{pageSize}</when> <when test="pageSize!=-1">limit #{offset},#{pageSize}</when>
......
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