Browse Source

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

# Conflicts:
#	business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/XzzxEntranceService.java
wangzhinan 5 years ago
parent
commit
6487b402b8

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

@ -1879,9 +1879,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                }
                //保存药品信息
                prescriptionInfoDao.save(infoDOs);
                logger.info("123");
                Double price = getInfoFee(infoDOs);
                logger.info("12312313213"+price);
                //计算药品费用
                prescription.setDrugFee(getInfoFee(infoDOs));
                prescription.setDrugFee(price);
            }
            //=====================药品操作=======================================================================
@ -1951,16 +1953,22 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        DecimalFormat df = new DecimalFormat("#.00");
        Double fee = 0D;
        if (infoDOs != null && infoDOs.size() > 0) {
            for (WlyyPrescriptionInfoDO info : infoDOs) {
                logger.error("getInfoFee===========Quantity:" +info.getQuantity());
                Integer quantity = Integer.parseInt(info.getQuantity());
                logger.error("getInfoFee===========quantity:" +quantity);
          /*      Integer quantity = Integer.parseInt(info.getQuantity());*/
                logger.error("getInfoFee===========PackRetprice:" +info.getPackRetprice());
                fee += info.getPackRetprice() * quantity;
             /*   fee += info.getPackRetprice() * quantity;*/
                logger.error("getInfoFee===========:" +fee);
                BigDecimal total = new BigDecimal(0);
                BigDecimal quantity = new BigDecimal(info.getQuantity());
                BigDecimal price = new BigDecimal(info.getPackRetprice());
                total = total.add(quantity.multiply(price));
                Double f1 = total.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
                fee+=f1;
            }
            logger.error("getInfoFee===========:" +fee);
        }
        fee = Double.parseDouble(df.format(fee));
        return fee;
    }
@ -1976,8 +1984,14 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        try {
            if (inspections != null && inspections.size() > 0) {
                for (WlyyInspectionDO ins : inspections) {
                    Double chargeAmount = Double.parseDouble(ins.getChargeAmount());
                    fee += chargeAmount * ins.getQuantity();
              /*      Double chargeAmount = Double.parseDouble(ins.getChargeAmount());
                    fee += chargeAmount * ins.getQuantity();*/
                    BigDecimal total = new BigDecimal(0);
                    BigDecimal quantity = new BigDecimal(ins.getChargeAmount());
                    BigDecimal price = new BigDecimal(ins.getQuantity());
                    total = total.add(quantity.multiply(price));
                    Double f1 = total.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
                    fee+=f1;
                }
            }
        } catch (Exception e) {