修改查询科室及其下属手术、话术、微信库数量
This commit is contained in:
parent
902e8e40dd
commit
9dfe13a0bc
@ -99,18 +99,26 @@ public class DepartmentController extends BaseController {
|
|||||||
* 查询科室信息列表及包含话术数量
|
* 查询科室信息列表及包含话术数量
|
||||||
*/
|
*/
|
||||||
@GetMapping("/listScriptNum")
|
@GetMapping("/listScriptNum")
|
||||||
public R<List<Department>> listScriptNum(Department department) {
|
public AjaxResult listScriptNum(Department department) {
|
||||||
List<Department> list = departmentService.selectDepartmentListScriptNum(department);
|
List<Department> list = departmentService.selectDepartmentListScriptNum(department);
|
||||||
return R.ok(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询科室信息列表及包含手术数量
|
* 查询科室信息列表及包含手术数量
|
||||||
*/
|
*/
|
||||||
@GetMapping("/listOperationNum")
|
@GetMapping("/listOperationNum")
|
||||||
public R<List<Department>> listOperationNum(Department department) {
|
public AjaxResult listOperationNum(Department department) {
|
||||||
List<Department> list = departmentService.selectDepartmentListOperationNum(department);
|
List<Department> list = departmentService.selectDepartmentListOperationNum(department);
|
||||||
return R.ok(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询科室信息列表及包含微信库数量
|
||||||
|
*/
|
||||||
|
@GetMapping("/listWechatTemplateNum")
|
||||||
|
public AjaxResult listWechatTemplateNum(Department department) {
|
||||||
|
List<Department> list = departmentService.selectDepartmentListWechatTemplateNum(department);
|
||||||
|
return AjaxResult.success(list);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -73,4 +73,12 @@ public interface DepartmentMapper {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<Department> selectDepartmentListOperationNum(Department department);
|
List<Department> selectDepartmentListOperationNum(Department department);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询科室信息列表及包含微信库数量
|
||||||
|
* @param department
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Department> selectDepartmentListWechatTemplateNum(Department department);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -73,4 +73,11 @@ public interface IDepartmentService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<Department> selectDepartmentListOperationNum(Department department);
|
List<Department> selectDepartmentListOperationNum(Department department);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询科室信息列表及包含微信库数量
|
||||||
|
* @param department
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Department> selectDepartmentListWechatTemplateNum(Department department);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -110,4 +110,15 @@ public class DepartmentServiceImpl implements IDepartmentService {
|
|||||||
public List<Department> selectDepartmentListOperationNum(Department department) {
|
public List<Department> selectDepartmentListOperationNum(Department department) {
|
||||||
return departmentMapper.selectDepartmentListOperationNum(department);
|
return departmentMapper.selectDepartmentListOperationNum(department);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询科室信息列表及包含微信库数量
|
||||||
|
*
|
||||||
|
* @param department
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Department> selectDepartmentListWechatTemplateNum(Department department) {
|
||||||
|
return departmentMapper.selectDepartmentListWechatTemplateNum(department);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -165,136 +165,59 @@
|
|||||||
|
|
||||||
<select id="selectDepartmentListScriptNum" resultType="com.xinelu.manage.domain.department.Department">
|
<select id="selectDepartmentListScriptNum" resultType="com.xinelu.manage.domain.department.Department">
|
||||||
select d.id,
|
select d.id,
|
||||||
d.parent_department_id,
|
|
||||||
d.agency_id,
|
|
||||||
d.agency_name,
|
|
||||||
d.department_name,
|
d.department_name,
|
||||||
d.department_code,
|
d.department_code,
|
||||||
d.department_type,
|
|
||||||
d.department_abbreviation,
|
|
||||||
d.department_person_id,
|
|
||||||
d.department_person_name,
|
|
||||||
d.node_type,
|
|
||||||
d.provide_service_category,
|
|
||||||
d.subdivision_category_id,
|
|
||||||
d.subdivision_category_name,
|
|
||||||
d.norm_department_compare_id,
|
|
||||||
d.norm_department_compare_name,
|
|
||||||
d.prepare_beds_count,
|
|
||||||
d.department_phone,
|
|
||||||
d.department_mail,
|
|
||||||
d.establish_date,
|
|
||||||
d.revoke_date,
|
|
||||||
d.create_by,
|
|
||||||
d.create_time,
|
|
||||||
d.update_by,
|
|
||||||
d.update_time,
|
|
||||||
count(si.id) AS countNum
|
count(si.id) AS countNum
|
||||||
from department d left join script_info si on d.id = si.department_id
|
from department d left join script_info si on d.id = si.department_id
|
||||||
<where>
|
<where>
|
||||||
<if test="departmentCode != null and departmentCode != ''">
|
<if test="departmentCode != null and departmentCode != ''">
|
||||||
and d.department_code =
|
and d.department_code = #{departmentCode}
|
||||||
#{departmentCode}
|
|
||||||
</if>
|
</if>
|
||||||
<if test="departmentName != null and departmentName != ''">
|
<if test="departmentName != null and departmentName != ''">
|
||||||
and d.department_name like concat('%',
|
and d.department_name like concat('%',#{departmentName},'%')
|
||||||
#{departmentName},
|
|
||||||
'%'
|
|
||||||
)
|
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
GROUP BY d.id,
|
GROUP BY d.id,
|
||||||
d.parent_department_id,
|
|
||||||
d.agency_id,
|
|
||||||
d.agency_name,
|
|
||||||
d.department_name,
|
d.department_name,
|
||||||
d.department_code,
|
d.department_code
|
||||||
d.department_type,
|
|
||||||
d.department_abbreviation,
|
|
||||||
d.department_person_id,
|
|
||||||
d.department_person_name,
|
|
||||||
d.node_type,
|
|
||||||
d.provide_service_category,
|
|
||||||
d.subdivision_category_id,
|
|
||||||
d.subdivision_category_name,
|
|
||||||
d.norm_department_compare_id,
|
|
||||||
d.norm_department_compare_name,
|
|
||||||
d.prepare_beds_count,
|
|
||||||
d.department_phone,
|
|
||||||
d.department_mail,
|
|
||||||
d.establish_date,
|
|
||||||
d.revoke_date,
|
|
||||||
d.create_by,
|
|
||||||
d.create_time,
|
|
||||||
d.update_by,
|
|
||||||
d.update_time;
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectDepartmentListOperationNum" resultType="com.xinelu.manage.domain.department.Department">
|
<select id="selectDepartmentListOperationNum" resultType="com.xinelu.manage.domain.department.Department">
|
||||||
select d.id,
|
select d.id,
|
||||||
d.parent_department_id,
|
|
||||||
d.agency_id,
|
|
||||||
d.agency_name,
|
|
||||||
d.department_name,
|
d.department_name,
|
||||||
d.department_code,
|
d.department_code,
|
||||||
d.department_type,
|
|
||||||
d.department_abbreviation,
|
|
||||||
d.department_person_id,
|
|
||||||
d.department_person_name,
|
|
||||||
d.node_type,
|
|
||||||
d.provide_service_category,
|
|
||||||
d.subdivision_category_id,
|
|
||||||
d.subdivision_category_name,
|
|
||||||
d.norm_department_compare_id,
|
|
||||||
d.norm_department_compare_name,
|
|
||||||
d.prepare_beds_count,
|
|
||||||
d.department_phone,
|
|
||||||
d.department_mail,
|
|
||||||
d.establish_date,
|
|
||||||
d.revoke_date,
|
|
||||||
d.create_by,
|
|
||||||
d.create_time,
|
|
||||||
d.update_by,
|
|
||||||
d.update_time,
|
|
||||||
count(oi.id) AS countNum
|
count(oi.id) AS countNum
|
||||||
from department d left join operation_info oi on d.id = oi.department_id
|
from department d left join operation_info oi on d.id = oi.department_id
|
||||||
<where>
|
<where>
|
||||||
<if test="departmentCode != null and departmentCode != ''">
|
<if test="departmentCode != null and departmentCode != ''">
|
||||||
and d.department_code =
|
and d.department_code = #{departmentCode}
|
||||||
#{departmentCode}
|
|
||||||
</if>
|
</if>
|
||||||
<if test="departmentName != null and departmentName != ''">
|
<if test="departmentName != null and departmentName != ''">
|
||||||
and d.department_name like concat('%',
|
and d.department_name like concat('%',#{departmentName},'%')
|
||||||
#{departmentName},
|
|
||||||
'%'
|
|
||||||
)
|
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
GROUP BY d.id,
|
GROUP BY d.id,
|
||||||
d.parent_department_id,
|
d.department_name,
|
||||||
d.agency_id,
|
d.department_code
|
||||||
d.agency_name,
|
</select>
|
||||||
|
<select id="selectDepartmentListWechatTemplateNum"
|
||||||
|
resultType="com.xinelu.manage.domain.department.Department">
|
||||||
|
select d.id,
|
||||||
d.department_name,
|
d.department_name,
|
||||||
d.department_code,
|
d.department_code,
|
||||||
d.department_type,
|
count(wt.id) AS countNum
|
||||||
d.department_abbreviation,
|
from department d left join wechat_template wt on d.id = wt.department_id
|
||||||
d.department_person_id,
|
<where>
|
||||||
d.department_person_name,
|
<if test="departmentCode != null and departmentCode != ''">
|
||||||
d.node_type,
|
and d.department_code = #{departmentCode}
|
||||||
d.provide_service_category,
|
</if>
|
||||||
d.subdivision_category_id,
|
<if test="departmentName != null and departmentName != ''">
|
||||||
d.subdivision_category_name,
|
and d.department_name like concat('%',#{departmentName},'%')
|
||||||
d.norm_department_compare_id,
|
</if>
|
||||||
d.norm_department_compare_name,
|
</where>
|
||||||
d.prepare_beds_count,
|
GROUP BY d.id,
|
||||||
d.department_phone,
|
d.department_name,
|
||||||
d.department_mail,
|
d.department_code
|
||||||
d.establish_date,
|
|
||||||
d.revoke_date,
|
|
||||||
d.create_by,
|
|
||||||
d.create_time,
|
|
||||||
d.update_by,
|
|
||||||
d.update_time;
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertDepartment" parameterType="Department" useGeneratedKeys="true"
|
<insert id="insertDepartment" parameterType="Department" useGeneratedKeys="true"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user