Commit 4c24af57 authored by zhangch's avatar zhangch
parents 4df344c0 b3e5075e
...@@ -64,10 +64,17 @@ public class ReTaskController { ...@@ -64,10 +64,17 @@ public class ReTaskController {
* 复评申请-历史评定信息 * 复评申请-历史评定信息
*/ */
@GetMapping("/hisinfo-list") @GetMapping("/hisinfo-list")
public Result<List<ChAprTaskVo>> getRetaskHisList(){ public Result<List<ChAprTaskVo>> getRetaskHisList(String disableInfoId){
List<ChAprTaskVo> chAprTaskVos = reTaskService.geReTaskHisInfoList(); List<ChAprTaskVo> chAprTaskVos = reTaskService.geReTaskHisInfoList(disableInfoId);
return Result.success(chAprTaskVos); return Result.success(chAprTaskVos);
}
/**
* 复评审核
*/
@RequestMapping("/disableExamine")
public Result disableExamine(String applyId, String checkName, Short applyStatus, String checkRemark) {
reTaskService.disableExamine(applyId, checkName, applyStatus, checkRemark);
return Result.success();
} }
} }
package com.hungraim.ltc.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.assessment.ChAprTask;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
/**
* 失能评定Mapper
*
* @author czz
*/
@Mapper
@Repository
public interface AprTaskMapper extends BaseMapper<ChAprTask> {
}
package com.hungraim.ltc.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.serviceManage.ChCfgPara;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
/**
* 基础参数配置Mapper
*
* @author czz
*/
@Mapper
@Repository
public interface CfgParaMapper extends BaseMapper<ChCfgPara> {
}
package com.hungraim.ltc.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.disable.ChDisableApplyHis;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
@Repository
@Mapper
public interface DisableApplyHisMapper extends BaseMapper<ChDisableApplyHis> {
}
package com.hungraim.ltc.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.assessment.ChDisableInfoHis;
import com.hungraim.ltc.pojo.entity.disable.ChDisableInfo;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
/**
* 失能人员信息Mapper
*
* @author czz
*/
@Mapper
@Repository
public interface DisableInfoHisMapper extends BaseMapper<ChDisableInfoHis> {
}
...@@ -17,5 +17,5 @@ public interface ReTaskMapper extends BaseMapper<ChAprTask> { ...@@ -17,5 +17,5 @@ public interface ReTaskMapper extends BaseMapper<ChAprTask> {
/** /**
* 复评任务评定信息列表 * 复评任务评定信息列表
*/ */
List<ChAprTaskVo> getReTaskHisInfoList(); List<ChAprTaskVo> getReTaskHisInfoList(String disableInfoId);
} }
...@@ -24,6 +24,10 @@ public interface ReTaskService extends IService<ChAprTask> { ...@@ -24,6 +24,10 @@ public interface ReTaskService extends IService<ChAprTask> {
/** /**
* 复评申请-历史评定信息列表查询 * 复评申请-历史评定信息列表查询
*/ */
List<ChAprTaskVo> geReTaskHisInfoList(); List<ChAprTaskVo> geReTaskHisInfoList(String disableInfoId);
/**
* 复评审核
*/
void disableExamine(String applyId, String checkName, Short applyStatus, String checkRemark);
} }
package com.hungraim.ltc.service.impl; package com.hungraim.ltc.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.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.OrganFeignService; import com.hungraim.ltc.api.OrganFeignService;
import com.hungraim.ltc.dao.ChDisableApplyMapper; import com.hungraim.ltc.dao.*;
import com.hungraim.ltc.dao.ReTaskMapper;
import com.hungraim.ltc.dao.TaskMapper;
import com.hungraim.ltc.pojo.entity.assessment.ChAprTask; import com.hungraim.ltc.pojo.entity.assessment.ChAprTask;
import com.hungraim.ltc.pojo.entity.assessment.ChDisableInfoHis;
import com.hungraim.ltc.pojo.entity.disable.ChDisableApply; import com.hungraim.ltc.pojo.entity.disable.ChDisableApply;
import com.hungraim.ltc.pojo.entity.disable.ChDisableApplyHis;
import com.hungraim.ltc.pojo.entity.disable.ChDisableInfo;
import com.hungraim.ltc.pojo.entity.serviceManage.ChCfgPara;
import com.hungraim.ltc.pojo.vo.assessment.ChAprTaskVo; import com.hungraim.ltc.pojo.vo.assessment.ChAprTaskVo;
import com.hungraim.ltc.pojo.vo.assessment.ReTaskDistributionVO; import com.hungraim.ltc.pojo.vo.assessment.ReTaskDistributionVO;
import com.hungraim.ltc.pojo.vo.disable.ChDisableApplyVo; import com.hungraim.ltc.pojo.vo.disable.ChDisableApplyVo;
...@@ -16,8 +21,11 @@ import com.hungraim.ltc.util.DateUtils; ...@@ -16,8 +21,11 @@ import com.hungraim.ltc.util.DateUtils;
import com.hungraim.ltc.util.Result; import com.hungraim.ltc.util.Result;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Calendar;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -33,6 +41,11 @@ public class ReTaskServiceImpl extends ServiceImpl<TaskMapper, ChAprTask> implem ...@@ -33,6 +41,11 @@ public class ReTaskServiceImpl extends ServiceImpl<TaskMapper, ChAprTask> implem
private final ChDisableApplyMapper disableApplyMapper; private final ChDisableApplyMapper disableApplyMapper;
private final ChDisableApplyMapper chDisableApplyMapper; private final ChDisableApplyMapper chDisableApplyMapper;
private final ReTaskMapper reTaskMapper; private final ReTaskMapper reTaskMapper;
private final DisableApplyHisMapper disableApplyHisMapper;
private final CfgParaMapper cfgParaMapper;
private final AprTaskMapper aprTaskMapper;
private final DisableInfoMapper disableInfoMapper;
private final DisableInfoHisMapper disableInfoHisMapper;
@Override @Override
public Page<ReTaskDistributionVO> reTaskDistributionList(Page<ReTaskDistributionVO> page, Long organId, Boolean isIncluded, String acptProvincial, String acptCity, String acptCrea, String realName, String certiCode) { public Page<ReTaskDistributionVO> reTaskDistributionList(Page<ReTaskDistributionVO> page, Long organId, Boolean isIncluded, String acptProvincial, String acptCity, String acptCrea, String realName, String certiCode) {
Result<List<Long>> organChild = null; Result<List<Long>> organChild = null;
...@@ -55,24 +68,63 @@ public class ReTaskServiceImpl extends ServiceImpl<TaskMapper, ChAprTask> implem ...@@ -55,24 +68,63 @@ public class ReTaskServiceImpl extends ServiceImpl<TaskMapper, ChAprTask> implem
} }
@Override @Override
public List<ChAprTaskVo> geReTaskHisInfoList() { public List<ChAprTaskVo> geReTaskHisInfoList(String disableInfoId) {
// 历史评定信息列表 // 历史评定信息列表
List<ChAprTaskVo> reTaskHisInfoList = reTaskMapper.getReTaskHisInfoList(); List<ChAprTaskVo> reTaskHisInfoList = reTaskMapper.getReTaskHisInfoList(disableInfoId);
if (reTaskHisInfoList.size()!=0){
reTaskHisInfoList.stream().forEach(item-> {
String provincialCityArea = item.getProvincialCityArea();
provincialCityArea=item.getDistrictProvincial()+item.getDistrictCity()+item.getDistrictArea();
item.setProvincialCityArea(provincialCityArea);
try {
item.setAge(DateUtils.getAge(item.getBirthDay()));
} catch (Exception e) {
e.printStackTrace();
}
String pcasd = item.getPcasd();
pcasd=item.getAcptProvincial()+item.getAcptCity()+item.getAcptArea()+item.getAcptStreet()+item.getAcptAddress();
item.setPcasd(pcasd);
});
}
return reTaskHisInfoList; return reTaskHisInfoList;
} }
@Transactional(rollbackFor = Exception.class)
@Override
public void disableExamine(String applyId, String checkName, Short applyStatus, String checkRemark) {
Date date = new Date();
//更新审核状态
ChDisableApply chDisableApply = disableApplyMapper.selectById(applyId);
chDisableApply.setCheckName(checkName);//审核人
chDisableApply.setApplyStatus(applyStatus);//申请状态
chDisableApply.setCheckRemark(checkRemark);//审核备注
chDisableApply.setCheckTime(date);//审核时间
disableApplyMapper.updateById(chDisableApply);
//添加失能审核历史
ChDisableApplyHis chDisableApplyHis = new ChDisableApplyHis();
BeanUtils.copyProperties(chDisableApply, chDisableApplyHis);
disableApplyHisMapper.insert(chDisableApplyHis);
//审核通过
if (applyStatus.equals(Short.valueOf("2"))) {
//修改失能人员信息,首次申请只需新建
ChDisableInfo chDisableInfo = disableInfoMapper.selectOne(new LambdaQueryWrapper<ChDisableInfo>()
.eq(ChDisableInfo::getRealName, checkName)
.eq(ChDisableInfo::getCertiCode, chDisableApply.getCertiCode()));
BeanUtil.copyProperties(chDisableApply, chDisableInfo);
chDisableInfo.setDataFrom(0);//数据来源设置为0-申请
disableInfoMapper.updateById(chDisableInfo);
/* //添加失能人员信息
ChDisableInfo chDisableInfo = new ChDisableInfo();
BeanUtil.copyProperties(chDisableApply, chDisableInfo);
disableInfoMapper.insert(chDisableInfo);*/
//新建disable_info_his表的一条数据
ChDisableInfoHis chDisableInfoHis = new ChDisableInfoHis();
BeanUtil.copyProperties(chDisableInfo, chDisableInfoHis);
disableInfoHisMapper.insert(chDisableInfoHis);
//添加失能评定信息
ChAprTask chAprTask = new ChAprTask();
ChCfgPara chCfgPara = cfgParaMapper.selectOne(new QueryWrapper<ChCfgPara>().eq("ORGAN_ID", chDisableApply.getOrganId()));
if (chCfgPara != null && chCfgPara.getCfgArgTime() != null) {
Calendar cd = Calendar.getInstance();
cd.setTime(date);
cd.add(Calendar.DATE, chCfgPara.getCfgArgTime().intValue());
chAprTask.setLastAprDate(cd.getTime());//鉴定截至日期
}
BeanUtil.copyProperties(chDisableApply, chAprTask);
chAprTask.setDisableInfoId(chDisableInfo.getDisabInfoId());//失能人员id
chAprTask.setReAprStatus(0);
chAprTask.setEffTime(new Date());
chAprTask.setFcd(null);
chAprTask.setAprType(1);//申请:0;复评:1
chAprTask.setTaskStatus(0); // 任务状态 0 未分配
aprTaskMapper.insert(chAprTask);
}
}
} }
\ No newline at end of file
...@@ -6,20 +6,20 @@ ...@@ -6,20 +6,20 @@
select select
(select ORGAN_NAME from CH_FND_ORGAN organ where task.ORGAN_ID=organ.ORGAN_ID )organName, (select ORGAN_NAME from CH_FND_ORGAN organ where task.ORGAN_ID=organ.ORGAN_ID )organName,
task.ORGAN_ID organId, task.ORGAN_ID organId,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where task.DISTRICT_PROVINCIAL= dis.DISTRICT_CODE) districtProvincial, task.DISTRICT_PROVINCIAL districtProvincial,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where task.DISTRICT_CITY = dis.DISTRICT_CODE) districtCity, task.DISTRICT_CITY districtCity,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where task.DISTRICT_AREA = dis.DISTRICT_CODE) districtArea, task.DISTRICT_AREA districtArea,
disinfo.REAL_NAME realName, disinfo.REAL_NAME realName,
apply.EFF_TIME effTime, apply.EFF_TIME effTime,
disinfo.CERTI_CODE certiCode, disinfo.CERTI_CODE certiCode,
disinfo.BIRTHDAY birthDay, disinfo.BIRTHDAY birthDay,
(select DISE_TYPE_CODE from CH_FND_DISEASE_TYPE disease where disinfo.DISEASE=disease.DISE_TYPE_ID) disease, (select DISE_TYPE_CODE from CH_FND_DISEASE_TYPE where disinfo.DISE_TYPE_S = DISE_TYPE_ID) diseTypeS,
disinfo.TEL tel, disinfo.TEL tel,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where disinfo.ACPT_PROVINCIAL= dis.DISTRICT_CODE) acptProvincial, disinfo.ACPT_PROVINCIAL acptProvincial,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where disinfo.ACPT_CITY = dis.DISTRICT_CODE) acptCity, disinfo.ACPT_CITY acptCity,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where disinfo.ACPT_AREA = dis.DISTRICT_CODE) acptArea, disinfo.ACPT_AREA acptArea,
(select STREET_NAME from CH_FND_STREET dis where disinfo.ACPT_STREET=dis.STREET_CODE)acptStreet, disinfo.ACPT_STREET acptStreet,
(select STREET_NAME from CH_FND_STREET dis where disinfo.ACPT_ADDRESS=dis.STREET_CODE)acptAddress, disinfo.ACPT_ADDRESS acptAddress,
(select REAL_NAME from CH_APR_EMP aprEmp where taskEmp.EMP_ID=aprEmp.EMP_ID)EmprealName, (select REAL_NAME from CH_APR_EMP aprEmp where taskEmp.EMP_ID=aprEmp.EMP_ID)EmprealName,
(select TEL from CH_APR_EMP aprEmp where taskEmp.EMP_ID=aprEmp.EMP_ID)EmpTel, (select TEL from CH_APR_EMP aprEmp where taskEmp.EMP_ID=aprEmp.EMP_ID)EmpTel,
task.ASSIGN_TIME assignTime, task.ASSIGN_TIME assignTime,
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
left join CH_DISABLE_INFO disinfo on task.DISABLE_INFO_ID=disinfo.DISAB_INFO_ID left join CH_DISABLE_INFO disinfo on task.DISABLE_INFO_ID=disinfo.DISAB_INFO_ID
left join CH_DISABLE_APPLY apply on task.APPLY_ID=apply.APPLY_ID left join CH_DISABLE_APPLY apply on task.APPLY_ID=apply.APPLY_ID
left join CH_APR_TASK_EMP taskEmp on task.TASK_ID=taskEmp.TASK_ID left join CH_APR_TASK_EMP taskEmp on task.TASK_ID=taskEmp.TASK_ID
where disinfo.DISAB_INFO_ID = #{disableInfoId}
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -10,6 +10,10 @@ import java.util.Date; ...@@ -10,6 +10,10 @@ import java.util.Date;
@Data @Data
public class ChAprTaskVo { public class ChAprTaskVo {
/** /**
* 失能人员id
*/
private String disableInfoId;
/**
* 适用机构 * 适用机构
*/ */
private String organName; private String organName;
...@@ -23,7 +27,6 @@ public class ChAprTaskVo { ...@@ -23,7 +27,6 @@ public class ChAprTaskVo {
private String districtProvincial; private String districtProvincial;
private String districtCity; private String districtCity;
private String districtArea; private String districtArea;
private String provincialCityArea;
/** /**
* 失能人员姓名 * 失能人员姓名
*/ */
...@@ -37,10 +40,9 @@ public class ChAprTaskVo { ...@@ -37,10 +40,9 @@ public class ChAprTaskVo {
*/ */
private String certiCode; private String certiCode;
/** /**
* 年龄 * 出生日期
*/ */
private Date birthDay; private Date birthDay;
private Integer age;
/** /**
* 诊断疾病 * 诊断疾病
*/ */
...@@ -57,7 +59,6 @@ public class ChAprTaskVo { ...@@ -57,7 +59,6 @@ public class ChAprTaskVo {
private String acptArea; private String acptArea;
private String acptStreet; private String acptStreet;
private String acptAddress; private String acptAddress;
private String pcasd;
/** /**
* 评定人员 * 评定人员
*/ */
......
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