Merge branch 'youxilong_2.26_院后第一增量' of http://192.168.16.64:3000/jihan/PostDischargePatientManage into youxilong_2.26_院后第一增量
This commit is contained in:
commit
e00df9fab2
@ -1,150 +0,0 @@
|
||||
package com.xinelu.manage.vo.questioninfo;
|
||||
|
||||
import com.xinelu.common.annotation.Excel;
|
||||
import com.xinelu.manage.domain.questioninfo.QuestionInfo;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 问卷基本信息对象 question_info
|
||||
*
|
||||
* @author xinelu
|
||||
* @date 2024-02-28
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "问卷基本信息对象", description = "question_info")
|
||||
public class QuestionVO extends QuestionInfo {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 所属科室id
|
||||
*/
|
||||
@ApiModelProperty(value = "所属科室id")
|
||||
@Excel(name = "所属科室id")
|
||||
private Long departmentId;
|
||||
|
||||
/**
|
||||
* 所属科室名称
|
||||
*/
|
||||
@ApiModelProperty(value = "所属科室名称")
|
||||
@Excel(name = "所属科室名称")
|
||||
private String departmentName;
|
||||
|
||||
/**
|
||||
* 病种id
|
||||
*/
|
||||
@ApiModelProperty(value = "病种id")
|
||||
@Excel(name = "病种id")
|
||||
private Long diseaseTypeId;
|
||||
|
||||
/**
|
||||
* 病种名称
|
||||
*/
|
||||
@ApiModelProperty(value = "病种名称")
|
||||
@Excel(name = "病种名称")
|
||||
private String diseaseTypeName;
|
||||
|
||||
/**
|
||||
* 问卷标题
|
||||
*/
|
||||
@ApiModelProperty(value = "问卷标题")
|
||||
@Excel(name = "问卷标题")
|
||||
private String questionnaireName;
|
||||
|
||||
/**
|
||||
* 问卷说明
|
||||
*/
|
||||
@ApiModelProperty(value = "问卷说明")
|
||||
@Excel(name = "问卷说明")
|
||||
private String questionnaireDescription;
|
||||
|
||||
/**
|
||||
* 作答方式,一页一题:ONE_PAGE_ONE_QUESTION,非一页一题:NOT_ONE_PAGE_ONE_QUESTION
|
||||
*/
|
||||
@ApiModelProperty(value = "作答方式,一页一题:ONE_PAGE_ONE_QUESTION,非一页一题:NOT_ONE_PAGE_ONE_QUESTION")
|
||||
@Excel(name = "作答方式,一页一题:ONE_PAGE_ONE_QUESTION,非一页一题:NOT_ONE_PAGE_ONE_QUESTION")
|
||||
private String answeringMethod;
|
||||
|
||||
/**
|
||||
* 问卷ID
|
||||
*/
|
||||
@ApiModelProperty(value = "问卷ID")
|
||||
@Excel(name = "问卷ID")
|
||||
private String questionnaireId;
|
||||
|
||||
/**
|
||||
* 问题个数
|
||||
*/
|
||||
@ApiModelProperty(value = "问题个数")
|
||||
@Excel(name = "问题个数")
|
||||
private Integer questionCount;
|
||||
|
||||
/**
|
||||
* 问卷总分值,小数点后两位
|
||||
*/
|
||||
@ApiModelProperty(value = "问卷总分值,小数点后两位")
|
||||
@Excel(name = "问卷总分值,小数点后两位")
|
||||
private BigDecimal questionnaireTotalScore;
|
||||
|
||||
/**
|
||||
* 问卷状态,已发布:PUBLISHED,未发布:UNPUBLISHED
|
||||
*/
|
||||
@ApiModelProperty(value = "问卷状态,已发布:PUBLISHED,未发布:UNPUBLISHED")
|
||||
@Excel(name = "问卷状态,已发布:PUBLISHED,未发布:UNPUBLISHED")
|
||||
private String questionnaireStatus;
|
||||
|
||||
/**
|
||||
* 问卷排序
|
||||
*/
|
||||
@ApiModelProperty(value = "问卷排序")
|
||||
@Excel(name = "问卷排序")
|
||||
private Integer questionnaireSort;
|
||||
|
||||
/**
|
||||
* 问卷备注信息
|
||||
*/
|
||||
@ApiModelProperty(value = "问卷备注信息")
|
||||
@Excel(name = "问卷备注信息")
|
||||
private String questionnaireRemark;
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("departmentId", getDepartmentId())
|
||||
.append("departmentName", getDepartmentName())
|
||||
.append("diseaseTypeId", getDiseaseTypeId())
|
||||
.append("diseaseTypeName", getDiseaseTypeName())
|
||||
.append("questionnaireName", getQuestionnaireName())
|
||||
.append("questionnaireDescription", getQuestionnaireDescription())
|
||||
.append("answeringMethod", getAnsweringMethod())
|
||||
.append("questionnaireId", getQuestionnaireId())
|
||||
.append("questionCount", getQuestionCount())
|
||||
.append("questionnaireTotalScore", getQuestionnaireTotalScore())
|
||||
.append("questionnaireStatus", getQuestionnaireStatus())
|
||||
.append("questionnaireSort", getQuestionnaireSort())
|
||||
.append("questionnaireRemark", getQuestionnaireRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -126,7 +126,7 @@ public interface SysUserMapper {
|
||||
*/
|
||||
public SysUser checkEmailUnique(String email);
|
||||
|
||||
List<AgencyNameVO> selectAgencyList(String agencyName);
|
||||
List<AgencyNameVO> selectAgencyList(@Param("agencyName") String agencyName, @Param("agencyId") Long agencyId);
|
||||
|
||||
List<AgencyNameVO> selectBelongAgencyList(Long agencyId);
|
||||
}
|
||||
|
||||
@ -496,15 +496,9 @@ public class SysUserServiceImpl implements ISysUserService {
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo selectUserAgency(String userName, String agencyName) {
|
||||
SysUser sysUser = userMapper.selectUserByUserName(userName);
|
||||
pageServiceUtil.startPage();
|
||||
List<AgencyNameVO> agencyList = userMapper.selectAgencyList(agencyName);
|
||||
if (CollectionUtils.isNotEmpty(agencyList)) {
|
||||
SysUser sysUser = userMapper.selectUserByUserName(userName);
|
||||
if (Objects.nonNull(sysUser) && Objects.nonNull(sysUser.getAgencyId())) {
|
||||
List<AgencyNameVO> collect = agencyList.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getAgencyId()) && sysUser.getAgencyId().equals(item.getAgencyId())).collect(Collectors.toList());
|
||||
agencyList.removeAll(collect);
|
||||
}
|
||||
}
|
||||
List<AgencyNameVO> agencyList = userMapper.selectAgencyList(agencyName, sysUser.getAgencyId());
|
||||
return pageServiceUtil.getDataTable(agencyList);
|
||||
}
|
||||
|
||||
@ -520,6 +514,10 @@ public class SysUserServiceImpl implements ISysUserService {
|
||||
if (Objects.nonNull(sysUser) && Objects.nonNull(sysUser.getAgencyId())) {
|
||||
return userMapper.selectBelongAgencyList(sysUser.getAgencyId());
|
||||
}
|
||||
return new ArrayList<AgencyNameVO>();
|
||||
AgencyNameVO agencyNameVO = new AgencyNameVO();
|
||||
agencyNameVO.setAgencyNum(0);
|
||||
List<AgencyNameVO> agencyNameVOS = new ArrayList<>();
|
||||
agencyNameVOS.add(agencyNameVO);
|
||||
return agencyNameVOS;
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,6 +25,7 @@
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="userCardNo" column="user_card_no"/>
|
||||
<result property="userBirthDate" column="user_birth_date"/>
|
||||
<result property="agencyId" column="agency_id"/>
|
||||
<association property="dept" column="dept_id" javaType="SysDept" resultMap="deptResult"/>
|
||||
<collection property="roles" javaType="java.util.List" resultMap="RoleResult"/>
|
||||
</resultMap>
|
||||
@ -49,19 +50,48 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectUserVo">
|
||||
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
|
||||
u.user_card_no,u.user_birth_date,d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
|
||||
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
|
||||
select u.user_id,
|
||||
u.dept_id,
|
||||
u.user_name,
|
||||
u.nick_name,
|
||||
u.email,
|
||||
u.avatar,
|
||||
u.phonenumber,
|
||||
u.password,
|
||||
u.sex,
|
||||
u.status,
|
||||
u.del_flag,
|
||||
u.login_ip,
|
||||
u.login_date,
|
||||
u.create_by,
|
||||
u.create_time,
|
||||
u.remark,
|
||||
u.user_card_no,
|
||||
u.user_birth_date,
|
||||
u.agency_id,
|
||||
d.dept_id,
|
||||
d.parent_id,
|
||||
d.ancestors,
|
||||
d.dept_name,
|
||||
d.order_num,
|
||||
d.leader,
|
||||
d.status as dept_status,
|
||||
r.role_id,
|
||||
r.role_name,
|
||||
r.role_key,
|
||||
r.role_sort,
|
||||
r.data_scope,
|
||||
r.status as role_status
|
||||
from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
left join sys_user_role ur on u.user_id = ur.user_id
|
||||
left join sys_role r on r.role_id = ur.role_id
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
left join sys_user_role ur on u.user_id = ur.user_id
|
||||
left join sys_role r on r.role_id = ur.role_id
|
||||
</sql>
|
||||
|
||||
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
|
||||
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status,
|
||||
u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,u.user_card_no,u.user_birth_date, d.dept_name, d.leader from sys_user
|
||||
u
|
||||
u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,u.user_card_no,u.user_birth_date,
|
||||
u.agency_id,d.dept_name, d.leader from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
where u.del_flag = '0'
|
||||
<if test="userId != null and userId != 0">
|
||||
@ -73,6 +103,9 @@
|
||||
<if test="status != null and status != ''">
|
||||
AND u.status = #{status}
|
||||
</if>
|
||||
<if test="agencyId != null">
|
||||
AND u.agency_id = #{agencyId}
|
||||
</if>
|
||||
<if test="userCardNo != null and userCardNo != ''">
|
||||
AND u.user_card_no = #{userCardNo}
|
||||
</if>
|
||||
@ -97,7 +130,8 @@
|
||||
</select>
|
||||
|
||||
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status,
|
||||
u.create_time,u.agency_id
|
||||
from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
left join sys_user_role ur on u.user_id = ur.user_id
|
||||
@ -114,7 +148,8 @@
|
||||
</select>
|
||||
|
||||
<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status,
|
||||
u.create_time,u.agency_id
|
||||
from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
left join sys_user_role ur on u.user_id = ur.user_id
|
||||
@ -143,16 +178,22 @@
|
||||
</select>
|
||||
|
||||
<select id="checkUserNameUnique" parameterType="String" resultType="int">
|
||||
select count(1) from sys_user where user_name = #{userName} limit 1
|
||||
</select>
|
||||
select count(1)
|
||||
from sys_user
|
||||
where user_name = #{userName} limit 1
|
||||
</select>
|
||||
|
||||
<select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult">
|
||||
select user_id, phonenumber from sys_user where phonenumber = #{phonenumber} limit 1
|
||||
</select>
|
||||
select user_id, phonenumber
|
||||
from sys_user
|
||||
where phonenumber = #{phonenumber} limit 1
|
||||
</select>
|
||||
|
||||
<select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">
|
||||
select user_id, email from sys_user where email = #{email} limit 1
|
||||
</select>
|
||||
select user_id, email
|
||||
from sys_user
|
||||
where email = #{email} limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
|
||||
insert into sys_user(
|
||||
@ -170,6 +211,7 @@
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="userCardNo != null and userCardNo != ''">user_card_no,</if>
|
||||
<if test="userBirthDate != null">user_birth_date,</if>
|
||||
<if test="agencyId != null">agency_id,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="userId != null and userId != ''">#{userId},</if>
|
||||
@ -186,6 +228,7 @@
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="userCardNo != null and userCardNo != ''">#{userCardNo},</if>
|
||||
<if test="userBirthDate != null">#{userBirthDate},</if>
|
||||
<if test="agencyId != null">#{agencyId},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
@ -206,28 +249,37 @@
|
||||
<if test="loginDate != null">login_date = #{loginDate},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="userCardNo != null and userCardNo != ''"> user_card_no = #{userCardNo},</if>
|
||||
<if test="userCardNo != null and userCardNo != ''">user_card_no = #{userCardNo},</if>
|
||||
<if test="userBirthDate != null">user_birth_date = #{userBirthDate},</if>
|
||||
agency_id =#{agencyId},
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where user_id = #{userId}
|
||||
</update>
|
||||
|
||||
<update id="updateUserStatus" parameterType="SysUser">
|
||||
update sys_user set status = #{status} where user_id = #{userId}
|
||||
</update>
|
||||
update sys_user
|
||||
set status = #{status}
|
||||
where user_id = #{userId}
|
||||
</update>
|
||||
|
||||
<update id="updateUserAvatar" parameterType="SysUser">
|
||||
update sys_user set avatar = #{avatar} where user_name = #{userName}
|
||||
</update>
|
||||
update sys_user
|
||||
set avatar = #{avatar}
|
||||
where user_name = #{userName}
|
||||
</update>
|
||||
|
||||
<update id="resetUserPwd" parameterType="SysUser">
|
||||
update sys_user set password = #{password} where user_name = #{userName}
|
||||
</update>
|
||||
update sys_user
|
||||
set password = #{password}
|
||||
where user_name = #{userName}
|
||||
</update>
|
||||
|
||||
<delete id="deleteUserById" parameterType="Long">
|
||||
update sys_user set del_flag = '2' where user_id = #{userId}
|
||||
</delete>
|
||||
update sys_user
|
||||
set del_flag = '2'
|
||||
where user_id = #{userId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteUserByIds" parameterType="Long">
|
||||
update sys_user set del_flag = '2' where user_id in
|
||||
@ -242,25 +294,36 @@
|
||||
agency_code,
|
||||
(select COUNT(1)
|
||||
from agency
|
||||
where 1 = 1
|
||||
where agency_status = 'ON'
|
||||
<if test="agencyName != null and agencyName != ''">
|
||||
and agency_name = #{agencyName}
|
||||
or agency_code = #{agencyName}
|
||||
</if>
|
||||
<if test="agencyId != null ">
|
||||
and id <> #{agencyId}
|
||||
</if>
|
||||
) as agencyNum
|
||||
from agency
|
||||
where 1 = 1
|
||||
where agency_status = 'ON'
|
||||
<if test="agencyName != null and agencyName != ''">
|
||||
and agency_name = #{agencyName}
|
||||
or agency_code = #{agencyName}
|
||||
</if>
|
||||
<if test="agencyId != null ">
|
||||
and id <> #{agencyId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectBelongAgencyList" resultType="com.xinelu.system.domain.vo.AgencyNameVO">
|
||||
select id agencyId,
|
||||
select id agencyId,
|
||||
agency_name,
|
||||
agency_code
|
||||
agency_code,
|
||||
(select COUNT(1)
|
||||
from agency
|
||||
where id = #{agencyId}
|
||||
and agency_status = 'ON') as agencyNum
|
||||
from agency
|
||||
where id = #{agencyId}
|
||||
and agency_status = 'ON'
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user