Browse Source

tijioadaima

recovery
wang0018 4 years ago
parent
commit
916fc42ce4
  1. 2
      tcm/src/main/java/com/ccsens/tcm/persist/dao/ReportCodeDao.java
  2. 2
      tcm/src/main/java/com/ccsens/tcm/service/QuestionService.java
  3. 35
      tcm/src/main/resources/mapper_dao/ReportCodeDao.xml

2
tcm/src/main/java/com/ccsens/tcm/persist/dao/ReportCodeDao.java

@ -30,7 +30,7 @@ public interface ReportCodeDao extends ReportCodeMapper {
* @param code code
* @return 返回类型详细信息
*/
List<QuestionVo.PatientCode> selectCodeByCode(@Param("code") String code);
List<QuestionVo.PatientCode> selectCodeByCode(@Param("code") String code,@Param("nums") Integer nums);
/**
*

2
tcm/src/main/java/com/ccsens/tcm/service/QuestionService.java

@ -28,7 +28,7 @@ public class QuestionService implements IQuestionService{
@Override
public List<QuestionVo.PatientCode> getQuestionAndAnswer(QuestionDto.QueryQuestionAndAnswer param) {
List<QuestionVo.PatientCode> patientCodeList = reportCodeDao.selectCodeByCode(param.getCode());
List<QuestionVo.PatientCode> patientCodeList = reportCodeDao.selectCodeByCode(param.getCode(),param.getNums());
if(CollectionUtil.isNotEmpty(patientCodeList)){
//循环一级code
patientCodeList.forEach(patientCode -> {

35
tcm/src/main/resources/mapper_dao/ReportCodeDao.xml

@ -134,12 +134,47 @@
`level` = 2
and rec_status = 0
) c2 on c1.`code` = c2.parent_code
<if test="code != null and code != ''">
<if test="nums == 0">
and (c2.`report_type`in (0))
</if>
<if test="nums == 14">
and (c2.`report_type`in (0,1))
</if>
<if test="nums == 90">
and (c2.`report_type`in (0,1))
</if>
<if test="nums == 180">
and (c2.`report_type`in (2))
</if>
<if test="nums == 365">
and (c2.`report_type`in (2))
</if>
</if>
WHERE
c1.`level` = 1
and c1.rec_status = 0
<if test="code != null and code != ''">
and (c1.`code` = #{code} or c2.`code` = #{code})
</if>
<if test="code==null or code==''">
<if test="nums == 0">
and (c1.`report_type`in (0))
</if>
<if test="nums == 14">
and (c1.`report_type`in (0,1))
</if>
<if test="nums == 90">
and (c1.`report_type`in (0,1))
</if>
<if test="nums == 180">
and (c1.`report_type`in (2))
</if>
<if test="nums == 365">
and (c1.`report_type`in (2))
</if>
</if>
</select>
<select id="queryCodeAll" resultType="java.lang.String">
SELECT `code` FROM `t_report_code` WHERE rec_status = 0

Loading…
Cancel
Save