Commit 56802765 authored by maqing's avatar maqing

Merge branch 'uat_ch_master' into dev_20230224_打卡_马庆

parents 24fe0d32 ec2437fb
......@@ -16,6 +16,8 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
......@@ -107,8 +109,8 @@ public class AccountController {
@PostMapping("/organAccountTaskExecute")
public Result organAccountTaskExecute(AccountTaskReqVO accountTaskReqVO){
List<AccountTaskExecuteReqVO> accountTaskExecuteReqVOS = accountTaskReqVO.getAccountTaskList();
accountService.organAccountTaskExecute(accountTaskExecuteReqVOS);
return Result.success();
Result result = accountService.organAccountTaskExecute(accountTaskExecuteReqVOS);
return result;
}
......@@ -133,24 +135,38 @@ public class AccountController {
/**
* 查询机构结算列表
* 查询机构结算审核列表
*
* @param srvOrganListReq 请求参数对象
* @return 返回
*/
@GetMapping("/searchSrvOrganAccountList")
public Result<Page<SrvOrganAccountListResp>> searchSrvOrganAccountList(SrvOrganListReq srvOrganListReq) {
List<String> list = Arrays.asList("1");
srvOrganListReq.setAccountsStatusList(list);
return Result.success(accountService.searchSrvOrganAccountList(srvOrganListReq));
}
/**
* 查询机构结算复核列表
*
* @param srvOrganListReq 请求参数对象
* @return 返回
*/
@GetMapping("/searchSrvOrganReviewList")
public Result<Page<SrvOrganAccountListResp>> searchSrvOrganReviewList(SrvOrganListReq srvOrganListReq) {
List<String> list = Arrays.asList("2", "3","4");
srvOrganListReq.setAccountsStatusList(list);
return Result.success(accountService.searchSrvOrganAccountList(srvOrganListReq));
}
/**
* 机构结算明细导出
*
*/
@GetMapping("/srvOrganAccountExport")
public void srvOrganAccountExport(String accountsId,HttpServletResponse response){
Workbook workbook = accountService.srvOrganAccountExport(accountsId);
public void srvOrganAccountExport(SrvOrganListReq req,HttpServletResponse response){
Workbook workbook = accountService.srvOrganAccountExport(req);
// 命名表格
String fileName = "srvOrganAccount.xlsx";
FileUtils.exportResponse(workbook,fileName,response);
......@@ -167,15 +183,16 @@ public class AccountController {
/**
* 查询机构结算信息列表明细
*
* @param accountsId 结算id
* @param srvOrganListReq
* @return
*/
@GetMapping("/queryOrganAccountsDetail")
public Result<Page<ChDisabDetailAccountsResp>> queryOrganAccountsDetail(Integer pageNum, Integer pageSize, String accountsId) {
public Result<Page<ChDisabDetailAccountsResp>> queryOrganAccountsDetail(Integer pageNum, Integer pageSize, SrvOrganListReq srvOrganListReq) {
String accountsId = srvOrganListReq.getAccountsId();
if (StringUtils.isBlank(accountsId)) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
Page<ChDisabDetailAccountsResp> chAssessDetailAccounts = accountService.queryOrganAccountsDetail(pageNum,pageSize,accountsId,null);
Page<ChDisabDetailAccountsResp> chAssessDetailAccounts = accountService.queryOrganAccountsDetail(pageNum,pageSize,srvOrganListReq);
return Result.success(chAssessDetailAccounts);
}
......@@ -186,8 +203,10 @@ public class AccountController {
* @return
*/
@GetMapping("/queryAccountsDeclareList")
public Result<Page<ChDisabDetailAccountsResp>> queryAccountsDeclareList(Integer pageNum, Integer pageSize) {
Page<ChDisabDetailAccountsResp> chAssessDetailAccounts = accountService.queryOrganAccountsDetail(pageNum,pageSize,null,0);
public Result<Page<ChDisabDetailAccountsResp>> queryAccountsDeclareList(Integer pageNum, Integer pageSize,SrvOrganListReq srvOrganListReq) {
List<String> accountsStatusList = Arrays.asList("0", "1");
srvOrganListReq.setAccountsStatusList(accountsStatusList);
Page<ChDisabDetailAccountsResp> chAssessDetailAccounts = accountService.queryOrganAccountsDetail(pageNum,pageSize,srvOrganListReq);
return Result.success(chAssessDetailAccounts);
}
......@@ -197,8 +216,10 @@ public class AccountController {
* @return
*/
@GetMapping("/queryDelayAccountList")
public Result<Page<ChDisabDetailAccountsResp>> queryDelayAccountList(Integer pageNum, Integer pageSize) {
Page<ChDisabDetailAccountsResp> chAssessDetailAccounts = accountService.queryOrganAccountsDetail(pageNum,pageSize,null,2);
public Result<Page<ChDisabDetailAccountsResp>> queryDelayAccountList(Integer pageNum, Integer pageSize,SrvOrganListReq srvOrganListReq) {
List<String> list = Arrays.asList("1", "2");
srvOrganListReq.setAccountsStatusList(list);
Page<ChDisabDetailAccountsResp> chAssessDetailAccounts = accountService.queryOrganAccountsDetail(pageNum,pageSize,srvOrganListReq);
return Result.success(chAssessDetailAccounts);
}
......@@ -213,7 +234,7 @@ public class AccountController {
if (result > 0) {
return Result.success();
} else {
return Result.failed();
return Result.failed("该记录不可操作,请联系管理员");
}
}
......@@ -229,7 +250,7 @@ public class AccountController {
if (result > 0) {
return Result.success();
} else {
return Result.failed();
return Result.failed("该记录已不可申报,请联系管理员");
}
}
......@@ -280,11 +301,11 @@ public class AccountController {
* @param accountsDetailId 结算详情id
*/
@DeleteMapping("/deleteAccountsDetail")
public Result deleteAccountsDetail(Long accountsDetailId) {
public Result deleteAccountsDetail(Long accountsDetailId,Long freeRdId) {
if (null == accountsDetailId) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
int result = accountService.deleteAccountsDetail(accountsDetailId);
int result = accountService.deleteAccountsDetail(accountsDetailId,freeRdId);
if(result > 0){
return Result.success();
}else{
......@@ -294,7 +315,7 @@ public class AccountController {
@GetMapping("/queryOverallCostList")
public Result<Page<OverallCostListRespVO>> queryOverallCostList(OverallCostReqVO req) {
Page<OverallCostListRespVO> overallCostRecords = accountService.queryOverallCostList(req);
Page<OverallCostListRespVO> overallCostRecords = accountService.queryFreeRdInfo(req);
return Result.success(overallCostRecords);
}
......
......@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.account.*;
import com.hungraim.ltc.pojo.vo.account.AccountExportDetailListResp;
import com.hungraim.ltc.pojo.vo.account.OrganAccountsVO;
import com.hungraim.ltc.pojo.vo.account.SrvOrganListReq;
import com.hungraim.ltc.util.DateUtils;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
......@@ -18,21 +20,23 @@ public interface ChDisabAccountsDetailMapper extends BaseMapper<ChDisabDetailAcc
List<OrganAccountsVO> getOrganAccountsList(String taskDetailId);
List<AccountExportDetailListResp> searchSrvOrganAccountDetailExport(String accountsId);
List<AccountExportDetailListResp> searchSrvOrganAccountDetailExport(SrvOrganListReq req);
List<ChDisabDetailAccounts> queryAccountByCondition(@Param("taskDetailIds") List<String> taskDetailIds);
List<OrganAccountsVO> getOtherPlaceList(String programId);
Page<ChDisabDetailAccountsResp> queryOrganAccountsDetail(Page page,String accountsId,Integer status);
Page<ChDisabDetailAccountsResp> queryOrganAccountsDetail(Page page,SrvOrganListReq req);
Page<NursingRecordsRespVO> queryNursingRecords(Page page, String taskDetailId);
OverallEduceDecreaseCostRespVO queryOverallCostRecords(OverallCostReqVO req);
Page<OverallCostListRespVO> queryOverallCostList(Page page, OverallCostReqVO req);
int updateByAccountsId(String accountsId);
int updateByAccountsId(String accountsId,Integer accountsStatus);
ChDisabDetailAccounts queryDisabDetailAccounts(String srvOrganId, String accountsTime,String disabInfoId,String srvModeName);
......
package com.hungraim.ltc.account.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.account.ChDisabFreeRdInfo;
import com.hungraim.ltc.pojo.entity.account.OverallCostListRespVO;
import com.hungraim.ltc.pojo.entity.account.OverallCostReqVO;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
/**
* @author zwl
* @ClassName ChDisabFreeRdInfoMapper
* @description
* @date 2023/2/27 20:59
**/
@Repository
@Mapper
public interface ChDisabFreeRdInfoMapper extends BaseMapper<ChDisabFreeRdInfo> {
Page<OverallCostListRespVO> queryFreeRdInfo(Page page, OverallCostReqVO req);
}
......@@ -17,6 +17,9 @@ public interface ChSrvTaskDetailMapper extends BaseMapper<ChSrvTaskDetail> {
Page<SrvTaskRespVO> getSrvTaskList(Page page,SrvTaskReqVO req);
/**
*@desc 更新任务计划表状态为已完成
**/
Integer updateSrvPlanById(String palnId);
}
\ No newline at end of file
package com.hungraim.ltc.account.service;
import com.baomidou.mybatisplus.extension.api.R;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hungraim.ltc.pojo.entity.account.*;
import com.hungraim.ltc.pojo.vo.account.*;
import com.hungraim.ltc.util.Result;
import org.apache.poi.ss.usermodel.Workbook;
import java.text.ParseException;
......@@ -27,31 +29,34 @@ public interface AccountService extends IService<ChDisabAccounts> {
ExpenseVo expenseSettlement(ExpenseSettlementReq req) throws ParseException;
Workbook srvOrganAccountExport(String accountsId);
Workbook srvOrganAccountExport(SrvOrganListReq req);
Page<ChDisabDetailAccountsResp> queryOrganAccountsDetail(Integer pageNum, Integer pageSize,String accountsId,Integer status);
Page<NursingRecordsRespVO> queryNursingRecords(Integer pageNum, Integer pageSize, String taskDetailId);
OverallEduceDecreaseCostRespVO queryOverallCostRecords(OverallCostReqVO req);
Page<OverallCostListRespVO> queryOverallCostList(OverallCostReqVO req);
Page<OverallCostListRespVO> queryFreeRdInfo(OverallCostReqVO req);
int overallCostSubmit(OverallCostSubmitReqVO req);
int updateChDisabAccounts(int id);
void organAccountTaskExecute(List<AccountTaskExecuteReqVO> accountTaskExecuteReqVOS);
Result organAccountTaskExecute(List<AccountTaskExecuteReqVO> accountTaskExecuteReqVOS);
void otherPlaceHandler(String programId);
int deleteAccountsDetail(Long accountsDetailId);
int deleteAccountsDetail(Long accountsDetailId,Long freeRdId);
int accountsFreeCommit(Long accountsDetailId);
int delayAccountCommit(Long accountsDetailId,Short status);
Page<ChDisabDetailAccountsResp> queryOrganAccountsDetail(Integer pageNum, Integer pageSize,SrvOrganListReq srvOrganListReq);
}
......@@ -26,17 +26,24 @@
left join ch_srv_organ_emp emp on d.emp_id = emp.emp_id
<where>
1=1
<if test="accountsId != null and accountsId != ''">
and d.ACCOUNTS_ID = #{accountsId}
<if test="req.accountsId != null and req.accountsId != ''">
and d.ACCOUNTS_ID = #{req.accountsId}
</if>
<if test="status != null and status == 2">
and d.status in (1,2)
<if test="req.accountsStatus != null and req.accountsStatus != ''">
and d.status = #{req.accountsStatus}
</if>
<if test="status == null">
and d.status != 2
<if test="req.srvOrganId != null and req.srvOrganId != ''">
and d.SRV_ORGAN_ID = #{req.srvOrganId}
</if>
<if test="status != null and status != 2">
and d.status = #{status}
<if test="req.accountsTime != null and req.accountsTime != ''">
AND to_char(d.ACCOUNTS_TIME,'yyyy-MM') = #{req.accountsTime}
</if>
<if test='req.accountsStatusList != null and req.accountsStatusList.size()>0'>
AND d.status IN
<foreach collection="req.accountsStatusList" open="(" close=")" item="accountsStatusList" separator=",">
#{accountsStatusList}
</foreach>
</if>
</where>
......@@ -44,56 +51,16 @@
<select id="queryNursingRecords" resultType="com.hungraim.ltc.pojo.entity.account.NursingRecordsRespVO">
select organ.SRV_ORGAN_NAME srvOrganName,
detail.MODE_NAME modeName,
to_char(item.FCD,'yyyy-MM-dd HH:mm:ss') executionTime,
service.SERVICE_TYPE_DETAILED_NAME itemName
from CH_DISAB_ACCOUNTS_DETAIL detail
left join CH_SRV_TASK_FINISH_ITEM item on detail.TASK_DETAIL_ID = item.TASK_DETAIL_ID
left join CH_SRV_ORGAN organ on organ.SRV_ORGAN_ID = detail.SRV_ORGAN_ID
LEFT JOIN CH_SRV_ORGAN_PROJECT CSOP ON CSOP.PROJECT_ID = item.ITEM_ID
left join CH_SERVICE_TYPE_DETAILED service on service.SERVICE_TYPE_DETAILED_ID = CSOP.ITEM_NAME
where detail.TASK_DETAIL_ID = #{taskDetailId}
DECODE(plan.MODE_ID, '1','医疗','2', '养老','3','上门', '4', '异地') modeName,
to_char(plan.CREATION_TIME,'yyyy-MM-dd HH24:mi:ss') executionTime,
plan.item_name itemName
from CH_SRV_PLAN plan
left join CH_SRV_ORGAN organ on organ.SRV_ORGAN_ID = plan.SRV_ORGAN_ID
where plan.TASK_DETAIL_ID = #{taskDetailId} and plan.IS_STATUS ='4'
</select>
<select id="queryOverallCostList" resultType="com.hungraim.ltc.pojo.entity.account.OverallCostListRespVO">
select info.REAL_NAME realName,
info.CERTI_CODE certiCode,
apply.MEDICAL_AREA medicalArea,
detail.ACCOUNTS_DETAIL_ID accountsDetailId,
detail.ACCOUNTS_START_TIME svrStartTime,
detail.ACCOUNTS_END_TIME svrEndTime,
detail.DEAL_TYPE dealType,
organ.SRV_ORGAN_NAME srvOrganName,
detail.ACCOUNTS_OVERALL_COST accountsOverallCost,
detail.REISSUE_AMOUNT reissueAmount,
detail.ACCOUNTS_ID accountsId,
detail.DEDUCTION_AMOUNT deductionAmount
from CH_DISAB_ACCOUNTS_DETAIL detail
left join CH_DISABLE_INFO info on info.DISAB_INFO_ID = detail.DISAB_INFO_ID
left join CH_DISABLE_APPLY apply on apply.APPLY_ID = info.APPLY_ID
left join CH_SRV_ORGAN organ on organ.SRV_ORGAN_ID = detail.SRV_ORGAN_ID
<where>
<if test="req.realName != null and req.realName != ''">
and info.REAL_NAME = #{req.realName}
</if>
<if test="req.accountsTime != null and req.accountsTime != ''">
and to_char(detail.accounts_time,'yyyy-MM-dd') = #{req.accountsTime}
</if>
<if test="req.srvOrganName != null and req.srvOrganName != ''">
and organ.SRV_ORGAN_NAME = #{req.srvOrganName}
</if>
<if test="req.certiCode != null and req.certiCode != ''">
and info.certi_Code = #{req.certiCode}
</if>
<if test="req.dealType != null">
and detail.DEAL_TYPE = #{req.dealType}
</if>
<if test="req.dealType == null ">
and detail.DEAL_TYPE in (1,2)
</if>
</where>
</select>
<select id="queryOverallCostRecords"
resultType="com.hungraim.ltc.pojo.entity.account.OverallEduceDecreaseCostRespVO">
......@@ -217,19 +184,43 @@
<select id="searchSrvOrganAccountDetailExport" resultType="com.hungraim.ltc.pojo.vo.account.AccountExportDetailListResp">
select
t3.SRV_ORGAN_NAME srvOrganName,
to_char(t1.ACCOUNTS_TIME,'yyyy-MM') accountsTime,
t1.ACCOUNTS_ALL_COST accountsAllCost,
t1.ACCOUNTS_OVERALL_COST accountsOverallCost,
t1.ACCOUNTS_PERSONAL_COST accountsPersonalCost,
to_char(t1.ACCOUNTS_START_TIME,'yyyy-MM-dd') accountsStartTime,
to_char(t1.ACCOUNTS_END_TIME,'yyyy-MM-dd') accountsEndTime
from CH_DISAB_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.ACCOUNTS_ID = #{accountsId}
t3.ORGAN_NAME organName,
d.MODE_NAME modeName,
to_char(d.ACCOUNTS_START_TIME,'yyyy-MM-dd') accountsStartTime,
to_char(d.ACCOUNTS_END_TIME,'yyyy-MM-dd') accountsEndTime,
to_char(d.ACCOUNTS_TIME,'yyyy-MM') accountsTime,
emp.EMP_NAME empName,
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,
d.DEDUCTION_AMOUNT deductionAmount,
d.REISSUE_AMOUNT reissueAmount,
d.ACCOUNTS_DETAIL_ID accountsDetailId,
d.STATUS
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
LEFT JOIN CH_FND_ORGAN t3 ON o.ORGAN_ID = t3.ORGAN_ID
left join ch_srv_organ_emp emp on d.emp_id = emp.emp_id
<where>
1=1
<if test="accountsId != null and accountsId != ''">
and d.ACCOUNTS_ID = #{accountsId}
</if>
<if test="accountsStatus != null and accountsStatus != ''">
and d.status = #{accountsStatus}
</if>
<if test="srvOrganId != null and srvOrganId != ''">
and d.SRV_ORGAN_ID = #{srvOrganId}
</if>
<if test="accountsTime != null and accountsTime != ''">
AND to_char(d.ACCOUNTS_TIME,'yyyy-MM') = #{accountsTime}
</if>
</where>
</select>
<select id="getOtherPlaceList" resultType="com.hungraim.ltc.pojo.vo.account.OrganAccountsVO">
......@@ -271,8 +262,25 @@
<update id="updateByAccountsId">
update CH_DISAB_ACCOUNTS_DETAIL d set d.status = 3 where d.ACCOUNTS_ID = #{accountsId}
update CH_DISAB_ACCOUNTS_DETAIL d
<set>
<if test="accountsStatus == 0">
d.status = #{accountsStatus},
d.REISSUE_AMOUNT = 0,
d.DEDUCTION_AMOUNT = 0
</if>
</set>
where d.ACCOUNTS_ID = #{accountsId}
</update>
<select id="queryDisabDetailAccounts" resultType="com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccounts">
select * from CH_DISAB_ACCOUNTS_DETAIL d where d.SRV_ORGAN_ID =#{srvOrganId}
and to_char(d.ACCOUNTS_TIME,'yyyy-MM') = #{accountsTime}
and d.DISAB_INFO_ID =#{disabInfoId}
and d.MODE_NAME = #{srvModeName}
</select>
</mapper>
......@@ -62,12 +62,18 @@
<if test='req.srvOrganId != null'>
AND t2.SRV_ORGAN_ID = #{req.srvOrganId}
</if>
<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.accountsStatus != null and req.accountsStatus != ''">
and t1.ACCOUNTS_STATUS = #{req.accountsStatus}
</if>
<if test='req.accountsStatusList != null and req.accountsStatusList.size()>0'>
AND t1.ACCOUNTS_STATUS IN
<foreach collection="req.accountsStatusList" open="(" close=")" item="accountsStatusList" separator=",">
#{accountsStatusList}
</foreach>
</if>
</where>
</select>
......
<?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.ChDisabFreeRdInfoMapper">
<select id="queryFreeRdInfo" resultType="com.hungraim.ltc.pojo.entity.account.OverallCostListRespVO">
select
info.REAL_NAME realName,
info.CERTI_CODE certiCode,
(select district_name from ch_fnd_district dis where apply.MEDICAL_AREA = dis.district_code) medicalArea,
detail.ACCOUNTS_DETAIL_ID accountsDetailId,
to_char(detail.ACCOUNTS_START_TIME,'yyyy-MM-dd') svrStartTime,
to_char(detail.ACCOUNTS_END_TIME,'yyyy-MM-dd') svrEndTime,
rd.DEAL_TYPE dealType,
organ.SRV_ORGAN_NAME srvOrganName,
rd.AMOUNT_OF_MONEY amountOfMoney,
rd.FREE_RD_ID freeRdId,
d.ACCOUNTS_STATUS accountsStatus
from CH_DISAB_FREE_RD_INFO rd left join
CH_DISAB_ACCOUNTS_DETAIL detail on
rd.ACCOUNTS_DETAIL_ID = detail.ACCOUNTS_DETAIL_ID
left join CH_DISAB_ACCOUNTS d on d.ACCOUNTS_ID = detail.ACCOUNTS_ID
left join CH_DISABLE_INFO info on info.DISAB_INFO_ID = detail.DISAB_INFO_ID
left join CH_DISABLE_APPLY apply on apply.APPLY_ID = info.APPLY_ID
left join CH_SRV_ORGAN organ on organ.SRV_ORGAN_ID = detail.SRV_ORGAN_ID
<where>
<if test="req.realName != null and req.realName != ''">
and info.REAL_NAME = #{req.realName}
</if>
<if test="req.accountsTime != null and req.accountsTime != ''">
and to_char(detail.accounts_time,'yyyy-MM-dd') = #{req.accountsTime}
</if>
<if test="req.srvOrganName != null and req.srvOrganName != ''">
and organ.SRV_ORGAN_NAME = #{req.srvOrganName}
</if>
<if test="req.certiCode != null and req.certiCode != ''">
and info.certi_Code = #{req.certiCode}
</if>
<if test="req.dealType != null">
and rd.DEAL_TYPE = #{req.dealType}
</if>
</where>
order by rd.CREATION_TIME desc
</select>
</mapper>
\ No newline at end of file
......@@ -27,13 +27,16 @@
<if test="req.srvOrganName != null and req.srvOrganName != ''">
AND organ.SRV_ORGAN_NAME LIKE CONCAT('%',CONCAT(#{req.srvOrganName},'%'))
</if>
<if test="req.srvDate != null and req.srvDate != ''">
AND to_char(plan.SRV_PLAN_TIME,'yyyy-MM-dd') = #{req.srvDate}
</if>
</where>
</select>
<update id="updateSrvPlanById">
update CH_SRV_PLAN plan set plan.is_status= '4' where plan.plan_id = #{planId}
update CH_SRV_PLAN plan set plan.is_status= '4',plan.creation_time=sysdate where plan.plan_id = #{planId}
</update>
......
......@@ -17,8 +17,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
/**
......@@ -109,14 +107,19 @@ public class DisableController {
List<ChSrvOrgan> chFndSrvModes = disableService.srvOrganList(String.valueOf(organId), srvOrganId, false);
return Result.success(chFndSrvModes);
}
/**
* 查询机构意向服务机构
* 查询意向服务机构
*
* @param
* @param organId
*/
@RequestMapping("/srvOrganList2")
public Result<List<ChSrvOrgan>> srvOrganList2(String organId) {
List<ChSrvOrgan> chFndSrvModes = disableService.srvOrganList2(String.valueOf(organId), false);
if (StringUtils.isBlank(organId)) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
List<ChSrvOrgan> chFndSrvModes = disableService.srvOrganList2(organId, false);
return Result.success(chFndSrvModes);
}
......@@ -339,7 +342,8 @@ public class DisableController {
* 新增失能申请
*/
@RequestMapping("/addDisable")
public Result addDisable(ChDisableApply chDisableApply) {
public Result addDisable(@RequestHeader("Authorization") String token,ChDisableApply chDisableApply) {
long srvOrganId = TokenParsingUtil.TokenParsing(token, "srvOrganId");
//字段校验
//所在省市区
if (StringUtils.isBlank(chDisableApply.getDistrictProvincial()) || StringUtils.isBlank(chDisableApply.getDistrictCity()) || StringUtils.isBlank(chDisableApply.getDistrictArea())) {
......@@ -492,4 +496,46 @@ public class DisableController {
DisableUpdateDetailVO disableUpdateDetailVO = disableService.changeDisableDetail(changeId);
return Result.success(disableUpdateDetailVO);
}
/**
* 失能人员信息退出列表
*
* @param pageNum 当前页
* @param pageSize 每页几条数据
* @return 失能人员信息列表
*/
@RequestMapping("/disableInfoList")
public Result<Page<DisableInfoListVo>> disableInfoList(Integer pageNum, Integer pageSize, Long srvOrganId,String certiCode,String realName,String svrModelId) {
if (pageNum == null || pageNum < 1 || srvOrganId == null || srvOrganId == 0) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
if (pageSize == null || pageSize < 1) {
pageSize = 10;
}
Page<DisableInfoListVo> page = new Page<>(pageNum, pageSize);
page = disableService.getDisableInfoList(page, srvOrganId,certiCode,realName,svrModelId);
return Result.success(page);
}
/**
* 失能人员退出
*/
@RequestMapping("/disableInfoExit")
public Result disableInfoExit(Integer disableInfoId,Integer exitReasonId,Integer applyId, Integer srvOrganId,Integer programId,String exitTime) {
if (disableInfoId == null|| exitReasonId == null||applyId == null) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
int i = disableService.disableInfoExit(disableInfoId,exitReasonId,applyId,srvOrganId,programId,exitTime);
if (i > 0) {
return Result.success();
} else {
return Result.failed();
}
}
}
package com.hungraim.ltc.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganProject;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
@Mapper
@Repository
public interface ChSrvOrganProjectMapper extends BaseMapper<ChSrvOrganProject> {
}
package com.hungraim.ltc.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.disable.ChDisableInfo;
import com.hungraim.ltc.pojo.vo.disable.DisableInfoListVo;
import com.hungraim.ltc.pojo.vo.governance.ProgramListVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
/**
......@@ -13,4 +17,16 @@ import org.springframework.stereotype.Repository;
@Mapper
@Repository
public interface DisableInfoMapper extends BaseMapper<ChDisableInfo> {
/**
* 列表查询
*
* @param page 分页参数
* @param srvOrganId 服务机构id
* @return 返回列表
*/
Page<DisableInfoListVo> getDisableInfoList(Page<DisableInfoListVo> page, @Param("srvOrganId") Long srvOrganId,String certiCode,String realName,String svrModelId);
int deleteSrvSend(Integer disableInfoId,String exitTime);
}
package com.hungraim.ltc.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.disable.ChServiceTypeDetailed;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
@Mapper
@Repository
public interface ServiceTypeDetailedMapper extends BaseMapper<ChServiceTypeDetailed> {
}
package com.hungraim.ltc.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.disable.ChServiceType;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
@Mapper
@Repository
public interface ServiceTypeMapper extends BaseMapper<ChServiceType> {
}
package com.hungraim.ltc.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganProject;
public interface ChSrvOrganProjectService extends IService<ChSrvOrganProject> {
}
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.disable.*;
import com.hungraim.ltc.pojo.vo.disable.*;
import com.hungraim.ltc.pojo.vo.governance.ProgramListVo;
import com.hungraim.ltc.util.Result;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.stereotype.Service;
......@@ -153,6 +154,17 @@ public interface DisableService {
*/
DisableUpdateDetailVO changeDisableDetail(Integer changeId);
/**
* 个人照护方案列表查询
*
* @param page 分页参数
* @param srvOrganId 服务机构id
* @return 返回个人照护方案列表
*/
Page<DisableInfoListVo> getDisableInfoList(Page<DisableInfoListVo> page , Long srvOrganId,String certiCode,String realName,String svrModelId);
/**
*@author zwl
* @param organId
......@@ -168,4 +180,8 @@ public interface DisableService {
Workbook disableDownload(String organId, String districtProvincial, String districtCity,
String districtArea, String realName, String certiCode, String dataFrom,
Integer applyMethod);
int disableInfoExit(Integer disableInfoId,Integer exitReasonId,Integer applyId,Integer srvOrganId,Integer programId,String exitTime);
}
package com.hungraim.ltc.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hungraim.ltc.dao.ChSrvOrganProjectMapper;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganProject;
import com.hungraim.ltc.service.ChSrvOrganProjectService;
import org.springframework.stereotype.Service;
@Service
public class ChSrvOrganProjectServiceImpl extends ServiceImpl<ChSrvOrganProjectMapper, ChSrvOrganProject> implements ChSrvOrganProjectService {
}
......@@ -19,10 +19,12 @@ import com.hungraim.ltc.pojo.entity.riskLevel.ChDisableRiskLevel;
import com.hungraim.ltc.pojo.entity.riskLevel.ChSrvorganRiskLevel;
import com.hungraim.ltc.pojo.entity.serviceManage.ChCfgPara;
import com.hungraim.ltc.pojo.vo.disable.*;
import com.hungraim.ltc.pojo.vo.governance.ProgramListVo;
import com.hungraim.ltc.pojo.vo.system.AttachUpdateVo;
import com.hungraim.ltc.service.DisableService;
import com.hungraim.ltc.service.OrganService;
import com.hungraim.ltc.util.AttachType;
import com.hungraim.ltc.util.DateUtils;
import com.hungraim.ltc.util.Result;
import com.hungraim.ltc.util.ResultCode;
import lombok.AllArgsConstructor;
......@@ -164,18 +166,17 @@ public class DisableServiceImpl implements DisableService {
//医保统筹区
ChDisableApply chDisableApply = disableApplyMapper.selectById(chDisableInfo.getApplyId());
disableUpdateDetailVo.setMedicalArea(chDisableApply.getMedicalArea());
// try {
// // TODO 需要确认信息表的附件类型
// Result<List<ChFndAttach>> listResult = attachFeignService.selectAttachs(Long.valueOf(disabInfoId), AttachType.DISABLE.getUploadType());
// if (listResult.getCode().equals(ResultCode.SUCCESS.getCode())) {
// disableUpdateDetailVo.setFileDataList(listResult.getData());
// } else {
// log.info("请求获取附件列表错误:错误码{},错误信息:{}", listResult.getCode(), listResult.getMsg());
// }
// } catch (Exception e) {
// log.error(e.getMessage());
// e.printStackTrace();
// }
try {
Result<List<ChFndAttach>> listResult = attachFeignService.selectAttachs(Long.valueOf(chDisableInfo.getApplyId()), AttachType.DISABLE.getUploadType());
if (listResult.getCode().equals(ResultCode.SUCCESS.getCode())) {
disableUpdateDetailVo.setFileDataList(listResult.getData());
} else {
log.info("请求获取附件列表错误:错误码{},错误信息:{}", listResult.getCode(), listResult.getMsg());
}
} catch (Exception e) {
log.error(e.getMessage());
e.printStackTrace();
}
return disableUpdateDetailVo;
}
return null;
......@@ -539,6 +540,11 @@ public class DisableServiceImpl implements DisableService {
return disableUpdateDetailVO;
}
@Override
public Page<DisableInfoListVo> getDisableInfoList(Page<DisableInfoListVo> page, Long srvOrganId,String certiCode,String realName,String svrModelId) {
return disableInfoMapper.getDisableInfoList(page, srvOrganId,certiCode,realName,svrModelId);
}
@Override
public Workbook disableDownload(String organId, String districtProvincial, String districtCity,
......@@ -567,4 +573,36 @@ public class DisableServiceImpl implements DisableService {
return workbook;
}
@Override
@Transactional(rollbackFor = Exception.class)
public int disableInfoExit(Integer disableInfoId, Integer exitReasonId,Integer applyId,Integer srvOrganId,Integer programId,String exitTime) {
ChDisableApply chDisableApply = new ChDisableApply();
Date date = DateUtils.strToDate(exitTime);
chDisableApply.setApplyId(Long.valueOf(applyId));
chDisableApply.setExitFlag(1);
chDisableApply.setExitReasonId(exitReasonId);
chDisableApply.setExitSrvOrganId(srvOrganId);
chDisableApply.setExitTime(date);
disableApplyMapper.updateById(chDisableApply);
ChDisableInfo chDisableInfo = new ChDisableInfo();
chDisableInfo.setDisabInfoId(disableInfoId);
chDisableInfo.setExitFlag(1);
chDisableInfo.setExitTime(date);
chDisableInfo.setExitReasonId(exitReasonId);
chDisableInfo.setExitSrvOrganId(srvOrganId);
int result = disableInfoMapper.updateById(chDisableInfo);
if(exitReasonId == 3 || exitReasonId == 4 || exitReasonId == 5 || exitReasonId == 6 || exitReasonId == 7){
// 解除护理机构分配
// delete from CH_SRV_SEND where DISAB_INFO_ID = '327'
disableInfoMapper.deleteSrvSend(disableInfoId,exitTime);
}
return result;
}
}
......@@ -146,6 +146,9 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
for (SrvOrganEmpExportVo record : srvOrganEmpExportList) {
StringBuilder stringBuilder = new StringBuilder();
if(record == null){
break;
}
if(StringUtils.isEmpty(record.getProvincial())){
stringBuilder.append("--");
}else if( record.getProvincial().equals(record.getCity())){
......
......@@ -2,18 +2,24 @@ package com.hungraim.ltc.service.impl;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.api.AttachFeignService;
import com.hungraim.ltc.dao.*;
import com.hungraim.ltc.pojo.entity.SysConfig.ChCfgSrvOrganType;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndSrvOrganLevel;
import com.hungraim.ltc.pojo.entity.disable.ChServiceType;
import com.hungraim.ltc.pojo.entity.disable.ChServiceTypeDetailed;
import com.hungraim.ltc.pojo.entity.disable.ChSrvOrgan;
import com.hungraim.ltc.pojo.entity.riskLevel.ChSrvorganRiskLevel;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganProject;
import com.hungraim.ltc.pojo.vo.disable.ChServiceTypeVo;
import com.hungraim.ltc.pojo.vo.disable.SrvModeVo;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganListVo;
import com.hungraim.ltc.pojo.vo.system.AttachUpdateVo;
import com.hungraim.ltc.pojo.vo.system.SrvOrganVo;
import com.hungraim.ltc.service.ChSrvOrganProjectService;
import com.hungraim.ltc.service.OrganService;
import com.hungraim.ltc.service.SrvOrganService;
import com.hungraim.ltc.util.AttachType;
......@@ -22,6 +28,7 @@ import com.hungraim.ltc.util.ResultCode;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -48,6 +55,12 @@ public class SrvOrganServiceImpl implements SrvOrganService {
private final ChSrvorganRiskLevelMapper chSrvorganRiskLevelMapper;
private final ServiceTypeMapper serviceTypeMapper;
private final ServiceTypeDetailedMapper serviceTypeDetailedMapper;
private final ChSrvOrganProjectMapper chSrvOrganProjectMapper;
private final ChSrvOrganProjectService chSrvOrganProjectService;
@Override
public Page<SrvOrganListVo> getSrvOrganList(Page<SrvOrganListVo> page, Long organId, Boolean isInvolveChild, String creditCode, String srvOrganName,Long srvOrganId) {
......@@ -129,6 +142,39 @@ public class SrvOrganServiceImpl implements SrvOrganService {
chSrvorganRiskLevel.setStatus(0);
chSrvorganRiskLevel.setFcd(new Date());
chSrvorganRiskLevelMapper.insert(chSrvorganRiskLevel);
//添加48项服务配置
//1、查询所有的服务配置
List<ChServiceType> list = serviceTypeMapper.selectList(new QueryWrapper<>());
List<ChServiceTypeVo> chServiceTypeVoList = new ArrayList<ChServiceTypeVo>();
for(ChServiceType chServiceType : list){
if(chServiceType.getParaId() == 0L){
ChServiceTypeVo chServiceTypeVo = new ChServiceTypeVo();
chServiceTypeVo.setServiceTypeId(chServiceType.getServiceTypeId());
chServiceTypeVo.setServiceTypeName(chServiceType.getServiceTypeName());
QueryWrapper<ChServiceTypeDetailed> wrapper = new QueryWrapper<ChServiceTypeDetailed>();
wrapper.eq("para_id", chServiceType.getServiceTypeId());
List<ChServiceTypeDetailed> detailedList = serviceTypeDetailedMapper.selectList(wrapper);
chServiceTypeVo.setList(detailedList);
chServiceTypeVoList.add(chServiceTypeVo);
}
}
Long srvOrganIdL = Long.valueOf(chSrvOrgan.getSrvOrganId());
List<ChSrvOrganProject> chSrvOrganProjectList = new ArrayList<>();
//进行服务处理
chServiceTypeVoList.stream().forEach(chServiceTypeVo->{
chServiceTypeVo.getList().stream().forEach(e->{
ChSrvOrganProject chSrvOrganProject = new ChSrvOrganProject();
chSrvOrganProject.setSrvOrganId(srvOrganIdL);
chSrvOrganProject.setItemName(e.getServiceTypeDetailedId()+"");
chSrvOrganProject.setCategoryType(chServiceTypeVo.getServiceTypeId().shortValue());
chSrvOrganProject.setIsConf(new Short("0"));
chSrvOrganProject.setStatus(new Short("0"));
chSrvOrganProjectList.add(chSrvOrganProject);
});
});
//批量添加内容
chSrvOrganProjectService.saveBatch(chSrvOrganProjectList);
}
}
......
......@@ -121,6 +121,7 @@
a.REASONS_REVIEW reasonsReview,
a.REASONS_REMARK reasonsRemark,
a.MEDICAL_AREA medicalArea,
a.REVIEW_FREQUENCY reviewFrequency,
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
......
<?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.DisableInfoMapper">
<select id="getDisableInfoList" resultType="com.hungraim.ltc.pojo.vo.disable.DisableInfoListVo">
SELECT T1.PROGRAM_ID programId,
T1.SRV_ORGAN_ID srvOrganId,
T1.DISAB_INFO_ID disabInfoId,
T5.DISTRICT_PROVINCIAL districtProvincial,
T5.DISTRICT_CITY districtCity,
T2.REAL_NAME realName,
T2.TEL realTel,
T2.BIRTHDAY birthday,
T2.GENDER gender,
T2.ACPT_PROVINCIAL acptProvincial,
T2.ACPT_CITY acptCity,
T2.ACPT_AREA acptArea,
T2.ACPT_STREET acptStreet,
T2.ACPT_ADDRESS acptAddress,
T6.DISABLE_LEVEL_NAME realLevel,
T4.FINISH_TIME assessDate,
T7.MODE_NAME svrModelName,
T5.SRV_ORGAN_NAME svrOrganName,
T1.PROG_STATUS progStatus,
T1.EFF_TIME effTime,
T2.CERTI_CODE certiCode,
T2.APPLY_ID applyId,
to_char(T2.EXIT_TIME,'yyyy-MM-dd') exitTime,
--服务方案起始日
--服务方案终止日
to_char(T1.PROGRAM_DATE,'yyyy-MM-dd HH24:mi:ss') programDate,
to_char(T1.PROGRAM_EDN_DATE,'yyyy-MM-dd HH24:mi:ss') programEdnDate,
T2.EXIT_FLAG exitFlag,
T2.EXIT_REASON_ID exitReasonId
FROM CH_DISABLE_INFO T2
INNER JOIN CH_SRV_PROGRAM T1 ON T1.DISAB_INFO_ID = T2.DISAB_INFO_ID
LEFT JOIN CH_CFG_SRV_MODE T7 ON T2.SRV_MODE_ID = T7.MODE_ID
LEFT JOIN CH_APR_REPORT T3 ON T2.LAST_TASK_ID = T3.TASK_ID
LEFT JOIN CH_CFG_SRV_DISABLE_LEVEL T6 ON T3.DISABLE_LEVEL_ID = T6.DISABLE_LEVEL_ID
LEFT JOIN CH_APR_TASK T4 ON T3.TASK_ID = T4.TASK_ID
LEFT JOIN CH_SRV_ORGAN T5 ON T1.SRV_ORGAN_ID = T5.SRV_ORGAN_ID
WHERE
T1.SRV_ORGAN_ID = #{srvOrganId}
<if test="certiCode != null and certiCode != ''">
and T2.CERTI_CODE = #{certiCode}
</if>
<if test="realName != null and realName != ''">
and T2.real_name = #{realName}
</if>
<if test="svrModelId != null and svrModelId != ''">
and T7.MODE_ID = #{svrModelId}
</if>
</select>
<update id="updateChSrvProgram">
update CH_SRV_PROGRAM t set t.PROG_STATUS ='2' ,t.END_TIME =sysdate
where t.PROGRAM_ID =#{programId}
</update>
<delete id="deleteSrvSend">
delete from CH_SRV_SEND where DISAB_INFO_ID = #{disableInfoId}
</delete>
</mapper>
\ No newline at end of file
......@@ -80,7 +80,7 @@ public class ReTaskController {
*/
@RequestMapping("/disableExamine")
public Result disableExamine(String applyId, String checkName, Short applyStatus, String checkRemark) {
if (StringUtils.isBlank(applyId) || StringUtils.isBlank(checkName) || StringUtils.isBlank(checkRemark) || null == applyStatus) {
if (StringUtils.isBlank(applyId) || StringUtils.isBlank(checkName) || null == applyStatus) {
return Result.failed("查询参数错误");
}
reTaskService.disableExamine(applyId, checkName, applyStatus, checkRemark);
......
......@@ -82,11 +82,14 @@ public class TaskController {
* @param tel 失能人员手机号码
*/
@RequestMapping("/taskReportList")
public Result<List<TaskReportVO>> taskReportList(String name, String certiCode, String tel) {
List<TaskReportVO> taskReportList = taskService.taskReportList(name, certiCode, tel);
return Result.success(taskReportList);
public Result<Page<TaskReportVO>> taskReportList(@RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "10") Integer pageSize,String name, String certiCode, String tel) {
Page<TaskReportVO> page = new Page<>(pageNum, pageSize);
page = taskService.taskReportList(page,name, certiCode, tel);
log.info("评定报告录入:"+JSONObject.toJSONString(page));
return Result.success(page);
}
/**
* 查询评定报告附件列表
*
......@@ -235,14 +238,8 @@ public class TaskController {
if (vo.getRemark() == null) {
vo.setRemark("");
}
Date evaluateDate;
try {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
evaluateDate = sdf.parse(vo.getEvaluateTime());
} catch (ParseException e) {
return Result.failed("评估时间格式不正确!");
}
taskService.updateReport(vo.getReportId(), vo.getPerson1(), vo.getPerson2(), vo.getPerson3(), evaluateDate, vo.getDisableLevelId(), vo.getPolNo(), vo.getRemark(), vo.getFileDataList(),vo.getChAprReportFractions());
taskService.updateReport(vo);
return Result.success();
}
......
......@@ -42,7 +42,7 @@ public interface TaskMapper extends BaseMapper<ChAprTask> {
/**
* 评定报告录入列表
*/
List<TaskReportVO> taskReportList(String name, String certiCode, String tel);
Page<TaskReportVO> taskReportList(Page<TaskReportVO> page,String name, String certiCode, String tel);
TaskReportVO getReportById(String reportId);
......
......@@ -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.assessment.*;
import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel;
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.util.Result;
......@@ -27,13 +28,13 @@ public interface TaskService {
String street, String realName, String certiCode, String taskName, String taskTel,
String daysRemaining, String taskStatus, String isReturn, String area);
List<TaskReportVO> taskReportList(String name, String certiCode, String tel);
Page<TaskReportVO> taskReportList(Page<TaskReportVO> page,String name, String certiCode, String tel);
List<AprEmpVO> aprEmpList(String provincial, String city, String area, String organName, String name, String tel, String groupLeader);
Result<Object> addReport(Integer taskId, Integer person1, Integer person2, Integer person3, Date evaluateTime, Integer disableLevelId, String polNo, String remark, List<ChFndAttach> fileDataList,List<ChAprReportFraction> chAprReportFractions);
void updateReport(Integer reportId, Integer person1, Integer person2, Integer person3, Date evaluateDate, Integer disableLevelId, String polNo, String remark, List<ChFndAttach> fileDataList,List<ChAprReportFraction> chAprReportFractions);
void updateReport(ReportUpdateVO vo);
TaskReportVO getReportById(String reportId);
......
......@@ -16,6 +16,7 @@ import com.hungraim.ltc.pojo.entity.assessment.*;
import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel;
import com.hungraim.ltc.pojo.entity.disable.ChDisableInfo;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail;
import com.hungraim.ltc.pojo.vo.ReportUpdateVO;
import com.hungraim.ltc.pojo.vo.account.AssessAccountsExportResp;
import com.hungraim.ltc.pojo.vo.account.AssessAccountsListResp;
import com.hungraim.ltc.pojo.vo.assessment.*;
......@@ -33,6 +34,8 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
......@@ -105,8 +108,8 @@ public class TaskServiceImpl implements TaskService {
* @param tel 失能人员手机号码
*/
@Override
public List<TaskReportVO> taskReportList(String name, String certiCode, String tel) {
return taskMapper.taskReportList(name, certiCode, tel);
public Page<TaskReportVO> taskReportList(Page<TaskReportVO> page,String name, String certiCode, String tel) {
return taskMapper.taskReportList(page,name, certiCode, tel);
}
/**
......@@ -316,72 +319,70 @@ public class TaskServiceImpl implements TaskService {
}
/**
* 评定报告修改
*
* @param reportId 评定报告id
* @param person1 鉴定人员1id
* @param person2 鉴定人员2id
* @param person3 鉴定人员3id
* @param evaluateDate 评估时间
* @param disableLevelId 失能等级id
* @param polNo 保单号
* @param remark 备注
* @param fileDataList 附件
*/
@Transactional(rollbackFor = Exception.class)
@Override
public void updateReport(Integer reportId, Integer person1, Integer person2, Integer person3, Date evaluateDate, Integer disableLevelId, String polNo, String remark, List<ChFndAttach> fileDataList,List<ChAprReportFraction> chAprReportFractions) {
public void updateReport(ReportUpdateVO vo) {
Date evaluateDate = null;
try {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
evaluateDate = sdf.parse(vo.getEvaluateTime());
} catch (ParseException e) {
e.printStackTrace();
}
//update鉴定报告
ChAprReport chAprReport = aprReportMapper.selectById(reportId);
chAprReport.setDisableLevelId(disableLevelId);
chAprReport.setPolNo(polNo);
chAprReport.setRemark(remark);
ChAprReport chAprReport = aprReportMapper.selectById(vo.getReportId());
chAprReport.setDisableLevelId(vo.getDisableLevelId());
chAprReport.setPolNo(vo.getPolNo());
chAprReport.setRemark(vo.getRemark());
chAprReport.setEvaluateTime(evaluateDate);
chAprReport.setEvaluateType(vo.getEvaluateType());
aprReportMapper.updateById(chAprReport);
//附件上传
this.updateAttachs(fileDataList, chAprReport.getReportId().longValue());
this.updateAttachs(vo.getFileDataList(), chAprReport.getReportId().longValue());
//修改鉴定报告人员(有就update,没有就insert)
List<ChAprPersonInfo> personInfos = personInfoMapper.selectList(new QueryWrapper<ChAprPersonInfo>().eq("report_id", reportId).orderByDesc("info_id"));
if (person1 != null) {
List<ChAprPersonInfo> personInfos = personInfoMapper.selectList(new QueryWrapper<ChAprPersonInfo>().eq("report_id", vo.getReportId()).orderByDesc("info_id"));
if (vo.getPerson1() != null) {
if (personInfos.size() >= 1) {
ChAprPersonInfo personInfo = personInfos.get(0);
personInfo.setEmpId(person1);
personInfo.setEmpId(vo.getPerson1());
personInfoMapper.updateById(personInfo);
} else {
ChAprPersonInfo personInfo = new ChAprPersonInfo();
personInfo.setReportId(chAprReport.getReportId());
personInfo.setEmpId(person1);
personInfo.setEmpId(vo.getPerson1());
personInfo.setFcd(new Date());
personInfoMapper.insert(personInfo);
}
}
if (person2 != null) {
if (vo.getPerson2() != null) {
if (personInfos.size() >= 2) {
ChAprPersonInfo personInfo = personInfos.get(1);
personInfo.setEmpId(person2);
personInfo.setEmpId(vo.getPerson2());
personInfoMapper.updateById(personInfo);
} else {
ChAprPersonInfo personInfo = new ChAprPersonInfo();
personInfo.setReportId(chAprReport.getReportId());
personInfo.setEmpId(person2);
personInfo.setEmpId(vo.getPerson2());
personInfo.setFcd(new Date());
personInfoMapper.insert(personInfo);
}
}
if (person3 != null) {
if (vo.getPerson3() != null) {
if (personInfos.size() >= 3) {
ChAprPersonInfo personInfo = personInfos.get(2);
personInfo.setEmpId(person3);
personInfo.setEmpId(vo.getPerson3());
personInfoMapper.updateById(personInfo);
} else {
ChAprPersonInfo personInfo = new ChAprPersonInfo();
personInfo.setReportId(chAprReport.getReportId());
personInfo.setEmpId(person3);
personInfo.setEmpId(vo.getPerson3());
personInfo.setFcd(new Date());
personInfoMapper.insert(personInfo);
}
}
if(!chAprReportFractions.isEmpty() && chAprReportFractions.size()>0){
for (ChAprReportFraction chAprReportFraction: chAprReportFractions) {
if(!vo.getChAprReportFractions().isEmpty() && vo.getChAprReportFractions().size()>0){
for (ChAprReportFraction chAprReportFraction: vo.getChAprReportFractions()) {
chAprReportFraction.setReportId(chAprReport.getReportId());
if(chAprReportFraction.getChAprReportFractionId()==null){
chAprReportFractionMapper.insert(chAprReportFraction);
......@@ -473,7 +474,7 @@ public class TaskServiceImpl implements TaskService {
*/
@Override
public List<ChCfgSrvDisableLevel> cfgSrvDisableLevelList() {
return cfgSrvDisableLevelMapper.selectList(new QueryWrapper<>());
return cfgSrvDisableLevelMapper.selectList(new QueryWrapper<ChCfgSrvDisableLevel>().orderByDesc("disable_level_id"));
}
/**
......
......@@ -168,6 +168,7 @@
info.CERTI_CODE certiCode,
report.pol_no polNo,
report.remark remark,
report.EVALUATE_TYPE evaluateType,
info.birthday birthday,
(SELECT DISE_TYPE_CODE FROM CH_FND_DISEASE_TYPE WHERE info.DISE_TYPE_F = DISE_TYPE_ID) diseTypeF,
(SELECT DISE_TYPE_CODE FROM CH_FND_DISEASE_TYPE WHERE info.DISE_TYPE_S = DISE_TYPE_ID) diseTypeS,
......@@ -190,7 +191,8 @@
report.PUBLICITY_START_TIME publicityStartTime,
report.PUBLICITY_END_TIME publicityEndTime,
report.PUBLICITY_TIME publicityTime,
report.EFF_TIME effTime
report.EFF_TIME effTime,
report.evaluate_type
FROM ch_apr_report report
LEFT JOIN CH_APR_TASK task ON report.TASK_ID = task.TASK_ID
LEFT JOIN CH_DISABLE_INFO info ON task.disable_info_id = info.disab_info_id
......@@ -238,6 +240,8 @@
emp.AGE age,
emp.certi_code certiCode,
emp.tel tel,
(select type.APREMP_NAME from CH_CFG_APREMP_TYPE type where type.APREMP_TYPE_ID = emp.APREMP_TYPE_ID_F) aprempTypeF,
(select type.APREMP_NAME from CH_CFG_APREMP_TYPE type where type.APREMP_TYPE_ID = emp.APREMP_TYPE_ID_S) aprempTypeS,
emp.Group_leader groupLeader
FROM ch_apr_emp emp
LEFT JOIN ch_apr_organ organ ON emp.apr_organ_id = organ.apr_organ_id
......@@ -470,6 +474,7 @@
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE organ.DISTRICT_CITY = dis.DISTRICT_CODE) districtCity,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE organ.DISTRICT_AREA = dis.DISTRICT_CODE) districtArea,
organ.organ_name organName,
o.organ_name fndOrganName,
organ.UNIFIED_SOCIAL_CREDIT_CODE unifiedSocialCreditCode,
emp.real_name realName,
DECODE(emp.gender, 'M','男','F', '女','N', '不确定') gender,
......@@ -480,6 +485,7 @@
FROM ch_apr_emp emp
LEFT JOIN ch_apr_organ organ ON emp.apr_organ_id = organ.apr_organ_id
LEFT JOIN ch_srv_organ srvOrgan ON organ.organ_id = srvOrgan.srv_organ_id
LEFT JOIN ch_fnd_organ o ON o.organ_id = srvOrgan.organ_id
<where>
<if test="provincial != null and provincial != ''">
and (SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE organ.DISTRICT_PROVINCIAL = dis.DISTRICT_CODE) = #{provincial}
......
......@@ -114,10 +114,12 @@ public class ChDisabDetailAccounts implements Serializable {
*/
private String remarks;
/**
* 状态(1 恢复状态 2 暂缓状态 3
* 状态(0 未申报 1 恢复状态 已申报 2 暂缓状态
*/
private Short status;
private Date declarationTime;
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 lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* @author zwl
* @ClassName ChDisabFreeRdInfo
* @description
* @date 2023/2/28 8:43
**/
@Data
@TableName("CH_DISAB_FREE_RD_INFO")
@KeySequence("SEQ_CH_DISAB_FREE_RD_INFO")
public class ChDisabFreeRdInfo implements Serializable {
@TableId(value = "FREE_RD_ID", type = IdType.INPUT)
private Long freeRdId;
private Long accountsDetailId;
private Long accountsId;
private Date creationTime;
private int dealType;
private BigDecimal amountOfMoney;
private String remarks;
}
......@@ -17,6 +17,8 @@ public class OverallCostListRespVO {
*/
private String realName;
private Long freeRdId;
/**
*身份证号
......@@ -61,4 +63,6 @@ public class OverallCostListRespVO {
private String accountsOverallCost;
private String srvOrganName;
private String accountsStatus;
}
......@@ -52,5 +52,14 @@ public class ChAprEmp {
private java.util.Date effTime;
private Integer aprOrganId;
private Integer lcu;
private String accName;
private String bankAccName;
private String bankNo;
private String bankAccCode;
private String bankDistrictProvincial;
private String bankDistrictCity;
private String bankDistrictWebsite;
private String remark;
}
......@@ -626,6 +626,14 @@ public class ChDisableApply extends PageInfo implements Serializable {
*/
private String medicalArea;
private Integer exitFlag;
private Integer exitReasonId;
private Integer exitSrvOrganId;
private Date exitTime;
@TableField(exist = false)
private List<ChFndAttach> fileDataList;
......
......@@ -8,6 +8,7 @@ import com.hungraim.ltc.pojo.entity.PageInfo;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@Data
@TableName("CH_DISABLE_INFO")
......@@ -128,4 +129,9 @@ public class ChDisableInfo extends PageInfo implements Serializable {
private Integer applyStatus;
private String tel;
private String acptSrvArea;
private Integer exitFlag;
private Integer exitReasonId;
private Integer exitSrvOrganId;
private java.util.Date exitTime;
}
package com.hungraim.ltc.pojo.entity.disable;
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;
......@@ -10,10 +13,12 @@ import java.util.Date;
*/
@Data
@TableName("CH_DISABLE_RISK_LEVEL")
@KeySequence("SEQ_CH_DISABLE_RISK_LEVEL")
public class ChDisableRiskLevel {
/**
* 主键ID
*/
@TableId(value = "DISA_RISK_LEVEL_ID", type = IdType.INPUT)
private Integer disaRiskLevelId;
/**
......
package com.hungraim.ltc.pojo.entity.riskLevel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
......@@ -21,6 +18,7 @@ import java.util.Date;
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("CH_DISABLE_RISK_LEVEL")
@KeySequence("SEQ_CH_DISABLE_RISK_LEVEL")
public class ChDisableRiskLevel implements Serializable {
private static final long serialVersionUID = 1L;
......@@ -28,7 +26,8 @@ public class ChDisableRiskLevel implements Serializable {
/**
* 主键ID
*/
@TableId(value = "DISA_RISK_LEVEL_ID", type = IdType.AUTO)
// @TableId(value = "DISA_RISK_LEVEL_ID", type = IdType.AUTO)
@TableId(value = "DISA_RISK_LEVEL_ID", type = IdType.INPUT)
private Long disaRiskLevelId;
/**
......
package com.hungraim.ltc.pojo.entity.riskLevel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
......@@ -21,6 +18,7 @@ import java.util.Date;
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("CH_SRVEMP_RISK_LEVEL")
@KeySequence("SEQ_CH_SRVEMP_RISK_LEVEL")
public class ChSrvempRiskLevel implements Serializable {
private static final long serialVersionUID = 1L;
......@@ -28,7 +26,7 @@ public class ChSrvempRiskLevel implements Serializable {
/**
* 主键ID
*/
@TableId(value = "SRVEMP_RISK_LEVEL_ID", type = IdType.AUTO)
@TableId(value = "SRVEMP_RISK_LEVEL_ID", type = IdType.INPUT)
private Long srvempRiskLevelId;
/**
......
package com.hungraim.ltc.pojo.entity.riskLevel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
......@@ -21,6 +18,7 @@ import java.util.Date;
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("CH_SRVORGAN_RISK_LEVEL")
@KeySequence("SEQ_CH_SRVORGAN_RISK_LEVEL")
public class ChSrvorganRiskLevel implements Serializable {
private static final long serialVersionUID = 1L;
......@@ -28,7 +26,7 @@ public class ChSrvorganRiskLevel implements Serializable {
/**
* 主键ID
*/
@TableId(value = "SRVORGAN_RISK_LEVEL_ID", type = IdType.AUTO)
@TableId(value = "SRVORGAN_RISK_LEVEL_ID", type = IdType.INPUT)
private Long srvorganRiskLevelId;
/**
......
package com.hungraim.ltc.pojo.entity.system;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.util.Date;
......@@ -15,9 +13,10 @@ import java.util.List;
*/
@Data
@TableName("LTC_RESOURCE")
@KeySequence("SEQUENCE_RESOURCE_ID")
public class SystemResource {
@TableId
@TableId(value = "RESOURCE_ID", type = IdType.INPUT)
private Long resourceId;
private String resourceName;
private String resourceUrl;
......
package com.hungraim.ltc.pojo.entity.system;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.util.Date;
......@@ -15,9 +12,11 @@ import java.util.Date;
*/
@Data
@TableName("LTC_ROLE")
@KeySequence("SEQUENCE_ROLE_ID")
public class SystemRole {
@TableId( type = IdType.AUTO)
// @TableId( type = IdType.AUTO)
@TableId(value = "ROLE_ID", type = IdType.INPUT)
private Long roleId;
private String roleName;
private String status;
......
package com.hungraim.ltc.pojo.entity.system;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.NoArgsConstructor;
......@@ -15,9 +12,11 @@ import java.util.Date;
@Data
@NoArgsConstructor
@TableName("LTC_USER")
@KeySequence("SEQUENCE_USER_ID")
public class SystemUser {
@TableId( type = IdType.AUTO)
// @TableId( type = IdType.AUTO)
@TableId(value = "USER_ID", type = IdType.INPUT)
private Long userId;
private String account;
private String password;
......
......@@ -22,6 +22,7 @@ public class ReportUpdateVO {
Integer disableLevelId;
String polNo;
String remark;
Integer evaluateType;
List<ChFndAttach> fileDataList;
List<ChAprReportFraction> chAprReportFractions;
}
......@@ -16,14 +16,17 @@ public class AccountExportDetailListResp {
@Excel(name = "适用机构名称",width = 20)
private String organName;
/**
* 护理机构名称
*/
@Excel(name = "护理机构名称",width = 20)
private String srvOrganName;
@Excel(name = "失能人员",width = 20)
private String realName;
@Excel(name = "护理人员",width = 20)
private String empName;
/**
* 结算月份
*/
......@@ -42,8 +45,6 @@ public class AccountExportDetailListResp {
@Excel(name = "费用结束时间",width = 20)
private String accountsEndTime;
/**
* 总费用
*/
......@@ -62,6 +63,14 @@ public class AccountExportDetailListResp {
@Excel(name = "个人支付")
private String accountsPersonalCost;
@Excel(name = "已补费用")
private String reissueAmount;
@Excel(name = "已扣费用")
private String deductionAmount;
......
package com.hungraim.ltc.pojo.vo.account;
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;
import java.util.List;
@Data
public class SrvOrganListReq extends BaseReq {
......@@ -35,10 +33,12 @@ public class SrvOrganListReq extends BaseReq {
/**
* 结算月份
*/
@DateTimeFormat(pattern = "yyyy-MM")
@JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
private Date accountsTime;
private String accountsTime;
private String accountsStatus;
private String accountsId;
private List<String> accountsStatusList;
}
......@@ -15,7 +15,7 @@ import lombok.Data;
@Data
public class AprEmpExportVO {
@Excel(name = "适用机构",width = 20)
private String srvOrganName;
private String fndOrganName;
@Excel(name = "所在省市",width = 20)
private String districtProvincial;
......
......@@ -33,4 +33,10 @@ public class AprEmpVO {
private String tel;
//是否组长0组长,1非组长
private String groupLeader;
private String aprempTypeF;
private String aprempTypeS;
}
......@@ -72,6 +72,8 @@ public class TaskReportVO {
private String riskLevel;
//评估类型
private Integer evaluateType;
//评估类型名称
private String evaluateTypeName;
//公示开始时间
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
......
......@@ -75,6 +75,10 @@ public class DisableExamineInfoVO {
private Short addressType;
//***失能人员医疗及失能信息
/**
* 是否首次申请 初次申请,争议复评,定期复评,变更评定
*/
private Long reviewFrequency;
//诊断疾病
private String disease;
private Integer diseTypeF;
......
......@@ -42,8 +42,8 @@ public class DisableExportVO implements Serializable {
@Excel(name = "申请时间" ,width = 20)
private String effTime;
@Excel(name = "申请来源")
private String dataFrom;
/* @Excel(name = "申请来源")
private String dataFrom;*/
private String provincial;
......
package com.hungraim.ltc.pojo.vo.disable;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
/**
* 列表页回显对象
*/
@Data
public class DisableInfoListVo {
/**
* 服务分配ID
*/
private Long programId;
/**
* 服务机构id
*/
private Long srvOrganId;
/**
* 失能人员id
*/
private Long disabInfoId;
/**
* 机构所在省
*/
private String districtProvincial;
/**
* 机构所在市
*/
private String districtCity;
/**
* 失能人员姓名
*/
private String realName;
/**
* 失能人员手机号
*/
private String realTel;
/**
* 失能人员生日
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date birthday;
/**
* 失能人员性别
*/
private String gender;
/**
* 接收服务省市区
*/
private String acptProvincial;
private String acptCity;
private String acptArea;
private String acptStreet;
private String acptAddress;
/**
* 失能等级
*/
private String realLevel;
/**
* 评定完成日期
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date assessDate;
/**
* 服务方式
*/
private String svrModelName;
/**
* 护理机构名称
*/
private String svrOrganName;
private String certiCode;
/**
* 方案开始时间
*/
private String programDate;
/**
* 方案结束时间
*/
private String programEdnDate;
/**
* 服务方案状态 0:未生效、1:已生效、2:已终止
*/
private Integer progStatus;
/**
* 创建时间(服务方案制定时间)
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date effTime;
private Integer exitFlag;
private Integer exitReasonId;
private Integer applyId;
private String exitTime;
}
package com.hungraim.ltc.pojo.vo.governance;
import lombok.Data;
/**
* @author zwl
**/
@Data
public class AllocationSrvTaskVO {
private String exitFlag;
private String exitReasonId;
private String exitTime;
private String srvDate;
private Long srvTaskId;
}
......@@ -28,5 +28,7 @@ public class DisableInfoTaskVO implements Serializable {
private String permitId;
private String tel;
private Integer taskStatus;
private String disableLevelName;
private Integer srvOrganId;
}
......@@ -91,4 +91,7 @@ public class SrvTaskDetailVO {
* 任务状态
*/
private String status;
private String disableLevelName;
}
......@@ -8,6 +8,7 @@ import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.TimeZone;
public class DateUtils {
......@@ -916,4 +917,17 @@ public class DateUtils {
return false;
}
public static String getNextDay(){
Date date=new Date();//取时间
Calendar calendar = new GregorianCalendar();
calendar.setTime(date);
// 1表示明天,-1表示昨天
calendar.add(Calendar.DATE,1);
date=calendar.getTime();
// 这个时间就是明天
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
String dateString = formatter.format(date);
return dateString;
}
}
......@@ -52,7 +52,7 @@ public class ResourceServerConfig {
.jwtAuthenticationConverter(jwtAuthenticationConverter());
http.authorizeExchange()
.pathMatchers("/api/oauth/token","/api.system/role/getRoleResource",
"/api.system/resource/getManinMenu","/oauth/*","/api/oauth/genKeyPair").permitAll()
"/api.system/resource/getManinMenu","/oauth/*","/api/oauth/genKeyPair","/api.system/user/updatePassword").permitAll()
.anyExchange().access(authorizationManager)
.and()
.exceptionHandling()
......
......@@ -4,6 +4,7 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
/**
......@@ -13,6 +14,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@EnableDiscoveryClient
@EnableFeignClients
@EnableTransactionManagement
@EnableScheduling
public class GovernanceApplication {
public static void main(String[] args) {
SpringApplication.run(GovernanceApplication.class, args);
......
......@@ -105,10 +105,9 @@ public class AprOrganController {
public Result addOrUpdateAprOrgan(AprOrganInfoVO chAprOrgan) {
if (chAprOrgan == null) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
if (chAprOrgan.getFileDataList().size() < 3) {
}/*if (chAprOrgan.getFileDataList().size() < 3) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
}*/
if (chAprOrgan.getAprOrganId() == null) {
//新增
if (StringUtils.isBlank(chAprOrgan.getOrganId())) {//适用机构
......@@ -120,9 +119,9 @@ public class AprOrganController {
if (StringUtils.isBlank(chAprOrgan.getOrganName())) {//评定机构名称
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
if (StringUtils.isBlank(chAprOrgan.getUnifiedSocialCreditCode())) {//统一社会信用代码
/* if (StringUtils.isBlank(chAprOrgan.getUnifiedSocialCreditCode())) {//统一社会信用代码
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
}*/
if (chAprOrgan.getOrganTypeId() == null) {//机构类型id
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
......@@ -138,7 +137,7 @@ public class AprOrganController {
if (chAprOrgan.getGroupDetailName() == null) {//评定起点地址
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
if (StringUtils.isBlank(chAprOrgan.getAccName())) {//银行账户名称
/*if (StringUtils.isBlank(chAprOrgan.getAccName())) {//银行账户名称
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
if (StringUtils.isBlank(chAprOrgan.getBankNo())) {//银行账号
......@@ -152,10 +151,10 @@ public class AprOrganController {
}
if (chAprOrgan.getCardType() == null) {//卡类型
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
}*/
} else {
//更新
if (StringUtils.isBlank(chAprOrgan.getAccName())) {//银行账户名称
/*if (StringUtils.isBlank(chAprOrgan.getAccName())) {//银行账户名称
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
if (StringUtils.isBlank(chAprOrgan.getBankNo())) {//银行账号
......@@ -169,13 +168,13 @@ public class AprOrganController {
}
if (chAprOrgan.getCardType() == null) {//卡类型
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
}*/
if (StringUtils.isBlank(chAprOrgan.getDistrictProvincial()) || StringUtils.isBlank(chAprOrgan.getDistrictArea()) || StringUtils.isBlank(chAprOrgan.getDistrictCity())) {//所在省市区
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
if (StringUtils.isBlank(chAprOrgan.getUnifiedSocialCreditCode())) {//统一社会信用代码
/* if (StringUtils.isBlank(chAprOrgan.getUnifiedSocialCreditCode())) {//统一社会信用代码
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
}*/
if (chAprOrgan.getOrganTypeId() == null) {//机构类型id
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
......
......@@ -11,6 +11,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.web.bind.annotation.*;
import java.util.Date;
......@@ -134,7 +135,7 @@ public class SrvTaskController {
e.printStackTrace();
return Result.failed(e.getMessage());
}
srvTaskService.otherPlaceHandler(param.getProgramId());
//srvTaskService.otherPlaceHandler(param.getProgramId());
return Result.success();
}
......@@ -144,4 +145,12 @@ public class SrvTaskController {
srvTaskService.otherPlaceHandler(programId);
}
/**
* 根据计划开始时间每天执行当天计划
**/
@GetMapping("timeAllocationSrvTask")
public void timeAllocationSrvTask() {
srvTaskService.timeAllocationSrvTask();
}
}
......@@ -8,4 +8,5 @@ import org.springframework.stereotype.Repository;
@Mapper
@Repository
public interface ChSrvTaskDetailMapper extends BaseMapper<ChSrvTaskDetail> {
int getSrvTaskDetail(String srvTaskId, String srvDate);
}
\ No newline at end of file
......@@ -44,12 +44,13 @@ public interface SrvSendMapper extends BaseMapper<ChSrvSend> {
" s.certi_code," +
" s.DISE_TYPE_S," +
" i.finish_time," +
" i.re_apr_time" +
" i.re_apr_time,l.disable_level_name,a.srv_organ_id " +
" from ch_disable_info s" +
" left join ch_apr_task i" +
" on s.last_task_id = i.task_id" +
" left join ch_apr_report o" +
" on i.task_id = o.task_id " +
" on i.task_id = o.task_id left join CH_CFG_SRV_DISABLE_LEVEL l on l.disable_level_id = o.disable_level_id " +
" left join ch_disable_apply a on a.apply_id = s.apply_id " +
" where s.disab_info_id=#{disableInfoId}")
DisableInfoTaskVO selectBydisableInfoId(Integer disableInfoId);
......
......@@ -3,10 +3,7 @@ package com.hungraim.ltc.governance.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTask;
import com.hungraim.ltc.pojo.vo.governance.OrganEmpVO;
import com.hungraim.ltc.pojo.vo.governance.SrvTaskDetailVO;
import com.hungraim.ltc.pojo.vo.governance.SrvTaskInfoVO;
import com.hungraim.ltc.pojo.vo.governance.SrvTaskVO;
import com.hungraim.ltc.pojo.vo.governance.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
......@@ -26,4 +23,6 @@ public interface SrvTaskMapper extends BaseMapper<ChSrvTask> {
Page<OrganEmpVO> getSrvOrganEmpList(Page<OrganEmpVO> page, String organId, String name, String certiType, String certifNum);
List<AllocationSrvTaskVO> getAllocationSrvTask();
}
package com.hungraim.ltc.governance.service;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
/**
* @author zwl
* @ClassName SrvTaskScheduledServiceImpl
* @description
* @date 2023/3/2 14:37
**/
@Service
@Slf4j
public class SrvTaskScheduledServiceImpl {
@Autowired
private SrvTaskService srvTaskService;
@Scheduled(cron = "30 30 23 * * ?")
public void timeAllocationSrvTask() {
log.info("timeAllocationSrvTask========start");
srvTaskService.timeAllocationSrvTask();
log.info("timeAllocationSrvTask========end:{}");
}
}
......@@ -32,4 +32,7 @@ public interface SrvTaskService {
*/
void addOrUpdateSrvTask(SrvTaskInfoListVO param);
void timeAllocationSrvTask();
}
......@@ -94,7 +94,7 @@ public class NursingServiceItemsServiceImpl implements NursingServiceItemsServic
@Override
public List<ChCfgSrvDisableLevel> disableLevelConfigList() {
return disableLevelMapper.selectList(new QueryWrapper<>());
return disableLevelMapper.selectList(new QueryWrapper<ChCfgSrvDisableLevel>().orderByDesc("disable_level_id"));
}
@Override
......
......@@ -141,6 +141,7 @@ public class SrvTaskServiceImpl implements SrvTaskService {
chSrvTask.setDisabInfoId(Long.parseLong(disabInfoId)); // 失能人员id
chSrvTask.setSrvEmpId(Long.parseLong(srvTaskInfoVO.getSrvEmpId()));//服务人员id
chSrvTask.setStatus((short) 1);//状态 未分配:0;已分配:1;已终止2
chSrvTask.setSrvDate(DateUtils.strToDate(taskDetails.get(0)));
srvTaskMapper.insert(chSrvTask);
//添加服务计划详情
Long newSrvTaskId = chSrvTask.getSrvTaskId();
......@@ -202,4 +203,26 @@ public class SrvTaskServiceImpl implements SrvTaskService {
return srvTaskMapper.getSrvOrganEmpList(page, organId, name, certiType, certifNum);
}
@Override
public void timeAllocationSrvTask() {
// 查询需要执行的计划
List<AllocationSrvTaskVO> chSrvTasks = srvTaskMapper.getAllocationSrvTask();
// 生成计划任务 CH_SRV_TASK_DETAIL
for (AllocationSrvTaskVO chSrvTask : chSrvTasks) {
Long srvTaskId = chSrvTask.getSrvTaskId();
String nextDay = DateUtils.getNextDay();
// 根据任务id和服务时间查询是否已经生成过计划,已经生成了就不需要再生成了,已退出
int chSrvTaskDetailCount = chSrvTaskDetailMapper
.getSrvTaskDetail(String.valueOf(srvTaskId), nextDay);
if (chSrvTaskDetailCount > 0) {
log.info("{},已经有计划任务了",nextDay);
return;
}
ChSrvTaskDetail chSrvTaskDetail = new ChSrvTaskDetail();
chSrvTaskDetail.setSrvTaskId(srvTaskId);//taskId
chSrvTaskDetail.setSrvDate(DateUtils.strToDate(nextDay));//服务开始时间
chSrvTaskDetail.setStatus((short) 0);//状态 未执行:0;执行中:1;已执行:2;已失效:3已完成4
chSrvTaskDetailMapper.insert(chSrvTaskDetail);
}
}
}
......@@ -56,4 +56,9 @@
AUDIT_RESULT, AUDIT_REMARK, AUDIT_DATE, ILLEGAL_TYPE, ILLEGAL_REMARK, ILLEGALRE_EMP,
ILLEGALRE_NAME, ILLEGALRE_TIME, ACCOUNT_SIGN, TASK_DETAIL_TYPE
</sql>
<select id="getSrvTaskDetail" resultType="java.lang.Integer">
select count(0) from CH_SRV_TASK_DETAIL t where t.SRV_TASK_ID = #{srvTaskId}
and to_char(t.SRV_DATE,'yyyy-MM-dd') = #{srvDate}
</select>
</mapper>
\ No newline at end of file
......@@ -45,6 +45,7 @@
left join ch_apr_report report on t.task_id = report.task_id
<where>
t.TASK_STATUS = 3 and report.DISABLE_LEVEL_ID in ('3','4','5')
and sysdate <![CDATA[ > ]]> report.PUBLICITY_END_TIME
<if test="chSrvOrgan.organId != null and chSrvOrgan.organId != ''">
AND o.organ_id = #{chSrvOrgan.organId}
</if>
......
......@@ -104,6 +104,7 @@
emp.emp_name empName,
--任务时间
detail.SRV_DATE srvDate,
level1.DISABLE_LEVEL_NAME disableLevelName,
--任务状态
detail.status status
from ch_srv_task_detail detail--服务计划
......@@ -146,6 +147,7 @@
and mode1.mode_id = #{modeId}
</if>
</where>
order by detail.SRV_DATE desc
</select>
<!--查询服务计划信息-->
......@@ -213,5 +215,14 @@
</if>
</where>
</select>
<select id="getAllocationSrvTask" resultType="com.hungraim.ltc.pojo.vo.governance.AllocationSrvTaskVO">
select t.SRV_TASK_ID,t.SRV_DATE,info.EXIT_TIME,info.EXIT_FLAG,info.EXIT_REASON_ID from CH_SRV_TASK t
left join CH_DISABLE_INFO info on t.DISAB_INFO_ID = info.DISAB_INFO_ID
left join ch_apr_task aprtask on info.last_task_id = aprtask.task_id--评定任务
left join ch_apr_report report on aprtask.task_id = report.task_id--评定报告
where t.SRV_DATE <![CDATA[ < ]]> sysdate and
(info.EXIT_TIME <![CDATA[ > ]]> sysdate or info.EXIT_TIME is null)
and sysdate <![CDATA[ > ]]> report.PUBLICITY_END_TIME
</select>
</mapper>
\ No newline at end of file
......@@ -18,6 +18,7 @@ import com.hungraim.ltc.system.service.impl.SystemUserRoleServiceImpl;
import com.hungraim.ltc.system.service.impl.SystemUserServiceImpl;
import com.hungraim.ltc.util.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.web.bind.annotation.*;
......@@ -301,6 +302,43 @@ public class UserController {
return Result.success("更新成功");
}
@PostMapping("/updatePassword")
public Result updatePassword(String oldPassword,String newPassword,@RequestHeader("Authorization") String token){
log.info("oldPassword:"+oldPassword+",newPassword:"+newPassword);
if(StringUtils.isBlank(newPassword) || StringUtils.isBlank(oldPassword)){
Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
//校验旧密码是否匹配
Integer userId = TokenParsingUtil.TokenParsing(token, "userId");
if(userId == null){
return Result.failed("未获取到用户信息!");
}
SystemUser userinfo = userInfoService.getById(userId);
if(userinfo == null){
return Result.failed("未获取到用户信息!");
}
BCryptPasswordEncoder bCryptPasswordEncoder = new BCryptPasswordEncoder();
String userinfoPassword = userinfo.getPassword();
if(!bCryptPasswordEncoder.matches(oldPassword, userinfoPassword)){
return Result.failed("旧密码不匹配!");
}
if (CheckStrength.checkPasswordStrength(newPassword) < 4) {
return Result.failed("密码太简单,请设置复杂密码!");
}
SystemUser user = new SystemUser();
user.setPassword(new BCryptPasswordEncoder().encode(newPassword));
user.setUserId(userId.longValue());
userInfoService.updateById(user);
return Result.success();
}
}
package com.hungraim.ltc.system.service;
public interface SrvTaskScheduledService {
void timeAllocationSrvTask();
}
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