|
@@ -37,6 +37,7 @@ import thyyxxk.webserver.utils.*;
|
|
|
import thyyxxk.webserver.websocket.WebSocketServer;
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
@@ -83,6 +84,20 @@ public class SetlListUpldService {
|
|
|
if (upldCollection.getCode() != 200) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_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, "患者联系人姓名不能为空。");
|
|
|
+ } 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 之间联系人不能写自己");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ 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, "结算清单中职工参保人的单位及地址不能为空。");
|
|
|
+ }
|
|
|
+ }
|
|
|
for (OprninfoUpld item : upldCollection.getData().getOprninfo()) {
|
|
|
if (StringUtil.isBlank(item.getOperDrCode())) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, String.format("医生:【%s】,没有医保编码请去职工字典数据维护中添加", item.getOperDrName()));
|
|
@@ -161,6 +176,8 @@ public class SetlListUpldService {
|
|
|
setlinfoUpld.setOprnOprtCodeCnt(String.valueOf(oprninfoUpld.size()));
|
|
|
|
|
|
EntityCopy.Copy(dao.setlinfo2(patNo), setlinfoUpld);
|
|
|
+
|
|
|
+
|
|
|
EntityCopy.Copy(dao.setlinfo3(patNo, times), setlinfoUpld);
|
|
|
EntityCopy.Copy(dao.setlinfo4(patNo, times), setlinfoUpld);
|
|
|
|