|
|
@@ -396,7 +396,7 @@ public class PayableInfoController {
|
|
|
|
|
|
PayableInfoEntity one = payableInfoService.getOne(wrapper);
|
|
|
if (one != null) {
|
|
|
- boolean alreadyPay = payOrderService.isAlreadyPay(one.getStudentNo(), one.getPaymentItem(), one.getYears(), one.getNotPaySize(),null,null);
|
|
|
+ boolean alreadyPay = payOrderService.isAlreadyPay(one.getStudentNo(), one.getPaymentItem(), one.getYears(), one.getNotPaySize(), null, null);
|
|
|
if (alreadyPay) {
|
|
|
DeletePayableInfoTO to = new DeletePayableInfoTO();
|
|
|
BeanUtils.copyProperties(one, to);
|
|
|
@@ -699,37 +699,46 @@ public class PayableInfoController {
|
|
|
// }
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
- * 查询学生的基本信息
|
|
|
+ * 查询用户的基本信息
|
|
|
*
|
|
|
+ * @param cardNumber
|
|
|
+ * @param name
|
|
|
* @return
|
|
|
*/
|
|
|
@GetMapping("/queryStudentInfo")
|
|
|
- public CommonResult<PayableInfoStudentResultVO> queryStudentInfo(String cardNumber) {
|
|
|
- PayableInfoStudentResultVO payableInfoStudentResultVO;
|
|
|
-
|
|
|
- try {
|
|
|
- String url = "https://chtech.ncjti.edu.cn/lamp/recordApi/consume/queryByIdCard";
|
|
|
- MultiValueMap<String, Object> map = new LinkedMultiValueMap<>();
|
|
|
- map.add("idCard", cardNumber);
|
|
|
-
|
|
|
- RestTemplate restTemplate = new RestTemplate();
|
|
|
- HttpHeaders headers = new HttpHeaders();
|
|
|
- headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
|
|
|
+ public CommonResult<PayableInfoStudentResultVO> queryStudentInfo(String cardNumber, String name) {
|
|
|
+ PayableInfoStudentResultVO payableInfoStudentResultVO = new PayableInfoStudentResultVO();
|
|
|
+ QueryWrapper<PayableInfoEntity> wrapper = new QueryWrapper<>();
|
|
|
+ QueryWrapper<PayableInfoWaterEntity> wrapper1 = new QueryWrapper<>();
|
|
|
+ wrapper.eq("student_no", cardNumber)
|
|
|
+ .eq("student_name", name);
|
|
|
+ wrapper1.eq("student_no", cardNumber)
|
|
|
+ .eq("student_name", name);
|
|
|
+ List<PayableInfoWaterEntity> waterList = payableInfoWaterService.list(wrapper1);
|
|
|
+ if (waterList.size() > 0) {
|
|
|
+ waterList.forEach(water -> {
|
|
|
+ payableInfoStudentResultVO.setMajor(water.getCollegeName() + water.getClassName());
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
- HttpEntity<MultiValueMap<String, Object>> request = new HttpEntity<>(map, headers);
|
|
|
- ResponseEntity<String> responseEntity = restTemplate.postForEntity(url, request, String.class);
|
|
|
- JSONObject jsonObj = JSON.parseObject(responseEntity.getBody());
|
|
|
- JSONObject jsonResult = JSONObject.parseObject(jsonObj.get("result").toString());
|
|
|
- payableInfoStudentResultVO = JSONObject.toJavaObject(jsonResult, PayableInfoStudentResultVO.class);
|
|
|
+ List<PayableInfoEntity> infoList = payableInfoService.list(wrapper);
|
|
|
+ if (infoList.size() > 0) {
|
|
|
+ infoList.forEach(info -> {
|
|
|
|
|
|
- } catch (Exception e) {
|
|
|
- return CommonResult.fail("0000", "信息获取失败!");
|
|
|
+ if (info.getCollegeName() != null || info.getClassName() != null) {
|
|
|
+ }
|
|
|
+ payableInfoStudentResultVO.setMajor(info.getCollegeName() + info.getClassName());
|
|
|
+ });
|
|
|
}
|
|
|
+ payableInfoStudentResultVO.setIdCard(cardNumber);
|
|
|
+ payableInfoStudentResultVO.setStudentName(name);
|
|
|
|
|
|
return CommonResult.ok().setResult(payableInfoStudentResultVO);
|
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 根据订单编号修改相应的缴费订单
|
|
|
@@ -743,18 +752,18 @@ public class PayableInfoController {
|
|
|
PayOrderEntity one = payOrderService.getOne(wrapper);
|
|
|
String parentOrderNo = "";
|
|
|
BigDecimal parentOrderLone = BigDecimal.ZERO.setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
|
- if (one.getParentOrder() == null) {
|
|
|
-// if (one.getNotPaySize() == 0) {
|
|
|
-// one.setStatus("2");
|
|
|
-// } else {
|
|
|
-// one.setStatus("3");
|
|
|
-// }
|
|
|
- } else {
|
|
|
- parentOrderNo = one.getParentOrder();
|
|
|
- PayOrderEntity byOrderNo = payOrderService.getByOrderNo(parentOrderNo);
|
|
|
-
|
|
|
- one.setStatus("2");
|
|
|
- }
|
|
|
+// if (one.getParentOrder() == null) {
|
|
|
+//// if (one.getNotPaySize() == 0) {
|
|
|
+//// one.setStatus("2");
|
|
|
+//// } else {
|
|
|
+//// one.setStatus("3");
|
|
|
+//// }
|
|
|
+// } else {
|
|
|
+// parentOrderNo = one.getParentOrder();
|
|
|
+// PayOrderEntity byOrderNo = payOrderService.getByOrderNo(parentOrderNo);
|
|
|
+//
|
|
|
+// one.setStatus("2");
|
|
|
+// }
|
|
|
|
|
|
|
|
|
//payOrderService.updateById(one);
|
|
|
@@ -812,7 +821,7 @@ public class PayableInfoController {
|
|
|
if (StringUtils.hasText(payOrderList.get(i).getPayDetail())) {
|
|
|
payDetail1 += payOrderList.get(i).getPayDetail() + "/";
|
|
|
}
|
|
|
- // PayInfoDetailVO payInfoDetailVO = (PayInfoDetailVO) queryPayInfoDetail(String.valueOf(pInfo.getId()), pInfo.getPaymentItem(), payDetail1).getData();
|
|
|
+ // PayInfoDetailVO payInfoDetailVO = (PayInfoDetailVO) queryPayInfoDetail(String.valueOf(pInfo.getId()), pInfo.getPaymentItem(), payDetail1).getData();
|
|
|
payOrderLoan = payOrderLoan.add(payOrderList.get(i).getPayOrderLoan()).setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
|
|
|
|
}
|
|
|
@@ -846,9 +855,9 @@ public class PayableInfoController {
|
|
|
}
|
|
|
notPayDetail1 = notPayDetail1.endsWith("/") == true ? notPayDetail1.substring(0, notPayDetail1.length() - 1) : notPayDetail1;
|
|
|
}
|
|
|
- System.out.println(payOrderList.size());
|
|
|
- System.out.println(payDetail1+"-------------------------payDetail1-------------------------");
|
|
|
- System.out.println(notPayDetail1+"-------------------notPayDetail1-----------------------");
|
|
|
+// System.out.println(payOrderList.size());
|
|
|
+// System.out.println(payDetail1 + "-------------------------payDetail1-------------------------");
|
|
|
+// System.out.println(notPayDetail1 + "-------------------notPayDetail1-----------------------");
|
|
|
|
|
|
pInfo.setNotPayDetail(notPayDetail1);
|
|
|
pInfo.setNotPaySize(notPaySize);
|
|
|
@@ -866,7 +875,7 @@ public class PayableInfoController {
|
|
|
}
|
|
|
pInfo.setPayOrderLoan(payOrderLoan);
|
|
|
one.setNotPayDetail(notPayDetail1);
|
|
|
- System.out.println(pInfo);
|
|
|
+// System.out.println(pInfo);
|
|
|
payOrderService.updateById(one);
|
|
|
payableInfoService.updateById(pInfo);
|
|
|
}
|