|
|
@@ -119,7 +119,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
return CommonResult.fail(st);
|
|
|
}
|
|
|
|
|
|
- if(!isr.equals("本科") || !isr.equals("专升本")){
|
|
|
+ if (!isr.equals("本科") || !isr.equals("专升本")) {
|
|
|
return CommonResult.fail("批次为本科或专升本");
|
|
|
}
|
|
|
int existCount = welcomeStudentService.existStudentInfo(isr.getAdmissNum(), isr.getCardId());
|
|
|
@@ -299,7 +299,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
if (student == null) {
|
|
|
return CommonResult.fail("学生数据已失效,编辑失败!");
|
|
|
}
|
|
|
- if(!usr.equals("本科") || !usr.equals("专升本")){
|
|
|
+ if (!usr.equals("本科") || !usr.equals("专升本")) {
|
|
|
return CommonResult.fail("批次为本科或专升本");
|
|
|
}
|
|
|
//region 学生信息
|
|
|
@@ -630,7 +630,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
return CommonResult.fail(st);
|
|
|
}
|
|
|
|
|
|
- if(!icr.equals("本科") || !icr.equals("专升本")){
|
|
|
+ if (!icr.equals("本科") || !icr.equals("专升本")) {
|
|
|
return CommonResult.fail("批次为本科或专升本");
|
|
|
}
|
|
|
WelcomeStudent ws = welcomeStudentService.getDataByIdcardOrNum(icr.getAdmissNum(), icr.getCardId());
|
|
|
@@ -712,38 +712,26 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
List<JsonPayVo> payInfos = WelcomePayController.queryStudentPayInfo(ws.getAdmissNum(), TimeExchange.getYear());
|
|
|
BigDecimal payAmount = new BigDecimal(BigInteger.ZERO);//实缴金额
|
|
|
BigDecimal yjPayAmount = new BigDecimal(BigInteger.ZERO);//应缴金额
|
|
|
+ BigDecimal dkAmount = new BigDecimal(BigInteger.ZERO);//贷款金额
|
|
|
for (JsonPayVo pi : payInfos) {
|
|
|
+ dkAmount = dkAmount.add(pi.getDKJE());
|
|
|
payAmount = payAmount.add(pi.getSJJE());
|
|
|
yjPayAmount = yjPayAmount.add(pi.getYJJE());
|
|
|
}
|
|
|
- ws.setPayAmount(payAmount);
|
|
|
+ BigDecimal studentPay = payAmount.add(dkAmount);
|
|
|
+ ws.setPayAmount(studentPay);
|
|
|
ws.setAmountPayable(yjPayAmount);
|
|
|
System.out.println("进支付比较1" + JSON.toJSON(payInfos));
|
|
|
if (payInfos != null && payInfos.size() > 0) {
|
|
|
System.out.println("进支付比较2");
|
|
|
- List<WelcomePaySetting> paySettings = welcomePaySettingService.queryPaySettings(ws.getSchool());
|
|
|
+ WelcomePaySetting paySettings = welcomePaySettingService.queryPaySettingById(ws.getCollegeId(), ws.getMajorId(), ws.getBatchValue());
|
|
|
System.out.println("进支付比较3" + JSON.toJSON(paySettings));
|
|
|
- if (paySettings != null && paySettings.size() > 0) {
|
|
|
+ if (paySettings != null) {
|
|
|
System.out.println("进支付比较4");
|
|
|
- for (WelcomePaySetting pay : paySettings) {
|
|
|
- System.out.println("进支付比较5");
|
|
|
- BigDecimal money = pay.getPayAmount();
|
|
|
- if (pay.getMethod().equals("全部")) {
|
|
|
- BigDecimal totalSj = new BigDecimal(BigInteger.ZERO);
|
|
|
- for (JsonPayVo jpv : payInfos) {
|
|
|
- totalSj = totalSj.add(jpv.getSJJE());
|
|
|
- }
|
|
|
-
|
|
|
- if (totalSj.compareTo(money) >= 0) {
|
|
|
- ws.setIsPay(1);
|
|
|
- }
|
|
|
- }
|
|
|
- Optional<JsonPayVo> ojpv = payInfos.stream().filter(e -> e.getSFXMMC().equals(pay.getMethod())).findFirst();
|
|
|
- if (ojpv != null && ojpv.isPresent()) {
|
|
|
- if (ojpv.get().getSJJE().compareTo(money) >= 0) {
|
|
|
- ws.setIsPay(1);
|
|
|
- }
|
|
|
- }
|
|
|
+ if (studentPay.compareTo(paySettings.getPayAmount()) >= 0) {
|
|
|
+ ws.setIsPay(1);
|
|
|
+ } else {
|
|
|
+ ws.setIsPay(0);
|
|
|
}
|
|
|
} else {
|
|
|
ws.setIsPay(0);
|
|
|
@@ -753,7 +741,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(ws.getIsPay() == null){
|
|
|
+ if (ws.getIsPay() == null) {
|
|
|
ws.setIsPay(0);
|
|
|
}
|
|
|
try {
|
|
|
@@ -1132,7 +1120,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
studentData.setGraduationSchool(graSchool);
|
|
|
|
|
|
String batchValue = dataFormatter.formatCellValue(row.getCell(11));//批次
|
|
|
- if(!batchValue.equals("本科") || !batchValue.equals("专升本")){
|
|
|
+ if (!batchValue.equals("本科") || !batchValue.equals("专升本")) {
|
|
|
return CommonResult.fail("批次为本科或专升本");
|
|
|
}
|
|
|
studentData.setBatchValue(batchValue);
|
|
|
@@ -1413,7 +1401,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
studentData.setGraduationSchool(graSchool);
|
|
|
|
|
|
String batchValue = dataFormatter.formatCellValue(row.getCell(11));//批次
|
|
|
- if(!batchValue.equals("本科") || !batchValue.equals("专升本")){
|
|
|
+ if (!batchValue.equals("本科") || !batchValue.equals("专升本")) {
|
|
|
return CommonResult.fail("批次为本科或专升本");
|
|
|
}
|
|
|
studentData.setBatchValue(batchValue);
|
|
|
@@ -1752,33 +1740,27 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
List<JsonPayVo> payInfos = WelcomePayController.queryStudentPayInfo(student.getAdmissNum(), TimeExchange.getYear());
|
|
|
BigDecimal payAmount = new BigDecimal(BigInteger.ZERO);//实缴金额
|
|
|
BigDecimal yjPayAmount = new BigDecimal(BigInteger.ZERO);//应缴金额
|
|
|
+ BigDecimal dkAmount = new BigDecimal(BigInteger.ZERO);//贷款金额
|
|
|
for (JsonPayVo pi : payInfos) {
|
|
|
+ dkAmount = dkAmount.add(pi.getDKJE());
|
|
|
payAmount = payAmount.add(pi.getSJJE());
|
|
|
yjPayAmount = yjPayAmount.add(pi.getYJJE());
|
|
|
}
|
|
|
- student.setPayAmount(payAmount);
|
|
|
+ BigDecimal studentPay = payAmount.add(dkAmount);
|
|
|
+ student.setPayAmount(studentPay);
|
|
|
student.setAmountPayable(yjPayAmount);
|
|
|
+ System.out.println("进支付比较1" + JSON.toJSON(payInfos));
|
|
|
if (payInfos != null && payInfos.size() > 0) {
|
|
|
- List<WelcomePaySetting> paySettings = welcomePaySettingService.queryPaySettings(student.getSchool());
|
|
|
- if (paySettings != null && paySettings.size() > 0) {
|
|
|
- for (WelcomePaySetting pay : paySettings) {
|
|
|
- BigDecimal money = pay.getPayAmount();
|
|
|
- if (pay.getMethod().equals("全部")) {
|
|
|
- BigDecimal totalSj = new BigDecimal(BigInteger.ZERO);
|
|
|
- for (JsonPayVo jpv : payInfos) {
|
|
|
- totalSj = totalSj.add(jpv.getSJJE());
|
|
|
- }
|
|
|
+ System.out.println("进支付比较2");
|
|
|
+ WelcomePaySetting paySettings = welcomePaySettingService.queryPaySettingById(student.getCollegeId(), student.getMajorId(), student.getBatchValue());
|
|
|
+ System.out.println("进支付比较3" + JSON.toJSON(paySettings));
|
|
|
+ if (paySettings != null) {
|
|
|
+ System.out.println("进支付比较4");
|
|
|
|
|
|
- if (totalSj.compareTo(money) >= 0) {
|
|
|
- student.setIsPay(1);
|
|
|
- }
|
|
|
- }
|
|
|
- Optional<JsonPayVo> ojpv = payInfos.stream().filter(e -> e.getSFXMMC().equals(pay.getMethod())).findFirst();
|
|
|
- if (ojpv != null && ojpv.isPresent()) {
|
|
|
- if (ojpv.get().getSJJE().compareTo(money) >= 0) {
|
|
|
- student.setIsPay(1);
|
|
|
- }
|
|
|
- }
|
|
|
+ if (studentPay.compareTo(paySettings.getPayAmount()) >= 0) {
|
|
|
+ student.setIsPay(1);
|
|
|
+ } else {
|
|
|
+ student.setIsPay(0);
|
|
|
}
|
|
|
} else {
|
|
|
student.setIsPay(0);
|
|
|
@@ -1796,7 +1778,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(student.getIsPay() == null){
|
|
|
+ if (student.getIsPay() == null) {
|
|
|
student.setIsPay(0);
|
|
|
}
|
|
|
long expired = 1000 * 60 * 60 * 24 * 365;
|
|
|
@@ -1865,7 +1847,9 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
List<JsonPayVo> payInfos = WelcomePayController.queryStudentPayInfo(ws.getAdmissNum(), TimeExchange.getYear());
|
|
|
BigDecimal payAmount = new BigDecimal(BigInteger.ZERO);//实缴金额
|
|
|
BigDecimal yjPayAmount = new BigDecimal(BigInteger.ZERO);//应缴金额
|
|
|
+ BigDecimal dkAmount = new BigDecimal(BigInteger.ZERO);//贷款金额
|
|
|
for (JsonPayVo pi : payInfos) {
|
|
|
+ dkAmount = dkAmount.add(pi.getDKJE());
|
|
|
payAmount = payAmount.add(pi.getSJJE());
|
|
|
yjPayAmount = yjPayAmount.add(pi.getYJJE());
|
|
|
PayDetailVO pdv = new PayDetailVO();
|
|
|
@@ -1874,34 +1858,20 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
pdv.setSJJE(pi.getSJJE());
|
|
|
pdvs.add(pdv);
|
|
|
}
|
|
|
- ws.setPayAmount(payAmount);
|
|
|
+ BigDecimal studentPay = payAmount.add(dkAmount);
|
|
|
+ ws.setPayAmount(studentPay);
|
|
|
ws.setAmountPayable(yjPayAmount);
|
|
|
System.out.println("进支付比较1" + JSON.toJSON(payInfos));
|
|
|
if (payInfos != null && payInfos.size() > 0) {
|
|
|
System.out.println("进支付比较2");
|
|
|
- List<WelcomePaySetting> paySettings = welcomePaySettingService.queryPaySettings(ws.getSchool());
|
|
|
+ WelcomePaySetting paySettings = welcomePaySettingService.queryPaySettingById(ws.getCollegeId(), ws.getMajorId(), ws.getBatchValue());
|
|
|
System.out.println("进支付比较3" + JSON.toJSON(paySettings));
|
|
|
- if (paySettings != null && paySettings.size() > 0) {
|
|
|
+ if (paySettings != null) {
|
|
|
System.out.println("进支付比较4");
|
|
|
- for (WelcomePaySetting pay : paySettings) {
|
|
|
- System.out.println("进支付比较5");
|
|
|
- BigDecimal money = pay.getPayAmount();
|
|
|
- if (pay.getMethod().equals("全部")) {
|
|
|
- BigDecimal totalSj = new BigDecimal(BigInteger.ZERO);
|
|
|
- for (JsonPayVo jpv : payInfos) {
|
|
|
- totalSj = totalSj.add(jpv.getSJJE());
|
|
|
- }
|
|
|
-
|
|
|
- if (totalSj.compareTo(money) >= 0) {
|
|
|
- ws.setIsPay(1);
|
|
|
- }
|
|
|
- }
|
|
|
- Optional<JsonPayVo> ojpv = payInfos.stream().filter(e -> e.getSFXMMC().equals(pay.getMethod())).findFirst();
|
|
|
- if (ojpv != null && ojpv.isPresent()) {
|
|
|
- if (ojpv.get().getSJJE().compareTo(money) >= 0) {
|
|
|
- ws.setIsPay(1);
|
|
|
- }
|
|
|
- }
|
|
|
+ if (studentPay.compareTo(paySettings.getPayAmount()) >= 0) {
|
|
|
+ ws.setIsPay(1);
|
|
|
+ } else {
|
|
|
+ ws.setIsPay(0);
|
|
|
}
|
|
|
} else {
|
|
|
ws.setIsPay(0);
|
|
|
@@ -1909,7 +1879,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
|
|
|
} else {
|
|
|
ws.setIsPay(0);
|
|
|
}
|
|
|
- if(ws.getIsPay() == null){
|
|
|
+ if (ws.getIsPay() == null) {
|
|
|
ws.setIsPay(0);
|
|
|
}
|
|
|
if (!(ws.getIsPay() != null && ws.getIsPay().intValue() == 1)) {
|