Przeglądaj źródła

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

trick9191 6 lat temu
rodzic
commit
9cdaac13b2

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/wechat/service/WxAccessTokenService.java

@ -21,7 +21,7 @@ import org.springframework.util.StringUtils;
import java.util.*;
/**
 * Created by Administrator on 2017/5/18 0018.
 * Created by Administrator on 2017/5/18
 */
@Service
public class WxAccessTokenService extends BaseJpaService<WxAccessTokenDO, WxAccessTokenDao> {

+ 5 - 0
svr/svr-patient/src/main/java/com/yihu/jw/patient/dao/servicepackage/ServicePackageSignRecordDao.java

@ -2,11 +2,16 @@ package com.yihu.jw.patient.dao.servicepackage;
import com.yihu.jw.entity.base.servicePackage.ServicePackageSignRecordDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * Created by Trick on 2018/11/29.
 */
public interface ServicePackageSignRecordDao extends PagingAndSortingRepository<ServicePackageSignRecordDO, String>, JpaSpecificationExecutor<ServicePackageSignRecordDO> {
    @Query("from ServicePackageSignRecordDO where patient  =?1 and servicePackageId =?2 and status >=0")
    public List<ServicePackageSignRecordDO> findByPatientRecord(String patient,String servicePackageId);
}

+ 15 - 0
svr/svr-patient/src/main/java/com/yihu/jw/patient/endpoint/servicepackage/PackageServiceEndpoint.java

@ -1,5 +1,6 @@
package com.yihu.jw.patient.endpoint.sericepackage;
import com.yihu.jw.entity.base.dict.DictHospitalDeptDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.org.BaseOrgDO;
import com.yihu.jw.entity.base.servicePackage.ServicePackageDO;
@ -7,6 +8,7 @@ import com.yihu.jw.entity.base.servicePackage.ServicePackageItemDO;
import com.yihu.jw.entity.base.servicePackage.ServicePackageSignRecordDO;
import com.yihu.jw.patient.service.service_package.PackageService;
import com.yihu.jw.restmodel.base.dict.DictHospitalDeptVO;
import com.yihu.jw.restmodel.base.doctor.BaseDoctorSimpleVO;
import com.yihu.jw.restmodel.base.org.BaseOrgVO;
import com.yihu.jw.restmodel.patient.signPackage.SerivePackageItemVO;
@ -116,8 +118,21 @@ public class PackageServiceEndpoint extends EnvelopRestEndpoint {
                                 @RequestParam(value = "orgCode", required = true)String orgCode) {
        BaseOrgDO baseOrgDO =  packageService.findOrgByCode(orgCode);
        BaseOrgVO baseOrgVO = convertToModel(baseOrgDO,BaseOrgVO.class);
        List<DictHospitalDeptDO> depts = packageService.findDeptByOrgCode(orgCode);
        List<DictHospitalDeptVO> deptVOs = new ArrayList<>();
        convertToModels(depts,deptVOs,DictHospitalDeptVO.class);
        baseOrgVO.setDepts(deptVOs);
        return success(PatientRequestMapping.SignPackage.api_success,baseOrgVO);
    }
    @GetMapping(value = PatientRequestMapping.SignPackage.findPatientSignExist)
    @ApiOperation(value = "判断签约记录是否存在", notes = "判断签约记录是否存在")
    public ObjEnvelop<Boolean> findPatientSignExist(@ApiParam(name = "patient", value = "患者code") @RequestParam(value = "patient", required = true)String patient,
                                        @ApiParam(name = "packageId", value = "服务包id")
                                        @RequestParam(value = "packageId", required = true)String packageId) {
        return success(PatientRequestMapping.SignPackage.api_success,packageService.findPatientSignExist(patient,packageId));
    }
//=================================
}