trick9191 před 7 roky
rodič
revize
139340d86b

+ 1 - 1
common/common-entity/src/main/java/com/yihu/wlyy/entity/call/CallRecord.java

@ -33,7 +33,7 @@ public class CallRecord extends IdEntity {
    private String  ssc; //社保卡号
    private String  doctor; //签约医生code
    private String  doctorName; //签约医生姓名
    private String  adminTeamCode;
    private String  adminTeamCode; //签约医生团队
    public String getCode() {
        return code;

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 2 - 2
common/common-entity/src/main/java/com/yihu/wlyy/entity/message/Message.java


+ 2 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/config/SwaggerConfig.java

@ -7,6 +7,7 @@ import org.springframework.web.context.request.async.DeferredResult;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
@ -28,6 +29,7 @@ public class SwaggerConfig extends WebMvcConfigurerAdapter {
                .forCodeGeneration(true)
                .pathMapping("/")
                .select()
                .paths(PathSelectors.regex("/customer/.*"))
                .build()
                .apiInfo(patientApiInfo());
    }

+ 18 - 17
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/common/account/CustomerController.java

@ -35,7 +35,7 @@ import java.util.Map;
@RestController
@RequestMapping(value = "/customer")
@SessionAttributes("current_user")
@Api(description = "客服系统")
@Api
public class CustomerController extends BaseController {
    @Autowired
@ -241,11 +241,11 @@ public class CustomerController extends BaseController {
    @RequestMapping(value = "/getCallRecords", method = {RequestMethod.GET, RequestMethod.POST})
    @ApiOperation(value = "获取通讯记录列表")
    public String getCallRecords(@ApiParam(name="callerNumber",value="呼叫人电话")@RequestParam(required = true)String callerNumber,
                                 @ApiParam(name="answerStatus",value="接听状态: 1.接通,2. 队列中放弃,3.接通")@RequestParam(required = true)Integer answerStatus,
                                 @ApiParam(name="serviceType",value="服务类型:0.医生咨询,1.预约挂号")@RequestParam(required = true)Integer serviceType ,
                                 @ApiParam(name="startDate",value="开始时间")@RequestParam(required = true)String startDate,
                                 @ApiParam(name="endDate",value="结束时间")@RequestParam(required = true)String endDate,
    public String getCallRecords(@ApiParam(name="callerNumber",value="呼叫人电话")@RequestParam(required = false)String callerNumber,
                                 @ApiParam(name="answerStatus",value="接听状态: 1.接通,2. 队列中放弃,3.接通")@RequestParam(required = false)Integer answerStatus,
                                 @ApiParam(name="serviceType",value="服务类型:0.医生咨询,1.预约挂号")@RequestParam(required = false)Integer serviceType ,
                                 @ApiParam(name="startDate",value="开始时间")@RequestParam(required = false)String startDate,
                                 @ApiParam(name="endDate",value="结束时间")@RequestParam(required = false)String endDate,
                                 @ApiParam(name="page",value="第几页,从1开始")@RequestParam(required = true)Integer page,
                                 @ApiParam(name="size",value="页码大小")@RequestParam(required = true)Integer size){
        try {
@ -291,20 +291,21 @@ public class CustomerController extends BaseController {
    @RequestMapping(value = "/getCallServices", method = {RequestMethod.GET, RequestMethod.POST})
    @ApiOperation(value = "协同服务查询")
    public String getCallServices(@ApiParam(name="keyword",value="姓名或身份证或医保卡号")@RequestParam(required = true)String keyword,
                                  @ApiParam(name="serverType",value="服务类型:0.医生咨询,1.预约挂号")@RequestParam(required = true)Integer serverType,
                                  @ApiParam(name="state",value="订单状态:0.草稿,1.待处理,2.完成")@RequestParam(required = true)Integer state,
                                  @ApiParam(name="patientName",value="患者姓名")@RequestParam(required = true)String patientName,
                                  @ApiParam(name="ssc",value="医保卡号")@RequestParam(required = true)String ssc,
                                  @ApiParam(name="idCard",value="身份证号")@RequestParam(required = true)String idCard,
                                  @ApiParam(name="doctorName",value="医生姓名")@RequestParam(required = true)String doctorName,
                                  @ApiParam(name="code",value="服务编号")@RequestParam(required = true)String code,
                                  @ApiParam(name="startDate",value="开始时间")@RequestParam(required = true)String startDate,
                                  @ApiParam(name="endDate",value="结束时间")@RequestParam(required = true)String endDate,
    public String getCallServices(@ApiParam(name="keyword",value="姓名或身份证或医保卡号")@RequestParam(required = false)String keyword,
                                  @ApiParam(name="serverType",value="服务类型:0.医生咨询,1.预约挂号")@RequestParam(required = false)Integer serverType,
                                  @ApiParam(name="state",value="订单状态:0.草稿,1.待处理,2.完成")@RequestParam(required = false)Integer state,
                                  @ApiParam(name="patientName",value="患者姓名")@RequestParam(required = false)String patientName,
                                  @ApiParam(name="ssc",value="医保卡号")@RequestParam(required = false)String ssc,
                                  @ApiParam(name="idCard",value="身份证号")@RequestParam(required = false)String idCard,
                                  @ApiParam(name="doctorName",value="医生姓名")@RequestParam(required = false)String doctorName,
                                  @ApiParam(name="code",value="服务编号")@RequestParam(required = false)String code,
                                  @ApiParam(name="adminTeamCode",value="签约医生团队团队")@RequestParam(required = false)Integer adminTeamCode,
                                  @ApiParam(name="startDate",value="开始时间")@RequestParam(required = false)String startDate,
                                  @ApiParam(name="endDate",value="结束时间")@RequestParam(required = false)String endDate,
                                  @ApiParam(name="page",value="第几页,从1开始")@RequestParam(required = true)Integer page,
                                  @ApiParam(name="size",value="每页大小")@RequestParam(required = true)Integer size){
        try {
            return write(200,"保存成功","data",customerService.getCallServices(keyword, serverType,state,patientName,ssc,idCard,doctorName, code, startDate, endDate, page, size));
            return write(200,"保存成功","data",customerService.getCallServices(keyword, serverType,state,patientName,ssc,idCard,doctorName, code,adminTeamCode,startDate, endDate, page, size));
        }catch (Exception e){
            error(e);
            return error(-1,"保存失败");

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 2 - 2
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/Message.java


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

@ -188,7 +188,7 @@ public class CustomerService extends BaseService{
		List<Patient> list =  patientDao.findByMobile(callerNumber);
		Map<String,Object> rs = new HashedMap();
		Patient p ;
		if(list!=null||list.size()==0){
		if(list==null||list.size()==0){
			rs.put("state",-1);
			rs.put("mes","未找到患者信息");
			rs.put("callRecord",null);
@ -353,7 +353,7 @@ public class CustomerService extends BaseService{
			message.setCode(getCode());
			message.setSenderPhoto(p.getPhoto());
			message.setTitle("协同服务消息");
			message.setType(11);//协同服务消息
			message.setType(12);//协同服务消息
			message.setReadonly(1);//是否只读消息
			message.setSex(p.getSex());
			message.setOver("1");//未处理
@ -364,7 +364,7 @@ public class CustomerService extends BaseService{
		return "1";
	}
	public List<Map<String,Object>> getCallServices(String keyword, Integer serverType,Integer state,String patientName,String ssc,String idCard,String doctorName,String code,String startDate,String endDate,Integer page,Integer size){
	public List<Map<String,Object>> getCallServices(String keyword, Integer serverType,Integer state,String patientName,String ssc,String idCard,String doctorName,String code,Integer adminTeamCode ,String startDate,String endDate,Integer page,Integer size){
		String sql = "SELECT " +
				" s.`code`, " +
				" s.patient, " +
@ -411,6 +411,9 @@ public class CustomerService extends BaseService{
		if(StringUtils.isNotBlank(endDate)){
			sql +=" AND s.create_time <='"+endDate+" 23:59:59'" ;
		}
		if(adminTeamCode!=null){
			sql +=" AND s.admin_team_code ="+adminTeamCode ;
		}
		sql += " LIMIT "+(page-1)*size+","+size +" ORDER BY r.create_time DESC";
		List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/message/MessageDao.java

@ -98,6 +98,6 @@ public interface MessageDao extends PagingAndSortingRepository<Message, Long>, J
    @Query("from Message a where a.type = 8 and a.state=0 and a.del='1' and a.over='0' and relationCode = ?1  ")
    Message findByRelationCode(String relationCode);
    @Query("from Message a where a.type = 11 and a.state=0 and a.del='1' and a.over='0' and receiver = ?1  ")
    @Query("from Message a where a.type = 12 and a.state=0 and a.del='1' and a.over='0' and receiver = ?1  ")
    List<Message> findByReceiverCallService(String doctor);
}

+ 47 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/call/CustomerService.java

@ -13,6 +13,8 @@ import com.yihu.wlyy.repository.patient.PatientDao;
import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.HttpClientUtil;
import io.swagger.models.auth.In;
import org.apache.axis.client.Call;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.NameValuePair;
@ -107,4 +109,49 @@ public class CustomerService extends BaseService{
		return mes;
	}
	public Map<String,Object> getCallServiceInfo(String code){
		CallService callService = callServiceDao.findByCode(code);
		CallRecord callRecord = callRecordDao.findByCode(callService.getCallCode());
		Map<String,Object> rs = new HashedMap();
		rs.put("callService",callService);
		rs.put("callRecord",callRecord);
		return rs;
	}
	public String dealConsultCallService(String code, Integer dealType, Integer dealState,String dealContent){
		 CallService callService =  callServiceDao.findByCode(code);
		 callService.setDealType(dealType);
		 callService.setDealState(dealState);
		 callService.setDealContent(dealContent);
		 callService.setDealTime(new Date());
		 callService.setState(2);
		 callServiceDao.save(callService);
		return "1";
	}
	/**
	 *     private Integer dealReason; // 处理取消原因:0.没有号源、1.病人取消
	 private String orderHospital; //预约医院code
	 private String orderHospitalName; //预约医院
	 private String orderDept; //预约科室code
	 private String orderDeptName; //预约科室名称
	 private String orderDoctor; //预约医生code
	 private String orderDoctorName; //预约医生名称
	 private String orderTime; //预约时间段
	 * @param type
	 * @param orderHospital
     * @return
     */
	public String dealAppointCallService(String type ,String code,String dealReason, String orderHospital,String orderHospitalName,String orderDept,String orderDeptName,String orderDoctor,String orderDoctorName,String orderTime){
		CallService callService = callServiceDao.findByCode(code);
		//预约成功
		if("1".equals(type)){
		//预约失败
		}else{
		}
		return null;
	}
}

+ 25 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/call/CallRecordController.java

@ -56,4 +56,29 @@ public class CallRecordController extends BaseController {
            return error(-1,"保存失败");
        }
    }
    @RequestMapping(value = "/getCallServiceInfo", method = {RequestMethod.GET, RequestMethod.POST})
    @ApiOperation(value = "获取协同服务详情")
    public String getCallServiceInfo(@ApiParam(name="code",value="协同服务code(Mes中relationCode)")@RequestParam(required = false)String code){
        try {
            return write(200,"保存成功","data",customerService.getCallServiceInfo(code));
        }catch (Exception e){
            error(e);
            return error(-1,"保存失败");
        }
    }
    @RequestMapping(value = "/dealConsultCallService", method = {RequestMethod.GET, RequestMethod.POST})
    @ApiOperation(value = "处理咨询协同服务")
    public String dealConsultCallService(@ApiParam(name="code",value="协同服务code(Mes中relationCode)")@RequestParam(required = true)String code,
                                         @ApiParam(name="dealType",value="处理方式:1.电话回复,2.客服回复")@RequestParam(required = true)Integer dealType,
                                         @ApiParam(name="dealState",value="处理结果:1.完成,2.无法联系居民")@RequestParam(required = true)Integer dealState,
                                         @ApiParam(name="dealContent",value="处理内容")@RequestParam(required = false)String dealContent){
        try {
            return write(200,"保存成功","data",customerService.dealConsultCallService(code,dealType,dealState,dealContent));
        }catch (Exception e){
            error(e);
            return error(-1,"保存失败");
        }
    }
}