Commit 7531e8ab authored by zhangwanglin's avatar zhangwanglin

Merge remote-tracking branch 'origin/master' into dev-20230128

parents a5bb8016 10abb843
...@@ -296,7 +296,8 @@ public class DisableController { ...@@ -296,7 +296,8 @@ public class DisableController {
// if (chDisableApply.getRegist() == null) { // if (chDisableApply.getRegist() == null) {
// return Result.failed("所在户籍不能为空!"); // return Result.failed("所在户籍不能为空!");
// } // }
if (StringUtils.isBlank(chDisableApply.getAcptProvincial()) || StringUtils.isBlank(chDisableApply.getAcptCity()) || StringUtils.isBlank(chDisableApply.getAcptArea()) || StringUtils.isBlank(chDisableApply.getAcptStreet()) || StringUtils.isBlank(chDisableApply.getAcptAddress())) { //StringUtils.isBlank(chDisableApply.getAcptStreet()) ||
if (StringUtils.isBlank(chDisableApply.getAcptProvincial()) || StringUtils.isBlank(chDisableApply.getAcptCity()) || StringUtils.isBlank(chDisableApply.getAcptArea()) || StringUtils.isBlank(chDisableApply.getAcptAddress())) {
return Result.failed("接受评定地址不能为空!"); return Result.failed("接受评定地址不能为空!");
} }
if (StringUtils.isBlank(chDisableApply.getAcptSrvProvincial()) || StringUtils.isBlank(chDisableApply.getAcptSrvCity()) || StringUtils.isBlank(chDisableApply.getAcptSrvArea()) || StringUtils.isBlank(chDisableApply.getAcptSrvAddress())) { if (StringUtils.isBlank(chDisableApply.getAcptSrvProvincial()) || StringUtils.isBlank(chDisableApply.getAcptSrvCity()) || StringUtils.isBlank(chDisableApply.getAcptSrvArea()) || StringUtils.isBlank(chDisableApply.getAcptSrvAddress())) {
...@@ -393,7 +394,8 @@ public class DisableController { ...@@ -393,7 +394,8 @@ public class DisableController {
*/ */
@PostMapping("/addOrUpdateDisInfoChange") @PostMapping("/addOrUpdateDisInfoChange")
public Result addOrUpdateDisInfoChange(DisableUpdateDetailVO disableUpdateDetailVO) { public Result addOrUpdateDisInfoChange(DisableUpdateDetailVO disableUpdateDetailVO) {
if (null == disableUpdateDetailVO.getDisabInfoId() || StrUtil.isBlank(disableUpdateDetailVO.getOrganId()) || StrUtil.isBlank(disableUpdateDetailVO.getDistrictProvince()) || StrUtil.isBlank(disableUpdateDetailVO.getDistrictCity()) || StrUtil.isBlank(disableUpdateDetailVO.getDistrictArea()) || StrUtil.isBlank(disableUpdateDetailVO.getRealName()) || StrUtil.isBlank(disableUpdateDetailVO.getCertifNum()) || null == disableUpdateDetailVO.getBirthday() || StrUtil.isBlank(disableUpdateDetailVO.getGender()) || StrUtil.isBlank(disableUpdateDetailVO.getTel()) || null == disableUpdateDetailVO.getRegist() || StrUtil.isBlank(disableUpdateDetailVO.getAcptProvincial()) || StrUtil.isBlank(disableUpdateDetailVO.getAcptCity()) || StrUtil.isBlank(disableUpdateDetailVO.getAcptArea()) || StrUtil.isBlank(disableUpdateDetailVO.getAcptStreet()) || StrUtil.isBlank(disableUpdateDetailVO.getAcptDetail()) || StrUtil.isBlank(disableUpdateDetailVO.getAcptSrvProvincial()) || StrUtil.isBlank(disableUpdateDetailVO.getAcptSrvCity()) || StrUtil.isBlank(disableUpdateDetailVO.getAcptSrvArea()) || StrUtil.isBlank(disableUpdateDetailVO.getAcptSrvAddress()) || null == disableUpdateDetailVO.getAcptSrvType() || StrUtil.isBlank(disableUpdateDetailVO.getAddressProvincial()) || StrUtil.isBlank(disableUpdateDetailVO.getAddressCity()) || StrUtil.isBlank(disableUpdateDetailVO.getAddressArea()) || StrUtil.isBlank(disableUpdateDetailVO.getAddressStreet()) || StrUtil.isBlank(disableUpdateDetailVO.getAddressDetail()) || null == disableUpdateDetailVO.getAddressType() || StrUtil.isBlank(disableUpdateDetailVO.getChangeReason())) { //StrUtil.isBlank(disableUpdateDetailVO.getAcptStreet()) ||
if (null == disableUpdateDetailVO.getDisabInfoId() || StrUtil.isBlank(disableUpdateDetailVO.getOrganId()) || StrUtil.isBlank(disableUpdateDetailVO.getDistrictProvince()) || StrUtil.isBlank(disableUpdateDetailVO.getDistrictCity()) || StrUtil.isBlank(disableUpdateDetailVO.getDistrictArea()) || StrUtil.isBlank(disableUpdateDetailVO.getRealName()) || StrUtil.isBlank(disableUpdateDetailVO.getCertifNum()) || null == disableUpdateDetailVO.getBirthday() || StrUtil.isBlank(disableUpdateDetailVO.getGender()) || StrUtil.isBlank(disableUpdateDetailVO.getTel()) || null == disableUpdateDetailVO.getRegist() || StrUtil.isBlank(disableUpdateDetailVO.getAcptProvincial()) || StrUtil.isBlank(disableUpdateDetailVO.getAcptCity()) || StrUtil.isBlank(disableUpdateDetailVO.getAcptArea()) || StrUtil.isBlank(disableUpdateDetailVO.getAcptDetail()) || StrUtil.isBlank(disableUpdateDetailVO.getAcptSrvProvincial()) || StrUtil.isBlank(disableUpdateDetailVO.getAcptSrvCity()) || StrUtil.isBlank(disableUpdateDetailVO.getAcptSrvArea()) || StrUtil.isBlank(disableUpdateDetailVO.getAcptSrvAddress()) || null == disableUpdateDetailVO.getAcptSrvType() || StrUtil.isBlank(disableUpdateDetailVO.getAddressProvincial()) || StrUtil.isBlank(disableUpdateDetailVO.getAddressCity()) || StrUtil.isBlank(disableUpdateDetailVO.getAddressArea()) || StrUtil.isBlank(disableUpdateDetailVO.getAddressStreet()) || StrUtil.isBlank(disableUpdateDetailVO.getAddressDetail()) || null == disableUpdateDetailVO.getAddressType() || StrUtil.isBlank(disableUpdateDetailVO.getChangeReason())) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR); return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
} }
return disableService.addOrUpdateDisInfoChange(disableUpdateDetailVO); return disableService.addOrUpdateDisInfoChange(disableUpdateDetailVO);
......
...@@ -64,8 +64,7 @@ ...@@ -64,8 +64,7 @@
<if test="programId != null"> <if test="programId != null">
LEFT JOIN CH_SRV_PROGRAM_SET ON ITEM_ID = PROJECT_ID AND PROGRAM_ID = #{programId} LEFT JOIN CH_SRV_PROGRAM_SET ON ITEM_ID = PROJECT_ID AND PROGRAM_ID = #{programId}
</if> </if>
WHERE SRV_ORGAN_ID = #{srvOrganId} WHERE STATUS = 0
AND STATUS = 0
</select> </select>
<select id="organProjectList" resultType="com.hungraim.ltc.pojo.vo.governance.OrganProjectVO"> <select id="organProjectList" resultType="com.hungraim.ltc.pojo.vo.governance.OrganProjectVO">
...@@ -78,7 +77,8 @@ ...@@ -78,7 +77,8 @@
project.srv_organ_id srvOrganId, project.srv_organ_id srvOrganId,
org.ORGAN_ID organId, org.ORGAN_ID organId,
--护理服务项目名称 --护理服务项目名称
project.item_name itemName, --project.item_name itemName,
d.service_type_detailed_name itemName,
--备注 --备注
project.remark remark, project.remark remark,
--状态 --状态
...@@ -92,6 +92,7 @@ ...@@ -92,6 +92,7 @@
FROM CH_SRV_ORGAN_PROJECT project FROM CH_SRV_ORGAN_PROJECT project
left join ch_srv_organ organ on project.SRV_ORGAN_ID = organ.SRV_ORGAN_ID left join ch_srv_organ organ on project.SRV_ORGAN_ID = organ.SRV_ORGAN_ID
left join CH_FND_ORGAN org on organ.ORGAN_ID = org.ORGAN_ID left join CH_FND_ORGAN org on organ.ORGAN_ID = org.ORGAN_ID
left join CH_SERVICE_TYPE_detailed d on d.service_type_detailed_id = project.item_name
<where> <where>
<if test="organIds != null"> <if test="organIds != null">
and project.srv_organ_id in and project.srv_organ_id in
......
package com.hungraim.ltc.system.controller; package com.hungraim.ltc.system.controller;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.system.SystemRole; import com.hungraim.ltc.pojo.entity.system.SystemRole;
import com.hungraim.ltc.pojo.entity.system.SystemRoleResource; import com.hungraim.ltc.pojo.entity.system.SystemRoleResource;
import com.hungraim.ltc.pojo.vo.system.ReqRoleInfo; import com.hungraim.ltc.pojo.vo.system.ReqRoleInfo;
import com.hungraim.ltc.system.dao.SystemRoleResourceMapper;
import com.hungraim.ltc.system.service.ISystemRoleResourceService; import com.hungraim.ltc.system.service.ISystemRoleResourceService;
import com.hungraim.ltc.system.service.ISystemRoleService; import com.hungraim.ltc.system.service.ISystemRoleService;
import com.hungraim.ltc.util.Result; import com.hungraim.ltc.util.Result;
...@@ -14,6 +16,7 @@ import lombok.extern.slf4j.Slf4j; ...@@ -14,6 +16,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -29,6 +32,8 @@ public class RoleController { ...@@ -29,6 +32,8 @@ public class RoleController {
@Autowired @Autowired
private ISystemRoleResourceService roleResourceService; private ISystemRoleResourceService roleResourceService;
@Resource
private SystemRoleResourceMapper systemRoleResourceMapper;
@Autowired @Autowired
private ISystemRoleService roleService; private ISystemRoleService roleService;
...@@ -177,7 +182,10 @@ public class RoleController { ...@@ -177,7 +182,10 @@ public class RoleController {
List<Long> deleteRoleResources = roleResources.stream() List<Long> deleteRoleResources = roleResources.stream()
.map(SystemRoleResource::getResourceId).filter(resourceId -> !reqRoleInfo.getResource().contains(resourceId)) .map(SystemRoleResource::getResourceId).filter(resourceId -> !reqRoleInfo.getResource().contains(resourceId))
.collect(Collectors.toList()); .collect(Collectors.toList());
roleResourceService.removeByIds(deleteRoleResources); if(!deleteRoleResources.isEmpty()){
systemRoleResourceMapper.removeByIds(deleteRoleResources,reqRoleInfo.getId());
}
return Result.success("更新成功"); return Result.success("更新成功");
} }
......
...@@ -229,7 +229,7 @@ public class UserController { ...@@ -229,7 +229,7 @@ public class UserController {
} }
if (flag) { if (flag) {
systemUser.setUpdatedTime(new Date()); systemUser.setUpdatedTime(new Date());
userInfoService.save(systemUser); userInfoService.updateById(systemUser);
} }
//查询该角色下所有的资源数据 //查询该角色下所有的资源数据
List<SystemUserRole> roleResources = userRoleService.list(new LambdaQueryWrapper<SystemUserRole>().eq(SystemUserRole::getUserId, reqUserInfo.getId())); List<SystemUserRole> roleResources = userRoleService.list(new LambdaQueryWrapper<SystemUserRole>().eq(SystemUserRole::getUserId, reqUserInfo.getId()));
......
...@@ -3,6 +3,7 @@ package com.hungraim.ltc.system.dao; ...@@ -3,6 +3,7 @@ package com.hungraim.ltc.system.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.system.SystemRoleResource; import com.hungraim.ltc.pojo.entity.system.SystemRoleResource;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import java.util.List; import java.util.List;
...@@ -22,4 +23,6 @@ public interface SystemRoleResourceMapper extends BaseMapper<SystemRoleResource> ...@@ -22,4 +23,6 @@ public interface SystemRoleResourceMapper extends BaseMapper<SystemRoleResource>
*/ */
@Select("SELECT ROLE_ID FROM LTC_ROLE_RESOURCE WHERE RESOURCE_ID = #{resourceId} ") @Select("SELECT ROLE_ID FROM LTC_ROLE_RESOURCE WHERE RESOURCE_ID = #{resourceId} ")
List<Long> listRoleIds(long resourceId); List<Long> listRoleIds(long resourceId);
Integer removeByIds(@Param("resourceIds") List<Long> resourceIds, @Param("id") Long id);
} }
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hungraim.ltc.system.dao.SystemRoleResourceMapper">
<delete id="removeByIds" parameterType="list">
delete from LTC_ROLE_RESOURCE where RESOURCE_ID in
<foreach collection="resourceIds" item="resourceId" open="("
separator="," close=")">
#{resourceId}
</foreach>
and ROLE_ID=#{id}
</delete>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment