liuwenbin 6 gadi atpakaļ
vecāks
revīzija
80c8467dd0

+ 3 - 2
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/config/SpringSecurityConfig.java

@ -60,7 +60,8 @@ public class SpringSecurityConfig extends WebSecurityConfigurerAdapter {
                "/admin/surveyTemplateAdvice/**",
                "/admin/paylog/**",
                "/admin/static/consult/**",
                "/admin/specialist/hospitalServiceItem/importData"
                "/admin/specialist/hospitalServiceItem/importData",
                "/synergy/**"
        );
    }
@ -73,7 +74,7 @@ public class SpringSecurityConfig extends WebSecurityConfigurerAdapter {
                .expressionHandler(webSecurityExpressionHandler())
                .antMatchers("/yueren/**").permitAll()
                .antMatchers("/svr-iot/device/**").permitAll()//物联网平台没有做登录(这里添加免登录验证)
                .antMatchers("/synergy/**").permitAll() //i健康平台没有做登录(这里添加免登录验证)
//                .antMatchers("/synergy/**").permitAll() //i健康平台没有做登录(这里添加免登录验证)
//                .antMatchers("/login/**").permitAll()
//                .antMatchers("/admin/**").authenticated()
                .antMatchers("/admin/**").hasRole("USER")

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

@ -11,10 +11,12 @@ 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.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List;
@ -23,8 +25,8 @@ import java.util.Map;
/**
 * Created by 刘文彬 on 2018/9/27.
 */
@Controller
@RequestMapping(value = "/synergy/doctor")
@RestController
@RequestMapping(value = "/synergy/doctor",produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(description = "医生端-协同服务")
public class DoctorSynergyManageController extends BaseController {

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

@ -227,6 +227,8 @@ public class SynergyManageService extends BaseJpaService {
            map.put("managerName",managerName);//负责人的名称
            Integer finishedServicerCount = workorderServicerDao.findByWorkorderCodeCount(one.get("code")+"",3);
            map.put("finishedServicerCount",finishedServicerCount);//服务完成人数
            map.put("userName",one.get("create_user_name"));
            map.put("hospitalName",one.get("hospital_name"));
            resultList.add(map);
        }
        Map<String,Object> resultMap = new HashMap<>();
@ -828,4 +830,98 @@ public class SynergyManageService extends BaseJpaService {
        manageSynergyWorkorderDO.setStatus(3);
        workOrderDao.save(manageSynergyWorkorderDO);
    }
    public void exportWorkorder(String code,String keywords,Integer workorderType,
                                Integer isMyTask,Integer status,Integer priority,Integer timeout,String workorderCode,
                                String principal,String serviceStartTime,String serviceEndTime,
                                String patientName,String ssc,String idcard,Integer userType,Integer isAcceptTask){
        String servicerTable = " left join wlyy.manage_synergy_workorder_executor e on e.workorder_code=w.code AND e.del = 1  " ;
        String whereSql = "";
        if(userType==3){//客服管理员
            whereSql +=" and w.create_user_type=1 ";//创建人为医生
            if(isAcceptTask==3){//待接收
                whereSql +=" and w.status =1 ";
                servicerTable ="";
            }else if(isAcceptTask==4){//已接收
                whereSql +=" and w.status in (2,3) ";
            }
        }else if(userType==2){//客服
            if(isAcceptTask==1){//我接收
                whereSql +=" and w.create_user_type=1 ";//创建人为医生
                whereSql += " and e.executor_code ='"+code+"' ";
            }else if(isAcceptTask==2){//我派发
                whereSql +=" and w.create_user_type=2 ";//创建人为客服
                whereSql += " and e.create_user ='"+code+"' ";
            }
        }else if(userType==3){//医生
            if(isAcceptTask==1){//我接收
                whereSql +=" and w.create_user_type=2 ";//创建人为客服
                whereSql += " and e.executor_code ='"+code+"' ";
            }else if(isAcceptTask==2){//我派发
                whereSql +=" and w.create_user_type=2 ";//创建人为医生
                whereSql += " and e.create_user ='"+code+"' ";
            }
        }
        //关键字查询
        if(StringUtils.isNotEmpty(keywords)){
            servicerTable +=" left join wlyy.manage_synergy_workorder_servicer s on s.workorder_code=w.code ";
            whereSql += " and w.servicer_count<=10  ";
            whereSql += " and (w.create_user_name like '%"+keywords+"%' or s.service_patient_name like '%"+keywords+"%' " +
                    " or s.ssc like '%"+keywords+"%' or s.idcard like '%"+keywords+"%' ) ";
        }
        //服务类型
        if(workorderType!=null){
            whereSql += " and w.type ="+workorderType+" ";
        }
        //是否是我负责的
        if(isMyTask!=null){
            whereSql += " and e.executor_code ='"+code+"' and e.executor_type=1 ";
        }
        //工单状态
        if(status!=null){
            whereSql +=" and w.status ="+status+" ";
        }
        //优先级
        if(priority!=null){
            whereSql+= " and w.priority="+priority+" ";
        }
        //是否超时
        if(timeout!=null){
            whereSql +=" and w.service_time >'"+DateUtil.dateToStrLong(new Date())+"' ";
        }
        //服务编码
        if(StringUtils.isNotEmpty(workorderCode)){
            whereSql+=" and w.code like '%"+workorderCode+"%' ";
        }
        //负责人
        if(StringUtils.isNotEmpty(principal)){
            whereSql+=" and e.code like '%"+principal+"%' and e.executor_type=1 ";
        }
        //服务时间
        if(StringUtils.isNotEmpty(serviceStartTime)){
            whereSql+=" and w.service_time>='"+serviceStartTime+"' ";
        }
        if(StringUtils.isNotEmpty(serviceEndTime)){
            whereSql+=" and w.service_time<='"+serviceEndTime+"' ";
        }
        //服务对象
        if(StringUtils.isNotEmpty(patientName)){
            whereSql+=" s.service_patient_name like '%"+keywords+"%' ";
        }
        //社保卡号
        if(StringUtils.isNotEmpty(ssc)){
            whereSql+=" s.ssc like '%"+keywords+"%' ";
        }
        //身份证号
        if(StringUtils.isNotEmpty(idcard)){
            whereSql+=" s.idcard like '%"+keywords+"%' ";
        }
        String sql =" select DISTINCT w.* from wlyy.manage_synergy_workorder w  " +servicerTable+
                " where w.del=1  " +
                " and 1=1 "+whereSql+ " order by w.priority desc,w.service_time desc";
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
    }
}

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/synergy/SynergyManageService.java

@ -163,7 +163,7 @@ public class SynergyManageService extends BaseService {
        Map<String, Object> param = new HashedMap();
        param.put("userCode",userCode);
        param.put("workorderCode",workorderCode);
        HttpResponse response = HttpUtils.doPost(customerUrl + "/doctor/synergy/reminder", param);
        HttpResponse response = HttpUtils.doPost(customerUrl + "/synergy/doctor/reminder", param);
        JSONObject result = new JSONObject(response.getContent());
        if(result.getInt("status")!=200){
            throw new Exception("请求客服系统服务失败!");