Преглед на файлове

Merge branch 'dev' of humingfen/patient-co-management into dev

liuwenbin преди 6 години
родител
ревизия
5e8518c181

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

@ -13,9 +13,6 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
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;
@ -80,6 +77,42 @@ public class CustomerSynergyManageController extends BaseController {
    }
    @RequestMapping(value = "/labels", method = RequestMethod.GET)
    @ApiOperation("根据分组类型查找标签")
    public String labels(
            @ApiParam(name = "labelType", value = "1:服务类型(卫计委分组) 2:健康情况 3:疾病类型 4:团队标签(自定义标签)", required = true)
            @RequestParam(value = "labelType", required = true) String labelType) {
        try {
            return write(200,"保存成功", "data", synergyManageService.getLabels(labelType));
        } catch (Exception e) {
            error(e);
            return error(-1,"保存失败");
        }
    }
    @RequestMapping(value = "/unitLabels", method = RequestMethod.GET)
    @ApiOperation("获取所属社区")
    public String unitLabels(@ApiParam(name = "currentRoleCode", value = "选择的区县", required = false)
                             @RequestParam(value = "currentRoleCode", required = false) String currentRoleCode) {
        try {
            return write(200,"获取成功", "data", synergyManageService.getUnitLabels(currentRoleCode));
        } catch (Exception e) {
            error(e);
            return error(-1,"获取失败");
        }
    }
    @RequestMapping(value = "/towns", method = RequestMethod.GET)
    @ApiOperation("获取所属区县")
    public String towns() {
        try {
            return write(200,"获取成功", "data", synergyManageService.getTowns());
        } catch (Exception e) {
            error(e);
            return error(-1,"获取失败");
        }
    }
    @RequestMapping(value = "workorderList", method = RequestMethod.GET)
    @ApiOperation("客服系统-协同服务列表")
    public String workorderList(@ApiParam(name = "userCode", value = "客服code", required = false)

+ 1 - 2
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/repository/TownDao.java

@ -5,11 +5,10 @@
 *******************************************************************************/
package com.yihu.wlyy.repository;
import com.yihu.wlyy.entity.Town;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import com.yihu.wlyy.entity.Town;
public interface TownDao extends PagingAndSortingRepository<Town, Long> {
	// 根據CODE查詢區縣名稱
	@Query("select p from Town p where p.code = ?1")

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

@ -57,6 +57,8 @@ public class SynergyManageService extends BaseJpaService {
    private ManageSynergyWorkorderReminderDao manageSynergyWorkorderReminderDao;
    @Autowired
    private ManageSynergyWorkorderServicerLogDao manageSynergyWorkorderServicerLogDao;
    @Autowired
    private TownDao townDao;
    /**
     * 根据服务编码获取工单
@ -88,7 +90,6 @@ public class SynergyManageService extends BaseJpaService {
     * @return
     * @throws Exception
     */
    public Map<String,Object> workorderList(String code,String keywords,Integer workorderType,
                               Integer isMyTask,Integer status,Integer priority,Integer timeout,String workorderCode,
                               String principal,String serviceStartTime,String serviceEndTime,
@ -828,4 +829,22 @@ public class SynergyManageService extends BaseJpaService {
        manageSynergyWorkorderDO.setStatus(3);
        workOrderDao.save(manageSynergyWorkorderDO);
    }
    public JSONObject getLabels(String labelType) {
        String url = wlyyUrl + "/wlyygc/doctor/label/labels?labelType=" + labelType;
        String response = httpClientUtil.get(url, "UTF-8");
        JSONObject jsonObject = new JSONObject(response);
        return  jsonObject;
    }
    public JSONObject getUnitLabels(String currentRoleCode) {
        String url = wlyyUrl + "/wlyygc/doctor/label/unitLabels?currentRoleCode=" + currentRoleCode + "&currentRoleLevel=3";
        String response = httpClientUtil.get(url, "UTF-8");
        JSONObject jsonObject = new JSONObject(response);
        return  jsonObject;
    }
    public List<Town> getTowns() {
        return (List<Town>) townDao.findAll();
    }
}