trick9191 пре 7 година
родитељ
комит
394bccb910

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

@ -307,8 +307,8 @@ public class PrescriptionInfoService extends BaseService {
        }
        if (prescription != null && prescription.getStatus() == PrescriptionLog.PrescriptionLogStatus.wait_pay.getValue()) {
            Long s = (prescription.getCreateTime().getTime() - new Date().getTime()) / 1000;
        if (prescription!=null&&reviewed != null && prescription.getStatus() == PrescriptionLog.PrescriptionLogStatus.wait_pay.getValue()&&reviewed.getReviewedTime()!=null) {
            Long s = (new Date().getTime()-reviewed.getReviewedTime().getTime()) / 1000;
            //rs.put("time",s);
            if (s > 172800) {
                prescription.setStatus(PrescriptionLog.PrescriptionLogStatus.pay_outtime.getValue());
@ -1162,4 +1162,10 @@ public class PrescriptionInfoService extends BaseService {
        List<Map<String, Object>> rs = jdbcTemplate.queryForList(sql.toString());
        return new JSONArray(rs);
    }
    public JSONArray getPhysicMinDose(String code) {
        StringBuffer sql = new StringBuffer("SELECT t.min_dose AS minDose,t.physicCode FROM zy_iv_physic_dict t WHERE t.physic_code = ?");
        List<Map<String, Object>> rs = jdbcTemplate.queryForList(sql.toString());
        return new JSONArray(rs);
    }
}

+ 10 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prescription/PrescriptionInfoController.java

@ -453,5 +453,14 @@ public class PrescriptionInfoController extends BaseController {
            return error(-1, "查询失败!");
        }
    }
    @RequestMapping(value = "/getPhysicMinDose", method = RequestMethod.GET)
    @ApiOperation(value = "获取药品最小用量")
    public String getPhysicMinDose(String code) {
        try {
            return write(200, "查询成功!", "data", prescriptionInfoService.getPhysicMinDose(code));
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败!");
        }
    }
}