Bladeren bron

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/service/synergy/SynergyManageService.java
wangzhinan 6 jaren geleden
bovenliggende
commit
8965074519

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

@ -1,12 +1,9 @@
package com.yihu.wlyy.controller.synergy.customer;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.wlyy.controller.BaseController;
import com.yihu.wlyy.entity.User;
import com.yihu.wlyy.entity.synergy.ManageSynergyWorkorderServicerLogDO;
import com.yihu.wlyy.service.manager.user.UserService;
import com.yihu.wlyy.service.synergy.SynergyManageService;
import com.yihu.wlyy.service.synergy.SynergyWorkorderServicerLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@ -16,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;
@ -33,10 +29,6 @@ public class CustomerSynergyManageController extends BaseController {
    private SynergyManageService synergyManageService;
    @Autowired
    private UserService userService;
    @Autowired
    private SynergyWorkorderServicerLogService synergyWorkorderServicerLogService;
    @Autowired
    private ObjectMapper objectMapper;
    @RequestMapping(value = "/getWorkOrderInfo", method = {RequestMethod.GET, RequestMethod.POST})
    @ApiOperation(value = "获取协同服务工单信息")
@ -191,70 +183,4 @@ public class CustomerSynergyManageController extends BaseController {
            return error(-1,"获取失败");
        }
    }
    @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);
            return write(200, "新增临时随访记录成功!", "data", response);
        } catch (Exception e) {
            error(e);
            return invalidUserException(e, -1, "新增临时随访记录失败!" + e.getMessage());
        }
    }
    @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) {
            error(e);
            return invalidUserException(e, -1, "保存随访项目数据失败!" + e.getMessage());
        }
    }
    /**
     * 添加协同服务操作日志
     *
     * @param servicerLog
     * @return
     */
    @ApiOperation("添加协同服务操作日志")
    @RequestMapping(value = "/createSynergyServicerLog", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
    @ResponseBody
    public String createSynergyServicerLog(@ApiParam(name = "servicerLog", value = "协同服务操作日志")
                                          @RequestParam(value = "servicerLog", required = true)String servicerLog ) {
        try {
            ManageSynergyWorkorderServicerLogDO synergyWorkorderServicerLogDO = objectMapper.readValue(servicerLog,ManageSynergyWorkorderServicerLogDO.class);
            synergyWorkorderServicerLogService.create(synergyWorkorderServicerLogDO);
            return write(200, "保存随访项目数据成功!");
        } catch (Exception e) {
            error(e);
            return invalidUserException(e, -1, "保存随访项目数据失败!" + e.getMessage());
        }
    }
}

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

@ -55,8 +55,8 @@ public class DoctorSynergyManageController extends BaseController {
            if(!StringUtils.isNotEmpty(userCode)){
                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);
        } catch (Exception e) {
            error(e);

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

@ -1,5 +1,6 @@
package com.yihu.wlyy.filter;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;
import org.springframework.web.filter.OncePerRequestFilter;
@ -15,6 +16,7 @@ import java.io.IOException;
 * @created 2016/3/26
 */
@Component("loginFilter")
@Profile({ "prod"})
public class SessionOutTimeFilter extends OncePerRequestFilter {
    @Override

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

@ -89,9 +89,9 @@ public class SynergyManageService extends BaseJpaService {
     * @throws Exception
     */
    public List<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,
                                                  String patientName,String ssc,String idcard,Integer userType,Integer isAcceptTask) throws Exception{
                               Integer isMyTask,Integer status,Integer priority,Integer timeout,String workorderCode,
                               String principal,String serviceStartTime,String serviceEndTime,
                               String patientName,String ssc,String idcard,Integer userType,Integer isAcceptTask) throws Exception{
        String servicerTable = "";
        String whereSql = "";
@ -690,8 +690,8 @@ public class SynergyManageService extends BaseJpaService {
        }
        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;
                 " 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;
        }
@ -725,76 +725,4 @@ public class SynergyManageService extends BaseJpaService {
        }
        return resultList;
    }
    /**
     * 创建工单
     *
     * @param manageSynergyWorkorderDO
     * @param manageSynergyWorkorderServicerDOS
     */
    public void createWorkorder(ManageSynergyWorkorderDO manageSynergyWorkorderDO,List<ManageSynergyWorkorderServicerDO> manageSynergyWorkorderServicerDOS){
        manageSynergyWorkorderDO.setCode(getWorkorderNo());
        ManageSynergyWorkorderDO manageSynergyWorkorderDO1 = workOrderDao.save(manageSynergyWorkorderDO);
        for (ManageSynergyWorkorderServicerDO servicerDO:manageSynergyWorkorderServicerDOS){
            servicerDO.setWorkorderType(manageSynergyWorkorderDO1.getType());
            servicerDO.setWorkorderCode(manageSynergyWorkorderDO1.getCode());
            servicerDO.setRelationCode(manageSynergyWorkorderDO1.getRelationCode());
            servicerDO.setCreateTime(new Date());
            servicerDO.setRelationCodeName(manageSynergyWorkorderDO1.getRelationCodeName());
            workorderServicerDao.save(servicerDO);
        }
    }
    /**
     * 添加随访计划
     *
     * @param doctor
     * @param patient
     * @param date
     * @param followupType
     * @param followupClass
     * @param followupManagerStatus
     * @param plandate
     * @param prescriptioncode
     */
    public String addFollowup(String doctor,String patient, String date, String followupType,String followupClass,String followupManagerStatus,String plandate,String prescriptioncode){
        String response = null;
        String url = wlyyUrl + "followup/addFollowup";
        Map<String, Object> params = new HashMap<>();
        params.put("doctor",doctor);
        params.put("patient",patient);
        params.put("date",date);
        params.put("followupType",followupType);
        params.put("followupClass",followupClass);
        params.put("followupManagerStatus",followupManagerStatus);
        params.put("plandate",plandate);
        params.put("prescriptioncode",prescriptioncode);
        try {
            response = httpClientUtil.post(url, params);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return response;
    }
    /**
     * 保存随访数据
     *
     * @param followup
     * @return
     */
    public String saveFollowupProjectData(String followup){
        String response = null;
        String url = wlyyUrl + "followup/saveFollowupProjectData";
        Map<String, Object> params = new HashMap<>();
        params.put("followup",followup);
        try {
            response = httpClientUtil.post(url, params);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return response;
    }
}