Commit 375e936c authored by zhangwanglin's avatar zhangwanglin

失能人员变更列表

parent 9bad7448
......@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.account.service.AccountService;
import com.hungraim.ltc.pojo.entity.account.*;
import com.hungraim.ltc.pojo.vo.account.*;
import com.hungraim.ltc.pojo.vo.disable.PlaceOtherVO;
import com.hungraim.ltc.util.FileUtils;
import com.hungraim.ltc.util.Result;
import com.hungraim.ltc.util.ResultCode;
......@@ -368,6 +369,27 @@ public class AccountController {
}
@RequestMapping("/placeOtherQuery")
public Result<Page<PlaceOtherVO>> placeOtherQuery(@RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "10") Integer pageSize, String realName, String certiCode) {
Page<PlaceOtherVO> page = new Page<>(pageNum, pageSize);
page = accountService.placeOtherQuery(page,realName, certiCode);
return Result.success(page);
}
@RequestMapping("/placeOtherApply")
public Result placeOtherApply(Integer disabInfoId, String otherApplyTime) {
int result = accountService.placeOtherApply(disabInfoId, otherApplyTime);
if (result > 0) {
return Result.success();
}else {
return Result.failed("申请失败");
}
}
}
......@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail;
import com.hungraim.ltc.pojo.vo.account.SrvTaskReqVO;
import com.hungraim.ltc.pojo.vo.account.SrvTaskRespVO;
import com.hungraim.ltc.pojo.vo.disable.PlaceOtherVO;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.PathVariable;
......@@ -22,4 +23,8 @@ public interface ChSrvTaskDetailMapper extends BaseMapper<ChSrvTaskDetail> {
**/
Integer updateSrvPlanById(String palnId);
int placeOtherApply(Integer disabInfoId, String otherApplyTime);
Page<PlaceOtherVO> placeOtherQuery(Page page, String name, String certiCode);
}
\ No newline at end of file
......@@ -6,6 +6,7 @@ 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.pojo.vo.disable.PlaceOtherVO;
import com.hungraim.ltc.util.Result;
import org.apache.poi.ss.usermodel.Workbook;
......@@ -60,4 +61,9 @@ public interface AccountService extends IService<ChDisabAccounts> {
Page<ChDisabDetailAccountsResp> queryOrganAccountsDetail(Integer pageNum, Integer pageSize,SrvOrganListReq srvOrganListReq);
int placeOtherApply(Integer disabInfoId, String otherApplyTime);
Page<PlaceOtherVO> placeOtherQuery(Page page, String name, String certiCode);
}
......@@ -19,6 +19,7 @@ import com.hungraim.ltc.pojo.entity.account.*;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskFinishItem;
import com.hungraim.ltc.pojo.vo.account.*;
import com.hungraim.ltc.pojo.vo.disable.PlaceOtherVO;
import com.hungraim.ltc.util.*;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
......@@ -80,25 +81,12 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
map.put("ACCOUNTS_ID",accountsId);
chDisabFreeRdInfoMapper.deleteByMap(map);
}
//待审核
if(accountsStatus == 1) {
// chDisabAccountsDetailMapper.updateByAccountsIdReject(accountsId);
}
// 审核通过
if(accountsStatus == 2) {
// chDisabAccountsDetailMapper.updateByAccountsIdAuditing(accountsId);
}
// 复核
if(accountsStatus == 3) {
// chDisabAccountsDetailMapper.updateByAccountsIdCheck(accountsId);
}
// 已结算
if(accountsStatus == 4) {
ChDisabAccounts chDisabAccountDTO = disabAccountsMapper.selectById(accountOperVo.getAccountsId());
chDisabAccountDTO.setTotalAllocatedExpenses(chDisabAccountDTO.getTotalAllocatedExpenses());
chDisabAccountDTO.setChooseSettle((short) 1); // 是否结算(0未结算,1已结算)
disabAccountsMapper.updateById(chDisabAccountDTO);
//chDisabAccountsDetailMapper.updateByAccountsIdAccounts(accountsId);
}
this.saveOrUpdate(chDisabAccounts);
}
......@@ -671,9 +659,6 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
ChDisabAccounts chDisabAccounts = getChDisabAccounts1(accountsVO);
chDisabDetailAccounts.setAccountsId(chDisabAccounts.getAccountsId());
chDisabAccountsDetailMapper.insert(chDisabDetailAccounts);
String planId = accountsVO.getPlanId();
// 更新
chDisabAccountsDetailMapper.updateByPlanId(planId);
}else {
BigDecimal accountsAllCost = chDisabDetailAccountsDTO.getAccountsAllCost();
BigDecimal accountsOverallCost = chDisabDetailAccountsDTO.getAccountsOverallCost();
......@@ -912,5 +897,59 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
return result;
}
@Override
public int placeOtherApply(Integer disabInfoId, String otherApplyTime) {
int result = taskDetailMapper.placeOtherApply(disabInfoId,otherApplyTime);
BigDecimal limit = BigDecimal.valueOf(20);
BigDecimal zero = BigDecimal.valueOf(0);
ChDisabDetailAccounts chDisabDetailAccountsDTO = chDisabAccountsDetailMapper.queryDisabDetailAccounts("471", otherApplyTime, String.valueOf(disabInfoId), "异地");
if(Objects.isNull(chDisabDetailAccountsDTO)) {
// 异地
ChDisabDetailAccounts chDisabDetailAccounts = new ChDisabDetailAccounts();
chDisabDetailAccounts.setAccountsAllCost(limit);
chDisabDetailAccounts.setAccountsOverallCost(limit);
chDisabDetailAccounts.setAccountsPersonalCost(zero);
chDisabDetailAccounts.setModeName("异地");
chDisabDetailAccounts.setSrvOrganId("471");
chDisabDetailAccounts.setCreationTime(new Date());
chDisabDetailAccounts.setAccountsTime(DateUtils.strToDate(otherApplyTime));
// chDisabDetailAccounts.setMedicalArea(accountsVO.getMedicalArea());
chDisabDetailAccounts.setDisabInfoId(String.valueOf(disabInfoId));
chDisabDetailAccounts.setStatus((short) 1);
chDisabDetailAccounts.setReissueAmount(BigDecimal.valueOf(0));
chDisabDetailAccounts.setDeductionAmount(BigDecimal.valueOf(0));
ChDisabAccounts chDisabAccounts = disabAccountsMapper.queryAccountByCondition(DateUtils.dateToStrYm(DateUtils.strToDate(otherApplyTime)), "异地", "471", null);
if (chDisabAccounts == null) {
chDisabAccounts = new ChDisabAccounts();
chDisabAccounts.setModeName("异地");
chDisabAccounts.setAccountsTime(DateUtils.strToDateMd(otherApplyTime));
chDisabAccounts.setSrvOrganId(Long.valueOf(471));
chDisabAccounts.setCreationTime(new Date());
chDisabAccounts.setAccountsStatus((short) 1);
chDisabAccounts.setAllCost(limit);
chDisabAccounts.setOverallCost(limit);
chDisabAccounts.setPersonalCost(zero);
chDisabAccounts.setReissueAmountTotal(zero);
chDisabAccounts.setDeductionAmountTotal(zero);
disabAccountsMapper.insert(chDisabAccounts);
}
chDisabDetailAccounts.setAccountsId(chDisabAccounts.getAccountsId());
chDisabAccountsDetailMapper.insert(chDisabDetailAccounts);
}else {
BigDecimal accountsAllCost = chDisabDetailAccountsDTO.getAccountsAllCost();
BigDecimal accountsOverallCost = chDisabDetailAccountsDTO.getAccountsOverallCost();
chDisabDetailAccountsDTO.setAccountsAllCost(accountsAllCost.add(limit));
chDisabDetailAccountsDTO.setAccountsOverallCost(accountsOverallCost.add(limit));
chDisabDetailAccountsDTO.setAccountsPersonalCost(zero);
chDisabAccountsDetailMapper.updateById(chDisabDetailAccountsDTO);
}
return result;
}
@Override
public Page<PlaceOtherVO> placeOtherQuery(Page page, String name, String certiCode) {
Page<PlaceOtherVO> placeOtherVOPage = taskDetailMapper.placeOtherQuery(page, name, certiCode);
return placeOtherVOPage;
}
}
......@@ -50,6 +50,39 @@
<select id="placeOtherQuery" resultType="com.hungraim.ltc.pojo.vo.disable.PlaceOtherVO">
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.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
FROM CH_DISABLE_INFO info
LEFT JOIN CH_APR_TASK task ON info.DISAB_INFO_ID = task.DISABLE_INFO_ID
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
<if test="name != null and name != ''">
and info.REAL_NAME like CONCAT(CONCAT('%',#{name}) ,'%')
</if>
<if test="certiCode != null and certiCode != ''">
and info.CERTI_CODE =#{certiCode}
</if>
</select>
<update id="placeOtherApply">
update CH_DISABLE_INFO set OTHER_APPLY_TIME = TO_DATE ( #{otherApplyTime}, 'yyyy-MM-dd') where DISAB_INFO_ID = #{disabInfoId}
</update>
</mapper>
......@@ -176,6 +176,8 @@ public class DisableServiceImpl implements DisableService {
disableUpdateDetailVo.setAddressDetail(chDisableInfo.getAdressDetail());
// 接收评定详细地址
disableUpdateDetailVo.setAcptDetail(chDisableInfo.getAcptAddress());
// 代办人身份证号
disableUpdateDetailVo.setOperCertiNum(chDisableInfo.getOperCertiCode());
// 代办人省市区
......@@ -189,6 +191,18 @@ public class DisableServiceImpl implements DisableService {
//医保统筹区
ChDisableApply chDisableApply = disableApplyMapper.selectById(chDisableInfo.getApplyId());
disableUpdateDetailVo.setMedicalArea(chDisableApply.getMedicalArea());
//失能人员医疗信息
disableUpdateDetailVo.setDiseTypeF(chDisableApply.getDiseTypeF());
disableUpdateDetailVo.setDiseTypeS(chDisableApply.getDiseTypeS());
disableUpdateDetailVo.setMedicalType(chDisableApply.getMedicalType());
disableUpdateDetailVo.setSrvModeId(chDisableApply.getSrvModeId());
disableUpdateDetailVo.setApplyTime(chDisableApply.getApplyTime());
disableUpdateDetailVo.setBankCardNo(chDisableApply.getBankCardNo());
disableUpdateDetailVo.setSrvOrganId(chDisableApply.getSrvOrganId());
disableUpdateDetailVo.setReviewFrequency(chDisableApply.getReviewFrequency());
try {
Result<List<ChFndAttach>> listResult = attachFeignService.selectAttachs(Long.valueOf(chDisableInfo.getApplyId()), AttachType.DISABLE.getUploadType());
if (listResult.getCode().equals(ResultCode.SUCCESS.getCode())) {
......
......@@ -432,4 +432,48 @@ public class ChDisableInfoChange {
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
private Date applyTime;
/**
* 疾病大类
*/
private Long diseTypeF;
/**
* 疾病小类
*/
private Long diseTypeS;
/**
* 服务方式
*/
private Long srvModeId;
/**
* 疾病描述
*/
private String diseaseDesc;
private String bankCardNo;
/**
* 医保类型 城镇:1;非城镇:0
*/
private Short medicalType;
/**
* 意向护理机构
*/
private Long srvOrganId;
/**
* 是否首次申请 初次申请,争议复评,定期复评,变更评定
*/
private Long reviewFrequency;
}
......@@ -119,4 +119,42 @@ public class DisableUpdateDetailVO {
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
private Date applyTime;
/**
* 疾病大类
*/
private Long diseTypeF;
/**
* 疾病小类
*/
private Long diseTypeS;
/**
* 服务方式
*/
private Long srvModeId;
/**
* 疾病描述
*/
private String diseaseDesc;
private String bankCardNo;
/**
* 医保类型 城镇:1;非城镇:0
*/
private Short medicalType;
/**
* 意向护理机构
*/
private Long srvOrganId;
/**
* 是否首次申请 初次申请,争议复评,定期复评,变更评定
*/
private Long reviewFrequency;
}
......@@ -358,24 +358,6 @@ public class BuildBedController {
}
}
@RequestMapping("/placeOtherQuery")
public Result<Page<PlaceOtherVO>> placeOtherQuery(@RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "10") Integer pageSize, String realName, String certiCode) {
Page<PlaceOtherVO> page = new Page<>(pageNum, pageSize);
page = buildBedService.placeOtherQuery(page,realName, certiCode);
return Result.success(page);
}
@RequestMapping("/placeOtherApply")
public Result placeOtherApply(Integer disabInfoId, String otherApplyTime) {
int result = buildBedService.placeOtherApply(disabInfoId, otherApplyTime);
if (result > 0) {
return Result.success();
}else {
return Result.failed("申请失败");
}
}
}
......
......@@ -28,9 +28,7 @@ import java.util.List;
@Repository
public interface BuildBedMapper extends BaseMapper<ChSrvBuildBed> {
int placeOtherApply(Integer disabInfoId, String otherApplyTime);
Page<PlaceOtherVO> placeOtherQuery(Page page, String name, String certiCode);
Page<BuildBedSearchRsp> searchOrgBed(Page<BuildBedSearchRsp> page, @Param("req") BuildBedSearchReq req);
......
......@@ -19,9 +19,6 @@ import java.util.Date;
*/
public interface IBuildBedService extends IService<ChSrvBuildBed> {
int placeOtherApply(Integer disabInfoId, String otherApplyTime);
Page<PlaceOtherVO> placeOtherQuery(Page page, String name, String certiCode);
Result searchOrgBed(BuildBedSearchReq req);
......
......@@ -44,17 +44,7 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB
private final ServiceTypeDetailedMapper serviceTypeDetailed;
@Override
public int placeOtherApply(Integer disabInfoId, String otherApplyTime) {
int result = buildBedMapper.placeOtherApply(disabInfoId,otherApplyTime);
return result;
}
@Override
public Page<PlaceOtherVO> placeOtherQuery(Page page, String name, String certiCode) {
Page<PlaceOtherVO> placeOtherVOPage = buildBedMapper.placeOtherQuery(page, name, certiCode);
return placeOtherVOPage;
}
@Override
public Result searchOrgBed(BuildBedSearchReq req) {
......
......@@ -161,37 +161,6 @@
</select>
<select id="placeOtherQuery" resultType="com.hungraim.ltc.pojo.vo.disable.PlaceOtherVO">
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.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
FROM CH_DISABLE_INFO info
LEFT JOIN CH_APR_TASK task ON info.DISAB_INFO_ID = task.DISABLE_INFO_ID
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
<if test="name != null and name != ''">
and info.REAL_NAME like CONCAT(CONCAT('%',#{name}) ,'%')
</if>
<if test="certiCode != null and certiCode != ''">
and info.CERTI_CODE =#{certiCode}
</if>
</select>
<update id="placeOtherApply">
update CH_DISABLE_INFO set OTHER_APPLY_TIME = TO_DATE ( #{otherApplyTime}, 'yyyy-MM-dd') where DISAB_INFO_ID = #{disabInfoId}
</update>
</mapper>
\ No newline at end of file
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