Trick před 5 roky
rodič
revize
9590511f40

+ 2 - 0
business/base-service/src/main/java/com/yihu/jw/dict/dao/DictHospitalDeptDao.java

@ -33,6 +33,8 @@ public interface DictHospitalDeptDao extends PagingAndSortingRepository<DictHosp
    List<DictHospitalDeptDO> findByOrgCode(String orgCode);
    List<DictHospitalDeptDO> findByOrgCodeAndConsultDeptFlag(String orgCode,String consultDeptFlag);
    List<DictHospitalDeptDO> findByOrgCodeIn(String orgCode);
    List<DictHospitalDeptDO> findByOrgCodeAndCode(String orgCode,String code);

+ 7 - 2
business/base-service/src/main/java/com/yihu/jw/dict/service/HospitalDeptService.java

@ -5,6 +5,7 @@ import com.yihu.jw.dict.dao.DictHospitalDeptDao;
import com.yihu.jw.entity.base.area.BaseCityDO;
import com.yihu.jw.entity.base.dict.DictHospitalDeptDO;
import com.yihu.mysql.query.BaseJpaService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -17,7 +18,11 @@ public class HospitalDeptService extends BaseJpaService<BaseCityDO, BaseCityDao>
    private DictHospitalDeptDao dictHospitalDeptDao;
    // 基于机构编码,获取该机构下所有的科室列表
    public List<DictHospitalDeptDO> getHosDeptByCode(String orgCode) {
        return dictHospitalDeptDao.findByOrgCode(orgCode);
    public List<DictHospitalDeptDO> getHosDeptByCode(String orgCode,String consultDeptFlag) {
        if(StringUtils.isNotBlank(consultDeptFlag)){
            return dictHospitalDeptDao.findByOrgCodeAndConsultDeptFlag(orgCode,consultDeptFlag);
        }else{
            return dictHospitalDeptDao.findByOrgCode(orgCode);
        }
    }
}

+ 2 - 2
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/EntranceService.java

@ -1089,7 +1089,7 @@ public class EntranceService {
     * @throws Exception
     */
//    @org.springframework.transaction.annotation.Transactional(rollbackFor = Exception.class)
    public List<DictHospitalDeptDO> updateMS02001(boolean demoFlag) throws Exception {
    public Boolean updateMS02001(boolean demoFlag) throws Exception {
        String fid = MS02001;
        String resp = "";
        if (demoFlag) {
@ -1144,7 +1144,7 @@ public class EntranceService {
            logger.info("dept:"+hospitalDeptMappingDOS.size());
        }
        dictHospitalDeptDao.save(hospitalDeptMappingDOS);
        return hospitalDeptMappingDOS;
        return true;
    }
    public Boolean checkDeptExist(List<DictHospitalDeptDO> oriDict,String code){

+ 7 - 0
svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/MqSdkController.java

@ -10,6 +10,7 @@ import com.yihu.jw.hospital.prescription.service.entrance.RegisterService;
import com.yihu.jw.restmodel.hospital.prescription.WlyyOutpatientVO;
import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionVO;
import com.yihu.jw.restmodel.hospital.register.RegisterAmVO;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
@ -188,6 +189,12 @@ public class MqSdkController extends EnvelopRestEndpoint {
        return success(obj);
    }
    @GetMapping(value = "/updateMS02001")
    @ApiOperation(value = "科室字典  ")
    public Envelop updateMS02001() throws Exception {
        return success(entranceService.updateMS02001(demoFlag));
    }
    @GetMapping(value = "/MS02013")
    @ApiOperation(value = "号别字典接口   ")
    public ListEnvelop MS02013(

+ 4 - 2
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/base/BaseInfoEndpoint.java

@ -91,8 +91,10 @@ public class BaseInfoEndpoint extends EnvelopRestEndpoint {
    @ApiOperation(value = "根据机构编码获取部门列表信息", notes = "基础数据获取")
    public Envelop getDeptByOrgCode(
            @ApiParam(name = "orgCode", value = "机构编码")
            @RequestParam(value = "orgCode", required = false) String orgCode)  {
        List<DictHospitalDeptDO> res =  hospitalDeptService.getHosDeptByCode(orgCode);
            @RequestParam(value = "orgCode", required = false) String orgCode,
            @ApiParam(name = "consultDeptFlag", value = "是否是就诊科室,1为查询门诊,不传为全部")
            @RequestParam(value = "consultDeptFlag", required = false) String consultDeptFlag)  {
        List<DictHospitalDeptDO> res =  hospitalDeptService.getHosDeptByCode(orgCode,consultDeptFlag);
        if(res != null && res.size() > 0 ){
            return  success(res);
        }else{