|
@@ -104,22 +104,41 @@ public class SetlListUpldService {
|
|
|
if (upldCollection.getCode() != 200) {
|
|
|
throw new BizException(ExceptionEnum.INTERNAL_SERVER_ERROR, upldCollection.getMessage());
|
|
|
}
|
|
|
+ StringBuilder errorMessage = new StringBuilder();
|
|
|
+
|
|
|
if (!patNo.startsWith("JT") && patNo.indexOf("-") == 0) {
|
|
|
if (StringUtil.isBlank(upldCollection.getData().getSetlinfo().getConerName())) {
|
|
|
- throw new BizException(ExceptionEnum.INTERNAL_SERVER_ERROR, "患者联系人姓名不能为空。");
|
|
|
+ errorMessage.append("患者联系人姓名不能为空。");
|
|
|
}
|
|
|
-
|
|
|
+ }
|
|
|
+ SetlinfoUpld temp = upldCollection.getData().getSetlinfo();
|
|
|
+ if (StringUtil.isBlank(temp.getChfpdrCode())) {
|
|
|
+ errorMessage.append("主诊医师编码为空。");
|
|
|
+ }
|
|
|
+ if (StringUtil.isBlank(temp.getRespNursCode())) {
|
|
|
+ errorMessage.append("责任护士编码为空。");
|
|
|
}
|
|
|
if (ListUtil.notBlank(upldCollection.getData().getOprninfo())) {
|
|
|
for (OprninfoUpld item : upldCollection.getData().getOprninfo()) {
|
|
|
if (StringUtil.isBlank(item.getOperDrCode())) {
|
|
|
- throw new BizException(ExceptionEnum.INTERNAL_SERVER_ERROR, String.format("医生:【%s】,没有医保编码请去职工字典数据维护中添加", null == item.getOperDrName() ? "没有填写医生" : item.getOperDrName()));
|
|
|
+ errorMessage.append(String.format("医生:【%s】,没有医保编码请去职工字典数据维护中添加", null == item.getOperDrName() ? "没有填写医生" : item.getOperDrName()));
|
|
|
}
|
|
|
if (StringUtil.notBlank(item.getAnstDrName()) && StringUtil.isBlank(item.getAnstDrCode())) {
|
|
|
- throw new BizException(ExceptionEnum.INTERNAL_SERVER_ERROR, String.format("医生:【%s】,没有医保编码请去职工字典数据维护中添加", null == item.getAnstDrName() ? "没有填写医生" : item.getAnstDrName()));
|
|
|
+ errorMessage.append(String.format("医生:【%s】,没有医保编码请去职工字典数据维护中添加", null == item.getAnstDrName() ? "没有填写医生" : item.getAnstDrName()));
|
|
|
+ }
|
|
|
+ if (StringUtil.notBlank(item.getAnstDrName()) && (StringUtil.isBlank(item.getAnstBegntime()) || StringUtil.isBlank(item.getAnstEndtime()))) {
|
|
|
+ errorMessage.append(String.format("手术:【%s】,有麻醉医生,没有麻时间请填写", item.getOprnOprtName()));
|
|
|
+ }
|
|
|
+ if (StringUtil.notBlank(item.getOprnOprtEndtime())) {
|
|
|
+ errorMessage.append(String.format("手术:【%s】,手术结束时间为空。", item.getOprnOprtName()));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ String tempError = errorMessage.toString();
|
|
|
+ if (StringUtil.notBlank(tempError)) {
|
|
|
+ throw new BizException(ExceptionEnum.INTERNAL_SERVER_ERROR, tempError);
|
|
|
+ }
|
|
|
JSONObject input = new JSONObject();
|
|
|
input.put("setlinfo", JSONObject.parseObject(JSONObject.toJSONStringWithDateFormat(upldCollection.getData().getSetlinfo(), "yyyy-MM-dd HH:mm:ss")));
|
|
|
input.put("payinfo", JSONArray.parseArray(JSONArray.toJSONString(upldCollection.getData().getPayinfo())));
|