Commit 9a6aaddc authored by 蔡镇泽's avatar 蔡镇泽

失能评定标准定义列表

parent cd09d72e
package com.hungraim.ltc.pojo.vo.governance;
import com.hungraim.ltc.pojo.entity.PageInfo;
import lombok.Data;
import java.io.Serializable;
/**
* 失能评定标准定义列表VO
*/
@Data
public class CfgAprVO extends PageInfo implements Serializable {
/**
* 评定标准配置id
*/
private Integer aprId;
/**
* 适用机构
*/
private String organName;
/**
* 机构代码
*/
private Integer organId;
/**
* 模板名称
*/
private String estimateName;
/**
* 备注
*/
private String remark;
/**
* 状态
*/
private String status;
}
...@@ -4,7 +4,7 @@ import cn.hutool.json.JSONArray; ...@@ -4,7 +4,7 @@ import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil; import cn.hutool.json.JSONUtil;
import com.hungraim.ltc.governance.service.DisableAssessmentCriteriaService; import com.hungraim.ltc.governance.service.DisableAssessmentCriteriaService;
import com.hungraim.ltc.pojo.vo.governance.SrvTaskInfoVO; import com.hungraim.ltc.pojo.vo.governance.CfgAprVO;
import com.hungraim.ltc.util.Result; import com.hungraim.ltc.util.Result;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
...@@ -12,6 +12,8 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -12,6 +12,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/** /**
* 失能评定标准Controller * 失能评定标准Controller
* *
...@@ -44,7 +46,7 @@ public class DisableAssessmentCriteriaController { ...@@ -44,7 +46,7 @@ public class DisableAssessmentCriteriaController {
* reference 分值参考 * reference 分值参考
*/ */
@RequestMapping("/addDisableAssessmentCriteria") @RequestMapping("/addDisableAssessmentCriteria")
public Result<SrvTaskInfoVO> addDisableAssessmentCriteria(String jsonParam) { public Result<Object> addDisableAssessmentCriteria(String jsonParam) {
//参数校验 //参数校验
if (StringUtils.isBlank(jsonParam)) { if (StringUtils.isBlank(jsonParam)) {
return Result.failed("参数不能为空!"); return Result.failed("参数不能为空!");
...@@ -106,5 +108,17 @@ public class DisableAssessmentCriteriaController { ...@@ -106,5 +108,17 @@ public class DisableAssessmentCriteriaController {
return Result.success(); return Result.success();
} }
/**
* 失能评定标准定义列表
*
* @param organIds 机构id
* @param aprName 评定标准问题模板名称
* @param status 状态
*/
@RequestMapping("/getDisableAssessmentCriteriaList")
public Result<List<CfgAprVO>> getDisableAssessmentCriteriaList(String organIds, String aprName, String status) {
List<CfgAprVO> cfgAprVOS = disableAssessmentCriteriaService.getDisableAssessmentCriteriaList(organIds, aprName, status);
return Result.success(cfgAprVOS);
}
} }
...@@ -2,10 +2,14 @@ package com.hungraim.ltc.governance.dao; ...@@ -2,10 +2,14 @@ package com.hungraim.ltc.governance.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.assessment.ChCfgApr; import com.hungraim.ltc.pojo.entity.assessment.ChCfgApr;
import com.hungraim.ltc.pojo.vo.governance.CfgAprVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.List;
@Mapper @Mapper
@Repository @Repository
public interface ChCfgAprMapper extends BaseMapper<ChCfgApr> { public interface ChCfgAprMapper extends BaseMapper<ChCfgApr> {
List<CfgAprVO> getDisableAssessmentCriteriaList(List<String> organIds, String aprName, String status);
} }
package com.hungraim.ltc.governance.service; package com.hungraim.ltc.governance.service;
import cn.hutool.json.JSONArray; import cn.hutool.json.JSONArray;
import com.hungraim.ltc.pojo.vo.governance.CfgAprVO;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List;
/** /**
* 失能评定标准service * 失能评定标准service
* *
...@@ -11,4 +14,6 @@ import org.springframework.stereotype.Service; ...@@ -11,4 +14,6 @@ import org.springframework.stereotype.Service;
@Service @Service
public interface DisableAssessmentCriteriaService { public interface DisableAssessmentCriteriaService {
void addDisableAssessmentCriteria(String organId, String estimateName, String remark, Integer status, JSONArray project); void addDisableAssessmentCriteria(String organId, String estimateName, String remark, Integer status, JSONArray project);
List<CfgAprVO> getDisableAssessmentCriteriaList(String organIds, String aprName, String status);
} }
package com.hungraim.ltc.governance.service.impl; package com.hungraim.ltc.governance.service.impl;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONArray; import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import com.hungraim.ltc.governance.dao.ChCfgAprItemClauseMapper; import com.hungraim.ltc.governance.dao.ChCfgAprItemClauseMapper;
...@@ -9,11 +10,14 @@ import com.hungraim.ltc.governance.service.DisableAssessmentCriteriaService; ...@@ -9,11 +10,14 @@ import com.hungraim.ltc.governance.service.DisableAssessmentCriteriaService;
import com.hungraim.ltc.pojo.entity.assessment.ChCfgApr; import com.hungraim.ltc.pojo.entity.assessment.ChCfgApr;
import com.hungraim.ltc.pojo.entity.assessment.ChCfgAprItem; import com.hungraim.ltc.pojo.entity.assessment.ChCfgAprItem;
import com.hungraim.ltc.pojo.entity.assessment.ChCfgAprItemClause; import com.hungraim.ltc.pojo.entity.assessment.ChCfgAprItemClause;
import com.hungraim.ltc.pojo.vo.governance.CfgAprVO;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* 失能评定标准service * 失能评定标准service
...@@ -71,4 +75,13 @@ public class DisableAssessmentCriteriaServiceImpl implements DisableAssessmentCr ...@@ -71,4 +75,13 @@ public class DisableAssessmentCriteriaServiceImpl implements DisableAssessmentCr
} }
} }
@Override
public List<CfgAprVO> getDisableAssessmentCriteriaList(String organIds, String aprName, String status) {
List<String> organIdList = null;
if (StrUtil.isNotBlank(organIds)) {
organIdList = Arrays.asList(organIds.split(","));
}
return chCfgAprMapper.getDisableAssessmentCriteriaList(organIdList, aprName, status);
}
} }
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hungraim.ltc.governance.dao.ChCfgAprMapper">
<select id="getDisableAssessmentCriteriaList" resultType="com.hungraim.ltc.pojo.vo.governance.CfgAprVO">
select
--评定标准id
apr.apr_id aprId,
--适用机构
organ.organ_name organName,
--机构代码
organ.organ_id organId,
--失能评定标准模板名称
apr.estimate_name estimateName,
--备注
apr.remark remark,
--状态
apr.status status
from ch_cfg_apr apr
left join ch_fnd_organ organ on apr.organ_id = organ.organ_id
<where>
<if test="organIds != null">
and apr.organ_id in
<foreach collection="organIds" item="organId" open="(" close=")" separator=",">
#{organId}
</foreach>
</if>
<if test="aprName != null and aprName != ''">
and apr.estimate_name like CONCAT(CONCAT('%',#{aprName}) ,'%')
</if>
<if test="status != null and status != ''">
and apr.status = #{status}
</if>
</where>
</select>
</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