bug241 264 265 fixed
This commit is contained in:
@@ -130,4 +130,13 @@ public interface IDiagTreatMAppService {
|
||||
* @return 结果
|
||||
*/
|
||||
R<?> updatePricingFlag(List<Long> ids, Integer pricingFlag);
|
||||
|
||||
/**
|
||||
* 诊疗目录下拉列表(轻量级,用于套餐设置)
|
||||
*
|
||||
* @param statusEnum 状态(2=启用)
|
||||
* @param searchKey 搜索关键词(可选)
|
||||
* @return 只包含 id, name, busNo, retailPrice
|
||||
*/
|
||||
R<?> getDiagnosisTreatmentSimpleList(Integer statusEnum, String searchKey);
|
||||
}
|
||||
@@ -822,4 +822,20 @@ public class DiagTreatMAppServiceImpl implements IDiagTreatMAppService {
|
||||
}
|
||||
return activityDefinition;
|
||||
}
|
||||
|
||||
/**
|
||||
* 诊疗目录下拉列表(轻量级,用于套餐设置)
|
||||
* 只查询必要字段,减少JOIN,提高查询速度
|
||||
* 支持搜索关键词过滤
|
||||
*
|
||||
* @param statusEnum 状态(2=启用)
|
||||
* @param searchKey 搜索关键词
|
||||
* @return 只包含 id, name, busNo, retailPrice
|
||||
*/
|
||||
@Override
|
||||
public R<?> getDiagnosisTreatmentSimpleList(Integer statusEnum, String searchKey) {
|
||||
Integer tenantId = SecurityUtils.getLoginUser().getTenantId();
|
||||
List<DiagnosisTreatmentDto> list = activityDefinitionManageMapper.getDiagnosisTreatmentSimpleList(statusEnum, tenantId, searchKey);
|
||||
return R.ok(list);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,4 +207,21 @@ public class DiagnosisTreatmentController {
|
||||
.orderByAsc(InspectionType::getSortOrder);
|
||||
return R.ok(inspectionTypeService.list(queryWrapper));
|
||||
}
|
||||
|
||||
/**
|
||||
* 诊疗目录下拉列表(轻量级,用于套餐设置)
|
||||
* 只查询必要字段,减少JOIN,提高查询速度
|
||||
* 支持搜索关键词过滤
|
||||
*
|
||||
* @param statusEnum 状态(2=启用)
|
||||
* @param searchKey 搜索关键词
|
||||
* @return 只包含 id, name, busNo, retailPrice
|
||||
*/
|
||||
@GetMapping("/simple-list")
|
||||
public R<?> getDiagnosisTreatmentSimpleList(@RequestParam(required = false) Integer statusEnum, @RequestParam(required = false) String searchKey) {
|
||||
if (statusEnum == null) {
|
||||
statusEnum = 2;
|
||||
}
|
||||
return diagTreatMAppService.getDiagnosisTreatmentSimpleList(statusEnum, searchKey);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,8 @@ import com.openhis.web.datadictionary.dto.DiagnosisTreatmentDto;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 诊疗定义管理
|
||||
*
|
||||
@@ -36,4 +38,14 @@ public interface ActivityDefinitionManageMapper {
|
||||
*/
|
||||
DiagnosisTreatmentDto getDiseaseTreatmentOne(@Param("id") Long id, @Param("tenantId") Integer tenantId);
|
||||
|
||||
/**
|
||||
* 诊疗目录下拉列表(轻量级,只查4个字段)
|
||||
*
|
||||
* @param statusEnum 状态
|
||||
* @param tenantId 租户ID
|
||||
* @param searchKey 搜索关键词(可选)
|
||||
* @return id, name, busNo, retailPrice
|
||||
*/
|
||||
List<DiagnosisTreatmentDto> getDiagnosisTreatmentSimpleList(@Param("statusEnum") Integer statusEnum, @Param("tenantId") Integer tenantId, @Param("searchKey") String searchKey);
|
||||
|
||||
}
|
||||
|
||||
@@ -78,6 +78,36 @@
|
||||
ORDER BY T1.id DESC
|
||||
</select>
|
||||
|
||||
<!-- 诊疗目录下拉列表(轻量级,只查4个字段,1个JOIN) -->
|
||||
<select id="getDiagnosisTreatmentSimpleList" resultType="com.openhis.web.datadictionary.dto.DiagnosisTreatmentDto">
|
||||
SELECT
|
||||
T1.id,
|
||||
T1.bus_no,
|
||||
T1.name,
|
||||
T2.price as retail_price
|
||||
FROM wor_activity_definition T1
|
||||
INNER JOIN adm_charge_item_definition T2
|
||||
ON T1.id = T2.instance_id
|
||||
AND T2.instance_table = 'wor_activity_definition'
|
||||
WHERE T1.delete_flag = '0'
|
||||
AND T1.status_enum = #{statusEnum}
|
||||
AND T1.tenant_id = #{tenantId}
|
||||
<if test="searchKey != null and searchKey != ''">
|
||||
AND (
|
||||
T1.name LIKE '%' || #{searchKey} || '%'
|
||||
OR T1.bus_no LIKE '%' || #{searchKey} || '%'
|
||||
OR T1.py_str LIKE '%' || #{searchKey} || '%'
|
||||
)
|
||||
</if>
|
||||
ORDER BY T1.id DESC
|
||||
<if test="searchKey != null and searchKey != ''">
|
||||
LIMIT 1500
|
||||
</if>
|
||||
<if test="searchKey == null or searchKey == ''">
|
||||
LIMIT 500
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getDiseaseTreatmentOne" resultType="com.openhis.web.datadictionary.dto.DiagnosisTreatmentDto">
|
||||
SELECT
|
||||
T1.id,
|
||||
|
||||
Reference in New Issue
Block a user