wangzhinan 3 lat temu
rodzic
commit
6dde0deb08

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

@ -3524,73 +3524,22 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        } else {
            sql = sql + "date_format(p.pay_time,'%Y-%m-%d %H:%i:%S' )  AS \"payTime\",";
        }
        sql = sql + "p.create_time\n" +
                "as time,\n" +
                "e. NAME\n" +
                "as NAME,\n" +
                "p.pay_time\n" +
                "as pay_time,\n" +
                "p.real_order\n" +
                "as realOrder,\n" +
                "o.patient_name\n" +
                "as patientName,\n" +
                "i.drug_name\n" +
                "as infoName,\n" +
                " CASE p.create_time\n" +
                "WHEN NULL THEN\n" +
                "\t'否'\n" +
                "ELSE\n" +
                "\t'是'\n" +
                "END \"create_time\",\n" +
                " CASE e.oneself_pickup_flg\n" +
                "WHEN 1 THEN\n" +
                "\t'自取'\n" +
                "WHEN 2 THEN\n" +
                "\t'快递配送'\n" +
                "ELSE\n" +
                "\t' '\n" +
                "END \"oneself_pickup_flg\",\n" +
                " CASE p. STATUS\n" +
                "WHEN - 4 THEN\n" +
                "\t'已作废'\n" +
                "WHEN - 3 THEN\n" +
                "\t'支付过期取消'\n" +
                "WHEN - 2 THEN\n" +
                "\t'患者自己取消'\n" +
                "WHEN - 1 THEN\n" +
                "\t'医生取消'\n" +
                "WHEN 0 THEN\n" +
                "\t'候诊中'\n" +
                "WHEN 10 THEN\n" +
                "\t'诊断中'\n" +
                "WHEN 11 THEN\n" +
                "\t'药师审核失败 / 调整中'\n" +
                "WHEN 12 THEN\n" +
                "\t'药师审核完成'\n" +
                "WHEN 13 THEN\n" +
                "\t'开方失败/调整中'\n" +
                "WHEN 20 THEN\n" +
                "\t'诊断完成/开方成功/待支付'\n" +
                "WHEN 30 THEN\n" +
                "\t'支付成功/等待配药'\n" +
                "WHEN 31 THEN\n" +
                "\t'配药成功/等待取药'\n" +
                "WHEN 32 THEN\n" +
                "\t'配送中'\n" +
                "WHEN 100 THEN\n" +
                "\t'已完成/未评价'\n" +
                "WHEN 101 THEN\n" +
                "\t'已完成/已经评价'\n" +
                "ELSE\n" +
                "\t' '\n" +
                "END STATUS\n" +
                "FROM\n" +
                "\twlyy_outpatient o\n" +
                "LEFT JOIN wlyy_prescription p ON p.outpatient_id = o.id\n" +
                "LEFT JOIN wlyy_prescription_expressage e ON e.outpatient_id = o.id\n" +
                "LEFT JOIN wlyy_prescription_info i ON i.prescription_id = p.id\n" +
                "WHERE\n" +
                "\t1 = 1";
        sql = sql + " e.name as \"name\", " +
                " e.oneself_pickup_flg AS \"oneselfPickupFlg\", " +
                " o.id AS \"outpatientId\", " +
                " o.icd10_name AS \"icd10Name\", " +
                " p.status as \"status\", " +
                " p.id AS \"prescriptionId\" ," +
                " e.id AS \"expressageId\" ,"+
                " p.real_order AS \"realOrder\" ,"+
                " p.origin_real_order AS \"originRealOrder\"," +
                " o.patient_name as \"patientName\" "+
                " FROM " +
                " wlyy_outpatient o " +
                " JOIN wlyy_prescription p ON p.outpatient_id = o.id " +
                " JOIN wlyy_prescription_expressage e ON e.outpatient_id = o.id " +
                " WHERE" +
                " 1=1";
        if (StringUtils.isNotBlank(status)) {
            sql += " AND p.status in(" + status + ") ";
        }
@ -3631,14 +3580,16 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        }
        sql +=" order by p.create_time desc ";
        /*       sql += " LIMIT " + (page - 1) * size + "," + size + "";*/
        List<Map<String, Object>> mapList = hibenateUtils.createSQLQuery(sql,page,size);
        for (Map<String, Object> map : mapList) {
        List<Map<String, Object>> list = hibenateUtils.createSQLQuery(sql, page, size);
        for (Map<String, Object> map : list) {
            if (map.get("prescriptionId") != null) {
                List<WlyyPrescriptionInfoDO> wlyyPrescriptionInfoDOS = prescriptionInfoDao.findByPrescriptionId(map.get("prescriptionId").toString(), 1);
                map.put("info", wlyyPrescriptionInfoDOS);
            }
        }
        return MixEnvelop.getSuccessListWithPage(BaseHospitalRequestMapping.Prescription.api_success, mapList,page,size,count);
        return MixEnvelop.getSuccessListWithPage(BaseHospitalRequestMapping.Prescription.api_success, list, page, size, count);
    }
    public Boolean setMailno(String mailno, String expressageId) {

+ 8 - 4
business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java

@ -2028,8 +2028,10 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
            if (map.get("orderCategory")!=null){
                String orderCategoryFlag = map.get("orderCategory").toString();
                if (!orderCategoryFlag.equalsIgnoreCase("5")){
                    Integer price = Integer.parseInt(map.get("payPrice").toString());
                    map.put("payPrice",price/100);
                    Double price = Double.parseDouble(map.get("payPrice").toString());
                    Double prie = price/100;
                    logger.info("price"+prie);
                    map.put("payPrice",prie);
                }
            }
        }
@ -2261,8 +2263,10 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
            if (map.get("orderCategory")!=null){
                String orderCategoryFlag = map.get("orderCategory").toString();
                if (!orderCategoryFlag.equalsIgnoreCase("5")){
                    Integer price = Integer.parseInt(map.get("payPrice").toString());
                    map.put("payPrice",price/100);
                    Double price = Double.parseDouble(map.get("payPrice").toString());
                    Double prie = price/100;
                    logger.info("price"+prie);
                    map.put("payPrice",prie);
                }
            }
        }