Commit db8fda2b authored by 董天德's avatar 董天德

Merge remote-tracking branch 'origin/uat_ch_master_zwl' into dev_20240509_导出加统筹区_dtd

# Conflicts: # apply/apply-service/src/main/java/com/hungraim/ltc/dao/ChSrvTaskDetailMapper.java
parents db059924 32d4093a
...@@ -4,6 +4,7 @@ import org.springframework.boot.SpringApplication; ...@@ -4,6 +4,7 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.transaction.annotation.EnableTransactionManagement;
/** /**
...@@ -13,6 +14,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement; ...@@ -13,6 +14,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@EnableDiscoveryClient @EnableDiscoveryClient
@EnableTransactionManagement @EnableTransactionManagement
@EnableFeignClients @EnableFeignClients
@EnableScheduling
public class AccountApplication { public class AccountApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(AccountApplication.class, args); SpringApplication.run(AccountApplication.class, args);
......
package com.hungraim.ltc.account.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
@Data
@ConfigurationProperties(prefix = "auditing.role")
public class AuditingRoleConfig {
private List<String> roleId;
}
...@@ -18,6 +18,7 @@ import org.apache.poi.ss.usermodel.Workbook; ...@@ -18,6 +18,7 @@ import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.text.ParseException; import java.text.ParseException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
...@@ -41,7 +42,7 @@ public class AccountController { ...@@ -41,7 +42,7 @@ public class AccountController {
* @return 返回状态 * @return 返回状态
*/ */
@PostMapping("/addOrUpdateAccount") @PostMapping("/addOrUpdateAccount")
public Result addOrUpdateAccount(AccountOperVo accountOperVo) { public Result addOrUpdateAccount(@RequestHeader("Authorization") String token,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);
}*/ }*/
...@@ -54,6 +55,8 @@ public class AccountController { ...@@ -54,6 +55,8 @@ public class AccountController {
return Result.failed("当前机构当月已存在结算数据"); return Result.failed("当前机构当月已存在结算数据");
} }
} }
Integer userId = TokenParsingUtil.TokenParsing(token, "userId");
accountOperVo.setUserId(userId);
accountService.addOrUpdateAccount(accountOperVo); accountService.addOrUpdateAccount(accountOperVo);
return Result.success(); return Result.success();
} }
...@@ -116,6 +119,17 @@ public class AccountController { ...@@ -116,6 +119,17 @@ public class AccountController {
return result; return result;
} }
/**
* 批量退回
*
* @return
*/
@PostMapping("/batchAccountReturn")
public Result batchAccountReturn(AccountTaskReqVO accountTaskReqVO){
List<AccountTaskExecuteReqVO> accountTaskExecuteReqVOS = accountTaskReqVO.getAccountTaskList();
Result result = accountService.batchAccountReturn(accountTaskExecuteReqVOS);
return result;
}
@GetMapping("/getOtherPlace") @GetMapping("/getOtherPlace")
public Result otherPlaceHandler(String programId){ public Result otherPlaceHandler(String programId){
...@@ -142,6 +156,34 @@ public class AccountController { ...@@ -142,6 +156,34 @@ public class AccountController {
/** /**
* 补卡列表
*
* @param srvTaskReqVO 请求参数对象
* @return 返回
*/
@GetMapping("/getApplyCardList")
public Result<Page<SrvTaskRespVO>> getApplyCardList(@RequestHeader("Authorization") String token,SrvTaskReqVO srvTaskReqVO) {
long srvOrganId = TokenParsingUtil.TokenParsing(token, "srvOrganId");
if(srvOrganId != 0) {
srvTaskReqVO.setSrvOrganId(srvOrganId);
}
Integer userId = TokenParsingUtil.TokenParsing(token, "userId");
srvTaskReqVO.setUserId(userId);
return Result.success(accountService.getSrvTaskCardList(srvTaskReqVO));
}
/**
* 补卡详情
*
* @param taskDetailId 请求参数对象
* @return 返回
*/
@GetMapping("/getApplyCardInfo")
public Result<SrvTaskCardRespDTO> getApplyCardInfo(String taskDetailId) {
return Result.success(accountService.getSrvTaskCardInfo(taskDetailId));
}
/**
* 查询机构结算审核列表 * 查询机构结算审核列表
* *
* @param srvOrganListReq 请求参数对象 * @param srvOrganListReq 请求参数对象
...@@ -207,6 +249,7 @@ public class AccountController { ...@@ -207,6 +249,7 @@ public class AccountController {
if (StringUtils.isBlank(accountsId)) { if (StringUtils.isBlank(accountsId)) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR); return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
} }
srvOrganListReq.setAccountsStatus("1");
Page<ChDisabDetailAccountsResp> chAssessDetailAccounts = accountService.queryOrganAccountsDetail(pageNum,pageSize,srvOrganListReq); Page<ChDisabDetailAccountsResp> chAssessDetailAccounts = accountService.queryOrganAccountsDetail(pageNum,pageSize,srvOrganListReq);
return Result.success(chAssessDetailAccounts); return Result.success(chAssessDetailAccounts);
} }
...@@ -219,8 +262,11 @@ public class AccountController { ...@@ -219,8 +262,11 @@ public class AccountController {
*/ */
@GetMapping("/queryAccountsDeclareList") @GetMapping("/queryAccountsDeclareList")
public Result<Page<ChDisabDetailAccountsResp>> queryAccountsDeclareList(@RequestHeader("Authorization") String token,Integer pageNum, Integer pageSize,SrvOrganListReq srvOrganListReq) { public Result<Page<ChDisabDetailAccountsResp>> queryAccountsDeclareList(@RequestHeader("Authorization") String token,Integer pageNum, Integer pageSize,SrvOrganListReq srvOrganListReq) {
List<String> accountsStatusList = Arrays.asList("0", "1"); String accountsStatus = srvOrganListReq.getAccountsStatus();
if(StringUtils.isEmpty(accountsStatus)) {
List<String> accountsStatusList = Arrays.asList("0", "1", "2");
srvOrganListReq.setAccountsStatusList(accountsStatusList); srvOrganListReq.setAccountsStatusList(accountsStatusList);
}
long srvOrganId = TokenParsingUtil.TokenParsing(token, "srvOrganId"); long srvOrganId = TokenParsingUtil.TokenParsing(token, "srvOrganId");
if(srvOrganId !=0) { if(srvOrganId !=0) {
srvOrganListReq.setSrvOrganId(srvOrganId); srvOrganListReq.setSrvOrganId(srvOrganId);
...@@ -231,6 +277,28 @@ public class AccountController { ...@@ -231,6 +277,28 @@ public class AccountController {
return Result.success(chAssessDetailAccounts); return Result.success(chAssessDetailAccounts);
} }
/**
* 基金申报导出
* @param
* @return
*/
@GetMapping("/accountsDeclareExport")
public void accountsDeclareExport(@RequestHeader("Authorization") String token,SrvOrganListReq req,HttpServletResponse response){
long srvOrganId = TokenParsingUtil.TokenParsing(token, "srvOrganId");
if(srvOrganId !=0) {
req.setSrvOrganId(srvOrganId);
}
Workbook workbook = accountService.accountsDeclareExport(req);
// 命名表格
String fileName = "accountsDeclare.xlsx";
FileUtils.exportResponse(workbook,fileName,response);
}
/** /**
* 暂缓列表查询 * 暂缓列表查询
* @param * @param
...@@ -240,6 +308,7 @@ public class AccountController { ...@@ -240,6 +308,7 @@ public class AccountController {
public Result<Page<ChDisabDetailAccountsResp>> queryDelayAccountList(@RequestHeader("Authorization") String token,Integer pageNum, Integer pageSize,SrvOrganListReq srvOrganListReq) { public Result<Page<ChDisabDetailAccountsResp>> queryDelayAccountList(@RequestHeader("Authorization") String token,Integer pageNum, Integer pageSize,SrvOrganListReq srvOrganListReq) {
List<String> list = Arrays.asList("1", "2"); List<String> list = Arrays.asList("1", "2");
srvOrganListReq.setAccountsStatusList(list); srvOrganListReq.setAccountsStatusList(list);
srvOrganListReq.setAccountsStatus(srvOrganListReq.getStatus());
long srvOrganId = TokenParsingUtil.TokenParsing(token, "srvOrganId"); long srvOrganId = TokenParsingUtil.TokenParsing(token, "srvOrganId");
if(srvOrganId != 0) { if(srvOrganId != 0) {
srvOrganListReq.setSrvOrganId(srvOrganId); srvOrganListReq.setSrvOrganId(srvOrganId);
...@@ -271,12 +340,7 @@ public class AccountController { ...@@ -271,12 +340,7 @@ public class AccountController {
*/ */
@PostMapping("/accountsFreeCommit") @PostMapping("/accountsFreeCommit")
public Result accountsFreeCommit(Long accountsDetailId) { public Result accountsFreeCommit(Long accountsDetailId) {
int result = accountService.accountsFreeCommit(accountsDetailId); return accountService.accountsFreeCommit(accountsDetailId);
if (result > 0) {
return Result.success();
} else {
return Result.failed("该记录已不可申报,请联系管理员");
}
} }
/** /**
...@@ -387,13 +451,29 @@ public class AccountController { ...@@ -387,13 +451,29 @@ public class AccountController {
} }
@RequestMapping("/accountReturn") @RequestMapping("/accountReturn")
public Result accountReturn(SrvTaskRespVO srvTaskRespVO) { public Result accountReturn(AccountTaskExecuteReqVO srvTaskRespVO) {
Result result = accountService.accountReturn(srvTaskRespVO); Result result = accountService.accountReturn(srvTaskRespVO);
return result; return result;
} }
/**
*驳回基金申报
**/
@RequestMapping("/accountReportReject")
public Result accountReportReject(ReportRejectReqVO reportRejectReqVO) {
log.info("=======accountReportReject:{}",reportRejectReqVO);
if (null == reportRejectReqVO.getAccountsDetailId()&&StringUtils.isEmpty(reportRejectReqVO.getRemarks())) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
if(reportRejectReqVO.getDeductionAmount().compareTo(BigDecimal.ZERO) != 0
||reportRejectReqVO.getReissueAmount().compareTo(BigDecimal.ZERO) != 0){
return Result.failed("该失能人员存在费用扣减,请先移步统筹费用扣减进行清除!");
}
Result result = accountService.accountReportReject(reportRejectReqVO);
return result;
}
......
package com.hungraim.ltc.account.controller;
import com.hungraim.ltc.account.service.AccountService;
import com.hungraim.ltc.redis.RedisLock;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.util.Calendar;
/**
* @author zwl
* @ClassName
* @description
* @date 2024/5/12 15:14
**/
@Component
@EnableAsync
@Slf4j
public class PlaceOtherController {
@Autowired
private RedisLock redisLock;
@Autowired
private AccountService accountService;
public static final String JOB_PLACE_KEY = "redis.job.task:place";
@Scheduled(cron = "0 30 23 28-31 * ?")
public void disablePlaceHandler() {
boolean flag = redisLock.tryLock(JOB_PLACE_KEY, 1000 * 30);
if (flag) {
final Calendar c = Calendar.getInstance();
if (c.get(Calendar.DATE) == c.getActualMaximum(Calendar.DATE)) {
//是最后一天
accountService.placeOtherTaskQuery();
}
}
}
}
...@@ -46,4 +46,7 @@ public interface ChDisabAccountsDetailMapper extends BaseMapper<ChDisabDetailAcc ...@@ -46,4 +46,7 @@ public interface ChDisabAccountsDetailMapper extends BaseMapper<ChDisabDetailAcc
int queryTaskDetailDisable(TaskDetailDisableVO taskDetailDisableVO); int queryTaskDetailDisable(TaskDetailDisableVO taskDetailDisableVO);
List<AccountDeclareExportResp> queryAccountsDeclareExport(SrvOrganListReq req);
} }
\ No newline at end of file
...@@ -6,8 +6,11 @@ import com.hungraim.ltc.pojo.entity.account.ChDisabFreeRdInfo; ...@@ -6,8 +6,11 @@ import com.hungraim.ltc.pojo.entity.account.ChDisabFreeRdInfo;
import com.hungraim.ltc.pojo.entity.account.OverallCostListRespVO; import com.hungraim.ltc.pojo.entity.account.OverallCostListRespVO;
import com.hungraim.ltc.pojo.entity.account.OverallCostReqVO; import com.hungraim.ltc.pojo.entity.account.OverallCostReqVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.List;
/** /**
* @author zwl * @author zwl
* @ClassName ChDisabFreeRdInfoMapper * @ClassName ChDisabFreeRdInfoMapper
...@@ -19,5 +22,7 @@ import org.springframework.stereotype.Repository; ...@@ -19,5 +22,7 @@ import org.springframework.stereotype.Repository;
public interface ChDisabFreeRdInfoMapper extends BaseMapper<ChDisabFreeRdInfo> { public interface ChDisabFreeRdInfoMapper extends BaseMapper<ChDisabFreeRdInfo> {
Page<OverallCostListRespVO> queryFreeRdInfo(Page page, OverallCostReqVO req); Page<OverallCostListRespVO> queryFreeRdInfo(Page page, OverallCostReqVO req);
List<String> selectByAccountsId(@Param("accountsId")Long accountsId,@Param("dealType") int dealType);
} }
...@@ -7,6 +7,7 @@ import com.hungraim.ltc.pojo.vo.account.SrvTaskReqVO; ...@@ -7,6 +7,7 @@ import com.hungraim.ltc.pojo.vo.account.SrvTaskReqVO;
import com.hungraim.ltc.pojo.vo.account.SrvTaskRespVO; import com.hungraim.ltc.pojo.vo.account.SrvTaskRespVO;
import com.hungraim.ltc.pojo.vo.disable.PlaceOtherVO; import com.hungraim.ltc.pojo.vo.disable.PlaceOtherVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
...@@ -18,6 +19,11 @@ public interface ChSrvTaskDetailMapper extends BaseMapper<ChSrvTaskDetail> { ...@@ -18,6 +19,11 @@ public interface ChSrvTaskDetailMapper extends BaseMapper<ChSrvTaskDetail> {
Page<SrvTaskRespVO> getSrvTaskList(Page page,SrvTaskReqVO req); Page<SrvTaskRespVO> getSrvTaskList(Page page,SrvTaskReqVO req);
Page<SrvTaskRespVO> getSrvTaskCardList(Page page,SrvTaskReqVO req);
List<SrvTaskRespVO> getSrvTaskCardInfo(String taskDetailId);
/** /**
*@desc 更新任务计划表状态为已完成 *@desc 更新任务计划表状态为已完成
**/ **/
...@@ -30,4 +36,6 @@ public interface ChSrvTaskDetailMapper extends BaseMapper<ChSrvTaskDetail> { ...@@ -30,4 +36,6 @@ public interface ChSrvTaskDetailMapper extends BaseMapper<ChSrvTaskDetail> {
List<PlaceOtherVO> placeOtherTaskQuery(); List<PlaceOtherVO> placeOtherTaskQuery();
int getRoleByUserId(@Param("userId") Integer userId, @Param("roleIds") List<String> roleIds );
} }
\ No newline at end of file
...@@ -16,6 +16,8 @@ import java.util.List; ...@@ -16,6 +16,8 @@ import java.util.List;
public interface AccountService extends IService<ChDisabAccounts> { public interface AccountService extends IService<ChDisabAccounts> {
Result accountReportReject(ReportRejectReqVO reportRejectReqVO);
/** /**
* 添加或修改结算记录 * 添加或修改结算记录
*/ */
...@@ -27,6 +29,8 @@ public interface AccountService extends IService<ChDisabAccounts> { ...@@ -27,6 +29,8 @@ public interface AccountService extends IService<ChDisabAccounts> {
Page<SrvTaskRespVO> getSrvTaskList(SrvTaskReqVO srvTaskReqVO); Page<SrvTaskRespVO> getSrvTaskList(SrvTaskReqVO srvTaskReqVO);
Page<SrvTaskRespVO> getSrvTaskCardList(SrvTaskReqVO srvTaskReqVO);
AccountOperVo getSrvOrganDetail(Long accountsId); AccountOperVo getSrvOrganDetail(Long accountsId);
ExpenseVo expenseSettlement(ExpenseSettlementReq req) throws ParseException; ExpenseVo expenseSettlement(ExpenseSettlementReq req) throws ParseException;
...@@ -35,6 +39,8 @@ public interface AccountService extends IService<ChDisabAccounts> { ...@@ -35,6 +39,8 @@ public interface AccountService extends IService<ChDisabAccounts> {
Workbook accountsDeclareExport(SrvOrganListReq req);
Page<NursingRecordsRespVO> queryNursingRecords(NursingReqVO nursingReqVO); Page<NursingRecordsRespVO> queryNursingRecords(NursingReqVO nursingReqVO);
...@@ -49,6 +55,7 @@ public interface AccountService extends IService<ChDisabAccounts> { ...@@ -49,6 +55,7 @@ public interface AccountService extends IService<ChDisabAccounts> {
int updateChDisabAccounts(int id); int updateChDisabAccounts(int id);
SrvTaskCardRespDTO getSrvTaskCardInfo(String taskDetailId);
Result accountTaskExecute(List<AccountTaskExecuteReqVO> accountTaskExecuteReqVOS); Result accountTaskExecute(List<AccountTaskExecuteReqVO> accountTaskExecuteReqVOS);
...@@ -56,7 +63,7 @@ public interface AccountService extends IService<ChDisabAccounts> { ...@@ -56,7 +63,7 @@ public interface AccountService extends IService<ChDisabAccounts> {
int deleteAccountsDetail(Long accountsDetailId,Long freeRdId); int deleteAccountsDetail(Long accountsDetailId,Long freeRdId);
int accountsFreeCommit(Long accountsDetailId); Result accountsFreeCommit(Long accountsDetailId);
int delayAccountCommit(Long accountsDetailId,Short status); int delayAccountCommit(Long accountsDetailId,Short status);
...@@ -70,5 +77,7 @@ public interface AccountService extends IService<ChDisabAccounts> { ...@@ -70,5 +77,7 @@ public interface AccountService extends IService<ChDisabAccounts> {
void placeOtherTaskQuery(); void placeOtherTaskQuery();
//退回 //退回
Result accountReturn(SrvTaskRespVO srvTaskRespVO); Result accountReturn(AccountTaskExecuteReqVO srvTaskRespVO);
Result batchAccountReturn(List<AccountTaskExecuteReqVO> srvTaskListRespVO);
} }
...@@ -15,11 +15,14 @@ ...@@ -15,11 +15,14 @@
o.SRV_ORGAN_NAME srvOrganName, o.SRV_ORGAN_NAME srvOrganName,
o.SRV_ORGAN_ID srvOrganId, o.SRV_ORGAN_ID srvOrganId,
info.REAL_NAME realName, info.REAL_NAME realName,
info.CERTI_CODE certiCode,
info.DISAB_INFO_ID disabInfoId, info.DISAB_INFO_ID disabInfoId,
d.DEDUCTION_AMOUNT deductionAmount, d.DEDUCTION_AMOUNT deductionAmount,
d.REISSUE_AMOUNT reissueAmount, d.REISSUE_AMOUNT reissueAmount,
d.ACCOUNTS_DETAIL_ID accountsDetailId, d.ACCOUNTS_DETAIL_ID accountsDetailId,
d.STATUS d.STATUS,
d.ACCOUNTS_ID accountsId,
o.LEVEL_CODE levelCode
from CH_DISAB_ACCOUNTS_DETAIL d 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_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_DISABLE_APPLY apply on info.APPLY_ID=apply.APPLY_ID
...@@ -41,6 +44,10 @@ ...@@ -41,6 +44,10 @@
<if test="req.realName != null and req.realName != ''"> <if test="req.realName != null and req.realName != ''">
AND info.real_name LIKE CONCAT('%',CONCAT(#{req.realName},'%')) AND info.real_name LIKE CONCAT('%',CONCAT(#{req.realName},'%'))
</if> </if>
<if test="req.certiCode != null and req.certiCode != ''">
AND info.CERTI_CODE = #{req.certiCode}
</if>
<if test="req.srvOrganId != null and req.srvOrganId != '' and req.srvOrganId!=0"> <if test="req.srvOrganId != null and req.srvOrganId != '' and req.srvOrganId!=0">
and d.SRV_ORGAN_ID = #{req.srvOrganId} and d.SRV_ORGAN_ID = #{req.srvOrganId}
</if> </if>
...@@ -56,6 +63,63 @@ ...@@ -56,6 +63,63 @@
</if> </if>
</where> </where>
order by info.DISAB_INFO_ID
</select>
<select id="queryAccountsDeclareExport" resultType="com.hungraim.ltc.pojo.vo.account.AccountDeclareExportResp">
select
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,
d.ACCOUNTS_ALL_COST accountsAllCost,
d.ACCOUNTS_OVERALL_COST accountsOverallCost,
d.ACCOUNTS_PERSONAL_COST accountsPersonalCost,
d.TASK_DETAIL_ID taskDetailId,
(select district_name from ch_fnd_district dis where apply.MEDICAL_AREA = dis.district_code) medicalArea,
o.SRV_ORGAN_NAME srvOrganName,
o.SRV_ORGAN_ID srvOrganId,
info.REAL_NAME realName,
info.DISAB_INFO_ID disabInfoId,
d.DEDUCTION_AMOUNT deductionAmount,
d.REISSUE_AMOUNT reissueAmount,
d.ACCOUNTS_DETAIL_ID accountsDetailId,
DECODE(d.STATUS, '0','未申报','1', '已申报','2','已暂缓') status,
d.ACCOUNTS_ID accountsId
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.mode_name <![CDATA[ <>]]> '异地'
<if test="modeId != null and modeId != ''">
and DECODE(d.mode_name, '医疗','1','养老', '2','上门','3', '异地', '4') = #{modeId}
</if>
<if test="accountsStatus != null and accountsStatus != ''">
and d.status = #{accountsStatus}
</if>
<if test="realName != null and realName != ''">
AND info.real_name LIKE CONCAT('%',CONCAT(#{realName},'%'))
</if>
<if test="srvOrganId != null and srvOrganId != '' and srvOrganId!=0">
and d.SRV_ORGAN_ID = #{srvOrganId}
</if>
<if test="accountsTime != null and accountsTime != ''">
AND to_char(d.ACCOUNTS_TIME,'yyyy-MM') = #{accountsTime}
</if>
<if test='accountsStatusList != null and accountsStatusList.size()>0'>
AND d.status IN
<foreach collection="accountsStatusList" open="(" close=")" item="accountsStatusList" separator=",">
#{accountsStatusList}
</foreach>
</if>
</where>
order by info.DISAB_INFO_ID
</select> </select>
<select id="queryNursingRecords" resultType="com.hungraim.ltc.pojo.entity.account.NursingRecordsRespVO"> <select id="queryNursingRecords" resultType="com.hungraim.ltc.pojo.entity.account.NursingRecordsRespVO">
...@@ -75,7 +139,7 @@ ...@@ -75,7 +139,7 @@
and plan.MODE_ID = #{req.modeId} and plan.MODE_ID = #{req.modeId}
and to_char(plan.SRV_PLAN_TIME,'yyyy-MM') = #{req.accountsTime} and to_char(plan.SRV_PLAN_TIME,'yyyy-MM') = #{req.accountsTime}
and plan.IS_STATUS ='4' and plan.IS_STATUS ='4'
order by plan.SRV_PLAN_TIME desc order by plan.SRV_PLAN_TIME desc,plan.PLAN_ID
</select> </select>
<select id="queryNursingRecordsGoDoor" resultType="com.hungraim.ltc.pojo.entity.account.NursingRecordsRespVO"> <select id="queryNursingRecordsGoDoor" resultType="com.hungraim.ltc.pojo.entity.account.NursingRecordsRespVO">
...@@ -98,7 +162,7 @@ from CH_SRV_TASK_FINISH_ITEM item ...@@ -98,7 +162,7 @@ from CH_SRV_TASK_FINISH_ITEM item
LEFT JOIN CH_SRV_ORGAN_PROJECT CSOP ON CSOP.PROJECT_ID = item.ITEM_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 left join CH_SERVICE_TYPE_DETAILED service on service.SERVICE_TYPE_DETAILED_ID = CSOP.ITEM_NAME
where to_char(detail.SRV_DATE, 'yyyy-MM') = #{req.accountsTime} and task.DISAB_INFO_ID = #{req.disabInfoId} where to_char(detail.SRV_DATE, 'yyyy-MM') = #{req.accountsTime} and task.DISAB_INFO_ID = #{req.disabInfoId}
and organ.SRV_ORGAN_ID = #{req.srvOrganId} order by detail.SRV_DATE desc and organ.SRV_ORGAN_ID = #{req.srvOrganId} order by detail.SRV_DATE desc,item.task_finish_item_id
</select> </select>
...@@ -250,7 +314,7 @@ and organ.SRV_ORGAN_ID = #{req.srvOrganId} order by detail.SRV_DATE desc ...@@ -250,7 +314,7 @@ and organ.SRV_ORGAN_ID = #{req.srvOrganId} order by detail.SRV_DATE desc
left join CH_SRV_ORGAN o on d.SRV_ORGAN_ID = o.SRV_ORGAN_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_FND_ORGAN t3 ON o.ORGAN_ID = t3.ORGAN_ID
<where> <where>
1=1 1=1 and d.status = 1
<if test="accountsId != null and accountsId != ''"> <if test="accountsId != null and accountsId != ''">
and d.ACCOUNTS_ID = #{accountsId} and d.ACCOUNTS_ID = #{accountsId}
</if> </if>
......
...@@ -21,9 +21,14 @@ ...@@ -21,9 +21,14 @@
select * from CH_DISAB_ACCOUNTS t where t.MODE_NAME = #{modeName} select * from CH_DISAB_ACCOUNTS t where t.MODE_NAME = #{modeName}
and to_char(t.ACCOUNTS_TIME,'yyyy-MM') = #{accountsTime} and to_char(t.ACCOUNTS_TIME,'yyyy-MM') = #{accountsTime}
and t.SRV_ORGAN_ID = #{srvOrganId} and t.SRV_ORGAN_ID = #{srvOrganId}
<if test="isDelay !=null"> <choose>
<when test="isDelay != null">
and t.IS_DELAY = 2 and t.IS_DELAY = 2
</if> </when>
<otherwise>
and t.IS_DELAY is null
</otherwise>
</choose>
</select> </select>
...@@ -47,7 +52,8 @@ ...@@ -47,7 +52,8 @@
to_char(t1.SVR_END_TIME,'yyyy-MM-dd') svrEndTime, to_char(t1.SVR_END_TIME,'yyyy-MM-dd') svrEndTime,
t1.TOTAL_ALLOCATED_EXPENSES totalAllocatedExpenses, t1.TOTAL_ALLOCATED_EXPENSES totalAllocatedExpenses,
t1.REISSUE_AMOUNT_TOTAL reissueAmountTotal, t1.REISSUE_AMOUNT_TOTAL reissueAmountTotal,
t1.DEDUCTION_AMOUNT_TOTAL deductionAmountTotal t1.DEDUCTION_AMOUNT_TOTAL deductionAmountTotal,
(select count(1) from CH_DISAB_ACCOUNTS_DETAIL d where d.ACCOUNTS_ID =t1.ACCOUNTS_ID and d.STATUS = 1) personDay
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
......
...@@ -48,5 +48,14 @@ ...@@ -48,5 +48,14 @@
<select id="selectByAccountsId" resultType="java.lang.String">
select f.real_name||':'||i.REMARKS from CH_DISAB_FREE_RD_INFO i left join CH_DISAB_ACCOUNTS_DETAIL d on
i.ACCOUNTS_DETAIL_ID = d.ACCOUNTS_DETAIL_ID left join CH_DISABLE_INFO f
on d.DISAB_INFO_ID = f.DISAB_INFO_ID
where i.ACCOUNTS_ID = #{accountsId} and
i.DEAL_TYPE = #{dealType}
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -45,6 +45,78 @@ ...@@ -45,6 +45,78 @@
</select> </select>
<select id="getSrvTaskCardList" resultType="com.hungraim.ltc.pojo.vo.account.SrvTaskRespVO">
select distinct info.REAL_NAME realName,
plan.TASK_DETAIL_ID taskDetailId,
emp.emp_name empName,
emp.emp_id empId,
info.DISAB_INFO_ID disabInfoId,
organ.SRV_ORGAN_NAME srvOrganName,
DECODE(plan.MODE_ID, '1','医疗','2', '养老','3','上门', '4', '异地') srvModeName,
to_char(plan.SRV_PLAN_TIME,'yyyy-MM-dd') srvDate,
detail.check_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_TASK_DETAIL detail on detail.TASK_DETAIL_ID = plan.TASK_DETAIL_ID
left join CH_SRV_ORGAN organ on organ.SRV_ORGAN_ID = plan.SRV_ORGAN_ID
<where>
1=1 and detail.check_status in (1,2,3)
<if test="req.status != null and req.status != ''">
and detail.check_status = #{req.status}
</if>
<if test="req.realName != null and req.realName != ''">
AND info.real_name LIKE CONCAT('%',CONCAT(#{req.realName},'%'))
</if>
<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>
<if test="req.srvOrganId != null and req.srvOrganId != '' and req.srvOrganId!=0">
AND organ.SRV_ORGAN_ID = #{req.srvOrganId}
</if>
</where>
order by status,taskDetailId
</select>
<select id="getSrvTaskCardInfo" 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,
emp.emp_id empId,
info.DISAB_INFO_ID disabInfoId,
organ.SRV_ORGAN_NAME srvOrganName,
organ.SRV_ORGAN_ID srvOrganId,
DECODE(plan.MODE_ID, '1','医疗','2', '养老','3','上门', '4', '异地') srvModeName,
to_char(plan.SRV_PLAN_TIME,'yyyy-MM-dd') srvDate,
detail.check_status status,
detail.clock_reason reason,
detail.auditor,
detail.srv_task_id srvTaskId,
detail.task_detail_id taskDetailId,
info.srv_mode_id modeId,
detail.audit_remark auditRemark
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_TASK_DETAIL detail on detail.TASK_DETAIL_ID = plan.TASK_DETAIL_ID
left join CH_SRV_ORGAN organ on organ.SRV_ORGAN_ID = plan.SRV_ORGAN_ID
<where>
1=1 and detail.check_status in (1,2,3)
<if test="taskDetailId != null and taskDetailId != ''">
and detail.TASK_DETAIL_ID = #{taskDetailId}
</if>
</where>
</select>
<update id="updateSrvPlanById"> <update id="updateSrvPlanById">
update CH_SRV_PLAN plan set plan.is_status= '4',plan.creation_time=sysdate 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> </update>
...@@ -84,26 +156,17 @@ ...@@ -84,26 +156,17 @@
<select id="placeOtherTaskQuery" resultType="com.hungraim.ltc.pojo.vo.disable.PlaceOtherVO"> <select id="placeOtherTaskQuery" resultType="com.hungraim.ltc.pojo.vo.disable.PlaceOtherVO">
SELECT distinct info.DISAB_INFO_ID disabInfoId, SELECT distinct info.DISAB_INFO_ID disabInfoId,
report.evaluate_time evaluateTime,
task.ORGAN_ID organId,
report.disable_level_id disableLevelId,
info.REAL_NAME realName, info.REAL_NAME realName,
info.CERTI_CODE certiCode,
(SELECT DISE_TYPE_CODE FROM CH_FND_DISEASE_TYPE WHERE info.DISE_TYPE_S = DISE_TYPE_ID) diseTypeS,
info.disease_desc diseaseDesc,
lev.DISABLE_LEVEL_NAME riskLevel,
report.PUBLICITY_START_TIME publicityStartTime,
report.PUBLICITY_END_TIME publicityEndTime,
report.PUBLICITY_TIME publicityTime,
to_char(info.OTHER_APPLY_TIME,'yyyy-MM-dd') otherApplyTime to_char(info.OTHER_APPLY_TIME,'yyyy-MM-dd') otherApplyTime
FROM CH_DISABLE_INFO info FROM CH_DISABLE_INFO info
LEFT JOIN CH_APR_TASK task ON info.DISAB_INFO_ID = task.DISABLE_INFO_ID where info.SRV_MODE_ID ='4'
LEFT JOIN ch_apr_report report ON report.TASK_ID = task.TASK_ID
left join ch_apr_organ aprOrgan on task.apr_organ_id = aprOrgan.apr_organ_id
LEFT JOIN CH_CFG_SRV_DISABLE_LEVEL lev ON report.DISABLE_LEVEL_ID = lev.DISABLE_LEVEL_ID
where info.SRV_MODE_ID ='4' and sysdate <![CDATA[ > ]]> report.PUBLICITY_END_TIME
and info.OTHER_APPLY_TIME is not null and info.OTHER_APPLY_TIME is not null
and info.OTHER_APPLY_TIME = to_date(to_char(sysdate,'yyyy-MM-dd'),'yyyy-MM-dd') and (info.exit_reason_id !='1' or info.exit_reason_id is null)
and info.OTHER_APPLY_TIME <![CDATA[ <= ]]> to_date(to_char(sysdate,'yyyy-MM-dd'),'yyyy-MM-dd')
and info.DISAB_INFO_ID not in (
select d.disab_info_id from CH_DISAB_ACCOUNTS_detail d where d.mode_name <![CDATA[ <> ]]> '异地' and to_char(d.accounts_time,'yyyy-MM') = to_char(sysdate,'yyyy-MM')
)
</select> </select>
...@@ -113,6 +176,14 @@ ...@@ -113,6 +176,14 @@
</update> </update>
<select id="getRoleByUserId" resultType="java.lang.Integer">
select count(*) from LTC_USER_ROLE r where r.user_id = #{userId}
<if test="roleIds != null">
and r.role_id in
<foreach collection="roleIds" item="roleIds" open="(" close=")" separator=",">
#{roleIds}
</foreach>
</if>
</select>
</mapper> </mapper>
...@@ -37,11 +37,11 @@ public interface ChSrvTaskDetailMapper extends BaseMapper<ChSrvTaskDetail> { ...@@ -37,11 +37,11 @@ public interface ChSrvTaskDetailMapper extends BaseMapper<ChSrvTaskDetail> {
ChDisabDetailAccounts selectAccountsDetail(String disabInfoId, String srvDateStr); ChDisabDetailAccounts selectAccountsDetail(String disabInfoId, String srvDateStr);
void updateChDisabDetailAccounts(Long accountsId, BigDecimal accountsAllCostsub, BigDecimal accountsOverallCostsub, BigDecimal accountsPersonalCostsub);
List<ChSrvTaskDetail2Vo> chSrvTaskDetailExportList(Long empId, String empName,String status,String sevrTime); List<ChSrvTaskDetail2Vo> chSrvTaskDetailExportList(Long empId, String empName,String status,String sevrTime);
void updateChDisabDetailAccounts(Long accountsDetailId, BigDecimal accountsAllCostsub, BigDecimal accountsOverallCostsub, BigDecimal accountsPersonalCostsub);
} }
...@@ -505,6 +505,7 @@ public class DisableServiceImpl implements DisableService { ...@@ -505,6 +505,7 @@ public class DisableServiceImpl implements DisableService {
// 新建disable_info_his表的一条数据,保存历史失能信息记录 // 新建disable_info_his表的一条数据,保存历史失能信息记录
ChDisableInfoHis chDisableInfoHis = new ChDisableInfoHis(); ChDisableInfoHis chDisableInfoHis = new ChDisableInfoHis();
BeanUtil.copyProperties(chDisableInfo, chDisableInfoHis); BeanUtil.copyProperties(chDisableInfo, chDisableInfoHis);
chDisableInfoHis.setLcd(null);
disableInfoHisMapper.insert(chDisableInfoHis); disableInfoHisMapper.insert(chDisableInfoHis);
//更新info //更新info
ChDisableInfo newDisableInfo = new ChDisableInfo(); ChDisableInfo newDisableInfo = new ChDisableInfo();
...@@ -654,25 +655,25 @@ public class DisableServiceImpl implements DisableService { ...@@ -654,25 +655,25 @@ public class DisableServiceImpl implements DisableService {
ChDisableInfo chDisableInfo = new ChDisableInfo(); ChDisableInfo chDisableInfo = new ChDisableInfo();
chDisableInfo.setDisabInfoId(disableInfoId); chDisableInfo.setDisabInfoId(disableInfoId);
chDisableInfo.setExitFlag(1); chDisableInfo.setExitFlag(1);
chDisableInfo.setExitTime(date); chDisableInfo.setExitTime(date);
chDisableInfo.setExitReasonId(exitReasonId); chDisableInfo.setExitReasonId(exitReasonId);
chDisableInfo.setLcd(new Date());
chDisableInfo.setExitSrvOrganId(srvOrganId); chDisableInfo.setExitSrvOrganId(srvOrganId);
int result = disableInfoMapper.updateById(chDisableInfo); int result = disableInfoMapper.updateById(chDisableInfo);
boolean now = DateUtils.isNow(date); // boolean now = DateUtils.isNow(date);
if (now) { // if (now) {
disableExitHanlder(exitReasonId, srvOrganId, disableInfoId, date); disableExitHanlder(exitReasonId, srvOrganId, disableInfoId, date);
} else { // } else {
// 插入历史记录 // // 插入历史记录
ChDisableExit chDisableExit = new ChDisableExit(); // ChDisableExit chDisableExit = new ChDisableExit();
chDisableExit.setDisabInfoId(disableInfoId); // chDisableExit.setDisabInfoId(disableInfoId);
chDisableExit.setExitReasonId(exitReasonId); // chDisableExit.setExitReasonId(exitReasonId);
chDisableExit.setExitTime(date); // chDisableExit.setExitTime(date);
chDisableExit.setSrvOrganId(srvOrganId); // chDisableExit.setSrvOrganId(srvOrganId);
disableExitMapper.insert(chDisableExit); // disableExitMapper.insert(chDisableExit);
return Result.failed("操作成功,退出状态及服务方案和计划将在"+exitTime+"日自动终止"); // return Result.failed("操作成功,退出状态及服务方案和计划将在"+exitTime+"日自动终止");
} // }
if (result > 0) { if (result > 0) {
return Result.success(); return Result.success();
} else { } else {
...@@ -695,6 +696,7 @@ public class DisableServiceImpl implements DisableService { ...@@ -695,6 +696,7 @@ public class DisableServiceImpl implements DisableService {
chSrvProgram.setDisabInfoId(Long.valueOf(disableInfoId)); chSrvProgram.setDisabInfoId(Long.valueOf(disableInfoId));
chSrvProgram.setProgStatus(2); chSrvProgram.setProgStatus(2);
chSrvProgram.setEndReason("失能人员退出,终止方案"); chSrvProgram.setEndReason("失能人员退出,终止方案");
chSrvProgram.setLcd(new Date());
disableInfoMapper.updateSrvProgramById(chSrvProgram); disableInfoMapper.updateSrvProgramById(chSrvProgram);
UpdateWrapper updateWrapper2 = new UpdateWrapper(); UpdateWrapper updateWrapper2 = new UpdateWrapper();
...@@ -708,7 +710,7 @@ public class DisableServiceImpl implements DisableService { ...@@ -708,7 +710,7 @@ public class DisableServiceImpl implements DisableService {
ChSrvSend chSrvSend = new ChSrvSend(); ChSrvSend chSrvSend = new ChSrvSend();
chSrvSend.setDisabInfoId(Long.valueOf(disableInfoId)); chSrvSend.setDisabInfoId(Long.valueOf(disableInfoId));
chSrvSend.setEndTime(date); chSrvSend.setEndTime(date);
chSrvSend.setLcd(new Date());
// 更新已分配为已退出 // 更新已分配为已退出
chSrvSend.setStatus((short)3); chSrvSend.setStatus((short)3);
disableInfoMapper.updateSrvSendById(chSrvSend); disableInfoMapper.updateSrvSendById(chSrvSend);
......
...@@ -45,7 +45,7 @@ public class OrganServiceImpl implements OrganService { ...@@ -45,7 +45,7 @@ public class OrganServiceImpl implements OrganService {
List<Long> organIds = new ArrayList<>(); List<Long> organIds = new ArrayList<>();
if (organId != null && organId != 0) { if (organId != null && organId != 0) {
organIds.add(organId); organIds.add(organId);
if (isInvolveChild) { if (isInvolveChild!=null && isInvolveChild) {
getOrganList(organId, organIds); getOrganList(organId, organIds);
} }
} }
......
...@@ -7,7 +7,9 @@ ...@@ -7,7 +7,9 @@
SELECT max(T6.SRV_SEND_ID) srvSendId, SELECT max(T6.SRV_SEND_ID) srvSendId,
T2.DISAB_INFO_ID disabInfoId, T2.DISAB_INFO_ID disabInfoId,
T2.REAL_NAME realName, T2.REAL_NAME realName,
max(T2.gender) gender,
DECODE(max(T2.SRV_MODE_ID), '1','医疗','2', '养老','3','上门', '4', '异地') svrModelName, DECODE(max(T2.SRV_MODE_ID), '1','医疗','2', '养老','3','上门', '4', '异地') svrModelName,
max(T2.SRV_MODE_ID) svrModelId,
to_char(max(e.EXIT_TIME),'yyyy-MM-dd') exitTime, to_char(max(e.EXIT_TIME),'yyyy-MM-dd') exitTime,
max(T2.CERTI_CODE) CERTI_CODE, max(T2.CERTI_CODE) CERTI_CODE,
max(e.EXIT_REASON_ID) exitReasonId, max(e.EXIT_REASON_ID) exitReasonId,
......
...@@ -100,6 +100,7 @@ public class ReTaskServiceImpl extends ServiceImpl<TaskMapper, ChAprTask> implem ...@@ -100,6 +100,7 @@ public class ReTaskServiceImpl extends ServiceImpl<TaskMapper, ChAprTask> implem
// 先保存历史失能人员信息 // 先保存历史失能人员信息
ChDisableInfoHis chDisableInfoHis = new ChDisableInfoHis(); ChDisableInfoHis chDisableInfoHis = new ChDisableInfoHis();
BeanUtil.copyProperties(chDisableInfo, chDisableInfoHis); BeanUtil.copyProperties(chDisableInfo, chDisableInfoHis);
chDisableInfoHis.setLcd(null);
disableInfoHisMapper.insert(chDisableInfoHis); disableInfoHisMapper.insert(chDisableInfoHis);
ChDisableInfo newDisableInfo = new ChDisableInfo(); ChDisableInfo newDisableInfo = new ChDisableInfo();
......
...@@ -123,6 +123,12 @@ public class ChDisabAccounts implements Serializable { ...@@ -123,6 +123,12 @@ public class ChDisabAccounts implements Serializable {
private Short isDelay; private Short isDelay;
private Date lcd;
private Integer lcu;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }
\ No newline at end of file
...@@ -53,6 +53,8 @@ public class ChDisabDetailAccountsResp implements Serializable { ...@@ -53,6 +53,8 @@ public class ChDisabDetailAccountsResp implements Serializable {
private String realName; private String realName;
private String certiCode;
private String taskDetailId; private String taskDetailId;
private String deductionAmount; private String deductionAmount;
...@@ -63,7 +65,22 @@ public class ChDisabDetailAccountsResp implements Serializable { ...@@ -63,7 +65,22 @@ public class ChDisabDetailAccountsResp implements Serializable {
private String disabInfoId; private String disabInfoId;
private String accountsId;
private Integer status; private Integer status;
// 可报金额
private String reportableAmount;
// 机构应得
private String institutionsDeserve;
// 个人应得
private String personalDeserve;
private String levelCode;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }
\ No newline at end of file
...@@ -2,6 +2,8 @@ package com.hungraim.ltc.pojo.entity.account; ...@@ -2,6 +2,8 @@ package com.hungraim.ltc.pojo.entity.account;
import lombok.Data; import lombok.Data;
import java.util.List;
/** /**
* @author mq * @author mq
*/ */
...@@ -21,4 +23,12 @@ public class ChServiceTypeDetailedVO { ...@@ -21,4 +23,12 @@ public class ChServiceTypeDetailedVO {
*/ */
private String serviceTypeDetailedId; private String serviceTypeDetailedId;
private List<String> srvPicList;
private String srvStartPic;
private String srvStartPic2;
private String srvEndPic;
} }
package com.hungraim.ltc.pojo.entity.disable; package com.hungraim.ltc.pojo.entity.disable;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hungraim.ltc.pojo.entity.PageInfo; import com.hungraim.ltc.pojo.entity.PageInfo;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.List;
/** /**
* 护理机构表 * 护理机构表
...@@ -51,6 +49,8 @@ public class ChSrvOrgan extends PageInfo implements Serializable { ...@@ -51,6 +49,8 @@ public class ChSrvOrgan extends PageInfo implements Serializable {
private Integer lcu; private Integer lcu;
private String checkRemarkLp; private String checkRemarkLp;
private String srvType; private String srvType;
@TableField(exist = false)
private List<SrvTypeData> srvTypeData;
private String districtProvincial; private String districtProvincial;
private String checkNameLp; private String checkNameLp;
private Integer cardType; private Integer cardType;
......
package com.hungraim.ltc.pojo.entity.disable;
import lombok.Data;
/**
* @author zwl
* @ClassName SrvTypeData
* @description
* @date 2023/9/13 16:57
**/
@Data
public class SrvTypeData {
private String value;
private String label;
}
package com.hungraim.ltc.pojo.entity.governance; package com.hungraim.ltc.pojo.entity.governance;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
import java.util.Date; import java.util.Date;
...@@ -24,5 +21,12 @@ public class ChSrvPlan { ...@@ -24,5 +21,12 @@ public class ChSrvPlan {
private Date creationTime; private Date creationTime;
private Date srvPlanTime; private Date srvPlanTime;
private Long isStatus; private Long isStatus;
private Long isBill;
private Date lcd;
@TableField(exist = false)
private String itemWeek;
@TableField(exist = false)
private String planningFrequencyType;
} }
...@@ -154,5 +154,7 @@ public class ChSrvProgramSet implements Serializable { ...@@ -154,5 +154,7 @@ public class ChSrvProgramSet implements Serializable {
*/ */
private String remark; private String remark;
private String itemWeek;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }
\ No newline at end of file
...@@ -205,6 +205,11 @@ public class ChSrvTaskDetail implements Serializable { ...@@ -205,6 +205,11 @@ public class ChSrvTaskDetail implements Serializable {
private Date auditDate; private Date auditDate;
/** /**
* 稽核时间
*/
private String auditor;
/**
* 违规类型(全部:0;基础护理:1;日常照护:2) * 违规类型(全部:0;基础护理:1;日常照护:2)
*/ */
private Short illegalType; private Short illegalType;
...@@ -246,6 +251,8 @@ public class ChSrvTaskDetail implements Serializable { ...@@ -246,6 +251,8 @@ public class ChSrvTaskDetail implements Serializable {
private Short isClock; private Short isClock;
private Short checkStatus;
private String clockReason; private String clockReason;
private String clockOperator; private String clockOperator;
......
package com.hungraim.ltc.pojo.vo.account;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
/**
* @author zwl
* @ClassName AccountDeclareExportResp
* @description 基金申报导出
* @date 2023/7/19 17:04
**/
@Data
public class AccountDeclareExportResp {
@Excel(name = "统筹区",width = 20)
private String medicalArea;
@Excel(name = "账单月份",width = 20)
private String accountsTime;
@Excel(name = "失能人员",width = 20)
private String realName;
/**
* 护理机构名称
*/
@Excel(name = "护理机构名称",width = 20)
private String srvOrganName;
/**
* 护理机构名称
*/
@Excel(name = "服务方式",width = 20)
private String modeName;
/**
* 总费用
*/
@Excel(name = "总费用合计",width = 20)
private String accountsAllCost;
/**
* 统筹费用
*/
@Excel(name = "统筹支出合计",width = 20)
private String accountsOverallCost;
/**
* 个人支付
*/
@Excel(name = "自付合计",width = 20)
private String accountsPersonalCost;
@Excel(name = "申报状态")
private String status;
}
...@@ -19,6 +19,8 @@ public class AccountOperVo extends ChDisabAccounts { ...@@ -19,6 +19,8 @@ public class AccountOperVo extends ChDisabAccounts {
**/ **/
private String modeName; private String modeName;
private Integer userId;
/** /**
* 文件列表数据对象 * 文件列表数据对象
*/ */
......
package com.hungraim.ltc.pojo.vo.account;
import lombok.Data;
/**
* @author zwl
* @ClassName ItemRespVO
* @description
* @date 2023/9/21 20:57
**/
@Data
public class ItemRespVO {
// 任务名称
private String itemName;
// 任务名称
private Long itemId;
}
package com.hungraim.ltc.pojo.vo.account;
import lombok.Data;
import java.math.BigDecimal;
/**
* @author zwl
* @ClassName ReportRejectReqVO
* @description
* @date 2023/6/1 16:35
**/
@Data
public class ReportRejectReqVO {
private Long accountsDetailId;
private Long accountsId;
/**
* 应拨总费用
*/
private BigDecimal accountsAllCost;
private BigDecimal accountsOverallCost;
private BigDecimal accountsPersonalCost;
private BigDecimal deductionAmount;
private BigDecimal reissueAmount;
private String remarks;
}
...@@ -7,6 +7,7 @@ import org.springframework.format.annotation.DateTimeFormat; ...@@ -7,6 +7,7 @@ import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.util.List;
@Data @Data
public class SrvOrganAccountListResp { public class SrvOrganAccountListResp {
...@@ -97,5 +98,20 @@ public class SrvOrganAccountListResp { ...@@ -97,5 +98,20 @@ public class SrvOrganAccountListResp {
*/ */
private String reviewRemark; private String reviewRemark;
/**
*人次/人天
*/
private String personDay;
/**
*扣费原因
*/
private List<String> deductionReason;
/**
*补费原因
*/
private List<String> reissueReason;
} }
...@@ -43,8 +43,13 @@ public class SrvOrganListReq extends BaseReq { ...@@ -43,8 +43,13 @@ public class SrvOrganListReq extends BaseReq {
private String realName; private String realName;
private String certiCode;
private List<String> accountsStatusList; private List<String> accountsStatusList;
// 是否展示异地 1 不展示 // 是否展示异地 1 不展示
private String flag; private String flag;
// 检索条件
private String status;
} }
package com.hungraim.ltc.pojo.vo.account;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach;
import lombok.Data;
import java.util.List;
/**
* @author zwl
* @ClassName SrvTaskCardRespDTO
* @description
* @date 2023/8/3 14:03
**/
@Data
public class SrvTaskCardRespDTO {
// 失能人员姓名
private String realName;
// 护理机构
private String srvOrganName;
// 护理人员
private String empName;
private String empId;
private String modeId;
private String disabInfoId;
private String srvOrganId;
private Long srvTaskId;
// 任务时间
private String srvDate;
// 任务名称
private String itemName;
private List<ItemRespVO> itemsList;
private Long status;
// 服务方式
private String srvModeName;
private String auditor;
private String reason;
private String auditRemark;
private Long taskDetailId;
private List<ChFndAttach> fileDataList;
}
...@@ -12,6 +12,8 @@ public class SrvTaskReqVO extends BaseReq { ...@@ -12,6 +12,8 @@ public class SrvTaskReqVO extends BaseReq {
//失能人员姓名 //失能人员姓名
private String realName; private String realName;
private String taskDetailId;
// 任务时间 // 任务时间
private String srvDate; private String srvDate;
...@@ -20,4 +22,6 @@ public class SrvTaskReqVO extends BaseReq { ...@@ -20,4 +22,6 @@ public class SrvTaskReqVO extends BaseReq {
private String srvOrganName; private String srvOrganName;
private Long srvOrganId; private Long srvOrganId;
private Integer userId;
} }
...@@ -18,6 +18,13 @@ public class SrvTaskRespVO { ...@@ -18,6 +18,13 @@ public class SrvTaskRespVO {
// 护理机构 // 护理机构
private String srvOrganName; private String srvOrganName;
private String modeId;
private String srvTaskId;
// 护理人员 // 护理人员
private String empName; private String empName;
...@@ -44,4 +51,13 @@ public class SrvTaskRespVO { ...@@ -44,4 +51,13 @@ public class SrvTaskRespVO {
private String medicalArea; private String medicalArea;
private String auditor;
private String reason;
private String auditRemark;
private boolean auditFlag;
} }
\ No newline at end of file
...@@ -51,4 +51,6 @@ public class ChSrvTaskDetailVo extends BaseReq { ...@@ -51,4 +51,6 @@ public class ChSrvTaskDetailVo extends BaseReq {
*/ */
private String modeName; private String modeName;
private String hospitalFlag;
} }
package com.hungraim.ltc.pojo.vo.governance;
import lombok.Data;
/**
* @author zwl
* @ClassName AuditingCardVO
* @description
* @date 2023/8/2 14:23
**/
@Data
public class AuditingCardVO {
private Long taskDetailId;
private String auditor;
private String auditRemark;
private short status;
}
...@@ -3,6 +3,7 @@ package com.hungraim.ltc.pojo.vo.governance; ...@@ -3,6 +3,7 @@ package com.hungraim.ltc.pojo.vo.governance;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.List;
@Data @Data
public class ProgramSetAndProjectVo { public class ProgramSetAndProjectVo {
...@@ -72,4 +73,9 @@ public class ProgramSetAndProjectVo { ...@@ -72,4 +73,9 @@ public class ProgramSetAndProjectVo {
*/ */
private Short planningFrequencyType = 1; private Short planningFrequencyType = 1;
private String itemWeek;
private List<String> itemWeeks;
} }
package com.hungraim.ltc.pojo.vo.governance; package com.hungraim.ltc.pojo.vo.governance;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach;
import lombok.Data; import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* @author zwl * @author zwl
...@@ -47,4 +50,10 @@ public class SrvPlanInputVO { ...@@ -47,4 +50,10 @@ public class SrvPlanInputVO {
private Long srvTaskId; private Long srvTaskId;
private Long taskDetailId;
@TableField(exist = false)
private List<ChFndAttach> fileDataList;
} }
...@@ -24,4 +24,6 @@ public class SrvTaskInfoListVO implements Serializable { ...@@ -24,4 +24,6 @@ public class SrvTaskInfoListVO implements Serializable {
* SrvTaskInfoVOs * SrvTaskInfoVOs
*/ */
private List<SrvTaskInfoVO> taskList; private List<SrvTaskInfoVO> taskList;
private Integer userId;
} }
\ No newline at end of file
...@@ -6,6 +6,8 @@ import cn.hutool.core.util.StrUtil; ...@@ -6,6 +6,8 @@ import cn.hutool.core.util.StrUtil;
import java.text.ParseException; import java.text.ParseException;
import java.text.ParsePosition; import java.text.ParsePosition;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.YearMonth;
import java.util.Calendar; import java.util.Calendar;
import java.util.Date; import java.util.Date;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
...@@ -156,6 +158,20 @@ public class DateUtils { ...@@ -156,6 +158,20 @@ public class DateUtils {
return strtodate; return strtodate;
} }
public static int getDays(){
LocalDate date = LocalDate.now();
// 获取当前年份和月份
YearMonth yearMonth = YearMonth.from(date);
// 获取当前月份的天数
int days = yearMonth.lengthOfMonth();
return days;
}
/** /**
* 将短时间格式字符串转换为时间 yyyyMMdd * 将短时间格式字符串转换为时间 yyyyMMdd
* *
...@@ -964,6 +980,14 @@ public class DateUtils { ...@@ -964,6 +980,14 @@ public class DateUtils {
return day.equals(nowDay); return day.equals(nowDay);
} }
public static int getDaysOfMonth(Date date) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
return calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
}
public static void main(String[] args) {
System.out.println(getDaysOfMonth(new Date()));
}
} }
...@@ -2,11 +2,14 @@ package com.hungraim.ltc.util; ...@@ -2,11 +2,14 @@ package com.hungraim.ltc.util;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.util.IOUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.File; import java.io.*;
import java.io.IOException;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
...@@ -80,4 +83,97 @@ public class FileUtils { ...@@ -80,4 +83,97 @@ public class FileUtils {
} }
} }
public static void downloadPathFile(String path,String fileName, HttpServletRequest request, HttpServletResponse response) {
//设置文件路径
File file = new File(path);
//判断文件是否存在
if (file.exists()) {
FileInputStream fis = null;
OutputStream os = null;
try {
// 取得输出流
os = response.getOutputStream();
// 清空输出流
response.reset();
//response.setContentType("application/force-download");// 设置强制下载不打开
response.setCharacterEncoding("UTF-8");
response.setHeader("content-Type", "application/vnd.ms-excel");
response.setHeader("Content-Disposition","attachment;filename=" + URLEncoder.encode(fileName,"UTF-8"));
fis = new FileInputStream(file);
IOUtils.copy(fis, os);
response.getOutputStream().flush();
/* bis = new BufferedInputStream(fis);
OutputStream os = response.getOutputStream();
int i = bis.read(buffer);
while (i != -1) {
os.write(buffer, 0, i);
i = bis.read(buffer);
}*/
log.info("=========下载成功:{}",fileName);
} catch (Exception e) {
log.error("=====error1:{}",e);
} finally {
try {
if (fis != null) {
fis.close();
}
} catch (IOException e) {
// logger.error(ExceptionUtils.getFullStackTrace(e));
}
try {
if (os != null) {
os.close();
}
} catch (IOException e) {
//logger.error(ExceptionUtils.getFullStackTrace(e));
}
}
}
}
/**
* 文件下载
*
* @param fileName
* @return
* @author 小辰哥哥
*/
public static byte[] downloadFile(String path,String fileName, HttpServletResponse response) {
// 关联文件
File file = new File(path);
byte[] fileBytes = null;
FileInputStream fileInputStream = null;
ByteArrayOutputStream bos = null;
//设置响应头类型,这里可以根据文件类型设置,text/plain、application/vnd.ms-excel等
response.setHeader("content-type", "text/plain;charset=UTF-8");
response.setContentType("application/octet-stream;charset=UTF-8");
//如果不设置响应头大小,可能报错:“Excel 已完成文件级验证和修复。此工作簿的某些部分可能已被修复或丢弃”
response.addHeader("Content-Length", String.valueOf(file.length()));
try {
response.setHeader("Content-Disposition","attachment;filename=" + URLEncoder.encode(fileName,"UTF-8"));
fileInputStream = new FileInputStream(file);
bos = new ByteArrayOutputStream();
byte[] bytes = new byte[1024];
int len ;
while ((len = fileInputStream.read(bytes)) != -1) {
bos.write(bytes, 0, len);
}
fileBytes = bos.toByteArray();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
fileInputStream.close();
bos.close();
} catch (IOException e) {
e.printStackTrace();
}
}
return fileBytes;
}
} }
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
<dependency> <dependency>
<groupId>org.springframework.cloud</groupId> <groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-gateway</artifactId> <artifactId>spring-cloud-starter-gateway</artifactId>
<version>2.2.6.RELEASE</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
......
...@@ -52,7 +52,7 @@ public class ResourceServerConfig { ...@@ -52,7 +52,7 @@ public class ResourceServerConfig {
.jwtAuthenticationConverter(jwtAuthenticationConverter()); .jwtAuthenticationConverter(jwtAuthenticationConverter());
http.authorizeExchange() http.authorizeExchange()
.pathMatchers("/api/oauth/token","/api.system/role/getRoleResource", .pathMatchers("/api/oauth/token","/api.system/role/getRoleResource",
"/api.system/resource/getManinMenu","/oauth/*","/api/oauth/genKeyPair","/api.system/user/updatePassword").permitAll() "/api.system/resource/getManinMenu","/oauth/*","/api/oauth/genKeyPair","/api.system/user/updatePassword","/api.governance/nursing/*").permitAll()
.anyExchange().access(authorizationManager) .anyExchange().access(authorizationManager)
.and() .and()
.exceptionHandling() .exceptionHandling()
......
package com.hungraim.ltc.governance.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
@Data
@ConfigurationProperties(prefix = "pic.view")
public class PicRoleConfig {
private List<String> roleId;
}
...@@ -13,6 +13,7 @@ import com.hungraim.ltc.governance.service.*; ...@@ -13,6 +13,7 @@ import com.hungraim.ltc.governance.service.*;
import com.hungraim.ltc.pojo.entity.account.ChPunchDetailsVO; import com.hungraim.ltc.pojo.entity.account.ChPunchDetailsVO;
import com.hungraim.ltc.pojo.entity.disable.ChDisableInfo; import com.hungraim.ltc.pojo.entity.disable.ChDisableInfo;
import com.hungraim.ltc.pojo.entity.disable.ChSrvOrgan; import com.hungraim.ltc.pojo.entity.disable.ChSrvOrgan;
import com.hungraim.ltc.pojo.entity.disable.SrvTypeData;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvProgram; import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvProgram;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvSend; import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvSend;
import com.hungraim.ltc.pojo.vo.disable.ChSrvTaskDetailVo; import com.hungraim.ltc.pojo.vo.disable.ChSrvTaskDetailVo;
...@@ -21,6 +22,7 @@ import com.hungraim.ltc.pojo.vo.disable.SearchDisableSimpleVo; ...@@ -21,6 +22,7 @@ import com.hungraim.ltc.pojo.vo.disable.SearchDisableSimpleVo;
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;
import com.hungraim.ltc.util.TokenParsingUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import oracle.sql.DATE; import oracle.sql.DATE;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
...@@ -30,10 +32,7 @@ import org.springframework.web.bind.annotation.*; ...@@ -30,10 +32,7 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.text.ParseException; import java.text.ParseException;
import java.util.Date; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/** /**
* @author jiaguokai * @author jiaguokai
...@@ -217,6 +216,29 @@ public class BuildBedController { ...@@ -217,6 +216,29 @@ public class BuildBedController {
// 总记录数 // 总记录数
long total = page.getTotal(); long total = page.getTotal();
List<ChSrvOrgan> records = page.getRecords(); List<ChSrvOrgan> records = page.getRecords();
for (ChSrvOrgan record : records) {
List<SrvTypeData> srvTypeDataList = new ArrayList<>();
String srvType = record.getSrvType();
List<String> list = Arrays.asList(srvType.split(","));
for (String value : list) {
SrvTypeData srvTypeData = new SrvTypeData();
String lable = "";
if(value.equals("1")){
lable = "医疗";
}else if(value.equals("2")){
lable = "养老";
}else if(value.equals("3")){
lable = "上门";
}else {
continue;
}
srvTypeData.setLabel(lable);
srvTypeData.setValue(value);
srvTypeDataList.add(srvTypeData);
}
record.setSrvTypeData(srvTypeDataList);
}
Map map = new HashMap<>(); Map map = new HashMap<>();
map.put("total", total); map.put("total", total);
map.put("recors", records); map.put("recors", records);
...@@ -366,8 +388,12 @@ public class BuildBedController { ...@@ -366,8 +388,12 @@ public class BuildBedController {
* @return * @return
*/ */
@GetMapping("/chSrvTaskDetailQuery") @GetMapping("/chSrvTaskDetailQuery")
public Result chSrvTaskDetailQuery(ChSrvTaskDetailVo vo) throws ParseException { public Result chSrvTaskDetailQuery(@RequestHeader("Authorization") String token,ChSrvTaskDetailVo vo) throws ParseException {
Page<ChSrvTaskDetailVo> page = new Page<>(vo.getPageNum(), vo.getPageSize()); Page<ChSrvTaskDetailVo> page = new Page<>(vo.getPageNum(), vo.getPageSize());
Integer srvOrganId = TokenParsingUtil.TokenParsing(token, "srvOrganId");
if(srvOrganId != null) {
vo.setSrvOrganId(String.valueOf(srvOrganId));
}
page = buildBedService.chSrvTaskDetailQuery(page,vo); page = buildBedService.chSrvTaskDetailQuery(page,vo);
if(page.getSize()>0){ if(page.getSize()>0){
return Result.success(page); return Result.success(page);
...@@ -382,8 +408,9 @@ public class BuildBedController { ...@@ -382,8 +408,9 @@ public class BuildBedController {
* @return * @return
*/ */
@GetMapping("/chPunchDetailsQuery") @GetMapping("/chPunchDetailsQuery")
public Result chPunchDetailsQuery(Long taskDetailId,String certiCode,String sevStarTime,String sevEndTime){ public Result chPunchDetailsQuery(@RequestHeader("Authorization") String token,Long taskDetailId,String certiCode,String sevStarTime,String sevEndTime){
ChPunchDetailsVO chPunchDetailsVO = buildBedService.chPunchDetailsQuery(taskDetailId,certiCode,sevStarTime,sevEndTime); Integer userId = TokenParsingUtil.TokenParsing(token, "userId");
ChPunchDetailsVO chPunchDetailsVO = buildBedService.chPunchDetailsQuery(taskDetailId,certiCode,sevStarTime,sevEndTime,userId);
return Result.success(chPunchDetailsVO); return Result.success(chPunchDetailsVO);
} }
......
...@@ -2,6 +2,7 @@ package com.hungraim.ltc.governance.controller; ...@@ -2,6 +2,7 @@ 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.entity.SysConfig.ChFndAttach;
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;
...@@ -14,6 +15,7 @@ import org.springframework.web.bind.annotation.*; ...@@ -14,6 +15,7 @@ import org.springframework.web.bind.annotation.*;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
/** /**
* 服务计划Controller * 服务计划Controller
...@@ -112,12 +114,14 @@ public class SrvTaskController { ...@@ -112,12 +114,14 @@ public class SrvTaskController {
* 新增或者修改服务计划 * 新增或者修改服务计划
*/ */
@PostMapping("/addOrUpdateSrvTask") @PostMapping("/addOrUpdateSrvTask")
public Result<List<SrvTaskInfoVO>> addSrvTask(SrvTaskInfoListVO param) { public Result<List<SrvTaskInfoVO>> addSrvTask(@RequestHeader("Authorization") String token,SrvTaskInfoListVO param) {
String programId = param.getProgramId(); String programId = param.getProgramId();
List<SrvTaskInfoVO> taskList = param.getTaskList(); List<SrvTaskInfoVO> taskList = param.getTaskList();
if (StringUtils.isBlank(programId) || taskList == null || taskList.size() <= 0) { if (StringUtils.isBlank(programId) || taskList == null || taskList.size() <= 0) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR); return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
} }
Integer userId = TokenParsingUtil.TokenParsing(token, "userId");
param.setUserId(userId);
try { try {
for (int i = 0; i < taskList.size(); i++) { for (int i = 0; i < taskList.size(); i++) {
SrvTaskInfoVO srvTaskInfoVO = taskList.get(i); SrvTaskInfoVO srvTaskInfoVO = taskList.get(i);
...@@ -164,12 +168,48 @@ public class SrvTaskController { ...@@ -164,12 +168,48 @@ public class SrvTaskController {
if (srvPlanInputVO.getDisabInfoId() == null) { if (srvPlanInputVO.getDisabInfoId() == null) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR); return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
} }
List<ChFndAttach> fileDataList = srvPlanInputVO.getFileDataList();
if(fileDataList.size() < 2 ){
return Result.failed("护理记录单复印件、医疗养老上门补单申请表至少各一张");
}
List<String> collect1 = fileDataList.stream().map(ChFndAttach::getFileName)
.distinct().collect(Collectors.toList());
boolean ss = (collect1.size()!=fileDataList.size())? true: false;
if(ss){
return Result.failed("上传的附件不可重复");
}
Integer userId = TokenParsingUtil.TokenParsing(token, "userId"); Integer userId = TokenParsingUtil.TokenParsing(token, "userId");
srvPlanInputVO.setAdmin(String.valueOf(userId)); srvPlanInputVO.setAdmin(String.valueOf(userId));
return srvTaskService.saveApplyCard(srvPlanInputVO); return srvTaskService.saveApplyCard(srvPlanInputVO);
} }
@PostMapping("/updateApplyCard")
public Result updateApplyCard(@RequestHeader("Authorization") String token,SrvPlanInputVO srvPlanInputVO){
if (srvPlanInputVO.getDisabInfoId() == null) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
List<ChFndAttach> fileDataList = srvPlanInputVO.getFileDataList();
if(fileDataList.size() < 2 ){
return Result.failed("护理记录单复印件、医疗养老上门补单申请表至少各一张");
}
List<String> collect1 = fileDataList.stream().map(ChFndAttach::getFileName)
.distinct().collect(Collectors.toList());
boolean ss = (collect1.size()!=fileDataList.size())? true: false;
if(ss){
return Result.failed("上传的附件不可重复");
}
Integer userId = TokenParsingUtil.TokenParsing(token, "userId");
srvPlanInputVO.setAdmin(String.valueOf(userId));
return srvTaskService.updateApplyCard(srvPlanInputVO);
}
@PostMapping("/auditingCard")
public Result auditingCard(AuditingCardVO auditingCardVO){
return srvTaskService.auditingCard(auditingCardVO);
}
/** /**
* 根据护理机构查询项目 * 根据护理机构查询项目
**/ **/
......
...@@ -45,4 +45,8 @@ public interface BuildBedMapper extends BaseMapper<ChSrvBuildBed> { ...@@ -45,4 +45,8 @@ public interface BuildBedMapper extends BaseMapper<ChSrvBuildBed> {
List<ChServiceTypeVO> selectServiceTypeDetailed(); List<ChServiceTypeVO> selectServiceTypeDetailed();
String selectModeTypeById(@Param("pId")Long pId); String selectModeTypeById(@Param("pId")Long pId);
int getRoleByUserId(@Param("userId") Integer userId,@Param("roleIds") List<String> roleIds );
} }
...@@ -53,5 +53,5 @@ public interface IBuildBedService extends IService<ChSrvBuildBed> { ...@@ -53,5 +53,5 @@ public interface IBuildBedService extends IService<ChSrvBuildBed> {
* 打卡详情 * 打卡详情
* @param taskDetailId * @param taskDetailId
*/ */
ChPunchDetailsVO chPunchDetailsQuery(Long taskDetailId,String certiCode,String sevStarTime,String sevEndTime); ChPunchDetailsVO chPunchDetailsQuery(Long taskDetailId,String certiCode,String sevStarTime,String sevEndTime,Integer userId);
} }
...@@ -41,5 +41,9 @@ public interface SrvTaskService { ...@@ -41,5 +41,9 @@ public interface SrvTaskService {
// 补卡 // 补卡
Result saveApplyCard(SrvPlanInputVO srvPlanInputVO); Result saveApplyCard(SrvPlanInputVO srvPlanInputVO);
Result updateApplyCard(SrvPlanInputVO srvPlanInputVO);
Result auditingCard(AuditingCardVO auditingCardVO);
Result queryItemBySrvOrganId(Long srvOrganId); Result queryItemBySrvOrganId(Long srvOrganId);
} }
...@@ -3,6 +3,7 @@ package com.hungraim.ltc.governance.service.impl; ...@@ -3,6 +3,7 @@ package com.hungraim.ltc.governance.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hungraim.ltc.api.AttachFeignService; import com.hungraim.ltc.api.AttachFeignService;
import com.hungraim.ltc.governance.config.PicRoleConfig;
import com.hungraim.ltc.governance.dao.BuildBedMapper; import com.hungraim.ltc.governance.dao.BuildBedMapper;
import com.hungraim.ltc.governance.dao.ServiceTypeDetailedMapper; import com.hungraim.ltc.governance.dao.ServiceTypeDetailedMapper;
import com.hungraim.ltc.governance.service.IBuildBedService; import com.hungraim.ltc.governance.service.IBuildBedService;
...@@ -24,6 +25,7 @@ import com.hungraim.ltc.util.ResultCode; ...@@ -24,6 +25,7 @@ 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.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -44,6 +46,9 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB ...@@ -44,6 +46,9 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB
private final ServiceTypeDetailedMapper serviceTypeDetailed; private final ServiceTypeDetailedMapper serviceTypeDetailed;
@Autowired
private PicRoleConfig picRoleConfig;
@Override @Override
...@@ -94,6 +99,7 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB ...@@ -94,6 +99,7 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB
*/ */
@Override @Override
public Page<ChSrvTaskDetailVo> chSrvTaskDetailQuery(Page<ChSrvTaskDetailVo> page,ChSrvTaskDetailVo vo){ public Page<ChSrvTaskDetailVo> chSrvTaskDetailQuery(Page<ChSrvTaskDetailVo> page,ChSrvTaskDetailVo vo){
Page<ChSrvTaskDetailVo> chSrvTaskDetailVoPage = buildBedMapper.chSrvTaskDetailQuery(page, vo); Page<ChSrvTaskDetailVo> chSrvTaskDetailVoPage = buildBedMapper.chSrvTaskDetailQuery(page, vo);
chSrvTaskDetailVoPage.getRecords().stream().filter(chSrvTaskDetail -> { chSrvTaskDetailVoPage.getRecords().stream().filter(chSrvTaskDetail -> {
if (null != chSrvTaskDetail.getSevStarTime()){ if (null != chSrvTaskDetail.getSevStarTime()){
...@@ -122,7 +128,7 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB ...@@ -122,7 +128,7 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB
* @param taskDetailId * @param taskDetailId
*/ */
@Override @Override
public ChPunchDetailsVO chPunchDetailsQuery(Long taskDetailId,String certiCode, String sevStarTime,String sevEndTime) { public ChPunchDetailsVO chPunchDetailsQuery(Long taskDetailId,String certiCode, String sevStarTime,String sevEndTime,Integer userId) {
List<ChPunchDetailVO> chPunchDetailVOS = new ArrayList<>(); List<ChPunchDetailVO> chPunchDetailVOS = new ArrayList<>();
//获取项目信息 //获取项目信息
List<ChServiceTypeVO> chServiceTypeDetaileds = buildBedMapper.selectServiceTypeDetailed(); List<ChServiceTypeVO> chServiceTypeDetaileds = buildBedMapper.selectServiceTypeDetailed();
...@@ -146,6 +152,26 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB ...@@ -146,6 +152,26 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB
//打卡详情 //打卡详情
String modeType = buildBedMapper.selectModeTypeById(taskDetailId); String modeType = buildBedMapper.selectModeTypeById(taskDetailId);
List<ChServiceTypeDetailedVO> serviceTypeDetailed1s = buildBedMapper.getServiceTypeDetailed(taskDetailId,certiCode,sevStarTime, sevEndTime,modeType); List<ChServiceTypeDetailedVO> serviceTypeDetailed1s = buildBedMapper.getServiceTypeDetailed(taskDetailId,certiCode,sevStarTime, sevEndTime,modeType);
List<String> roleIds = picRoleConfig.getRoleId();
log.info("==========chPunchDetailsQuery====roleIds:{}",roleIds);
int roleByUserId = buildBedMapper.getRoleByUserId(userId,roleIds);
for (ChServiceTypeDetailedVO serviceTypeDetailed1 : serviceTypeDetailed1s) {
String srvStartPic = serviceTypeDetailed1.getSrvStartPic();
String srvStartPic2 = serviceTypeDetailed1.getSrvStartPic2();
String srvEndPic = serviceTypeDetailed1.getSrvEndPic();
List<String> srvPicList = new ArrayList<>();
if(srvStartPic!=null) {
srvPicList.add(srvStartPic);
}
// 机构端能护理人员的拍照和第三张拍照,其他都能看到 等于0角色不是机构端
if(roleByUserId == 0 && srvStartPic2!=null) {
srvPicList.add(srvStartPic2);
}
if(srvEndPic!=null) {
srvPicList.add(srvEndPic);
}
serviceTypeDetailed1.setSrvPicList(srvPicList);
}
log.info("chPunchDetailsQuery打卡详情:"+serviceTypeDetailed1s); log.info("chPunchDetailsQuery打卡详情:"+serviceTypeDetailed1s);
chPunchDetailsVO.setRecordData(chPunchDetailVOS); chPunchDetailsVO.setRecordData(chPunchDetailVOS);
chPunchDetailsVO.setChPunchDetailVOS(serviceTypeDetailed1s); chPunchDetailsVO.setChPunchDetailVOS(serviceTypeDetailed1s);
......
...@@ -22,10 +22,14 @@ import com.hungraim.ltc.util.Result; ...@@ -22,10 +22,14 @@ import com.hungraim.ltc.util.Result;
import com.hungraim.ltc.util.ResultCode; import com.hungraim.ltc.util.ResultCode;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import oracle.sql.DATE; import oracle.sql.DATE;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -78,6 +82,19 @@ public class SrvProgramServiceImpl implements SrvProgramService { ...@@ -78,6 +82,19 @@ public class SrvProgramServiceImpl implements SrvProgramService {
List<ChFndAttach> data = listResult.getData(); List<ChFndAttach> data = listResult.getData();
programDetail.setFileDataList(data); programDetail.setFileDataList(data);
} }
List<ProgramSetAndProjectVo> programSetAndProjectVos = programDetail.getProgramSetAndProjectVos();
for (ProgramSetAndProjectVo programSetAndProjectVo : programSetAndProjectVos) {
String itemWeek = programSetAndProjectVo.getItemWeek();
if (StringUtils.isNotEmpty(itemWeek)) {
List<String> itemWeeks = new ArrayList<>();
List<String> list = Arrays.asList(itemWeek.split(","));
for (String s : list) {
itemWeeks.add(s);
}
programSetAndProjectVo.setItemWeeks(itemWeeks);
}
}
return programDetail; return programDetail;
} }
...@@ -134,6 +151,11 @@ public class SrvProgramServiceImpl implements SrvProgramService { ...@@ -134,6 +151,11 @@ public class SrvProgramServiceImpl implements SrvProgramService {
chSrvProgramSet.setPlanningFrequency(programSetAndProjectVo.getPlanningFrequency()); chSrvProgramSet.setPlanningFrequency(programSetAndProjectVo.getPlanningFrequency());
chSrvProgramSet.setPlanningFrequencyType(programSetAndProjectVo.getPlanningFrequencyType()); chSrvProgramSet.setPlanningFrequencyType(programSetAndProjectVo.getPlanningFrequencyType());
chSrvProgramSet.setRemark(programSetAndProjectVo.getRemark()); chSrvProgramSet.setRemark(programSetAndProjectVo.getRemark());
List<String> itemWeeks = programSetAndProjectVo.getItemWeeks();
if (CollectionUtils.isNotEmpty(itemWeeks)) {
String itemWeek = StringUtils.join(itemWeeks,",");
chSrvProgramSet.setItemWeek(itemWeek);
}
chSrvProgramSetMapper.updateById(chSrvProgramSet); chSrvProgramSetMapper.updateById(chSrvProgramSet);
} else { } else {
if (isConf.intValue() == 0) { if (isConf.intValue() == 0) {
...@@ -197,6 +219,11 @@ public class SrvProgramServiceImpl implements SrvProgramService { ...@@ -197,6 +219,11 @@ public class SrvProgramServiceImpl implements SrvProgramService {
chSrvProgramSet.setPlanningFrequency(programSetAndProjectVo.getPlanningFrequency()); chSrvProgramSet.setPlanningFrequency(programSetAndProjectVo.getPlanningFrequency());
chSrvProgramSet.setPlanningFrequencyType(programSetAndProjectVo.getPlanningFrequencyType()); chSrvProgramSet.setPlanningFrequencyType(programSetAndProjectVo.getPlanningFrequencyType());
chSrvProgramSet.setRemark(programSetAndProjectVo.getRemark()); chSrvProgramSet.setRemark(programSetAndProjectVo.getRemark());
List<String> itemWeeks = programSetAndProjectVo.getItemWeeks();
if (CollectionUtils.isNotEmpty(itemWeeks)) {
String itemWeek = StringUtils.join(itemWeeks,",");
chSrvProgramSet.setItemWeek(itemWeek);
}
chSrvProgramSetMapper.insert(chSrvProgramSet); chSrvProgramSetMapper.insert(chSrvProgramSet);
} }
......
...@@ -28,15 +28,20 @@ ...@@ -28,15 +28,20 @@
<select id="chSrvTaskDetailQuery" parameterType="com.hungraim.ltc.pojo.vo.disable.ChSrvTaskDetailVo" <select id="chSrvTaskDetailQuery" parameterType="com.hungraim.ltc.pojo.vo.disable.ChSrvTaskDetailVo"
resultType="com.hungraim.ltc.pojo.vo.disable.ChSrvTaskDetailVo"> resultType="com.hungraim.ltc.pojo.vo.disable.ChSrvTaskDetailVo">
select A.* from ( select A.*,(case when A.exitReasonId = 4 and A.hospitalFlag1 = 0 then 0
select row_number()over(partition by info.CERTI_CODE order by program.PROGRAM_ID) rn, when A.exitReasonId = 4 and A.hospitalFlag1 > 0 then 1 else 2 end) hospitalFlag
from ( select row_number()over(partition by info.CERTI_CODE order by program.PROGRAM_ID) rn,
program.PROGRAM_ID taskDetailId, program.PROGRAM_ID taskDetailId,
mode1.MODE_NAME modeName, mode1.MODE_NAME modeName,
organ.SRV_ORGAN_NAME srvOrganName,--护理机构名称 organ.SRV_ORGAN_NAME srvOrganName,--护理机构名称
info.REAL_NAME realName,--失能人员名字 info.REAL_NAME realName,--失能人员名字
info.CERTI_CODE certiCode,--失能人员身份证件号码 info.CERTI_CODE certiCode,--失能人员身份证件号码
program.PROGRAM_DATE sevStarTime,--服务开始时间 program.PROGRAM_DATE sevStarTime,--服务开始时间
program.PROGRAM_EDN_DATE sevEndTime--服务结束时间 program.PROGRAM_EDN_DATE sevEndTime,--服务结束时间
(select count(*) from CH_SRV_SEND t where t.DISAB_INFO_ID = info.DISAB_INFO_ID and
t.STATUS = 1) hospitalFlag1,
info.exit_reason_id exitReasonId,
info.DISAB_INFO_ID disabInfoId
from ch_srv_program program from ch_srv_program program
LEFT JOIN ch_cfg_srv_mode mode1 ON program.srv_mode_id = mode1.mode_id --服务方式 LEFT JOIN ch_cfg_srv_mode mode1 ON program.srv_mode_id = mode1.mode_id --服务方式
LEFT JOIN ch_srv_organ organ ON program.srv_organ_id = organ.srv_organ_id --服务机构 LEFT JOIN ch_srv_organ organ ON program.srv_organ_id = organ.srv_organ_id --服务机构
...@@ -46,6 +51,10 @@ ...@@ -46,6 +51,10 @@
<if test="vo.srvOrganName != null and vo.srvOrganName != ''"> <if test="vo.srvOrganName != null and vo.srvOrganName != ''">
AND organ.SRV_ORGAN_NAME LIKE '%' || #{vo.srvOrganName} || '%' AND organ.SRV_ORGAN_NAME LIKE '%' || #{vo.srvOrganName} || '%'
</if> </if>
<if test="vo.srvOrganId != null and vo.srvOrganId != '' and vo.srvOrganId!=0">
and organ.SRV_ORGAN_ID = #{vo.srvOrganId}
</if>
<if test="vo.modeName != null and vo.modeName != ''"> <if test="vo.modeName != null and vo.modeName != ''">
AND mode1.MODE_NAME = #{vo.modeName} AND mode1.MODE_NAME = #{vo.modeName}
</if> </if>
...@@ -55,6 +64,7 @@ ...@@ -55,6 +64,7 @@
<if test="vo.certiCode != null and vo.certiCode != ''"> <if test="vo.certiCode != null and vo.certiCode != ''">
AND info.CERTI_CODE =#{vo.certiCode} AND info.CERTI_CODE =#{vo.certiCode}
</if> </if>
<if test="vo.sevStarTime != null and vo.sevStarTime != ''"> <if test="vo.sevStarTime != null and vo.sevStarTime != ''">
AND program.PROGRAM_DATE &gt;= TO_DATE (#{vo.sevStarTime}, 'yyyy-mm-dd') AND program.PROGRAM_DATE &gt;= TO_DATE (#{vo.sevStarTime}, 'yyyy-mm-dd')
</if> </if>
...@@ -63,7 +73,13 @@ ...@@ -63,7 +73,13 @@
</if> </if>
)A )A
where A.rn =1 where A.rn =1
<if test="vo.hospitalFlag != null and vo.hospitalFlag != ''">
AND (case when A.exitReasonId = 4 and A.hospitalFlag1 = 0 then 0
when A.exitReasonId = 4 and A.hospitalFlag1 > 0 then 1 else 2 end) = #{vo.hospitalFlag}
</if>
</select> </select>
<select id="getsrvOrgan" resultType="com.hungraim.ltc.pojo.entity.account.ChPunchDetailsVO"> <select id="getsrvOrgan" resultType="com.hungraim.ltc.pojo.entity.account.ChPunchDetailsVO">
SELECT SELECT
n.SRV_ORGAN_NAME srvOrganName, n.SRV_ORGAN_NAME srvOrganName,
...@@ -85,10 +101,13 @@ ...@@ -85,10 +101,13 @@
<select id="getServiceTypeDetailed" parameterType="Long" resultType="com.hungraim.ltc.pojo.entity.account.ChServiceTypeDetailedVO"> <select id="getServiceTypeDetailed" parameterType="Long" resultType="com.hungraim.ltc.pojo.entity.account.ChServiceTypeDetailedVO">
SELECT SELECT
case when mode1.MODE_NAME='上门' then to_char(detail.SRV_START_TIME, 'dd' ) case when mode1.MODE_NAME='上门' then to_char(detail.SRV_DATE, 'dd' )
else to_char(item.FCD, 'dd' ) end executionTime, else to_char(detail.SRV_DATE, 'dd' ) end executionTime,
service.SERVICE_TYPE_DETAILED_NAME itemName, service.SERVICE_TYPE_DETAILED_NAME itemName,
service.SERVICE_TYPE_DETAILED_ID serviceTypeDetailedId service.SERVICE_TYPE_DETAILED_ID serviceTypeDetailedId,
detail.SRV_START_PIC srvStartPic,
detail.SRV_START_PIC2 srvStartPic2,
detail.SRV_END_PIC srvEndPic
FROM FROM
CH_SRV_TASK_DETAIL detail CH_SRV_TASK_DETAIL detail
inner JOIN ch_srv_task task ON task.srv_task_id = detail.srv_task_id inner JOIN ch_srv_task task ON task.srv_task_id = detail.srv_task_id
...@@ -106,12 +125,20 @@ ...@@ -106,12 +125,20 @@
<if test="sevStarTime != null and sevStarTime != ''"> <if test="sevStarTime != null and sevStarTime != ''">
AND detail.SRV_START_TIME &gt;= TO_DATE (substr(#{sevStarTime},1,10), 'yyyy-mm-dd') AND detail.SRV_START_TIME &gt;= TO_DATE (substr(#{sevStarTime},1,10), 'yyyy-mm-dd')
</if> </if>
<if test="sevEndTime != null and sevEndTime != ''"> <if test="sevEndTime != null and sevEndTime != ''">
AND detail.SRV_END_TIME &lt;= TO_DATE (substr(#{sevEndTime},1,10), 'yyyy-mm-dd') AND detail.SRV_END_TIME &lt;= TO_DATE (substr(#{sevEndTime},1,10), 'yyyy-mm-dd')
</if> </if>
</when> </when>
<otherwise> <otherwise>
AND item.FCD >= TO_DATE (substr(#{sevStarTime},1,10), 'yyyy-mm-dd')
<if test="sevStarTime != null and sevStarTime != ''">
AND detail.SRV_DATE &gt;= TO_DATE (substr(#{sevStarTime},1,10), 'yyyy-mm-dd')
</if>
<if test="sevEndTime != null and sevEndTime != ''">
AND detail.SRV_DATE &lt;= TO_DATE (substr(#{sevEndTime},1,10), 'yyyy-mm-dd')
</if>
</otherwise> </otherwise>
</choose> </choose>
</select> </select>
...@@ -127,6 +154,15 @@ ...@@ -127,6 +154,15 @@
LEFT JOIN CH_SERVICE_TYPE e ON d.PARA_ID = e.SERVICE_TYPE_ID LEFT JOIN CH_SERVICE_TYPE e ON d.PARA_ID = e.SERVICE_TYPE_ID
</select> </select>
<select id="getRoleByUserId" resultType="java.lang.Integer">
select count(*) from LTC_USER_ROLE r where r.user_id = #{userId}
<if test="roleIds != null">
and r.role_id in
<foreach collection="roleIds" item="roleIds" open="(" close=")" separator=",">
#{roleIds}
</foreach>
</if>
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
<result column="SRV_ORGAN_ID" property="itemTimes"/> <result column="SRV_ORGAN_ID" property="itemTimes"/>
<result column="ITEM_TIMES_TYPE" property="itemTimesType"/> <result column="ITEM_TIMES_TYPE" property="itemTimesType"/>
<result column="ITEM_PRICE" property="itemPrice"/> <result column="ITEM_PRICE" property="itemPrice"/>
<result column="ITEM_WEEK" property="itemWeek"/>
<result column="IS_NEED" property="isNeed"/> <result column="IS_NEED" property="isNeed"/>
<result column="PLANNING_FREQUENCY" property="planningFrequency"/> <result column="PLANNING_FREQUENCY" property="planningFrequency"/>
<result column="PLANNING_FREQUENCY_TYPE" property="planningFrequencyType"/> <result column="PLANNING_FREQUENCY_TYPE" property="planningFrequencyType"/>
...@@ -63,6 +64,7 @@ ...@@ -63,6 +64,7 @@
PLANNING_FREQUENCY, PLANNING_FREQUENCY,
PLANNING_FREQUENCY_TYPE, PLANNING_FREQUENCY_TYPE,
CH_SRV_PROGRAM_SET.REMARK, CH_SRV_PROGRAM_SET.REMARK,
CH_SRV_PROGRAM_SET.ITEM_WEEK,
NVL(CH_SRV_PROGRAM_SET.IS_CONF, '0') IS_CONF NVL(CH_SRV_PROGRAM_SET.IS_CONF, '0') IS_CONF
</if> </if>
FROM CH_SRV_ORGAN_PROJECT FROM CH_SRV_ORGAN_PROJECT
......
...@@ -15,7 +15,9 @@ ...@@ -15,7 +15,9 @@
detail.TASK_DETAIL_ID taskDetailId, detail.TASK_DETAIL_ID taskDetailId,
d.SERVICE_TYPE_DETAILED_NAME itemName, d.SERVICE_TYPE_DETAILED_NAME itemName,
CSTFI.ITEM_ID itemId, CSTFI.ITEM_ID itemId,
'0' isStatus '0' isStatus,
CSTFI.PLANNING_FREQUENCY_TYPE planningFrequencyType,
CSTFI.item_week itemWeek
from ch_srv_task_detail detail --服务计划 from ch_srv_task_detail detail --服务计划
left join ch_srv_task task on task.srv_task_id = detail.srv_task_id--服务计划详情 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_disable_info disable on task.disab_info_id = disable.disab_info_id--失能人员
......
...@@ -12,7 +12,10 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -12,7 +12,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;
import java.util.Objects;
@RestController @RestController
@RequestMapping("/api.system/resource") @RequestMapping("/api.system/resource")
...@@ -88,4 +91,17 @@ public class FileUploadController { ...@@ -88,4 +91,17 @@ public class FileUploadController {
List<ChFndAttach> chFndAttaches = attachService.selectAttachs(ctrlId, attachType); List<ChFndAttach> chFndAttaches = attachService.selectAttachs(ctrlId, attachType);
return Result.success(chFndAttaches); return Result.success(chFndAttaches);
} }
@GetMapping ("/download")
public void download(Long attachId, HttpServletRequest request, HttpServletResponse response) {
ChFndAttach chFndAttach = attachService.selectById(attachId);
if(Objects.nonNull(chFndAttach)){
String filePath = chFndAttach.getFilePath();
String fileName = chFndAttach.getFileName();
FileUtils.downloadPathFile(filePath, fileName,request,response);
}
}
} }
...@@ -35,4 +35,6 @@ public interface AttachService { ...@@ -35,4 +35,6 @@ public interface AttachService {
* @return 返回对应的数据列表 * @return 返回对应的数据列表
*/ */
List<ChFndAttach> selectAttachs(Long ctrlId, Short attachType); List<ChFndAttach> selectAttachs(Long ctrlId, Short attachType);
ChFndAttach selectById(Long attachId);
} }
...@@ -11,6 +11,7 @@ import org.springframework.transaction.annotation.Transactional; ...@@ -11,6 +11,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Objects;
@Service @Service
public class AttachServiceImpl implements AttachService { public class AttachServiceImpl implements AttachService {
...@@ -103,4 +104,11 @@ public class AttachServiceImpl implements AttachService { ...@@ -103,4 +104,11 @@ public class AttachServiceImpl implements AttachService {
public List<ChFndAttach> selectAttachs(Long ctrlId, Short attachType) { public List<ChFndAttach> selectAttachs(Long ctrlId, Short attachType) {
return this.getChFndAttaches(ctrlId, attachType); return this.getChFndAttaches(ctrlId, attachType);
} }
@Override
public ChFndAttach selectById(Long attachId){
ChFndAttach chFndAttach = chFndAttachMapper.selectById(attachId);
return chFndAttach;
}
} }
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