Commit f8f1a058 authored by maqing's avatar maqing

Merge branch 'master' into dev_20230205_mq

parents f8beffc9 ceb180b5
...@@ -5,12 +5,13 @@ VOLUME /tmp ...@@ -5,12 +5,13 @@ VOLUME /tmp
#容器使用端口 #容器使用端口
EXPOSE 8000 EXPOSE 8000
#添加jar包入容器 #添加jar包入容器
ADD ./apply/apply-service/target/apply-service-0.0.1.jar /apply.jar ADD ./jar/apply-service-0.0.1.jar /apply.jar
ADD ./assessment/assessment-service/target/assessment-service-0.0.1.jar /assessment.jar ADD ./jar/assessment-service-0.0.1.jar /assessment.jar
ADD ./auth-service/target/auth-0.0.1.jar /auth.jar ADD ./jar/auth-0.0.1.jar /auth.jar
ADD ./gateway-service/target/gateway-0.0.1.jar /gateway.jar ADD ./jar/gateway-0.0.1.jar /gateway.jar
ADD ./governance/target/governance-0.0.1.jar /governance.jar ADD ./jar/governance-0.0.1.jar /governance.jar
ADD ./system/system-admin-service/target/system-admin-0.0.1.jar /system-admin.jar ADD ./jar/system-admin-0.0.1.jar /system-admin.jar
ADD ./jar/account-service-0.0.1.jar /account.jar
ADD start.sh /start.sh ADD start.sh /start.sh
RUN chmod +x /start.sh RUN chmod +x /start.sh
......
#指定依赖的镜像
FROM java:8
#springboot
VOLUME /tmp
#容器使用端口
EXPOSE 8000
#添加jar包入容器
ADD ./apply/apply-service/target/apply-service-0.0.1.jar /apply.jar
ADD ./assessment/assessment-service/target/assessment-service-0.0.1.jar /assessment.jar
ADD ./auth-service/target/auth-0.0.1.jar /auth.jar
ADD ./gateway-service/target/gateway-0.0.1.jar /gateway.jar
ADD ./governance/target/governance-0.0.1.jar /governance.jar
ADD ./system/system-admin-service/target/system-admin-0.0.1.jar /system-admin.jar
ADD ./account/account-service/target/account-service-0.0.1.jar /account.jar
ADD start.sh /start.sh
RUN chmod +x /start.sh
ENTRYPOINT ["sh","-c","./start.sh"]
package com.hungraim.ltc.api;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
@FeignClient("LTC-ACCOUNT-SERVICE")
public interface AccountFeignService {
@GetMapping("/api.account/account/getOtherPlace")
void getOtherPlace(@RequestParam("programId") String programId);
}
...@@ -3,9 +3,8 @@ package com.hungraim.ltc.account.controller; ...@@ -3,9 +3,8 @@ package com.hungraim.ltc.account.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.account.service.AccountService; import com.hungraim.ltc.account.service.AccountService;
import com.hungraim.ltc.pojo.entity.account.ChAssessDetailAccounts;
import com.hungraim.ltc.pojo.entity.account.ChDisabAccounts; import com.hungraim.ltc.pojo.entity.account.ChDisabAccounts;
import com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccounts; import com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccountsResp;
import com.hungraim.ltc.pojo.vo.account.*; import com.hungraim.ltc.pojo.vo.account.*;
import com.hungraim.ltc.util.FileUtils; import com.hungraim.ltc.util.FileUtils;
import com.hungraim.ltc.util.Result; import com.hungraim.ltc.util.Result;
...@@ -14,10 +13,7 @@ import lombok.AllArgsConstructor; ...@@ -14,10 +13,7 @@ import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.text.ParseException; import java.text.ParseException;
...@@ -42,9 +38,9 @@ public class AccountController { ...@@ -42,9 +38,9 @@ public class AccountController {
*/ */
@PostMapping("/addOrUpdateAccount") @PostMapping("/addOrUpdateAccount")
public Result addOrUpdateAccount(AccountOperVo accountOperVo) { public Result addOrUpdateAccount(AccountOperVo accountOperVo) {
if (null == accountOperVo.getSrvOrganId() || null == accountOperVo.getAccountsTime() || StringUtils.isBlank(accountOperVo.getTotalExpensesPayable()) || null == accountOperVo.getAccountsStatus()) { /* if (null == accountOperVo.getSrvOrganId() || null == accountOperVo.getAccountsTime() || StringUtils.isBlank(accountOperVo.getTotalExpensesPayable()) || null == accountOperVo.getAccountsStatus()) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR); return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
} }*/
Long accountsId = accountOperVo.getAccountsId(); Long accountsId = accountOperVo.getAccountsId();
Date accountsTime = accountOperVo.getAccountsTime(); Date accountsTime = accountOperVo.getAccountsTime();
Long srvOrganId = accountOperVo.getSrvOrganId(); Long srvOrganId = accountOperVo.getSrvOrganId();
...@@ -102,18 +98,37 @@ public class AccountController { ...@@ -102,18 +98,37 @@ public class AccountController {
return Result.success(accountService.expenseSettlement(req)); return Result.success(accountService.expenseSettlement(req));
} }
// todo 后续改成每月定时
@GetMapping("/organAccount")
public void organAccount(){
accountService.organAccount(); @RequestMapping("/organAccountTaskExecute")
public Result organAccountTaskExecute(AccountTaskReqVO accountTaskReqVO){
List<AccountTaskExecuteReqVO> accountTaskExecuteReqVOS = accountTaskReqVO.getAccountTaskList();
accountService.organAccountTaskExecute(accountTaskExecuteReqVOS);
return Result.success();
} }
// todo 后续改成每月定时
@GetMapping("/assessAccount") @GetMapping("/getOtherPlace")
public void getAssessAccount(){ public Result otherPlaceHandler(String programId){
accountService.getAssessAccount(); accountService.otherPlaceHandler(programId);
return Result.success();
}
/**
* 任务列表
*
* @param srvTaskReqVO 请求参数对象
* @return 返回
*/
@GetMapping("/getSrvTaskList")
public Result<Page<SrvTaskRespVO>> getSrvTaskList(SrvTaskReqVO srvTaskReqVO) {
return Result.success(accountService.getSrvTaskList(srvTaskReqVO));
} }
/** /**
* 查询机构结算列表 * 查询机构结算列表
* *
...@@ -139,54 +154,28 @@ public class AccountController { ...@@ -139,54 +154,28 @@ public class AccountController {
} }
/**
* 查询评估结算列表
*
* @param srvOrganListReq 请求参数对象
* @return 返回
*/
@GetMapping("/searchAssessAccountsList")
public Result<Page<AssessAccountsListResp>> searchAssessAccountsList(SrvOrganListReq srvOrganListReq) {
return Result.success(accountService.searchAssessAccountsList(srvOrganListReq));
}
/**
* 评估结算导出明细
*
*/
@GetMapping("/assessAccountExport")
public void assessAccountExport(String assessAccountsId,HttpServletResponse response){
Workbook workbook = accountService.assessAccountExport(assessAccountsId);
// 命名表格
String fileName = "assessAccount.xlsx";
FileUtils.exportResponse(workbook,fileName,response);
}
/**
* 评估人员结算列表明细
*
* @param id 结算id
* @return 返回雷彪
*/
@GetMapping("/QueryDisabOrganAccountsDetail")
public Result<List<ChAssessDetailAccounts>> QueryDisabOrganAccountsDetail(int id) {
List<ChAssessDetailAccounts> chAssessDetailAccounts = accountService.queryDisabOrganAccountsDetail(id);
return Result.success(chAssessDetailAccounts);
}
/** /**
* 查询机构结算信息列表明细 * 查询机构结算信息列表明细
* *
* @param id 结算id * @param id 结算id
* @return 返回雷彪 * @return
*/ */
@GetMapping("/QuerySearchAssessAccounts") @GetMapping("/queryOrganAccountsDetail")
public Result<List<ChDisabDetailAccounts>> QuerySearchAssessAccounts(int id) { public Result<List<ChDisabDetailAccountsResp>> queryOrganAccountsDetail(String id) {
List<ChDisabDetailAccounts> chAssessDetailAccounts = accountService.querySearchAssessAccounts(id); List<ChDisabDetailAccountsResp> chAssessDetailAccounts = accountService.queryOrganAccountsDetail(id);
return Result.success(chAssessDetailAccounts); return Result.success(chAssessDetailAccounts);
} }
/** /**
* 机构结算管理提交复核 * 机构结算管理提交复核
* *
...@@ -204,22 +193,7 @@ public class AccountController { ...@@ -204,22 +193,7 @@ public class AccountController {
} }
/**
* 评估人员结算提交复核
*
* @param id 结算id
* @return 返回雷彪
*/
@PostMapping("/updateChAssessAccounts")
public Result updateChAssessAccounts(int id) {
int bl = accountService.updateChAssessAccounts(id);
if(bl>0){
return Result.success();
}else{
return Result.failed();
}
}
} }
...@@ -4,10 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -4,10 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.account.ChDisabAccounts; import com.hungraim.ltc.pojo.entity.account.ChDisabAccounts;
import com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccounts; import com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccounts;
import com.hungraim.ltc.pojo.vo.account.AccountOperVo; import com.hungraim.ltc.pojo.vo.account.*;
import com.hungraim.ltc.pojo.vo.account.SrvOrganListReq;
import com.hungraim.ltc.pojo.vo.account.SrvOrganListResp;
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 org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
...@@ -17,5 +16,19 @@ import java.util.List; ...@@ -17,5 +16,19 @@ import java.util.List;
@Repository @Repository
public interface ChDisabAccountsDetailMapper extends BaseMapper<ChDisabDetailAccounts> { public interface ChDisabAccountsDetailMapper extends BaseMapper<ChDisabDetailAccounts> {
List<OrganAccountsVO> getOrganAccountsList(String taskDetailId);
Page<SrvOrganAccountListResp> searchSrvOrganAccountList(Page page, List<Long> organIds, SrvOrganListReq req);
List<AccountExportDetailListResp> searchSrvOrganAccountDetailExport(String accountsId);
List<ChDisabDetailAccounts> queryAccountByCondition(@Param("taskDetailIds") List<String> taskDetailIds);
List<OrganAccountsVO> getOtherPlaceList(String programId);
} }
\ No newline at end of file
...@@ -49,4 +49,8 @@ public interface ChDisabAccountsMapper extends BaseMapper<ChDisabAccounts> { ...@@ -49,4 +49,8 @@ public interface ChDisabAccountsMapper extends BaseMapper<ChDisabAccounts> {
"WHERE " + "WHERE " +
" t1.ACCOUNTS_ID = #{accountsId}") " t1.ACCOUNTS_ID = #{accountsId}")
AccountOperVo getDetailById(Long accountsId); AccountOperVo getDetailById(Long accountsId);
ChDisabAccounts queryAccountByCondition(String accountsTime, String modeName, String srvOrganId);
} }
\ No newline at end of file
...@@ -2,13 +2,17 @@ package com.hungraim.ltc.account.dao; ...@@ -2,13 +2,17 @@ package com.hungraim.ltc.account.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccounts; import com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccounts;
import com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccountsResp;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.List;
/** /**
* @author mq * @author mq
*/ */
@Mapper @Mapper
@Repository @Repository
public interface ChDisabDetailAccountsMapper extends BaseMapper<ChDisabDetailAccounts> { public interface ChDisabDetailAccountsMapper extends BaseMapper<ChDisabDetailAccounts> {
List<ChDisabDetailAccountsResp> queryOrganAccountsDetail(String accountsId);
} }
package com.hungraim.ltc.account.dao;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.vo.account.*;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
@Mapper
public interface ChOrganAccountsMapper {
List<OrganAccountsVO> getOrganAccountsList(String lastMonth);
Page<SrvOrganAccountListResp> searchSrvOrganAccountList(Page page, List<Long> organIds, SrvOrganListReq req);
List<AccountExportDetailListResp> searchSrvOrganAccountDetailExport(String accountsId);
}
package com.hungraim.ltc.account.dao; package com.hungraim.ltc.account.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail; import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail;
import com.hungraim.ltc.pojo.vo.account.SrvTaskReqVO;
import com.hungraim.ltc.pojo.vo.account.SrvTaskRespVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.PathVariable;
import java.util.List;
@Mapper @Mapper
@Repository @Repository
public interface ChSrvTaskDetailMapper extends BaseMapper<ChSrvTaskDetail> { public interface ChSrvTaskDetailMapper extends BaseMapper<ChSrvTaskDetail> {
Page<SrvTaskRespVO> getSrvTaskList(Page page,SrvTaskReqVO req);
Integer updateSrvPlanById(String palnId);
} }
\ No newline at end of file
...@@ -2,10 +2,9 @@ package com.hungraim.ltc.account.service; ...@@ -2,10 +2,9 @@ package com.hungraim.ltc.account.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.hungraim.ltc.pojo.entity.account.ChAssessDetailAccounts; import com.hungraim.ltc.pojo.entity.account.*;
import com.hungraim.ltc.pojo.entity.account.ChDisabAccounts;
import com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccounts;
import com.hungraim.ltc.pojo.vo.account.*; import com.hungraim.ltc.pojo.vo.account.*;
import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.ss.usermodel.Workbook;
import java.text.ParseException; import java.text.ParseException;
...@@ -22,30 +21,22 @@ public interface AccountService extends IService<ChDisabAccounts> { ...@@ -22,30 +21,22 @@ public interface AccountService extends IService<ChDisabAccounts> {
Page<SrvOrganAccountListResp> searchSrvOrganAccountList(SrvOrganListReq srvOrganListReq); Page<SrvOrganAccountListResp> searchSrvOrganAccountList(SrvOrganListReq srvOrganListReq);
Page<SrvTaskRespVO> getSrvTaskList(SrvTaskReqVO srvTaskReqVO);
AccountOperVo getSrvOrganDetail(Long accountsId); AccountOperVo getSrvOrganDetail(Long accountsId);
ExpenseVo expenseSettlement(ExpenseSettlementReq req) throws ParseException; ExpenseVo expenseSettlement(ExpenseSettlementReq req) throws ParseException;
void organAccount();
void getAssessAccount();
Workbook srvOrganAccountExport(String accountsId); Workbook srvOrganAccountExport(String accountsId);
Page<AssessAccountsListResp> searchAssessAccountsList(SrvOrganListReq srvOrganListReq);
Workbook assessAccountExport(String assessAccountsId);
/** List<ChDisabDetailAccountsResp> queryOrganAccountsDetail(String id);
* 列表明细
* @param id
* @return
*/
List<ChAssessDetailAccounts> queryDisabOrganAccountsDetail(int id);
List<ChDisabDetailAccounts> querySearchAssessAccounts(int id);
int updateChDisabAccounts(int id); int updateChDisabAccounts(int id);
int updateChAssessAccounts(int id);
void organAccountTaskExecute(List<AccountTaskExecuteReqVO> accountTaskExecuteReqVOS);
void otherPlaceHandler(String programId);
} }
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hungraim.ltc.account.dao.ChOrganAccountsMapper"> <mapper namespace="com.hungraim.ltc.account.dao.ChDisabAccountsDetailMapper">
<!--查询机构失能人员信息-->
<select id="getOrganAccountsList" resultType="com.hungraim.ltc.pojo.vo.account.OrganAccountsVO"> <select id="getOrganAccountsList" resultType="com.hungraim.ltc.pojo.vo.account.OrganAccountsVO">
select select
--失能人员姓名 detail.TASK_DETAIL_ID taskDetailId,
disable.real_name realName, --失能人员姓名
disable.DISAB_INFO_ID disabInfoId, disable.real_name realName,
--身份证号 disable.DISAB_INFO_ID disabInfoId,
disable.CERTI_CODE certiCode, --身份证号
--所在省市 disable.CERTI_CODE certiCode,
disable.district_provincial districtProvincial, --所在省市
disable.district_city districtCity, (select district_name from ch_fnd_district dis where apply.MEDICAL_AREA = dis.district_code) medicalArea,
disable.DISTRICT_AREA districtArea, program.SRV_MODE_ID modeId,
mode1.MODE_ID modeId, --服务方式
--服务方式 DECODE(program.SRV_MODE_ID, '1','医疗','2', '养老','3','上门', '4', '异地') srvModeName,
mode1.mode_name srvModeName, --护理机构名称
--护理机构名称 organ.srv_organ_id srvOrganId,
organ.srv_organ_id srvOrganId, --护理机构名称
--护理机构名称 organ.srv_organ_name srvOrganName,
organ.srv_organ_name srvOrganName, --护理服务人员
--护理服务人员 emp.emp_name empName,
emp.emp_name empName, --任务时间
--任务时间 detail.SRV_DATE srvDate,
detail.SRV_DATE srvDate, -- 机构等级
--机构等级 organ.LEVEL_CODE levelCode,
organ.LEVEL_CODE levelCode, CSTFI.ITEM_ID itemId
--失能等级 from ch_srv_task_detail detail--服务计划
level1.DISABLE_LEVEL_NAME disableLevelName left join ch_srv_task task on task.srv_task_id = detail.srv_task_id--服务计划详情
from ch_srv_task_detail detail--服务计划 left join ch_disable_info disable on task.disab_info_id = disable.disab_info_id--失能人员
left join ch_srv_task task on task.srv_task_id = detail.srv_task_id--服务计划详情 left join CH_DEV.CH_DISABLE_APPLY apply on apply.apply_id = disable.apply_id
left join ch_disable_info disable on task.disab_info_id = disable.disab_info_id--失能人员 left join ch_srv_organ_emp emp on task.srv_emp_id = emp.emp_id--护理人员
left join ch_apr_task aprtask on disable.last_task_id = aprtask.task_id--评定任务 left join ch_srv_program program on task.program_id = program.program_id--服务方案
left join ch_apr_report report on aprtask.task_id = report.task_id--评定报告 left join ch_srv_organ organ on program.srv_organ_id = organ.srv_organ_id--服务机构
left join ch_srv_program program on task.program_id = program.program_id--服务方案 LEFT JOIN CH_SRV_TASK_FINISH_ITEM CSTFI ON detail.TASK_DETAIL_ID = CSTFI.TASK_DETAIL_ID
left join ch_srv_organ organ on program.srv_organ_id = organ.srv_organ_id--服务机构 <where>
left join ch_cfg_srv_mode mode1 on program.srv_mode_id = mode1.mode_id--服务方式 detail.STATUS = '4'
left join ch_srv_organ_emp emp on task.srv_emp_id = emp.emp_id--护理人员 <if test="taskDetailId != null and taskDetailId != ''">
--失能等级 AND detail.TASK_DETAIL_ID = #{taskDetailId}
left join ch_cfg_srv_disable_level level1 on report.disable_level_id = level1.disable_level_id </if>
where detail.STATUS=4 and organ.LEVEL_CODE is not null </where>
</select>
<select id="queryAccountByCondition" resultType="com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccounts">
select * from CH_DISAB_ACCOUNTS_DETAIL t where t.MODE_NAME in ('养老','医疗')
<if test="taskDetailIds != null and taskDetailIds.size() > 0">
AND t.TASK_DETAIL_ID IN
<foreach collection="taskDetailIds" separator="," open="(" close=")" item="taskDetailId">
#{taskDetailId}
</foreach>
</if>
</select> </select>
...@@ -88,7 +97,10 @@ ...@@ -88,7 +97,10 @@
t1.OVERALL_COST, t1.OVERALL_COST,
t1.PERSONAL_COST, t1.PERSONAL_COST,
t1.SVR_START_TIME, t1.SVR_START_TIME,
t1.SVR_END_TIME t1.MODE_NAME,
to_char(t1.SVR_START_TIME,'yyyy-MM-dd') svrStartTime,
to_char(t1.SVR_END_TIME,'yyyy-MM-dd') svrEndTime,
t1.TOTAL_ALLOCATED_EXPENSES totalAllocatedExpenses
FROM FROM
CH_DISAB_ACCOUNTS t1 CH_DISAB_ACCOUNTS t1
LEFT JOIN CH_SRV_ORGAN t2 ON t1.SRV_ORGAN_ID = t2.SRV_ORGAN_ID LEFT JOIN CH_SRV_ORGAN t2 ON t1.SRV_ORGAN_ID = t2.SRV_ORGAN_ID
...@@ -127,5 +139,47 @@ ...@@ -127,5 +139,47 @@
</select> </select>
<select id="getOtherPlaceList" resultType="com.hungraim.ltc.pojo.vo.account.OrganAccountsVO">
select
detail.TASK_DETAIL_ID taskDetailId,
--失能人员姓名
disable.real_name realName,
disable.DISAB_INFO_ID disabInfoId,
--身份证号
disable.CERTI_CODE certiCode,
--所在省市
(select district_name from ch_fnd_district dis where apply.MEDICAL_AREA = dis.district_code) medicalArea,
mode1.MODE_ID modeId,
--服务方式
mode1.mode_name srvModeName,
--护理机构名称
organ.srv_organ_id srvOrganId,
--护理机构名称
organ.srv_organ_name srvOrganName,
--护理服务人员
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
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_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
where mode1.MODE_ID = '4' and level1.DISABLE_LEVEL_NAME like '重度%' and program.program_id = #{programId}
</select>
</mapper> </mapper>
...@@ -15,4 +15,17 @@ ...@@ -15,4 +15,17 @@
ACCOUNTS_ID, SRV_ORGAN_ID, TOTAL_ALLOCATED_EXPENSES, CREATION_TIME, ACCOUNTS_TIME, ACCOUNTS_ID, SRV_ORGAN_ID, TOTAL_ALLOCATED_EXPENSES, CREATION_TIME, ACCOUNTS_TIME,
TOTAL_EXPENSES_PAYABLE, CHOOSE_SETTLE, ACCOUNTS_STATUS TOTAL_EXPENSES_PAYABLE, CHOOSE_SETTLE, ACCOUNTS_STATUS
</sql> </sql>
<select id="queryAccountByCondition" resultType="com.hungraim.ltc.pojo.entity.account.ChDisabAccounts">
select * from CH_DISAB_ACCOUNTS t where t.MODE_NAME = #{modeName}
and to_char(t.ACCOUNTS_TIME,'yyyy-MM') = #{accountsTime}
and t.SRV_ORGAN_ID = #{srvOrganId}
</select>
</mapper> </mapper>
\ No newline at end of file
<?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.account.dao.ChDisabDetailAccountsMapper">
<select id="queryOrganAccountsDetail" resultType="com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccountsResp">
select
d.MODE_NAME modeName,
to_char(d.ACCOUNTS_START_TIME,'yyyy-MM-dd HH24:mi:ss') accountsStartTime,
to_char(d.ACCOUNTS_END_TIME,'yyyy-MM-dd HH24:mi:ss') accountsEndTime,
to_char(d.ACCOUNTS_TIME,'yyyy-MM') accountsTime,
d.ACCOUNTS_ALL_COST accountsAllCost,
d.ACCOUNTS_OVERALL_COST accountsOverallCost,
d.ACCOUNTS_PERSONAL_COST accountsPersonalCost,
(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
left join CH_DISABLE_INFO info on d.DISAB_INFO_ID = info.DISAB_INFO_ID
left join CH_DISABLE_APPLY apply on info.APPLY_ID=apply.APPLY_ID
left join CH_SRV_ORGAN o on d.SRV_ORGAN_ID = o.SRV_ORGAN_ID
where d.ACCOUNTS_ID = #{accountsId}
</select>
</mapper>
\ No newline at end of file
<?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.account.dao.ChSrvTaskDetailMapper">
<select id="getSrvTaskList" resultType="com.hungraim.ltc.pojo.vo.account.SrvTaskRespVO">
select info.REAL_NAME realName,
plan.PLAN_ID planId,
plan.ITEM_ID itemId,
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}
</if>
<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>
<update id="updateSrvPlanById">
update CH_SRV_PLAN plan set plan.is_status= '4' where plan.plan_id = #{planId}
</update>
</mapper>
...@@ -310,9 +310,12 @@ public class DisableController { ...@@ -310,9 +310,12 @@ public class DisableController {
if (chDisableApply.getSrvModeId() == null) { if (chDisableApply.getSrvModeId() == null) {
return Result.failed("申请服务方式不能为空!"); return Result.failed("申请服务方式不能为空!");
} }
if (StringUtils.isBlank(chDisableApply.getDiseaseDesc())) { if (chDisableApply.getDiseTypeF() == null) {
return Result.failed("疾病描述及诊断不能为空!"); return Result.failed("诊断疾病不能为空!");
} }
/* if (StringUtils.isBlank(chDisableApply.getDiseaseDesc())) {
return Result.failed("疾病描述及诊断不能为空!");
}*/
if (chDisableApply.getMedicalType() == null) { if (chDisableApply.getMedicalType() == null) {
return Result.failed("医保类型不能为空!"); return Result.failed("医保类型不能为空!");
} }
...@@ -365,9 +368,13 @@ public class DisableController { ...@@ -365,9 +368,13 @@ public class DisableController {
if (chDisableApply.getSrvModeId() == null) { if (chDisableApply.getSrvModeId() == null) {
return Result.failed("申请服务方式不能为空!"); return Result.failed("申请服务方式不能为空!");
} }
if (StringUtils.isBlank(chDisableApply.getDiseaseDesc())) { if (chDisableApply.getDiseTypeF() == null) {
return Result.failed("疾病描述及诊断不能为空!"); return Result.failed("诊断疾病不能为空!");
} }
/* if (StringUtils.isBlank(chDisableApply.getDiseaseDesc())) {
return Result.failed("疾病描述及诊断不能为空!");
}*/
if (chDisableApply.getMedicalType() == null) { if (chDisableApply.getMedicalType() == null) {
return Result.failed("医保类型不能为空!"); return Result.failed("医保类型不能为空!");
} }
......
...@@ -120,9 +120,8 @@ ...@@ -120,9 +120,8 @@
a.CHECK_REMARK checkRemark, a.CHECK_REMARK checkRemark,
a.REASONS_REVIEW reasonsReview, a.REASONS_REVIEW reasonsReview,
a.REASONS_REMARK reasonsRemark, a.REASONS_REMARK reasonsRemark,
a.MEDICAL_PROVINCIAL medicalProvincial, a.MEDICAL_AREA medicalArea,
a.MEDICAL_CITY medicalCity, a.BANK_CARD_NO bankCardNo
a.MEDICAL_AREA medicalArea
from CH_DISABLE_APPLY a from CH_DISABLE_APPLY a
LEFT JOIN CH_SRV_ORGAN o ON a.SRV_ORGAN_ID = o.SRV_ORGAN_ID LEFT JOIN CH_SRV_ORGAN o ON a.SRV_ORGAN_ID = o.SRV_ORGAN_ID
where a.APPLY_ID = #{applyId} where a.APPLY_ID = #{applyId}
......
...@@ -8,6 +8,7 @@ import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach; ...@@ -8,6 +8,7 @@ import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach;
import com.hungraim.ltc.pojo.entity.assessment.*; import com.hungraim.ltc.pojo.entity.assessment.*;
import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel; import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel;
import com.hungraim.ltc.pojo.vo.ReportUpdateVO; import com.hungraim.ltc.pojo.vo.ReportUpdateVO;
import com.hungraim.ltc.pojo.vo.account.AssessAccountsListResp;
import com.hungraim.ltc.pojo.vo.assessment.*; import com.hungraim.ltc.pojo.vo.assessment.*;
import com.hungraim.ltc.service.TaskService; import com.hungraim.ltc.service.TaskService;
import com.hungraim.ltc.service.TppesApiException; import com.hungraim.ltc.service.TppesApiException;
...@@ -22,7 +23,6 @@ import org.springframework.web.bind.annotation.*; ...@@ -22,7 +23,6 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.net.URLEncoder;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
...@@ -185,6 +185,8 @@ public class TaskController { ...@@ -185,6 +185,8 @@ public class TaskController {
//失败 //失败
return Result.failed(objectResult.getMsg()); return Result.failed(objectResult.getMsg());
} }
// 评估结算
taskService.assessAccount(reportDetailVo);
return Result.success(); return Result.success();
} }
...@@ -681,4 +683,57 @@ public class TaskController { ...@@ -681,4 +683,57 @@ public class TaskController {
String fileName = "aprEmp.xlsx"; String fileName = "aprEmp.xlsx";
FileUtils.exportResponse(workbook,fileName,response); FileUtils.exportResponse(workbook,fileName,response);
} }
/**
* 查询评估结算列表
*
* @param srvOrganListReq 请求参数对象
* @return 返回
*/
@GetMapping("/searchAssessAccountsList")
public Result<Page<AssessAccountsListResp>> searchAssessAccountsList(SrvOrganListReq srvOrganListReq) {
return Result.success(taskService.searchAssessAccountsList(srvOrganListReq));
}
/**
* 评估结算导出明细
*
*/
@GetMapping("/assessAccountExport")
public void assessAccountExport(String assessAccountsId,HttpServletResponse response){
Workbook workbook = taskService.assessAccountExport(assessAccountsId);
// 命名表格
String fileName = "assessAccount.xlsx";
FileUtils.exportResponse(workbook,fileName,response);
}
/**
* 评估人员结算列表明细
*
* @param assessAccountsId 评估结算id
* @return 返回
*/
@GetMapping("/queryAssessAccountsDetail")
public Result<List<ChAssessDetailAccountsResp>> queryAssessAccountsDetail(String assessAccountsId) {
List<ChAssessDetailAccountsResp> chAssessDetailAccounts = taskService.queryAssessAccountsDetail(assessAccountsId);
return Result.success(chAssessDetailAccounts);
}
/**
* 评估人员结算提交复核
*
* @param id 结算id
* @return
*/
@PostMapping("/updateChAssessAccounts")
public Result updateChAssessAccounts(int id) {
int bl = taskService.updateChAssessAccounts(id);
if(bl>0){
return Result.success();
}else{
return Result.failed();
}
}
} }
package com.hungraim.ltc.account.dao; package com.hungraim.ltc.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.account.ChAssessDetailAccounts; import com.hungraim.ltc.pojo.entity.assessment.ChAssessDetailAccounts;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
......
package com.hungraim.ltc.account.dao; package com.hungraim.ltc.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.account.ChAssessAccounts; import com.hungraim.ltc.pojo.entity.assessment.ChAssessAccounts;
import com.hungraim.ltc.pojo.vo.account.AssessAccountsExportResp; import com.hungraim.ltc.pojo.vo.account.AssessAccountsExportResp;
import com.hungraim.ltc.pojo.vo.account.AssessAccountsListResp; import com.hungraim.ltc.pojo.vo.account.AssessAccountsListResp;
import com.hungraim.ltc.pojo.vo.account.AssessAccountsVO; import com.hungraim.ltc.pojo.vo.assessment.AssessIdAndCostVO;
import com.hungraim.ltc.pojo.vo.account.SrvOrganListReq; import com.hungraim.ltc.pojo.vo.assessment.SrvOrganListReq;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
...@@ -16,9 +16,9 @@ import java.util.List; ...@@ -16,9 +16,9 @@ import java.util.List;
@Repository @Repository
public interface ChAssessAccountsMapper extends BaseMapper<ChAssessAccounts> { public interface ChAssessAccountsMapper extends BaseMapper<ChAssessAccounts> {
List<AssessAccountsVO> getAssessAccountsList(); AssessIdAndCostVO queryAssessByOrganIdAndTime(String aprOrganId, String accountsTime, String modeId);
Page<AssessAccountsListResp> searchAssessAccountList(Page page, List<Long> organIds, SrvOrganListReq req); Page<AssessAccountsListResp> searchAssessAccountList(Page page, List<Long> organIds, SrvOrganListReq req);
List<AssessAccountsExportResp> assessAccountDetailExport(String assessAccountsId);
} }
\ No newline at end of file
package com.hungraim.ltc.account.dao; package com.hungraim.ltc.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.account.ChAssessDetailAccounts; import com.hungraim.ltc.pojo.entity.assessment.ChAssessDetailAccounts;
import com.hungraim.ltc.pojo.entity.assessment.ChAssessDetailAccountsResp;
import com.hungraim.ltc.pojo.vo.account.AssessAccountsExportResp;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.List;
/** /**
* @author mq * @author mq
*/ */
@Mapper @Mapper
@Repository @Repository
public interface ChAssessDetailAccountsMapper extends BaseMapper<ChAssessDetailAccounts> { public interface ChAssessDetailAccountsMapper extends BaseMapper<ChAssessDetailAccounts> {
List<ChAssessDetailAccountsResp> queryAssessAccountsDetail(String assessAccountsId);
List<AssessAccountsExportResp> assessAccountDetailExport(String assessAccountsId);
} }
...@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach; import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach;
import com.hungraim.ltc.pojo.entity.assessment.*; import com.hungraim.ltc.pojo.entity.assessment.*;
import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel; import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel;
import com.hungraim.ltc.pojo.vo.account.AssessAccountsListResp;
import com.hungraim.ltc.pojo.vo.assessment.*; import com.hungraim.ltc.pojo.vo.assessment.*;
import com.hungraim.ltc.util.Result; import com.hungraim.ltc.util.Result;
import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.ss.usermodel.Workbook;
...@@ -87,4 +88,19 @@ public interface TaskService { ...@@ -87,4 +88,19 @@ public interface TaskService {
Map taskReportFractionDtlQueryList(); Map taskReportFractionDtlQueryList();
Workbook aprEmpExport(String provincial, String city, String area, String organName, String name, String tel, String groupLeader); Workbook aprEmpExport(String provincial, String city, String area, String organName, String name, String tel, String groupLeader);
void assessAccount(ReportDetailVO reportDetailVo);
Page<AssessAccountsListResp> searchAssessAccountsList(SrvOrganListReq srvOrganListReq);
Workbook assessAccountExport(String assessAccountsId);
/**
* 列表明细
* @param assessAccountsId
* @return
*/
List<ChAssessDetailAccountsResp> queryAssessAccountsDetail(String assessAccountsId);
int updateChAssessAccounts(int id);
} }
...@@ -9,23 +9,21 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; ...@@ -9,23 +9,21 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hungraim.ltc.api.AttachFeignService; import com.hungraim.ltc.api.AttachFeignService;
import com.hungraim.ltc.dao.*; import com.hungraim.ltc.dao.*;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach; import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach;
import com.hungraim.ltc.pojo.entity.assessment.*; import com.hungraim.ltc.pojo.entity.assessment.*;
import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel; import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel;
import com.hungraim.ltc.pojo.entity.disable.ChDisableInfo; import com.hungraim.ltc.pojo.entity.disable.ChDisableInfo;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail;
import com.hungraim.ltc.pojo.vo.account.AssessAccountsExportResp;
import com.hungraim.ltc.pojo.vo.account.AssessAccountsListResp;
import com.hungraim.ltc.pojo.vo.assessment.*; import com.hungraim.ltc.pojo.vo.assessment.*;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpExportVo;
import com.hungraim.ltc.pojo.vo.system.AttachUpdateVo; import com.hungraim.ltc.pojo.vo.system.AttachUpdateVo;
import com.hungraim.ltc.service.ChAprReportFractionService; import com.hungraim.ltc.service.ChAprReportFractionService;
import com.hungraim.ltc.service.TaskService; import com.hungraim.ltc.service.TaskService;
import com.hungraim.ltc.service.TppesApiException; import com.hungraim.ltc.service.TppesApiException;
import com.hungraim.ltc.util.AttachType; import com.hungraim.ltc.util.*;
import com.hungraim.ltc.util.Result;
import com.hungraim.ltc.util.ResultCode;
import com.hungraim.ltc.util.SerialNumberUtils;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
...@@ -34,9 +32,8 @@ import org.springframework.beans.BeanUtils; ...@@ -34,9 +32,8 @@ import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.awt.*; import java.math.BigDecimal;
import java.util.*; import java.util.*;
import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
...@@ -64,6 +61,14 @@ public class TaskServiceImpl implements TaskService { ...@@ -64,6 +61,14 @@ public class TaskServiceImpl implements TaskService {
private final ChTaskReportFractionDtlMapper chTaskReportFractionDtlMapper; private final ChTaskReportFractionDtlMapper chTaskReportFractionDtlMapper;
private final ChAssessAccountsDetailMapper chAssessAccountsDetailMapper;
private final ChAssessAccountsMapper chAssessAccountsMapper;
private final ChAssessDetailAccountsMapper chAssessDetailAccountsMapper;
/** /**
* 评定任务分配列表 * 评定任务分配列表
* *
...@@ -200,6 +205,87 @@ public class TaskServiceImpl implements TaskService { ...@@ -200,6 +205,87 @@ public class TaskServiceImpl implements TaskService {
} }
@Override @Override
public void assessAccount(ReportDetailVO reportDetailVo){
Integer disableLevelId = reportDetailVo.getDisableLevelId();
if(disableLevelId==1||disableLevelId ==2 ){
return;
}
Integer person1 = reportDetailVo.getPerson1();
Integer person2 = reportDetailVo.getPerson2();
String evaluateTime = reportDetailVo.getEvaluateTime();
Date evaluateDate = DateUtils.strToDate(evaluateTime);
List<ChDisableInfo> chDisableInfos = disableInfoMapper.selectList(new LambdaQueryWrapper<ChDisableInfo>().eq(ChDisableInfo::getApplyId, reportDetailVo.getApplyId()));
Integer srvModeId = chDisableInfos.get(0).getSrvModeId();
// 根据评定机构id和评估结算时间查找表里有没有数据,有数据直接累加费用
// 评定人员结算表插入
if (person1 != null) {
ChAssessDetailAccounts chAssessDetailAccounts = new ChAssessDetailAccounts();
chAssessDetailAccounts.setEmpId(String.valueOf(person1));
ChAprEmp chAprEmp = aprEmpMapper.selectById(person1);
Integer aprOrganId = chAprEmp.getAprOrganId();
chAssessDetailAccounts.setAprOrganId(String.valueOf(aprOrganId));
chAssessDetailAccounts.setApplyId(reportDetailVo.getApplyId());
chAssessDetailAccounts.setCreationTime(new Date());
chAssessDetailAccounts.setAccountsTime(evaluateDate);
chAssessDetailAccounts.setAssessTime(evaluateDate);
Integer aprempTypeIdS = chAprEmp.getAprempTypeIdS();
// 1 评估员上门评估,每人次 100 元
// 5 评估专家上门评估,每人次 150 元
String assessCost = aprempTypeIdS==1? "100":"150";
chAssessDetailAccounts.setAssessCost(assessCost);
Long assessAccountsId = saveAssess(aprOrganId, assessCost,srvModeId,evaluateDate);
chAssessDetailAccounts.setAssessAccountsId(assessAccountsId);
chAssessAccountsDetailMapper.insert(chAssessDetailAccounts);
}
if (person2 != null) {
ChAssessDetailAccounts chAssessDetailAccounts = new ChAssessDetailAccounts();
chAssessDetailAccounts.setEmpId(String.valueOf(person2));
ChAprEmp chAprEmp = aprEmpMapper.selectById(person2);
Integer aprOrganId = chAprEmp.getAprOrganId();
chAssessDetailAccounts.setAprOrganId(String.valueOf(aprOrganId));
chAssessDetailAccounts.setApplyId(reportDetailVo.getApplyId());
chAssessDetailAccounts.setCreationTime(new Date());
chAssessDetailAccounts.setAccountsTime(evaluateDate);
chAssessDetailAccounts.setAssessTime(evaluateDate);
Integer aprempTypeIdS = chAprEmp.getAprempTypeIdS();
// 1 评估员上门评估,每人次 100 元
// 5 评估专家上门评估,每人次 150 元
String assessCost = aprempTypeIdS==1? "100":"150";
chAssessDetailAccounts.setAssessCost(assessCost);
Long assessAccountsId = saveAssess(aprOrganId, assessCost,srvModeId,evaluateDate);
chAssessDetailAccounts.setAssessAccountsId(assessAccountsId);
chAssessAccountsDetailMapper.insert(chAssessDetailAccounts);
}
}
private Long saveAssess(Integer aprOrganId, String assessCost,Integer modeId,Date evaluateDate) {
Long assessAccountsId;
AssessIdAndCostVO assessIdAndCostVO = chAssessAccountsMapper.queryAssessByOrganIdAndTime(String.valueOf(aprOrganId), DateUtils.dateToStrYm(evaluateDate),String.valueOf(modeId));
if (assessIdAndCostVO == null) {
ChAssessAccounts chAssessAccounts = new ChAssessAccounts();
chAssessAccounts.setAccountsTime(evaluateDate);
chAssessAccounts.setAprOrganId(Long.valueOf(aprOrganId));
chAssessAccounts.setCreationTime(new Date());
chAssessAccounts.setAccountsStatus((short)1);
chAssessAccounts.setModeId(modeId);
chAssessAccounts.setAssessAllCost(new BigDecimal(assessCost));
chAssessAccountsMapper.insert(chAssessAccounts);
assessAccountsId = chAssessAccounts.getAssessAccountsId();
}else{
assessAccountsId = assessIdAndCostVO.getAssessAccountsId();
BigDecimal assessAllCost = assessIdAndCostVO.getAssessAllCost();
ChAssessAccounts chAssessAccounts = new ChAssessAccounts();
chAssessAccounts.setAssessAccountsId(assessAccountsId);
chAssessAccounts.setAssessAllCost(assessAllCost.add(new BigDecimal(assessCost)));
chAssessAccountsMapper.updateById(chAssessAccounts);
}
return assessAccountsId;
}
@Override
public TaskReportVO getReportById(String reportId) { public TaskReportVO getReportById(String reportId) {
TaskReportVO reportById = taskMapper.getReportById(reportId); TaskReportVO reportById = taskMapper.getReportById(reportId);
List<ChAprReportFraction> chAprReportFractions = chAprReportFractionMapper.selectList(new LambdaQueryWrapper<ChAprReportFraction>().eq(ChAprReportFraction::getReportId, reportId)); List<ChAprReportFraction> chAprReportFractions = chAprReportFractionMapper.selectList(new LambdaQueryWrapper<ChAprReportFraction>().eq(ChAprReportFraction::getReportId, reportId));
...@@ -736,4 +822,38 @@ public class TaskServiceImpl implements TaskService { ...@@ -736,4 +822,38 @@ public class TaskServiceImpl implements TaskService {
return workbook; return workbook;
} }
@Override
public Workbook assessAccountExport(String assessAccountsId) {
List<AssessAccountsExportResp> assessAccountExportList = chAssessDetailAccountsMapper.assessAccountDetailExport(assessAccountsId);
ExportParams exportParams = new ExportParams();
exportParams.setType(ExcelType.XSSF); //对应xlsx
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, AssessAccountsExportResp.class, assessAccountExportList);
return workbook;
}
@Override
public List<ChAssessDetailAccountsResp> queryAssessAccountsDetail(String assessAccountsId) {
return chAssessDetailAccountsMapper.queryAssessAccountsDetail(assessAccountsId);
}
@Override
@Transactional(rollbackFor=Exception.class)
public int updateChAssessAccounts(int id) {
ChAssessAccounts ca = new ChAssessAccounts();
ca.setAssessAccountsId(Long.valueOf(id));
ca.setAccountsStatus((short) 2);
return chAssessAccountsMapper.updateById(ca);
}
@Override
public Page<AssessAccountsListResp> searchAssessAccountsList(SrvOrganListReq srvOrganListReq) {
// List<Long> organIds = baseAccountService.getOrganIds(srvOrganListReq.getOrganId(), srvOrganListReq.getIsInvolveChild());
return chAssessAccountsMapper.searchAssessAccountList(new Page<>(srvOrganListReq.getPageNum(), srvOrganListReq.getPageSize()), null, srvOrganListReq);
}
} }
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hungraim.ltc.account.dao.ChAssessAccountsMapper"> <mapper namespace="com.hungraim.ltc.dao.ChAssessAccountsMapper">
<!--查询评估信息-->
<select id="getAssessAccountsList" resultType="com.hungraim.ltc.pojo.vo.account.AssessAccountsVO">
select
DISTINCT task.task_id taskId,
fndOrgan.ORGAN_NAME organName,
task.ORGAN_ID aprOrganId,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where task.DISTRICT_PROVINCIAL = dis.DISTRICT_CODE) districtProvincial,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where task.DISTRICT_CITY = dis.DISTRICT_CODE) districtCity,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where task.DISTRICT_AREA = dis.DISTRICT_CODE) districtArea,
disable.DISAB_INFO_ID disabInfoId,
disable.real_name realName,
disable.certi_code certiCode,
disable.BIRTHDAY birthday,
disable.tel tel,
disable.gender gender,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE disable.DISTRICT_PROVINCIAL = dis.DISTRICT_CODE) disDistrictProvincial,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE disable.district_city = dis.DISTRICT_CODE) disDistrictCity,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE disable.district_area = dis.DISTRICT_CODE) disDistrictArea,
disable.end_time endTime,
task.finish_time finishTime,
emp.APREMP_TYPE_NAME_F aprempTypeName
from CH_APR_TASK task
left join ch_apr_organ aprOrgan on task.apr_organ_id = aprOrgan.apr_organ_id
left join ch_disable_info disable on task.disable_info_id = disable.disab_info_id
left join ch_apr_emp emp on task.apr_emp_id = emp.emp_id and emp.IS_LOCK = 0
left join ch_apr_report report on report.TASK_ID = task.TASK_ID
left join CH_FND_ORGAN fndOrgan on task.ORGAN_ID = fndOrgan.ORGAN_ID
where task.task_status = 2 and emp.APREMP_TYPE_NAME_F is not null
<select id="queryAssessByOrganIdAndTime" resultType="com.hungraim.ltc.pojo.vo.assessment.AssessIdAndCostVO">
select a.ASSESS_ACCOUNTS_ID assessAccountsId,a.ASSESS_ALL_COST assessAllCost from
CH_ASSESS_ACCOUNTS a where a.APR_ORGAN_ID = #{aprOrganId}
and to_char(a.ACCOUNTS_TIME,'yyyy-MM') = #{accountsTime}
and a.MODE_ID = #{modeId}
</select> </select>
<select id="searchAssessAccountList" resultType="com.hungraim.ltc.pojo.vo.account.AssessAccountsListResp"> <select id="searchAssessAccountList" resultType="com.hungraim.ltc.pojo.vo.account.AssessAccountsListResp">
SELECT SELECT
t1.ASSESS_ACCOUNTS_ID, t1.ASSESS_ACCOUNTS_ID,
t3.ORGAN_ID, t2.ORGAN_ID,
t3.ORGAN_NAME, t1.MODE_ID,
t2.SRV_ORGAN_ID, mode1.mode_name modeName,
t2.SRV_ORGAN_NAME, t2.ORGAN_NAME,
t1.ACCOUNTS_TIME, t1.ACCOUNTS_TIME,
t1.ACCOUNTS_STATUS, t1.ACCOUNTS_STATUS,
t1.ASSESS_ALL_COST, t1.ASSESS_ALL_COST
t1.ASSESS_START_TIME,
t1.ASSESS_END_TIME
FROM FROM
CH_ASSESS_ACCOUNTS t1 CH_ASSESS_ACCOUNTS t1
LEFT JOIN CH_SRV_ORGAN t2 ON t1.APR_ORGAN_ID = t2.SRV_ORGAN_ID LEFT JOIN CH_APR_ORGAN t2 ON t1.APR_ORGAN_ID = t2.APR_ORGAN_ID
LEFT JOIN CH_FND_ORGAN t3 ON t2.ORGAN_ID = t3.ORGAN_ID 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> <where>
<if test='organIds != null and organIds.size()>0'> <if test="req.accountsTime != null and req.accountsTime != ''">
t3.ORGAN_ID IN AND to_char(t1.ACCOUNTS_TIME,'yyyy-MM') = #{req.accountsTime}
<foreach collection="organIds" open="(" close=")" item="organId" separator=",">
#{organId}
</foreach>
</if> </if>
<if test='req.srvOrganId != null'> <if test="req.organName != null and req.organName != ''">
AND t2.SRV_ORGAN_ID = #{req.srvOrganId} AND t2.ORGAN_NAME LIKE CONCAT('%',CONCAT(#{req.organName},'%'))
</if>
<if test='req.accountsTime != null'>
AND t1.ACCOUNTS_TIME = #{req.accountsTime}
</if> </if>
</where> </where>
</select> </select>
...@@ -102,19 +68,14 @@ ...@@ -102,19 +68,14 @@
</where> </where>
</select> </select>
<select id="assessAccountDetailExport" resultType="com.hungraim.ltc.pojo.vo.account.AssessAccountsExportResp">
SELECT
t3.SRV_ORGAN_NAME,
to_char(t1.ACCOUNTS_TIME,'yyyy-MM') accountsTime, <select id="getAssessAccountsList" resultType="com.hungraim.ltc.pojo.vo.account.AssessAccountsVO">
t1.ASSESS_ALL_COST assessCost, select * from CH_ASSESS_ACCOUNTS t1 where
to_char(t1.ASSESS_START_TIME,'yyyy-MM-dd') assessStartTime,
to_char(t1.ASSESS_END_TIME,'yyyy-MM-dd') assessEndTime
FROM
CH_ASSESS_ACCOUNTS_DETAIL t1
left join ch_disable_info t2 on t1.disab_info_id = t2.disab_info_id
LEFT JOIN CH_SRV_ORGAN t3 ON t1.SRV_ORGAN_ID = t3.SRV_ORGAN_ID
where t1.ASSESS_ACCOUNTS_ID = #{assessAccountsId}
</select> </select>
</mapper> </mapper>
<?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.dao.ChAssessDetailAccountsMapper">
<select id="queryAssessAccountsDetail"
resultType="com.hungraim.ltc.pojo.entity.assessment.ChAssessDetailAccountsResp">
select
apply.REAL_NAME realName,
d.ASSESS_COST assessAllCost,
organ.organ_name assessOrganName,
to_char(d.ACCOUNTS_TIME,'yyyy-MM') accountsTime,
(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
left join CH_DISABLE_APPLY apply on d.APPLY_ID=apply.APPLY_ID
left join CH_APR_ORGAN organ on organ.APR_ORGAN_ID = d.APR_ORGAN_ID
left join CH_APR_EMP emp on emp.EMP_ID = d.EMP_ID
where d.ASSESS_ACCOUNTS_ID = #{assessAccountsId}
</select>
<select id="assessAccountDetailExport" resultType="com.hungraim.ltc.pojo.vo.account.AssessAccountsExportResp">
SELECT
t2.REAL_NAME realName,
t3.ORGAN_NAME organName,
to_char(t1.ACCOUNTS_TIME,'yyyy-MM') accountsTime,
t1.ASSESS_COST assessCost,
to_char(t1.assess_time,'yyyy-MM-dd') assessTime,
t4.REAL_NAME empName,
(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
LEFT JOIN CH_APR_ORGAN t3 ON t1.APR_ORGAN_ID = t3.APR_ORGAN_ID
left join CH_APR_EMP t4 on t4.EMP_ID = t1.EMP_ID
where t1.ASSESS_ACCOUNTS_ID = #{assessAccountsId}
</select>
</mapper>
...@@ -16,6 +16,4 @@ public class AuthApplication { ...@@ -16,6 +16,4 @@ public class AuthApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(AuthApplication.class, args); SpringApplication.run(AuthApplication.class, args);
} }
} }
...@@ -69,6 +69,12 @@ public class ChDisabDetailAccounts implements Serializable { ...@@ -69,6 +69,12 @@ public class ChDisabDetailAccounts implements Serializable {
*/ */
private Date accountsEndTime; private Date accountsEndTime;
private String taskDetailId;
private String medicalArea;
private String itemIds;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }
\ No newline at end of file
package com.hungraim.ltc.pojo.entity.account;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@Data
public class ChDisabDetailAccountsResp implements Serializable {
/**
* 结算月份
*/
private String accountsTime;
/**
* 应拨总费用
*/
private String accountsAllCost;
private String accountsOverallCost;
private String accountsPersonalCost;
/**
* 服务方式
*/
private String modeName;
/**
* 费用开始日期
*/
private String accountsStartTime;
/**
* 费用结束日期
*/
private String accountsEndTime;
private String medicalArea;
private String srvOrganName;
private String realName;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.hungraim.ltc.pojo.entity.account; package com.hungraim.ltc.pojo.entity.assessment;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence; import com.baomidou.mybatisplus.annotation.KeySequence;
...@@ -9,6 +9,7 @@ import lombok.Data; ...@@ -9,6 +9,7 @@ import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/** /**
...@@ -26,7 +27,7 @@ public class ChAssessAccounts implements Serializable { ...@@ -26,7 +27,7 @@ public class ChAssessAccounts implements Serializable {
private Long assessAccountsId; private Long assessAccountsId;
/** /**
* 机构id * 评定机构id
*/ */
private Long aprOrganId; private Long aprOrganId;
...@@ -46,10 +47,6 @@ public class ChAssessAccounts implements Serializable { ...@@ -46,10 +47,6 @@ public class ChAssessAccounts implements Serializable {
private Date accountsTime; private Date accountsTime;
/**
* 是否结算(0未结算,1已结算)
*/
private Short chooseSettle;
/** /**
* 状态(0-待提交;1-待审核;2-已审核;3-已失效;) * 状态(0-待提交;1-待审核;2-已审核;3-已失效;)
...@@ -66,35 +63,14 @@ public class ChAssessAccounts implements Serializable { ...@@ -66,35 +63,14 @@ public class ChAssessAccounts implements Serializable {
*/ */
private String checkRemark; private String checkRemark;
/**
* 省
*/
private String districtProvincial;
/**
* 市
*/
private String districtCity;
/**
* 区
*/
private String districtArea;
/** /**
* 费用开始日期
*/
private Date assessStartTime;
/**
* 费用结束日期
*/
private Date assessEndTime;
/**
* 总费用合计 * 总费用合计
*/ */
private String assessAllCost; private BigDecimal assessAllCost;
private Integer modeId;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
package com.hungraim.ltc.pojo.entity.account; package com.hungraim.ltc.pojo.entity.assessment;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence; import com.baomidou.mybatisplus.annotation.KeySequence;
...@@ -9,7 +9,6 @@ import lombok.Data; ...@@ -9,7 +9,6 @@ import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/** /**
...@@ -26,13 +25,18 @@ public class ChAssessDetailAccounts implements Serializable { ...@@ -26,13 +25,18 @@ public class ChAssessDetailAccounts implements Serializable {
private Long assessAccountsDetailId; private Long assessAccountsDetailId;
private Long assessAccountsId; private Long assessAccountsId;
private String disabInfoId;
private String applyId;
private String empId;
/** /**
* 护理机构id * 评定机构id
*/ */
private String srvOrganId; private String aprOrganId;
/** /**
* 创建时间 * 创建时间
...@@ -44,28 +48,11 @@ public class ChAssessDetailAccounts implements Serializable { ...@@ -44,28 +48,11 @@ public class ChAssessDetailAccounts implements Serializable {
/** /**
* 结算月份 * 结算月份
*/ */
@DateTimeFormat(pattern = "yyyy-MM")
@JsonFormat(pattern = "yyyy-MM",timezone = "GMT+8")
private Date accountsTime; private Date accountsTime;
private Date assessTime;
private String assessAllCost; private String assessCost;
private String assessOverallCost;
private String assessPersonalCost;
/**
* 费用开始日期
*/
private Date assessStartTime;
/**
* 费用结束日期
*/
private Date assessEndTime;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
package com.hungraim.ltc.pojo.entity.assessment;
import lombok.Data;
import java.io.Serializable;
@Data
public class ChAssessDetailAccountsResp implements Serializable {
private String realName;
private String empName;
/**
* 结算月份
*/
private String accountsTime;
/**
* 评估时间
*/
private String assessTime;
/**
* 评估总费用
*/
private String assessAllCost;
/**
* 评估机构名称
*/
private String assessOrganName;
/**
* 统筹区
*/
private String medicalArea;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
...@@ -610,12 +610,12 @@ public class ChDisableApply extends PageInfo implements Serializable { ...@@ -610,12 +610,12 @@ public class ChDisableApply extends PageInfo implements Serializable {
/** /**
*医保统筹区省 *医保统筹区省
*/ */
private String medicalProvincial; // private String medicalProvincial;
/** /**
*医保统筹区市 *医保统筹区市
*/ */
private String medicalCity; //private String medicalCity;
/** /**
*医保统筹区区 *医保统筹区区
......
package com.hungraim.ltc.pojo.entity.governance;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;
@Data
@TableName("CH_SRV_PLAN")
@KeySequence("SEQ_CH_SRV_PLAN")
public class ChSrvPlan {
@TableId(value = "plan_ID", type = IdType.INPUT)
private Long planID;
private Long srvOrganId;
private Long disabInfoId;
private Long modeId;
private Long empId;
private Long taskDetailId;
private Long itemId;
private String itemName;
private Date creationTime;
private Date srvPlanTime;
private Long isStatus;
}
package com.hungraim.ltc.pojo.vo.account;
import lombok.Data;
@Data
public class AccountTaskExecuteReqVO {
private String planId;
private String taskDetailId;
private String itemId;
private String srvDate;
}
package com.hungraim.ltc.pojo.vo.account;
import lombok.Data;
import java.util.List;
@Data
public class AccountTaskReqVO {
private List<AccountTaskExecuteReqVO> accountTaskList;
}
...@@ -11,24 +11,22 @@ import java.util.Date; ...@@ -11,24 +11,22 @@ import java.util.Date;
public class AssessAccountsExportResp { public class AssessAccountsExportResp {
@Excel(name = "统筹区",width = 20)
private String medicalArea;
@Excel(name = "适用机构名称",width = 20) @Excel(name = "失能人员姓名",width = 20)
private String organName; private String realName;
@Excel(name = "评估机构名称",width = 20)
private String organName;
/** @Excel(name = "评定人员姓名",width = 20)
* 护理机构名称 private String empName;
*/
@Excel(name = "护理机构名称",width = 20)
private String srvOrganName;
/**
* 结算月份
*/
@Excel(name = "结算月份",width = 20)
private String accountsTime;
@Excel(name = "评估时间",width = 20)
private String assessTime;
/** /**
...@@ -38,19 +36,4 @@ public class AssessAccountsExportResp { ...@@ -38,19 +36,4 @@ public class AssessAccountsExportResp {
private String assessCost; private String assessCost;
/**
* 费用开始时间
*/
@Excel(name = "费用开始时间",width = 20)
private String assessStartTime;
/**
* 费用结束时间
*/
@Excel(name = "费用结束时间",width = 20)
private String assessEndTime;
} }
...@@ -15,26 +15,19 @@ public class AssessAccountsListResp { ...@@ -15,26 +15,19 @@ public class AssessAccountsListResp {
private Long assessAccountsId; private Long assessAccountsId;
/** /**
* 适用机构id * 评估机构id
*/ */
private Long organId; private Long organId;
/** /**
* 适用机构名称 * 评估机构名称
*/ */
private String organName; private String organName;
/**
* 护理机构id
*/
private String srvOrganId;
private String disabInfoId; private String modeName;
/** private String modeId;
* 护理机构名称
*/
private String srvOrganName;
/** /**
* 结算月份 * 结算月份
...@@ -48,24 +41,11 @@ public class AssessAccountsListResp { ...@@ -48,24 +41,11 @@ public class AssessAccountsListResp {
*/ */
private Short accountsStatus; private Short accountsStatus;
/**
* 总费用
*/
private String assessCost;
/** private String assessAllCost;
* 费用开始时间
*/
private String assessStartTime;
/**
* 费用结束时间
*/
private String assessEndTime;
private String aprempTypeName; // private String aprempTypeName;
......
...@@ -9,9 +9,8 @@ import lombok.Data; ...@@ -9,9 +9,8 @@ import lombok.Data;
public class AssessAccountsVO { public class AssessAccountsVO {
private String organName; private String organName;
private String aprOrganId; private String aprOrganId;
private String districtProvincial;
private String districtCity;
private String districtArea;
private String aprempTypeName; private String aprempTypeName;
private String disabInfoId; private String disabInfoId;
private String acceptTime;
private String finishTime;
} }
...@@ -10,6 +10,10 @@ import java.math.BigDecimal; ...@@ -10,6 +10,10 @@ import java.math.BigDecimal;
@Data @Data
public class OrganAccountsVO { public class OrganAccountsVO {
private String taskDetailId;
private String itemId;
private String disabInfoId; private String disabInfoId;
/** /**
* 失能人员姓名 * 失能人员姓名
...@@ -39,12 +43,11 @@ public class OrganAccountsVO { ...@@ -39,12 +43,11 @@ public class OrganAccountsVO {
* 护理机构名称 * 护理机构名称
*/ */
private String srvOrganName; private String srvOrganName;
/** /**
* 所在省市 * 医保统筹区
*/ */
private String districtProvincial; private String medicalArea;
private String districtCity;
private String districtArea;
/** /**
* 护理服务人员 * 护理服务人员
*/ */
...@@ -53,6 +56,16 @@ public class OrganAccountsVO { ...@@ -53,6 +56,16 @@ public class OrganAccountsVO {
* 任务时间 * 任务时间
*/ */
private String srvDate; private String srvDate;
/**
* 任务开始时间
*/
private String srvStartTime;
/**
* 任务结束时间
*/
private String srvEndTime;
/** /**
* 机构等级 * 机构等级
*/ */
...@@ -74,4 +87,6 @@ public class OrganAccountsVO { ...@@ -74,4 +87,6 @@ public class OrganAccountsVO {
*/ */
private BigDecimal personalCost; private BigDecimal personalCost;
private String itemName;
} }
...@@ -15,6 +15,9 @@ public class SrvOrganAccountListResp { ...@@ -15,6 +15,9 @@ public class SrvOrganAccountListResp {
*/ */
private Long accountsId; private Long accountsId;
private String modeName;
/** /**
* 适用机构id * 适用机构id
*/ */
...@@ -73,5 +76,10 @@ public class SrvOrganAccountListResp { ...@@ -73,5 +76,10 @@ public class SrvOrganAccountListResp {
*/ */
private String svrEndTime; private String svrEndTime;
/**
* 实拨总费用
*/
private String totalAllocatedExpenses;
} }
...@@ -26,6 +26,12 @@ public class SrvOrganListReq extends BaseReq { ...@@ -26,6 +26,12 @@ public class SrvOrganListReq extends BaseReq {
*/ */
private Long srvOrganId; private Long srvOrganId;
/**
* 护理机构id
*/
private String srvOrganName;
/** /**
* 结算月份 * 结算月份
*/ */
......
package com.hungraim.ltc.pojo.vo.account;
import com.hungraim.ltc.pojo.vo.BaseReq;
import lombok.Data;
/**
* @author zwl
**/
@Data
public class SrvTaskReqVO extends BaseReq {
//失能人员姓名
private String realName;
// 任务时间
private String srvDate;
private String status;
private String srvOrganName;
}
package com.hungraim.ltc.pojo.vo.account;
import lombok.Data;
/**
* @author zwl
**/
@Data
public class SrvTaskRespVO {
private Long planId;
// 任务id
private Long taskDetailId;
// 失能人员姓名
private String realName;
// 护理机构
private String srvOrganName;
// 护理人员
private String empName;
// 任务时间
private String srvDate;
// 任务名称
private String itemName;
// 任务名称
private Long itemId;
private Long status;
private String srvModeName;
}
package com.hungraim.ltc.pojo.vo.assessment;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class AssessIdAndCostVO {
private Long assessAccountsId;
private BigDecimal assessAllCost;
}
...@@ -15,6 +15,7 @@ public class ReportDetailVO { ...@@ -15,6 +15,7 @@ public class ReportDetailVO {
Integer person3; Integer person3;
String evaluateTime; String evaluateTime;
Integer disableLevelId; Integer disableLevelId;
String applyId;
String polNo; String polNo;
String remark; String remark;
List<ChFndAttach> fileDataList; List<ChFndAttach> fileDataList;
......
package com.hungraim.ltc.pojo.vo.assessment;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hungraim.ltc.pojo.vo.BaseReq;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
@Data
public class SrvOrganListReq extends BaseReq {
/**
* 适用机构id
*/
private Long organId;
private String organName;
/**
* 是否包含下级机构
*/
// private Boolean isInvolveChild;
/**
* 护理机构id
*/
// private Long srvOrganId;
/**
* 结算月份
*/
@JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
private String accountsTime;
}
...@@ -34,12 +34,12 @@ public class DisableExamineInfoVO { ...@@ -34,12 +34,12 @@ public class DisableExamineInfoVO {
/** /**
*医保统筹区省 *医保统筹区省
*/ */
private String medicalProvincial; // private String medicalProvincial;
/** /**
*医保统筹区市 *医保统筹区市
*/ */
private String medicalCity; // private String medicalCity;
/** /**
*医保统筹区区 *医保统筹区区
...@@ -125,5 +125,7 @@ public class DisableExamineInfoVO { ...@@ -125,5 +125,7 @@ public class DisableExamineInfoVO {
// 复评备注 // 复评备注
private String reasonsRemark; private String reasonsRemark;
private String bankCardNo;
private List<ChFndAttach> fileDataList; private List<ChFndAttach> fileDataList;
} }
...@@ -229,6 +229,22 @@ public class DateUtils { ...@@ -229,6 +229,22 @@ public class DateUtils {
} }
/** /**
* 将短时间格式时间转换为字符串 yyyy-MM
*
* @param dateDate
* @param
* @return
*/
public static String dateToStrYm(Date dateDate) {
if (dateDate == null) {
return "";
}
SimpleDateFormat formatter = new SimpleDateFormat(DATE_PATTERN_yyyy_MM);
String dateString = formatter.format(dateDate);
return dateString;
}
/**
* 将短时间格式时间转换为字符串 yyyyMMdd * 将短时间格式时间转换为字符串 yyyyMMdd
* *
* @param dateDate * @param dateDate
...@@ -864,7 +880,7 @@ public class DateUtils { ...@@ -864,7 +880,7 @@ public class DateUtils {
* @return * @return
*/ */
public static String getlastMonth(){ public static String getlastMonth(){
SimpleDateFormat ym=new SimpleDateFormat(DATE_PATTERN_yyyy_MM); SimpleDateFormat ym=new SimpleDateFormat(DATE_PATTERN_yyyy_MM_dd);
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.MONTH,-1); calendar.add(Calendar.MONTH,-1);
String lastMonth =ym.format(calendar.getTime()); String lastMonth =ym.format(calendar.getTime());
...@@ -876,7 +892,7 @@ public class DateUtils { ...@@ -876,7 +892,7 @@ public class DateUtils {
* @return * @return
*/ */
public static Date getlastMonth(String str){ public static Date getlastMonth(String str){
DateFormat fmt =new SimpleDateFormat(DATE_PATTERN_yyyy_MM); DateFormat fmt =new SimpleDateFormat(DATE_PATTERN_yyyy_MM_dd);
Date date = null; Date date = null;
try { try {
date = fmt.parse(str); date = fmt.parse(str);
......
...@@ -31,6 +31,8 @@ public enum ResultCode implements IResultCode, Serializable { ...@@ -31,6 +31,8 @@ public enum ResultCode implements IResultCode, Serializable {
TOKEN_INVALID_OR_EXPIRED("A0230", "token无效或已过期"), TOKEN_INVALID_OR_EXPIRED("A0230", "token无效或已过期"),
// 请求参数错误,参数校验不通过 // 请求参数错误,参数校验不通过
REQUEST_PARAM_ERROR("Q0001", "请求参数错误"), REQUEST_PARAM_ERROR("Q0001", "请求参数错误"),
//文件类型不匹配
FILE_TYPE_ERROR("F0001", "文件类型不支持"),
// 请求参数错误,参数校验不通过 // 请求参数错误,参数校验不通过
SRV_ORGAN_NOT_QUERY("S0001", "未查询到数据"), SRV_ORGAN_NOT_QUERY("S0001", "未查询到数据"),
/** /**
......
...@@ -96,6 +96,18 @@ ...@@ -96,6 +96,18 @@
<artifactId>apply-api</artifactId> <artifactId>apply-api</artifactId>
<version>0.0.1</version> <version>0.0.1</version>
</dependency> </dependency>
<dependency>
<groupId>com.hungraim.ltc</groupId>
<artifactId>account-api</artifactId>
<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> </dependencies>
<build> <build>
......
...@@ -2,6 +2,8 @@ package com.hungraim.ltc.governance.controller; ...@@ -2,6 +2,8 @@ package com.hungraim.ltc.governance.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.governance.service.SrvTaskService; import com.hungraim.ltc.governance.service.SrvTaskService;
import com.hungraim.ltc.pojo.vo.account.SrvTaskReqVO;
import com.hungraim.ltc.pojo.vo.account.SrvTaskRespVO;
import com.hungraim.ltc.pojo.vo.governance.*; import com.hungraim.ltc.pojo.vo.governance.*;
import com.hungraim.ltc.util.Result; import com.hungraim.ltc.util.Result;
import com.hungraim.ltc.util.ResultCode; import com.hungraim.ltc.util.ResultCode;
...@@ -9,10 +11,7 @@ import lombok.extern.slf4j.Slf4j; ...@@ -9,10 +11,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -135,7 +134,14 @@ public class SrvTaskController { ...@@ -135,7 +134,14 @@ public class SrvTaskController {
e.printStackTrace(); e.printStackTrace();
return Result.failed(e.getMessage()); return Result.failed(e.getMessage());
} }
srvTaskService.otherPlaceHandler(param.getProgramId());
return Result.success(); return Result.success();
} }
@GetMapping("otherPlaceHandler")
public void otherPlaceHandler(String programId){
srvTaskService.otherPlaceHandler(programId);
}
} }
package com.hungraim.ltc.governance.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.governance.ChSrvPlan;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
@Mapper
public interface ChSrvPlanMapper extends BaseMapper<ChSrvPlan> {
List<ChSrvPlan> queryPlan(String programId);
}
package com.hungraim.ltc.governance.service; package com.hungraim.ltc.governance.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.vo.account.SrvTaskReqVO;
import com.hungraim.ltc.pojo.vo.account.SrvTaskRespVO;
import com.hungraim.ltc.pojo.vo.governance.*; import com.hungraim.ltc.pojo.vo.governance.*;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -18,6 +20,9 @@ public interface SrvTaskService { ...@@ -18,6 +20,9 @@ public interface SrvTaskService {
List<SrvTaskInfoVO> getSrvTaskInfoList(String programId); List<SrvTaskInfoVO> getSrvTaskInfoList(String programId);
// mode_id 4
void otherPlaceHandler(String programId);
Page<OrganEmpVO> getSrvOrganEmpList(Page<OrganEmpVO> page, String organId, String name, String certiType, String certifNum); Page<OrganEmpVO> getSrvOrganEmpList(Page<OrganEmpVO> page, String organId, String name, String certiType, String certifNum);
Page<SrvTaskDetailVO> getSrvTaskDetailList(Page<SrvTaskDetailVO> page, Integer organId, String disableName, String disableTel, String empName, String certifNum, Date startTime, Date endTime, String status, String modeId); Page<SrvTaskDetailVO> getSrvTaskDetailList(Page<SrvTaskDetailVO> page, Integer organId, String disableName, String disableTel, String empName, String certifNum, Date startTime, Date endTime, String status, String modeId);
...@@ -26,4 +31,5 @@ public interface SrvTaskService { ...@@ -26,4 +31,5 @@ public interface SrvTaskService {
* 新增或者修改服务计划 * 新增或者修改服务计划
*/ */
void addOrUpdateSrvTask(SrvTaskInfoListVO param); void addOrUpdateSrvTask(SrvTaskInfoListVO param);
} }
...@@ -3,19 +3,20 @@ package com.hungraim.ltc.governance.service.impl; ...@@ -3,19 +3,20 @@ package com.hungraim.ltc.governance.service.impl;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
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.api.AccountFeignService;
import com.hungraim.ltc.api.AttachFeignService; import com.hungraim.ltc.api.AttachFeignService;
import com.hungraim.ltc.governance.dao.ChSrvPlanMapper;
import com.hungraim.ltc.governance.dao.ChSrvTaskDetailMapper; import com.hungraim.ltc.governance.dao.ChSrvTaskDetailMapper;
import com.hungraim.ltc.governance.dao.SrvTaskMapper; import com.hungraim.ltc.governance.dao.SrvTaskMapper;
import com.hungraim.ltc.governance.service.SrvTaskService; import com.hungraim.ltc.governance.service.SrvTaskService;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach; import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach;
import com.hungraim.ltc.pojo.entity.governance.ChSrvPlan;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTask; import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTask;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail; import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail;
import com.hungraim.ltc.pojo.vo.governance.*; import com.hungraim.ltc.pojo.vo.governance.*;
import com.hungraim.ltc.pojo.vo.system.AttachUpdateVo; import com.hungraim.ltc.pojo.vo.system.AttachUpdateVo;
import com.hungraim.ltc.util.AttachType; import com.hungraim.ltc.util.AttachType;
import com.hungraim.ltc.util.DateUtils; import com.hungraim.ltc.util.DateUtils;
import com.hungraim.ltc.util.Result;
import com.hungraim.ltc.util.ResultCode;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -35,6 +36,10 @@ public class SrvTaskServiceImpl implements SrvTaskService { ...@@ -35,6 +36,10 @@ public class SrvTaskServiceImpl implements SrvTaskService {
private final SrvTaskMapper srvTaskMapper; private final SrvTaskMapper srvTaskMapper;
private final ChSrvTaskDetailMapper chSrvTaskDetailMapper; private final ChSrvTaskDetailMapper chSrvTaskDetailMapper;
private final AttachFeignService attachFeignService; private final AttachFeignService attachFeignService;
private final ChSrvPlanMapper chSrvPlanMapper;
private final AccountFeignService accountFeignService;
/** /**
* 服务计划制定列表 * 服务计划制定列表
...@@ -137,6 +142,7 @@ public class SrvTaskServiceImpl implements SrvTaskService { ...@@ -137,6 +142,7 @@ public class SrvTaskServiceImpl implements SrvTaskService {
//添加服务计划详情 //添加服务计划详情
Long newSrvTaskId = chSrvTask.getSrvTaskId(); Long newSrvTaskId = chSrvTask.getSrvTaskId();
this.insertTaskDetail(newSrvTaskId, taskDetails); this.insertTaskDetail(newSrvTaskId, taskDetails);
saveSrvPlan(programId);
//添加附件 //添加附件
// this.updateAttachs(srvTaskInfoVO.getListAttach(), chSrvTask.getSrvTaskId()); // this.updateAttachs(srvTaskInfoVO.getListAttach(), chSrvTask.getSrvTaskId());
} else { } else {
...@@ -149,6 +155,20 @@ public class SrvTaskServiceImpl implements SrvTaskService { ...@@ -149,6 +155,20 @@ public class SrvTaskServiceImpl implements SrvTaskService {
} }
} }
public void saveSrvPlan(String programId){
List<ChSrvPlan> chSrvPlans = chSrvPlanMapper.queryPlan(programId);
for (ChSrvPlan chSrvPlan : chSrvPlans) {
chSrvPlanMapper.insert(chSrvPlan);
}
}
// mode_id 4
@Override
public void otherPlaceHandler(String programId){
accountFeignService.getOtherPlace(programId);
}
/** /**
* 插入服务计划详情数据 * 插入服务计划详情数据
* *
......
...@@ -47,7 +47,8 @@ ...@@ -47,7 +47,8 @@
SELECT SELECT
PROJECT_ID, PROJECT_ID,
SRV_ORGAN_ID, SRV_ORGAN_ID,
ITEM_NAME, -- ITEM_NAME,
d.service_type_detailed_name ITEM_NAME,
CATEGORY_TYPE, CATEGORY_TYPE,
CH_SRV_ORGAN_PROJECT.ITEM_TIMES, CH_SRV_ORGAN_PROJECT.ITEM_TIMES,
ITEM_TIMES_TYPE, ITEM_TIMES_TYPE,
...@@ -64,7 +65,8 @@ ...@@ -64,7 +65,8 @@
<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} AND STATUS = 0 left join CH_SERVICE_TYPE_detailed d on d.service_type_detailed_id = CH_SRV_ORGAN_PROJECT.item_name
WHERE SRV_ORGAN_ID = #{srvOrganId} 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">
......
<?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.governance.dao.ChSrvPlanMapper">
<select id="queryPlan" resultType="com.hungraim.ltc.pojo.entity.governance.ChSrvPlan">
select
disable.DISAB_INFO_ID disabInfoId,
disable.SRV_MODE_ID modeId,
--护理机构名称
organ.srv_organ_id srvOrganId,
emp.emp_id empId,
--任务时间
detail.SRV_DATE srvPlanTime,
detail.TASK_DETAIL_ID taskDetailId,
d.SERVICE_TYPE_DETAILED_NAME itemName,
CSTFI.ITEM_ID itemId,
'0' isStatus
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_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_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>
disable.SRV_MODE_ID in ('1','2') and program.program_id =#{programId}
</where>
order by detail.SRV_DATE desc
</select>
</mapper>
...@@ -42,8 +42,9 @@ ...@@ -42,8 +42,9 @@
LEFT JOIN ch_srv_send s ON s.disab_info_id = i.disab_info_id LEFT JOIN ch_srv_send s ON s.disab_info_id = i.disab_info_id
LEFT JOIN ch_fnd_organ o ON i.organ_id = o.organ_id LEFT JOIN ch_fnd_organ o ON i.organ_id = o.organ_id
LEFT JOIN CH_APR_TASK t ON i.disab_info_id = t.DISABLE_INFO_ID LEFT JOIN CH_APR_TASK t ON i.disab_info_id = t.DISABLE_INFO_ID
left join ch_apr_report report on t.task_id = report.task_id
<where> <where>
t.TASK_STATUS = 3 t.TASK_STATUS = 3 and report.DISABLE_LEVEL_ID in ('3','4','5')
<if test="chSrvOrgan.organId != null and chSrvOrgan.organId != ''"> <if test="chSrvOrgan.organId != null and chSrvOrgan.organId != ''">
AND o.organ_id = #{chSrvOrgan.organId} AND o.organ_id = #{chSrvOrgan.organId}
</if> </if>
......
...@@ -5,6 +5,7 @@ git pull ...@@ -5,6 +5,7 @@ git pull
mvn install mvn install
docker stop ltc-poc docker stop ltc-poc
docker rm ltc-poc
docker rmi ltc:latest docker rmi ltc:latest
docker build -t ltc . docker build -t ltc .
docker run -d --name ltc-poc -p 9999:8001 -m 2G ltc docker run -d -v /projects/logs/:/logs/ --name ltc-poc -p 9999:8001 -m 6G ltc
#!/bin/bash #!/bin/bash
mkdir logs mkdir logs
nohup java -Xms50m -Xmx200m -jar /auth.jar >./logs/auth.log & nohup java -Xms50m -Xmx512m -jar /auth.jar >./logs/auth.log &
nohup java -Xms50m -Xmx200m -jar /system-admin.jar >./logs/admin.log & nohup java -Xms50m -Xmx512m -jar /system-admin.jar >./logs/admin.log &
nohup java -Xms50m -Xmx200m -jar /gateway.jar >./logs/gateway.log & nohup java -Xms50m -Xmx512m -jar /gateway.jar >./logs/gateway.log &
nohup java -Xms50m -Xmx200m -jar /apply.jar >./logs/apply.log & nohup java -Xms50m -Xmx512m -jar /apply.jar >./logs/apply.log &
nohup java -Xms50m -Xmx200m -jar /governance.jar >./logs/govwenanc.log & nohup java -Xms50m -Xmx512m -jar /governance.jar >./logs/govwenanc.log &
nohup java -Xms50m -Xmx200m -jar /assessment.jar >./logs/assessment.log & nohup java -Xms50m -Xmx512m -jar /assessment.jar >./logs/assessment.log &
nohup java -Xms50m -Xmx512m -jar /account.jar >./logs/account.log &
while [[ true ]]; do while [[ true ]]; do
sleep 1 sleep 1
done done
...@@ -4,11 +4,14 @@ import lombok.Data; ...@@ -4,11 +4,14 @@ import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.List;
@Component @Component
@Data @Data
@ConfigurationProperties(prefix = "file.upload") @ConfigurationProperties(prefix = "file.upload")
public class FileUploadConfig { public class FileUploadConfig {
private String path; private String path;
private List<String> type;
} }
...@@ -38,7 +38,16 @@ public class FileUploadController { ...@@ -38,7 +38,16 @@ public class FileUploadController {
if (null == uploadType || null == file) { if (null == uploadType || null == file) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR); return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
} }
//过滤上传资料类型
String originalFilename = file.getOriginalFilename(); 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()); String realPath = FileUtils.uploadFile(file, fileUploadConfig.getPath());
log.info("文件上传成功:{}", realPath); log.info("文件上传成功:{}", realPath);
Long attachId = attachService.saveFileInfo(originalFilename, realPath, uploadType); Long attachId = attachService.saveFileInfo(originalFilename, realPath, uploadType);
......
...@@ -34,4 +34,21 @@ mybatis-plus: ...@@ -34,4 +34,21 @@ mybatis-plus:
file: file:
upload: upload:
path: E:/workspace/upload path: E:/workspace/upload
\ No newline at end of file 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