Shi Kejing преди 4 години
родител
ревизия
4edb9ea10c

+ 5 - 0
common/common-entity/sql记录

@ -71,3 +71,8 @@ CREATE TABLE `wlyy_followup_drugs` (
ALTER TABLE wlyy_door_fee_detail ADD pay_status TINYINT(1) COMMENT '付款状态:0未付款 1已付款' ;
-- 2021-01-28 skj 上门服务添加护理人员相关
alter table base.wlyy_door_service_order add `nursing_staff` varchar(50) DEFAULT NULL COMMENT '护理人员code';
alter table base.wlyy_door_service_order add `nursing_staff_name` varchar(50) DEFAULT NULL COMMENT '护理人员name';
alter table base.wlyy_door_service_order add `nursing_staff_type` varchar(50) DEFAULT NULL COMMENT '接单的医生类型:医生,健管师,护士等';

+ 42 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/door/WlyyDoorServiceOrderDO.java

@ -356,6 +356,21 @@ public class WlyyDoorServiceOrderDO extends UuidIdentityEntityWithOperator {
     */
    private String doctorType;
    /**
     * 接单的护理人员code
     */
    private String nursingStaff;
    /**
     * 接单的护理人员姓名
     */
    private String nursingStaffName;
    /**
     * 接单的护理人员类型:医生,健管师,护士等
     */
    private String nursingStaffType;
    /**
     * 医生预计到达时间
     */
@ -1214,4 +1229,31 @@ public class WlyyDoorServiceOrderDO extends UuidIdentityEntityWithOperator {
    public void setFollowupDate(String followupDate) {
        this.followupDate = followupDate;
    }
    @Column(name = "nursing_staff")
    public String getNursingStaff() {
        return nursingStaff;
    }
    public void setNursingStaff(String nursingStaff) {
        this.nursingStaff = nursingStaff;
    }
    @Column(name = "nursing_staff_name")
    public String getNursingStaffName() {
        return nursingStaffName;
    }
    public void setNursingStaffName(String nursingStaffName) {
        this.nursingStaffName = nursingStaffName;
    }
    @Column(name = "nursing_staff_type")
    public String getNursingStaffType() {
        return nursingStaffType;
    }
    public void setNursingStaffType(String nursingStaffType) {
        this.nursingStaffType = nursingStaffType;
    }
}

+ 10 - 4
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/controller/doctor/DoorOrderController.java

@ -196,9 +196,12 @@ public class DoorOrderController extends BaseController {
            @ApiParam(name = "dispathcherName", value = "当前医生姓名") @RequestParam(value = "dispathcherName", required = true) String dispathcherName,
            @ApiParam(name = "doctor", value = "医生code") @RequestParam(value = "doctor", required = true) String doctor,
            @ApiParam(name = "doctorName", value = "医生姓名") @RequestParam(value = "doctorName", required = true) String doctorName,
            @ApiParam(name = "doctorJobName", value = "医生职称") @RequestParam(value = "doctorJobName", required = true) String doctorJobName) {
            @ApiParam(name = "doctorJobName", value = "医生职称") @RequestParam(value = "doctorJobName", required = true) String doctorJobName,
            @ApiParam(name = "nursingStaff", value = "护理人员code") @RequestParam(value = "nursingStaff", required = true) String nursingStaff,
            @ApiParam(name = "nursingStaffName", value = "护理人员姓名") @RequestParam(value = "nursingStaffName", required = true) String nursingStaffName,
            @ApiParam(name = "nursingStaffType", value = "护理人员职称") @RequestParam(value = "nursingStaffType", required = true) String nursingStaffType) {
        try{
            JSONObject result = wlyyDoorServiceOrderService.transferOrder(orderId, remark,dispatcher,dispathcherName, doctor, doctorName ,doctorJobName);
            JSONObject result = wlyyDoorServiceOrderService.transferOrder(orderId, remark,dispatcher,dispathcherName, doctor, doctorName ,doctorJobName,nursingStaff,nursingStaffName,nursingStaffType);
            if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                return error( -1,result.getString(ResponseContant.resultMsg));
            }
@ -901,9 +904,12 @@ public class DoorOrderController extends BaseController {
            @ApiParam(name = "dispathcherName", value = "调度员姓名") @RequestParam(value = "dispathcherName", required = true) String dispathcherName,
            @ApiParam(name = "doctor", value = "医生code") @RequestParam(value = "doctor", required = true) String doctor,
            @ApiParam(name = "doctorName", value = "医生姓名") @RequestParam(value = "doctorName", required = true) String doctorName,
            @ApiParam(name = "doctorJobName", value = "医生职称") @RequestParam(value = "doctorJobName", required = true) String doctorJobName) {
            @ApiParam(name = "doctorJobName", value = "医生职称") @RequestParam(value = "doctorJobName", required = true) String doctorJobName,
            @ApiParam(name = "nursingStaff", value = "护理人员code") @RequestParam(value = "nursingStaff", required = true) String nursingStaff,
            @ApiParam(name = "nursingStaffName", value = "护理人员姓名") @RequestParam(value = "nursingStaffName", required = true) String nursingStaffName,
            @ApiParam(name = "nursingStaffType", value = "护理人员职称") @RequestParam(value = "nursingStaffType", required = true) String nursingStaffType) {
        try{
            JSONObject result = wlyyDoorServiceOrderService.sendOrderToDoctor(orderId, remark,dispatcher,dispathcherName, doctor, doctorName ,doctorJobName);
            JSONObject result = wlyyDoorServiceOrderService.sendOrderToDoctor(orderId, remark,dispatcher,dispathcherName, doctor, doctorName ,doctorJobName,nursingStaff,nursingStaffName,nursingStaffType);
            if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                return error( -1,result.getString(ResponseContant.resultMsg));
            }

+ 16 - 4
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/WlyyDoorServiceOrderService.java

@ -717,7 +717,8 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO
        if(StringUtils.isNoneBlank(orderDO.getDoctor())){
            //服务医生修改,直接转派
            BaseDoctorDO transDoctor = doctorDao.findById(orderDO.getDoctor());
            sendOrderToDoctor(orderDO.getId(),null,"system","系统",transDoctor.getId(),transDoctor.getName(),transDoctor.getJobTitleName());
            BaseDoctorDO transNursingStaff = doctorDao.findById(orderDO.getNursingStaff());
            sendOrderToDoctor(orderDO.getId(),null,"system","系统",transDoctor.getId(),transDoctor.getName(),transDoctor.getJobTitleName(),transNursingStaff.getId(),transNursingStaff.getName(),transNursingStaff.getJobTitleName());
        }
        return result;
@ -2214,7 +2215,7 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO
     * @return
     */
    @Transactional(rollbackFor = Exception.class)
    public JSONObject sendOrderToDoctor(String orderId,String remark,String dispatcher,String dispathcherName,String doctor,String doctorName,String doctorJobName){
    public JSONObject sendOrderToDoctor(String orderId,String remark,String dispatcher,String dispathcherName,String doctor,String doctorName,String doctorJobName,String nursingStaff,String nursingStaffName,String nursingStaffType){
        JSONObject result = new JSONObject();
        WlyyDoorServiceOrderDO doorServiceOrderDO = wlyyDoorServiceOrderDao.findOne(orderId);
@ -2247,6 +2248,11 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO
        doorServiceOrderDO.setUpdateUser(dispatcher);
        doorServiceOrderDO.setUpdateUserName(dispathcherName);
        doorServiceOrderDO.setDispatcherResponseTime(new Date());
        doorServiceOrderDO.setNursingStaff(nursingStaff);
        doorServiceOrderDO.setNursingStaffName(nursingStaffName);
        doorServiceOrderDO.setNursingStaffType(nursingStaffType);
        this.save(doorServiceOrderDO);
        // 给医生发派单消息
@ -2290,7 +2296,7 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO
     * @return
     */
    @Transactional(rollbackFor = Exception.class)
    public JSONObject transferOrder(String orderId,String remark,String dispatcher,String dispathcherName,String doctor,String doctorName,String doctorJobName){
    public JSONObject transferOrder(String orderId,String remark,String dispatcher,String dispathcherName,String doctor,String doctorName,String doctorJobName,String nursingStaff,String nursingStaffName,String nursingStaffType){
        JSONObject result = new JSONObject();
        WlyyDoorServiceOrderDO doorServiceOrderDO = wlyyDoorServiceOrderDao.findOne(orderId);
        if(null == doorServiceOrderDO){
@ -2322,6 +2328,11 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO
        doorServiceOrderDO.setUpdateUser(dispatcher);
        doorServiceOrderDO.setUpdateUserName(dispathcherName);
        doorServiceOrderDO.setDispatcherResponseTime(new Date());
        doorServiceOrderDO.setNursingStaff(nursingStaff);
        doorServiceOrderDO.setNursingStaffName(nursingStaffName);
        doorServiceOrderDO.setNursingStaffType(nursingStaffType);
        this.save(doorServiceOrderDO);
        // 给医生发派单消息
@ -2872,7 +2883,8 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO
            //服务医生修改,直接转派
            BaseDoctorDO doctor = doctorDao.findById(doctorCode);
            BaseDoctorDO transDoctor = doctorDao.findById(orderDO.getDoctor());
            transferOrder(orderDO.getId(),null,doctor.getId(),doctor.getName(),transDoctor.getId(),transDoctor.getName(),transDoctor.getJobTitleName());
            BaseDoctorDO transNursingStaff = doctorDao.findById(orderDO.getNursingStaff());
            transferOrder(orderDO.getId(),null,doctor.getId(),doctor.getName(),transDoctor.getId(),transDoctor.getName(),transDoctor.getJobTitleName(),transNursingStaff.getId(),transNursingStaff.getName(),transNursingStaff.getJobTitleName());
        }
        result.put(ResponseContant.resultFlag, ResponseContant.success);