Bläddra i källkod

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

wangzhinan 4 år sedan
förälder
incheckning
a9833155f1
34 ändrade filer med 340 tillägg och 51 borttagningar
  1. 1 0
      business/base-service/src/main/java/com/yihu/jw/doctor/service/BaseDoctorInfoService.java
  2. 13 3
      business/base-service/src/main/java/com/yihu/jw/hospital/family/service/WlyyFamilyMemberService.java
  3. 1 1
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/dao/OutpatientDao.java
  4. 20 6
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java
  5. 17 1
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/XzyyPrescriptionService.java
  6. 4 1
      common/common-entity/pom.xml
  7. 8 4
      common/common-entity/src/main/java/com/yihu/jw/entity/iot/company/IotCompanyDO.java
  8. 6 0
      common/common-entity/src/main/java/com/yihu/jw/entity/iot/device/IotDeviceOrderDO.java
  9. 4 0
      common/common-entity/src/main/java/com/yihu/jw/entity/iot/device/IotDeviceQualityInspectionPlanDO.java
  10. 4 4
      common/common-entity/src/main/java/com/yihu/jw/entity/iot/device/IotDeviceSimDO.java
  11. 4 0
      common/common-entity/src/main/java/com/yihu/jw/entity/iot/device/IotDeviceTransfersDO.java
  12. 3 0
      common/common-entity/src/main/java/com/yihu/jw/entity/iot/device/IotOrderPurchaseDO.java
  13. 5 0
      common/common-entity/src/main/java/com/yihu/jw/entity/iot/device/IotPatientDeviceDO.java
  14. 4 0
      common/common-entity/src/main/java/com/yihu/jw/entity/iot/device/IotQualityRecordDO.java
  15. 3 0
      common/common-entity/src/main/java/com/yihu/jw/entity/iot/dict/IotHospitalDO.java
  16. 5 0
      common/common-entity/src/main/java/com/yihu/jw/entity/iot/equipment/IotEquipmentDetailDO.java
  17. 5 0
      common/common-entity/src/main/java/com/yihu/jw/entity/iot/gateway/GcClientDetails.java
  18. 3 4
      common/common-entity/src/main/java/com/yihu/jw/entity/iot/platform/IotInterfaceLogDO.java
  19. 3 0
      common/common-entity/src/main/java/com/yihu/jw/entity/iot/product/IotProductExtendInfoDO.java
  20. 81 0
      common/common-entity/src/main/java/com/yihu/jw/entity/util/AesEncryptUtils.java
  21. 18 0
      common/common-entity/src/main/java/com/yihu/jw/entity/util/StringFStringEncryptConverter.java
  22. 1 1
      server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyLoginEndpoint.java
  23. 10 1
      server/svr-authentication/src/main/java/com/yihu/jw/security/service/RegisterService.java
  24. 2 2
      server/svr-authentication/src/main/resources/application.yml
  25. 2 2
      svr/svr-base/src/main/resources/application.yml
  26. 5 5
      svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/DoorOrderService.java
  27. 0 1
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/hospital/WlyyFamilyMemberController.java
  28. 27 1
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java
  29. 2 2
      svr/svr-iot-job/src/main/resources/application.yml
  30. 72 5
      svr/svr-iot/pom.xml
  31. 1 1
      svr/svr-iot/src/main/java/com/yihu/iot/service/company/IotCompanyService.java
  32. 2 2
      svr/svr-iot/src/main/resources/application.yml
  33. 2 2
      svr/svr-wlyy-health-bank/src/main/resources/application.yml
  34. 2 2
      svr/svr-wlyy-specialist/src/main/resources/application.yml

+ 1 - 0
business/base-service/src/main/java/com/yihu/jw/doctor/service/BaseDoctorInfoService.java

@ -576,6 +576,7 @@ public class BaseDoctorInfoService extends BaseJpaService<BaseDoctorDO, BaseDoct
                wlyyChargeDictDO.setCreateTime(new Date());
                wlyyChargeDictDO.setReqFee(chargeFee);
                wlyyChargeDictDO.setChargeType(fee+"");
                wlyyChargeDictDO.setDeptTypeCode("6");
                wlyyChargeDictDO.setChargeName(doctorName+"创建的号别");
                wlyyChargeDictDO = wlyyChargeDictDao.save(wlyyChargeDictDO);
                return  wlyyChargeDictDO.getChargeType();

+ 13 - 3
business/base-service/src/main/java/com/yihu/jw/hospital/family/service/WlyyFamilyMemberService.java

@ -91,6 +91,18 @@ public class WlyyFamilyMemberService extends BaseJpaService<WlyyPatientFamilyMem
        String birth = "";
        String yktFamilyId = "";
        int sex=3;
        List<BasePatientDO> list = basePatientDao.findByMobile(phoneNum);
        if (list!=null&&list.size()>0){
            if (basePatientDO.getMobile().equalsIgnoreCase(phoneNum)){
            }else {
                mixEnvelop.setStatus(408);
                mixEnvelop.setMessage("您所添加的家属手机号已被他人占用");
                return  mixEnvelop;
            }
        }else {
            basePatientDO.setMobile(phoneNum);
        }
        //获取his家属数据
        JSONArray jsonArray = new JSONArray();
        if("xm_ykyy_wx".equalsIgnoreCase(wxId)){
@ -264,9 +276,7 @@ public class WlyyFamilyMemberService extends BaseJpaService<WlyyPatientFamilyMem
        result.setPatient(patientId);
        result.setCardNo(idCard);
        result.setCardType(cardType);
        //保存到base_patient表中
        //basePatientDO.setMobile(phoneNum);
        //保存到base_patient表
        basePatientDO.setName(familyName);
        basePatientDO.setIdcard(idCard);
        basePatientDO.setRegister("0");

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/dao/OutpatientDao.java

@ -15,7 +15,7 @@ import java.util.List;
 */
public interface OutpatientDao extends PagingAndSortingRepository<WlyyOutpatientDO, String>, JpaSpecificationExecutor<WlyyOutpatientDO> {
    @Query("from WlyyOutpatientDO a where a.patient = ?1 and a.outpatientType <> '3' and a.status in(0,1)")
    @Query("from WlyyOutpatientDO a where a.patient = ?1 and a.outpatientType <> '3' and a.outpatientType <> '4' and a.status in(0,1)")
    List<WlyyOutpatientDO> findByPatientList(String patient);
    @Query("from WlyyOutpatientDO a where a.patient = ?1 and  a.outpatientType = '3' and a.status in(0,1)")
    List<WlyyOutpatientDO> findByPatientAndDoctorList(String patient);

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

@ -1952,12 +1952,26 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        }
        //下载银医通
        net.sf.json.JSONObject object1 = entranceService.qutpatientBalance(outpatientDO.getCardNo(), demoFlag);
        BaseDoctorDO doctorDO = baseDoctorDao.findById(doctor);
        if (doctorDO == null) {
            throw new RuntimeException("未找到医生信息");
        }
        logger.info("下载银医通");
        String chargeType = null;
        if (StringUtils.isNoneBlank(outpatientDO.getChargeType())){
            if (outpatientDO.getChargeType().equalsIgnoreCase("33")){
                chargeType = outpatientDO.getChargeType();
            }
        String chargeType = "";
        if ("1".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"1".equalsIgnoreCase(outpatientDO.getType())){
            chargeType = doctorDO.getTwfzChargeType();
        }else if ("1".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"2".equalsIgnoreCase(outpatientDO.getType())){
            chargeType = doctorDO.getSpfzChargeType();
        }else if ("3".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"1".equalsIgnoreCase(outpatientDO.getType())){
            chargeType = doctorDO.getTwzxChargeType();
        }else if ("3".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"2".equalsIgnoreCase(outpatientDO.getType())){
            chargeType = doctorDO.getSpzxChargeType();
        }else if ("3".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"3".equalsIgnoreCase(outpatientDO.getType())){
            chargeType = doctorDO.getJyzxChargeType();
        }else if ("2".equalsIgnoreCase(outpatientDO.getOutpatientType())){
            chargeType = doctorDO.getXtfzChargeType();
        }else {
            chargeType = doctorDO.getChargeType();
        }
        net.sf.json.JSONObject rs = entranceService.BS10111(outpatientDO.getCardNo(), doctorMappingDO.getMappingCode(), outpatientDO.getDept(), chargeType, outpatientDO.getWinNo(), demoFlag);
        net.sf.json.JSONObject res = rs.getJSONObject("resquest");
@ -10135,7 +10149,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        BaseDoctorDO doctorDO = baseDoctorDao.findById(outpatientDO.getDoctor());
        outpatientDO.setMjz("mz");
        outpatientDO.setStatus("1");
        outpatientDO.setStatus("3");
        outpatientDO.setCreateTime(new Date());
        outpatientDO.setIdcard(patientDO.getIdcard());
        outpatientDO.setCreateTime(new Date());

+ 17 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/XzyyPrescriptionService.java

@ -123,7 +123,23 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
                courierflag="Y";
            }
        }
        JSONObject res =  xzzxEntranceService.registeredOperate(doctorFlag,outpatientDO.getDept(),patientMappingDO.getMappingCode(),doctorDO.getChargeType(),courierflag);
        String chargeType = "";
        if ("1".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"1".equalsIgnoreCase(outpatientDO.getType())){
            chargeType = doctorDO.getTwfzChargeType();
        }else if ("1".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"2".equalsIgnoreCase(outpatientDO.getType())){
            chargeType = doctorDO.getSpfzChargeType();
        }else if ("3".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"1".equalsIgnoreCase(outpatientDO.getType())){
            chargeType = doctorDO.getTwzxChargeType();
        }else if ("3".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"2".equalsIgnoreCase(outpatientDO.getType())){
            chargeType = doctorDO.getSpzxChargeType();
        }else if ("3".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"3".equalsIgnoreCase(outpatientDO.getType())){
            chargeType = doctorDO.getJyzxChargeType();
        }else if ("2".equalsIgnoreCase(outpatientDO.getOutpatientType())){
            chargeType = doctorDO.getXtfzChargeType();
        }else {
            chargeType = doctorDO.getChargeType();
        }
        JSONObject res =  xzzxEntranceService.registeredOperate(doctorFlag,outpatientDO.getDept(),patientMappingDO.getMappingCode(),chargeType,courierflag);
        JSONObject result = new JSONObject();
        logger.info("挂号结果 res: " + res.toString());
        String rsCode = "";

+ 4 - 1
common/common-entity/pom.xml

@ -23,6 +23,9 @@
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
        </dependency>
    </dependencies>
</project>

+ 8 - 4
common/common-entity/src/main/java/com/yihu/jw/entity/iot/company/IotCompanyDO.java

@ -1,11 +1,9 @@
package com.yihu.jw.entity.iot.company;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import com.yihu.jw.entity.util.StringFStringEncryptConverter;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
@ -92,6 +90,7 @@ public class IotCompanyDO extends UuidIdentityEntityWithOperator implements Seri
        this.status = status;
    }
    @Convert(converter = StringFStringEncryptConverter.class)
    public String getName() {
        return name;
    }
@ -140,6 +139,7 @@ public class IotCompanyDO extends UuidIdentityEntityWithOperator implements Seri
        this.organizationAddress = organizationAddress;
    }
    @Convert(converter = StringFStringEncryptConverter.class)
    public String getOfficePhone() {
        return officePhone;
    }
@ -148,6 +148,7 @@ public class IotCompanyDO extends UuidIdentityEntityWithOperator implements Seri
        this.officePhone = officePhone;
    }
    @Convert(converter = StringFStringEncryptConverter.class)
    public String getContactsName() {
        return contactsName;
    }
@ -156,6 +157,7 @@ public class IotCompanyDO extends UuidIdentityEntityWithOperator implements Seri
        this.contactsName = contactsName;
    }
    @Convert(converter = StringFStringEncryptConverter.class)
    public String getContactsMobile() {
        return contactsMobile;
    }
@ -164,6 +166,7 @@ public class IotCompanyDO extends UuidIdentityEntityWithOperator implements Seri
        this.contactsMobile = contactsMobile;
    }
    @Convert(converter = StringFStringEncryptConverter.class)
    public String getContactsIdcard() {
        return contactsIdcard;
    }
@ -277,6 +280,7 @@ public class IotCompanyDO extends UuidIdentityEntityWithOperator implements Seri
        this.auditTime = auditTime;
    }
    @Convert(converter = StringFStringEncryptConverter.class)
    public String getAuditName() {
        return auditName;
    }

+ 6 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/iot/device/IotDeviceOrderDO.java

@ -1,8 +1,10 @@
package com.yihu.jw.entity.iot.device;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import com.yihu.jw.entity.util.StringFStringEncryptConverter;
import javax.persistence.Column;
import javax.persistence.Convert;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
@ -161,6 +163,7 @@ public class IotDeviceOrderDO extends UuidIdentityEntityWithOperator implements
        this.purchaseUnitName = purchaseUnitName;
    }
    @Convert(converter = StringFStringEncryptConverter.class)
    public String getPurchaserName() {
        return purchaserName;
    }
@ -169,6 +172,7 @@ public class IotDeviceOrderDO extends UuidIdentityEntityWithOperator implements
        this.purchaserName = purchaserName;
    }
    @Convert(converter = StringFStringEncryptConverter.class)
    public String getPurchaserPhone() {
        return purchaserPhone;
    }
@ -193,6 +197,7 @@ public class IotDeviceOrderDO extends UuidIdentityEntityWithOperator implements
        this.supplierName = supplierName;
    }
    @Convert(converter = StringFStringEncryptConverter.class)
    public String getSupplierLeader() {
        return supplierLeader;
    }
@ -201,6 +206,7 @@ public class IotDeviceOrderDO extends UuidIdentityEntityWithOperator implements
        this.supplierLeader = supplierLeader;
    }
    @Convert(converter = StringFStringEncryptConverter.class)
    public String getSupplierLeaderPhone() {
        return supplierLeaderPhone;
    }

+ 4 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/iot/device/IotDeviceQualityInspectionPlanDO.java

@ -1,8 +1,10 @@
package com.yihu.jw.entity.iot.device;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import com.yihu.jw.entity.util.StringFStringEncryptConverter;
import javax.persistence.Column;
import javax.persistence.Convert;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
@ -196,6 +198,7 @@ public class IotDeviceQualityInspectionPlanDO extends UuidIdentityEntityWithOper
        this.purchaseNum = purchaseNum;
    }
    @Convert(converter = StringFStringEncryptConverter.class)
    public String getQualityLeader() {
        return qualityLeader;
    }
@ -204,6 +207,7 @@ public class IotDeviceQualityInspectionPlanDO extends UuidIdentityEntityWithOper
        this.qualityLeader = qualityLeader;
    }
    @Convert(converter = StringFStringEncryptConverter.class)
    public String getQualityLeaderPhone() {
        return qualityLeaderPhone;
    }

+ 4 - 4
common/common-entity/src/main/java/com/yihu/jw/entity/iot/device/IotDeviceSimDO.java

@ -1,11 +1,9 @@
package com.yihu.jw.entity.iot.device;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import com.yihu.jw.entity.util.StringFStringEncryptConverter;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.*;
import java.io.Serializable;
/**
@ -100,6 +98,7 @@ public class IotDeviceSimDO extends UuidIdentityEntityWithOperator implements Se
        this.status = status;
    }
    @Convert(converter = StringFStringEncryptConverter.class)
    public String getContactsName() {
        return contactsName;
    }
@ -108,6 +107,7 @@ public class IotDeviceSimDO extends UuidIdentityEntityWithOperator implements Se
        this.contactsName = contactsName;
    }
    @Convert(converter = StringFStringEncryptConverter.class)
    public String getContactsMobile() {
        return contactsMobile;
    }

+ 4 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/iot/device/IotDeviceTransfersDO.java

@ -1,8 +1,10 @@
package com.yihu.jw.entity.iot.device;
import com.yihu.jw.entity.UuidIdentityEntity;
import com.yihu.jw.entity.util.StringFStringEncryptConverter;
import javax.persistence.Column;
import javax.persistence.Convert;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
@ -107,6 +109,7 @@ public class IotDeviceTransfersDO extends UuidIdentityEntity implements Serializ
        this.num = num;
    }
    @Convert(converter = StringFStringEncryptConverter.class)
    public String getContactsName() {
        return contactsName;
    }
@ -115,6 +118,7 @@ public class IotDeviceTransfersDO extends UuidIdentityEntity implements Serializ
        this.contactsName = contactsName;
    }
    @Convert(converter = StringFStringEncryptConverter.class)
    public String getContactsMobile() {
        return contactsMobile;
    }

+ 3 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/iot/device/IotOrderPurchaseDO.java

@ -1,8 +1,10 @@
package com.yihu.jw.entity.iot.device;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import com.yihu.jw.entity.util.StringFStringEncryptConverter;
import javax.persistence.Column;
import javax.persistence.Convert;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
@ -182,6 +184,7 @@ public class IotOrderPurchaseDO extends UuidIdentityEntityWithOperator implement
        this.qualityStatus = qualityStatus;
    }
    @Convert(converter = StringFStringEncryptConverter.class)
    public String getQualityLeader() {
        return qualityLeader;
    }

+ 5 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/iot/device/IotPatientDeviceDO.java

@ -1,8 +1,10 @@
package com.yihu.jw.entity.iot.device;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import com.yihu.jw.entity.util.StringFStringEncryptConverter;
import javax.persistence.Column;
import javax.persistence.Convert;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
@ -77,6 +79,7 @@ public class IotPatientDeviceDO extends UuidIdentityEntityWithOperator implement
        this.patient = patient;
    }
    @Convert(converter = StringFStringEncryptConverter.class)
    public String getPatientName() {
        return patientName;
    }
@ -85,6 +88,7 @@ public class IotPatientDeviceDO extends UuidIdentityEntityWithOperator implement
        this.patientName = patientName;
    }
    @Convert(converter = StringFStringEncryptConverter.class)
    public String getIdcard() {
        return idcard;
    }
@ -165,6 +169,7 @@ public class IotPatientDeviceDO extends UuidIdentityEntityWithOperator implement
        this.sim = sim;
    }
    @Convert(converter = StringFStringEncryptConverter.class)
    public String getMobile() {
        return mobile;
    }

+ 4 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/iot/device/IotQualityRecordDO.java

@ -1,8 +1,10 @@
package com.yihu.jw.entity.iot.device;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import com.yihu.jw.entity.util.StringFStringEncryptConverter;
import javax.persistence.Column;
import javax.persistence.Convert;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
@ -77,6 +79,7 @@ public class IotQualityRecordDO extends UuidIdentityEntityWithOperator implement
        this.purchaseNum = purchaseNum;
    }
    @Convert(converter = StringFStringEncryptConverter.class)
    public String getQualityLeader() {
        return qualityLeader;
    }
@ -85,6 +88,7 @@ public class IotQualityRecordDO extends UuidIdentityEntityWithOperator implement
        this.qualityLeader = qualityLeader;
    }
    @Convert(converter = StringFStringEncryptConverter.class)
    public String getQualityLeaderPhone() {
        return qualityLeaderPhone;
    }

+ 3 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/iot/dict/IotHospitalDO.java

@ -1,8 +1,10 @@
package com.yihu.jw.entity.iot.dict;
import com.yihu.jw.entity.UuidIdentityEntity;
import com.yihu.jw.entity.util.StringFStringEncryptConverter;
import javax.persistence.Column;
import javax.persistence.Convert;
import javax.persistence.Entity;
import javax.persistence.Table;
@ -157,6 +159,7 @@ public class IotHospitalDO extends UuidIdentityEntity {
        this.photo = photo;
    }
    @Convert(converter = StringFStringEncryptConverter.class)
    public String getPhone() {
        return phone;
    }

+ 5 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/iot/equipment/IotEquipmentDetailDO.java

@ -1,8 +1,10 @@
package com.yihu.jw.entity.iot.equipment;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import com.yihu.jw.entity.util.StringFStringEncryptConverter;
import javax.persistence.Column;
import javax.persistence.Convert;
import javax.persistence.Entity;
import javax.persistence.Table;
@ -156,6 +158,7 @@ public class IotEquipmentDetailDO extends UuidIdentityEntityWithOperator {
        this.address = address;
    }
    @Convert(converter = StringFStringEncryptConverter.class)
    public String getRepresentative() {
        return representative;
    }
@ -164,6 +167,7 @@ public class IotEquipmentDetailDO extends UuidIdentityEntityWithOperator {
        this.representative = representative;
    }
    @Convert(converter = StringFStringEncryptConverter.class)
    public String getApplicantName() {
        return applicantName;
    }
@ -172,6 +176,7 @@ public class IotEquipmentDetailDO extends UuidIdentityEntityWithOperator {
        this.applicantName = applicantName;
    }
    @Convert(converter = StringFStringEncryptConverter.class)
    public String getApplicantTel() {
        return applicantTel;
    }

+ 5 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/iot/gateway/GcClientDetails.java

@ -2,7 +2,10 @@ package com.yihu.jw.entity.iot.gateway;
import com.yihu.jw.entity.util.StringFStringEncryptConverter;
import javax.persistence.Column;
import javax.persistence.Convert;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.sql.Timestamp;
@ -104,6 +107,7 @@ public class GcClientDetails extends IdEntity implements java.io.Serializable {
    }
    @Column(name = "create_user_name", length = 20)
    @Convert(converter = StringFStringEncryptConverter.class)
    public String getCreateUserName() {
        return this.createUserName;
    }
@ -131,6 +135,7 @@ public class GcClientDetails extends IdEntity implements java.io.Serializable {
    }
    @Column(name = "update_user_name", length = 100)
    @Convert(converter = StringFStringEncryptConverter.class)
    public String getUpdateUserName() {
        return this.updateUserName;
    }

+ 3 - 4
common/common-entity/src/main/java/com/yihu/jw/entity/iot/platform/IotInterfaceLogDO.java

@ -1,12 +1,10 @@
package com.yihu.jw.entity.iot.platform;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import com.yihu.jw.entity.util.StringFStringEncryptConverter;
import org.hibernate.boot.model.relational.Namespace;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
@ -115,6 +113,7 @@ public class IotInterfaceLogDO extends UuidIdentityEntityWithOperator implements
        this.userId = userId;
    }
    @Convert(converter = StringFStringEncryptConverter.class)
    public String getUserName() {
        return userName;
    }

+ 3 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/iot/product/IotProductExtendInfoDO.java

@ -1,8 +1,10 @@
package com.yihu.jw.entity.iot.product;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import com.yihu.jw.entity.util.StringFStringEncryptConverter;
import javax.persistence.Column;
import javax.persistence.Convert;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
@ -141,6 +143,7 @@ public class IotProductExtendInfoDO extends UuidIdentityEntityWithOperator imple
        this.ratifyDate = ratifyDate;
    }
    @Convert(converter = StringFStringEncryptConverter.class)
    public String getAgencyName() {
        return agencyName;
    }

+ 81 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/util/AesEncryptUtils.java

@ -0,0 +1,81 @@
package com.yihu.jw.entity.util;
import org.apache.commons.codec.binary.Base64;
import org.springframework.util.StringUtils;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.spec.SecretKeySpec;
/**
 * 前后端数据传输加密工具类
 * @author monkey
 *
 */
public class AesEncryptUtils {
    //可配置到Constant中,并读取配置文件注入,16位,自己定义
    private static final String KEY = "jkzl2021ZJXL*#%a";
    //参数分别代表 算法名称/加密模式/数据填充方式
    private static final String ALGORITHMSTR = "AES/ECB/PKCS5Padding";
    /**
     * 加密
     * @param content 加密的字符串
     * @param encryptKey key值
     * @return
     * @throws Exception
     */
    public static String encrypt(String content, String encryptKey){
        try {
            KeyGenerator kgen = KeyGenerator.getInstance("AES");
            kgen.init(128);
            Cipher cipher = Cipher.getInstance(ALGORITHMSTR);
            cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(encryptKey.getBytes(), "AES"));
            byte[] b = cipher.doFinal(content.getBytes("utf-8"));
            // 采用base64算法进行转码,避免出现中文乱码
            return Base64.encodeBase64String(b);
        }catch (Exception e){
            e.printStackTrace();
            return content;
        }
    }
    /**
     * 解密
     * @param encryptStr 解密的字符串
     * @param decryptKey 解密的key值
     * @return
     * @throws Exception
     */
    public static String decrypt(String encryptStr, String decryptKey) {
        try {
            KeyGenerator kgen = KeyGenerator.getInstance("AES");
            kgen.init(128);
            Cipher cipher = Cipher.getInstance(ALGORITHMSTR);
            cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(decryptKey.getBytes(), "AES"));
            // 采用base64算法进行转码,避免出现中文乱码
            byte[] encryptBytes = Base64.decodeBase64(encryptStr);
            byte[] decryptBytes = cipher.doFinal(encryptBytes);
            return new String(decryptBytes);
        }catch (Exception e){
            e.printStackTrace();
            return encryptStr;
        }
    }
    public static String encrypt(String content){
        if(content == null){
            return content;
        }
        return encrypt(content, KEY);
    }
    public static String decrypt(String encryptStr){
        if(StringUtils.isEmpty(encryptStr)){
            return encryptStr;
        }
        return decrypt(encryptStr, KEY);
    }
}

+ 18 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/util/StringFStringEncryptConverter.java

@ -0,0 +1,18 @@
package com.yihu.jw.entity.util;
import javax.persistence.AttributeConverter;
/**
 * Created by yeshijie on 2021/1/21.
 */
public class StringFStringEncryptConverter implements AttributeConverter<String, String> {
    @Override
    public String convertToDatabaseColumn(String attribute) {
        return AesEncryptUtils.encrypt(attribute);
    }
    @Override
    public String convertToEntityAttribute(String dbData) {
        return AesEncryptUtils.decrypt(dbData);
    }
}

+ 1 - 1
server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyLoginEndpoint.java

@ -1703,7 +1703,7 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
        }else {
            try {
                Map<String,Object> rs = registerService.registerPatient(mobile,pw);
                Map<String,Object> rs = registerService.registerPatient(mobile,pw,name,idcard);
                String code = rs.get("code").toString();
                if(!"1".equals(code)){
                    ObjEnvelop objEnvelop = new ObjEnvelop();

+ 10 - 1
server/svr-authentication/src/main/java/com/yihu/jw/security/service/RegisterService.java

@ -120,7 +120,7 @@ public class RegisterService {
        rs.put("mes","保存用户信息失败");
        return rs;
    }
    public Map<String,Object> registerPatient(String mobile,String pw)throws Exception{
    public Map<String,Object> registerPatient(String mobile,String pw,String name,String idcard)throws Exception{
        Map<String,Object> rs = new HashedMap();
        try{
@ -140,6 +140,12 @@ public class RegisterService {
            patient.setLocked(0);
            patient.setCreateTime(new Date());
            patient.setUpdateTime(new Date());
            if(StringUtils.isNoneBlank(name)){
                patient.setName(name);
            }
            if (StringUtils.isNoneBlank(idcard)){
                patient.setIdcard(idcard);
            }
            BasePatientDO temp = basePatientDao.save(patient);
            PatientMedicareCardDO medicareCardDO = new PatientMedicareCardDO();
@ -155,6 +161,9 @@ public class RegisterService {
            wlyyPatientFamilyMemberDO.setFamilyMember(patient.getId());
            wlyyPatientFamilyMemberDO.setFamilyRelation("7");
            wlyyPatientFamilyMemberDO.setFamilyRelationName("本人");
            if (StringUtils.isNoneBlank(idcard)){
                wlyyPatientFamilyMemberDO.setCardNo(idcard);
            }
            familyMemberDao.save(wlyyPatientFamilyMemberDO);
            /*if (org.apache.commons.lang3.StringUtils.isNoneBlank(wxId)&&wxId.equalsIgnoreCase("xm_ykyy_wx")){
                ykyyService.registerYkt(temp.getId(),pw,captcha);

+ 2 - 2
server/svr-authentication/src/main/resources/application.yml

@ -295,8 +295,8 @@ spring:
  profiles: iotprod
  datasource:
    url: jdbc:mysql://59.61.92.90:20002/iot-base?useUnicode:true&amp;characterEncoding=utf-8&amp;autoReconnect=true&useSSL=false
    username: wlyy
    password: jkzlehr@123
    username: wlyy_new
    password: J4&y9sk#1G
  redis:
    host: 59.61.92.90 # Redis server host.
    port: 9054  # Redis server port.

+ 2 - 2
svr/svr-base/src/main/resources/application.yml

@ -415,8 +415,8 @@ spring:
  profiles: iotprod
  datasource:
    url: jdbc:mysql://10.90.32.3:20002/iot-base?useUnicode:true&amp;characterEncoding=utf-8&amp;autoReconnect=true
    username: wlyy
    password: jkzlehr@123
    username: wlyy_new
    password: J4&y9sk#1G
#    url: jdbc:mysql://172.19.103.77/base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true
#    username: root
#    password: 123456

+ 5 - 5
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/DoorOrderService.java

@ -1576,8 +1576,8 @@ public class DoorOrderService {
    public File writeWordFile(List<String> orderId,HttpServletResponse response,String doctorCode) throws Exception {
        String zipFileName = "service_summary";
        String exportConclusionList = doctorCode+"exportList";
        String path = System.getProperty("user.dir") +"/service_summary/" + exportConclusionList;
        String exportConclusionList = "exportList";
        String path = System.getProperty("user.dir") +"/service_summary/"+doctorCode+"/" + exportConclusionList;
        System.out.println("path    :"   +path);
@ -1586,13 +1586,13 @@ public class DoorOrderService {
        if (file.exists()) {
            if (file != null){
                deleteFolder(file);
                file.mkdir();
                file.mkdirs();
            }else {
                file.delete();
                file.mkdir();
                file.mkdirs();
            }
        }else {
            file.mkdir();
            file.mkdirs();
        }
        int j =1;
        for (int i = 0; i < orderId.size(); i++) {

+ 0 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/hospital/WlyyFamilyMemberController.java

@ -357,7 +357,6 @@ public class WlyyFamilyMemberController extends EnvelopRestEndpoint {
                if (null != jsonObject.get("id")) {
                    id = jsonObject.get("id").toString();
                }
                ;
                mixEnvelop = wlyyFamilyMemberService.addFamily(id, patientId, familyName, dictId, cardType, idCard, username, false,medicareType,medicare,clinicId);
            } else {
                mixEnvelop.setStatus(408);

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

@ -6,6 +6,7 @@ import com.yihu.jw.area.service.BaseCityService;
import com.yihu.jw.area.service.BaseCommitteeService;
import com.yihu.jw.area.service.BaseProvinceService;
import com.yihu.jw.area.service.BaseTownService;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.doctor.service.BaseDoctorInfoService;
import com.yihu.jw.doctor.service.excel.DoctorWorkTimeExcelReader;
import com.yihu.jw.doctor.service.excel.DoctorWorkTimeMainExcelDO;
@ -46,6 +47,8 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
@ -54,6 +57,7 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.OutputStream;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@ -65,7 +69,7 @@ import java.util.Map;
@RequestMapping(value = BaseHospitalRequestMapping.Prescription.PREFIX)
@Api(value = "在线复诊", description = "在线复诊接口", tags = {"在线复诊接口"})
public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    
    private static final Logger logger = LoggerFactory.getLogger(PrescriptionEndpoint.class);
    @Autowired
    private PrescriptionService prescriptionService;
    
@ -89,6 +93,8 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    
    @Autowired
    private OutpatientDao outpatientDao;
    @Autowired
    private BaseDoctorDao baseDoctorDao;
    
    @Autowired
    private BusinessOrderService businessOrderService;
@ -119,6 +125,8 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    private TnyyEntranceService tnyyEntranceService;
    @Autowired
    private TnPrescriptionService tnPrescriptionService;
    @Value("${qywx.id}")
    private String qywxId;
    @Value("${demo.flag}")
    private boolean demoFlag;
@ -128,6 +136,11 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    @Value("${pay.flag}")
    private boolean payFlag;
    @Value("${wlyy.url}")
    private String wlyyUrl;
    @Value("${qywx.url}")
    private String qywxUrl;
    
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findOutpatientList)
    @ApiOperation(value = " 查询某个时间段的患者门诊就诊记录")
@ -402,6 +415,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
            objEnvelop.setStatus(300);
            return objEnvelop;
        }else {
            BaseDoctorDO doctorDO = baseDoctorDao.findById(wlyyOutpatientDO.getDoctor());
            //发送系统消息
            SystemMessageDO systemMessageDO = prescriptionService.sendOutPatientMes(wlyyOutpatientDO,payFlag);
            //发送IM消息
@ -411,6 +425,18 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
            if(StringUtils.isBlank(wlyyOutpatientDO.getDoctor())){
                hospitalSystemMessageService.sendImPichCheckMessage(wlyyOutpatientDO);
            }
            if(!"zsyy".equals(qywxId) && !"xm_xzzx_wx".equals(qywxId)){
                //发送厦门i健康智能推送
                try{
                    if (doctorDO!=null&&"3".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())){
                        String wxurl = wlyyUrl+"/im/common/message/sendDoctorTemplateByDoctorIdcard?sessionId=1_1&sessionType=1&from=1&content=1&businessType=1&doctor_idcard="+doctorDO.getIdcard()+"&patientName="+URLEncoder.encode(wlyyOutpatientDO.getPatientName())+"&url=1";
                        logger.info("发送厦门i健康智能推送url:"+wxurl);
                        wlyyBusinessService.sendDoctorTemplateByDoctorIdcard(wxurl);
                    }
                }catch (Exception e){
                    logger.info("发送厦门i健康智能失败"+e.toString());
                }
            }
            return success(BaseHospitalRequestMapping.Prescription.api_success,wlyyOutpatientDO);
        }

+ 2 - 2
svr/svr-iot-job/src/main/resources/application.yml

@ -154,8 +154,8 @@ spring:
  profiles: iotprod
  datasource:
    url: jdbc:mysql://10.90.32.3:20002/xmiot?useUnicode:true&amp;characterEncoding=utf-8&amp;autoReconnect=true
    username: wlyy
    password: jkzlehr@123
    username: wlyy_new
    password: J4&y9sk#1G
wlyy:
  url: http://www.xmtyw.cn/wlyy/

+ 72 - 5
svr/svr-iot/pom.xml

@ -142,16 +142,83 @@
        <finalName>svr-iot</finalName>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin </artifactId>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <!-- 生成的jar中,不要包含pom.xml和pom.properties这两个文件 -->
                        <addMavenDescriptor>false</addMavenDescriptor>
                        <manifest>
                            <!-- 是否要把第三方jar加入到类构建路径 -->
                            <addClasspath>true</addClasspath>
                            <!-- 外部依赖jar包的最终位置 -->
                            <classpathPrefix>lib/</classpathPrefix>
                            <mainClass>com.yihu.SvrDoorServiceApplication</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <!--拷贝依赖到jar外面的lib目录-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-lib</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <!-- 依赖包输出目录,将来不打进jar包里 -->
                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
                            <excludeTransitive>false</excludeTransitive>
                            <stripVersion>false</stripVersion>
                            <includeScope>runtime</includeScope>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!--指定配置文件,将resources打成外部resource-->
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <archive>
                        <!-- 指定配置文件目录,这样jar运行时会去找到同目录下的resources文件夹下查找 -->
                        <manifestEntries>
                            <Class-Path>resources/</Class-Path>
                        </manifestEntries>
                    </archive>
                    <!-- 打包时忽略的文件(也就是不打进jar包里的文件) -->
                    <excludes>
                        <exclude>**/*.yml</exclude>
                        <exclude>**/*.xml</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <!-- 拷贝资源文件 外面的resource目录-->
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <!-- 资源文件输出目录 -->
                            <outputDirectory>${project.build.directory}/resources</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src/main/resources</directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

+ 1 - 1
svr/svr-iot/src/main/java/com/yihu/iot/service/company/IotCompanyService.java

@ -1178,7 +1178,7 @@ public class IotCompanyService extends BaseJpaService<IotCompanyDO,IotCompanyDao
        object.put("appcount",counts.size());
        object.put("sortList",counts1);
        object.put("medicalcount",0);//目前暂无医疗机构接入,默认0家。
        object.put("medicalcount",40);//目前暂无医疗机构接入,默认0家。
        return object;
    }

+ 2 - 2
svr/svr-iot/src/main/resources/application.yml

@ -232,8 +232,8 @@ spring:
  profiles: iotprod
  datasource:
    url: jdbc:mysql://10.90.32.3:20002/xmiot?useUnicode=true&amp;characterEncoding=utf-8&amp;autoReconnect=true
    username: wlyy
    password: jkzlehr@123
    username: wlyy_new
    password: J4&y9sk#1G
  elasticsearch:
    cluster-name: jkzl #默认即为elasticsearch  集群名
    cluster-nodes: 10.90.32.3:20011,10.90.32.3:20011 #配置es节点信息,逗号分隔,如果没有指定,则启动ClientNode

+ 2 - 2
svr/svr-wlyy-health-bank/src/main/resources/application.yml

@ -154,8 +154,8 @@ spring:
  datasource:
    url: jdbc:mysql://59.61.92.90:9069/wlyy_health_bank?useUnicode=true&amp;characterEncoding=utf-8&amp;autoReconnect=true
    username: wlyy
    password: jkzlehr@123
    username: wlyy_new
    password: J4&y9sk#1G
  redis:
    host: 59.61.92.90 # Redis server host.
    port: 9054  # Redis server port.

+ 2 - 2
svr/svr-wlyy-specialist/src/main/resources/application.yml

@ -216,8 +216,8 @@ spring:
  profiles: prod
  datasource:
    url: jdbc:mysql://59.61.92.90:9069/wlyy_specialist?useUnicode=true&amp;characterEncoding=utf-8&amp;autoReconnect=true
    username: wlyy
    password: jkzlehr@123
    username: wlyy_new
    password: J4&y9sk#1G
  redis:
    host: 59.61.92.90 # Redis server host.
    port: 9054 # Redis server port.