|
@@ -9,6 +9,7 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.collections4.ListUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
+import thyyxxk.webserver.config.exception.BizException;
|
|
|
import thyyxxk.webserver.config.exception.ExceptionEnum;
|
|
|
import thyyxxk.webserver.constants.GetDateFormat;
|
|
|
import thyyxxk.webserver.constants.sidicts.*;
|
|
@@ -82,28 +83,28 @@ public class SetlListUpldService {
|
|
|
public ResultVo<String> upldSetlList(String patNo, Integer times, Integer ledgerSn) throws Exception {
|
|
|
ResultVo<UpldCollection> upldCollection = getUploadInfo(patNo, times, ledgerSn);
|
|
|
if (upldCollection.getCode() != 200) {
|
|
|
- return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, upldCollection.getMessage());
|
|
|
+ throw new BizException(ExceptionEnum.INTERNAL_SERVER_ERROR, upldCollection.getMessage());
|
|
|
}
|
|
|
BigDecimal age = new BigDecimal(upldCollection.getData().getSetlinfo().getAge());
|
|
|
// 年龄在大于 60 和 小于 16 之间联系人不能写 自己
|
|
|
if (StringUtil.isBlank(upldCollection.getData().getSetlinfo().getConerName().trim())) {
|
|
|
- return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "患者联系人姓名不能为空。");
|
|
|
+ throw new BizException(ExceptionEnum.INTERNAL_SERVER_ERROR, "患者联系人姓名不能为空。");
|
|
|
} else if (BigUtils.bigDaYu(age, 60) || BigUtils.bigXiaoYu(age, 16)) {
|
|
|
if (upldCollection.getData().getSetlinfo().getPsnName().trim().equals(upldCollection.getData().getSetlinfo().getConerName().trim())) {
|
|
|
- return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "年龄在大于 60 和 小于 16 之间联系人不能写自己");
|
|
|
+ throw new BizException(ExceptionEnum.INTERNAL_SERVER_ERROR, "年龄在大于 60 和 小于 16 之间联系人不能写自己");
|
|
|
}
|
|
|
}
|
|
|
if (StringUtil.notBlank(upldCollection.getData().getSetlinfo().getHiType()) && upldCollection.getData().getSetlinfo().getHiType().trim().equals("310")) {
|
|
|
if (StringUtil.isBlank(upldCollection.getData().getSetlinfo().getEmpAddr()) || StringUtil.isBlank(upldCollection.getData().getSetlinfo().getEmpName())) {
|
|
|
- return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "结算清单中职工参保人的单位及地址不能为空。");
|
|
|
+ throw new BizException(ExceptionEnum.INTERNAL_SERVER_ERROR, "结算清单中职工参保人的单位及地址不能为空。");
|
|
|
}
|
|
|
}
|
|
|
for (OprninfoUpld item : upldCollection.getData().getOprninfo()) {
|
|
|
if (StringUtil.isBlank(item.getOperDrCode())) {
|
|
|
- return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, String.format("医生:【%s】,没有医保编码请去职工字典数据维护中添加", null == item.getOperDrName() ? "没有填写医生" : item.getOperDrName()));
|
|
|
+ throw new BizException(ExceptionEnum.INTERNAL_SERVER_ERROR, String.format("医生:【%s】,没有医保编码请去职工字典数据维护中添加", null == item.getOperDrName() ? "没有填写医生" : item.getOperDrName()));
|
|
|
}
|
|
|
if (StringUtil.notBlank(item.getAnstDrName()) && StringUtil.isBlank(item.getAnstDrCode())) {
|
|
|
- return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, String.format("医生:【%s】,没有医保编码请去职工字典数据维护中添加", null == item.getAnstDrName() ? "没有填写医生" : item.getAnstDrName()));
|
|
|
+ throw new BizException(ExceptionEnum.INTERNAL_SERVER_ERROR, String.format("医生:【%s】,没有医保编码请去职工字典数据维护中添加", null == item.getAnstDrName() ? "没有填写医生" : item.getAnstDrName()));
|
|
|
}
|
|
|
}
|
|
|
JSONObject input = new JSONObject();
|