Forráskód Böngészése

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

chenweida 7 éve
szülő
commit
60b26c96b3

+ 3 - 0
common/common-entity/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionLog.java

@ -16,6 +16,9 @@ import java.util.Date;
@Entity
@Table(name = "wlyy_prescription_log")
public class PrescriptionLog extends IdEntity {
    public enum PrescriptionLogType {
        zy("智业对接", 1),
        ylz("易联众对接", 2),

+ 6 - 6
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prescription/PrescriptionLogController.java

@ -67,8 +67,7 @@ public class PrescriptionLogController extends BaseController {
    @RequestMapping(value = "/orderFollow", method = RequestMethod.GET)
    @ApiOperation(value = "订单状态跟踪")
    public String orderFollow(
            @ApiParam(value = "处方code", name = "prescriptionCode") @RequestParam(required = true, name = "prescriptionCode") String prescriptionCode,
            @ApiParam(value = "1是倒叙 0是正序 默认是正序", name = "sort", required = false, defaultValue = "0") @RequestParam(required = false, defaultValue = "0", name = "sort") Integer sort) {
            @ApiParam(value = "处方code", name = "prescriptionCode") @RequestParam(required = true, name = "prescriptionCode") String prescriptionCode) {
        try {
            // (-3 支付过期 -2 患者自己取消 -1 审核不通过 , 0 待审核, 2调整中 10 审核通过/开方中  , 20开方完成/待支付, 21 支付失败 , 30 支付成功/待配药 ,
@ -95,20 +94,21 @@ public class PrescriptionLogController extends BaseController {
                prescriptionLogs.add(prescriptionLog);
            }
            //排序
            Collections.sort(prescriptionLogs, (o1, o2) -> {
            //排序
            expressageLogs.sort((o1, o2) -> {
                long map1value = o1.getCreateTime().getTime();
                long map2value = o2.getCreateTime().getTime();
                if (map1value - map2value > 0) {
                    return sort == 1 ? -1 : 1;
                    return 1;
                } else if (map1value - map2value < 0) {
                    return sort == 1 ? 1 : -1;
                    return -1;
                } else {
                    return 0;
                }
            });
            if (prescriptionLogs != null) {
                return write(200, "获取处方流程成功", "data", new JSONArray(copyBeans(prescriptionLogs, "statusName", "createTime")));
                return write(200, "获取处方流程成功", "data", new JSONArray(prescriptionLogs));
            } else {
                return error(-1, "获取失败");
            }

+ 10 - 7
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/prescription/PatientPrescriptionLogController.java

@ -42,8 +42,7 @@ public class PatientPrescriptionLogController extends BaseController {
    @RequestMapping(value = "/orderFollow", method = RequestMethod.GET)
    @ApiOperation(value = "订单状态跟踪")
    public String orderFollow(
            @ApiParam(value = "处方code", name = "prescriptionCode") @RequestParam(required = true, name = "prescriptionCode") String prescriptionCode,
            @ApiParam(value = "1是倒叙 0是正序 默认是正序", name = "sort", required = false, defaultValue = "0") @RequestParam(required = false, defaultValue = "0", name = "sort") Integer sort) {
            @ApiParam(value = "处方code", name = "prescriptionCode") @RequestParam(required = true, name = "prescriptionCode") String prescriptionCode) {
        try {
            // (-3 支付过期 -2 患者自己取消 -1 审核不通过 , 0 待审核, 2调整中 10 审核通过/开方中  , 20开方完成/待支付, 21 支付失败 , 30 支付成功/待配药 ,
            // 40配药成功/待配送  41配送失败 42分配健管师 45配送中   49配送到服务站  100配送到患者手中/已完成)
@ -68,24 +67,28 @@ public class PatientPrescriptionLogController extends BaseController {
                prescriptionLogs.add(prescriptionLog);
            }
            //排序
            Collections.sort(prescriptionLogs, (o1, o2) -> {
            expressageLogs.sort((o1, o2) -> {
                long map1value = o1.getCreateTime().getTime();
                long map2value = o2.getCreateTime().getTime();
                if (map1value - map2value > 0) {
                    return sort == 1 ? -1 : 1;
                    return 1;
                } else if (map1value - map2value < 0) {
                    return sort == 1 ? 1 : -1;
                    return -1;
                } else {
                    return 0;
                }
            });
            if (prescriptionLogs != null) {
                return write(200, "获取处方流程成功", "data", new JSONArray(copyBeans(prescriptionLogs, "statusName", "createTime")));
                return write(200, "获取处方流程成功", "data", new JSONArray(prescriptionLogs));
            } else {
                return error(-1, "获取失败");
            }
        } catch (Exception e) {
        } catch (
                Exception e
                )
        {
            return error(-1, "获取失败");
        }
    }