Commit edd6eb46 authored by chenzhao's avatar chenzhao

Merge branch 'develop_dl_plan6_temp' of…

Merge branch 'develop_dl_plan6_temp' of http://39.98.45.134:8090/moa/amos-boot-biz into develop_dl_plan6_temp
parents 3ad0d208 5a7c5052
...@@ -67,6 +67,27 @@ public class InputItemController extends AbstractBaseController { ...@@ -67,6 +67,27 @@ public class InputItemController extends AbstractBaseController {
@Autowired @Autowired
JcsFeignClient jcsFeignClient; JcsFeignClient jcsFeignClient;
/**
* 新加接口*****************************************************************************
* */
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "分页查询检查项", notes = "分页查询检查项")
@RequestMapping(value = "/queryItemByPageNew", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse queryItemByPageNew(
@ApiParam(value = "组合查询条件", required = false, defaultValue = "[]") @RequestBody(required = false) InputItemPageParam criterias,
@ApiParam(value = "分页参数", required = false, defaultValue = "current=0&pageSize=10或pageNumber0&pageSize=10") CommonPageable pageable) {
Page<InputItemVo> page = inputItemService.queryInputItemByPageNew(criterias);
return CommonResponseUtil.success(page);
}
/**
* 新加接口*****************************************************************************
* */
/** /**
* 新增巡检项 * 新增巡检项
* *
......
...@@ -16,6 +16,19 @@ import org.springframework.stereotype.Repository; ...@@ -16,6 +16,19 @@ import org.springframework.stereotype.Repository;
@Repository @Repository
public interface InputItemMapper extends BaseMapper { public interface InputItemMapper extends BaseMapper {
/**
* 新接口
* */
public long countInputItemInfoDataNew(InputItemPageParam param);
public List<InputItemVo> getInputItemInfoNew(InputItemPageParam param);
/**
* 新接口
* */
public void updateInputItem(InputItem item); public void updateInputItem(InputItem item);
public List<HashMap<String, Object>> countByCatalogId(HashMap<String, Object> paramMap); public List<HashMap<String, Object>> countByCatalogId(HashMap<String, Object> paramMap);
......
...@@ -6,19 +6,31 @@ import java.util.List; ...@@ -6,19 +6,31 @@ import java.util.List;
public class InputItemPageParam extends CommonPageable{ public class InputItemPageParam extends CommonPageable{
private String isScore;
private String itemType; //检查项名称
private String name; private String name;
//检查项等级
private String level; private String level;
//检查项编号
private String itemNo; private String itemNo;
/** //机场单位code
* 机构 private String bizOrgCode;
*/
//平台code
private String orgCode; private String orgCode;
private int catalogId; private int catalogId;
private String isScore;
private String itemType;
private List<Long> catalogIds; private List<Long> catalogIds;
public String getBizOrgCode() {
return bizOrgCode;
}
public void setBizOrgCode(String bizOrgCode) {
this.bizOrgCode = bizOrgCode;
}
public String getItemNo() { public String getItemNo() {
return itemNo; return itemNo;
} }
......
...@@ -49,6 +49,34 @@ public class InputItemServiceImpl implements IInputItemService { ...@@ -49,6 +49,34 @@ public class InputItemServiceImpl implements IInputItemService {
@Autowired @Autowired
private RemoteSecurityService remoteSecurityService; private RemoteSecurityService remoteSecurityService;
/**
* 新接口
* **/
@Override
public Page<InputItemVo> queryInputItemByPageNew(InputItemPageParam criterias) {
long total = inputItemMapper.countInputItemInfoDataNew(criterias);
List<InputItemVo> content = inputItemMapper.getInputItemInfoNew(criterias);
Page<InputItemVo> result = new PageImpl<InputItemVo>(content, criterias, total);
return result;
}
/**
* 新接口
* **/
@Override @Override
@Transactional @Transactional
public long addNewInputItem(InputItem param) { public long addNewInputItem(InputItem param) {
......
...@@ -16,6 +16,38 @@ import com.yeejoin.amos.patrol.dao.entity.InputItem; ...@@ -16,6 +16,38 @@ import com.yeejoin.amos.patrol.dao.entity.InputItem;
* *
*/ */
public interface IInputItemService { public interface IInputItemService {
/**
* 新接口
*
* */
/**
* 分页列表条件查询检查项
* @param criterias
* @return
*/
public Page<InputItemVo> queryInputItemByPageNew(InputItemPageParam criterias);
/**
* 新接口
*
* */
/** /**
* 新增检查项 * 新增检查项
* @param inputItem 检查项 * @param inputItem 检查项
......
...@@ -226,4 +226,70 @@ ...@@ -226,4 +226,70 @@
and org_Code = #{orgCode} and org_Code = #{orgCode}
</if> </if>
</select> </select>
<!--新接口-->
<select id="countInputItemInfoDataNew" resultType="long">
SELECT
count(1) AS total_num
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="isScore!=null"> and a.is_Score = #{isScore}</if>
<if test="itemType!=null"> and a.item_Type = #{itemType} </if>
<if test="orgCode!=null"> and a.org_Code = #{orgCode}</if>
<if test="catalogIds !=null">
and a.catalog_id in <foreach collection="catalogIds" item="catalogId" index="index" open="(" separator="," close=")" >#{catalogId}</foreach>
</if>
<choose>
<when test="level == '-0' ">and a.level is null</when>
<when test="level!=null and level != '-0'">and a.level = #{level}</when>
</choose>
order by a.id desc
</select>
<select id="getInputItemInfoNew" resultMap="inputItemMap">
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
from
p_input_item a left join p_catalog_tree b on a.catalog_id = b.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="isScore!=null"> and a.is_Score = #{isScore}</if>
<if test="itemType!=null"> and a.item_Type = #{itemType} </if>
<if test="orgCode!=null"> and a.org_Code = #{orgCode}</if>
<if test="catalogIds !=null">
and a.catalog_id in <foreach collection="catalogIds" item="catalogId" index="index" open="(" separator="," close=")" >#{catalogId}</foreach>
</if>
<choose>
<when test="level == '-0' ">and a.level is null</when>
<when test="level!=null and level != '-0'">and a.level = #{level}</when>
</choose>
order by a.id desc
<choose>
<when test="pageSize==-1"></when>
<when test="pageSize!=-1">limit #{offset},#{pageSize}</when>
</choose>
</select>
</mapper> </mapper>
\ No newline at end of file
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