|
@@ -5,11 +5,13 @@ import cn.hnthyy.thmz.Utils.HttpUtil;
|
|
|
import cn.hnthyy.thmz.entity.MzException;
|
|
|
import cn.hnthyy.thmz.entity.his.mz.Employee;
|
|
|
import cn.hnthyy.thmz.entity.his.mz.MzChargeDetail;
|
|
|
+import cn.hnthyy.thmz.entity.his.mz.MzDrugWin;
|
|
|
import cn.hnthyy.thmz.entity.his.yp.YpBaseYf;
|
|
|
import cn.hnthyy.thmz.entity.his.yp.YpMzFytj;
|
|
|
import cn.hnthyy.thmz.entity.thmz.RadSendRecord;
|
|
|
import cn.hnthyy.thmz.entity.thmz.User;
|
|
|
import cn.hnthyy.thmz.mapper.his.mz.EmployeeMapper;
|
|
|
+import cn.hnthyy.thmz.mapper.his.mz.MzDrugWinMapper;
|
|
|
import cn.hnthyy.thmz.mapper.his.mz.MzPharmacyMapper;
|
|
|
import cn.hnthyy.thmz.mapper.his.yp.YpBaseYfMapper;
|
|
|
import cn.hnthyy.thmz.mapper.his.yp.YpZdManufactoryMapper;
|
|
@@ -44,6 +46,9 @@ public class MzPharmacyServiceImpl implements MzPharmacyService {
|
|
|
@SuppressWarnings("all")
|
|
|
@Autowired
|
|
|
private YpBaseYfMapper ypBaseYfMapper;
|
|
|
+ @SuppressWarnings("all")
|
|
|
+ @Autowired
|
|
|
+ private MzDrugWinMapper mzDrugWinMapper;
|
|
|
//语音生成接口地址
|
|
|
@Value("${audioServiceUrl}")
|
|
|
private String audioServiceUrl;
|
|
@@ -243,6 +248,7 @@ public class MzPharmacyServiceImpl implements MzPharmacyService {
|
|
|
if (mzPharmacyMapper.updateFyclChargeDetailConfirmFlag(mzChargeDetail) < 1) {
|
|
|
throw new MzException("修改发药状态数据为空,发药处理失败");
|
|
|
}
|
|
|
+
|
|
|
resultMap.put("code", 0);
|
|
|
resultMap.put("message", "发药处理成功");
|
|
|
return resultMap;
|
|
@@ -370,6 +376,20 @@ public class MzPharmacyServiceImpl implements MzPharmacyService {
|
|
|
return mzPharmacyMapper.selectRefundMoneyCount(realNo, receiptNo, groupNo, orderNo);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ @Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.DEFAULT, timeout = 36000, rollbackFor = Exception.class)
|
|
|
+ public int updateMzDrugWinPatientNum(MzChargeDetail mzChargeDetail, int num) {
|
|
|
+ // 门诊发药窗口人数查询
|
|
|
+ MzDrugWin drugWin = mzDrugWinMapper.selectMzDrugWinByGroupNoAndWinNo(mzChargeDetail.getGroupNo(), mzChargeDetail.getWindowsNoYf());
|
|
|
+ if((null != drugWin && drugWin.getPatientNum() > 0) && num > 0){
|
|
|
+ // 门诊窗口人数减num
|
|
|
+ int patientNum = drugWin.getPatientNum();
|
|
|
+ drugWin.setPatientNum(patientNum-num);
|
|
|
+ mzDrugWinMapper.updateMzDrugWinPatientNum(drugWin);
|
|
|
+ }
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public List<ChargeDetailInfoVo> getFyclWfyPrescription(ChargeFeeParamsVo chargeFeeParamsVo) {
|
|
|
return mzPharmacyMapper.selectFyclWfyPrescription(chargeFeeParamsVo);
|