参与者改造

This commit is contained in:
Wang.Huan
2025-03-28 14:26:20 +08:00
parent f81a553c21
commit f767b93f0c
15 changed files with 316 additions and 131 deletions

View File

@@ -4,7 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.openhis.web.basedatamanage.mapper.PractitionerAppAppMapper">
<select id="getUserPractitionerPage" resultType="com.openhis.web.doctorstation.dto.UserAndPractitionerDto">
<select id="getUserPractitionerPage" resultType="com.openhis.web.basedatamanage.dto.UserAndPractitionerDto">
SELECT T3.tenant_id,
T3.user_id,
T3.practitioner_id,
@@ -45,18 +45,33 @@
${ew.customSqlSegment}
</select>
<select id="getChildList" resultType="com.openhis.web.doctorstation.dto.UserAndPractitionerChildDto">
<select id="getPractitionerRolesDtoList" resultType="com.openhis.web.basedatamanage.dto.PractitionerRolesDto">
SELECT
sr.role_id,
sr.role_name,
ap.ID AS practitioner_id
FROM
sys_role sr
JOIN sys_user_role sur ON sr.role_id = sur.role_id
JOIN adm_practitioner ap ON sur.user_id = ap.user_id
WHERE
ap.delete_flag = '0'
<if test="practitionerIdList != null and !practitionerIdList.isEmpty()">
AND ap.ID IN
<foreach collection="practitionerIdList" item="itemId" open="(" separator="," close=")">
#{itemId}
</foreach>
</if>
</select>
<select id="getOrgAndLocationDtoList" resultType="com.openhis.web.basedatamanage.dto.PractitionerOrgAndLocationDto">
SELECT
t1.practitioner_id,
t1.org_id,
t1.location_id,
t1.role_code,
t2.role_id,
t2.role_name
t1.org_id,
t1.location_id
FROM
adm_practitioner_role AS T1
LEFT JOIN sys_role AS T2 ON t2.role_key = t1.role_code
AND t2.del_flag = '0'
WHERE
t1.delete_flag = '0'
<if test="practitionerIdList != null and !practitionerIdList.isEmpty()">

View File

@@ -8,6 +8,7 @@
SELECT abi.tenant_id,
abi.advice_type,
abi.category_code,
abi.part_percent,
abi.advice_definition_id,
abi.advice_name,
abi.advice_bus_no,
@@ -33,6 +34,7 @@
SELECT T1.tenant_id,
1 AS advice_type,
T1.category_code AS category_code,
T1.part_percent AS part_percent,
T1.ID AS advice_definition_id,
T1.NAME AS advice_name,
T1.bus_no AS advice_bus_no,
@@ -69,6 +71,7 @@
SELECT T1.tenant_id,
2 AS advice_type,
T1.category_code AS category_code,
T1.part_percent AS part_percent,
T1.ID AS advice_definition_id,
T1.NAME AS advice_name,
T1.bus_no AS advice_bus_no,
@@ -104,6 +107,7 @@
SELECT T1.tenant_id,
3 AS advice_type,
'' AS category_code,
1 AS part_percent,
T1.ID AS advice_definition_id,
T1.NAME AS advice_name,
T1.bus_no AS advice_bus_no,
@@ -137,8 +141,6 @@
SELECT
T1.item_id,
T1.item_table,
T1.base_quantity,
T1.base_unit_code,
T1.min_quantity,
T1.min_unit_code,
T1.lot_number,