Commit 1cb178e0 authored by 董天德's avatar 董天德

Merge remote-tracking branch 'origin/dev_ch_master' into dev_ch_master

parents 8d79e253 a4b17a75
...@@ -109,8 +109,8 @@ public class AccountController { ...@@ -109,8 +109,8 @@ public class AccountController {
@PostMapping("/organAccountTaskExecute") @PostMapping("/organAccountTaskExecute")
public Result organAccountTaskExecute(AccountTaskReqVO accountTaskReqVO){ public Result organAccountTaskExecute(AccountTaskReqVO accountTaskReqVO){
List<AccountTaskExecuteReqVO> accountTaskExecuteReqVOS = accountTaskReqVO.getAccountTaskList(); List<AccountTaskExecuteReqVO> accountTaskExecuteReqVOS = accountTaskReqVO.getAccountTaskList();
accountService.organAccountTaskExecute(accountTaskExecuteReqVOS); Result result = accountService.organAccountTaskExecute(accountTaskExecuteReqVOS);
return Result.success(); return result;
} }
...@@ -142,6 +142,8 @@ public class AccountController { ...@@ -142,6 +142,8 @@ public class AccountController {
*/ */
@GetMapping("/searchSrvOrganAccountList") @GetMapping("/searchSrvOrganAccountList")
public Result<Page<SrvOrganAccountListResp>> searchSrvOrganAccountList(SrvOrganListReq srvOrganListReq) { public Result<Page<SrvOrganAccountListResp>> searchSrvOrganAccountList(SrvOrganListReq srvOrganListReq) {
List<String> list = Arrays.asList("1");
srvOrganListReq.setAccountsStatusList(list);
return Result.success(accountService.searchSrvOrganAccountList(srvOrganListReq)); return Result.success(accountService.searchSrvOrganAccountList(srvOrganListReq));
} }
...@@ -232,7 +234,7 @@ public class AccountController { ...@@ -232,7 +234,7 @@ public class AccountController {
if (result > 0) { if (result > 0) {
return Result.success(); return Result.success();
} else { } else {
return Result.failed(); return Result.failed("该记录不可操作,请联系管理员");
} }
} }
...@@ -248,7 +250,7 @@ public class AccountController { ...@@ -248,7 +250,7 @@ public class AccountController {
if (result > 0) { if (result > 0) {
return Result.success(); return Result.success();
} else { } else {
return Result.failed(); return Result.failed("该记录已不可申报,请联系管理员");
} }
} }
...@@ -313,7 +315,6 @@ public class AccountController { ...@@ -313,7 +315,6 @@ public class AccountController {
@GetMapping("/queryOverallCostList") @GetMapping("/queryOverallCostList")
public Result<Page<OverallCostListRespVO>> queryOverallCostList(OverallCostReqVO req) { public Result<Page<OverallCostListRespVO>> queryOverallCostList(OverallCostReqVO req) {
// Page<OverallCostListRespVO> overallCostRecords = accountService.queryOverallCostList(req);
Page<OverallCostListRespVO> overallCostRecords = accountService.queryFreeRdInfo(req); Page<OverallCostListRespVO> overallCostRecords = accountService.queryFreeRdInfo(req);
return Result.success(overallCostRecords); return Result.success(overallCostRecords);
} }
......
...@@ -31,11 +31,11 @@ public interface ChDisabAccountsDetailMapper extends BaseMapper<ChDisabDetailAcc ...@@ -31,11 +31,11 @@ public interface ChDisabAccountsDetailMapper extends BaseMapper<ChDisabDetailAcc
OverallEduceDecreaseCostRespVO queryOverallCostRecords(OverallCostReqVO req); OverallEduceDecreaseCostRespVO queryOverallCostRecords(OverallCostReqVO req);
Page<OverallCostListRespVO> queryOverallCostList(Page page, OverallCostReqVO req);
int updateByAccountsId(String accountsId,Integer accountsStatus); int updateByAccountsId(String accountsId,Integer accountsStatus);
} }
\ No newline at end of file
...@@ -17,6 +17,9 @@ public interface ChSrvTaskDetailMapper extends BaseMapper<ChSrvTaskDetail> { ...@@ -17,6 +17,9 @@ public interface ChSrvTaskDetailMapper extends BaseMapper<ChSrvTaskDetail> {
Page<SrvTaskRespVO> getSrvTaskList(Page page,SrvTaskReqVO req); Page<SrvTaskRespVO> getSrvTaskList(Page page,SrvTaskReqVO req);
/**
*@desc 更新任务计划表状态为已完成
**/
Integer updateSrvPlanById(String palnId); Integer updateSrvPlanById(String palnId);
} }
\ No newline at end of file
package com.hungraim.ltc.account.service; 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.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.hungraim.ltc.pojo.entity.account.*; import com.hungraim.ltc.pojo.entity.account.*;
import com.hungraim.ltc.pojo.vo.account.*; import com.hungraim.ltc.pojo.vo.account.*;
import com.hungraim.ltc.util.Result;
import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.ss.usermodel.Workbook;
import java.text.ParseException; import java.text.ParseException;
...@@ -37,7 +39,6 @@ public interface AccountService extends IService<ChDisabAccounts> { ...@@ -37,7 +39,6 @@ public interface AccountService extends IService<ChDisabAccounts> {
OverallEduceDecreaseCostRespVO queryOverallCostRecords(OverallCostReqVO req); OverallEduceDecreaseCostRespVO queryOverallCostRecords(OverallCostReqVO req);
Page<OverallCostListRespVO> queryOverallCostList(OverallCostReqVO req);
Page<OverallCostListRespVO> queryFreeRdInfo(OverallCostReqVO req); Page<OverallCostListRespVO> queryFreeRdInfo(OverallCostReqVO req);
...@@ -46,7 +47,7 @@ public interface AccountService extends IService<ChDisabAccounts> { ...@@ -46,7 +47,7 @@ public interface AccountService extends IService<ChDisabAccounts> {
int updateChDisabAccounts(int id); int updateChDisabAccounts(int id);
void organAccountTaskExecute(List<AccountTaskExecuteReqVO> accountTaskExecuteReqVOS); Result organAccountTaskExecute(List<AccountTaskExecuteReqVO> accountTaskExecuteReqVOS);
void otherPlaceHandler(String programId); void otherPlaceHandler(String programId);
......
...@@ -82,11 +82,15 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis ...@@ -82,11 +82,15 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
} }
//待审核 //待审核
if(accountsStatus == 1) { if(accountsStatus == 1) {
chDisabAccountsDetailMapper.updateByAccountsId(accountsId,1); // chDisabAccountsDetailMapper.updateByAccountsIdReject(accountsId);
} }
// 审核通过 // 审核通过
if(accountsStatus == 2||accountsStatus == 3) { if(accountsStatus == 2) {
chDisabAccountsDetailMapper.updateByAccountsId(accountsId,3); // chDisabAccountsDetailMapper.updateByAccountsIdAuditing(accountsId);
}
// 复核
if(accountsStatus == 3) {
// chDisabAccountsDetailMapper.updateByAccountsIdCheck(accountsId);
} }
// 已结算 // 已结算
if(accountsStatus == 4) { if(accountsStatus == 4) {
...@@ -94,6 +98,7 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis ...@@ -94,6 +98,7 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
chDisabAccountDTO.setTotalAllocatedExpenses(chDisabAccountDTO.getTotalAllocatedExpenses()); chDisabAccountDTO.setTotalAllocatedExpenses(chDisabAccountDTO.getTotalAllocatedExpenses());
chDisabAccountDTO.setChooseSettle((short) 1); // 是否结算(0未结算,1已结算) chDisabAccountDTO.setChooseSettle((short) 1); // 是否结算(0未结算,1已结算)
disabAccountsMapper.updateById(chDisabAccountDTO); disabAccountsMapper.updateById(chDisabAccountDTO);
//chDisabAccountsDetailMapper.updateByAccountsIdAccounts(accountsId);
} }
this.saveOrUpdate(chDisabAccounts); this.saveOrUpdate(chDisabAccounts);
} }
...@@ -478,22 +483,6 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis ...@@ -478,22 +483,6 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
return chDisabAccountsDetailMapper.queryOverallCostRecords(req); return chDisabAccountsDetailMapper.queryOverallCostRecords(req);
} }
@Override
public Page<OverallCostListRespVO> queryOverallCostList(OverallCostReqVO req) {
req.setDealType((null == req.getDealType() || 0 == req.getDealType()) ? null : req.getDealType());
Page<OverallCostListRespVO> overallCostListRespVOPage = chDisabAccountsDetailMapper.queryOverallCostList(new Page<>(req.getPageNum(), req.getPageSize()), req);
List<OverallCostListRespVO> records = overallCostListRespVOPage.getRecords();
for (OverallCostListRespVO record : records) {
int dealType = record.getDealType();
if (dealType == 1) {
record.setAmountOfMoney(record.getReissueAmount());
} else if (dealType == 2) {
record.setAmountOfMoney(record.getDeductionAmount());
}
}
return overallCostListRespVOPage;
}
@Override @Override
public Page<OverallCostListRespVO> queryFreeRdInfo(OverallCostReqVO req) { public Page<OverallCostListRespVO> queryFreeRdInfo(OverallCostReqVO req) {
...@@ -563,11 +552,13 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis ...@@ -563,11 +552,13 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void organAccountTaskExecute(List<AccountTaskExecuteReqVO> accountTaskExecuteReqVOS) { public Result organAccountTaskExecute(List<AccountTaskExecuteReqVO> accountTaskExecuteReqVOS) {
log.info("organAccountTaskExecute.accountTaskExecuteReqVOS:{}",accountTaskExecuteReqVOS);
if (CollectionUtil.isEmpty(accountTaskExecuteReqVOS)) { if (CollectionUtil.isEmpty(accountTaskExecuteReqVOS)) {
return; return Result.failed("参数不能为空");
} }
List<String> taskDetailIds = accountTaskExecuteReqVOS.stream().map(AccountTaskExecuteReqVO::getTaskDetailId).distinct().collect(Collectors.toList()); List<String> taskDetailIds = accountTaskExecuteReqVOS.stream().map(AccountTaskExecuteReqVO::getTaskDetailId).distinct().collect(Collectors.toList());
// 根据任务id查找结算详情,还没有对应的任务数据说明还未发生过结算,进行插入详情表和结算表 // 根据任务id查找结算详情,还没有对应的任务数据说明还未发生过结算,进行插入详情表和结算表
List<ChDisabDetailAccounts> chDisabDetailList = chDisabAccountsDetailMapper.queryAccountByCondition(taskDetailIds); List<ChDisabDetailAccounts> chDisabDetailList = chDisabAccountsDetailMapper.queryAccountByCondition(taskDetailIds);
// 根据任务id分组,一个任务下会有多个项目,任务id相同 // 根据任务id分组,一个任务下会有多个项目,任务id相同
...@@ -579,16 +570,21 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis ...@@ -579,16 +570,21 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
.eq(ChSrvTaskFinishItem::getTaskDetailId, taskDetailId)); .eq(ChSrvTaskFinishItem::getTaskDetailId, taskDetailId));
List<AccountTaskExecuteReqVO> accountTaskList = entry.getValue(); List<AccountTaskExecuteReqVO> accountTaskList = entry.getValue();
// 处理具体的服务项目 // 处理具体的服务项目
try {
for (AccountTaskExecuteReqVO accountTaskExecuteReqVO : accountTaskList) { for (AccountTaskExecuteReqVO accountTaskExecuteReqVO : accountTaskList) {
// 已完成的任务更新ch_srv_plan状态 // 已完成的任务更新ch_srv_plan状态
String planId = accountTaskExecuteReqVO.getPlanId(); String planId = accountTaskExecuteReqVO.getPlanId();
Integer integer = chSrvTaskDetailMapper.updateSrvPlanById(planId); Integer integer = chSrvTaskDetailMapper.updateSrvPlanById(planId);
if(integer == 0){
log.info("更新任务计划表失败");
}
if (CollectionUtil.isNotEmpty(chSrvTaskFinishItems)) { if (CollectionUtil.isNotEmpty(chSrvTaskFinishItems)) {
List<ChSrvTaskFinishItem> chSrvTaskFinishItemStream = chSrvTaskFinishItems.stream() List<ChSrvTaskFinishItem> chSrvTaskFinishItemStream = chSrvTaskFinishItems.stream()
.filter(s -> s.getItemId().equals(Long.valueOf(accountTaskExecuteReqVO.getItemId()))).collect(Collectors.toList()); .filter(s -> s.getItemId().equals(Long.valueOf(accountTaskExecuteReqVO.getItemId()))).collect(Collectors.toList());
// 如果存在就不插入了 // 如果存在就不插入了
if (CollectionUtil.isNotEmpty(chSrvTaskFinishItemStream)) { if (CollectionUtil.isNotEmpty(chSrvTaskFinishItemStream)) {
return; log.info("chSrvTaskFinishItemStream is totEmpty:{}",chSrvTaskFinishItemStream);
return Result.success();
} }
} }
ChSrvTaskFinishItem chSrvTaskFinishItem = new ChSrvTaskFinishItem(); ChSrvTaskFinishItem chSrvTaskFinishItem = new ChSrvTaskFinishItem();
...@@ -600,8 +596,13 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis ...@@ -600,8 +596,13 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
ca.setTaskDetailId(Long.valueOf(accountTaskExecuteReqVO.getTaskDetailId())); ca.setTaskDetailId(Long.valueOf(accountTaskExecuteReqVO.getTaskDetailId()));
chSrvTaskDetailMapper.updateById(ca); chSrvTaskDetailMapper.updateById(ca);
} }
accountSave( taskDetailId, chDisabDetailList); accountSave(taskDetailId, chDisabDetailList);
} catch (Exception e) {
log.info("=====accountSave error:{}",e);
return Result.failed("服务异常");
}
} }
return Result.success();
} }
private void accountSave(String taskDetailId, List<ChDisabDetailAccounts> chDisabDetailList) { private void accountSave(String taskDetailId, List<ChDisabDetailAccounts> chDisabDetailList) {
...@@ -652,6 +653,7 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis ...@@ -652,6 +653,7 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
} }
} }
private ChDisabAccounts getChDisabAccounts(OrganAccountsVO accountsVO, BigDecimal limit, BigDecimal overallCost, BigDecimal personalCost) { private ChDisabAccounts getChDisabAccounts(OrganAccountsVO accountsVO, BigDecimal limit, BigDecimal overallCost, BigDecimal personalCost) {
// 结算表 根据机构和结算时间 服务方式 // 结算表 根据机构和结算时间 服务方式
ChDisabAccounts chDisabAccounts = disabAccountsMapper.queryAccountByCondition(DateUtils.dateToStrYm(DateUtils.strToDate(accountsVO.getSrvDate())), accountsVO.getSrvModeName(), accountsVO.getSrvOrganId(),null); ChDisabAccounts chDisabAccounts = disabAccountsMapper.queryAccountByCondition(DateUtils.dateToStrYm(DateUtils.strToDate(accountsVO.getSrvDate())), accountsVO.getSrvModeName(), accountsVO.getSrvOrganId(),null);
...@@ -743,6 +745,12 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis ...@@ -743,6 +745,12 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
BigDecimal personalCost = chDisabDetailAccountsDTO.getAccountsPersonalCost(); BigDecimal personalCost = chDisabDetailAccountsDTO.getAccountsPersonalCost();
Long accountsId = chDisabDetailAccountsDTO.getAccountsId(); Long accountsId = chDisabDetailAccountsDTO.getAccountsId();
ChDisabAccounts chDisabAccountDTO = disabAccountsMapper.selectById(accountsId); ChDisabAccounts chDisabAccountDTO = disabAccountsMapper.selectById(accountsId);
Short accountsStatus = chDisabAccountDTO.getAccountsStatus();
if(accountsStatus > 1){
log.info("{},已完成审核",accountsDetailId);
return -1;
}
if(chDisabAccountDTO !=null){ if(chDisabAccountDTO !=null){
BigDecimal accountAllCost = chDisabAccountDTO.getAllCost(); BigDecimal accountAllCost = chDisabAccountDTO.getAllCost();
BigDecimal accountOverallCost = chDisabAccountDTO.getOverallCost(); BigDecimal accountOverallCost = chDisabAccountDTO.getOverallCost();
...@@ -756,6 +764,7 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis ...@@ -756,6 +764,7 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
ChDisabDetailAccounts chDisabDetailAccounts = new ChDisabDetailAccounts(); ChDisabDetailAccounts chDisabDetailAccounts = new ChDisabDetailAccounts();
chDisabDetailAccounts.setAccountsDetailId(accountsDetailId); chDisabDetailAccounts.setAccountsDetailId(accountsDetailId);
chDisabDetailAccounts.setStatus(((short)1)); chDisabDetailAccounts.setStatus(((short)1));
chDisabDetailAccounts.setDeclarationTime(new Date());
int result = chDisabAccountsDetailMapper.updateById(chDisabDetailAccounts); int result = chDisabAccountsDetailMapper.updateById(chDisabDetailAccounts);
return result; return result;
} }
...@@ -773,6 +782,10 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis ...@@ -773,6 +782,10 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
BigDecimal allCost = chDisabAccountDTO.getAllCost(); BigDecimal allCost = chDisabAccountDTO.getAllCost();
BigDecimal overallCost = chDisabAccountDTO.getOverallCost(); BigDecimal overallCost = chDisabAccountDTO.getOverallCost();
BigDecimal personalCost = chDisabAccountDTO.getPersonalCost(); BigDecimal personalCost = chDisabAccountDTO.getPersonalCost();
Short accountsStatus = chDisabAccountDTO.getAccountsStatus();
if (accountsStatus > 2) {
return -1;
}
// 暂缓 // 暂缓
if(status == 2){ if(status == 2){
allCost = allCost.subtract(accountsAllCost); allCost = allCost.subtract(accountsAllCost);
......
...@@ -51,56 +51,16 @@ ...@@ -51,56 +51,16 @@
<select id="queryNursingRecords" resultType="com.hungraim.ltc.pojo.entity.account.NursingRecordsRespVO"> <select id="queryNursingRecords" resultType="com.hungraim.ltc.pojo.entity.account.NursingRecordsRespVO">
select organ.SRV_ORGAN_NAME srvOrganName, select organ.SRV_ORGAN_NAME srvOrganName,
detail.MODE_NAME modeName, DECODE(plan.MODE_ID, '1','医疗','2', '养老','3','上门', '4', '异地') modeName,
to_char(item.FCD,'yyyy-MM-dd HH:mm:ss') executionTime, to_char(plan.CREATION_TIME,'yyyy-MM-dd HH24:mi:ss') executionTime,
service.SERVICE_TYPE_DETAILED_NAME itemName plan.item_name itemName
from CH_DISAB_ACCOUNTS_DETAIL detail from CH_SRV_PLAN plan
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 = plan.SRV_ORGAN_ID
left join CH_SRV_ORGAN organ on organ.SRV_ORGAN_ID = detail.SRV_ORGAN_ID where plan.TASK_DETAIL_ID = #{taskDetailId} and plan.IS_STATUS ='4'
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}
</select> </select>
<select id="queryOverallCostList" 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,
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" <select id="queryOverallCostRecords"
resultType="com.hungraim.ltc.pojo.entity.account.OverallEduceDecreaseCostRespVO"> resultType="com.hungraim.ltc.pojo.entity.account.OverallEduceDecreaseCostRespVO">
...@@ -285,15 +245,11 @@ ...@@ -285,15 +245,11 @@
d.REISSUE_AMOUNT = 0, d.REISSUE_AMOUNT = 0,
d.DEDUCTION_AMOUNT = 0 d.DEDUCTION_AMOUNT = 0
</if> </if>
<if test="accountsStatus == 1">
d.status = #{accountsStatus}
</if>
<if test="accountsStatus == 3">
d.status = #{accountsStatus}
</if>
</set> </set>
where d.ACCOUNTS_ID = #{accountsId} where d.ACCOUNTS_ID = #{accountsId}
</update> </update>
</mapper> </mapper>
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
info.CERTI_CODE certiCode, info.CERTI_CODE certiCode,
(select district_name from ch_fnd_district dis where apply.MEDICAL_AREA = dis.district_code) medicalArea, (select district_name from ch_fnd_district dis where apply.MEDICAL_AREA = dis.district_code) medicalArea,
detail.ACCOUNTS_DETAIL_ID accountsDetailId, detail.ACCOUNTS_DETAIL_ID accountsDetailId,
detail.ACCOUNTS_START_TIME svrStartTime, to_char(detail.ACCOUNTS_START_TIME,'yyyy-MM-dd') svrStartTime,
detail.ACCOUNTS_END_TIME svrEndTime, to_char(detail.ACCOUNTS_END_TIME,'yyyy-MM-dd') svrEndTime,
rd.DEAL_TYPE dealType, rd.DEAL_TYPE dealType,
organ.SRV_ORGAN_NAME srvOrganName, organ.SRV_ORGAN_NAME srvOrganName,
rd.AMOUNT_OF_MONEY amountOfMoney, rd.AMOUNT_OF_MONEY amountOfMoney,
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<update id="updateSrvPlanById"> <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> </update>
......
...@@ -107,14 +107,19 @@ public class DisableController { ...@@ -107,14 +107,19 @@ public class DisableController {
List<ChSrvOrgan> chFndSrvModes = disableService.srvOrganList(String.valueOf(organId), srvOrganId, false); List<ChSrvOrgan> chFndSrvModes = disableService.srvOrganList(String.valueOf(organId), srvOrganId, false);
return Result.success(chFndSrvModes); return Result.success(chFndSrvModes);
} }
/** /**
* 查询机构意向服务机构 * 查询意向服务机构
* *
* @param * @param organId
*/ */
@RequestMapping("/srvOrganList2") @RequestMapping("/srvOrganList2")
public Result<List<ChSrvOrgan>> srvOrganList2(String organId) { 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); return Result.success(chFndSrvModes);
} }
......
...@@ -419,7 +419,7 @@ public class DisableServiceImpl implements DisableService { ...@@ -419,7 +419,7 @@ public class DisableServiceImpl implements DisableService {
} }
@Override @Override
@Transactional(rollbackFor = Exception.class)
public Result addOrUpdateDisInfoChange(DisableUpdateDetailVO disableUpdateDetailVO) { public Result addOrUpdateDisInfoChange(DisableUpdateDetailVO disableUpdateDetailVO) {
// 添加或修改记录 // 添加或修改记录
Integer changeId = disableUpdateDetailVO.getChangeId(); Integer changeId = disableUpdateDetailVO.getChangeId();
......
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
to_char(T2.EXIT_TIME,'yyyy-MM-dd') exitTime, to_char(T2.EXIT_TIME,'yyyy-MM-dd') exitTime,
--服务方案起始日 --服务方案起始日
--服务方案终止日 --服务方案终止日
to_char(T1.PROGRAM_DATE,'yyyy-MM-dd HH:mm:ss') programDate, to_char(T1.PROGRAM_DATE,'yyyy-MM-dd HH24:mi:ss') programDate,
to_char(T1.PROGRAM_EDN_DATE,'yyyy-MM-dd HH:mm:ss') programEdnDate, to_char(T1.PROGRAM_EDN_DATE,'yyyy-MM-dd HH24:mi:ss') programEdnDate,
T2.EXIT_FLAG exitFlag, T2.EXIT_FLAG exitFlag,
T2.EXIT_REASON_ID exitReasonId T2.EXIT_REASON_ID exitReasonId
FROM CH_DISABLE_INFO T2 FROM CH_DISABLE_INFO T2
......
...@@ -112,10 +112,12 @@ public class ChDisabDetailAccounts implements Serializable { ...@@ -112,10 +112,12 @@ public class ChDisabDetailAccounts implements Serializable {
*/ */
private String remarks; private String remarks;
/** /**
* 状态(1 恢复状态 2 暂缓状态 3 * 状态(0 未申报 1 恢复状态 已申报 2 暂缓状态
*/ */
private Short status; private Short status;
private Date declarationTime;
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L;
} }
\ No newline at end of file
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.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
...@@ -10,10 +13,12 @@ import java.util.Date; ...@@ -10,10 +13,12 @@ import java.util.Date;
*/ */
@Data @Data
@TableName("CH_DISABLE_RISK_LEVEL") @TableName("CH_DISABLE_RISK_LEVEL")
@KeySequence("SEQ_CH_DISABLE_RISK_LEVEL")
public class ChDisableRiskLevel { public class ChDisableRiskLevel {
/** /**
* 主键ID * 主键ID
*/ */
@TableId(value = "DISA_RISK_LEVEL_ID", type = IdType.INPUT)
private Integer disaRiskLevelId; private Integer disaRiskLevelId;
/** /**
......
package com.hungraim.ltc.pojo.entity.riskLevel; package com.hungraim.ltc.pojo.entity.riskLevel;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
...@@ -21,6 +18,7 @@ import java.util.Date; ...@@ -21,6 +18,7 @@ import java.util.Date;
@Data @Data
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@TableName("CH_DISABLE_RISK_LEVEL") @TableName("CH_DISABLE_RISK_LEVEL")
@KeySequence("SEQ_CH_DISABLE_RISK_LEVEL")
public class ChDisableRiskLevel implements Serializable { public class ChDisableRiskLevel implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -28,7 +26,8 @@ public class ChDisableRiskLevel implements Serializable { ...@@ -28,7 +26,8 @@ public class ChDisableRiskLevel implements Serializable {
/** /**
* 主键ID * 主键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; private Long disaRiskLevelId;
/** /**
......
package com.hungraim.ltc.pojo.entity.riskLevel; package com.hungraim.ltc.pojo.entity.riskLevel;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
...@@ -21,6 +18,7 @@ import java.util.Date; ...@@ -21,6 +18,7 @@ import java.util.Date;
@Data @Data
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@TableName("CH_SRVEMP_RISK_LEVEL") @TableName("CH_SRVEMP_RISK_LEVEL")
@KeySequence("SEQ_CH_SRVEMP_RISK_LEVEL")
public class ChSrvempRiskLevel implements Serializable { public class ChSrvempRiskLevel implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -28,7 +26,7 @@ public class ChSrvempRiskLevel implements Serializable { ...@@ -28,7 +26,7 @@ public class ChSrvempRiskLevel implements Serializable {
/** /**
* 主键ID * 主键ID
*/ */
@TableId(value = "SRVEMP_RISK_LEVEL_ID", type = IdType.AUTO) @TableId(value = "SRVEMP_RISK_LEVEL_ID", type = IdType.INPUT)
private Long srvempRiskLevelId; private Long srvempRiskLevelId;
/** /**
......
package com.hungraim.ltc.pojo.entity.riskLevel; package com.hungraim.ltc.pojo.entity.riskLevel;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
...@@ -21,6 +18,7 @@ import java.util.Date; ...@@ -21,6 +18,7 @@ import java.util.Date;
@Data @Data
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@TableName("CH_SRVORGAN_RISK_LEVEL") @TableName("CH_SRVORGAN_RISK_LEVEL")
@KeySequence("SEQ_CH_SRVORGAN_RISK_LEVEL")
public class ChSrvorganRiskLevel implements Serializable { public class ChSrvorganRiskLevel implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -28,7 +26,7 @@ public class ChSrvorganRiskLevel implements Serializable { ...@@ -28,7 +26,7 @@ public class ChSrvorganRiskLevel implements Serializable {
/** /**
* 主键ID * 主键ID
*/ */
@TableId(value = "SRVORGAN_RISK_LEVEL_ID", type = IdType.AUTO) @TableId(value = "SRVORGAN_RISK_LEVEL_ID", type = IdType.INPUT)
private Long srvorganRiskLevelId; private Long srvorganRiskLevelId;
/** /**
......
package com.hungraim.ltc.pojo.entity.system; package com.hungraim.ltc.pojo.entity.system;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.*;
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;
...@@ -15,9 +13,10 @@ import java.util.List; ...@@ -15,9 +13,10 @@ import java.util.List;
*/ */
@Data @Data
@TableName("LTC_RESOURCE") @TableName("LTC_RESOURCE")
@KeySequence("SEQUENCE_RESOURCE_ID")
public class SystemResource { public class SystemResource {
@TableId @TableId(value = "RESOURCE_ID", type = IdType.INPUT)
private Long resourceId; private Long resourceId;
private String resourceName; private String resourceName;
private String resourceUrl; private String resourceUrl;
......
package com.hungraim.ltc.pojo.entity.system; package com.hungraim.ltc.pojo.entity.system;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.annotation.TableField;
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;
...@@ -15,9 +12,11 @@ import java.util.Date; ...@@ -15,9 +12,11 @@ import java.util.Date;
*/ */
@Data @Data
@TableName("LTC_ROLE") @TableName("LTC_ROLE")
@KeySequence("SEQUENCE_ROLE_ID")
public class SystemRole { public class SystemRole {
@TableId( type = IdType.AUTO) // @TableId( type = IdType.AUTO)
@TableId(value = "ROLE_ID", type = IdType.INPUT)
private Long roleId; private Long roleId;
private String roleName; private String roleName;
private String status; private String status;
......
package com.hungraim.ltc.pojo.entity.system; package com.hungraim.ltc.pojo.entity.system;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
...@@ -15,9 +12,11 @@ import java.util.Date; ...@@ -15,9 +12,11 @@ import java.util.Date;
@Data @Data
@NoArgsConstructor @NoArgsConstructor
@TableName("LTC_USER") @TableName("LTC_USER")
@KeySequence("SEQUENCE_USER_ID")
public class SystemUser { public class SystemUser {
@TableId( type = IdType.AUTO) // @TableId( type = IdType.AUTO)
@TableId(value = "USER_ID", type = IdType.INPUT)
private Long userId; private Long userId;
private String account; private String account;
private String password; private String password;
......
package com.hungraim.ltc.api;
import com.hungraim.ltc.util.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
/**
* @author zwl
* @ClassName SrvTaskFeignService
* @description
* @date 2023/2/27 15:11
**/
@FeignClient("LTC-GOVERNANCE-SERVICE")
public interface SrvTaskFeignService {
@GetMapping("/api.governance/srvTask/timeAllocationSrvTask")
Result timeAllocationSrvTask();
}
...@@ -135,7 +135,7 @@ public class SrvTaskController { ...@@ -135,7 +135,7 @@ public class SrvTaskController {
e.printStackTrace(); e.printStackTrace();
return Result.failed(e.getMessage()); return Result.failed(e.getMessage());
} }
srvTaskService.otherPlaceHandler(param.getProgramId()); //srvTaskService.otherPlaceHandler(param.getProgramId());
return Result.success(); return Result.success();
} }
......
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:{}");
}
}
...@@ -215,6 +215,7 @@ public class SrvTaskServiceImpl implements SrvTaskService { ...@@ -215,6 +215,7 @@ public class SrvTaskServiceImpl implements SrvTaskService {
int chSrvTaskDetailCount = chSrvTaskDetailMapper int chSrvTaskDetailCount = chSrvTaskDetailMapper
.getSrvTaskDetail(String.valueOf(srvTaskId), nextDay); .getSrvTaskDetail(String.valueOf(srvTaskId), nextDay);
if (chSrvTaskDetailCount > 0) { if (chSrvTaskDetailCount > 0) {
log.info("{},已经有计划任务了",nextDay);
return; return;
} }
ChSrvTaskDetail chSrvTaskDetail = new ChSrvTaskDetail(); ChSrvTaskDetail chSrvTaskDetail = new ChSrvTaskDetail();
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
left join ch_apr_report report on t.task_id = report.task_id left join ch_apr_report report on t.task_id = report.task_id
<where> <where>
t.TASK_STATUS = 3 and report.DISABLE_LEVEL_ID in ('3','4','5') 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 != ''"> <if test="chSrvOrgan.organId != null and chSrvOrgan.organId != ''">
AND o.organ_id = #{chSrvOrgan.organId} AND o.organ_id = #{chSrvOrgan.organId}
</if> </if>
......
...@@ -216,8 +216,11 @@ ...@@ -216,8 +216,11 @@
<select id="getAllocationSrvTask" resultType="com.hungraim.ltc.pojo.vo.governance.AllocationSrvTaskVO"> <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 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_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 where t.SRV_DATE <![CDATA[ < ]]> sysdate and
(info.EXIT_TIME <![CDATA[ > ]]> sysdate or info.EXIT_TIME is null) (info.EXIT_TIME <![CDATA[ > ]]> sysdate or info.EXIT_TIME is null)
and sysdate <![CDATA[ > ]]> report.PUBLICITY_END_TIME
</select> </select>
</mapper> </mapper>
\ No newline at end of file
package com.hungraim.ltc.system.service;
public interface SrvTaskScheduledService {
void timeAllocationSrvTask();
}
spring: spring:
main:
#允许存在多个Feign调用相同Service的接口
allow-bean-definition-overriding: true
devtools: devtools:
restart: restart:
enabled: true enabled: true
......
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