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;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
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.ApiModelProperty;
import lombok.Data;
......@@ -12,6 +13,9 @@ import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* 消防员思想谈话记录
*
......@@ -51,6 +55,10 @@ public class FirefightersThought extends BaseEntity {
@ApiModelProperty(value = "附件")
private String enclosure;
@ApiModelProperty(value = "附件")
@TableField(exist = false)
private Map<String, List<AttachmentDto>> attachments;
@ApiModelProperty(value = "更新时间")
@TableField(fill=FieldFill.UPDATE)
private Date updateTime;
......
package com.yeejoin.amos.boot.module.common.biz.controller;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.*;
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.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
......@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
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.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
......@@ -52,6 +53,8 @@ public class FirefightersThoughtController extends BaseController {
FirefightersThoughtServiceImpl iFirefightersThoughtService;
@Autowired
RedisUtils redisUtils;
@Autowired
SourceFileServiceImpl sourceFileService;
@Value("${redis.cache.failure.time}")
private long time;
/**
......@@ -63,10 +66,13 @@ public class FirefightersThoughtController extends BaseController {
@ApiOperation(httpMethod = "POST", value = "新增消防员思想谈话记录", notes = "新增消防员思想谈话记录")
public ResponseModel<FirefightersThought> saveFirefightersThought(HttpServletRequest request, @RequestBody FirefightersThought firefightersThought){
iFirefightersThoughtService.save(firefightersThought);
if (!firefightersThought.getAttachments().isEmpty()){
sourceFileService.saveAttachments(firefightersThought.getSequenceNbr(),firefightersThought.getAttachments());
}
return ResponseHelper.buildResponse(firefightersThought);
}
/**
* 根据id删除
* @param id
......@@ -97,7 +103,12 @@ public class FirefightersThoughtController extends BaseController {
@RequestMapping(value = "/updateById", method = RequestMethod.PUT)
@ApiOperation(httpMethod = "PUT", value = "修改消防员思想谈话记录", notes = "修改消防员思想谈话记录")
public ResponseModel<FirefightersThought> updateByIdFirefightersThought(HttpServletRequest request, @RequestBody FirefightersThought firefightersThought){
if (!firefightersThought.getAttachments().isEmpty()){
sourceFileService.saveAttachments(firefightersThought.getSequenceNbr(),firefightersThought.getAttachments());
}
iFirefightersThoughtService.updateById(firefightersThought);
//删除缓存
redisUtils.del(RedisKey.THOUGHT_ID+firefightersThought.getSequenceNbr());
return ResponseHelper.buildResponse(firefightersThought);
......@@ -116,15 +127,21 @@ public class FirefightersThoughtController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "根据消防员id查询", notes = "根据消防员id查询")
public ResponseModel<Object> selectById(HttpServletRequest request, @PathVariable Long id){
if(redisUtils.hasKey(RedisKey.THOUGHT_ID+id)){
Object obj= redisUtils.get(RedisKey.THOUGHT_ID+id);
return ResponseHelper.buildResponse(obj);
}else{
FirefightersThought firefightersThought= iFirefightersThoughtService.getById(id);
Map<String, Object> mainMap = Bean.BeantoMap(obj);
mainMap.put("attachments", sourceFileService.getAttachments(id));
return ResponseHelper.buildResponse(mainMap);
}else{ FirefightersThought firefightersThought= iFirefightersThoughtService.getById(id);
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
if (!ObjectUtils.isEmpty(req.get("personNumber"))) {
map.put("personNumber", req.get("personNumber"));
}
/*BUG2680 查询部门人员错误 传递参数类型不正确 修改为string 2021-09-14 陈召 开始*/
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());
}
/*BUG2680 查询部门人员错误 传递参数类型不正确 修改为string 2021-09-14 陈召 开始*/
OrgUsr parent = this.getById(Long.valueOf(req.get("parentId").toString()));
map.put("bizOrgCode", ObjectUtils.isEmpty(parent) ? null : parent.getBizOrgCode());
req.remove("bizOrgName");
req.remove("pageSize");
req.remove("pageNum");
......@@ -547,8 +551,11 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
}
// 机场人员AMOS角色丢失修正, by litw end 2021年9月10日
result = Bean.BeantoMap(orgUsr);
result.put("parenName", getById(orgUsr.getParentId()).getBizOrgName());
/*bug 2869 部门为空人员详情报空指针 2021-09-14 陈召 开始*/
if (getById(orgUsr.getParentId()) != null){
result.put("parenName", getById(orgUsr.getParentId()).getBizOrgName());
}
/*bug 2869 部门为空人员详情报空指针 2021-09-14 陈召 结束*/
// 放入所有动态表单数据
for (DynamicFormColumn alertForm : alertForms) {
result.put(alertForm.getFieldCode(), null);
......@@ -1441,6 +1448,8 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
List<OrgUsr> orgUsrList = this.baseMapper.selectList(wrapper);
return orgUsrList;
}
}
package com.yeejoin.amos.supervision.business.controller;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
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.boot.biz.common.bo.ReginParams;
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.CheckPageParam;
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.*;
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.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.util.DateUtil;
import com.yeejoin.amos.supervision.core.util.StringUtil;
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.lang.BooleanUtils;
import org.slf4j.Logger;
......@@ -35,48 +34,22 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Page;
import org.springframework.scheduling.annotation.Async;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.GetMapping;
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.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
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.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
@RequestMapping(value = "/api/check")
@Api(tags = "巡检记录api")
......@@ -100,14 +73,14 @@ public class CheckController extends AbstractBaseController {
@Value("${linux.img.path}")
private String linuxImgPath;
// @Value("${file.ip}")
// @Value("${file.ip}")
// private String fileIp;
//
// @Value("${file.port}")
// private String filePort;
@Value("${file.url}")
private String fileUrl;
@Value("${amosRefresh.patrol.topic}")
private String patrolTopic;
@Autowired
......@@ -572,7 +545,7 @@ public class CheckController extends AbstractBaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "保存检查记录", notes = "保存检查记录")
@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 {
ReginParams reginParams = getSelectedOrgInfo();
String orgCode = getOrgCode(reginParams);
......@@ -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 {
Page<RoutePointItemVo> page = routePointItemService.queryPage(criterias);
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("删除巡检路线点项关系失败!");
}
}
}
......@@ -7,9 +7,9 @@ import com.yeejoin.amos.supervision.dao.entity.RoutePointItem;
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);
......
......@@ -22,7 +22,7 @@ public interface IRoutePointItemDao extends BaseDao<RoutePointItem, Long> {
@Modifying
@Transactional
@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
@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 {
private String itemNo;
private String checkTypeId;
private String itemStart;
private Long planId;
private String itemTypeClassifyIds;
/**
* 机构
*/
......@@ -111,4 +113,20 @@ public class InputItemPageParam extends CommonPageable {
public void setItemStart(String 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 {
if (status) {
planDao.updatePlanStatus(PlanStatusEnum.EXAMINE_DEVELOPED.getValue(), planId);
}
routePointItemDao.deleteByPlanId(planId);
// routePointItemDao.deleteByPlanId(planId);
List<InputItem> inputItemList = inputItemMapper.findByIdIn(inputItemIds);
List<RoutePoint> routePointList = routePointDao.findByRouteId(routeId);
if (CollectionUtils.isNotEmpty(inputItemList) && CollectionUtils.isNotEmpty(routePointList)) {
......@@ -84,4 +84,12 @@ public class RoutePointItemServiceImpl implements IRoutePointItemService {
Page<RoutePointItemVo> result = new PageImpl<RoutePointItemVo>(content, param, total);
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;
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.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.CheckRecordDto;
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.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.entity.mybatis.*;
import com.yeejoin.amos.supervision.business.param.*;
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.CommonPage;
import com.yeejoin.amos.supervision.core.common.response.GraphInitDataResponse;
import com.yeejoin.amos.supervision.core.common.response.QueryCriteriaRespone;
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 {
/**
......@@ -65,9 +53,9 @@ public interface ICheckService {
*/
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 {
*/
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 {
* @param ids
* @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 {
* @param userInfo
* @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);
......@@ -161,7 +149,8 @@ public interface ICheckService {
* @param param
* @return
*/
List<HashMap<String,Object>> getEquipInputByCheckId(CheckDetailInputPageParam param);
List<HashMap<String, Object>> getEquipInputByCheckId(CheckDetailInputPageParam param);
/**
* 根据巡检记录ID和巡检点ID获取巡检记录详情
*
......@@ -202,7 +191,7 @@ public interface ICheckService {
* @param user
* @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 {
*/
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 {
*/
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<Long> getPlanCheckDataCount(HashMap<String, Object> param);
/**
* 查询巡检装备
*
* @param param
* @return
*/
List<HashMap<String,Object>> getEquipByCheckId(CheckDetailInputPageParam param);
List<HashMap<String, Object>> getEquipByCheckId(CheckDetailInputPageParam param);
/**
* 最近一次漏检记录
*
* @param relationId 关系id
* @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);
......@@ -273,6 +264,7 @@ public interface ICheckService {
/**
* 保存检查记录
*
* @param recordParam 填写记录
* @param reginParams 权限信息
* @return CheckDto
......@@ -281,9 +273,12 @@ public interface ICheckService {
/**
* 校验是否已经填写过
*
* @param planTaskId
* @param pointId
* @return
*/
int checkHasRecord(Long planTaskId, Long pointId);
Page<CheckVo> queryPage(CheckPageParam criterias);
}
......@@ -13,4 +13,6 @@ public interface IRoutePointItemService {
List<RoutePointItem> addRoutePointItemList(Plan plan, List<Long> inputItemIds, Boolean status, String userId);
Page<RoutePointItemVo> queryPage(InputItemPageParam criterias);
Integer deleteByIdIn(List<Long> ids);
}
package com.yeejoin.amos.supervision.business.util;
import java.text.SimpleDateFormat;
import java.util.List;
import com.yeejoin.amos.supervision.business.param.CheckPageParam;
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 org.springframework.util.ObjectUtils;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.List;
public class CheckParamUtil {
public static CheckRecordParam checkCalendar(List<DaoCriteria> daoCriterias){
CheckRecordParam param = new CheckRecordParam();
for(int i=0;i<daoCriterias.size();i++){
DaoCriteria daoCriteria = daoCriterias.get(i);
String operator = daoCriteria.getOperator();
String name = daoCriteria.getPropertyName();
if("checkTime".equals(name)){
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
param.setCheckTime(daoCriterias.get(i).getValue().toString());
}else if("routeId".equals(name)){
param.setRouteId(Long.valueOf(daoCriterias.get(i).getValue().toString()));
}else if("orgCode".equals(name) && operator.equals(QueryOperatorEnum.EQUAL.getName())){
param.setOrgCode(daoCriterias.get(i).getValue().toString()+"%");
}
}
return param;
}
public static CheckRecordParam checkCalendar(List<DaoCriteria> daoCriterias) {
CheckRecordParam param = new CheckRecordParam();
for (int i = 0; i < daoCriterias.size(); i++) {
DaoCriteria daoCriteria = daoCriterias.get(i);
String operator = daoCriteria.getOperator();
String name = daoCriteria.getPropertyName();
if ("checkTime".equals(name)) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
param.setCheckTime(daoCriterias.get(i).getValue().toString());
} else if ("routeId".equals(name)) {
param.setRouteId(Long.valueOf(daoCriterias.get(i).getValue().toString()));
} else if ("orgCode".equals(name) && operator.equals(QueryOperatorEnum.EQUAL.getName())) {
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;
}
}
......@@ -60,6 +60,10 @@ public class InputItemParamUtil {
param.setCheckTypeId(toString(queryRequests.get(i).getValue()));
} else if ("itemStart".equals(name)) {
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;
import java.util.Date;
import lombok.Data;
@Data
public class RoutePointItemVo {
private Long id;
/**
* 检查项ID
*/
private Long inputItemId;
private Long itemId;
/**
* 检查项名称
*/
private String inputItemName;
/**
* 安全隐患个数
*/
private Integer safetyDangerNum;
/**
* 重大隐患个数
*/
private Integer majorDangerNum;
/**
* 检查时间
*/
private Date checkTime;
/**
* 检查人
*/
private String userName;
/**
* 责任单位
*/
private String companyName;
/**
* 扩展属性
*/
private String ext;
}
private String itemName;
private String itemType;
private String inputClassify;
private String checkType;
private String itemClassify;
private String itemTypeClassify;
private String itemLevel;
}
\ No newline at end of file
......@@ -324,6 +324,7 @@
'调派任务状态(执行中:executing,已完成:finished)';
</sql>
</changeSet>
<changeSet author="chenhao" id="2021-09-13-chenhao-1">
<comment>update data cb_firefighters_workexperience</comment>
<sql>
......@@ -341,4 +342,119 @@
ALTER TABLE `cb_firefighters` add residence_detail_val varchar(255) COMMENT '现居住地详细地址';
</sql>
</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>
......@@ -249,4 +249,15 @@
ALTER TABLE `p_route_point_item` ADD COLUMN `plan_id` bigint(20) DEFAULT NULL COMMENT '计划ID';
</sql>
</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>
\ No newline at end of file
......@@ -1981,5 +1981,56 @@
c.point_id = #{pointId}
and c.plan_task_id = #{planTaskId}
</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>
\ No newline at end of file
......@@ -84,13 +84,12 @@
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="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="orgCode!=null"> and a.org_Code = #{orgCode}</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="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="itemTypeClassifyIds != null"> and FIND_IN_SET(#{itemTypeClassifyIds}, a.item_type_classify_ids)</if>
order by a.id desc
</select>
<!--查询 -->
......@@ -132,8 +131,9 @@
<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="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="itemTypeClassifyIds != null"> and FIND_IN_SET(#{itemTypeClassifyIds}, a.item_type_classify_ids)</if>
order by a.id desc
<choose>
<when test="pageSize==-1"></when>
......
......@@ -46,59 +46,33 @@
<!--统计 -->
<select id="queryPageCount" resultType="long">
SELECT
count(1) AS total_num
COUNT(1)
FROM
p_input_item a
where a.is_delete = '0' and a.input_type != '1'
<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="inputClassify != null"> and a.input_classify = #{inputClassify}</if>
<if test="itemType!=null"> and a.item_Type = #{itemType} </if>
<if test="orgCode!=null"> and a.org_Code = #{orgCode}</if>
order by a.id desc
p_route_point_item pi
LEFT JOIN p_input_item i ON i.id = pi.input_item_id
<if test="name!=null"> and i.name like concat(concat("%",#{name}),"%")</if>
<if test="itemTypeClassifyIds != null and itemTypeClassifyIds != ''"> and i.item_type_classify_ids = #{itemTypeClassifyIds}</if>
<if test="planId!=null"> and pi.plan_id = #{planId} </if>
<if test="orgCode!=null"> and i.org_Code = #{orgCode}</if>
</select>
<!--查询 -->
<select id="queryPage" resultMap="com.yeejoin.amos.supervision.business.vo.RoutePointItemVo">
SELECT
a.id,
a.NAME,
a.item_no,
a.item_type,
a.is_must,
a.default_value,
a.is_score,
b.NAME AS catalog_name,
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
pi.id,
i.id AS itemId,
i.`name` AS itemName,
i.item_type,
i.input_classify,
i.check_type,
i.item_classify,
i.item_type_classify,i.item_level
FROM
p_input_item a
LEFT JOIN p_catalog_tree b ON a.catalog_id = b.id
LEFT JOIN p_route_point_item i ON a.id = i.input_item_id
WHERE
a.is_delete = '0'
AND a.input_type != '1'
<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
p_route_point_item pi
LEFT JOIN p_input_item i ON i.id = pi.input_item_id
<if test="name!=null"> and i.name like concat(concat("%",#{name}),"%")</if>
<if test="itemTypeClassifyIds != null and itemTypeClassifyIds != ''"> and i.item_type_classify_ids = #{itemTypeClassifyIds}</if>
<if test="planId!=null"> and pi.plan_id = #{planId} </if>
<if test="orgCode!=null"> and i.org_Code = #{orgCode}</if>
<choose>
<when test="pageSize==-1"></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