Browse Source

Merge branch 'dev' of trick9191/wlyy2.0 into dev

trick9191 6 years ago
parent
commit
3518962b3c

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/org/dao/BaseOrgDao.java

@ -19,7 +19,7 @@ import java.util.Map;
 * litaohong 	1.0  		2018年08月31日 	Created
 *
 * </pre>
 * @since 1.
 * @since 1
 */
public interface BaseOrgDao extends PagingAndSortingRepository<BaseOrgDO, String>, JpaSpecificationExecutor<BaseOrgDO>  {

+ 1 - 1
common/common-request-mapping/src/main/java/com/yihu/jw/rm/patient/PatientRequestMapping.java

@ -30,7 +30,7 @@ public class PatientRequestMapping {
        public static final String findDoctorByOrg  = "/findDoctorByOrg";
        public static final String signPackage  = "/signPackage";
        public static final String findDoctorById  = "/findDoctorById";
        public static final String findOrgById  = "/findOrgById";
        public static final String findOrgByCode  = "/findOrgByCode";
    }
    /**
     * myFamily

+ 16 - 16
svr/svr-patient/src/main/java/com/yihu/jw/patient/endpoint/sericePackage/PackageServiceEndpoint.java

@ -37,14 +37,14 @@ public class PackageServiceEndpoint extends EnvelopRestEndpoint {
    @Autowired
    private PackageService packageService;
    @GetMapping(value= PatientRequestMapping.SignPackage.findPackageService, consumes= MediaType.APPLICATION_JSON_UTF8_VALUE)
    @GetMapping(value= PatientRequestMapping.SignPackage.findPackageService)
    @ApiOperation(value = "获取服务包", notes = "获取服务包")
    public MixEnvelop findPackageService(@ApiParam(name = "city", value = "城市代码")
                                         @RequestParam(value = "city", required = true)String city,
                                         @ApiParam(name = "labelCode", value = "标签code")
                                         @RequestParam(value = "labelCode", required = true)String labelCode,
                                         @ApiParam(name = "city", value = "城市代码")
                                         @RequestParam(value = "city", required = true)String labelType,
                                         @RequestParam(value = "labelCode", required = false)String labelCode,
                                         @ApiParam(name = "labelType", value = "标签类型")
                                         @RequestParam(value = "labelType", required = false)String labelType,
                                         @ApiParam(name = "page", value = "第几页")
                                         @RequestParam(value = "page", required = true)Integer page,
                                         @ApiParam(name = "size", value = "每页大小")
@ -53,7 +53,7 @@ public class PackageServiceEndpoint extends EnvelopRestEndpoint {
    }
    @GetMapping(value = PatientRequestMapping.SignPackage.findServicePackageByPackageId, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @GetMapping(value = PatientRequestMapping.SignPackage.findServicePackageByPackageId)
    @ApiOperation(value = "获取服务包详情", notes = "获取服务包详情")
    public ObjEnvelop<ServicePackageVO> findServicePackageByPackageId(@ApiParam(name = "packageId", value = "服务包id")
                                                          @RequestParam(value = "packageId", required = true)String packageId) {
@ -66,14 +66,14 @@ public class PackageServiceEndpoint extends EnvelopRestEndpoint {
        return success(PatientRequestMapping.SignPackage.api_success,packageVO);
    }
    @GetMapping(value = PatientRequestMapping.SignPackage.findOrgByPackageId, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @GetMapping(value = PatientRequestMapping.SignPackage.findOrgByPackageId)
    @ApiOperation(value = "获取服务包执行机构", notes = "获取服务包执行机构")
    public MixEnvelop findOrgByPackageId(@ApiParam(name = "packageId", value = "服务包id")
                                         @RequestParam(value = "packageId", required = true)String packageId,
                                         @ApiParam(name = "latitude", value = "纬度")
                                         @RequestParam(value = "latitude", required = true)Double latitude,
                                         @RequestParam(value = "latitude", required = false)Double latitude,
                                         @ApiParam(name = "longitude", value = "经度")
                                         @RequestParam(value = "longitude", required = true)Double longitude,
                                         @RequestParam(value = "longitude", required = false)Double longitude,
                                         @ApiParam(name = "page", value = "第几页")
                                         @RequestParam(value = "page", required = true)Integer page,
                                         @ApiParam(name = "size", value = "每页大小")
@ -82,7 +82,7 @@ public class PackageServiceEndpoint extends EnvelopRestEndpoint {
    }
    @GetMapping(value = PatientRequestMapping.SignPackage.findDoctorByOrg, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @GetMapping(value = PatientRequestMapping.SignPackage.findDoctorByOrg)
    @ApiOperation(value = "获取机构下医生", notes = "获取机构下医生")
    public MixEnvelop findDoctorByOrg(@ApiParam(name = "org", value = "机构code")
                                      @RequestParam(value = "org", required = true)String org,
@ -93,7 +93,7 @@ public class PackageServiceEndpoint extends EnvelopRestEndpoint {
        return packageService.findDoctorByOrg( org,  page,  size);
    }
    @PostMapping(value = PatientRequestMapping.SignPackage.signPackage, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @PostMapping(value = PatientRequestMapping.SignPackage.signPackage)
    @ApiOperation(value = "签约服务包", notes = "签约服务包")
    public Envelop signPackage(@ApiParam(name = "recordJson", value = "签约实体")
                               @RequestParam(value = "recordJson", required = true)String recordJson) throws Exception{
@ -101,20 +101,20 @@ public class PackageServiceEndpoint extends EnvelopRestEndpoint {
        return packageService.signPackage(recordDO);
    }
    @GetMapping(value = PatientRequestMapping.SignPackage.findDoctorById, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @GetMapping(value = PatientRequestMapping.SignPackage.findDoctorById)
    @ApiOperation(value = "获取医生基础信息", notes = "获取医生基础信息")
    public ObjEnvelop<BaseDoctorSimpleVO> findDoctorById(@ApiParam(name = "doctorCode", value = "机构code")
    public ObjEnvelop<BaseDoctorSimpleVO> findDoctorById(@ApiParam(name = "doctorCode", value = "医生code")
                                                         @RequestParam(value = "doctorCode", required = true)String doctorCode) {
        BaseDoctorDO baseDoctorDO = packageService.findDoctorById(doctorCode);
        BaseDoctorSimpleVO baseDoctorSimpleVO = convertToModel(baseDoctorDO,BaseDoctorSimpleVO.class);
        return success(PatientRequestMapping.SignPackage.api_success,baseDoctorSimpleVO);
    }
    @GetMapping(value = PatientRequestMapping.SignPackage.findOrgById, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @GetMapping(value = PatientRequestMapping.SignPackage.findOrgByCode)
    @ApiOperation(value = "获取机构基础信息详情", notes = "获取机构基础信息详情")
    public ObjEnvelop<BaseOrgVO> findOrgById(@ApiParam(name = "orgId", value = "机构id")
                                 @RequestParam(value = "orgId", required = true)String orgId) {
        BaseOrgDO baseOrgDO =  packageService.findOrgById(orgId);
    public ObjEnvelop<BaseOrgVO> findOrgByCode(@ApiParam(name = "orgCode", value = "机构编码")
                                 @RequestParam(value = "orgCode", required = true)String orgCode) {
        BaseOrgDO baseOrgDO =  packageService.findOrgByCode(orgCode);
        BaseOrgVO baseOrgVO = convertToModel(baseOrgDO,BaseOrgVO.class);
        return success(PatientRequestMapping.SignPackage.api_success,baseOrgVO);
    }

+ 5 - 5
svr/svr-patient/src/main/java/com/yihu/jw/patient/service/service_package/PackageService.java

@ -156,9 +156,9 @@ public class PackageService {
                    "    ) " +
                    "   ) " +
                    "  ) * 1000 " +
                    " ) AS distance ";
                    " ) AS distance, ";
        }
        sql+=   " o.address, "+
        sql+=   " o.address "+
                " FROM " +
                " base_org o " +
                " JOIN base_package_org po ON o.`code` = po.org_code " +
@ -204,7 +204,7 @@ public class PackageService {
                " WHERE " +
                " h.org_code = '"+org+"'";
        sql+=    " LIMIT " + (page - 1) * size + "," + size + "";
        List<BaseDoctorOrgVO> list = jdbcTemplate.query(sql, new BeanPropertyRowMapper(OrgDistanceVO.class));
        List<BaseDoctorOrgVO> list = jdbcTemplate.query(sql, new BeanPropertyRowMapper(BaseDoctorOrgVO.class));
        return MixEnvelop.getSuccessListWithPage(PatientRequestMapping.SignPackage.api_success, list, page, size, count);
@ -219,8 +219,8 @@ public class PackageService {
        return baseDoctorDao.findOne(doctorCode);
    }
    public BaseOrgDO findOrgById(String orgId){
        return baseOrgDao.findOne(orgId);
    public BaseOrgDO findOrgByCode(String orgCode){
        return baseOrgDao.findByCode(orgCode);
    }
//    public MixEnvelop findSignPackage(){