|
@@ -11,6 +11,7 @@ import thyyxxk.simzfeeoprnsystm.utils.StringUtil;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
import java.util.List;
|
|
|
+import java.util.Objects;
|
|
|
|
|
|
@Slf4j
|
|
|
@Service
|
|
@@ -24,22 +25,24 @@ public class MobilePayService {
|
|
|
this.mzService = mzService;
|
|
|
}
|
|
|
|
|
|
- public String writeMtReceipt(String hisOrdNum) {
|
|
|
- String[] arr = hisOrdNum.split("_");
|
|
|
- if (arr.length != 3) {
|
|
|
- return "hisOrdNum[" + hisOrdNum + "]不正确!";
|
|
|
- }
|
|
|
+ private String writeMtReceipt(String patNo, Integer times) {
|
|
|
MzPatientInfo mzptnt = new MzPatientInfo();
|
|
|
- mzptnt.setPatNo(arr[0]);
|
|
|
- mzptnt.setTimes(Integer.parseInt(arr[1]));
|
|
|
+ mzptnt.setPatNo(patNo);
|
|
|
+ mzptnt.setTimes(times);
|
|
|
return mzService.generateSiMzFees(mzptnt);
|
|
|
}
|
|
|
|
|
|
public Upload6201 getUpload6201(InsuinfoRequest request) throws Exception {
|
|
|
Upload6201 upload6201 = dao.selectUpload6201(request.getPatNo(), request.getTimes());
|
|
|
if (null == upload6201) {
|
|
|
- throw new Exception("mz_visit_table患者信息为空,请联系医生重开处方。");
|
|
|
+ // mz_visit_table为空
|
|
|
+ throw new Exception("患者就诊信息为空,请联系医生重开处方。");
|
|
|
+ }
|
|
|
+ String wrt = writeMtReceipt(request.getPatNo(), request.getTimes());
|
|
|
+ if (!Objects.equals(wrt, "SUCCESS")) {
|
|
|
+ return null;
|
|
|
}
|
|
|
+
|
|
|
upload6201.setMedType("11");
|
|
|
upload6201.setCaty(upload6201.getDeptId());
|
|
|
List<Diseinfo> diseinfoList = dao.selectMpDiseinfos(request.getPatNo(), request.getTimes());
|