浏览代码

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

humingfen 7 年之前
父节点
当前提交
afb4761855

+ 68 - 1
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/synergy/doctor/DoctorSynergyManageController.java

@ -1,7 +1,74 @@
package com.yihu.wlyy.controller.synergy.doctor;
import com.yihu.wlyy.controller.BaseController;
import com.yihu.wlyy.service.synergy.SynergyManageService;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
import java.util.Map;
/**
 * Created by 刘文彬 on 2018/9/27.
 */
public class DoctorSynergyManageController {
public class DoctorSynergyManageController extends BaseController {
    @Autowired
    private SynergyManageService synergyManageService;
    @RequestMapping(value = "workorderList", method = RequestMethod.GET)
    @ApiOperation("客服系统-协同服务列表")
    public String workorderList(@ApiParam(name = "userCode", value = "客服code", required = false)
                                @RequestParam(value = "userCode", required = false)String userCode,
                                @ApiParam(name = "keywords", value = "输入医生姓名、姓名、社保卡、身份证号码", required = false)
                                @RequestParam(value = "keywords", required = false)String keywords,
                                @ApiParam(name = "workorderType", value = "服务类型(0、咨询,1、健康教育,2、预约,3、随访,4、问卷调查,5、疾病筛查)", required = false)
                                @RequestParam(value = "workorderType", required = false)Integer workorderType,
                                @ApiParam(name = "isMyTask", value = "是否由我负责,1、我负责,null全部", required = false)
                                @RequestParam(value = "isMyTask", required = false)Integer isMyTask,
                                @ApiParam(name = "status", value = "工单状态(0、草稿,1、未接受,2、处理中,3、处理完成,4、退回)", required = false)
                                @RequestParam(value = "status", required = false)Integer status,
                                @ApiParam(name = "priority", value = "工单优先级(0、普通,1、加急)", required = false)
                                @RequestParam(value = "priority", required = false)Integer priority,
                                @ApiParam(name = "timeout", value = "是否超时1、超时,null全部", required = false)
                                @RequestParam(value = "timeout", required = false)Integer timeout,
                                @ApiParam(name = "workorderCode", value = "服务编号", required = false)
                                @RequestParam(value = "workorderCode", required = false)String workorderCode,
                                @ApiParam(name = "principal", value = "负责人", required = false)
                                @RequestParam(value = "principal", required = false)String principal,
                                @ApiParam(name = "serviceStartTime", value = "服务开始时间(格式:yyyy-MM-dd HH:mm:ss)", required = false)
                                @RequestParam(value = "serviceStartTime", required = false)String serviceStartTime,
                                @ApiParam(name = "serviceEndTime", value = "服务结束时间(格式:yyyy-MM-dd HH:mm:ss)", required = false)
                                @RequestParam(value = "serviceEndTime", required = false)String serviceEndTime,
                                @ApiParam(name = "patientName", value = "服务对象名称", required = false)
                                @RequestParam(value = "patientName", required = false)String patientName,
                                @ApiParam(name = "ssc", value = "社保卡号", required = false)
                                @RequestParam(value = "ssc", required = false)String ssc,
                                @ApiParam(name = "idcard", value = "身份证号", required = false)
                                @RequestParam(value = "idcard", required = false)String idcard,
                                @ApiParam(name = "userType", value = "2、客服,3、客服管理员", required = true)
                                @RequestParam(value = "userType", required = true)Integer userType,
                                @ApiParam(name = "isAcceptTask", value = "1、我接收到的任务,2、我派发的任务,3、待接收(客服管理员),4、已接收(客服管理员)", required = true)
                                @RequestParam(value = "isAcceptTask", required = true)Integer isAcceptTask,
                                @ApiParam(name = "page", value = "第几页,从1开始", required = true)
                                @RequestParam(value = "page", required = false,defaultValue = "1")Integer page,
                                @ApiParam(name = "pageSize", value = "每页分页大小", required = true)
                                @RequestParam(value = "pageSize", required = false,defaultValue = "10")Integer pageSize){
        try {
            if(!StringUtils.isNotEmpty(userCode)){
                userCode = getUID();
            }
            List<Map<String,Object>> result = synergyManageService.workorderList(userCode,keywords,workorderType,isMyTask,status,priority,timeout,workorderCode,
                    principal,serviceStartTime,serviceEndTime,patientName,ssc,idcard,userType,isAcceptTask);
            return write(200, "获取成功", "data", result);
        } catch (Exception e) {
            error(e);
            return error(-1, "请求失败");
        }
    }
}

+ 50 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/synergy/ManageSynergyWorkorderDO.java

@ -33,6 +33,11 @@ public class ManageSynergyWorkorderDO extends IdEntity {
    private String dealResultAccessory;//处理结果附件
    private Integer servicerCount;//服务对象人数
    private String servicerKey;//服务对象其中五个人
    private String receiverCode;//接收人code
    private String receiverName;//接收人名称
    private String receiverType;//接收人类型(1、医生,2、客服)
    private String hospital;//创建人所属机构code;
    private String hospitalName;//创建人所属机构名称
    @Column(name = "code")
    public String getCode() {
@ -204,4 +209,49 @@ public class ManageSynergyWorkorderDO extends IdEntity {
    public void setServicerKey(String servicerKey) {
        this.servicerKey = servicerKey;
    }
    @Column(name = "receiver_code")
    public String getReceiverCode() {
        return receiverCode;
    }
    public void setReceiverCode(String receiverCode) {
        this.receiverCode = receiverCode;
    }
    @Column(name = "receiver_type")
    public String getReceiverType() {
        return receiverType;
    }
    public void setReceiverType(String receiverType) {
        this.receiverType = receiverType;
    }
    @Column(name = "receiver_name")
    public String getReceiverName() {
        return receiverName;
    }
    public void setReceiverName(String receiverName) {
        this.receiverName = receiverName;
    }
    @Column(name = "hospital")
    public String getHospital() {
        return hospital;
    }
    public void setHospital(String hospital) {
        this.hospital = hospital;
    }
    @Column(name = "hospital_name")
    public String getHospitalName() {
        return hospitalName;
    }
    public void setHospitalName(String hospitalName) {
        this.hospitalName = hospitalName;
    }
}

+ 27 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/synergy/SynergyManageService.java

@ -303,4 +303,31 @@ public class SynergyManageService {
        return map;
    }
    /**
     * 协同服务取号(客服)
     * @param workorderCode
     * @param townCode
     * @param hospitalCode
     * @param labelType
     * @param labelCode
     */
    public void takeWorkorderNum(String workorderCode,String townCode,String hospitalCode,Integer labelType,String labelCode){
        String whereSql ="";
        if(StringUtils.isNotEmpty(townCode)){
            whereSql+=" and s.town='"+townCode+"' ";
        }
        if(StringUtils.isNotEmpty(hospitalCode)){
            whereSql+=" and s.hospital='"+hospitalCode+"' ";
        }
        String sql =" select DISTINCT s.*,w.* from manage_synergy_workorder_servicer s " +
                " LEFT JOIN manage_synergy_workorder w on s.workorder_code=w.code and w.del=1 and w.status=2 " +
                " LEFT JOIN manage_synergy_workorder_executor e on e.workorder_code=w.code and e.del=1 " +
                " LEFT JOIN wlyy_sign_patient_label_info i on i.patient=s.service_patient_code and i.status=1 " +
                " LEFT JOIN manage_synergy_workorder_customer_log l on l.service_patient_code=s.service_patient_code " +
                " where s.status=1 and i.label='"+labelCode+"' and i.label_type='"+labelType+"' and s.workorderCode='"+workorderCode+"' " +
                whereSql+" order by l.id desc";
    }
}