|
|
@@ -395,6 +395,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
Map<String, MzDrugWin> mzDrugWinMap = new HashMap<>();
|
|
|
Map<String, Integer> yffyNoMap = new HashMap<>();
|
|
|
Map<String, Integer> orderNoMap = new HashMap<>();
|
|
|
+ Map<String, Integer> itemNoMap = new HashMap<>();
|
|
|
for (MzChargeDetail m : mzChargeDetailList) {
|
|
|
m.setSerialNo(serialNo);
|
|
|
m.setRealNo(serialNo);
|
|
|
@@ -406,6 +407,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
}
|
|
|
setChargeDetail(mzDrugWinMap, yffyNoMap, orderNoMap, m);
|
|
|
mzChargeDetailMapper.updateMzChargeDetail(m);
|
|
|
+ itemNoMap.put(m.getChargeItemCode().trim(),m.getItemNo());
|
|
|
}
|
|
|
//收费时药品库存操作
|
|
|
if (refundTimes == null) {
|
|
|
@@ -422,7 +424,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
}
|
|
|
//退费时药品库存操作
|
|
|
if (refundTimes != null) {
|
|
|
- //退费
|
|
|
+ //退费 此时药房还没有发药 直接修改发药队列数据
|
|
|
List<MzYpFydl> mzYpFydls = mzYpFydlMapper.selectMzYpFydl(patientId, refundTimes);
|
|
|
if (mzYpFydls != null && mzYpFydls.size() > 0) {
|
|
|
mzYpFydlMapper.deleteMzYpFydl(patientId, refundTimes);
|
|
|
@@ -454,6 +456,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
ypMzFytj.setReceiptNo(ypMzFytj.getReceiptNo() + 1);
|
|
|
ypMzFytj.setSerialNo(serialNo);
|
|
|
ypMzFytj.setRealNo(serialNo);
|
|
|
+ ypMzFytj.setItemNo(itemNoMap.get(ypMzFytj.getChargeItemCode().trim()));
|
|
|
ypMzFytjMapper.insertYpMzFytj(ypMzFytj);
|
|
|
}
|
|
|
}
|
|
|
@@ -472,6 +475,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
ypMzFytj.setSerialNo(serialNo);
|
|
|
ypMzFytj.setConfirmFlag(ConfirmFlagEnum.CONFIRM.code);
|
|
|
ypMzFytj.setRealNo(serialNo);
|
|
|
+ ypMzFytj.setItemNo(itemNoMap.get(ypMzFytj.getChargeItemCode().trim()));
|
|
|
ypMzFytjMapper.insertYpMzFytj(ypMzFytj);
|
|
|
}
|
|
|
}
|
|
|
@@ -810,7 +814,9 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
for (MzChargeDetail md : newMzChargeDetailList) {
|
|
|
if (supplyList.contains(md.getChargeItemCode())) {
|
|
|
removeList.add(md);
|
|
|
+ continue;
|
|
|
}
|
|
|
+ md.setConfirmFlag(ConfirmFlagEnum.NOT_CONFIRM.code);
|
|
|
}
|
|
|
newMzChargeDetailList.removeAll(removeList);
|
|
|
newMzChargeDetailList.addAll(supplyFeeMzChargeDetails);
|