用户修改
This commit is contained in:
parent
153dc53d69
commit
ed18d0fc72
@ -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);
|
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);
|
List<AgencyNameVO> selectBelongAgencyList(Long agencyId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -496,15 +496,9 @@ public class SysUserServiceImpl implements ISysUserService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public TableDataInfo selectUserAgency(String userName, String agencyName) {
|
public TableDataInfo selectUserAgency(String userName, String agencyName) {
|
||||||
pageServiceUtil.startPage();
|
|
||||||
List<AgencyNameVO> agencyList = userMapper.selectAgencyList(agencyName);
|
|
||||||
if (CollectionUtils.isNotEmpty(agencyList)) {
|
|
||||||
SysUser sysUser = userMapper.selectUserByUserName(userName);
|
SysUser sysUser = userMapper.selectUserByUserName(userName);
|
||||||
if (Objects.nonNull(sysUser) && Objects.nonNull(sysUser.getAgencyId())) {
|
pageServiceUtil.startPage();
|
||||||
List<AgencyNameVO> collect = agencyList.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getAgencyId()) && sysUser.getAgencyId().equals(item.getAgencyId())).collect(Collectors.toList());
|
List<AgencyNameVO> agencyList = userMapper.selectAgencyList(agencyName, sysUser.getAgencyId());
|
||||||
agencyList.removeAll(collect);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return pageServiceUtil.getDataTable(agencyList);
|
return pageServiceUtil.getDataTable(agencyList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -520,6 +514,10 @@ public class SysUserServiceImpl implements ISysUserService {
|
|||||||
if (Objects.nonNull(sysUser) && Objects.nonNull(sysUser.getAgencyId())) {
|
if (Objects.nonNull(sysUser) && Objects.nonNull(sysUser.getAgencyId())) {
|
||||||
return userMapper.selectBelongAgencyList(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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -251,7 +251,7 @@
|
|||||||
<if test="remark != null">remark = #{remark},</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>
|
<if test="userBirthDate != null">user_birth_date = #{userBirthDate},</if>
|
||||||
<if test="agencyId != null">agency_id =#{agencyId},</if>
|
agency_id =#{agencyId},
|
||||||
update_time = sysdate()
|
update_time = sysdate()
|
||||||
</set>
|
</set>
|
||||||
where user_id = #{userId}
|
where user_id = #{userId}
|
||||||
@ -294,25 +294,36 @@
|
|||||||
agency_code,
|
agency_code,
|
||||||
(select COUNT(1)
|
(select COUNT(1)
|
||||||
from agency
|
from agency
|
||||||
where 1 = 1
|
where agency_status = 'ON'
|
||||||
<if test="agencyName != null and agencyName != ''">
|
<if test="agencyName != null and agencyName != ''">
|
||||||
and agency_name = #{agencyName}
|
and agency_name = #{agencyName}
|
||||||
or agency_code = #{agencyName}
|
or agency_code = #{agencyName}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="agencyId != null ">
|
||||||
|
and id <> #{agencyId}
|
||||||
|
</if>
|
||||||
) as agencyNum
|
) as agencyNum
|
||||||
from agency
|
from agency
|
||||||
where 1 = 1
|
where agency_status = 'ON'
|
||||||
<if test="agencyName != null and agencyName != ''">
|
<if test="agencyName != null and agencyName != ''">
|
||||||
and agency_name = #{agencyName}
|
and agency_name = #{agencyName}
|
||||||
or agency_code = #{agencyName}
|
or agency_code = #{agencyName}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="agencyId != null ">
|
||||||
|
and id <> #{agencyId}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectBelongAgencyList" resultType="com.xinelu.system.domain.vo.AgencyNameVO">
|
<select id="selectBelongAgencyList" resultType="com.xinelu.system.domain.vo.AgencyNameVO">
|
||||||
select id agencyId,
|
select id agencyId,
|
||||||
agency_name,
|
agency_name,
|
||||||
agency_code
|
agency_code,
|
||||||
|
(select COUNT(1)
|
||||||
from agency
|
from agency
|
||||||
where id = #{agencyId}
|
where id = #{agencyId}
|
||||||
|
and agency_status = 'ON') as agencyNum
|
||||||
|
from agency
|
||||||
|
where id = #{agencyId}
|
||||||
|
and agency_status = 'ON'
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue
Block a user