Procházet zdrojové kódy

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

# Conflicts:
#	patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/synergy/customer/CustomerSynergyManageController.java
#	patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/synergy/doctor/DoctorSynergyManageController.java
#	patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/synergy/SynergyManageService.java
wangzhinan před 6 roky
rodič
revize
7395cedc7f
20 změnil soubory, kde provedl 229 přidání a 140 odebrání
  1. 18 8
      patient-co-manage/wlyy-manage/pom.xml
  2. 2 2
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/config/SpringSecurityConfig.java
  3. 7 5
      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. 30 36
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/synergy/customer/CustomerSynergyManageController.java
  6. 4 6
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/synergy/doctor/DoctorQuestionnaireController.java
  7. 16 23
      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. 2 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. 10 16
      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. 24 3
      patient-co-manage/wlyy-manage/src/main/resources/application.yml
  15. 4 0
      patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/activemq/HealthArtListener.java
  16. 2 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/survey/SurveyScreenResultService.java
  17. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/jimeiJkEdu/JMJkEduArticleService.java
  18. 2 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/survey/ManagerQuestionnaireService.java
  19. 33 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/synergy/SynergyManageService.java
  20. 40 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/synergy/SynergyManageController.java

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

@ -204,18 +204,28 @@
        <dependency>
            <groupId>io.springfox</groupId>
            <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>
            <groupId>io.springfox</groupId>
            <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>

+ 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

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

@ -13,7 +13,6 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
import java.util.Map;
@ -145,48 +144,43 @@ public class CustomerSynergyManageController extends BaseController {
        }
    }
    @ApiOperation("新增临时随访记录(返回ID)")
    @RequestMapping(value = "/addFollowup", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
    @ResponseBody
    public String addFollowup(@ApiParam(name = "doctor", value = "医生代码", defaultValue = "443a196ef8744536a531260eb26c05d7")
                              @RequestParam(value = "doctor", required = true) String doctor,
                              @ApiParam(name = "patient", value = "患者代码", defaultValue = "443a196ef8744536a531260eb26c05d7")
                              @RequestParam(value = "patient", required = true) String patient,
                              @ApiParam(name = "date", value = "下次随访时间", defaultValue = "2016-12-15 20:00:00")
                              @RequestParam(value = "date", required = true) String date,
                              @ApiParam(name = "followupType", value = "随访方式【字典FOLLOWUP_WAY_DICT】", defaultValue = "12")
                              @RequestParam(value = "followupType", required = true) String followupType,
                              @ApiParam(name = "followupClass", value = "随访类别【1.高血压 2.糖尿病 3高糖】", defaultValue = "1")
                              @RequestParam(value = "followupClass", required = true) String followupClass,
                              @ApiParam(name = "followupManagerStatus", value = "随访管理状态【字典FOLLOWUP_MANAGER_STATUS】", defaultValue = "1")
                              @RequestParam(value = "followupManagerStatus", required = false) String followupManagerStatus,
                              @ApiParam(name = "plandate", value = "下次随访时间", defaultValue = "2016-12-14 20:00:00")
                              @RequestParam(value = "plandate", required = false) String plandate,
                              @ApiParam(name = "prescriptioncode", value = "续方CODE", defaultValue = "续方CODE")
                              @RequestParam(value = "prescriptioncode", required = false) String prescriptioncode) {
        try {
            String response = synergyManageService.addFollowup(doctor, patient, date, followupType, followupClass, followupManagerStatus,plandate,prescriptioncode);
    @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{
            return write(200, "新增临时随访记录成功!", "data", response);
        } catch (Exception e) {
            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 invalidUserException(e, -1, "新增临时随访记录失败!" + e.getMessage());
            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{
    @ApiOperation("保存随访项目数据")
    @RequestMapping(value = "/saveFollowupProjectData", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
    @ResponseBody
    public String saveFollowupProjectData(@ApiParam(name = "followup", value = "随访项目对象")
                                          @RequestParam(value = "followup", required = true)String followup ) {
        try {
            synergyManageService.saveFollowupProjectData(followup);
            return write(200, "保存随访项目数据成功!");
        } catch (Exception e) {
            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 invalidUserException(e, -1, "保存随访项目数据失败!" + e.getMessage());
            return error(-1,"获取失败");
        }
    }
}

+ 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 = "派发协同服务")

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

@ -1,32 +1,30 @@
package com.yihu.wlyy.controller.synergy.doctor;
import com.alibaba.fastjson.JSONArray;
import com.fasterxml.jackson.databind.ObjectMapper;
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.SynergyManageService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
 * Created by 刘文彬 on 2018/9/27.
 */
@Controller
@RequestMapping(value = "/doctor/synergy")
@Api(description = "医生端-协同服务")
public class DoctorSynergyManageController extends BaseController {
    @Autowired
    private SynergyManageService synergyManageService;
    @Autowired
    private ObjectMapper objectMapper;
    @RequestMapping(value = "workorderList", method = RequestMethod.GET)
    @ApiOperation("医生端-协同服务列表")
@ -59,24 +57,19 @@ public class DoctorSynergyManageController extends BaseController {
        }
    }
    @RequestMapping(value = "createWorkorder", method = RequestMethod.GET)
    @ApiOperation("医生端-创建协同服务")
    public String workorderList(@ApiParam(name = "workorder", value = "工单对象", required = false)
                                @RequestParam(value = "workorder")String workorder,
                                @ApiParam(name = "servicers", value = "服务对象", required = false)
                                @RequestParam(value = "servicers")String servicers){
    @RequestMapping(value = "reminder", method = RequestMethod.POST)
    @ApiOperation("医生端-催单")
    public String reminder(@ApiParam(name = "userCode", value = "医生code", required = false)
                           @RequestParam(value = "userCode", required = false)String userCode,
                           @ApiParam(name = "workorderCode", value = "协同服务工单code", required = true)
                           @RequestParam(value = "workorderCode", required = true)String workorderCode){
        try {
            ManageSynergyWorkorderDO workorderDO = objectMapper.readValue(workorder,ManageSynergyWorkorderDO.class);
            JSONArray jsonArray = JSONArray.parseArray(servicers);
            List<ManageSynergyWorkorderServicerDO> servicerDOS = new ArrayList<>();
            for (int i=0;i<jsonArray.size();i++){
                ManageSynergyWorkorderServicerDO servicerDO = objectMapper.readValue(jsonArray.getJSONObject(i).toJSONString(),ManageSynergyWorkorderServicerDO.class);
                servicerDOS.add(servicerDO);
            if(!StringUtils.isNotEmpty(userCode)){
                userCode = getUID();
            }
            synergyManageService.createWorkorder(workorderDO,servicerDOS);
            return write(200, "获取成功");
        } catch (Exception e) {
            synergyManageService.reminder(workorderCode,userCode,1);
            return write(200, "请求成功");
        }catch (Exception e){
            error(e);
            return error(-1, "请求失败");
        }

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

+ 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;
        }

+ 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;
import com.yihu.wlyy.entity.synergy.ManageSynergyWorkordeReminderDO;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import com.yihu.wlyy.entity.synergy.ManageSynergyWorkorderExecutorDO;
import java.util.List;
/**
 * Created by 刘文彬 on 2018/10/8.
 */
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;
import com.yihu.wlyy.entity.synergy.ManageSynergyWorkorderServicerLogDO;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
@ -8,5 +9,6 @@ import org.springframework.data.repository.PagingAndSortingRepository;
 */
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);
}

+ 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);
    }

+ 24 - 3
patient-co-manage/wlyy-manage/src/main/resources/application.yml

@ -165,8 +165,14 @@ es:
  host:  http://172.19.103.68:9200
  tHost: 172.19.103.68:9300
  clusterName: jkzl
pushMes:
  # 1为推送redis,0为推送消息队列
  method: 0
  # redis队列名称
  redis_prescription_title: redisPrescription
putMesType:
  #推送到redis消息类型
  wechat: wechat
---
spring:
  profiles: test
@ -276,7 +282,14 @@ es:
  host:  http://172.19.103.68:9200
  tHost: 172.19.103.68:9300
  clusterName: jkzl
pushMes:
  # 1为推送redis,0为推送消息队列
  method: 0
  # redis队列名称
  redis_prescription_title: redisPrescription
putMesType:
  #推送到redis消息类型
  wechat: wechat
---
spring:
  profiles: prod
@ -383,3 +396,11 @@ es:
  host:  http://59.61.92.90:9065,http://59.61.92.90:9067
  tHost: 59.61.92.90:9066,59.61.92.90:9068
  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.MessageListener;
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.

+ 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");
    }
}

+ 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){
        Set<String> openidSet = new HashSet<>(patientSet);
        Set<String> openidSet = new HashSet<>();
        Patient one = null;
        for (String patient : patientSet) {
            one = patientDao.findByCode(patient);

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