Bladeren bron

通话后添加服务类型和服务记录

zd_123 6 jaren geleden
bovenliggende
commit
55f18b5bc9

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

@ -84,7 +84,7 @@ public class CustomerQuestionnaireController extends BaseController {
        try {
            //判断是否有异常中断
            Integer count = synergyManageService.findExceptionCount(workorderCode, customerCode);
            return write(200, "查询成功!", "data", count);
            return write(200, "查询成功!", "data", count > 0 ? true : false);
        } catch (Exception e) {
            e.printStackTrace();
            return write(-1, "查询失败!");

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

@ -15,6 +15,11 @@ 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;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.Map;
@ -23,7 +28,7 @@ import java.util.Map;
 * Created by 刘文彬 on 2018/9/27.
 */
@RestController
@RequestMapping(value = "/customer/synergy",produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@RequestMapping(value = "/synergy/customer", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(description = "集美客服系统")
public class CustomerSynergyManageController extends BaseController {
@ -37,6 +42,7 @@ public class CustomerSynergyManageController extends BaseController {
    @Autowired
    private CallRecordDao callRecordDao;
    @RequestMapping(value = "/getWorkOrderInfo", method = {RequestMethod.GET, RequestMethod.POST})
    @ApiOperation(value = "获取协同服务工单信息")
    public String getWorkOrderInfo(@ApiParam(name="workorderCode",value="协同服务工单code")
@ -46,11 +52,10 @@ public class CustomerSynergyManageController extends BaseController {
                                @ApiParam(name="role",value="1医生,2客服管理员,3普通客服")
                                @RequestParam(required = true)Integer role){
        try {
            return write(200,"保存成功","data", synergyManageService.getWorkOrderInfo(workorderCode, patient, role));
            return write(200,"请求成功","data", synergyManageService.getWorkOrderInfo(workorderCode, patient, role));
        }catch (Exception e){
            error(e);
            return error(-1,"保存失败");
            return error(-1,"请求失败");
        }
    }

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

@ -415,7 +415,8 @@ public class SynergyManageService extends BaseJpaService {
            resultMap.put("patientName",workorderMap.get("service_patient_name"));//居民姓名
            Integer callNum = customerLogDao.callNumByWorkorder(workorderMap.get("servicerCode")+"");
            resultMap.put("callNum",callNum);//已呼叫次数
            Patient patient =patientDao.findByCode(workorderMap.get("service_patient_code")+"");
            resultMap.putAll(this.getPatientInfo(workorderMap.get("service_patient_code") + ""));
            /*Patient patient =patientDao.findByCode(workorderMap.get("service_patient_code")+"");
            Integer sex = patient.getSex();
            String sexName ="";
            if(sex==1){
@ -450,7 +451,7 @@ public class SynergyManageService extends BaseJpaService {
            for(SignPatientLabelInfo one:labelServeType){
                serveType+=","+one.getLabelName();
            }
            resultMap.put("serveType",StringUtils.isNotEmpty(serveType)?serveType.substring(1):"");//服务类型
            resultMap.put("serveType",StringUtils.isNotEmpty(serveType)?serveType.substring(1):"");//服务类型*/
            return resultMap;
        }else{
            throw new Exception("没有任务");
@ -577,17 +578,23 @@ public class SynergyManageService extends BaseJpaService {
        resultMap.put("hospitalName", result.get("hospital_name"));//所属社区
        Integer callNum = customerLogDao.callNumByWorkorder((String) result.get("code"));
        resultMap.put("callNum",callNum);//已呼叫次数
        resultMap.putAll(this.getPatientInfo(patientCode));
        return resultMap;
    }
    public Map<String,Object> getPatientInfo(String patientCode){
        Map<String, Object> resultMap = new HashMap<>();
        Patient patient = patientDao.findByCode(patientCode);
        Integer sex = patient.getSex();
        String sexName = "";
        if(sex==1){
            sexName="男";
        }else if(sex==2){
            sexName="女";
        if(sex == 1){
            sexName = "男";
        }else if(sex == 2){
            sexName = "女";
        }else{
            sexName="未知";
            sexName = "未知";
        }
        resultMap.put("sex",sexName);//性别
        resultMap.put("sex", sexName);//性别
        Integer age = IdCardUtil.getAgeForIdcard(patient.getIdcard());
        resultMap.put("age",age);//年龄
        SignFamily signFamily = signFamilyDao.findSignByPatient(patientCode);
@ -602,7 +609,7 @@ public class SynergyManageService extends BaseJpaService {
        List<SignPatientLabelInfo> labelHealthType = signPatientLabelInfoDao.findByPatientAndLabelTypeAndStatus(patientCode,  "2", 1);
        String healthType="";
        for(SignPatientLabelInfo one:labelHealthType){
            healthType+=","+one.getLabelName();
            healthType += ","+one.getLabelName();
        }
        resultMap.put("healthType", StringUtils.isNotEmpty(healthType) ? healthType.substring(1) : "");//健康情况
        List<SignPatientLabelInfo> labelServeType = signPatientLabelInfoDao.findByPatientAndLabelTypeAndStatus(patientCode,  "2", 1);

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

@ -20,14 +20,14 @@ public class SynergyManageService extends BaseService {
    @Value("${customerService.url}")
    private String customerUrl;
    public String getWorkOrderInfo(String workorderCode, String patient, Integer role) throws Exception {
    public JSONObject 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);
        response = HttpUtils.doPost(customerUrl + "synergy/customer/getWorkOrderInfo", param);
        JSONObject rs = new JSONObject(response.getContent());
        return rs.getString("message");
        return rs;
    }
}

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

@ -6,16 +6,17 @@ 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/10/9.
 */
@Controller
@RequestMapping(value = "/doctor/customer")
@RestController
@RequestMapping(value = "/doctor/customer", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(description = "集美客服系统")
public class SynergyManageController extends BaseController {