|
@@ -28,6 +28,7 @@ public class MarkMtFeesService {
|
|
|
}
|
|
|
|
|
|
public ResultVo<Map<String, Object>> queryMtPersonInfo(QueryMtInfoParam param) {
|
|
|
+ log.info("查询门特身份:{}", param);
|
|
|
String patientId = param.getPatientId();
|
|
|
if (null == patientId || patientId.trim().equals("")) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "请输入正确的门诊id号!");
|
|
@@ -170,4 +171,70 @@ public class MarkMtFeesService {
|
|
|
}
|
|
|
return ResultVoUtil.success(map.get("data"));
|
|
|
}
|
|
|
+
|
|
|
+ public Map<String, Object> uploadMtFees(UploadMtFeeParam param) {
|
|
|
+ log.info("上传门特费用:{}", param);
|
|
|
+ Map<String, Object> resultMap = new HashMap<>();
|
|
|
+ String responceType = dao.selectResponceType(param.getPatientId(), param.getTimes());
|
|
|
+ if (null == responceType) {
|
|
|
+ resultMap.put("code", -1);
|
|
|
+ resultMap.put("msg", "未查询到此人的门特身份记录。");
|
|
|
+ return resultMap;
|
|
|
+ }
|
|
|
+ String urlHead = YbActionLinks.normalLinks.get("mtBase");
|
|
|
+ String urlEnd;
|
|
|
+ if (responceType.equals("02")) {
|
|
|
+ urlEnd = ":2000/shengyb/mt/uploadFees";
|
|
|
+ } else {
|
|
|
+ urlEnd = ":1000/mzsyb/mzCalculate";
|
|
|
+ }
|
|
|
+ String url = urlHead + urlEnd;
|
|
|
+ RestTemplate restTemplate = new RestTemplate();
|
|
|
+ Object templateRet = restTemplate.postForObject(url, param, Object.class);
|
|
|
+ return FilterUtil.cast(templateRet);
|
|
|
+ }
|
|
|
+
|
|
|
+ public Map<String, Object> retractMtFees(UploadMtFeeParam param) {
|
|
|
+ log.info("撤销门特费用:{}", param);
|
|
|
+ Map<String, Object> resultMap = new HashMap<>();
|
|
|
+ String responceType = dao.selectResponceType(param.getPatientId(), param.getTimes());
|
|
|
+ if (null == responceType) {
|
|
|
+ resultMap.put("code", -1);
|
|
|
+ resultMap.put("msg", "未查询到此人的门特身份记录。");
|
|
|
+ return resultMap;
|
|
|
+ }
|
|
|
+ String urlHead = YbActionLinks.normalLinks.get("mtBase");
|
|
|
+ String urlEnd;
|
|
|
+ if (responceType.equals("02")) {
|
|
|
+ urlEnd = ":2000/shengyb/mt/retractFees";
|
|
|
+ } else {
|
|
|
+ urlEnd = ":1000/mzsyb/mzCancelCalculate";
|
|
|
+ }
|
|
|
+ String url = urlHead + urlEnd;
|
|
|
+ RestTemplate restTemplate = new RestTemplate();
|
|
|
+ Object templateRet = restTemplate.postForObject(url, param, Object.class);
|
|
|
+ return FilterUtil.cast(templateRet);
|
|
|
+ }
|
|
|
+
|
|
|
+ public Map<String, Object> calculateMtFees(UploadMtFeeParam param) {
|
|
|
+ log.info("结算门特费用:{}", param);
|
|
|
+ Map<String, Object> resultMap = new HashMap<>();
|
|
|
+ String responceType = dao.selectResponceType(param.getPatientId(), param.getTimes());
|
|
|
+ if (null == responceType) {
|
|
|
+ resultMap.put("code", -1);
|
|
|
+ resultMap.put("msg", "未查询到此人的门特身份记录。");
|
|
|
+ return resultMap;
|
|
|
+ }
|
|
|
+ String urlHead = YbActionLinks.normalLinks.get("mtBase");
|
|
|
+ String urlEnd;
|
|
|
+ if (responceType.equals("02")) {
|
|
|
+ urlEnd = ":2000/shengyb/mt/calculateCost";
|
|
|
+ } else {
|
|
|
+ urlEnd = ":1000/mzsyb/mzCalculate";
|
|
|
+ }
|
|
|
+ String url = urlHead + urlEnd;
|
|
|
+ RestTemplate restTemplate = new RestTemplate();
|
|
|
+ Object templateRet = restTemplate.postForObject(url, param, Object.class);
|
|
|
+ return FilterUtil.cast(templateRet);
|
|
|
+ }
|
|
|
}
|