|
@@ -7,6 +7,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import thyyxxk.webserver.config.exception.ExceptionEnum;
|
|
import thyyxxk.webserver.config.exception.ExceptionEnum;
|
|
|
|
+import thyyxxk.webserver.constants.ResponceType;
|
|
import thyyxxk.webserver.dao.his.yibao.Routines;
|
|
import thyyxxk.webserver.dao.his.yibao.Routines;
|
|
import thyyxxk.webserver.entity.*;
|
|
import thyyxxk.webserver.entity.*;
|
|
import thyyxxk.webserver.entity.yibao.patient.Overview;
|
|
import thyyxxk.webserver.entity.yibao.patient.Overview;
|
|
@@ -22,9 +23,13 @@ import java.util.List;
|
|
import static thyyxxk.webserver.utils.YibaoHttpUtil.equalizeUpload;
|
|
import static thyyxxk.webserver.utils.YibaoHttpUtil.equalizeUpload;
|
|
import static thyyxxk.webserver.utils.YibaoHttpUtil.httpPost;
|
|
import static thyyxxk.webserver.utils.YibaoHttpUtil.httpPost;
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * @author dj
|
|
|
|
+ */
|
|
@RestController
|
|
@RestController
|
|
@RequestMapping("/yibao")
|
|
@RequestMapping("/yibao")
|
|
@Slf4j
|
|
@Slf4j
|
|
|
|
+@SuppressWarnings("unchecked")
|
|
public class YiBaoController {
|
|
public class YiBaoController {
|
|
private final SettleService settleService;
|
|
private final SettleService settleService;
|
|
private final Routines routines;
|
|
private final Routines routines;
|
|
@@ -45,7 +50,7 @@ public class YiBaoController {
|
|
|
|
|
|
@PostMapping("/register")
|
|
@PostMapping("/register")
|
|
public ResultVo<Object> inpatientRegister(@RequestBody Patient param) {
|
|
public ResultVo<Object> inpatientRegister(@RequestBody Patient param) {
|
|
- if (param.getResponceType().equals("04")) {
|
|
|
|
|
|
+ if (param.getResponceType().equals(ResponceType.NEW_RURAL_COOPERATIVE_MEDICAL_INSURANCE)) {
|
|
routines.updateYbRegisterDate(param.getInpatientNo(), param.getYbRegisterDate());
|
|
routines.updateYbRegisterDate(param.getInpatientNo(), param.getYbRegisterDate());
|
|
}
|
|
}
|
|
param.setStaffId(TokenUtil.getTokenUserId());
|
|
param.setStaffId(TokenUtil.getTokenUserId());
|
|
@@ -74,14 +79,16 @@ public class YiBaoController {
|
|
public ResultVo<Object> multipleUploadFee(@RequestBody List<Overview> patients) {
|
|
public ResultVo<Object> multipleUploadFee(@RequestBody List<Overview> patients) {
|
|
String responce = patients.get(0).getResponceType();
|
|
String responce = patients.get(0).getResponceType();
|
|
for (Overview item : patients) {
|
|
for (Overview item : patients) {
|
|
- item.setStaffId(TokenUtil.getTokenUserId());
|
|
|
|
Integer ledgerSn = routines.getLedgerSn(item.getInpatientNo(), item.getAdmissTimes());
|
|
Integer ledgerSn = routines.getLedgerSn(item.getInpatientNo(), item.getAdmissTimes());
|
|
routines.hisRecount(item.getInpatientNo(), item.getAdmissTimes(), ledgerSn);
|
|
routines.hisRecount(item.getInpatientNo(), item.getAdmissTimes(), ledgerSn);
|
|
|
|
+ item.setStaffId(TokenUtil.getTokenUserId());
|
|
|
|
+ item.setLedgerSn(ledgerSn);
|
|
|
|
+ settleService.posNegOffset(item);
|
|
}
|
|
}
|
|
- if (responce.equals("04")) {
|
|
|
|
|
|
+ if (responce.equals(ResponceType.NEW_RURAL_COOPERATIVE_MEDICAL_INSURANCE)) {
|
|
return httpPost("multipleUploadFee", patients, responce);
|
|
return httpPost("multipleUploadFee", patients, responce);
|
|
} else {
|
|
} else {
|
|
- if (responce.equals("03") || responce.equals("09")) {
|
|
|
|
|
|
+ if (ResponceType.isChangShaCityMedicalInsurance(responce)) {
|
|
return equalizeUpload("cssyb", "multiple", patients, null, responce);
|
|
return equalizeUpload("cssyb", "multiple", patients, null, responce);
|
|
} else {
|
|
} else {
|
|
return equalizeUpload("hnsyb", "multiple", patients, null, responce);
|
|
return equalizeUpload("hnsyb", "multiple", patients, null, responce);
|
|
@@ -92,16 +99,18 @@ public class YiBaoController {
|
|
@PostMapping("/singleUpload")
|
|
@PostMapping("/singleUpload")
|
|
public ResultVo<Object> uploadFeeDetail(@RequestBody Overview overview) {
|
|
public ResultVo<Object> uploadFeeDetail(@RequestBody Overview overview) {
|
|
String responce = overview.getResponceType();
|
|
String responce = overview.getResponceType();
|
|
- if (responce.equals("01")) {
|
|
|
|
|
|
+ if (responce.equals(ResponceType.NO_MEDICAL_INSURANCE)) {
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "自费患者无需上传费用!");
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "自费患者无需上传费用!");
|
|
}
|
|
}
|
|
- overview.setStaffId(TokenUtil.getTokenUserId());
|
|
|
|
Integer ledgerSn = routines.getLedgerSn(overview.getInpatientNo(), overview.getAdmissTimes());
|
|
Integer ledgerSn = routines.getLedgerSn(overview.getInpatientNo(), overview.getAdmissTimes());
|
|
routines.hisRecount(overview.getInpatientNo(), overview.getAdmissTimes(), ledgerSn);
|
|
routines.hisRecount(overview.getInpatientNo(), overview.getAdmissTimes(), ledgerSn);
|
|
- if (responce.equals("04")) {
|
|
|
|
|
|
+ overview.setStaffId(TokenUtil.getTokenUserId());
|
|
|
|
+ overview.setLedgerSn(ledgerSn);
|
|
|
|
+ settleService.posNegOffset(overview);
|
|
|
|
+ if (responce.equals(ResponceType.NEW_RURAL_COOPERATIVE_MEDICAL_INSURANCE)) {
|
|
return httpPost("uploadFee", overview, responce);
|
|
return httpPost("uploadFee", overview, responce);
|
|
} else {
|
|
} else {
|
|
- if (responce.equals("03") || responce.equals("09")) {
|
|
|
|
|
|
+ if (ResponceType.isChangShaCityMedicalInsurance(responce)) {
|
|
return equalizeUpload("cssyb", "single", null, overview, responce);
|
|
return equalizeUpload("cssyb", "single", null, overview, responce);
|
|
} else {
|
|
} else {
|
|
return equalizeUpload("hnsyb", "single", null, overview, responce);
|
|
return equalizeUpload("hnsyb", "single", null, overview, responce);
|