Browse Source

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

zd_123 6 years ago
parent
commit
87de3734fb
23 changed files with 390 additions and 157 deletions
  1. 18 8
      patient-co-manage/wlyy-manage/pom.xml
  2. 2 1
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/config/SpringSecurityConfig.java
  3. 17 16
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/synergy/customer/CustomerQuestionnaireController.java
  4. 5 4
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/synergy/customer/CustomerScreenResultController.java
  5. 52 9
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/synergy/customer/CustomerSynergyManageController.java
  6. 9 8
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/synergy/doctor/DoctorQuestionnaireController.java
  7. 11 6
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/synergy/doctor/DoctorSynergyManageController.java
  8. 10 11
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/synergy/ManageSynergyWorkordeReminderDO.java
  9. 4 1
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/filter/SessionOutTimeFilter.java
  10. 6 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/repository/synergy/ManageSynergyWorkorderReminderDao.java
  11. 3 1
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/repository/synergy/ManageSynergyWorkorderServicerLogDao.java
  12. 12 19
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/synergy/QuestionnaireManageService.java
  13. 10 19
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/synergy/ScreenResultManageService.java
  14. 111 36
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/synergy/SynergyManageService.java
  15. 26 5
      patient-co-manage/wlyy-manage/src/main/resources/application.yml
  16. 4 0
      patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/activemq/HealthArtListener.java
  17. 9 5
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/survey/SurveyScreenResultService.java
  18. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/jimeiJkEdu/JMJkEduArticleService.java
  19. 3 3
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/survey/ManagerQuestionnaireService.java
  20. 33 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/synergy/SynergyManageService.java
  21. 3 3
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/survey/DoctorSurveyScreenResultController.java
  22. 40 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/synergy/SynergyManageController.java
  23. 1 1
      patient-co/patient-co-wlyy/src/main/resources/application-devtest.yml

+ 18 - 8
patient-co-manage/wlyy-manage/pom.xml

@ -204,18 +204,28 @@
        <dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
            <artifactId>springfox-swagger2</artifactId>
            <version>2.4.0</version>
            <exclusions>
                <exclusion>
                    <artifactId>classmate</artifactId>
                    <groupId>com.fasterxml</groupId>
                </exclusion>
            </exclusions>
            <version>2.7.0</version>
            <!--<exclusions>-->
                <!--<exclusion>-->
                    <!--<artifactId>classmate</artifactId>-->
                    <!--<groupId>com.fasterxml</groupId>-->
                <!--</exclusion>-->
            <!--</exclusions>-->
        </dependency>
        </dependency>
        <dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
            <artifactId>springfox-swagger-ui</artifactId>
            <version>2.4.0</version>
            <version>2.7.0</version>
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-staticdocs</artifactId>
            <version>2.6.1</version>
        </dependency>
        <dependency>
            <groupId>io.github.swagger2markup</groupId>
            <artifactId>swagger2markup</artifactId>
            <version>1.3.2</version>
        </dependency>
        </dependency>
        <dependency>
        <dependency>

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

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

+ 17 - 16
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.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
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.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
/**
 * 客服端问卷调查
 * 客服端问卷调查
 * Created by Humingfen on 2018/9/29.
 * 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 {
public class CustomerQuestionnaireController extends BaseController {
    @Autowired
    @Autowired
@ -28,15 +29,14 @@ public class CustomerQuestionnaireController extends BaseController {
    @RequestMapping(value = "saveAnswer", method = RequestMethod.POST)
    @RequestMapping(value = "saveAnswer", method = RequestMethod.POST)
    @ApiOperation(value = "保存用户答案")
    @ApiOperation(value = "保存用户答案")
    public String saveAnswer( @ApiParam(value = "问卷题目及选项")@RequestParam String jsonData,
                              @ApiParam(value = "客服code")@RequestParam(value = "customerCode")String customerCode,
                              @ApiParam(value = "居民code")@RequestParam(value = "patientCode")String patientCode,
                              @ApiParam(value = "问卷标签")@RequestParam(value = "labelType")Integer labelType,
                              @ApiParam(value = "筛查入口(labelType=5时要填),0是第一次筛查 1是再次评估", defaultValue = "1")@RequestParam(value = "isAgain")int isAgain,
                              @ApiParam(value = "来源(1医生发放 2居民自我评估)")@RequestParam(value = "source")int source,
                              @ApiParam(value = "协同工单服务对象表code")@RequestParam(value = "serviceCode")String serviceCode) {
    public String saveAnswer( @ApiParam(value = "问卷题目及选项", required = true)@RequestParam String jsonData,
                              @ApiParam(value = "客服code", required = true)@RequestParam(value = "customerCode")String customerCode,
                              @ApiParam(value = "居民code", required = true)@RequestParam(value = "patientCode")String patientCode,
                              @ApiParam(value = "问卷标签", required = false)@RequestParam(value = "labelType")Integer labelType,
                              @ApiParam(value = "来源(1医生发放 2居民自我评估)", required = false, defaultValue = "1")@RequestParam(value = "source")Integer source,
                              @ApiParam(value = "协同工单服务对象表code", required = true)@RequestParam(value = "serviceCode")String serviceCode) {
        try {
        try {
            return  write(200, "保存成功!", "data", questionnaireService.saveResultAndAnswer(patientCode, labelType, customerCode, isAgain, source,jsonData, serviceCode));
            return  write(200, "保存成功!", "data", questionnaireService.saveResultAndAnswer(patientCode, labelType, customerCode, source,jsonData, serviceCode));
        } catch (Exception e) {
        } catch (Exception e) {
            e.printStackTrace();
            e.printStackTrace();
            return write(-1, "保存失败!");
            return write(-1, "保存失败!");
@ -45,7 +45,7 @@ public class CustomerQuestionnaireController extends BaseController {
    @RequestMapping(value = "getAnswers", method = RequestMethod.GET)
    @RequestMapping(value = "getAnswers", method = RequestMethod.GET)
    @ApiOperation(value = "查看调查统计结果")
    @ApiOperation(value = "查看调查统计结果")
    public String getAnswers(@ApiParam(value = "问卷code") @RequestParam String templateCode) {
    public String getAnswers(@ApiParam(value = "问卷code", required = true) @RequestParam String templateCode) {
        try {
        try {
            return write(200, "查询成功!", "data", questionnaireService.getAnswers(templateCode));
            return write(200, "查询成功!", "data", questionnaireService.getAnswers(templateCode));
        } catch (Exception e) {
        } catch (Exception e) {
@ -69,7 +69,8 @@ public class CustomerQuestionnaireController extends BaseController {
    @ApiOperation(value = "查看调查问卷内容")
    @ApiOperation(value = "查看调查问卷内容")
    public String getQuestionnaireDetail(@ApiParam(value = "调查问卷code") @RequestParam String surveyCode) {
    public String getQuestionnaireDetail(@ApiParam(value = "调查问卷code") @RequestParam String surveyCode) {
        try {
        try {
            return write(200, "查询成功!", "data", questionnaireService.getQuestionnaireDetail(surveyCode));
            com.alibaba.fastjson.JSONObject jsonObject = questionnaireService.getQuestionnaireDetail(surveyCode);
            return write(200, "查询成功!", "data", jsonObject);
        } catch (Exception e) {
        } catch (Exception e) {
            e.printStackTrace();
            e.printStackTrace();
            return write(-1, "查询失败!");
            return write(-1, "查询失败!");
@ -90,8 +91,8 @@ public class CustomerQuestionnaireController extends BaseController {
        }
        }
    }
    }
    @RequestMapping(value = "loadingInfo", method = RequestMethod.POST)
    @ApiOperation(value = "载入未完成信息")
    @RequestMapping(value = "loadingInfo", method = RequestMethod.GET)
    @ApiOperation(value = "载入异常工单信息")
    public String loadingInfo(@ApiParam(value = "协同服务工单code") @RequestParam String workorderCode,
    public String loadingInfo(@ApiParam(value = "协同服务工单code") @RequestParam String workorderCode,
                                 @ApiParam(value = "客服code") @RequestParam String customerCode) {
                                 @ApiParam(value = "客服code") @RequestParam String customerCode) {
        try {
        try {

+ 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.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
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.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
/**
 * 客服端疾病筛查
 * 客服端疾病筛查
 * Created by Humingfen on 2018/9/29.
 * 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 {
public class CustomerScreenResultController extends BaseController {
    @Autowired
    @Autowired

+ 52 - 9
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/synergy/customer/CustomerSynergyManageController.java

@ -4,13 +4,14 @@ import com.yihu.wlyy.controller.BaseController;
import com.yihu.wlyy.entity.User;
import com.yihu.wlyy.entity.User;
import com.yihu.wlyy.service.manager.user.UserService;
import com.yihu.wlyy.service.manager.user.UserService;
import com.yihu.wlyy.service.synergy.SynergyManageService;
import com.yihu.wlyy.service.synergy.SynergyManageService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
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 org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.List;
import java.util.Map;
import java.util.Map;
@ -18,16 +19,18 @@ import java.util.Map;
/**
/**
 * Created by 刘文彬 on 2018/9/27.
 * Created by 刘文彬 on 2018/9/27.
 */
 */
@RestController
@RequestMapping(value = "/customer/synergy",produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(description = "集美客服系统")
public class CustomerSynergyManageController extends BaseController {
public class CustomerSynergyManageController extends BaseController {
    @Autowired
    @Autowired
    private SynergyManageService synergyManageService;
    private SynergyManageService synergyManageService;
    @Autowired
    @Autowired
    private UserService userService;
    private UserService userService;
    @RequestMapping(value = "/getWorkOrderInfo", method = {RequestMethod.GET, RequestMethod.POST})
    @RequestMapping(value = "/getWorkOrderInfo", method = {RequestMethod.GET, RequestMethod.POST})
    @ApiOperation(value = "获取协同服务工单信息")
    @ApiOperation(value = "获取协同服务工单信息")
    public String addCallRecord(@ApiParam(name="workorderCode",value="协同服务工单code")
    public String getWorkOrderInfo(@ApiParam(name="workorderCode",value="协同服务工单code")
                                @RequestParam(required = true)String workorderCode,
                                @RequestParam(required = true)String workorderCode,
                                @ApiParam(name="patient",value="居民code")
                                @ApiParam(name="patient",value="居民code")
                                @RequestParam(required = false)String patient,
                                @RequestParam(required = false)String patient,
@ -98,15 +101,15 @@ public class CustomerSynergyManageController extends BaseController {
                                @ApiParam(name = "isAcceptTask", value = "1、我接收到的任务,2、我派发的任务,3、待接收(客服管理员),4、已接收(客服管理员)", required = true)
                                @ApiParam(name = "isAcceptTask", value = "1、我接收到的任务,2、我派发的任务,3、待接收(客服管理员),4、已接收(客服管理员)", required = true)
                                @RequestParam(value = "isAcceptTask", required = true)Integer isAcceptTask,
                                @RequestParam(value = "isAcceptTask", required = true)Integer isAcceptTask,
                                @ApiParam(name = "page", value = "第几页,从1开始", required = true)
                                @ApiParam(name = "page", value = "第几页,从1开始", required = true)
                                @RequestParam(value = "page", required = false,defaultValue = "1")Integer page,
                                @RequestParam(value = "page", required = true,defaultValue = "1")Integer page,
                                @ApiParam(name = "pageSize", value = "每页分页大小", required = true)
                                @ApiParam(name = "pageSize", value = "每页分页大小", required = true)
                                @RequestParam(value = "pageSize", required = false,defaultValue = "10")Integer pageSize){
                                @RequestParam(value = "pageSize", required = true,defaultValue = "10")Integer pageSize){
        try {
        try {
            if(!StringUtils.isNotEmpty(userCode)){
            if(!StringUtils.isNotEmpty(userCode)){
                userCode = getUID();
                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);
            Map<String,Object> result = synergyManageService.workorderList(userCode,keywords,workorderType,isMyTask,status,priority,timeout,workorderCode,
                    principal,serviceStartTime,serviceEndTime,patientName,ssc,idcard,userType,isAcceptTask,page,pageSize);
            return write(200, "获取成功", "data", result);
            return write(200, "获取成功", "data", result);
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            error(e);
@ -138,4 +141,44 @@ public class CustomerSynergyManageController extends BaseController {
            return error(-1,"取号失败");
            return error(-1,"取号失败");
        }
        }
    }
    }
    @RequestMapping(value = "/reminderList", method = RequestMethod.GET)
    @ApiOperation(value = "获取催单列表")
    public String reminderList(@ApiParam(name="userCode",value="客服code",required = false)
                               @RequestParam(required = false)String userCode,
                               @ApiParam(name="receiveType",value="客服角色(1、客服,2、客服负责人)",required = false)
                               @RequestParam(required = false)Integer receiveType,
                               @ApiParam(name="sortType",value="排序(1、升序,2、降序)",required = false,defaultValue = "1")
                               @RequestParam(required = false,defaultValue = "1")Integer sortType){
        try{
            if(!StringUtils.isNotEmpty(userCode)){
                userCode = getUID();
            }
            List<Map<String,Object>> resultList = synergyManageService.reminderList(userCode,receiveType,sortType);
            return write(200,"获取成功","data", resultList);
        }catch (Exception e){
            error(e);
            return error(-1,"获取失败");
        }
    }
    @RequestMapping(value = "/workorderRate", method = RequestMethod.GET)
    @ApiOperation(value = "任务进度")
    public String workorderRate(@ApiParam(name="userCode",value="客服code",required = false)
                                @RequestParam(required = false)String userCode,
                                @ApiParam(name="workorderCode",value="协同服务工单code",required = true)
                                @RequestParam(required = true)String workorderCode){
        try{
            if(!StringUtils.isNotEmpty(userCode)){
                userCode = getUID();
            }
            Map<String,Object> resultMap = synergyManageService.workorderRate(workorderCode,userCode);
            return write(200,"获取成功","data", resultMap);
        }catch (Exception e){
            error(e);
            return error(-1,"获取失败");
        }
    }
}
}

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

@ -6,24 +6,25 @@ import com.yihu.wlyy.controller.BaseController;
import com.yihu.wlyy.entity.synergy.ManageSynergyWorkorderDO;
import com.yihu.wlyy.entity.synergy.ManageSynergyWorkorderDO;
import com.yihu.wlyy.entity.synergy.ManageSynergyWorkorderServicerDO;
import com.yihu.wlyy.entity.synergy.ManageSynergyWorkorderServicerDO;
import com.yihu.wlyy.service.synergy.QuestionnaireManageService;
import com.yihu.wlyy.service.synergy.QuestionnaireManageService;
import com.yihu.wlyy.service.synergy.SynergyManageService;
import io.swagger.annotations.Api;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
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.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.text.SimpleDateFormat;
import java.util.List;
import java.util.List;
/**
/**
 * 管理端问卷调查
 * 管理端问卷调查
 * Created by humingfen on 2018/9/27.
 * Created by humingfen on 2018/9/27.
 */
 */
@Controller
@RequestMapping(value = "/doctor")
@RestController
@RequestMapping(value = "/synergy/questionnaire", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(description = "医生端-派发协同服务")
@Api(description = "医生端-派发协同服务")
public class DoctorQuestionnaireController extends BaseController {
public class DoctorQuestionnaireController extends BaseController {
@ -31,8 +32,6 @@ public class DoctorQuestionnaireController extends BaseController {
    ObjectMapper objectMapper;
    ObjectMapper objectMapper;
    @Autowired
    @Autowired
    private QuestionnaireManageService questionnaireService;
    private QuestionnaireManageService questionnaireService;
    @Autowired
    private SynergyManageService synergyManageService;
    @RequestMapping(value = "/createWorkOrder", method = {RequestMethod.GET, RequestMethod.POST})
    @RequestMapping(value = "/createWorkOrder", method = {RequestMethod.GET, RequestMethod.POST})
    @ApiOperation(value = "派发协同服务")
    @ApiOperation(value = "派发协同服务")
@ -41,8 +40,10 @@ public class DoctorQuestionnaireController extends BaseController {
                                @ApiParam(name="patientInfo",value="居民信息json字符串")
                                @ApiParam(name="patientInfo",value="居民信息json字符串")
                                    @RequestParam(required = true)String patientInfo){
                                    @RequestParam(required = true)String patientInfo){
        try {
        try {
            ManageSynergyWorkorderDO manageSynergyWorkorderDO = objectMapper.readValue(jsonData, ManageSynergyWorkorderDO.class);
            List<ManageSynergyWorkorderServicerDO>  manageSynergyWorkorderServicerDOS = objectMapper.readValue(patientInfo, new TypeReference<List<ManageSynergyWorkorderServicerDO>>(){});
            ObjectMapper object = new ObjectMapper();
            object.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm"));
            ManageSynergyWorkorderDO manageSynergyWorkorderDO = object.readValue(jsonData, ManageSynergyWorkorderDO.class);
            List<ManageSynergyWorkorderServicerDO>  manageSynergyWorkorderServicerDOS = object.readValue(patientInfo, new TypeReference<List<ManageSynergyWorkorderServicerDO>>(){});
            return write(200,"保存成功","data",questionnaireService.createWorkOrder(manageSynergyWorkorderDO, manageSynergyWorkorderServicerDOS));
            return write(200,"保存成功","data",questionnaireService.createWorkOrder(manageSynergyWorkorderDO, manageSynergyWorkorderServicerDOS));
        }catch (Exception e){
        }catch (Exception e){
            error(e);
            error(e);

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

@ -2,10 +2,12 @@ package com.yihu.wlyy.controller.synergy.doctor;
import com.yihu.wlyy.controller.BaseController;
import com.yihu.wlyy.controller.BaseController;
import com.yihu.wlyy.service.synergy.SynergyManageService;
import com.yihu.wlyy.service.synergy.SynergyManageService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
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.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestParam;
@ -16,6 +18,9 @@ import java.util.Map;
/**
/**
 * Created by 刘文彬 on 2018/9/27.
 * Created by 刘文彬 on 2018/9/27.
 */
 */
@Controller
@RequestMapping(value = "/doctor/synergy")
@Api(description = "医生端-协同服务")
public class DoctorSynergyManageController extends BaseController {
public class DoctorSynergyManageController extends BaseController {
    @Autowired
    @Autowired
@ -43,8 +48,8 @@ public class DoctorSynergyManageController extends BaseController {
            if(!StringUtils.isNotEmpty(userCode)){
            if(!StringUtils.isNotEmpty(userCode)){
                userCode = getUID();
                userCode = getUID();
            }
            }
            List<Map<String,Object>> result = synergyManageService.workorderList(userCode,null,workorderType,null,status,null,null,null,
                    null,serviceStartTime,serviceEndTime,null,null,null,1,isAcceptTask);
            Map<String,Object> result = synergyManageService.workorderList(userCode,null,workorderType,null,status,null,null,null,
                    null,serviceStartTime,serviceEndTime,null,null,null,1,isAcceptTask,page,pageSize);
            return write(200, "获取成功", "data", result);
            return write(200, "获取成功", "data", result);
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            error(e);
@ -52,17 +57,17 @@ public class DoctorSynergyManageController extends BaseController {
        }
        }
    }
    }
    @RequestMapping(value = "reminder", method = RequestMethod.GET)
    @RequestMapping(value = "reminder", method = RequestMethod.POST)
    @ApiOperation("医生端-催单")
    @ApiOperation("医生端-催单")
    public String reminder(@ApiParam(name = "userCode", value = "医生code", required = false)
    public String reminder(@ApiParam(name = "userCode", value = "医生code", required = false)
                           @RequestParam(value = "userCode", required = false)String userCode,
                           @RequestParam(value = "userCode", required = false)String userCode,
                           @ApiParam(name = "workorderServicerCode", value = "服务对象code", required = true)
                           @RequestParam(value = "workorderServicerCode", required = true)String workorderServicerCode){
                           @ApiParam(name = "workorderCode", value = "协同服务工单code", required = true)
                           @RequestParam(value = "workorderCode", required = true)String workorderCode){
        try {
        try {
            if(!StringUtils.isNotEmpty(userCode)){
            if(!StringUtils.isNotEmpty(userCode)){
                userCode = getUID();
                userCode = getUID();
            }
            }
            synergyManageService.reminder(workorderServicerCode,userCode,1);
            synergyManageService.reminder(workorderCode,userCode,1);
            return write(200, "请求成功");
            return write(200, "请求成功");
        }catch (Exception e){
        }catch (Exception e){
            error(e);
            error(e);

+ 10 - 11
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/synergy/ManageSynergyWorkordeReminderDO.java

@ -16,7 +16,6 @@ import java.util.Date;
public class ManageSynergyWorkordeReminderDO extends IdEntity {
public class ManageSynergyWorkordeReminderDO extends IdEntity {
    private String code;
    private String code;
    private String workorderCode;//协同服务工单code
    private String workorderCode;//协同服务工单code
    private String servicePatientCode;//协同服务对象code
    private String createUser;//创建人code
    private String createUser;//创建人code
    private String createUserName;//创建者姓名
    private String createUserName;//创建者姓名
    private Integer createUserType;//创建人类型(1、医生,2、客服,3、客服负责人)
    private Integer createUserType;//创建人类型(1、医生,2、客服,3、客服负责人)
@ -32,7 +31,7 @@ public class ManageSynergyWorkordeReminderDO extends IdEntity {
    private String servicerKey;//服务对象其中五个人
    private String servicerKey;//服务对象其中五个人
    private String workorderRemark;//备注
    private String workorderRemark;//备注
    private Integer dealWith;//0、未处理,1、已处理
    private Integer dealWith;//0、未处理,1、已处理
    private Integer priority;//工单优先级(0、普通,1、加急)
    @Column(name = "code")
    @Column(name = "code")
    public String getCode() {
    public String getCode() {
        return code;
        return code;
@ -51,15 +50,6 @@ public class ManageSynergyWorkordeReminderDO extends IdEntity {
        this.workorderCode = workorderCode;
        this.workorderCode = workorderCode;
    }
    }
    @Column(name = "service_patient_code")
    public String getServicePatientCode() {
        return servicePatientCode;
    }
    public void setServicePatientCode(String servicePatientCode) {
        this.servicePatientCode = servicePatientCode;
    }
    @Column(name = "create_user")
    @Column(name = "create_user")
    public String getCreateUser() {
    public String getCreateUser() {
        return createUser;
        return createUser;
@ -194,4 +184,13 @@ public class ManageSynergyWorkordeReminderDO extends IdEntity {
    public void setDealWith(Integer dealWith) {
    public void setDealWith(Integer dealWith) {
        this.dealWith = dealWith;
        this.dealWith = dealWith;
    }
    }
    @Column(name = "priority")
    public Integer getPriority() {
        return priority;
    }
    public void setPriority(Integer priority) {
        this.priority = priority;
    }
}
}

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

@ -1,5 +1,6 @@
package com.yihu.wlyy.filter;
package com.yihu.wlyy.filter;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Component;
import org.springframework.web.filter.OncePerRequestFilter;
import org.springframework.web.filter.OncePerRequestFilter;
@ -15,6 +16,7 @@ import java.io.IOException;
 * @created 2016/3/26
 * @created 2016/3/26
 */
 */
@Component("loginFilter")
@Component("loginFilter")
@Profile({ "prod"})
public class SessionOutTimeFilter extends OncePerRequestFilter {
public class SessionOutTimeFilter extends OncePerRequestFilter {
    @Override
    @Override
@ -27,7 +29,8 @@ public class SessionOutTimeFilter extends OncePerRequestFilter {
                || path.indexOf("/svr-iot") != -1
                || path.indexOf("/svr-iot") != -1
                || path.indexOf(httpServletRequest.getContextPath() + "/static") != -1
                || path.indexOf(httpServletRequest.getContextPath() + "/static") != -1
                || path.indexOf("swagger") != -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);
            filterChain.doFilter(httpServletRequest, httpServletResponse);
            return;
            return;
        }
        }

+ 6 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/repository/synergy/ManageSynergyWorkorderReminderDao.java

@ -1,10 +1,16 @@
package com.yihu.wlyy.repository.synergy;
package com.yihu.wlyy.repository.synergy;
import com.yihu.wlyy.entity.synergy.ManageSynergyWorkordeReminderDO;
import com.yihu.wlyy.entity.synergy.ManageSynergyWorkordeReminderDO;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.PagingAndSortingRepository;
import com.yihu.wlyy.entity.synergy.ManageSynergyWorkorderExecutorDO;
import java.util.List;
/**
/**
 * Created by 刘文彬 on 2018/10/8.
 * Created by 刘文彬 on 2018/10/8.
 */
 */
public interface ManageSynergyWorkorderReminderDao extends PagingAndSortingRepository<ManageSynergyWorkordeReminderDO, Long> {
public interface ManageSynergyWorkorderReminderDao extends PagingAndSortingRepository<ManageSynergyWorkordeReminderDO, Long> {
    List<ManageSynergyWorkordeReminderDO> findByPrincipalCodeAndDealWith(String principalCode,Integer dealWith);
}
}

+ 3 - 1
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/repository/synergy/ManageSynergyWorkorderServicerLogDao.java

@ -1,6 +1,7 @@
package com.yihu.wlyy.repository.synergy;
package com.yihu.wlyy.repository.synergy;
import com.yihu.wlyy.entity.synergy.ManageSynergyWorkorderServicerLogDO;
import com.yihu.wlyy.entity.synergy.ManageSynergyWorkorderServicerLogDO;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
/**
@ -8,5 +9,6 @@ import org.springframework.data.repository.PagingAndSortingRepository;
 */
 */
public interface ManageSynergyWorkorderServicerLogDao extends PagingAndSortingRepository<ManageSynergyWorkorderServicerLogDO, Long> {
public interface ManageSynergyWorkorderServicerLogDao extends PagingAndSortingRepository<ManageSynergyWorkorderServicerLogDO, Long> {
    @Query("select count(distinct l.servicePatientCode) from ManageSynergyWorkorderServicerLogDO l where l.workorderCode=?1 and l.followUp=2 ")
    Integer findByWorkorderCode(String workorderCode);
}
}

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

@ -50,7 +50,7 @@ public class QuestionnaireManageService extends BaseJpaService {
     * @return
     * @return
     */
     */
    public boolean createWorkOrder(ManageSynergyWorkorderDO workorderDO, List<ManageSynergyWorkorderServicerDO> workorderServicerDOS) {
    public boolean createWorkOrder(ManageSynergyWorkorderDO workorderDO, List<ManageSynergyWorkorderServicerDO> workorderServicerDOS) {
        String servicer = null;
        String servicer = "";
        int size = workorderServicerDOS.size();
        int size = workorderServicerDOS.size();
        int len = 0;
        int len = 0;
        if(size > 5){
        if(size > 5){
@ -91,12 +91,11 @@ public class QuestionnaireManageService extends BaseJpaService {
     * @param patientCode
     * @param patientCode
     * @param labelType
     * @param labelType
     * @param customerCode
     * @param customerCode
     * @param isAgain
     * @param source
     * @param source
     * @param jsonData
     * @param jsonData
     * @param serviceCode
     * @param serviceCode
     */
     */
    public String saveResultAndAnswer(String patientCode, Integer labelType, String customerCode, int isAgain, int source, String jsonData, String serviceCode) {
    public String saveResultAndAnswer(String patientCode, Integer labelType, String customerCode, Integer source, String jsonData, String serviceCode) {
        String url = wlyyUrl + "doctor/questionnaire/saveResultAndAnswer";
        String url = wlyyUrl + "doctor/questionnaire/saveResultAndAnswer";
        String response = "";
        String response = "";
        Map<String, Object> params = new HashMap<>();
        Map<String, Object> params = new HashMap<>();
@ -124,14 +123,11 @@ public class QuestionnaireManageService extends BaseJpaService {
     * @return
     * @return
     */
     */
    public JSONObject getAnswers(String templateCode) {
    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);
        return JSONObject.parseObject(response);
    }
    }
@ -169,14 +165,11 @@ public class QuestionnaireManageService extends BaseJpaService {
    }
    }
    public JSONObject getQuestionnaireDetail(String surveyCode) {
    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);
        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.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap;
import java.util.Map;
/**
/**
 * Created by humingfen on 2018/09/29.
 * Created by humingfen on 2018/09/29.
 */
 */
@ -28,14 +25,11 @@ public class ScreenResultManageService {
     * @return
     * @return
     */
     */
    public JSONObject getScreenResultDetail(String code) {
    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);
        return JSONObject.parseObject(response);
    }
    }
@ -46,14 +40,11 @@ public class ScreenResultManageService {
     * @return
     * @return
     */
     */
    public JSONObject getScreenDetail(String templateCode) {
    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);
        return JSONObject.parseObject(response);
    }
    }

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

@ -44,8 +44,6 @@ public class SynergyManageService extends BaseJpaService {
    @Autowired
    @Autowired
    private UserDao userDao;
    private UserDao userDao;
    @Autowired
    @Autowired
    private ManageSynergyWorkorderCustomerLogDao manageSynergyWorkorderCustomerLogDao;
    @Autowired
    private PatientDao patientDao;
    private PatientDao patientDao;
    @Autowired
    @Autowired
    private SignFamilyDao signFamilyDao;
    private SignFamilyDao signFamilyDao;
@ -57,6 +55,8 @@ public class SynergyManageService extends BaseJpaService {
    private DoctorDao doctorDao;
    private DoctorDao doctorDao;
    @Autowired
    @Autowired
    private ManageSynergyWorkorderReminderDao manageSynergyWorkorderReminderDao;
    private ManageSynergyWorkorderReminderDao manageSynergyWorkorderReminderDao;
    @Autowired
    private ManageSynergyWorkorderServicerLogDao manageSynergyWorkorderServicerLogDao;
    /**
    /**
     * 根据服务编码获取工单
     * 根据服务编码获取工单
@ -88,17 +88,18 @@ public class SynergyManageService extends BaseJpaService {
     * @return
     * @return
     * @throws Exception
     * @throws Exception
     */
     */
    public List<Map<String,Object>> workorderList(String code,String keywords,Integer workorderType,
    public Map<String,Object> workorderList(String code,String keywords,Integer workorderType,
                               Integer isMyTask,Integer status,Integer priority,Integer timeout,String workorderCode,
                               Integer isMyTask,Integer status,Integer priority,Integer timeout,String workorderCode,
                               String principal,String serviceStartTime,String serviceEndTime,
                               String principal,String serviceStartTime,String serviceEndTime,
                               String patientName,String ssc,String idcard,Integer userType,Integer isAcceptTask) throws Exception{
                               String patientName,String ssc,String idcard,Integer userType,Integer isAcceptTask,Integer page, Integer pageSize) throws Exception{
        String servicerTable = "";
        String servicerTable = " left join wlyy.manage_synergy_workorder_executor e on e.workorder_code=w.code AND e.del = 1  " ;
        String whereSql = "";
        String whereSql = "";
        if(userType==3){//客服管理员
        if(userType==3){//客服管理员
            whereSql +=" and w.create_user_type=1 ";//创建人为医生
            whereSql +=" and w.create_user_type=1 ";//创建人为医生
            if(isAcceptTask==3){//待接收
            if(isAcceptTask==3){//待接收
                whereSql +=" and w.status =1 ";
                whereSql +=" and w.status =1 ";
                servicerTable ="";
            }else if(isAcceptTask==4){//已接收
            }else if(isAcceptTask==4){//已接收
                whereSql +=" and w.status in (2,3) ";
                whereSql +=" and w.status in (2,3) ";
            }
            }
@ -175,10 +176,16 @@ public class SynergyManageService extends BaseJpaService {
            whereSql+=" s.idcard like '%"+keywords+"%' ";
            whereSql+=" s.idcard like '%"+keywords+"%' ";
        }
        }
        String sql =" select DISTINCT w.* from wlyy.manage_synergy_workorder w  " +servicerTable+
        String sql =" select DISTINCT w.* from wlyy.manage_synergy_workorder w  " +servicerTable+
                " left join wlyy.vmanage_synergy_workorder_executor e on e.workorder_code=w.code " +
                " where w.status in (2,3) and w.del=1  " +
                " and e.del=1 "+whereSql+ " order by w.priority desc,w.service_time desc";
        List<Map<String,Object>> resultWorkorderList = jdbcTemplate.queryForList(sql);
                " where w.del=1  " +
                " and 1=1 "+whereSql+ " order by w.priority desc,w.service_time desc";
        List<Map<String,Object>> rstotal = jdbcTemplate.queryForList(sql);
        int count = 0;
        if(rstotal!=null&&rstotal.size()>0&&rstotal.get(0).get("id")!=null){
            count = rstotal.size();
        }
        String finalSql = sql+" LIMIT "+(page-1)*pageSize+","+pageSize;
        List<Map<String,Object>> resultWorkorderList = jdbcTemplate.queryForList(finalSql);
        List<Map<String,Object>> resultList = new ArrayList<>();
        List<Map<String,Object>> resultList = new ArrayList<>();
        for(Map<String,Object> one : resultWorkorderList){
        for(Map<String,Object> one : resultWorkorderList){
            Map<String,Object> map = new HashMap<>();
            Map<String,Object> map = new HashMap<>();
@ -221,7 +228,12 @@ public class SynergyManageService extends BaseJpaService {
            map.put("finishedServicerCount",finishedServicerCount);//服务完成人数
            map.put("finishedServicerCount",finishedServicerCount);//服务完成人数
            resultList.add(map);
            resultList.add(map);
        }
        }
        return resultList;
        Map<String,Object> resultMap = new HashMap<>();
        resultMap.put("currPage",page);
        resultMap.put("pageSize",pageSize);
        resultMap.put("totalCount",count);
        resultMap.put("detailModelList",resultList);
        return resultMap;
    }
    }
    /**
    /**
@ -276,12 +288,13 @@ public class SynergyManageService extends BaseJpaService {
    public Map<String, Object> getWorkOrderInfo(String workorderCode, String patient, Integer role) {
    public Map<String, Object> getWorkOrderInfo(String workorderCode, String patient, Integer role) {
        Map<String, Object> map = new HashMap<>();
        Map<String, Object> map = new HashMap<>();
        ManageSynergyWorkorderDO workorderDO = workOrderDao.findByCode(workorderCode);
        ManageSynergyWorkorderDO workorderDO = workOrderDao.findByCode(workorderCode);
        Integer status = workorderDO.getStatus();
        //存入协同服务工单信息
        //存入协同服务工单信息
        map.put("code", workorderCode);
        map.put("code", workorderCode);
        map.put("type", workorderDO.getType());
        map.put("type", workorderDO.getType());
        map.put("priority", workorderDO.getPriority());
        map.put("priority", workorderDO.getPriority());
        map.put("serviceTime", workorderDO.getServiceTime());
        map.put("serviceTime", workorderDO.getServiceTime());
        map.put("status", workorderDO.getStatus());
        map.put("status", status);
        map.put("title", workorderDO.getRelationCodeName());
        map.put("title", workorderDO.getRelationCodeName());
        map.put("remark", workorderDO.getRemark());
        map.put("remark", workorderDO.getRemark());
        map.put("createTime", workorderDO.getCreateTime());
        map.put("createTime", workorderDO.getCreateTime());
@ -297,7 +310,7 @@ public class SynergyManageService extends BaseJpaService {
            map.put("ssc", workorderServicerDO.getSsc());
            map.put("ssc", workorderServicerDO.getSsc());
            map.put("completeTime", workorderServicerDO.getCompleteTime());
            map.put("completeTime", workorderServicerDO.getCompleteTime());
        }else {
        }else {
            if(role == 3){
            if(status == 2 || status == 3){
                //获取工单完成人数
                //获取工单完成人数
                int count = workorderServicerDao.findByWorkorderCodeCount(workorderCode, 3);
                int count = workorderServicerDao.findByWorkorderCodeCount(workorderCode, 3);
                map.put("count", count);
                map.put("count", count);
@ -315,26 +328,35 @@ public class SynergyManageService extends BaseJpaService {
            map.put("status", "未接收");
            map.put("status", "未接收");
        }
        }
        if(role == 3){
            //普通客服显示接收者
        if(status == 2){
            //接收者
            map.put("receiverName", workorderDO.getReceiverName());
            map.put("receiverName", workorderDO.getReceiverName());
            map.put("receiverTime", workorderDO.getReceiverTime());
            map.put("receiverTime", workorderDO.getReceiverTime());
            //获取负责人信息
            //获取负责人信息
            List<ManageSynergyWorkorderExecutorDO> managerList = workorderExecutorDao.findByWorkorderCode(workorderCode,1);
            List<ManageSynergyWorkorderExecutorDO> managerList = workorderExecutorDao.findByWorkorderCode(workorderCode,1);
            List<ManageSynergyWorkorderExecutorDO> collaboratorList = workorderExecutorDao.findByWorkorderCode(workorderCode,2);
            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 = "";
            String collaborator = "";
            for(ManageSynergyWorkorderExecutorDO one:collaboratorList){
            for(ManageSynergyWorkorderExecutorDO one : collaboratorList){
                collaborator += "、" + one.getExecutorName();
                collaborator += "、" + one.getExecutorName();
            }
            }
            map.put("manager", manager);//负责人
            map.put("collaboratorList", StringUtils.isNotEmpty(collaborator) ? collaborator.substring(1) : "");//参与人可能有多个
            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());
            map.put("accessory", workorderDO.getDealResultAccessory());
        }else if(status == 4){
            //获取退回原因
            map.put("returnedRemark", workorderDO.getReturnedRemark());
        }
        }
        return map;
        return map;
    }
    }
@ -597,14 +619,14 @@ public class SynergyManageService extends BaseJpaService {
     * @param workorderCode
     * @param workorderCode
     * @param userCode
     * @param userCode
     */
     */
    public void workorderRate(String workorderCode,String userCode){
    public Map<String,Object> workorderRate(String workorderCode,String userCode){
        Map<String,Object> resultMap = new HashMap<>();
        Map<String,Object> resultMap = new HashMap<>();
        //完成情况
        //完成情况
        //1、有效
        //1、有效
        Integer validCount = workorderServicerDao.findByWorkorderCodeCount(workorderCode,3);
        Integer validCount = workorderServicerDao.findByWorkorderCodeCount(workorderCode,3);
        resultMap.put("validCount",validCount);
        resultMap.put("validCount",validCount);
        //2、无效
        //2、无效
        resultMap.put("invalidCount","");
        resultMap.put("invalidCount",0);
        //3、总数
        //3、总数
        ManageSynergyWorkorderDO manageSynergyWorkorder = workOrderDao.findByCode(workorderCode);
        ManageSynergyWorkorderDO manageSynergyWorkorder = workOrderDao.findByCode(workorderCode);
        resultMap.put("allCount",manageSynergyWorkorder.getServicerCount());
        resultMap.put("allCount",manageSynergyWorkorder.getServicerCount());
@ -612,27 +634,28 @@ public class SynergyManageService extends BaseJpaService {
        Integer myFinishedCount = workorderServicerDao.countByWorkorderCodeAndExecutorCodeAndStatus(workorderCode,userCode,3);
        Integer myFinishedCount = workorderServicerDao.countByWorkorderCodeAndExecutorCodeAndStatus(workorderCode,userCode,3);
        resultMap.put("myFinishedCount",myFinishedCount);
        resultMap.put("myFinishedCount",myFinishedCount);
        //待跟进
        //待跟进
        resultMap.put("followCount","");
        Integer followCount = manageSynergyWorkorderServicerLogDao.findByWorkorderCode(workorderCode);
        resultMap.put("followCount",followCount);
        return resultMap;
    }
    }
    /**
    /**
     * 催单
     * 催单
     * @param workorderServicerCode
     * @param workorderCode
     * @param userCode
     * @param userCode
     * @param userType
     * @param userType
     * @throws Exception
     * @throws Exception
     */
     */
    @Transactional
    @Transactional
    public void reminder(String workorderServicerCode,String userCode,Integer userType) throws Exception{
    public void reminder(String workorderCode,String userCode,Integer userType) throws Exception{
        ManageSynergyWorkorderServicerDO manageSynergyWorkorderServicerDO = workorderServicerDao.findByCode(workorderServicerCode);
        if(manageSynergyWorkorderServicerDO==null){
        ManageSynergyWorkorderDO manageSynergyWorkorderDO = workOrderDao.findByCode(workorderCode);
        if(manageSynergyWorkorderDO==null){
            throw new Exception();
            throw new Exception();
        }
        }
        ManageSynergyWorkordeReminderDO workordeReminderDO = new ManageSynergyWorkordeReminderDO();
        ManageSynergyWorkordeReminderDO workordeReminderDO = new ManageSynergyWorkordeReminderDO();
        workordeReminderDO.setCode(getCode());
        workordeReminderDO.setCode(getCode());
        workordeReminderDO.setWorkorderCode(manageSynergyWorkorderServicerDO.getWorkorderCode());
        workordeReminderDO.setServicePatientCode(workorderServicerCode);
        workordeReminderDO.setWorkorderCode(workorderCode);
        workordeReminderDO.setCreateUser(userCode);
        workordeReminderDO.setCreateUser(userCode);
        //创建人类型(1、医生,2、客服,3、客服负责人)
        //创建人类型(1、医生,2、客服,3、客服负责人)
        if(userType==1){
        if(userType==1){
@ -643,23 +666,75 @@ public class SynergyManageService extends BaseJpaService {
            workordeReminderDO.setCreateUserName(user.getName());
            workordeReminderDO.setCreateUserName(user.getName());
        }
        }
        workordeReminderDO.setCreateUserType(userType);
        workordeReminderDO.setCreateUserType(userType);
        workordeReminderDO.setHospital(manageSynergyWorkorderServicerDO.getHospital());
        workordeReminderDO.setHospitalName(manageSynergyWorkorderServicerDO.getHospitalName());
        workordeReminderDO.setHospital(manageSynergyWorkorderDO.getHospital());
        workordeReminderDO.setHospitalName(manageSynergyWorkorderDO.getHospitalName());
        workordeReminderDO.setCreateTime(new Date());
        workordeReminderDO.setCreateTime(new Date());
        List<ManageSynergyWorkorderExecutorDO> list = workorderExecutorDao.findByWorkorderCode(manageSynergyWorkorderServicerDO.getWorkorderCode(),1);
        List<ManageSynergyWorkorderExecutorDO> list = workorderExecutorDao.findByWorkorderCode(workorderCode,1);
        if(list!=null&&list.size()>0){
        if(list!=null&&list.size()>0){
            workordeReminderDO.setPrincipalCode(list.get(0).getExecutorCode());
            workordeReminderDO.setPrincipalCode(list.get(0).getExecutorCode());
            workordeReminderDO.setPrincipalName(list.get(0).getExecutorName());
            workordeReminderDO.setPrincipalName(list.get(0).getExecutorName());
        }
        }
        workordeReminderDO.setWorkorderType(manageSynergyWorkorderServicerDO.getWorkorderType());
        workordeReminderDO.setRelationCode(manageSynergyWorkorderServicerDO.getRelationCode());
        workordeReminderDO.setRelationCodeName(manageSynergyWorkorderServicerDO.getRelationCodeName());
        ManageSynergyWorkorderDO manageSynergyWorkorderDO = workOrderDao.findByCode(manageSynergyWorkorderServicerDO.getWorkorderCode());
        workordeReminderDO.setWorkorderType(manageSynergyWorkorderDO.getType());
        workordeReminderDO.setRelationCode(manageSynergyWorkorderDO.getRelationCode());
        workordeReminderDO.setRelationCodeName(manageSynergyWorkorderDO.getRelationCodeName());
        workordeReminderDO.setServiceTime(manageSynergyWorkorderDO!=null?manageSynergyWorkorderDO.getServiceTime():null);
        workordeReminderDO.setServiceTime(manageSynergyWorkorderDO!=null?manageSynergyWorkorderDO.getServiceTime():null);
        workordeReminderDO.setServicerKey(manageSynergyWorkorderDO!=null?manageSynergyWorkorderDO.getServicerKey():null);
        workordeReminderDO.setServicerKey(manageSynergyWorkorderDO!=null?manageSynergyWorkorderDO.getServicerKey():null);
        workordeReminderDO.setWorkorderRemark(manageSynergyWorkorderDO!=null?manageSynergyWorkorderDO.getRemark():null);
        workordeReminderDO.setWorkorderRemark(manageSynergyWorkorderDO!=null?manageSynergyWorkorderDO.getRemark():null);
        workordeReminderDO.setDealWith(0);
        workordeReminderDO.setDealWith(0);
        workordeReminderDO.setPriority(manageSynergyWorkorderDO.getPriority());
        manageSynergyWorkorderReminderDao.save(workordeReminderDO);
        manageSynergyWorkorderReminderDao.save(workordeReminderDO);
    }
    }
    /**
     * 催单列表
     * @param userCode
     * @param receiveType 1、客服,2、客服负责人
     * @param sortType 1、升序,2、降序
     */
    public List<Map<String,Object>> reminderList(String userCode,Integer receiveType,Integer sortType){
        String sql ="";
        String sort ="";
        if(sortType==1){
            sort=" order by r.create_time asc ";
        }else if(sortType==2){
            sort=" order by r.create_time desc ";
        }
        if(receiveType==1){
            sql =" select DISTINCT r.* from manage_synergy_workorder_reminder r " +
                 " LEFT JOIN manage_synergy_workorder_executor e on r.workorder_code=e.workorder_code " +
                 " where e.executor_code='' and e.del=1 and r.deal_with=0 " +sort;
        }else if(receiveType==2){
            sql =" select r.* from manage_synergy_workorder_reminder r where r.principal_code='"+userCode+"' and r.deal_with=0 "+sort;
        }
        List<Map<String,Object>> List = jdbcTemplate.queryForList(sql);
        List<Map<String,Object>> resultList = new ArrayList<>();
        for(Map<String,Object> one:List){
            Map<String,Object> resultMap = new HashMap<>();
            resultMap.put("workorderCode",one.get("workorder_code"));
            resultMap.put("title","来自"+one.get("create_user_name")+"医生("+one.get("hospital_name")+")催单,请尽快处理(服务编号:)"+one.get("workorder_code"));//标题
            String workorderTypeName ="";
            Integer workorderType = (Integer) one.get("workorder_type");
            switch (workorderType){
                case 0: workorderTypeName="咨询";break;
                case 1: workorderTypeName="健康教育";break;
                case 2: workorderTypeName="预约";break;
                case 3: workorderTypeName="随访";break;
                case 4: workorderTypeName="问卷调查";break;
                case 5: workorderTypeName="疾病筛查";break;
            }
            resultMap.put("workorderTypeName",workorderTypeName);
            resultMap.put("workorderType",one.get("workorder_type"));
            resultMap.put("priority",one.get("priority"));
            resultMap.put("relationCodeName",one.get("relation_code_name"));
            resultMap.put("serviceTime",DateUtil.dateToStr((Date)one.get("service_time"),"yyyy-MM-dd HH:mm:ss"));
            resultMap.put("reminderTime",DateUtil.dateToStr((Date)one.get("create_time"),"yyyy-MM-dd HH:mm:ss"));
            resultMap.put("servicerKey",one.get("servicer_key"));
            resultMap.put("workorderRemark",one.get("workorder_remark"));
            Integer overTimeFlag = isServiceOverTime((Date)one.get("service_time"));
            resultMap.put("overTimeFlag",overTimeFlag);
            resultList.add(resultMap);
        }
        return resultList;
    }
}
}

+ 26 - 5
patient-co-manage/wlyy-manage/src/main/resources/application.yml

@ -106,7 +106,7 @@ healthbank:
#  url: http://192.168.131.133:10051/svr-health-bank/
#  url: http://192.168.131.133:10051/svr-health-bank/
#i健康1.0接口
#i健康1.0接口
wlyy:
wlyy:
  url: http://localhost:8080/wlyy/
  url: http://localhost:8080/
wechat:
wechat:
  appId: wxd03f859efdf0873d
  appId: wxd03f859efdf0873d
  appSecret: 2935b54b53a957d9516c920a544f2537
  appSecret: 2935b54b53a957d9516c920a544f2537
@ -165,8 +165,14 @@ es:
  host:  http://172.19.103.68:9200
  host:  http://172.19.103.68:9200
  tHost: 172.19.103.68:9300
  tHost: 172.19.103.68:9300
  clusterName: jkzl
  clusterName: jkzl
pushMes:
  # 1为推送redis,0为推送消息队列
  method: 0
  # redis队列名称
  redis_prescription_title: redisPrescription
putMesType:
  #推送到redis消息类型
  wechat: wechat
---
---
spring:
spring:
  profiles: test
  profiles: test
@ -217,7 +223,7 @@ healthbank:
  url: http://172.19.103.33:8660/svr-wlyy-health-bank/svr-health-bank/
  url: http://172.19.103.33:8660/svr-wlyy-health-bank/svr-health-bank/
#i健康1.0接口
#i健康1.0接口
wlyy:
wlyy:
  url: http://localhost:8080/wlyy/
  url: http://localhost:8080/
wechat:
wechat:
  appId: wx1f129f7b51701428
  appId: wx1f129f7b51701428
  appSecret: 988f005d8309ed1795939e0f042431fb
  appSecret: 988f005d8309ed1795939e0f042431fb
@ -276,7 +282,14 @@ es:
  host:  http://172.19.103.68:9200
  host:  http://172.19.103.68:9200
  tHost: 172.19.103.68:9300
  tHost: 172.19.103.68:9300
  clusterName: jkzl
  clusterName: jkzl
pushMes:
  # 1为推送redis,0为推送消息队列
  method: 0
  # redis队列名称
  redis_prescription_title: redisPrescription
putMesType:
  #推送到redis消息类型
  wechat: wechat
---
---
spring:
spring:
  profiles: prod
  profiles: prod
@ -383,3 +396,11 @@ es:
  host:  http://59.61.92.90:9065,http://59.61.92.90:9067
  host:  http://59.61.92.90:9065,http://59.61.92.90:9067
  tHost: 59.61.92.90:9066,59.61.92.90:9068
  tHost: 59.61.92.90:9066,59.61.92.90:9068
  clusterName: jkzl
  clusterName: jkzl
pushMes:
  # 1为推送redis,0为推送消息队列
  method: 0
  # redis队列名称
  redis_prescription_title: redisPrescription
putMesType:
  #推送到redis消息类型
  wechat: wechat

+ 4 - 0
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/activemq/HealthArtListener.java

@ -22,6 +22,10 @@ import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.MessageListener;
import javax.jms.TextMessage;
import javax.jms.TextMessage;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
/**
 * Created by chenweida on 2017/9/9.
 * Created by chenweida on 2017/9/9.

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

@ -1100,13 +1100,16 @@ public class SurveyScreenResultService extends BaseService {
    //获取筛查居民信息
    //获取筛查居民信息
    public List<Map<String, Object>> initPatient(String doctor, String labelType, String serverType, Long teamCode) {
    public List<Map<String, Object>> initPatient(String doctor, String labelType, String serverType, Long teamCode) {
        String sql = "SELECT DISTINCT p.`code` as service_patient_code, p.`name` as service_patient_name, t1.ssc,t1.idcard,t1.mobile,t1.hospital,t1.hospital_name,h.town,h.town_name " +
        String sql = "SELECT DISTINCT p.`code` as servicePatientCode, p.`name` as servicePatientName, t1.ssc,t1.idcard,t1.mobile,t1.hospital,t1.hospital_name as hospitalName, h.town,h.town_name as townName " +
                "FROM  wlyy_sign_family t1  LEFT JOIN wlyy_patient p on p. CODE = t1.patient   " +
                "FROM  wlyy_sign_family t1  LEFT JOIN wlyy_patient p on p. CODE = t1.patient   " +
                "LEFT JOIN wlyy_sign_patient_label_info t2 on t2.patient = t1.patient and t2.label_type = " + labelType + " and t2.status=1 " +
                "LEFT JOIN wlyy_sign_patient_label_info t2 on t2.patient = t1.patient and t2.label_type = " + labelType + " and t2.status=1 " +
                "RIGHT JOIN wlyy_sign_family_server s on s.sign_code = t1.code and s.server_type in (" + serverType + ") " +
                "RIGHT JOIN wlyy_sign_family_server s on s.sign_code = t1.code" +
                "LEFT JOIN dm_hospital h on t1.hospital = h.`code` " +
                "LEFT JOIN dm_hospital h on t1.hospital = h.`code` " +
                "WHERE ( t1.doctor = ? OR t1.doctor_health = ?) AND t1. STATUS > 0  and t1.expenses_status = 1 AND t1.admin_team_code = ? " +
                "WHERE ( t1.doctor = ? OR t1.doctor_health = ?) AND t1. STATUS > 0  and t1.expenses_status = 1 AND t1.admin_team_code = ? " +
                "AND p.openid IS NOT NULL AND p.openid <>'' ";
                "AND p.openid IS NOT NULL AND p.openid <>'' ";
        if(StringUtils.isNotBlank(serverType)){
            sql = sql.replace("on s.sign_code = t1.code", "on s.sign_code = t1.code and s.server_type in (" + serverType + ") ");
        }
        Object[] args = new Object[]{doctor, doctor, teamCode};
        Object[] args = new Object[]{doctor, doctor, teamCode};
        List<Map<String, Object>> patientInfo = jdbcTemplate.queryForList(sql, args);
        List<Map<String, Object>> patientInfo = jdbcTemplate.queryForList(sql, args);
        return patientInfo;
        return patientInfo;
@ -1123,6 +1126,7 @@ public class SurveyScreenResultService extends BaseService {
     */
     */
    public String createWorkOrder(String jsonData, List<Map<String, Object>> patientInfo, String doctor) throws Exception {
    public String createWorkOrder(String jsonData, List<Map<String, Object>> patientInfo, String doctor) throws Exception {
        JSONObject object = new JSONObject(jsonData);
        JSONObject object = new JSONObject(jsonData);
        JSONArray patientInfos = new JSONArray(patientInfo);
        //获取关联业务名称
        //获取关联业务名称
        if(object.getInt("type") == 4){
        if(object.getInt("type") == 4){
            Survey survey = surveyDao.findById(object.getString("relationCode"));
            Survey survey = surveyDao.findById(object.getString("relationCode"));
@ -1138,11 +1142,11 @@ public class SurveyScreenResultService extends BaseService {
        object.put("createUserName", d.getName());
        object.put("createUserName", d.getName());
        object.put("createUserType", 1);
        object.put("createUserType", 1);
        Map<String, Object> param = new HashedMap();
        Map<String, Object> param = new HashedMap();
        param.put("patientInfo", patientInfo.toString());
        param.put("patientInfo", patientInfos.toString());
        param.put("jsonData", object.toString());
        param.put("jsonData", object.toString());
        HttpResponse response = null;
        HttpResponse response = null;
        response = HttpUtils.doPost(customerUrl + "wlyy-manage/createWorkOrder", param);
        response = HttpUtils.doPost(customerUrl + "synergy/questionnaire/createWorkOrder", param);
        JSONObject rs = new JSONObject(response.getContent());
        JSONObject rs = new JSONObject(response.getContent());
        return rs.getString("message");
        return rs.getString("data");
    }
    }
}
}

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/jimeiJkEdu/JMJkEduArticleService.java

@ -1496,7 +1496,7 @@ public class JMJkEduArticleService extends BaseService {
//    }
//    }
    public Set<String> getOpenid(Set<String> patientSet){
    public Set<String> getOpenid(Set<String> patientSet){
        Set<String> openidSet = new HashSet<>(patientSet);
        Set<String> openidSet = new HashSet<>();
        Patient one = null;
        Patient one = null;
        for (String patient : patientSet) {
        for (String patient : patientSet) {
            one = patientDao.findByCode(patient);
            one = patientDao.findByCode(patient);

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

@ -1831,7 +1831,7 @@ public class ManagerQuestionnaireService extends BaseService {
    //查询出推送居民
    //查询出推送居民
    public List<Map<String, Object>> initPatient(String labelUnitType, String labelSexType, String labelServerType, String labelDiseaseType, String labelHealthType, String currentUserRole, String currentUserRoleLevel) {
    public List<Map<String, Object>> initPatient(String labelUnitType, String labelSexType, String labelServerType, String labelDiseaseType, String labelHealthType, String currentUserRole, String currentUserRoleLevel) {
        String tableSql = " select p.code as service_patient_code ,w.`name` as service_patient_name,w.ssc,w.idcard,w.mobile,w.hospital,w.hospital_name,h.town,h.town_name from wlyy_sign_family w ,wlyy_admin_team t, dm_hospital h  ";
        String tableSql = " select p.code as servicePatientCode ,w.`name` as servicePatientName,w.ssc,w.idcard,w.mobile,w.hospital,w.hospital_name as hospitalName, h.town,h.town_name as townName from wlyy_sign_family w ,wlyy_admin_team t, dm_hospital h  ";
        String whereSql = " where w.status>0 and w.expenses_status=1 and w.admin_team_code=t.id and t.org_code=h.code ";
        String whereSql = " where w.status>0 and w.expenses_status=1 and w.admin_team_code=t.id and t.org_code=h.code ";
        //通过登录的角色区域权限 限制所属患者条件
        //通过登录的角色区域权限 限制所属患者条件
@ -1928,9 +1928,9 @@ public class ManagerQuestionnaireService extends BaseService {
        param.put("patientInfo", patientInfo.toString());
        param.put("patientInfo", patientInfo.toString());
        param.put("jsonData", object.toString());
        param.put("jsonData", object.toString());
        HttpResponse response = null;
        HttpResponse response = null;
        response = HttpUtils.doPost(customerUrl + "wlyy-manage/createWorkOrder", param);
        response = HttpUtils.doPost(customerUrl + "synergy/questionnaire/createWorkOrder", param);
        JSONObject rs = new JSONObject(response.getContent());
        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");
    }
}

+ 3 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/survey/DoctorSurveyScreenResultController.java

@ -235,9 +235,9 @@ public class DoctorSurveyScreenResultController extends WeixinBaseController {
    public String getAllQuestions(@ApiParam(name = "jsonData",value = "协同服务json字符串")
    public String getAllQuestions(@ApiParam(name = "jsonData",value = "协同服务json字符串")
                                  @RequestParam(value = "jsonData",required = true)String jsonData,
                                  @RequestParam(value = "jsonData",required = true)String jsonData,
                                  @ApiParam(name = "labelType", value = "疾病类型", defaultValue = "3")
                                  @ApiParam(name = "labelType", value = "疾病类型", defaultValue = "3")
                                  @RequestParam(value = "labelType", required = true) String labelType,
                                  @ApiParam(name = "serverType",value = "多个条件以逗号分割")
                                  @RequestParam(value = "serverType", required = true) String serverType,
                                  @RequestParam(value = "labelType", required = false) String labelType,
                                  @ApiParam(name = "serverType",value = "服务类型,多个条件以逗号分割")
                                  @RequestParam(value = "serverType", required = false) String serverType,
                                  @ApiParam(name = "teamCode",value = "行政团队id")
                                  @ApiParam(name = "teamCode",value = "行政团队id")
                                  @RequestParam(value = "teamCode", required = true) Long teamCode){
                                  @RequestParam(value = "teamCode", required = true) Long teamCode){
        try {
        try {

+ 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,"保存失败");
        }
    }
}

+ 1 - 1
patient-co/patient-co-wlyy/src/main/resources/application-devtest.yml

@ -52,7 +52,7 @@ rehabilitation:
  url: http://localhost:10055/svr-wlyy-rehabilitation/
  url: http://localhost:10055/svr-wlyy-rehabilitation/
#集美客服配置
#集美客服配置
customerService:
customerService:
  url: http://172.19.103.72:8080/customer-service/
  url: http://localhost:8180/
#小程序
#小程序
applets:
applets: