Browse Source

修复开方成功,药品价格更新失败的BUG

DESKTOP-G6NQ3SI\dante 7 years ago
parent
commit
f2a0023dba

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionInfoDao.java

@ -18,7 +18,7 @@ public interface PrescriptionInfoDao extends PagingAndSortingRepository<Prescrip
    @Modifying
    @Query("update PrescriptionInfo p set p.cost=?2 where p.code=?1")
    void updateStatus(String code,Integer cost);
    @Query("update PrescriptionInfo p set p.cost=?2 where p.drugCode=?1 and p.prescriptionCode=?3 and p.del=1")
    void updateStatus(String code,Integer cost,String prescriptionCode);
}

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionService.java

@ -390,7 +390,7 @@ public class PrescriptionService extends BaseService {
                    for (String infoCode : zyInfoCodeAndCost.keySet()) {
                        Double _cost = Double.parseDouble(zyInfoCodeAndCost.get(infoCode));
                        Integer infocost = CommonUtil.doubleToInt(_cost);
                        prescriptionInfoDao.updateStatus(infoCode,infocost);
                        prescriptionInfoDao.updateStatus(infoCode,infocost,prescriptionCode);
                    }
                    //事务提交
                    transactionManager.commit(status);