Browse Source

Merge remote-tracking branch 'origin/master'

master
dimengzhe 4 months ago
parent
commit
4d8391e226
  1. 43
      anrui-buscenter/anrui-finmanage-ui/src/views/anruifinmanagement/chunafukuan/chunafukuanguanli/cashier.vue
  2. 2
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsMapper.java
  3. 4
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsMapper.xml
  4. 4
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsService.java
  5. 27
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/ScheduledRepaymentPlanDetailsService.java
  6. 32
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateService.java
  7. 4
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateMapper.java
  8. 13
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateMapper.xml
  9. 44
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateService.java
  10. 24
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyService.java

43
anrui-buscenter/anrui-finmanage-ui/src/views/anruifinmanagement/chunafukuan/chunafukuanguanli/cashier.vue

@ -480,16 +480,12 @@ export default {
this.getList()
},
changePayBankAccount(value) {
let bb = null
this.payBankAccount_list.forEach((e) => {
if (e.bankAccount === value) {
bb = {
name: e.accountName,
value: e.bankAccount
}
}
})
this.formobj.payBank = bb.name
const choose = this.payBankAccount_list.filter((item) => item.bankAccount === value)
if (choose !== null && choose.length > 0) {
this.formobj.payBank = choose[0].accountName
} else {
this.formobj.payBank = ''
}
},
handleSelectionChange(row) {
console.log('aaa', row)
@ -573,16 +569,27 @@ export default {
},
changerRceiveCompany(value) {
const choose = this.receiveCompany_list.filter((item) => item.name === value)
this.formobj.payCode = choose[0].payCode
getBankList({ sid: choose[0].sid }).then((res) => {
if (res.success) {
this.receiveBankAccount_list = res.data
}
})
if (choose !== null && choose.length > 0) {
this.formobj.payCode = choose[0].payCode
getBankList({ sid: choose[0].sid }).then((res) => {
if (res.success) {
this.receiveBankAccount_list = res.data
}
})
} else {
this.formobj.payCode = ''
this.formobj.receiveBankAccount = ''
this.formobj.receiveBank = ''
this.receiveBankAccount_list = []
}
},
changeReceiveBankAccount(value) {
const choose = this.receiveBankAccount_list.filter((item) => item.receiveBankAccount === value)
this.formobj.receiveBank = choose[0].receiveBank
if (choose !== null && choose.length > 0) {
this.formobj.receiveBank = choose[0].receiveBank
} else {
this.formobj.receiveBank = ''
}
},
handleGetCheck(row) {
this.dialogImgVisible = true
@ -649,7 +656,7 @@ export default {
this.formobj.receiveCompany = row.receiveCompany
this.formobj.receiveBankAccount = row.receiveBankAccount
this.formobj.receiveBank = row.receiveBank
this.formobj.payCode = row.payCode
this.changerRceiveCompany(this.formobj.receiveCompany)
this.formobj.payWayValue = row.payWayValue
this.changePayWay(row.payWayValue)
const aa = []

2
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsMapper.java

@ -101,4 +101,6 @@ public interface LoanRepaymentPlanDetailsMapper extends BaseMapper<LoanRepayment
List<AppRepaymentPlanRecord> selByMainSidAndVinNo(@Param("scheduleSid") String scheduleSid, @Param("vinNo") String vinNo);
void updatePaymentMoneyBySids(@Param("planSids") List<String> planSids);
int updateDataTime(@Param("format") String format);
}

4
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsMapper.xml

@ -603,6 +603,10 @@
#{planSid}
</foreach>
</update>
<update id="updateDataTime">
update loan_repayment_plan_details
set updateTime =#{format}
</update>
<select id="selVehSidAndPeriod"

4
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsService.java

@ -368,4 +368,8 @@ public class LoanRepaymentPlanDetailsService extends MybatisBaseService<LoanRepa
public void updatePaymentMoneyBySids(List<String> sids) {
baseMapper.updatePaymentMoneyBySids(sids);
}
public int updateDataTime(String format) {
return baseMapper.updateDataTime(format);
}
}

27
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/ScheduledRepaymentPlanDetailsService.java

@ -1,9 +1,6 @@
package com.yxt.anrui.riskcenter.biz.loanrepaymentplandetails;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.math.Money;
import com.yxt.anrui.base.api.basepurchasesystem.BasePurchaseSystemDetailsVo;
import com.yxt.anrui.base.api.basepurchasesystem.BasePurchaseSystemFeign;
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrder;
@ -12,21 +9,16 @@ import com.yxt.anrui.buscenter.api.bussalesorderborrower.BusSalesOrderBorrowerDe
import com.yxt.anrui.buscenter.api.bussalesorderborrower.BusSalesOrderBorrowerFeign;
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicle;
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicleFeign;
import com.yxt.anrui.fin.api.finuncollectedreceivablesdetailedjr.FinUncollectedReceivablesDetailedJRFeign;
import com.yxt.anrui.fin.api.kingdee.FinKingDeeFeign;
import com.yxt.anrui.fin.api.kingdee.bdcustomer.BdCustomer;
import com.yxt.anrui.fin.api.kingdee.voucher.GeneralVoucher;
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationFeign;
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationVo;
import com.yxt.anrui.riskcenter.api.loanfundday.LoanFundDay;
import com.yxt.anrui.riskcenter.api.loanmonthlyaccrualrecord.LoanMonthlyAccrualRecord;
import com.yxt.anrui.riskcenter.api.loanpushfundhistory.LoanPushFundHistory;
import com.yxt.anrui.riskcenter.api.loanrepaymenthistory.utils.CollectorsUtil;
import com.yxt.anrui.riskcenter.api.loanrepaymenthistory.HistoryOverDueVo;
import com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.LoanPlanDetailsVoForFundVoucher;
import com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.LoanPlanDetailsVoForLateVoucher;
import com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.LoanRepaymentPlanDetails;
import com.yxt.anrui.riskcenter.api.loanrepaymentschedule.LoanRepaymentSchedule;
import com.yxt.anrui.riskcenter.biz.loanfundday.LoanFundDayService;
import com.yxt.anrui.riskcenter.biz.loanpushfundhistory.LoanPushFundHistoryService;
import com.yxt.anrui.riskcenter.biz.loanrepaymentschedule.LoanRepaymentScheduleService;
import com.yxt.common.core.result.ResultBean;
@ -39,7 +31,6 @@ import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
/**
* @description:
@ -74,6 +65,8 @@ public class ScheduledRepaymentPlanDetailsService {
@Scheduled(cron = "0 0 2 1 * ?")
public void pushLateVoucher() {
Date date = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
int t = loanRepaymentPlanDetailsService.updateDataTime(sdf.format(date)); //修改数据更新日期
Calendar calendar = Calendar.getInstance();//new一个Calendar类,把Date放进去
calendar.setTime(date);
calendar.add(Calendar.DATE, -1);
@ -82,6 +75,20 @@ public class ScheduledRepaymentPlanDetailsService {
useOrgSidList.removeAll(Collections.singleton(null));
if (!useOrgSidList.isEmpty()) {
for (String u : useOrgSidList) {
//判断当期是否逾期
List<HistoryOverDueVo> overDueVoList = loanRepaymentPlanDetailsService.overDueVoList(u);
if (!overDueVoList.isEmpty()) {
List<String> planSids = new ArrayList<>();
overDueVoList.stream().forEach(v -> {
if (v.getOverdueState().equals("0")) {
planSids.add(v.getPlanSid());
}
});
if (!planSids.isEmpty()) {
int i = loanRepaymentPlanDetailsService.updateOverDueState(planSids);
}
}
//查询是否符合转累欠
List<LoanPlanDetailsVoForLateVoucher> records = loanRepaymentPlanDetailsService.selListForLateVoucher(u);
List<String> planSids = new ArrayList<>();
if (!records.isEmpty()) {

32
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateService.java

@ -719,7 +719,7 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
}
if (StringUtils.isNotBlank(excelInfo.getEstimateRebate())) {
String estimateRebate = excelInfo.getEstimateRebate();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(estimateRebate).matches();
if (!matches) {
checkWord.add("预提返利必须为数字");
@ -732,7 +732,7 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
}
if (StringUtils.isNotBlank(excelInfo.getExpectCost())) {
String expectCost = excelInfo.getExpectCost();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(expectCost).matches();
if (!matches) {
checkWord.add("其中预提费用必须为数字");
@ -781,7 +781,7 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
}
if (StringUtils.isNotBlank(excelInfo.getUploadMoney())) {
String uploadMoney = excelInfo.getUploadMoney();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(uploadMoney).matches();
if (!matches) {
checkWord.add("上传金额必须为数字");
@ -794,7 +794,7 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
}
if (StringUtils.isNotBlank(excelInfo.getStayDetermineMoney())) {
String stayDetermineMoney = excelInfo.getStayDetermineMoney();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(stayDetermineMoney).matches();
if (!matches) {
checkWord.add("待确定金额必须为数字");
@ -807,7 +807,7 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
}
if (StringUtils.isNotBlank(excelInfo.getOnceItureCost())) {
String onceItureCost = excelInfo.getOnceItureCost();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(onceItureCost).matches();
if (!matches) {
checkWord.add("其中支出费用必须为数字");
@ -820,7 +820,7 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
}
if (StringUtils.isNotBlank(excelInfo.getOnceTreatCost())) {
String onceTreatCost = excelInfo.getOnceTreatCost();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(onceTreatCost).matches();
if (!matches) {
checkWord.add("其中待支付费用必须为数字");
@ -833,7 +833,7 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
}
if (StringUtils.isNotBlank(excelInfo.getOnceSuppCost())) {
String onceSuppCost = excelInfo.getOnceSuppCost();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(onceSuppCost).matches();
if (!matches) {
checkWord.add("其中抵顶费用必须为数字");
@ -1211,7 +1211,7 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
}
if (StringUtils.isNotBlank(excelInfo.getEstimateRebate())) {
String estimateRebate = excelInfo.getEstimateRebate();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(estimateRebate).matches();
if (!matches) {
checkWord.add("预提返利必须为数字");
@ -1224,7 +1224,7 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
}
if (StringUtils.isNotBlank(excelInfo.getExpectCost())) {
String expectCost = excelInfo.getExpectCost();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(expectCost).matches();
if (!matches) {
checkWord.add("其中预提费用必须为数字");
@ -1273,7 +1273,7 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
}
if (StringUtils.isNotBlank(excelInfo.getUploadMoney())) {
String uploadMoney = excelInfo.getUploadMoney();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(uploadMoney).matches();
if (!matches) {
checkWord.add("上传金额必须为数字");
@ -1286,7 +1286,7 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
}
if (StringUtils.isNotBlank(excelInfo.getMoney())) {
String money = excelInfo.getMoney();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(money).matches();
if (!matches) {
checkWord.add("其中费用必须为数字");
@ -1299,7 +1299,7 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
}
if (StringUtils.isNotBlank(excelInfo.getStayDetermineMoney())) {
String stayDetermineMoney = excelInfo.getStayDetermineMoney();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(stayDetermineMoney).matches();
if (!matches) {
checkWord.add("待确定金额必须为数字");
@ -1333,7 +1333,7 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
}
if (StringUtils.isNotBlank(excelInfo.getSecondaryUploadMoney())) {
String secondaryUploadMoney = excelInfo.getSecondaryUploadMoney();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(secondaryUploadMoney).matches();
if (!matches) {
checkWord.add("二次上传金额必须为数字");
@ -1342,7 +1342,7 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
}
if (StringUtils.isNotBlank(excelInfo.getSecondItureCost())) {
String secondItureCost = excelInfo.getSecondItureCost();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(secondItureCost).matches();
if (!matches) {
checkWord.add("其中支出费用必须为数字");
@ -1355,7 +1355,7 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
}
if (StringUtils.isNotBlank(excelInfo.getSecondTreatCost())) {
String secondTreatCost = excelInfo.getSecondTreatCost();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(secondTreatCost).matches();
if (!matches) {
checkWord.add("其中待支付费用必须为数字");
@ -1368,7 +1368,7 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
}
if (StringUtils.isNotBlank(excelInfo.getSecondSuppCost())) {
String secondSuppCost = excelInfo.getSecondSuppCost();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(secondSuppCost).matches();
if (!matches) {
checkWord.add("其中抵顶费用必须为数字");

4
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateMapper.java

@ -69,7 +69,9 @@ public interface ScmVehRebateMapper extends BaseMapper<ScmVehRebate> {
void updateTwoExcelInfo(@Param("secondaryUploadDate") String secondaryUploadDate, @Param("secondaryUploadMoney") String secondaryUploadMoney, @Param("secondTreatCost") String secondTreatCost, @Param("secondSuppCost") String secondSuppCost, @Param("secondSuppRemark") String secondSuppRemark, @Param("adjustmentRemarks") String adjustmentRemarks, @Param("isAdjustment") String isAdjustment, @Param("adjustmentMoney") String adjustmentMoney, @Param("diffAmount") String diffAmount, @Param("sid") String sid);
ScmVehRebateVo selectByVinNoAndOrgSid(@Param("vinNo") String vinNo, @Param("rebateTypeValue") String rebateTypeValue, @Param("rebateName") String rebateName, @Param("palceGenDate") String palceGenDate, @Param("calculationModeValue") String calculationModeValue, @Param("useOrgSid") String useOrgSid);
ScmVehRebateVo selectByVinNoAndOrgSidDr(@Param("vinNo") String vinNo, @Param("rebateTypeValue") String rebateTypeValue, @Param("rebateName") String rebateName, @Param("palceGenDate") String palceGenDate, @Param("calculationModeValue") String calculationModeValue, @Param("useOrgSid") String useOrgSid);
ScmVehRebateVo selectByVinNoAndOrgSid(@Param("vinNo") String vinNo, @Param("rebateTypeValue") String rebateTypeValue, @Param("rebateName") String rebateName, @Param("palceGenDate") String palceGenDate, @Param("estimateRebate") String estimateRebate, @Param("useOrgSid") String useOrgSid);
@Update("update scm_veh_rebate set adjustmentState = #{adjustmentState} where sid = #{vehRebateSid}")
void updateAdjustmentState(@Param("vehRebateSid") String vehRebateSid, @Param("adjustmentState") int adjustmentState);

13
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateMapper.xml

@ -39,7 +39,7 @@
))
</select>
<select id="selectByVinNoAndOrgSid" resultType="com.yxt.anrui.scm.api.scmvehrebate.ScmVehRebateVo">
<select id="selectByVinNoAndOrgSidDr" resultType="com.yxt.anrui.scm.api.scmvehrebate.ScmVehRebateVo">
SELECT *
FROM scm_veh_rebate
WHERE vinNo LIKE CONCAT('%', #{vinNo}, '%')
@ -50,6 +50,17 @@
AND createOrgSid = #{useOrgSid}
</select>
<select id="selectByVinNoAndOrgSid" resultType="com.yxt.anrui.scm.api.scmvehrebate.ScmVehRebateVo">
SELECT *
FROM scm_veh_rebate
WHERE vinNo LIKE CONCAT('%', #{vinNo}, '%')
AND rebateTypeValue = #{rebateTypeValue}
AND rebateName = #{rebateName}
AND palceGenDate = #{palceGenDate}
AND estimateRebate = #{estimateRebate}
AND createOrgSid = #{useOrgSid}
</select>
<select id="excelListOne" resultType="com.yxt.anrui.scm.api.scmvehrebate.OneExcelVo">
SELECT
*,

44
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateService.java

@ -820,7 +820,7 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
}
if (!importVoList.isEmpty()) {
for (ScmVehRebateExcelInfo excelInfo : importVoList) {
ScmVehRebateVo scmVehRebateVo = baseMapper.selectByVinNoAndOrgSid(excelInfo.getVinNo(), excelInfo.getRebateTypeValue(), excelInfo.getRebateName(), excelInfo.getPalceGenDate(), excelInfo.getCalculationModeValue(), useOrgSid);
ScmVehRebateVo scmVehRebateVo = baseMapper.selectByVinNoAndOrgSidDr(excelInfo.getVinNo(), excelInfo.getRebateTypeValue(), excelInfo.getRebateName(), excelInfo.getPalceGenDate(), excelInfo.getCalculationModeValue(), useOrgSid);
if (scmVehRebateVo != null) {
checkWord.add("车架号为" + excelInfo.getVinNo() + "的单车返利信息已存在");
break;
@ -877,7 +877,7 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
// }
// if (StringUtils.isNotBlank(excelInfo.getEstimateRebate())) {
// String estimateRebate = excelInfo.getEstimateRebate();
// Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
// Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
// boolean matches = pattern.matcher(estimateRebate).matches();
// if (!matches) {
// checkWord.add("返利金额必须为数字");
@ -890,7 +890,7 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
}
if (StringUtils.isNotBlank(excelInfo.getExpectTreatCost())) {
String expectTreatCost = excelInfo.getExpectTreatCost();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(expectTreatCost).matches();
if (!matches) {
checkWord.add("其中待支付费用必须为数字");
@ -903,7 +903,7 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
}
if (StringUtils.isNotBlank(excelInfo.getExpectSuppCost())) {
String expectSuppCost = excelInfo.getExpectSuppCost();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(expectSuppCost).matches();
if (!matches) {
checkWord.add("其中抵顶费用必须为数字");
@ -1233,7 +1233,7 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
}
if (StringUtils.isNotBlank(excelInfo.getManufactorSettlementPrice())) {
String manufactorSettlementPrice = excelInfo.getManufactorSettlementPrice();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(manufactorSettlementPrice).matches();
if (!matches) {
checkWord.add("厂家结算价必须为数字");
@ -1246,7 +1246,7 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
}
if (StringUtils.isNotBlank(excelInfo.getFreight())) {
String freight = excelInfo.getFreight();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(freight).matches();
if (!matches) {
checkWord.add("其中运费金额必须为数字");
@ -1295,7 +1295,7 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
}
if (StringUtils.isNotBlank(excelInfo.getEstimateRebate())) {
String estimateRebate = excelInfo.getEstimateRebate();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(estimateRebate).matches();
if (!matches) {
checkWord.add("预提返利必须为数字");
@ -1308,7 +1308,7 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
}
if (StringUtils.isNotBlank(excelInfo.getWithholdCost())) {
String withholdCost = excelInfo.getWithholdCost();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(withholdCost).matches();
if (!matches) {
checkWord.add("其中预提费用必须为数字");
@ -1357,7 +1357,7 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
}
if (StringUtils.isNotBlank(excelInfo.getUploadMoney())) {
String uploadMoney = excelInfo.getUploadMoney();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(uploadMoney).matches();
if (!matches) {
checkWord.add("上传金额必须为数字");
@ -1370,7 +1370,7 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
}
if (StringUtils.isNotBlank(excelInfo.getStayDetermineMoney())) {
String stayDetermineMoney = excelInfo.getStayDetermineMoney();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(stayDetermineMoney).matches();
if (!matches) {
checkWord.add("待确定金额必须为数字");
@ -1383,7 +1383,7 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
}
if (StringUtils.isNotBlank(excelInfo.getOnceTreatCost())) {
String onceTreatCost = excelInfo.getOnceTreatCost();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(onceTreatCost).matches();
if (!matches) {
checkWord.add("待支付费用必须为数字");
@ -1396,7 +1396,7 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
}
if (StringUtils.isNotBlank(excelInfo.getOnceSuppCost())) {
String onceSuppCost = excelInfo.getOnceSuppCost();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(onceSuppCost).matches();
if (!matches) {
checkWord.add("抵顶费用必须为数字");
@ -1691,7 +1691,7 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
}
if (StringUtils.isNotBlank(excelInfo.getManufactorSettlementPrice())) {
String manufactorSettlementPrice = excelInfo.getManufactorSettlementPrice();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(manufactorSettlementPrice).matches();
if (!matches) {
checkWord.add("厂家结算价必须为数字");
@ -1704,7 +1704,7 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
}
if (StringUtils.isNotBlank(excelInfo.getFreight())) {
String freight = excelInfo.getFreight();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(freight).matches();
if (!matches) {
checkWord.add("其中运费金额必须为数字");
@ -1747,7 +1747,7 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
}
if (StringUtils.isNotBlank(excelInfo.getEstimateRebate())) {
String estimateRebate = excelInfo.getEstimateRebate();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(estimateRebate).matches();
if (!matches) {
checkWord.add("预提返利必须为数字");
@ -1760,7 +1760,7 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
}
if (StringUtils.isNotBlank(excelInfo.getWithholdCost())) {
String withholdCost = excelInfo.getWithholdCost();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(withholdCost).matches();
if (!matches) {
checkWord.add("其中预提费用必须为数字");
@ -1809,7 +1809,7 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
}
if (StringUtils.isNotBlank(excelInfo.getUploadMoney())) {
String uploadMoney = excelInfo.getUploadMoney();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(uploadMoney).matches();
if (!matches) {
checkWord.add("上传金额必须为数字");
@ -1822,7 +1822,7 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
}
if (StringUtils.isNotBlank(excelInfo.getStayDetermineMoney())) {
String stayDetermineMoney = excelInfo.getStayDetermineMoney();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(stayDetermineMoney).matches();
if (!matches) {
checkWord.add("待确定金额必须为数字");
@ -1835,7 +1835,7 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
}
if (StringUtils.isNotBlank(excelInfo.getQzMoney())) {
String qzMoney = excelInfo.getQzMoney();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(qzMoney).matches();
if (!matches) {
checkWord.add("其中费用必须为数字");
@ -1869,7 +1869,7 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
}
if (StringUtils.isNotBlank(excelInfo.getSecondaryUploadMoney())) {
String secondaryUploadMoney = excelInfo.getSecondaryUploadMoney();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(secondaryUploadMoney).matches();
if (!matches) {
checkWord.add("二次上传金额必须为数字");
@ -1882,7 +1882,7 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
}
if (StringUtils.isNotBlank(excelInfo.getSecondTreatCost())) {
String secondTreatCost = excelInfo.getSecondTreatCost();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(secondTreatCost).matches();
if (!matches) {
checkWord.add("待支付费用必须为数字");
@ -1895,7 +1895,7 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
}
if (StringUtils.isNotBlank(excelInfo.getSecondSuppCost())) {
String secondSuppCost = excelInfo.getSecondSuppCost();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
Pattern pattern = Pattern.compile("^(\\-|\\+)?\\d+(\\.\\d+)?$");
boolean matches = pattern.matcher(secondSuppCost).matches();
if (!matches) {
checkWord.add("抵顶费费用必须为数字");

24
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyService.java

@ -53,6 +53,7 @@ import com.yxt.anrui.flowable.sqloperationsymbol.BusinessVariables;
import com.yxt.anrui.portal.api.flow.PCHistTaskListAndCommentList;
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationFeign;
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationVo;
import com.yxt.anrui.portal.api.sysparameter.SysParameterFeign;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrg;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign;
import com.yxt.anrui.portal.api.sysuser.PrivilegeQuery;
@ -144,7 +145,8 @@ public class ScmVehRebateWithApplyService extends MybatisBaseService<ScmVehRebat
private MessageFeign messageFeign;
@Autowired
private MessageListFeign messageListFeign;
@Autowired
private SysParameterFeign sysParameterFeign;
private QueryWrapper<ScmVehRebateWithApply> createQueryWrapper(ScmVehRebateWithApplyQuery query) {
// todo: 这里根据具体业务调整查询条件
// 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
@ -450,18 +452,28 @@ public class ScmVehRebateWithApplyService extends MybatisBaseService<ScmVehRebat
* @return
*/
public String returnBusDate(Date date) {
Date parse = null;
Date ruleDate = null;
Date nowDate = null;
String rDate = "";
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd");
String format1 = sdf.format(date);
String rDate = format1 + "-06";
String parameterVale = sysParameterFeign.fetchByParNo("CW_FLYJSRQ").getData();
int i = Integer.parseInt(parameterVale);
if (i >= 10) {
rDate = format1 + "-" + i;
} else {
rDate = format1 + "-0" + i;
}
String format2 = sdf2.format(date);
try {
parse = sdf2.parse(rDate);
ruleDate = sdf2.parse(rDate);
nowDate = sdf2.parse(format2);
} catch (ParseException e) {
e.printStackTrace();
}
if (!(date.before(parse))) {
return sdf2.format(date);
if ((nowDate.after(ruleDate))) {
return sdf2.format(nowDate);
} else {
Calendar calendar = Calendar.getInstance();
int month = calendar.get(Calendar.MONTH);

Loading…
Cancel
Save