Commit 7b623153 authored by maqing's avatar maqing

Merge branch 'master' into dev_20230210_dtd

# Conflicts: # gateway-service/src/main/java/com/hungraim/ltc/gateway/config/ResourceServerConfig.java # gateway-service/src/main/java/com/hungraim/ltc/gateway/security/AuthorizationManager.java
parents 899b5a46 9153e277
......@@ -16,7 +16,7 @@ import java.util.List;
@Repository
public interface ChDisabAccountsDetailMapper extends BaseMapper<ChDisabDetailAccounts> {
List<OrganAccountsVO> getOrganAccountsList(@Param("taskDetailIds") List<String> taskDetailIds, String status);
List<OrganAccountsVO> getOrganAccountsList(String taskDetailId);
Page<SrvOrganAccountListResp> searchSrvOrganAccountList(Page page, List<Long> organIds, SrvOrganListReq req);
......
......@@ -11,10 +11,10 @@
--身份证号
disable.CERTI_CODE certiCode,
--所在省市
apply.MEDICAL_AREA medicalArea,
mode1.MODE_ID modeId,
(select district_name from ch_fnd_district dis where apply.MEDICAL_AREA = dis.district_code) medicalArea,
program.SRV_MODE_ID modeId,
--服务方式
mode1.mode_name srvModeName,
DECODE(program.SRV_MODE_ID, '1','医疗','2', '养老','3','上门', '4', '异地') srvModeName,
--护理机构名称
organ.srv_organ_id srvOrganId,
--护理机构名称
......@@ -23,41 +23,21 @@
emp.emp_name empName,
--任务时间
detail.SRV_DATE srvDate,
detail.SRV_START_TIME srvStartTime,
detail.SRV_END_TIME srvEndTime,
-- 机构等级
organ.LEVEL_CODE levelCode,
-- 失能等级
level1.DISABLE_LEVEL_NAME disableLevelName,
d.service_type_detailed_name itemName
,d.PARA_ID,
CSOP.ITEM_TIMES,
CSOP.ITEM_TIMES_TYPE,
CSTFI.ITEM_ID itemId
from ch_srv_task_detail detail--服务计划
left join ch_srv_task task on task.srv_task_id = detail.srv_task_id--服务计划详情
left join ch_disable_info disable on task.disab_info_id = disable.disab_info_id--失能人员
left join CH_DEV.CH_DISABLE_APPLY apply on apply.apply_id = disable.apply_id
left join ch_apr_task aprtask on disable.last_task_id = aprtask.task_id--评定任务
left join ch_apr_report report on aprtask.task_id = report.task_id--评定报告
left join CH_DISABLE_APPLY apply on apply.apply_id = disable.apply_id
left join ch_srv_organ_emp emp on task.srv_emp_id = emp.emp_id--护理人员
left join ch_srv_program program on task.program_id = program.program_id--服务方案
left join ch_srv_organ organ on program.srv_organ_id = organ.srv_organ_id--服务机构
left join ch_cfg_srv_mode mode1 on program.srv_mode_id = mode1.mode_id--服务方式
left join ch_srv_organ_emp emp on task.srv_emp_id = emp.emp_id--护理人员
-- 失能等级
left join ch_cfg_srv_disable_level level1 on report.disable_level_id = level1.disable_level_id
LEFT JOIN CH_SRV_TASK_FINISH_ITEM CSTFI ON detail.TASK_DETAIL_ID = CSTFI.TASK_DETAIL_ID
LEFT JOIN CH_SRV_ORGAN_PROJECT CSOP ON CSOP.PROJECT_ID = CSTFI.ITEM_ID
LEFT JOIN CH_SERVICE_TYPE_detailed d on d.service_type_detailed_id = CSOP.item_name
<where>
<if test="status != null and status != ''">
AND detail.STATUS = #{status}
</if>
<if test="taskDetailIds != null and taskDetailIds.size() > 0">
AND detail.TASK_DETAIL_ID IN
<foreach collection="taskDetailIds" separator="," open="(" close=")" item="taskDetailId">
#{taskDetailId}
</foreach>
detail.STATUS = '4'
<if test="taskDetailId != null and taskDetailId != ''">
AND detail.TASK_DETAIL_ID = #{taskDetailId}
</if>
</where>
</select>
......@@ -169,7 +149,7 @@ select
--身份证号
disable.CERTI_CODE certiCode,
--所在省市
apply.MEDICAL_AREA medicalArea,
(select district_name from ch_fnd_district dis where apply.MEDICAL_AREA = dis.district_code) medicalArea,
mode1.MODE_ID modeId,
--服务方式
mode1.mode_name srvModeName,
......@@ -190,7 +170,7 @@ select
from ch_srv_task_detail detail--服务计划
left join ch_srv_task task on task.srv_task_id = detail.srv_task_id--服务计划详情
left join ch_disable_info disable on task.disab_info_id = disable.disab_info_id--失能人员
left join CH_DEV.CH_DISABLE_APPLY apply on apply.apply_id = disable.apply_id
left join CH_DISABLE_APPLY apply on apply.apply_id = disable.apply_id
left join ch_apr_task aprtask on disable.last_task_id = aprtask.task_id--评定任务
left join ch_apr_report report on aprtask.task_id = report.task_id--评定报告
left join ch_srv_program program on task.program_id = program.program_id--服务方案
......
......@@ -11,7 +11,7 @@
d.ACCOUNTS_ALL_COST accountsAllCost,
d.ACCOUNTS_OVERALL_COST accountsOverallCost,
d.ACCOUNTS_PERSONAL_COST accountsPersonalCost,
apply.MEDICAL_AREA medicalArea,
(select district_name from ch_fnd_district dis where apply.MEDICAL_AREA = dis.district_code) medicalArea,
o.SRV_ORGAN_NAME srvOrganName,
info.REAL_NAME realName
from CH_DISAB_ACCOUNTS_DETAIL d
......
......@@ -9,11 +9,14 @@
plan.TASK_DETAIL_ID taskDetailId,
plan.ITEM_NAME itemName,
emp.emp_name empName,
organ.SRV_ORGAN_NAME srvOrganName,
DECODE(plan.MODE_ID, '1','医疗','2', '养老','3','上门', '4', '异地') srvModeName,
to_char(plan.SRV_PLAN_TIME,'yyyy-MM-dd') srvDate,
plan.IS_STATUS status
from ch_srv_plan plan
left join ch_disable_info info on plan.DISAB_INFO_ID = info.DISAB_INFO_ID
left join ch_srv_organ_emp emp on plan.emp_id = emp.emp_id
left join CH_SRV_ORGAN organ on organ.SRV_ORGAN_ID = plan.SRV_ORGAN_ID
<where>
<if test="req.status != null">
and plan.IS_STATUS = #{req.status}
......@@ -21,6 +24,9 @@
<if test="req.realName != null">
AND info.real_name LIKE CONCAT('%',CONCAT(#{req.realName},'%'))
</if>
<if test="req.srvOrganName != null">
AND organ.SRV_ORGAN_NAME LIKE CONCAT('%',CONCAT(#{req.srvOrganName},'%'))
</if>
</where>
</select>
......
......@@ -312,9 +312,12 @@ public class DisableController {
if (chDisableApply.getSrvModeId() == null) {
return Result.failed("申请服务方式不能为空!");
}
if (StringUtils.isBlank(chDisableApply.getDiseaseDesc())) {
return Result.failed("疾病描述及诊断不能为空!");
if (chDisableApply.getDiseTypeF() == null) {
return Result.failed("诊断疾病不能为空!");
}
/* if (StringUtils.isBlank(chDisableApply.getDiseaseDesc())) {
return Result.failed("疾病描述及诊断不能为空!");
}*/
if (chDisableApply.getMedicalType() == null) {
return Result.failed("医保类型不能为空!");
}
......@@ -367,9 +370,13 @@ public class DisableController {
if (chDisableApply.getSrvModeId() == null) {
return Result.failed("申请服务方式不能为空!");
}
if (StringUtils.isBlank(chDisableApply.getDiseaseDesc())) {
return Result.failed("疾病描述及诊断不能为空!");
if (chDisableApply.getDiseTypeF() == null) {
return Result.failed("诊断疾病不能为空!");
}
/* if (StringUtils.isBlank(chDisableApply.getDiseaseDesc())) {
return Result.failed("疾病描述及诊断不能为空!");
}*/
if (chDisableApply.getMedicalType() == null) {
return Result.failed("医保类型不能为空!");
}
......
......@@ -120,9 +120,8 @@
a.CHECK_REMARK checkRemark,
a.REASONS_REVIEW reasonsReview,
a.REASONS_REMARK reasonsRemark,
a.MEDICAL_PROVINCIAL medicalProvincial,
a.MEDICAL_CITY medicalCity,
a.MEDICAL_AREA medicalArea
a.MEDICAL_AREA medicalArea,
a.BANK_CARD_NO bankCardNo
from CH_DISABLE_APPLY a
LEFT JOIN CH_SRV_ORGAN o ON a.SRV_ORGAN_ID = o.SRV_ORGAN_ID
where a.APPLY_ID = #{applyId}
......
......@@ -124,12 +124,13 @@ public class TaskServiceImpl implements TaskService {
如果省市区下没有对应的组长,就查询省市下的对应组长,如果省市下也没有就查询省下的组长
*/
if (aprEmpVOS == null || aprEmpVOS.size() <= 0) {
if (StringUtils.isNotBlank(provincial) || StringUtils.isNotBlank(city) || StringUtils.isNotBlank(area)) {
/*if (StringUtils.isNotBlank(provincial) || StringUtils.isNotBlank(city) || StringUtils.isNotBlank(area)) {
aprEmpVOS = taskMapper.aprEmpList(provincial, city, null, organName, name, tel, groupLeader);
if (aprEmpVOS == null || aprEmpVOS.size() <= 0) {
aprEmpVOS = taskMapper.aprEmpList(provincial, null, null, organName, name, tel, groupLeader);
}
}
}*/
aprEmpVOS = taskMapper.aprEmpList(null, null, null, organName, name, tel, groupLeader);
}
return aprEmpVOS;
}
......
......@@ -26,11 +26,11 @@
LEFT JOIN CH_FND_ORGAN t3 ON t2.ORGAN_ID = t3.ORGAN_ID
left join ch_cfg_srv_mode mode1 on t1.mode_id = mode1.mode_id
<where>
<if test='req.accountsTime != null'>
AND t1.ACCOUNTS_TIME = #{req.accountsTime}
<if test="req.accountsTime != null and req.accountsTime != ''">
AND to_char(t1.ACCOUNTS_TIME,'yyyy-MM') = #{req.accountsTime}
</if>
<if test='req.organName != null'>
AND t2.ORGAN_NAME = #{req.organName}
<if test="req.organName != null and req.organName != ''">
AND t2.ORGAN_NAME LIKE CONCAT('%',CONCAT(#{req.organName},'%'))
</if>
</where>
</select>
......
......@@ -10,7 +10,7 @@
d.ASSESS_COST assessAllCost,
organ.organ_name assessOrganName,
to_char(d.ACCOUNTS_TIME,'yyyy-MM') accountsTime,
apply.MEDICAL_AREA medicalArea,
(select district_name from ch_fnd_district dis where apply.MEDICAL_AREA = dis.district_code) medicalArea,
to_char(d.assess_time,'yyyy-MM-dd') assessTime,
emp.REAL_NAME empName
from CH_ASSESS_ACCOUNTS_DETAIL d
......@@ -28,7 +28,7 @@ SELECT
t1.ASSESS_COST assessCost,
to_char(t1.assess_time,'yyyy-MM-dd') assessTime,
t4.REAL_NAME empName,
t2.MEDICAL_AREA medicalArea
(select district_name from ch_fnd_district dis where t2.MEDICAL_AREA = dis.district_code) medicalArea,
FROM
CH_ASSESS_ACCOUNTS_DETAIL t1
left join CH_DISABLE_APPLY t2 on t1.APPLY_ID = t2.APPLY_ID
......
......@@ -239,7 +239,7 @@
LEFT JOIN ch_srv_organ srvOrgan ON organ.organ_id = srvOrgan.srv_organ_id
<where>
and organ.STATUS = 0
<if test="provincial != null and provincial != ''">
<!--<if test="provincial != null and provincial != ''">
and (SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE organ.DISTRICT_PROVINCIAL = dis.DISTRICT_CODE) = #{provincial}
</if>
<if test="city != null and city != ''">
......@@ -247,7 +247,7 @@
</if>
<if test="area != null and area != ''">
and (SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE organ.DISTRICT_AREA = dis.DISTRICT_CODE) = #{area}
</if>
</if>-->
<if test="organName != null and organName != ''">
and organ.organ_name like CONCAT(CONCAT('%',#{organName}) ,'%')
</if>
......
package com.hungraim.ltc.controller;
import com.alibaba.fastjson.JSONObject;
import com.hungraim.ltc.util.CsoftSecurityUtil;
import com.hungraim.ltc.util.Result;
import lombok.AllArgsConstructor;
import lombok.SneakyThrows;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.security.jwt.JwtHelper;
import org.springframework.security.oauth2.common.OAuth2AccessToken;
import org.springframework.security.oauth2.provider.endpoint.TokenEndpoint;
import org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.security.Principal;
import java.util.Map;
......@@ -26,6 +24,7 @@ import java.util.Map;
@AllArgsConstructor
public class AuthController {
private final RedisTemplate redisTemplate;
private final TokenEndpoint tokenEndpoint;
@PostMapping("/token")
......@@ -48,15 +47,12 @@ public class AuthController {
return Result.success(keyMap.get(0).toString());
}
@GetMapping("/authLogout")
public Result authLogout(HttpServletRequest request, HttpServletResponse response) {
Authentication auth = SecurityContextHolder.getContext().getAuthentication();
//清除认证
if (auth != null) {
new SecurityContextLogoutHandler().logout(request, response, auth);
}
@PostMapping("/logout")
public Result doLogout(String access_token){
String claims = JwtHelper.decode(access_token).getClaims();
String jti = (String)JSONObject.parseObject(claims).get("jti");
redisTemplate.opsForValue().set(jti,access_token);
return Result.success();
}
}
......@@ -12,6 +12,7 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.web.authentication.logout.LogoutHandler;
import org.springframework.security.web.authentication.logout.LogoutSuccessHandler;
import org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler;
......@@ -20,7 +21,6 @@ import org.springframework.security.web.authentication.logout.SecurityContextLog
*/
@Configuration
@EnableWebSecurity
@EnableGlobalMethodSecurity(prePostEnabled = true,securedEnabled = true)
@Order(1)
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
......@@ -35,13 +35,8 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
.authorizeRequests().requestMatchers(EndpointRequest.toAnyEndpoint()).permitAll()
.and()
.authorizeRequests()
.antMatchers("/getPublicKey","/oauth/*").permitAll()
.anyRequest().authenticated()
.and()
.logout()
.logoutUrl("/oauth/logout")
.invalidateHttpSession(true);
.antMatchers("/getPublicKey","/oauth/**").permitAll()
.anyRequest().authenticated();
}
/**
......
......@@ -29,6 +29,7 @@ public class ChAprEmp {
private Integer cfgModeId;
private Integer age;
private Integer aprempTypeIdF;
private Integer aprempTypeIdP;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private java.util.Date fcd;
......@@ -51,4 +52,5 @@ public class ChAprEmp {
private java.util.Date effTime;
private Integer aprOrganId;
private Integer lcu;
}
......@@ -610,12 +610,12 @@ public class ChDisableApply extends PageInfo implements Serializable {
/**
*医保统筹区省
*/
private String medicalProvincial;
// private String medicalProvincial;
/**
*医保统筹区市
*/
private String medicalCity;
//private String medicalCity;
/**
*医保统筹区区
......
......@@ -26,6 +26,12 @@ public class SrvOrganListReq extends BaseReq {
*/
private Long srvOrganId;
/**
* 护理机构id
*/
private String srvOrganName;
/**
* 结算月份
*/
......
......@@ -17,4 +17,5 @@ public class SrvTaskReqVO extends BaseReq {
private String status;
private String srvOrganName;
}
......@@ -32,6 +32,6 @@ public class SrvTaskRespVO {
private Long status;
private String srvModeName;
}
......@@ -16,7 +16,7 @@ public class SrvOrganListReq extends BaseReq {
private Long organId;
private Long organName;
private String organName;
/**
* 是否包含下级机构
*/
......@@ -30,8 +30,7 @@ public class SrvOrganListReq extends BaseReq {
/**
* 结算月份
*/
@DateTimeFormat(pattern = "yyyy-MM")
@JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
private Date accountsTime;
private String accountsTime;
}
......@@ -34,12 +34,12 @@ public class DisableExamineInfoVO {
/**
*医保统筹区省
*/
private String medicalProvincial;
// private String medicalProvincial;
/**
*医保统筹区市
*/
private String medicalCity;
// private String medicalCity;
/**
*医保统筹区区
......@@ -125,6 +125,7 @@ public class DisableExamineInfoVO {
// 复评备注
private String reasonsRemark;
private String bankCardNo;
private List<ChFndAttach> fileDataList;
}
......@@ -31,6 +31,8 @@ public enum ResultCode implements IResultCode, Serializable {
TOKEN_INVALID_OR_EXPIRED("A0230", "token无效或已过期"),
// 请求参数错误,参数校验不通过
REQUEST_PARAM_ERROR("Q0001", "请求参数错误"),
//文件类型不匹配
FILE_TYPE_ERROR("F0001", "文件类型不支持"),
// 请求参数错误,参数校验不通过
SRV_ORGAN_NOT_QUERY("S0001", "未查询到数据"),
/**
......
......@@ -56,6 +56,13 @@
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-oauth2-resource-server</artifactId>
</dependency>
<!--jwt-->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-jwt</artifactId>
<version>1.0.9.RELEASE</version>
<scope>compile</scope>
</dependency>
</dependencies>
......
......@@ -102,6 +102,12 @@
<version>0.0.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.hungraim.ltc</groupId>
<artifactId>account-api</artifactId>
<version>0.0.1</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
......
......@@ -6,7 +6,7 @@
<select id="queryPlan" resultType="com.hungraim.ltc.pojo.entity.governance.ChSrvPlan">
select
disable.DISAB_INFO_ID disabInfoId,
mode1.MODE_ID modeId,
disable.SRV_MODE_ID modeId,
--护理机构名称
organ.srv_organ_id srvOrganId,
emp.emp_id empId,
......@@ -19,18 +19,15 @@
from ch_srv_task_detail detail --服务计划
left join ch_srv_task task on task.srv_task_id = detail.srv_task_id--服务计划详情
left join ch_disable_info disable on task.disab_info_id = disable.disab_info_id--失能人员
left join CH_DEV.CH_DISABLE_APPLY apply on apply.apply_id = disable.apply_id
left join CH_DISABLE_APPLY apply on apply.apply_id = disable.apply_id
left join ch_srv_program program on task.program_id = program.program_id--服务方案
left join ch_srv_organ organ on program.srv_organ_id = organ.srv_organ_id--服务机构
left join ch_cfg_srv_mode mode1 on program.srv_mode_id = mode1.mode_id--服务方式
left join ch_srv_organ_emp emp on task.srv_emp_id = emp.emp_id--护理人员
left join CH_SRV_PROGRAM_SET CSTFI on CSTFI.PROGRAM_ID = task.program_id
LEFT JOIN CH_SRV_ORGAN_PROJECT CSOP ON CSOP.PROJECT_ID = CSTFI.ITEM_ID
LEFT JOIN CH_SERVICE_TYPE_detailed d on d.service_type_detailed_id = CSOP.item_name
<where>
mode1.mode_name in ('医疗','养老') and program.program_id =#{programId}
disable.SRV_MODE_ID in ('1','2') and program.program_id =#{programId}
</where>
order by detail.SRV_DATE desc
</select>
......
......@@ -4,11 +4,14 @@ import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
@Data
@ConfigurationProperties(prefix = "file.upload")
public class FileUploadConfig {
private String path;
private List<String> type;
}
......@@ -38,7 +38,16 @@ public class FileUploadController {
if (null == uploadType || null == file) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
//过滤上传资料类型
String originalFilename = file.getOriginalFilename();
//文件类型
String fileType = originalFilename.substring(file.getOriginalFilename().lastIndexOf("."));
List<String> fileTypes = fileUploadConfig.getType();
log.info("支持图片类型:" + fileTypes+",上传的图片类型:"+fileType);
if(!fileTypes.stream().anyMatch(e->e.equalsIgnoreCase(fileType))){
log.info("上传文件错误");
return Result.failed(ResultCode.FILE_TYPE_ERROR);
}
String realPath = FileUtils.uploadFile(file, fileUploadConfig.getPath());
log.info("文件上传成功:{}", realPath);
Long attachId = attachService.saveFileInfo(originalFilename, realPath, uploadType);
......
......@@ -34,4 +34,21 @@ mybatis-plus:
file:
upload:
path: E:/workspace/upload
\ No newline at end of file
path: E:/workspace/upload
type:
- .png
- .gif
- .jpg
- .jpeg
- .bmp
- .zip
- .rar
- .7z
- .gz
- .doc
- .docx
- .xls
- .xlsx
- .pdf
- .txt
- .csv
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