humingfen 6 éve
szülő
commit
170fe1d132

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

@ -31,7 +31,7 @@ public class SpringSecurityConfig extends WebSecurityConfigurerAdapter {
                "/yueren/**",
                "/svr-iot/**",
                "/customer/**",
                "/doctor/**",
                "/synergy/**",
                "/third/**",
                "/admin/hos/doctor/importFromExcel",
                "/admin/hos/doctor/importData",
@ -73,7 +73,7 @@ public class SpringSecurityConfig extends WebSecurityConfigurerAdapter {
                .expressionHandler(webSecurityExpressionHandler())
                .antMatchers("/yueren/**").permitAll()
                .antMatchers("/svr-iot/device/**").permitAll()//物联网平台没有做登录(这里添加免登录验证)
//                .antMatchers("/admin/main").permitAll()
                .antMatchers("/synergy/**").permitAll() //i健康平台没有做登录(这里添加免登录验证)
//                .antMatchers("/login/**").permitAll()
//                .antMatchers("/admin/**").authenticated()
                .antMatchers("/admin/**").hasRole("USER")

+ 7 - 5
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/synergy/customer/CustomerQuestionnaireController.java

@ -7,18 +7,19 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.http.MediaType;
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;
/**
 * 客服端问卷调查
 * Created by Humingfen on 2018/9/29.
 */
@Controller
@RequestMapping(value = "/customer/question")
@Api(description = "客服端-接收问卷协同服务")
@RestController
@RequestMapping(value = "/customer/question", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(description = "客服端-调查问卷协同服务")
public class CustomerQuestionnaireController extends BaseController {
    @Autowired
@ -68,7 +69,8 @@ public class CustomerQuestionnaireController extends BaseController {
    @ApiOperation(value = "查看调查问卷内容")
    public String getQuestionnaireDetail(@ApiParam(value = "调查问卷code") @RequestParam String surveyCode) {
        try {
            return write(200, "查询成功!", "data", questionnaireService.getQuestionnaireDetail(surveyCode));
            com.alibaba.fastjson.JSONObject jsonObject = questionnaireService.getQuestionnaireDetail(surveyCode);
            return write(200, "查询成功!", "data", jsonObject);
        } catch (Exception e) {
            e.printStackTrace();
            return write(-1, "查询失败!");

+ 5 - 4
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/synergy/customer/CustomerScreenResultController.java

@ -6,18 +6,19 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.http.MediaType;
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;
/**
 * 客服端疾病筛查
 * Created by Humingfen on 2018/9/29.
 */
@Controller
@RequestMapping(value = "/customer/screen")
@Api(description = "客服端-接收问卷协同服务")
@RestController
@RequestMapping(value = "/customer/screen", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(description = "客服端-疾病筛查协同服务")
public class CustomerScreenResultController extends BaseController {
    @Autowired

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

@ -6,15 +6,15 @@ import com.yihu.wlyy.controller.BaseController;
import com.yihu.wlyy.entity.synergy.ManageSynergyWorkorderDO;
import com.yihu.wlyy.entity.synergy.ManageSynergyWorkorderServicerDO;
import com.yihu.wlyy.service.synergy.QuestionnaireManageService;
import com.yihu.wlyy.service.synergy.SynergyManageService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.http.MediaType;
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.text.SimpleDateFormat;
import java.util.List;
@ -23,8 +23,8 @@ import java.util.List;
 * 管理端问卷调查
 * Created by humingfen on 2018/9/27.
 */
@Controller
@RequestMapping(value = "/doctor")
@RestController
@RequestMapping(value = "/synergy/questionnaire", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(description = "医生端-派发协同服务")
public class DoctorQuestionnaireController extends BaseController {
@ -32,8 +32,6 @@ public class DoctorQuestionnaireController extends BaseController {
    ObjectMapper objectMapper;
    @Autowired
    private QuestionnaireManageService questionnaireService;
    @Autowired
    private SynergyManageService synergyManageService;
    @RequestMapping(value = "/createWorkOrder", method = {RequestMethod.GET, RequestMethod.POST})
    @ApiOperation(value = "派发协同服务")

+ 2 - 1
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/filter/SessionOutTimeFilter.java

@ -27,7 +27,8 @@ public class SessionOutTimeFilter extends OncePerRequestFilter {
                || path.indexOf("/svr-iot") != -1
                || path.indexOf(httpServletRequest.getContextPath() + "/static") != -1
                || path.indexOf("swagger") != -1
                || path.indexOf(httpServletRequest.getContextPath() + "/v2/api-docs") != -1) {
                || path.indexOf(httpServletRequest.getContextPath() + "/v2/api-docs") != -1
                || path.indexOf("/synergy") != -1) {
            filterChain.doFilter(httpServletRequest, httpServletResponse);
            return;
        }

+ 10 - 16
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/synergy/QuestionnaireManageService.java

@ -123,14 +123,11 @@ public class QuestionnaireManageService extends BaseJpaService {
     * @return
     */
    public JSONObject getAnswers(String templateCode) {
        String url = wlyyUrl + "doctor/questionnaire/getAnswers";
        String response = "";
        Map<String, Object> params = new HashMap<>();
        params.put("templateId", templateCode);
        try {
            response = httpClientUtil.post(url, params);
        } catch (Exception e) {
            e.printStackTrace();
        String url = wlyyUrl + "doctor/questionnaire/getAnswers?id=" + templateCode;
        String  response = httpClientUtil.get(url, "UTF-8");
        JSONObject jsonObject = JSONObject.parseObject(response);
        if(jsonObject.getString("msg").equals("查询成功!")){
            return JSONObject.parseObject(jsonObject.getString("data"));
        }
        return JSONObject.parseObject(response);
    }
@ -168,14 +165,11 @@ public class QuestionnaireManageService extends BaseJpaService {
    }
    public JSONObject getQuestionnaireDetail(String surveyCode) {
        String url = wlyyUrl + "doctor/questionnaire/getQuestionnaireDetail";
        String response = "";
        Map<String, Object> params = new HashMap<>();
        params.put("id", surveyCode);
        try {
            response = httpClientUtil.post(url, params);
        } catch (Exception e) {
            e.printStackTrace();
        String url = wlyyUrl + "doctor/questionnaire/getQuestionnaireDetail?id=" + surveyCode;
        String response = httpClientUtil.get(url, "UTF-8");
        JSONObject jsonObject = JSONObject.parseObject(response);
        if(jsonObject.getString("msg").equals("查询成功")){
            return JSONObject.parseObject(jsonObject.getString("data"));
        }
        return JSONObject.parseObject(response);
    }

+ 10 - 19
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/synergy/ScreenResultManageService.java

@ -7,9 +7,6 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap;
import java.util.Map;
/**
 * Created by humingfen on 2018/09/29.
 */
@ -28,14 +25,11 @@ public class ScreenResultManageService {
     * @return
     */
    public JSONObject getScreenResultDetail(String code) {
        String url = wlyyUrl + "doctor/screen/getScreenResultDetail";
        String response = "";
        Map<String, String> params = new HashMap<>();
        params.put("code", code);
        try {
            response = httpClientUtil.httpPost(url, params);
        } catch (Exception e) {
            e.printStackTrace();
        String url = wlyyUrl + "doctor/screen/getScreenResultDetail?code=" + code;
        String response = httpClientUtil.get(url, "UTF-8");
        JSONObject jsonObject = JSONObject.parseObject(response);
        if(jsonObject.getString("msg").equals("查询成功")){
            return JSONObject.parseObject(jsonObject.getString("data"));
        }
        return JSONObject.parseObject(response);
    }
@ -46,14 +40,11 @@ public class ScreenResultManageService {
     * @return
     */
    public JSONObject getScreenDetail(String templateCode) {
        String url = wlyyUrl + "/doctor/questionnaire/getAllQuestions";
        String response = "";
        Map<String, String> params = new HashMap<>();
        params.put("surveyTemplateCode", templateCode);
        try {
            response = httpClientUtil.httpPost(url, params);
        } catch (Exception e) {
            e.printStackTrace();
        String url = wlyyUrl + "/doctor/questionnaire/getAllQuestions?surveyTemplateCode=" + templateCode;
        String response = httpClientUtil.get(url, "UTF-8");
        JSONObject jsonObject = JSONObject.parseObject(response);
        if(jsonObject.getString("msg").equals("查询成功")){
            return JSONObject.parseObject(jsonObject.getString("data"));
        }
        return JSONObject.parseObject(response);
    }

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

@ -276,12 +276,13 @@ public class SynergyManageService extends BaseJpaService {
    public Map<String, Object> getWorkOrderInfo(String workorderCode, String patient, Integer role) {
        Map<String, Object> map = new HashMap<>();
        ManageSynergyWorkorderDO workorderDO = workOrderDao.findByCode(workorderCode);
        Integer status = workorderDO.getStatus();
        //存入协同服务工单信息
        map.put("code", workorderCode);
        map.put("type", workorderDO.getType());
        map.put("priority", workorderDO.getPriority());
        map.put("serviceTime", workorderDO.getServiceTime());
        map.put("status", workorderDO.getStatus());
        map.put("status", status);
        map.put("title", workorderDO.getRelationCodeName());
        map.put("remark", workorderDO.getRemark());
        map.put("createTime", workorderDO.getCreateTime());
@ -297,7 +298,7 @@ public class SynergyManageService extends BaseJpaService {
            map.put("ssc", workorderServicerDO.getSsc());
            map.put("completeTime", workorderServicerDO.getCompleteTime());
        }else {
            if(role == 3){
            if(status == 2 || status == 3){
                //获取工单完成人数
                int count = workorderServicerDao.findByWorkorderCodeCount(workorderCode, 3);
                map.put("count", count);
@ -315,26 +316,35 @@ public class SynergyManageService extends BaseJpaService {
            map.put("status", "未接收");
        }
        if(role == 3){
            //普通客服显示接收者
        if(status == 2){
            //接收者
            map.put("receiverName", workorderDO.getReceiverName());
            map.put("receiverTime", workorderDO.getReceiverTime());
            //获取负责人信息
            List<ManageSynergyWorkorderExecutorDO> managerList = workorderExecutorDao.findByWorkorderCode(workorderCode,1);
            List<ManageSynergyWorkorderExecutorDO> collaboratorList = workorderExecutorDao.findByWorkorderCode(workorderCode,2);
            String manager = managerList.size()>0 ? managerList.get(0).getExecutorName() : "";
            //获取负责人信息
            for(ManageSynergyWorkorderExecutorDO m : managerList){
                User manager = userDao.findByCode(m.getExecutorCode());
                map.put("managerName", manager.getName());
                map.put("managerJobNo", manager.getJobNo());
                map.put("managerPhone", manager.getMobile());
            }
            String collaborator = "";
            for(ManageSynergyWorkorderExecutorDO one:collaboratorList){
            for(ManageSynergyWorkorderExecutorDO one : collaboratorList){
                collaborator += "、" + one.getExecutorName();
            }
            map.put("manager", manager);//负责人
            map.put("collaboratorList", StringUtils.isNotEmpty(collaborator) ? collaborator.substring(1) : "");//参与人可能有多个
        }
        //获取处理结果
        if(workorderDO.getStatus() == 3){
            map.put("remark", workorderDO.getDealResultRemark());
        if(status == 3){
            //获取处理结果
            map.put("resultRemark", workorderDO.getDealResultRemark());
            map.put("accessory", workorderDO.getDealResultAccessory());
        }else if(status == 4){
            //获取退回原因
            map.put("returnedRemark", workorderDO.getReturnedRemark());
        }
        return map;
    }

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/survey/SurveyScreenResultService.java

@ -1145,8 +1145,8 @@ public class SurveyScreenResultService extends BaseService {
        param.put("patientInfo", patientInfos.toString());
        param.put("jsonData", object.toString());
        HttpResponse response = null;
        response = HttpUtils.doPost(customerUrl + "doctor/createWorkOrder", param);
        response = HttpUtils.doPost(customerUrl + "synergy/questionnaire/createWorkOrder", param);
        JSONObject rs = new JSONObject(response.getContent());
        return rs.getString("message");
        return rs.getString("data");
    }
}

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/survey/ManagerQuestionnaireService.java

@ -1928,9 +1928,9 @@ public class ManagerQuestionnaireService extends BaseService {
        param.put("patientInfo", patientInfo.toString());
        param.put("jsonData", object.toString());
        HttpResponse response = null;
        response = HttpUtils.doPost(customerUrl + "doctor/createWorkOrder", param);
        response = HttpUtils.doPost(customerUrl + "synergy/questionnaire/createWorkOrder", param);
        JSONObject rs = new JSONObject(response.getContent());
        return rs.getString("message");
        return rs.getString("data");
    }
    /**

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

@ -0,0 +1,33 @@
package com.yihu.wlyy.service.synergy;
import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.util.http.HttpResponse;
import com.yihu.wlyy.util.http.HttpUtils;
import org.apache.commons.collections.map.HashedMap;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Map;
/**
 * Created by humingfen on 2018/10/9.
 */
@Service
@Transactional
public class SynergyManageService extends BaseService {
    @Value("${customerService.url}")
    private String customerUrl;
    public String getWorkOrderInfo(String workorderCode, String patient, Integer role) throws Exception {
        Map<String, Object> param = new HashedMap();
        param.put("workorderCode", workorderCode);
        param.put("patient", patient);
        param.put("role", role);
        HttpResponse response = null;
        response = HttpUtils.doPost(customerUrl + "customer/getWorkOrderInfo", param);
        JSONObject rs = new JSONObject(response.getContent());
        return rs.getString("message");
    }
}

+ 40 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/synergy/SynergyManageController.java

@ -0,0 +1,40 @@
package com.yihu.wlyy.web.doctor.synergy;
import com.yihu.wlyy.service.synergy.SynergyManageService;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
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;
/**
 * Created by humingfen on 2018/10/9.
 */
@Controller
@RequestMapping(value = "/doctor/customer")
@Api(description = "集美客服系统")
public class SynergyManageController extends BaseController {
    @Autowired
    private SynergyManageService synergyManageService;
    @RequestMapping(value = "/getWorkOrderInfo", method = {RequestMethod.GET, RequestMethod.POST})
    @ApiOperation(value = "获取协同服务工单信息")
    public String getWorkOrderInfo(@ApiParam(name="workorderCode", value="协同服务工单code")
                                   @RequestParam(required = true)String workorderCode,
                                   @ApiParam(name="patient", value="居民code")
                                   @RequestParam(required = false)String patient,
                                   @ApiParam(name="role", value="1医生,2客服管理员,3普通客服")
                                   @RequestParam(required = true)Integer role){
        try {
            return write(200,"保存成功","data", synergyManageService.getWorkOrderInfo(workorderCode, patient, role));
        }catch (Exception e){
            error(e);
            return error(-1,"保存失败");
        }
    }
}