Browse Source

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

trick9191 5 years ago
parent
commit
678ed69ae5

+ 4 - 0
business/base-service/src/main/java/com/yihu/jw/area/dao/BaseStreetDao.java

@ -5,6 +5,8 @@ import org.springframework.data.repository.PagingAndSortingRepository;
import com.yihu.jw.entity.base.area.BaseStreetDO;
import java.util.List;
/**
 * 
 * 街道字典 数据库访问层
@ -18,4 +20,6 @@ import com.yihu.jw.entity.base.area.BaseStreetDO;
 * @since 1.
 */
public interface BaseStreetDao extends PagingAndSortingRepository<BaseStreetDO, Integer>, JpaSpecificationExecutor<BaseStreetDO>  {
    List<BaseStreetDO> findByTown(String town);
}

+ 6 - 0
business/base-service/src/main/java/com/yihu/jw/area/service/BaseStreetService.java

@ -5,6 +5,8 @@ import com.yihu.mysql.query.BaseJpaService;
import org.springframework.stereotype.Service;
import com.yihu.jw.entity.base.area.BaseStreetDO;
import java.util.List;
/**
 * 
 * 街道字典服务service
@ -19,4 +21,8 @@ import com.yihu.jw.entity.base.area.BaseStreetDO;
 */
@Service
public class BaseStreetService extends BaseJpaService<BaseStreetDO, BaseStreetDao> {
    public List<BaseStreetDO> findByTown(String town){
        return findByTown(town);
    }
}

+ 47 - 3
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -4054,12 +4054,56 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @return
     * @throws Exception
     */
    public net.sf.json.JSONObject setRecord(String json)throws Exception{
    public net.sf.json.JSONObject setRecord(String json,String type)throws Exception{
        net.sf.json.JSONObject rs = new JSONObject();
        ArchiveVO archiveVO = objectMapper.readValue(json,ArchiveVO.class);
        if(archiveVO!=null){
           return entranceService.BS16018(archiveVO,demoFlag);
            if(StringUtils.isBlank(archiveVO.getBrnl00())){
               archiveVO.setBrnl00(IdCardUtil.getAgeForIdcard(archiveVO.getSfzhao())+"");
            }
            if(StringUtils.isBlank(archiveVO.getCsrq00())){
               archiveVO.setCsrq00(DateUtil.dateToStr(IdCardUtil.getBirthdayForIdcard(archiveVO.getSfzhao()),"yyyyMMdd"));
            }
            //1为需要同步建档
            if("1".equals(type)){
                rs = entranceService.BS16018(archiveVO,demoFlag);
            }
            //保存互联网医院居民账户
            BasePatientDO patientDO = savePatient(archiveVO);
            rs.put("patient",patientDO.getId());
        }
        return null;
        return rs;
    }
    /**
     * 存储居民
     * @param archiveVO
     * @return
     */
    public BasePatientDO savePatient(ArchiveVO archiveVO)throws Exception{
        BasePatientDO patientDO =  basePatientDao.findByIdcardAndDel(archiveVO.getSfzhao(),"1");
        if(patientDO == null) {
            BasePatientDO patient = new BasePatientDO();
            String salt = UUID.randomUUID().toString().substring(0, 5);
            String mobile = archiveVO.getYytel0();
            String pw = mobile.substring(mobile.length() - 6);
            patient.setIdcard(archiveVO.getSfzhao());
            patient.setName(archiveVO.getXming0());
            patient.setPassword(MD5.md5Hex(pw + "{" + salt + "}"));
            patient.setSalt(salt);
            patient.setMobile(mobile);
            patient.setDel("1");
            patient.setEnabled(1);
            patient.setLocked(0);
            patient.setCreateTime(new Date());
            patient.setUpdateTime(new Date());
            patient.setBirthday(IdCardUtil.getBirthdayForIdcard(archiveVO.getSfzhao()));
            return basePatientDao.save(patient);
        }
        return patientDO;
    }
    /**

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

@ -2367,9 +2367,8 @@ public class EntranceService {
            sbs.append("</Msg>");
            sbs.append("<startNum>1</startNum></MsgInfo></ESBEntry>");
            //查询信息拼接
            logger.info(fid+" sbs:"+sbs.toString());
            sbs.append("<startNum>1</startNum></MsgInfo></ESBEntry>");
            //查询信息拼接{"cardno":"DA9549295","xming0":"侯颖龙","sfzhao":"350583199510282220","xbie00":"2","yytel0":"18859250126","grsfen":"2","addres":"","brnl00":"25","csrq00":"19951028"}
            // {"code":"1","MsgInfo":[{"resquest":{"@ans_code":"00","@msg":"该卡已注册"}}]}
            resp = MqSdkUtil.putReqAndGetRespByQueryStr(sbs.toString(), fid);
            resp = MqSdkUtil.xml2jsonArrayRootRow(resp);
            logger.info(fid+" resp:"+resp);

+ 3 - 0
business/base-service/src/mqConfig/esbmq-config.xml

@ -69,6 +69,9 @@
				<!--建立档案-->
				<BS16018_0>EwellQ.S60.BS16018.PUT</BS16018_0>
				<BS16018_1>EwellQ.S60.BS16018.GET</BS16018_1>
				<!--档案查询-->
				<BS10008_0>EwellQ.S60.BS10008.PUT</BS10008_0>
				<BS10008_1>EwellQ.S60.BS10008.GET</BS10008_1>
				<!--检查检验start-->
				<BS20030_0>EwellQ.S60.BS20030.PUT</BS20030_0>

+ 7 - 0
gateway/ag-basic/src/main/resources/bootstrap.yml

@ -40,4 +40,11 @@ spring:
  cloud:
    config:
      uri: ${wlyy.pring.config.uri:http://192.0.33.26:1221}
      label: ${wlyy.spring.config.label:master}
---
spring:
  profiles: jwprod70
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://172.16.1.70:1221}
      label: ${wlyy.spring.config.label:master}

+ 7 - 0
server/svr-authentication/src/main/resources/bootstrap.yml

@ -27,4 +27,11 @@ spring:
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://192.0.33.26:1221}
      label: ${wlyy.spring.config.label:master}
---
spring:
  profiles: jwprod70
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://172.16.1.70:1221}
      label: ${wlyy.spring.config.label:master}

+ 7 - 0
svr/svr-internet-hospital-entrance/src/main/resources/bootstrap.yml

@ -38,3 +38,10 @@ spring:
    config:
      uri: ${wlyy.spring.config.uri:http://192.168.131.174:1221}
      label: ${wlyy.spring.config.label:local}
---
spring:
  profiles: jwprod70
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://172.16.1.70:1221}
      label: ${wlyy.spring.config.label:master}

+ 7 - 0
svr/svr-internet-hospital-entrance/src/mqConfig/esbmq-config.xml

@ -72,6 +72,13 @@
				<MS02017_0>EwellQ.S60.MS02017.PUT</MS02017_0>
				<MS02017_1>EwellQ.S60.MS02017.GET</MS02017_1>
				<!--建立档案-->
				<BS16018_0>EwellQ.S60.BS16018.PUT</BS16018_0>
				<BS16018_1>EwellQ.S60.BS16018.GET</BS16018_1>
				<!--档案查询-->
				<BS10008_0>EwellQ.S60.BS10008.PUT</BS10008_0>
				<BS10008_1>EwellQ.S60.BS10008.GET</BS10008_1>
				<!--检查检验start-->
				<BS20030_0>EwellQ.S60.BS20030.PUT</BS20030_0>
				<BS20030_1>EwellQ.S60.BS20030.GET</BS20030_1>

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

@ -1,6 +1,7 @@
package com.yihu.jw.hospital.endpoint.base;
import com.yihu.jw.area.service.BaseCityService;
import com.yihu.jw.area.service.BaseStreetService;
import com.yihu.jw.dict.service.BaseDictJobTitleService;
import com.yihu.jw.dict.service.HospitalDeptService;
import com.yihu.jw.doctor.service.BaseDoctorHosService;
@ -50,6 +51,9 @@ public class BaseInfoEndpoint extends EnvelopRestEndpoint {
    @Autowired
    private BaseOrgInfoService baseOrgInfoService;
    @Autowired
    private BaseStreetService baseStreetService;
    /**
     * 获取市列表信息
     * @return
@ -137,6 +141,11 @@ public class BaseInfoEndpoint extends EnvelopRestEndpoint {
        }
    }
    @GetMapping(value = "/findByTown")
    @ApiOperation(value = "获取街道信息", notes = "获取街道信息")
    public Envelop findByTown(@ApiParam(name = "town", value = "区级code")
                              @RequestParam(value = "town", required = true) String town)  {
        return success(baseStreetService.findByTown(town));
    }
}

+ 5 - 3
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

@ -906,10 +906,12 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    }
    @PostMapping(value = BaseHospitalRequestMapping.Prescription.setRecord)
    @ApiOperation(value = "建立档案")
    @ApiOperation(value = "his建立档案与互联网医院账户同步")
    public Envelop setRecord(@ApiParam(name = "json", value = "档案实体json")
                             @RequestParam(value = "json",required = true) String json)throws Exception{
        return success(prescriptionService.setRecord(json));
                             @RequestParam(value = "json",required = true) String json,
                             @ApiParam(name = "type", value = "1.需要his建档,2.仅同步互联网医院账户")
                             @RequestParam(value = "type",required = true)String type)throws Exception{
        return success(prescriptionService.setRecord(json,type));
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findPatientRecord)

+ 8 - 0
svr/svr-internet-hospital/src/main/resources/bootstrap.yml

@ -38,3 +38,11 @@ spring:
    config:
      uri: ${wlyy.spring.config.uri:http://192.168.131.174:1221}
      label: ${wlyy.spring.config.label:local}
---
spring:
  profiles: jwprod70
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://172.16.1.70:1221}
      label: ${wlyy.spring.config.label:master}