Explorar el Código

Merge branch 'dev' of chenweida/patient-co-management into dev

chenweida hace 7 años
padre
commit
8d322a9664

+ 68 - 20
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionLog.java

@ -15,26 +15,74 @@ import java.util.Date;
@Entity
@Table(name = "wlyy_prescription_log")
public class PrescriptionLog extends IdEntity {
    public final static class PrescriptionLogType {
        static public Integer zy = 1; //智业对接
        static public Integer ylz = 2;  //易联众对接
        static public Integer create = 3;   //创建处方
        static public Integer reviewed  = 4;    //审核
        static public Integer pay = 5;  //支付
        static public Integer expressage = 6;   //配送
        static public Integer finish = 7;   //已完成
    }
    public final static class PrescriptionLogStatus {
        static public Integer no_reviewed =-1; //审核不通过
        static public Integer revieweding = 0;  //审核中
        static public Integer reviewed_success = 10;   //审核通过/待支付
        static public Integer pay_success = 20;  //支付成功/配药中
        static public Integer pay_error  = 21;    //21支付失败
        static public Integer wait_expressage = 30;   //配药成功/等待领药
        static public Integer expressageing = 31;   //配送中
        static public Integer expressageing_error = 32;   //配送失败
        static public Integer finish = 100;   //结束
    public enum PrescriptionLogType {
        zy("智业对接", 1),
        ylz("易联众对接", 2),
        create("创建处方", 2),
        reviewed("审核", 2),
        pay("支付", 2),
        expressage("配送", 2),
        finish("已完成", 2);
        private String name;
        private int value;
        PrescriptionLogType(String name, int value) {
            this.name = name;
            this.value = value;
        }
        public String getName() {
            return name;
        }
        public void setName(String name) {
            this.name = name;
        }
        public int getValue() {
            return value;
        }
        public void setValue(int value) {
            this.value = value;
        }
    }
    public enum PrescriptionLogStatus {
        no_reviewed("审核不通过", -1),
        revieweding("审核中", 0),
        reviewed_success("审核通过/待支付", 10),
        pay_error("支付成功/配药中", 20),
        pay_success("支付失败", 21),
        wait_expressage("配药成功/等待领药", 30),
        expressageing("配送中", 31),
        expressageing_error("配送失败", 32),
        finish("结束", 100);
        private String name;
        private int value;
        PrescriptionLogStatus(String name, int value) {
            this.name = name;
            this.value = value;
        }
        public String getName() {
            return name;
        }
        public void setName(String name) {
            this.name = name;
        }
        public int getValue() {
            return value;
        }
        public void setValue(int value) {
            this.value = value;
        }
    }
    private String code;                    //业务流程

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

@ -54,11 +54,11 @@ public class PrescriptionExpressageService {
            prescriptionLog.setCode(UUID.randomUUID().toString());
            prescriptionLog.setPrescriptionCode(prescriptionDispensaryCode.getPrescriptionCode());
            prescriptionLog.setCreateTime(new Date());
            prescriptionLog.setType(PrescriptionLog.PrescriptionLogType.expressage);
            prescriptionLog.setType(PrescriptionLog.PrescriptionLogType.expressage.getValue());
            prescriptionLog.setFlag(1);
            prescriptionLog.setUserCode(userCode);
            prescriptionLog.setUserType(2);
            prescriptionLog.setStatus(PrescriptionLog.PrescriptionLogStatus.expressageing_error);
            prescriptionLog.setStatus(PrescriptionLog.PrescriptionLogStatus.expressageing_error.getValue());
            prescriptionLog.setRemark("配送失败,处方编码不存在");
            prescriptionLogDao.save(prescriptionLog);
            return -1;
@ -70,11 +70,11 @@ public class PrescriptionExpressageService {
            prescriptionLog.setCode(UUID.randomUUID().toString());
            prescriptionLog.setPrescriptionCode(prescriptionDispensaryCode.getPrescriptionCode());
            prescriptionLog.setCreateTime(new Date());
            prescriptionLog.setType(PrescriptionLog.PrescriptionLogType.expressage);
            prescriptionLog.setType(PrescriptionLog.PrescriptionLogType.expressage.getValue());
            prescriptionLog.setFlag(1);
            prescriptionLog.setUserCode(userCode);
            prescriptionLog.setUserType(2);
            prescriptionLog.setStatus(PrescriptionLog.PrescriptionLogStatus.expressageing_error);
            prescriptionLog.setStatus(PrescriptionLog.PrescriptionLogStatus.expressageing_error.getValue());
            prescriptionLog.setRemark("配送失败,处方编码不是取药码");
            prescriptionLogDao.save(prescriptionLog);
            return -1;
@ -87,12 +87,12 @@ public class PrescriptionExpressageService {
        PrescriptionLog prescriptionLog = new PrescriptionLog();
        prescriptionLog.setPrescriptionCode(prescriptionDispensaryCode.getPrescriptionCode());
        prescriptionLog.setCode(UUID.randomUUID().toString());
        prescriptionLog.setType(PrescriptionLog.PrescriptionLogType.finish);
        prescriptionLog.setType(PrescriptionLog.PrescriptionLogType.finish.getValue());
        prescriptionLog.setCreateTime(new Date());
        prescriptionLog.setFlag(1);
        prescriptionLog.setUserCode(userCode);
        prescriptionLog.setUserType(2);
        prescriptionLog.setStatus(PrescriptionLog.PrescriptionLogStatus.finish);
        prescriptionLog.setStatus(PrescriptionLog.PrescriptionLogStatus.finish.getValue());
        prescriptionLogDao.save(prescriptionLog);
        //修改取药码code为已经使用