Commit b4fe7fb6 authored by 18310373984@163.com's avatar 18310373984@163.com

失能评定分配代码修改及增加所属片区代码修改

parent 1991956a
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
d.ACCOUNTS_OVERALL_COST accountsOverallCost, d.ACCOUNTS_OVERALL_COST accountsOverallCost,
d.ACCOUNTS_PERSONAL_COST accountsPersonalCost, d.ACCOUNTS_PERSONAL_COST accountsPersonalCost,
d.TASK_DETAIL_ID taskDetailId, d.TASK_DETAIL_ID taskDetailId,
ar.beloing_area beloingArea,
(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,
o.SRV_ORGAN_NAME srvOrganName, o.SRV_ORGAN_NAME srvOrganName,
o.SRV_ORGAN_ID srvOrganId, o.SRV_ORGAN_ID srvOrganId,
...@@ -27,6 +28,7 @@ ...@@ -27,6 +28,7 @@
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
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_district_beloing_area ar on apply.MEDICAL_AREA=ar.district_code
<where> <where>
1=1 1=1
<if test="req.flag != null and req.flag != ''"> <if test="req.flag != null and req.flag != ''">
...@@ -62,6 +64,10 @@ ...@@ -62,6 +64,10 @@
</foreach> </foreach>
</if> </if>
<if test="req.beloingArea != null and req.beloingArea != ''">
AND ar.beloing_area = #{req.beloingArea}
</if>
</where> </where>
order by info.DISAB_INFO_ID order by info.DISAB_INFO_ID
</select> </select>
...@@ -87,11 +93,13 @@ ...@@ -87,11 +93,13 @@
d.REISSUE_AMOUNT reissueAmount, d.REISSUE_AMOUNT reissueAmount,
d.ACCOUNTS_DETAIL_ID accountsDetailId, d.ACCOUNTS_DETAIL_ID accountsDetailId,
DECODE(d.STATUS, '0','未申报','1', '已申报','2','已暂缓') status, DECODE(d.STATUS, '0','未申报','1', '已申报','2','已暂缓') status,
d.ACCOUNTS_ID accountsId d.ACCOUNTS_ID accountsId,
ar.beloing_area beloingArea
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
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_district_beloing_area ar on apply.MEDICAL_AREA=ar.district_code
<where> <where>
d.mode_name <![CDATA[ <>]]> '异地' d.mode_name <![CDATA[ <>]]> '异地'
...@@ -117,7 +125,9 @@ ...@@ -117,7 +125,9 @@
#{accountsStatusList} #{accountsStatusList}
</foreach> </foreach>
</if> </if>
<if test="beloingArea != null and beloingArea != ''">
AND ar.beloing_area = #{beloingArea}
</if>
</where> </where>
order by info.DISAB_INFO_ID order by info.DISAB_INFO_ID
</select> </select>
......
...@@ -53,11 +53,22 @@ ...@@ -53,11 +53,22 @@
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 (select count(1) from CH_DISAB_ACCOUNTS_DETAIL d where d.ACCOUNTS_ID =t1.ACCOUNTS_ID and d.STATUS = 1) personDay,
resu.beloingArea
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
LEFT JOIN CH_FND_ORGAN t3 ON t2.ORGAN_ID = t3.ORGAN_ID LEFT JOIN CH_FND_ORGAN t3 ON t2.ORGAN_ID = t3.ORGAN_ID
LEFT JOIN
(
select f.accounts_id,max(ar.beloing_area) beloingArea from CH_DISAB_ACCOUNTS_detail f,ch_disable_info fe,CH_DISABLE_APPLY ly,
ch_fnd_district_beloing_area ar
where f.disab_info_id = fe.disab_info_id
and fe.APPLY_ID=ly.apply_id
and ly.MEDICAL_AREA=ar.district_code
group by f.accounts_id
) resu
on t1.accounts_id=resu.accounts_id
<where> <where>
t1.ACCOUNTS_STATUS !=0 t1.ACCOUNTS_STATUS !=0
<if test='organIds != null and organIds.size()>0'> <if test='organIds != null and organIds.size()>0'>
...@@ -81,6 +92,10 @@ ...@@ -81,6 +92,10 @@
#{accountsStatusList} #{accountsStatusList}
</foreach> </foreach>
</if> </if>
<if test="req.beloingArea != null and req.beloingArea != ''">
and resu.beloingArea = #{req.beloingArea}
</if>
</where> </where>
</select> </select>
......
...@@ -54,12 +54,21 @@ ...@@ -54,12 +54,21 @@
organ.SRV_ORGAN_NAME srvOrganName, organ.SRV_ORGAN_NAME srvOrganName,
DECODE(plan.MODE_ID, '1','医疗','2', '养老','3','上门', '4', '异地') srvModeName, DECODE(plan.MODE_ID, '1','医疗','2', '养老','3','上门', '4', '异地') srvModeName,
to_char(plan.SRV_PLAN_TIME,'yyyy-MM-dd') srvDate, to_char(plan.SRV_PLAN_TIME,'yyyy-MM-dd') srvDate,
detail.check_status status detail.check_status status,
resu.beloingArea
from ch_srv_plan plan from ch_srv_plan plan
left join ch_disable_info info on plan.DISAB_INFO_ID = info.DISAB_INFO_ID 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_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_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 left join CH_SRV_ORGAN organ on organ.SRV_ORGAN_ID = plan.SRV_ORGAN_ID
left join (
select fe.disab_info_id,max(ar.beloing_area) beloingArea from ch_disable_info fe,CH_DISABLE_APPLY ly,
ch_fnd_district_beloing_area ar
where fe.APPLY_ID=ly.apply_id
and ly.MEDICAL_AREA=ar.district_code
group by fe.disab_info_id
) resu
on resu.disab_info_id=info.DISAB_INFO_ID
<where> <where>
1=1 and detail.check_status in (1,2,3) 1=1 and detail.check_status in (1,2,3)
<if test="req.status != null and req.status != ''"> <if test="req.status != null and req.status != ''">
...@@ -77,7 +86,9 @@ ...@@ -77,7 +86,9 @@
<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 organ.SRV_ORGAN_ID = #{req.srvOrganId} AND organ.SRV_ORGAN_ID = #{req.srvOrganId}
</if> </if>
<if test="req.beloingArea != null and req.beloingArea != ''">
and resu.beloingArea = #{req.beloingArea}
</if>
</where> </where>
order by status,taskDetailId order by status,taskDetailId
</select> </select>
......
...@@ -264,14 +264,20 @@ public class TaskController { ...@@ -264,14 +264,20 @@ public class TaskController {
* 评定任务分配 * 评定任务分配
* *
* @param taskId 评定任务id,如果多条以逗号(,)分隔 * @param taskId 评定任务id,如果多条以逗号(,)分隔
* @param empId 评定人员id * @param empId empId2 person2 评定人员id
*/ */
@RequestMapping("/allotTask") @RequestMapping("/allotTask")
public Result allotTask(String taskId, String empId) { public Result allotTask(String taskId, String empId, String empId2, Integer evaluateType) {
if (StringUtils.isBlank(taskId) && StringUtils.isBlank(empId)) { if (StringUtils.isBlank(taskId)) {
return Result.failed("id不能为空!"); return Result.failed("id不能为空!");
} }
Result<Object> objectResult = taskService.allotTask(taskId, empId); if (evaluateType == null) {
return Result.failed("评估类型不能为空");
}
if (StringUtils.isBlank(empId) || StringUtils.isBlank(empId2)) {
return Result.failed("评估人员不能为空");
}
Result<Object> objectResult = taskService.allotTask(taskId, empId,empId2,evaluateType);
if (!ResultCode.SUCCESS.getCode().equals(objectResult.getCode())) { if (!ResultCode.SUCCESS.getCode().equals(objectResult.getCode())) {
//失败 //失败
return Result.failed(objectResult.getMsg()); return Result.failed(objectResult.getMsg());
......
...@@ -41,7 +41,7 @@ public interface TaskService { ...@@ -41,7 +41,7 @@ public interface TaskService {
TaskReportVO getReportById(String reportId); TaskReportVO getReportById(String reportId);
Result<Object> allotTask(String taskId, String empId); Result<Object> allotTask(String taskId, String empId, String empId2, Integer evaluateType);
List<TaskGroupVO> taskGroupList(String name, String certiCode, String tel); List<TaskGroupVO> taskGroupList(String name, String certiCode, String tel);
......
...@@ -484,12 +484,25 @@ public class TaskServiceImpl implements TaskService { ...@@ -484,12 +484,25 @@ public class TaskServiceImpl implements TaskService {
*/ */
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Override @Override
public Result<Object> allotTask(String taskId, String empId) { public Result<Object> allotTask(String taskId, String empId, String empId2, Integer evaluateType) {
ChAprEmp chAprEmp = aprEmpMapper.selectById(empId); ChAprEmp chAprEmp = aprEmpMapper.selectById(empId);
ChAprEmp chAprEmp2 = aprEmpMapper.selectById(empId2);
if(evaluateType==1){//如果是争议复评,则必须都是组长
if (chAprEmp == null || chAprEmp.getGroupLeader() == null || chAprEmp.getGroupLeader() != 0) { if (chAprEmp == null || chAprEmp.getGroupLeader() == null || chAprEmp.getGroupLeader() != 0) {
//不是组长 //不是组长
return Result.failed("评定人员必须是组长!"); return Result.failed("评定人员必须是组长!");
} }
if (chAprEmp2 == null || chAprEmp2.getGroupLeader() == null || chAprEmp2.getGroupLeader() != 0) {
//不是组长
return Result.failed("评定人员必须是组长!");
}
}else{
if (chAprEmp == null || chAprEmp.getGroupLeader() == null || chAprEmp.getGroupLeader() != 0) {
//不是组长
return Result.failed("评定人员必须是组长!");
}
}
String[] taskIds = taskId.split(","); String[] taskIds = taskId.split(",");
//任务分配日期 //任务分配日期
Date assignTime = new Date(); Date assignTime = new Date();
...@@ -507,6 +520,7 @@ public class TaskServiceImpl implements TaskService { ...@@ -507,6 +520,7 @@ public class TaskServiceImpl implements TaskService {
task.setAprEmpId(Integer.parseInt(empId));//评定人员id task.setAprEmpId(Integer.parseInt(empId));//评定人员id
task.setAssignTime(assignTime); task.setAssignTime(assignTime);
task.setTaskStatus(1); task.setTaskStatus(1);
task.setEvaluateType(evaluateType);//评估类型
taskMapper.updateById(task); taskMapper.updateById(task);
//更新失能人员信息 //更新失能人员信息
ChDisableInfo chDisableInfo = disableInfoMapper.selectById(task.getDisableInfoId()); ChDisableInfo chDisableInfo = disableInfoMapper.selectById(task.getDisableInfoId());
...@@ -521,23 +535,30 @@ public class TaskServiceImpl implements TaskService { ...@@ -521,23 +535,30 @@ public class TaskServiceImpl implements TaskService {
report.setEffTime(new Date()); report.setEffTime(new Date());
report.setFcd(new Date()); report.setFcd(new Date());
report.setStatus(0); report.setStatus(0);
report.setEvaluateType(evaluateType);//评估类型
aprReportMapper.insert(report); aprReportMapper.insert(report);
if(StringUtils.isNotBlank(empId)) {
ChAprPersonInfo person1Info = new ChAprPersonInfo(); ChAprPersonInfo person1Info = new ChAprPersonInfo();
person1Info.setReportId(report.getReportId()); person1Info.setReportId(report.getReportId());
if(StringUtils.isNotEmpty(empId)) {
person1Info.setEmpId(Integer.parseInt(empId)); person1Info.setEmpId(Integer.parseInt(empId));
}
person1Info.setFcd(new Date()); person1Info.setFcd(new Date());
personInfoMapper.insert(person1Info); personInfoMapper.insert(person1Info);
}
if(StringUtils.isNotBlank(empId2)) {
//生成组 ChAprPersonInfo person2Info = new ChAprPersonInfo();
person2Info.setReportId(report.getReportId());
person2Info.setEmpId(Integer.parseInt(empId2));
person2Info.setFcd(new Date());
personInfoMapper.insert(person2Info);
}
//第一个评定专家生成组
ChAprTaskPush taskPush = new ChAprTaskPush(); ChAprTaskPush taskPush = new ChAprTaskPush();
taskPush.setAssignTime(new Date()); taskPush.setAssignTime(new Date());
taskPush.setGroupNumber(SerialNumberUtils.getSerialNumber(empId)); taskPush.setGroupNumber(SerialNumberUtils.getSerialNumber(empId));
taskPush.setTaskId(Long.parseLong(id)); taskPush.setTaskId(Long.parseLong(id));
taskPush.setEmpId(Long.parseLong(empId)); taskPush.setEmpId(Long.parseLong(empId));
taskPush.setEmpId2(Long.parseLong(empId2));
taskPush.setStatus((short) 1); taskPush.setStatus((short) 1);
taskPush.setIsManual((short) 1); taskPush.setIsManual((short) 1);
//生成分组历史 //生成分组历史
...@@ -546,6 +567,7 @@ public class TaskServiceImpl implements TaskService { ...@@ -546,6 +567,7 @@ public class TaskServiceImpl implements TaskService {
//插入分组数据 //插入分组数据
taskPushMapper.insert(taskPush); taskPushMapper.insert(taskPush);
taskPushHisMapper.insert(pushHis); taskPushHisMapper.insert(pushHis);
} }
return Result.success(); return Result.success();
} }
......
...@@ -413,12 +413,15 @@ ...@@ -413,12 +413,15 @@
push.Refuse_time refuseTime, push.Refuse_time refuseTime,
push.status status, push.status status,
push.Refuse_reason refuseReason, push.Refuse_reason refuseReason,
push.Refuse_remark refuseRemark push.Refuse_remark refuseRemark,
task.evaluate_type evaluateType,
emp2.real_name realName2
FROM ch_apr_task_push_his push FROM ch_apr_task_push_his push
LEFT JOIN ch_apr_task task ON push.TASK_ID = task.TASK_ID LEFT JOIN ch_apr_task task ON push.TASK_ID = task.TASK_ID
left join ch_disable_info disable on task.disable_info_id = disable.disab_info_id left join ch_disable_info disable on task.disable_info_id = disable.disab_info_id
LEFT JOIN ch_apr_emp emp on push.emp_id = emp.emp_id LEFT JOIN ch_apr_emp emp on push.emp_id = emp.emp_id
left join ch_apr_organ organ on emp.apr_organ_id = organ.apr_organ_id left join ch_apr_organ organ on emp.apr_organ_id = organ.apr_organ_id
LEFT JOIN ch_apr_emp emp2 on push.emp_id2 = emp2.emp_id
WHERE disable.disab_info_id= #{disabId} WHERE disable.disab_info_id= #{disabId}
</select> </select>
......
...@@ -83,4 +83,7 @@ public class ChDisabDetailAccountsResp implements Serializable { ...@@ -83,4 +83,7 @@ public class ChDisabDetailAccountsResp implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
//增加所属片区字段
private String beloingArea;
} }
\ No newline at end of file
...@@ -41,4 +41,5 @@ public class ChAprTask { ...@@ -41,4 +41,5 @@ public class ChAprTask {
private Integer lcu; private Integer lcu;
private java.util.Date lastAprDate; private java.util.Date lastAprDate;
private String appointmentRemark; private String appointmentRemark;
private Integer evaluateType;
} }
...@@ -243,4 +243,9 @@ public class ChAprTaskPush implements Serializable { ...@@ -243,4 +243,9 @@ public class ChAprTaskPush implements Serializable {
* 预约备注 * 预约备注
*/ */
private String appointmentRemark; private String appointmentRemark;
/**
* 评定人员ID
*/
private Long empId2;
} }
\ No newline at end of file
...@@ -245,4 +245,9 @@ public class ChAprTaskPushHis implements Serializable { ...@@ -245,4 +245,9 @@ public class ChAprTaskPushHis implements Serializable {
private String appointmentRemark; private String appointmentRemark;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**
* 评定人员ID
*/
private Long empId2;
} }
\ No newline at end of file
...@@ -13,6 +13,8 @@ import lombok.Data; ...@@ -13,6 +13,8 @@ import lombok.Data;
@Data @Data
public class AccountDeclareExportResp { public class AccountDeclareExportResp {
@Excel(name = "所属片区",width = 20)
private String beloingArea;
@Excel(name = "统筹区",width = 20) @Excel(name = "统筹区",width = 20)
private String medicalArea; private String medicalArea;
......
...@@ -113,5 +113,7 @@ public class SrvOrganAccountListResp { ...@@ -113,5 +113,7 @@ public class SrvOrganAccountListResp {
*/ */
private List<String> reissueReason; private List<String> reissueReason;
//所属片区
private String beloingArea;
} }
...@@ -52,4 +52,7 @@ public class SrvOrganListReq extends BaseReq { ...@@ -52,4 +52,7 @@ public class SrvOrganListReq extends BaseReq {
// 检索条件 // 检索条件
private String status; private String status;
//所属片区
private String beloingArea;
} }
...@@ -24,4 +24,8 @@ public class SrvTaskReqVO extends BaseReq { ...@@ -24,4 +24,8 @@ public class SrvTaskReqVO extends BaseReq {
private Long srvOrganId; private Long srvOrganId;
private Integer userId; private Integer userId;
//所属片区
private String beloingArea;
} }
...@@ -59,5 +59,8 @@ public class SrvTaskRespVO { ...@@ -59,5 +59,8 @@ public class SrvTaskRespVO {
private boolean auditFlag; private boolean auditFlag;
//所属片区
private String beloingArea;
} }
\ No newline at end of file
...@@ -41,4 +41,9 @@ public class AllotTaskHisVO { ...@@ -41,4 +41,9 @@ public class AllotTaskHisVO {
private String refuseReason; private String refuseReason;
//备注 //备注
private String refuseRemark; private String refuseRemark;
//评定人员
private String realName2;
//评估类型
private String evaluateType;
} }
...@@ -325,6 +325,7 @@ public class CsoftSecurityUtil { ...@@ -325,6 +325,7 @@ public class CsoftSecurityUtil {
log.info("公钥:{}",publicKeyString); log.info("公钥:{}",publicKeyString);
log.info("私钥:{}",privateKeyString); log.info("私钥:{}",privateKeyString);
redisCache.setCacheObject(publicKeyString,privateKeyString,1, TimeUnit.DAYS); redisCache.setCacheObject(publicKeyString,privateKeyString,1, TimeUnit.DAYS);
redisCache.getCacheObject(publicKeyString);
keyMap.put(0, publicKeyString); //0表示公钥 keyMap.put(0, publicKeyString); //0表示公钥
keyMap.put(1, privateKeyString); //1表示私钥 keyMap.put(1, privateKeyString); //1表示私钥
}catch (NoSuchAlgorithmException e){ }catch (NoSuchAlgorithmException e){
......
...@@ -23,7 +23,7 @@ import java.net.URLEncoder; ...@@ -23,7 +23,7 @@ import java.net.URLEncoder;
import java.util.List; import java.util.List;
/** /**
* 监管机构及监管机构人员信息管理Controller * 3Controller
* *
* @author czz * @author czz
*/ */
......
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