ソースを参照

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

humingfen 6 年 前
コミット
cebb797af7

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

@ -239,8 +239,8 @@ public class CustomerSynergyManageController extends BaseController {
    @RequestMapping(value = "saveCallLabel",method = RequestMethod.POST)
    @ApiOperation(value = "保存所有通话标签")
    public String saveCallLabel(@ApiParam(name="callCode",value="通话记录code")@RequestParam(required = false)String callCode,
                                @ApiParam(name="callLabels",value="通话标签,多个用逗号隔开")@RequestParam(required = false)String callLabels){
    public String saveCallLabel(@ApiParam(name="callCode",value="通话记录code")@RequestParam(value = "callCode")String callCode,
                                @ApiParam(name="callLabels",value="通话标签,多个用逗号隔开")@RequestParam(value = "callLabels",required = false)String callLabels){
        try{
            String sql ="UPDATE manage_call_record SET call_label='"+callLabels+"' WHERE `code`='"+callCode+"'";
            jdbcTemplate.update(sql);
@ -253,7 +253,7 @@ public class CustomerSynergyManageController extends BaseController {
    @RequestMapping(value = "getCallInfo",method = RequestMethod.GET)
    @ApiOperation(value = "获取通话的详情")
    public String getCallTypeAndContent(@ApiParam(name="callCode",value="通话记录code")@RequestParam(required = false)String callCode){
    public String getCallTypeAndContent(@ApiParam(name="callCode",value="通话记录code")@RequestParam(value ="callCode")String callCode){
        try{
            CallRecord callRecord = callRecordDao.findByCode(callCode);
            return write(200,"查询成功!","data",callCode);
@ -264,10 +264,10 @@ public class CustomerSynergyManageController extends BaseController {
    }
    @RequestMapping(value = "saveCallInfo",method = RequestMethod.POST)
    @ApiOperation(value = "显示所有通话标签")
    public String saveCallInfo(@ApiParam(name="callCode",value="通话记录code")@RequestParam(required = false)String callCode,
                                @ApiParam(name="serviceType",value="服务类型,多个用逗号隔开")@RequestParam(required = false)String serviceType,
                               @ApiParam(name="serviceContent",value="服务记录")@RequestParam(required = false)String serviceContent){
    @ApiOperation(value = "保存通话记录详情")
    public String saveCallInfo(@ApiParam(name="callCode",value="通话记录code")@RequestParam(value ="callCode")String callCode,
                                @ApiParam(name="serviceType",value="服务类型,多个用逗号隔开")@RequestParam(value = "serviceType",required = false)String serviceType,
                               @ApiParam(name="serviceContent",value="服务记录")@RequestParam(value = "serviceContent",required = false)String serviceContent){
        try{
            String sql ="UPDATE manage_call_record SET service_type='"+serviceType+"',service_content='"+serviceContent+"' WHERE `code`='"+callCode+"'";
            jdbcTemplate.update(sql);
@ -295,5 +295,17 @@ public class CustomerSynergyManageController extends BaseController {
            return error(-1,"提交失败");
        }
    }
    @RequestMapping(value = "getDealList",method = RequestMethod.GET)
    @ApiOperation(value = "通话详情获取待办事项")
    public String getDealList(@ApiParam(name="idcard",value="居民身份证")@RequestParam(value ="idcard")String idcard){
        try{
            return write(200,"获取成功!","data",synergyManageService.getDealList(idcard));
        }catch (Exception e){
            e.printStackTrace();
            return write(-1,"获取失败!");
        }
    }
}

+ 80 - 6
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/account/CustomerService.java

@ -3,9 +3,11 @@ package com.yihu.wlyy.service.manager.account;
import com.yihu.wlyy.entity.*;
import com.yihu.wlyy.entity.call.CallRecord;
import com.yihu.wlyy.entity.call.CallService;
import com.yihu.wlyy.entity.synergy.ManageSynergyWorkorderServicerDO;
import com.yihu.wlyy.repository.*;
import com.yihu.wlyy.repository.call.CallRecordDao;
import com.yihu.wlyy.repository.call.CallServiceDao;
import com.yihu.wlyy.repository.synergy.ManageSynergyWorkorderServicerDao;
import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.service.manager.family.FamilyMemberService;
import com.yihu.wlyy.service.manager.hos.HosDoctorService;
@ -92,9 +94,11 @@ public class CustomerService extends BaseService{
				doctors.add(doctor);
			}
		}
		String labelSql="SELECT  DISTINCT CASE call_label WHEN '1' THEN '有待跟踪' WHEN '2' THEN '电话骚扰' WHEN '3' THEN '态度恶劣' END FROM manage_call_record mcr WHERE (caller_number='"+patient.getPhone()+"' OR caller_number='"+patient.getMobile()+"') AND type=1 AND call_label IS NOT NULL";
		List<Map<String,Object>> labelInfo = jdbcTemplate.queryForList(labelSql);
		resp.put("signInfo",signInfo);
		resp.put("doctors",doctors);
		resp.put("labelInfo",labelInfo);
		return resp;
	}
@ -167,7 +171,7 @@ public class CustomerService extends BaseService{
		//发送短信消息啦
		String mobile = doctor.getMobile();
		if(!StringUtils.isBlank(mobile)&&!"2".equals(type)){
			msg+="\n您可通过微信关注\"i健康智能助手\"公众号更快更便捷的获取服务信息。";
			msg+=" 您可通过微信关注\"i健康智能助手\"公众号更快更便捷的获取服务信息。";
			List<NameValuePair> par = new ArrayList<NameValuePair>();
			par.add(new BasicNameValuePair("mobiles", mobile));
			par.add(new BasicNameValuePair("content", msg));
@ -387,13 +391,83 @@ public class CustomerService extends BaseService{
	public Map<String,Object> getCallRecordInfo(String code){
		CallRecord callRecord = callRecordDao.findByCode(code);
		List<CallService> consultService = callServiceDao.findByCallCodeAndType(code,0);
		List<CallService> orderService = callServiceDao.findByCallCodeAndType(code,1);
		/*List<CallService> consultService = callServiceDao.findByCallCodeAndType(code,0);
		List<CallService> orderService = callServiceDao.findByCallCodeAndType(code,1);*/
		String type="";
		String relationCode="";
		String sql="";
		List<Map<String,Object>> resultList = new ArrayList<>();
		//咨询
		if ("0".equals(type)){
			sql="SELECT " +
				" a.code as workCode," +
				" a.content, " +
				" a.`status`, " +
				" a.service_patient_name, " +
				" c.deal_type, " +
				" c.deal_content, " +
				" a.remark " +
				" FROM " +
				" manage_synergy_workorder_reserve_consult c " +
				" INNER JOIN ( " +
				" SELECT " +
				"  w.*, s.service_patient_name " +
				"  FROM " +
				"  manage_synergy_workorder w " +
				"  LEFT JOIN manage_synergy_workorder_servicer s ON w.`code` = s.workorder_code " +
				" ) a " +
				" WHERE " +
				" call_code = '"+code+"'";
			resultList = jdbcTemplate.queryForList(sql);
		}
		//健康教育
		if ("1".equals(type)){
		}
		//预约
		if ("2".equals(type)){
			sql="SELECT" +
					" a. CODE AS workCode," +
					" a.`status`," +
					" a.service_patient_name," +
					" c.order_hospital_name," +
					" c.order_dept_name," +
					" c.order_time" +
					"FROM" +
					" manage_synergy_workorder_reserve_consult c" +
					"INNER JOIN (" +
					" SELECT" +
					"  w.*, s.service_patient_name" +
					" FROM" +
					"  manage_synergy_workorder w" +
					" LEFT JOIN manage_synergy_workorder_servicer s ON w.`code` = s.workorder_code" +
					") a" +
					"WHERE" +
					" call_code = '"+code+"'";
			resultList = jdbcTemplate.queryForList(sql);
		}
		//随访
		if ("3".equals(type)){
		}
		//问卷调查
		if ("4".equals(type)){
		}
		//疾病筛查
		if ("5".equals(type)){
			sql="SELECT * FROM `wlyy_survey_screen_result` WHERE `code`='"+relationCode+"'";
			resultList = jdbcTemplate.queryForList(sql);
		}
		List<PatientReservation> patientReservation = patientReservationDao.findByCallCode(code);
		Map<String,Object> rs = new HashedMap();
		rs.put("callRecord",callRecord);
		rs.put("consultService",consultService);
		rs.put("orderService",orderService);
		/*rs.put("consultService",consultService);
		rs.put("orderService",orderService);*/
		rs.put("patientReservation",patientReservation);
		return rs;
	}

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

@ -1045,4 +1045,37 @@ public class SynergyManageService extends BaseJpaService {
        }
        ws.addCell(label);
    }
    public List<Map<String,Object>> getDealList(String idcard){
        Patient patient = patientDao.findByIdcard(idcard);
        if (patient==null){
            return null;
        }
        String sql ="SELECT" +
                " s.create_time," +
                " s.service_patient_name," +
                " w.priority," +
                " w.relation_code," +
                " w.relation_code_name," +
                " w.create_user_type," +
                " w.create_user_name," +
                " w.create_user," +
                " w.remark," +
                " w.service_time" +
                " FROM" +
                " `manage_synergy_workorder_servicer` s" +
                " LEFT JOIN manage_synergy_workorder w ON s.workorder_code = w.`code`" +
                " WHERE" +
                " s.service_patient_code = '"+patient.getCode()+"'" +
                " AND s.`status` = 1" +
                " ORDER BY" +
                " s.create_time" +
                " LIMIT 2";
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
        for (Map<String,Object> map : list){
            int isOver = isServiceOverTime(DateUtil.strToDate(String.valueOf(map.get("service_time")),DateUtil.YYYY_MM_DD_HH_MM_SS));
            map.put("isOver",isOver);
        }
        return list;
    }
}

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

@ -312,9 +312,13 @@ public class SurveyScreenResultService extends BaseService {
            Map<String, Object> map = new HashMap<>();
            map.put("question", surveyTemplateQuestions);
            String qusCode = surveyTemplateQuestions.getCode();
            for (Map<String, Object> option : optionAnswersList) {
                if (option.get("question_code").equals(qusCode)) {
                    map.put("option", option);
            if (optionAnswersList==null || optionAnswersList.size()==0){
                map.put("option",new HashMap<String,Object>());
            }else {
                for (Map<String, Object> option : optionAnswersList) {
                    if (option.get("question_code").equals(qusCode)) {
                        map.put("option", option);
                    }
                }
            }
            answerMap.put(surveyTemplateQuestions.getSort() + "", map);

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