Commit 5de5edc8 authored by 高建强's avatar 高建强

item:监督检查业检查项关系分页接口新增

parent c35a4647
...@@ -6,7 +6,7 @@ import com.yeejoin.amos.supervision.business.service.intfc.IRoutePointItemServic ...@@ -6,7 +6,7 @@ import com.yeejoin.amos.supervision.business.service.intfc.IRoutePointItemServic
import com.yeejoin.amos.supervision.business.util.CommonResponse; import com.yeejoin.amos.supervision.business.util.CommonResponse;
import com.yeejoin.amos.supervision.business.util.CommonResponseUtil; import com.yeejoin.amos.supervision.business.util.CommonResponseUtil;
import com.yeejoin.amos.supervision.business.util.InputItemParamUtil; import com.yeejoin.amos.supervision.business.util.InputItemParamUtil;
import com.yeejoin.amos.supervision.business.vo.RoutePointItemVo; import com.yeejoin.amos.supervision.business.vo.InputItemVo;
import com.yeejoin.amos.supervision.core.common.request.CommonPageable; 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.request.CommonRequest;
import com.yeejoin.amos.supervision.dao.entity.Plan; import com.yeejoin.amos.supervision.dao.entity.Plan;
...@@ -88,7 +88,7 @@ public class RoutePointItemController extends AbstractBaseController { ...@@ -88,7 +88,7 @@ public class RoutePointItemController extends AbstractBaseController {
HashMap<String, Object> paramMap = new HashMap<String, Object>(); HashMap<String, Object> paramMap = new HashMap<String, Object>();
paramMap.put("orgCode", loginOrgCode); paramMap.put("orgCode", loginOrgCode);
InputItemPageParam criterias = InputItemParamUtil.fillInputItemPageParam(queryRequests, pageable, paramMap); InputItemPageParam criterias = InputItemParamUtil.fillInputItemPageParam(queryRequests, pageable, paramMap);
Page<RoutePointItemVo> page = routePointItemService.queryPage(criterias); Page<InputItemVo> page = routePointItemService.queryPage(criterias);
return CommonResponseUtil.success(page); return CommonResponseUtil.success(page);
} }
} }
...@@ -2,7 +2,7 @@ package com.yeejoin.amos.supervision.business.dao.mapper; ...@@ -2,7 +2,7 @@ package com.yeejoin.amos.supervision.business.dao.mapper;
import com.yeejoin.amos.supervision.business.param.InputItemPageParam; import com.yeejoin.amos.supervision.business.param.InputItemPageParam;
import com.yeejoin.amos.supervision.business.vo.RoutePointItemVo; import com.yeejoin.amos.supervision.business.vo.InputItemVo;
import com.yeejoin.amos.supervision.dao.entity.RoutePointItem; import com.yeejoin.amos.supervision.dao.entity.RoutePointItem;
import java.util.List; import java.util.List;
...@@ -15,5 +15,5 @@ public interface RoutePointItemMapper extends BaseMapper{ ...@@ -15,5 +15,5 @@ public interface RoutePointItemMapper extends BaseMapper{
long queryPageCount(InputItemPageParam param); long queryPageCount(InputItemPageParam param);
List<RoutePointItemVo> queryPage(InputItemPageParam param); List<InputItemVo> queryPage(InputItemPageParam param);
} }
...@@ -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;
}
} }
...@@ -8,7 +8,7 @@ import com.yeejoin.amos.supervision.business.dao.repository.IRoutePointDao; ...@@ -8,7 +8,7 @@ import com.yeejoin.amos.supervision.business.dao.repository.IRoutePointDao;
import com.yeejoin.amos.supervision.business.dao.repository.IRoutePointItemDao; import com.yeejoin.amos.supervision.business.dao.repository.IRoutePointItemDao;
import com.yeejoin.amos.supervision.business.param.InputItemPageParam; import com.yeejoin.amos.supervision.business.param.InputItemPageParam;
import com.yeejoin.amos.supervision.business.service.intfc.IRoutePointItemService; import com.yeejoin.amos.supervision.business.service.intfc.IRoutePointItemService;
import com.yeejoin.amos.supervision.business.vo.RoutePointItemVo; import com.yeejoin.amos.supervision.business.vo.InputItemVo;
import com.yeejoin.amos.supervision.common.enums.PlanStatusEnum; import com.yeejoin.amos.supervision.common.enums.PlanStatusEnum;
import com.yeejoin.amos.supervision.dao.entity.InputItem; import com.yeejoin.amos.supervision.dao.entity.InputItem;
import com.yeejoin.amos.supervision.dao.entity.Plan; import com.yeejoin.amos.supervision.dao.entity.Plan;
...@@ -78,10 +78,10 @@ public class RoutePointItemServiceImpl implements IRoutePointItemService { ...@@ -78,10 +78,10 @@ public class RoutePointItemServiceImpl implements IRoutePointItemService {
} }
@Override @Override
public Page<RoutePointItemVo> queryPage(InputItemPageParam param) { public Page<InputItemVo> queryPage(InputItemPageParam param) {
long total = routePointItemMapper.queryPageCount(param); long total = routePointItemMapper.queryPageCount(param);
List<RoutePointItemVo> content = routePointItemMapper.queryPage(param); List<InputItemVo> content = routePointItemMapper.queryPage(param);
Page<RoutePointItemVo> result = new PageImpl<RoutePointItemVo>(content, param, total); Page<InputItemVo> result = new PageImpl<InputItemVo>(content, param, total);
return result; return result;
} }
} }
package com.yeejoin.amos.supervision.business.service.intfc; package com.yeejoin.amos.supervision.business.service.intfc;
import com.yeejoin.amos.supervision.business.param.InputItemPageParam; import com.yeejoin.amos.supervision.business.param.InputItemPageParam;
import com.yeejoin.amos.supervision.business.vo.RoutePointItemVo; import com.yeejoin.amos.supervision.business.vo.InputItemVo;
import com.yeejoin.amos.supervision.dao.entity.Plan; import com.yeejoin.amos.supervision.dao.entity.Plan;
import com.yeejoin.amos.supervision.dao.entity.RoutePointItem; import com.yeejoin.amos.supervision.dao.entity.RoutePointItem;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
...@@ -12,5 +12,5 @@ public interface IRoutePointItemService { ...@@ -12,5 +12,5 @@ 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<InputItemVo> queryPage(InputItemPageParam criterias);
} }
...@@ -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()));
} }
} }
} }
......
...@@ -35,6 +35,11 @@ public class RoutePointItemVo { ...@@ -35,6 +35,11 @@ public class RoutePointItemVo {
private String userName; private String userName;
/** /**
* 责任单位ID
*/
private String companyId;
/**
* 责任单位 * 责任单位
*/ */
private String companyName; private String companyName;
......
...@@ -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
...@@ -2026,6 +2026,11 @@ ...@@ -2026,6 +2026,11 @@
<if test="orgCode != null"> <if test="orgCode != null">
c.org_code = #{orgCode} c.org_code = #{orgCode}
</if> </if>
ORDER BY c.check_time DESC
<choose>
<when test="pageSize==-1"></when>
<when test="pageSize!=-1">limit #{offset},#{pageSize}</when>
</choose>
</where> </where>
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -46,59 +46,26 @@ ...@@ -46,59 +46,26 @@
<!--统计 --> <!--统计 -->
<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.InputItemVo">
SELECT SELECT
a.id, i.*
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
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