|
@@ -224,6 +224,28 @@ public class SiZyService {
|
|
|
return zySrvc.uploadFeeDetail(siZyFeeUrl, o);
|
|
|
}
|
|
|
|
|
|
+ public ResultVo<String> multipleUpload(List<Overview> overviews) {
|
|
|
+ for (Overview o : overviews) {
|
|
|
+ if (o.getStatus() == 0) {
|
|
|
+ String message = String.format("【%s床,%s,%s】未进行医保登记,无法进行费用上传。",
|
|
|
+ o.getBedNo(), o.getInpatientNo(), o.getName());
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, message);
|
|
|
+ }
|
|
|
+ if (invalidMultipleUploadPatient(o.getMedType())) {
|
|
|
+ String message = String.format("【%s床,%s,%s】是工伤患者,不支持批量上传。",
|
|
|
+ o.getBedNo(), o.getInpatientNo(), o.getName());
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, message);
|
|
|
+ }
|
|
|
+ o.setStaffId(TokenUtil.getTokenUserId());
|
|
|
+ }
|
|
|
+ return zySrvc.uploadMultiplePatientFees(siZyFeeUrl, overviews);
|
|
|
+ }
|
|
|
+
|
|
|
+ private boolean invalidMultipleUploadPatient(String medtype) {
|
|
|
+ MedType medType = MedType.get(medtype);
|
|
|
+ return null == medType || medType == MedType.INJURY_HOSPITALIZATION || medType == MedType.SELF_PAY;
|
|
|
+ }
|
|
|
+
|
|
|
public ResultVo<String> hospitalizationPreSettlement(ZyPatientInfo p) {
|
|
|
PreSetlmt preSetlmt = dao.selectPreSetlmt(p.getInpatientNo(), p.getAdmissTimes(),
|
|
|
p.getLedgerSn(), DateUtil.getTodayEndTime());
|