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