Просмотр исходного кода

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

trick9191 7 лет назад
Родитель
Сommit
3f052fe54c

+ 98 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/SignFamily.java

@ -67,6 +67,28 @@ public class SignFamily extends IdEntity {
    private Date expensesTime;//缴费时间
    //1.3.3.2新增字段
    //基卫服务类型
    private String serverType;
    //基卫服务类型名称
    private String serverTypeName;
    //基卫特殊人群类别
    private String specialPopulation;
    //基卫特殊人群类别名称
    private String specialPopulationName;
    //续签标志 1 医生续签 2 医生改签续签
    private String renewFlag;
    //转签原因
    private String renewChangeReason;
    //1.3.5新增居委会字段
    // 居委会字段id
    private String sickVillage;
    // 居委会字段名称
    private String sickVillageName;
    private Integer signPaySource;//签约支付渠道: 1线下 2线上
    //不对应字段
    private String adminTeamName;//行政团队名
    private String leaderCode;//行政团团队长code
@ -75,6 +97,9 @@ public class SignFamily extends IdEntity {
    private String patientAddress;//签约居民地址
    private String releaseSpeak;//解约说明
    public String getCode() {
        return code;
    }
@ -531,4 +556,77 @@ public class SignFamily extends IdEntity {
    public void setExpensesStatusName(String expensesStatusName) {
        this.expensesStatusName = expensesStatusName;
    }
    public String getServerType() {
        return serverType;
    }
    public void setServerType(String serverType) {
        this.serverType = serverType;
    }
    public String getServerTypeName() {
        return serverTypeName;
    }
    public void setServerTypeName(String serverTypeName) {
        this.serverTypeName = serverTypeName;
    }
    public String getSpecialPopulation() {
        return specialPopulation;
    }
    public void setSpecialPopulation(String specialPopulation) {
        this.specialPopulation = specialPopulation;
    }
    public String getSpecialPopulationName() {
        return specialPopulationName;
    }
    public void setSpecialPopulationName(String specialPopulationName) {
        this.specialPopulationName = specialPopulationName;
    }
    public String getRenewFlag() {
        return renewFlag;
    }
    public void setRenewFlag(String renewFlag) {
        this.renewFlag = renewFlag;
    }
    public String getRenewChangeReason() {
        return renewChangeReason;
    }
    public void setRenewChangeReason(String renewChangeReason) {
        this.renewChangeReason = renewChangeReason;
    }
    public String getSickVillage() {
        return sickVillage;
    }
    public void setSickVillage(String sickVillage) {
        this.sickVillage = sickVillage;
    }
    public String getSickVillageName() {
        return sickVillageName;
    }
    public void setSickVillageName(String sickVillageName) {
        this.sickVillageName = sickVillageName;
    }
    public Integer getSignPaySource() {
        return signPaySource;
    }
    public void setSignPaySource(Integer signPaySource) {
        this.signPaySource = signPaySource;
    }
}

+ 20 - 8
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionExpressageService.java

@ -28,6 +28,8 @@ public class PrescriptionExpressageService {
    @Autowired
    private PrescriptionDispensaryCodeDao prescriptionDispensaryCodeDao;
    @Autowired
    private PrescriptionReviewedDao prescriptionReviewedDao;
    @Autowired
    private PrescriptionLogDao prescriptionLogDao;
    @Autowired
    private PrescriptionDao prescriptionDao;
@ -119,7 +121,7 @@ public class PrescriptionExpressageService {
            case 3: {
                //判断是3 配送员(健管师)配送码
                // returnStatus = dispensaryCode_3(userCode, prescriptionDispensaryCode);
                returnStatus=0;
                returnStatus = 0;
                break;
            }
            default: {
@ -148,17 +150,20 @@ public class PrescriptionExpressageService {
     * @param prescriptionDispensaryCode
     * @return
     */
    private Integer dispensaryCode_1(String userCode, PrescriptionDispensaryCode prescriptionDispensaryCode) {
    private Integer dispensaryCode_1(String userCode, PrescriptionDispensaryCode prescriptionDispensaryCode) throws Exception {
        //修改处方状态为完成
        prescriptionDao.updateStatus(prescriptionDispensaryCode.getPrescriptionCode(), PrescriptionLog.PrescriptionLogStatus.finish.getValue());
        Prescription prescription = prescriptionDao.findByCode(prescriptionDispensaryCode.getPrescriptionCode());
        Date finshTime = new Date();
        prescription.setStatus(PrescriptionLog.PrescriptionLogStatus.finish.getValue());
        prescription.setFinishTime(finshTime);
        //保存配送成功的日志
        PrescriptionLog prescriptionLog = new PrescriptionLog();
        prescriptionLog.setPrescriptionCode(prescriptionDispensaryCode.getPrescriptionCode());
        prescriptionLog.setCode(UUID.randomUUID().toString());
        prescriptionLog.setType(PrescriptionLog.PrescriptionLogType.finish.getValue());
        prescriptionLog.setCreateTime(new Date());
        prescriptionLog.setCreateTime(finshTime);
        prescriptionLog.setFlag(1);
        prescriptionLog.setUserCode(userCode);
        prescriptionLog.setUserType(2);
@ -167,6 +172,13 @@ public class PrescriptionExpressageService {
        //修改取药码code为已经使用
        prescriptionDispensaryCode.setIsUse(1);
        //发送模板消息
        PrescriptionReviewed reviewed = prescriptionReviewedDao.findByPrescriptionCode(prescription.getCode());
        Patient patient = patientDao.findByCode(prescription.getPatient());
        String url = "prescription/html/order_tracking.html?openid=" + patient.getOpenid() + "" +
                "&code=" + prescriptionDispensaryCode.getPrescriptionCode() + "&toUser=" + patient.getCode() + "&toName=" + patient.getName();
        prescriptionNoticesService.sendMessages(prescription.getPatient(), reviewed.getDoctorName(), DateUtil.dateToStrLong(finshTime), 4, 0, url);
        return prescriptionDispensaryCode.getType();
    }
@ -218,7 +230,8 @@ public class PrescriptionExpressageService {
    /**
     * 配送员(健管师)配送码
     *  没用的代码
     * 没用的代码
     *
     * @param userCode
     * @param prescriptionDispensaryCode
     * @return
@ -363,7 +376,6 @@ public class PrescriptionExpressageService {
        prescriptionExpressageLogDao.save(prescriptionExpressageLog);
        //更新配送表,接收药品信息
        prescriptionExpressage.setAcceptCode(userCode);
        prescriptionExpressage.setAcceptName(userName);
@ -380,12 +392,12 @@ public class PrescriptionExpressageService {
        if (hospital.equals(prescriptionExpressage.getPatientHospitalCode())) {
            // 如果是最后服务站
            //设置配送码失效
            prescriptionDispensaryCodeDao.updateToUse(prescriptionCode,3);
            prescriptionDispensaryCodeDao.updateToUse(prescriptionCode, 3);
            //修改处方是配送完成
            Prescription prescription = prescriptionDao.findByCode(prescriptionCode);
            prescription.setStatus(PrescriptionLog.PrescriptionLogStatus.expressage2hospital.getValue());
            prescription.setExpressageTime(new Date());
        }else{
        } else {
            //如果不是重点服务站,更新配送表,更新配送信息是当前登陆人
            prescriptionExpressage.setExpressageCode(userCode);
            prescriptionExpressage.setExpressageName(userName);

+ 7 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/gateway/GcTokenService.java

@ -6,6 +6,7 @@ import com.yihu.wlyy.repository.gateway.GcTokenDao;
import com.yihu.wlyy.repository.gateway.GcTokenLogDao;
import com.yihu.wlyy.util.DateUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -21,6 +22,8 @@ public class GcTokenService {
    private GcTokenLogDao tokenLogDao;
    @Autowired
    private GcTokenDao tokenDao;
    @Value("${accesstoken.time}")
    private Integer tokenTime;
    /**
     * 根据appid生成token
@ -44,7 +47,10 @@ public class GcTokenService {
            gc.setAppid(appid);
            gc.setCreateTime(date);
            //2小时过期
            gc.setOutTime(DateUtil.getNextMin(date, 120));
            if(tokenTime==null){
                tokenTime=2;
            }
            gc.setOutTime(DateUtil.getNextMin(date, tokenTime*60));
            gc.setAccesstoken(token);
            gc.setDel(1);
            tokenDao.save(gc);

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/gateway/controller/GcTokenController.java

@ -61,7 +61,7 @@ public class GcTokenController {
            return resultOneModel;
        }
        //判断appSecret
        if (appSecret.equals(clientDetails.getAppSecret())) {
        if (!appSecret.equals(clientDetails.getAppSecret())) {
            ResultOneModel resultOneModel = new ResultOneModel(null);
            resultOneModel.setCode(BaseResultModel.codeEm.error_AppSecret.getCode());
            resultOneModel.setMessage(BaseResultModel.codeEm.error_AppSecret.getMessage());

+ 4 - 0
patient-co/patient-co-wlyy/src/main/resources/application.yml

@ -79,6 +79,10 @@ security:
    username: jkzl
    password: jkzlehr
accesstoken:
  time: 2 ##对外接的accesstoken什么周期 2小时
---
##测试的配置
spring: