|
@@ -2,8 +2,10 @@ package thyyxxk.webserver.service.hospitalizationCosts;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import jdk.nashorn.internal.runtime.RewriteException;
|
|
|
import lombok.Data;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.poi.ss.formula.udf.IndexedUDFFinder;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import thyyxxk.webserver.config.exception.BizException;
|
|
@@ -162,11 +164,8 @@ public class HospitalizationCostsService {
|
|
|
"" : item.getOrderNo().stripTrailingZeros().toPlainString();
|
|
|
// 项目判断
|
|
|
if ("00".equals(item.getSerial())) {
|
|
|
- // 项目中如果录入人是自己的话就不需要判断这个费用的执行科室了。
|
|
|
- if (!item.getOpIdCode().equals(userInfo.getCode())) {
|
|
|
- if (publicServer.noNeedRule() && !deptList.contains(item.getExecUnit())) {
|
|
|
- sb.append("请对应的执行科室进行退费。");
|
|
|
- }
|
|
|
+ if (judgmentOfTheDepartment(userInfo.getCode(), item, deptList)) {
|
|
|
+ sb.append("请对应的执行科室或申请科室退费。");
|
|
|
}
|
|
|
// 只退费设置
|
|
|
refundOnly.add(setDefaultValuesAndAutoincrements(item, maxDetailSn, -1));
|
|
@@ -256,6 +255,25 @@ public class HospitalizationCostsService {
|
|
|
return ResultVoUtil.success();
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 科室退费限制
|
|
|
+ *
|
|
|
+ * @param userCode 当前人员
|
|
|
+ * @param item 数据
|
|
|
+ * @param deptList 科室
|
|
|
+ * @return 提示
|
|
|
+ */
|
|
|
+ private boolean judgmentOfTheDepartment(String userCode, ZyDetailChargeTable item, Set<String> deptList) {
|
|
|
+ if (publicServer.noNeedRule()) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (item.getOpIdCode().equals(userCode)) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return !deptList.contains(item.getExecUnit()) && !deptList.contains(item.getDeptCode());
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 退费前置校验
|
|
|
*
|