|
@ -2,6 +2,7 @@ package com.yihu.jw.patient.endpoint.servicepackage;
|
|
|
|
|
|
import com.yihu.jw.entity.base.dict.DictHospitalDeptDO;
|
|
|
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
|
|
|
import com.yihu.jw.entity.base.label.PatientLabelDO;
|
|
|
import com.yihu.jw.entity.base.org.BaseOrgDO;
|
|
|
import com.yihu.jw.entity.base.servicePackage.ServicePackageDO;
|
|
|
import com.yihu.jw.entity.base.servicePackage.ServicePackageItemDO;
|
|
@ -9,8 +10,10 @@ import com.yihu.jw.entity.base.servicePackage.ServicePackageSignRecordDO;
|
|
|
import com.yihu.jw.patient.service.servicepackage.PackageService;
|
|
|
import com.yihu.jw.restmodel.base.dict.DictHospitalDeptVO;
|
|
|
import com.yihu.jw.restmodel.base.doctor.BaseDoctorSimpleVO;
|
|
|
import com.yihu.jw.restmodel.base.label.BasePatientLabelVO;
|
|
|
import com.yihu.jw.restmodel.base.org.BaseOrgVO;
|
|
|
import com.yihu.jw.restmodel.patient.signPackage.SerivePackageItemVO;
|
|
|
import com.yihu.jw.restmodel.patient.signPackage.ServicePackageRecordVO;
|
|
|
import com.yihu.jw.restmodel.patient.signPackage.ServicePackageVO;
|
|
|
import com.yihu.jw.restmodel.web.Envelop;
|
|
|
import com.yihu.jw.restmodel.web.MixEnvelop;
|
|
@ -25,6 +28,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* Created by Trick on 2018/11/27.
|
|
@ -45,11 +49,13 @@ public class PackageServiceEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "labelCode", required = false)String labelCode,
|
|
|
@ApiParam(name = "labelType", value = "标签类型")
|
|
|
@RequestParam(value = "labelType", required = false)String labelType,
|
|
|
@ApiParam(name = "patient", value = "居民code(判断居民是否签约,非必传)")
|
|
|
@RequestParam(value = "patient", required = false)String patient,
|
|
|
@ApiParam(name = "page", value = "第几页")
|
|
|
@RequestParam(value = "page", required = true)Integer page,
|
|
|
@ApiParam(name = "size", value = "每页大小")
|
|
|
@RequestParam(value = "size", required = true)Integer size) {
|
|
|
return packageService.findPackageService(city,labelCode,labelType,page,size);
|
|
|
return packageService.findPackageService(city,labelCode,labelType,patient,page,size);
|
|
|
}
|
|
|
|
|
|
|
|
@ -101,6 +107,24 @@ public class PackageServiceEndpoint extends EnvelopRestEndpoint {
|
|
|
return packageService.signPackage(recordDO);
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = PatientRequestMapping.SignPackage.signPackageAndFamily)
|
|
|
@ApiOperation(value = "绑定家人,签约服务包", notes = "绑定家人,签约服务包")
|
|
|
public Envelop signPackageAndFamily(@ApiParam(name = "recordJson", value = "签约实体")
|
|
|
@RequestParam(value = "recordJson", required = true)String recordJson,
|
|
|
@ApiParam(name = "patient", value = "申请绑定的居民code")
|
|
|
@RequestParam(value = "patient", required = true)String patient,
|
|
|
@ApiParam(name = "familyMobile", value = "家人的手机号码")
|
|
|
@RequestParam(value = "familyMobile", required = true)String familyMobile,
|
|
|
@ApiParam(name = "platform", value = "消息平台,1微信端/患者端,2医生APP端")
|
|
|
@RequestParam(value = "platform", required = true)Integer platform,
|
|
|
@ApiParam(name = "familyBindRole", value = "1\"配偶\",2\"父亲\",3\"母亲\",4\"公公\",5\"婆婆\",6\"岳父\",7\"岳母\",8\"女婿\",9\"儿媳\",10\"子女\"")
|
|
|
@RequestParam(value = "familyBindRole", required = true)Integer familyBindRole,
|
|
|
@ApiParam(name = "isAdult", value = "0未成年人 1成年人")
|
|
|
@RequestParam(value = "isAdult", required = true)Integer isAdult) throws Exception {
|
|
|
ServicePackageSignRecordDO recordDO = toEntity(recordJson, ServicePackageSignRecordDO.class);
|
|
|
return packageService.signPackageAndFamily(recordDO,patient,familyMobile,platform,familyBindRole,isAdult);
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = PatientRequestMapping.SignPackage.findDoctorById)
|
|
|
@ApiOperation(value = "获取医生基础信息", notes = "获取医生基础信息")
|
|
|
public ObjEnvelop<BaseDoctorSimpleVO> findDoctorById(@ApiParam(name = "doctorCode", value = "医生code")
|
|
@ -146,5 +170,20 @@ public class PackageServiceEndpoint extends EnvelopRestEndpoint {
|
|
|
return packageService.findPatientSignPackage( label, labelType, patient, operator, familyModel, status, isHos, page, size);
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = PatientRequestMapping.SignPackage.findLabelByLabelType)
|
|
|
@ApiOperation(value = "获取标签", notes = "获取标签")
|
|
|
public MixEnvelop<BasePatientLabelVO,BasePatientLabelVO> findLabelByLabelType(@ApiParam(name = "labelType", value = "标签类型") @RequestParam(value = "labelType", required = false)String labelType) {
|
|
|
List<PatientLabelDO> list = packageService.findLabelByLabelType(labelType);
|
|
|
List<BasePatientLabelVO> basePatientLabelVOs = new ArrayList<>();
|
|
|
convertToModels(list,basePatientLabelVOs,BasePatientLabelVO.class);
|
|
|
return MixEnvelop.getSuccess(PatientRequestMapping.SignPackage.api_success,basePatientLabelVOs);
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = PatientRequestMapping.SignPackage.findSingleSignPackageById)
|
|
|
@ApiOperation(value = "根据签约id获取签约详情", notes = "根据签约id获取签约详情")
|
|
|
public ObjEnvelop<ServicePackageRecordVO> findSingleSignPackageById(@ApiParam(name = "signId", value = "签约id") @RequestParam(value = "signId", required = false)String signId) {
|
|
|
return success(PatientRequestMapping.SignPackage.api_success,packageService.findSingleSignPackageById(signId));
|
|
|
}
|
|
|
|
|
|
//=================================
|
|
|
}
|