Browse Source

优化结清管理

master
fanzongzhe 8 months ago
parent
commit
4a138b3b0f
  1. 2
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailedjr/FinUncollectedReceivablesDetailedJRMapper.xml
  2. 3
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/kingdee/FinKingDeeFeignRest.java
  3. 4
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansettlevehicle/LoanSettleVehicleVo.java
  4. 2
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsMapper.java
  5. 8
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsMapper.xml
  6. 4
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsService.java
  7. 4
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansettleapply/LoanSettleApplyMapper.java
  8. 12
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansettleapply/LoanSettleApplyMapper.xml
  9. 138
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansettleapply/LoanSettleApplyService.java
  10. 38
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansettlevehicle/LoanSettleVehicleMapper.xml
  11. 1
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansettlevehicle/LoanSettleVehicleService.java
  12. 2
      yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceitemapply/AsServiceItemApplyDetailsVo.java
  13. 2
      yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceitemapply/SitemsVo.java
  14. 8
      yxt-as/src/main/java/com/yxt/anrui/as/biz/asserviceitemapply/AsServiceItemApplyRest.java
  15. 14
      yxt-as/src/main/java/com/yxt/anrui/as/biz/asserviceitemapply/AsServiceItemApplyService.java

2
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailedjr/FinUncollectedReceivablesDetailedJRMapper.xml

@ -194,7 +194,7 @@
)),
0
) < p.dueMoney
-- AND p.dueDate < last_day(date_sub(now(),interval -1 month))
AND (p.dueDate < last_day(date_sub( now(), INTERVAL - 1 MONTH )) OR v.settleState = 3)
AND p.useOrgSid = #{userOrgSid}
UNION ALL
SELECT

3
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/kingdee/FinKingDeeFeignRest.java

@ -381,7 +381,6 @@ public class FinKingDeeFeignRest implements FinKingDeeFeign {
List<GeneralVoucher.GeneralVoucherDetail> voucherDetails = voucher.getVoucherDetails();
if (!voucherDetails.isEmpty()) {
for (GeneralVoucher.GeneralVoucherDetail voucherDetail : voucherDetails) {
Voucher.VoucherResultDetailDto dto1 = new Voucher.VoucherResultDetailDto(); //借方
Voucher.VoucherResultDetailDto dto2 = new Voucher.VoucherResultDetailDto(); //贷方
dto1.setSummary(voucherDetail.getBankName() + "划扣");
@ -548,8 +547,8 @@ public class FinKingDeeFeignRest implements FinKingDeeFeign {
}
dto1.setDebit(String.valueOf(amountAll));
resultDetails.add(0, dto1);
newVoucher.setResultDetails(resultDetails);
}
newVoucher.setResultDetails(resultDetails);
}
log.info("FinKingDeeFeignRest-saveVoucher:{}", JSONObject.toJSONString(newVoucher));
return voucherService.saveVoucher(newVoucher);

4
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansettlevehicle/LoanSettleVehicleVo.java

@ -33,8 +33,8 @@ public class LoanSettleVehicleVo {
@ApiModelProperty("贷款人")
private String loanName;
@ApiModelProperty("期数")
private String peroid;
// @ApiModelProperty("期数")
// private String peroid;
@ApiModelProperty("结清日期")
private String settingDate;
@ApiModelProperty("资方结清金额")

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

@ -99,4 +99,6 @@ public interface LoanRepaymentPlanDetailsMapper extends BaseMapper<LoanRepayment
void saveList(@Param("list") List<LoanRepaymentPlanDetails> list);
List<AppRepaymentPlanRecord> selByMainSidAndVinNo(@Param("scheduleSid") String scheduleSid, @Param("vinNo") String vinNo);
void updatePaymentMoneyBySids(@Param("planSids") List<String> planSids);
}

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

@ -595,6 +595,14 @@
#{item.id}
</foreach>
</update>
<update id="updatePaymentMoneyBySids">
update loan_repayment_plan_details
set paymentMoney = 0,paymentInterest = 0
where sid in
<foreach collection="planSids" item="planSid" open="(" close=")" separator=",">
#{planSid}
</foreach>
</update>
<select id="selVehSidAndPeriod"

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

@ -364,4 +364,8 @@ public class LoanRepaymentPlanDetailsService extends MybatisBaseService<LoanRepa
baseMapper.updateById(planDetails);
}
}
public void updatePaymentMoneyBySids(List<String> sids) {
baseMapper.updatePaymentMoneyBySids(sids);
}
}

4
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansettleapply/LoanSettleApplyMapper.java

@ -70,4 +70,8 @@ public interface LoanSettleApplyMapper extends BaseMapper<LoanSettleApply> {
String selJrMoneyByBusVinSidAndCloseDate(@Param("busVinSid") String busVinSid, @Param("formatDate") String formatDate);
String selDueMoneyByBusVinSidAndCloseDate(@Param("busVinSid")String busVinSid, @Param("formatDate")String formatDate);
List<LoanRepaymentPlanDetails> selectPlanListByBusVinSid(@Param("busVinSid") String busVinSid);
void updatePaymentStateByBusVinSid(@Param("busVinSid") String busVinSid);
}

12
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansettleapply/LoanSettleApplyMapper.xml

@ -183,6 +183,14 @@ FROM (
set settleState = #{state},settleApplyDate =#{date}
where sid = #{busVinSid}
</update>
<update id="updatePaymentStateByBusVinSid">
UPDATE loan_repayment_history as h
JOIN loan_repayment_plan_details as p ON h.planDetailSid = p.sid
SET h.paymentStateKey = '003',
h.paymentState = '已转付'
WHERE
p.busVinSid = #{busVinSid} AND h.returnWay = '间还'
</update>
<select id="selectByBusVinSidAndDesc"
resultType="com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.LoanRepaymentPlanDetails">
@ -335,4 +343,8 @@ FROM (
LEFT JOIN loan_repayment_history as h ON p.sid = h.planDetailSid
WHERE p.busVinSid = #{busVinSid} AND h.updateState = '1' AND h.dataTime > #{formatDate}
</select>
<select id="selectPlanListByBusVinSid"
resultType="com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.LoanRepaymentPlanDetails">
select * from loan_repayment_plan_details where busVinSid = #{busVinSid}
</select>
</mapper>

138
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansettleapply/LoanSettleApplyService.java

@ -757,6 +757,8 @@ public class LoanSettleApplyService extends MybatisBaseService<LoanSettleApplyMa
baseMapper.updateBus(loanSettleApply.getBusVinSid(), "1");
//推送资方结清款到出纳代付款列表
pushBankSettlePrice(loanSettleApply);
//设置认款月还为已转付
updatePaymentStateByBusVinSid(loanSettleApply.getBusVinSid());
}
}
}
@ -883,8 +885,8 @@ public class LoanSettleApplyService extends MybatisBaseService<LoanSettleApplyMa
otherAmountMoney = otherAmount.subtract(otherAmountJM);
FinUncollectedReceivablesDetailedJR jr4 = finUncollectedReceivablesDetailedJRFeign.getUnJrByPayCostTitleKeyAndBusSid("011", planDetailsSid).getData();
if (null != jr4) {
jr4.setReveivableMoney(otherAmountMoney);
updateList.add(jr4);
jr4.setReveivableMoney(otherAmountMoney);
updateList.add(jr4);
} else {
if (otherAmountMoney.compareTo(BigDecimal.ZERO) > 0) {
//公司其他费用应收
@ -923,8 +925,6 @@ public class LoanSettleApplyService extends MybatisBaseService<LoanSettleApplyMa
String busVinSid = loanSettleApply.getBusVinSid();
List<LoanRepaymentHistory> histories = new ArrayList<>();//还款记录
List<FinSelectedReceivablesDetailed> selectList = new ArrayList<>();
List<LoanRepaymentPlanDetails> payments = new ArrayList<>(); //消减垫款金额列表
List<LoanRepaymentPlanDetails> yqlx = new ArrayList<>(); //消减逾期利息列表
LoanRepaymentPlanDetails planDetails = baseMapper.selectByBusVinSidAndDesc(loanSettleApply.getBusVinSid());
String scheduleSid = planDetails.getScheduleSid();
LoanRepaymentSchedule schedule = loanRepaymentScheduleService.fetchBySid(scheduleSid);
@ -964,7 +964,6 @@ public class LoanSettleApplyService extends MybatisBaseService<LoanSettleApplyMa
for (PlanNoReturnMoney m : p) {
if (deposit.compareTo(BigDecimal.ZERO) > 0) {
BigDecimal money = new BigDecimal(m.getMoney());
BigDecimal mm = BigDecimal.ZERO;
String sid = m.getSid();
String mSid = m.getMSid();
LoanRepaymentHistory history = new LoanRepaymentHistory();
@ -981,26 +980,14 @@ public class LoanSettleApplyService extends MybatisBaseService<LoanSettleApplyMa
history.setPlanDetailSid(sid);
history.setScheduleSid(mSid);
if (deposit.compareTo(money) >= 0) {
mm = money;
history.setActualMoney(money);
histories.add(history);
deposit = deposit.subtract(money);
} else {
mm = deposit;
history.setActualMoney(deposit);
histories.add(history);
deposit = BigDecimal.ZERO;
}
LoanRepaymentPlanDetails pd = loanRepaymentPlanDetailsService.fetchBySid(sid);
if (null != pd.getPaymentMoney()) {
BigDecimal paymentMoney = pd.getPaymentMoney();
if (mm.compareTo(paymentMoney) >= 0) {
pd.setPaymentMoney(new BigDecimal("0"));
} else {
pd.setPaymentMoney(paymentMoney.subtract(mm));
}
payments.add(pd);
}
}
}
}
@ -1013,21 +1000,17 @@ public class LoanSettleApplyService extends MybatisBaseService<LoanSettleApplyMa
for (PlanNoReturnMoney m : p) {
if (deposit.compareTo(BigDecimal.ZERO) > 0) {
BigDecimal money = new BigDecimal(m.getMoney());
BigDecimal mm = BigDecimal.ZERO;
String sid = m.getSid();
LoanRepaymentPlanDetails pd = loanRepaymentPlanDetailsService.fetchBySid(sid);
FinSelectedReceivablesDetailed fin = new FinSelectedReceivablesDetailed();
fin.setCreateBySid(userSid);
fin.setRemarks("结转");
fin.setVIN(pd.getVinNo());
fin.setUseOrgSid(pd.getUseOrgSid());
fin.setVIN(planDetails.getVinNo());
fin.setUseOrgSid(planDetails.getUseOrgSid());
fin.setReceivablesName("资方逾期利息");
if (deposit.compareTo(money) >= 0) {
mm = money;
fin.setSubscriptionMoney(money);
deposit = deposit.subtract(money);
} else {
mm = deposit;
fin.setSubscriptionMoney(deposit);
deposit = BigDecimal.ZERO;
}
@ -1036,18 +1019,9 @@ public class LoanSettleApplyService extends MybatisBaseService<LoanSettleApplyMa
fin.setAuditDate(DateUtil.today());
fin.setReceivablesSid(m.getJrSid());
fin.setKxState("01");
fin.setUseOrgName(pd.getUseOrgName());
fin.setUseOrgName(planDetails.getUseOrgName());
fin.setOrgSidPath(loanSettleApply.getOrgSidPath());
selectList.add(fin);
if (null != pd.getPaymentInterest()) {
BigDecimal paymentInterest = pd.getPaymentInterest();
if (mm.compareTo(paymentInterest) >= 0) {
pd.setPaymentInterest(new BigDecimal("0"));
} else {
pd.setPaymentInterest(paymentInterest.subtract(mm));
}
yqlx.add(pd);
}
}
}
}
@ -1204,12 +1178,6 @@ public class LoanSettleApplyService extends MybatisBaseService<LoanSettleApplyMa
if (histories.size() > 0 && !histories.isEmpty()) {
loanRepaymentHistoryService.saveList(histories);
}
if (payments.size() > 0 && !payments.isEmpty()) {
loanRepaymentPlanDetailsService.updateList(payments);
}
if (yqlx.size() > 0 && !yqlx.isEmpty()) {
loanRepaymentPlanDetailsService.updateList(yqlx);
}
selectList.removeAll(Collections.singleton(null));
if (selectList.size() > 0 && !selectList.isEmpty()) {
ResultBean resultBean = finSelectedReceivablesDetailedFeign.saveAll(selectList);
@ -1222,8 +1190,6 @@ public class LoanSettleApplyService extends MybatisBaseService<LoanSettleApplyMa
String busVinSid = loanSettleApply.getBusVinSid();
List<LoanRepaymentHistory> histories = new ArrayList<>();//还款记录
List<FinSelectedReceivablesDetailed> selectList = new ArrayList<>();
List<LoanRepaymentPlanDetails> payments = new ArrayList<>(); //消减垫款金额列表
List<LoanRepaymentPlanDetails> yqlx = new ArrayList<>(); //消减逾期利息列表
LoanRepaymentPlanDetails planDetails = baseMapper.selectByBusVinSidAndDesc(loanSettleApply.getBusVinSid());
String scheduleSid = planDetails.getScheduleSid();
LoanRepaymentSchedule schedule = loanRepaymentScheduleService.fetchBySid(scheduleSid);
@ -1277,12 +1243,6 @@ public class LoanSettleApplyService extends MybatisBaseService<LoanSettleApplyMa
history.setScheduleSid(mSid);
history.setActualMoney(money);
histories.add(history);
LoanRepaymentPlanDetails pd = loanRepaymentPlanDetailsService.fetchBySid(sid);
if (null != pd.getPaymentMoney()) {
BigDecimal paymentMoney = pd.getPaymentMoney();
pd.setPaymentMoney(new BigDecimal("0"));
payments.add(pd);
}
}
}
//垫资方逾期利息
@ -1292,12 +1252,11 @@ public class LoanSettleApplyService extends MybatisBaseService<LoanSettleApplyMa
for (PlanNoReturnMoney m : p2) {
BigDecimal money = new BigDecimal(m.getMoney());
String sid = m.getSid();
LoanRepaymentPlanDetails pd = loanRepaymentPlanDetailsService.fetchBySid(sid);
FinSelectedReceivablesDetailed fin = new FinSelectedReceivablesDetailed();
fin.setCreateBySid(userSid);
fin.setRemarks("减免");
fin.setVIN(pd.getVinNo());
fin.setUseOrgSid(pd.getUseOrgSid());
fin.setVIN(planDetails.getVinNo());
fin.setUseOrgSid(planDetails.getUseOrgSid());
fin.setReceivablesName("资方逾期利息");
fin.setSubscriptionMoney(money);
fin.setSubscriptionDate(DateUtil.today());
@ -1305,14 +1264,9 @@ public class LoanSettleApplyService extends MybatisBaseService<LoanSettleApplyMa
fin.setAuditDate(DateUtil.today());
fin.setReceivablesSid(m.getJrSid());
fin.setKxState("01");
fin.setUseOrgName(pd.getUseOrgName());
fin.setUseOrgName(planDetails.getUseOrgName());
fin.setOrgSidPath(loanSettleApply.getOrgSidPath());
selectList.add(fin);
if (null != pd.getPaymentInterest()) {
BigDecimal paymentInterest = pd.getPaymentInterest();
pd.setPaymentInterest(new BigDecimal("0"));
yqlx.add(pd);
}
}
}
//资方逾期利息
@ -1407,22 +1361,68 @@ public class LoanSettleApplyService extends MybatisBaseService<LoanSettleApplyMa
fin.setOrgSidPath(loanSettleApply.getOrgSidPath());
selectList.add(fin);
}
if (histories.size() > 0 && !histories.isEmpty()) {
loanRepaymentHistoryService.saveList(histories);
//资方退还垫款应收
List<PlanNoReturnMoney> p7 = baseMapper.selNoReturnJrMoneyByBusVinSidAndKeyDesc(busVinSid, "007");
p7.removeAll(Collections.singleton(null));
if (!p7.isEmpty() && p7.size() > 0) {
for (PlanNoReturnMoney m : p7) {
BigDecimal money = new BigDecimal(m.getMoney());
String sid = m.getSid();
LoanRepaymentPlanDetails pd = loanRepaymentPlanDetailsService.fetchBySid(sid);
FinSelectedReceivablesDetailed fin = new FinSelectedReceivablesDetailed();
fin.setCreateBySid(userSid);
fin.setRemarks("减免");
fin.setVIN(pd.getVinNo());
fin.setUseOrgSid(pd.getUseOrgSid());
fin.setReceivablesName("资方退还垫款");
fin.setSubscriptionMoney(money);
fin.setSubscriptionDate(DateUtil.today());
fin.setAuditState(3);
fin.setAuditDate(DateUtil.today());
fin.setReceivablesSid(m.getJrSid());
fin.setKxState("01");
fin.setUseOrgName(pd.getUseOrgName());
fin.setOrgSidPath(loanSettleApply.getOrgSidPath());
selectList.add(fin);
}
}
if (payments.size() > 0 && !payments.isEmpty()) {
loanRepaymentPlanDetailsService.updateList(payments);
//对应的垫款金额、资方逾期利息设置0
List<LoanRepaymentPlanDetails> ps = baseMapper.selectPlanListByBusVinSid(busVinSid);
ps.removeAll(Collections.singleton(null));
Set<String> set = new HashSet<>();
if (!ps.isEmpty() && ps.size() > 0) {
for (LoanRepaymentPlanDetails pp : ps) {
if (pp.getPaymentMoney() != null) {
if (pp.getPaymentMoney().compareTo(BigDecimal.ZERO) == 0) {
} else {
set.add(pp.getSid());
}
}
if (pp.getPaymentInterest() != null) {
if (pp.getPaymentInterest().compareTo(BigDecimal.ZERO) == 0) {
} else {
set.add(pp.getSid());
}
}
}
}
if (yqlx.size() > 0 && !yqlx.isEmpty()) {
loanRepaymentPlanDetailsService.updateList(yqlx);
List<String> sids = new ArrayList<>(set);
if (!sids.isEmpty() && sids.size() > 0) {
loanRepaymentPlanDetailsService.updatePaymentMoneyBySids(sids);
}
if (histories.size() > 0 && !histories.isEmpty()) {
loanRepaymentHistoryService.saveList(histories);
}
selectList.removeAll(Collections.singleton(null));
if (selectList.size() > 0 && !selectList.isEmpty()) {
ResultBean resultBean = finSelectedReceivablesDetailedFeign.saveAll(selectList);
}
}
//--------------------资方结清款到出纳代付款列表------------------
private void pushBankSettlePrice(LoanSettleApply loanSettleApply) {
private void pushBankSettlePrice(LoanSettleApply loanSettleApply) {
if (StringUtils.isBlank(loanSettleApply.getBusSid())) {
LoanSettleBankCost bankCost = loanSettleBankCostService.selectByMainSid(loanSettleApply.getSid());
if (null != bankCost) {
@ -2223,7 +2223,7 @@ public class LoanSettleApplyService extends MybatisBaseService<LoanSettleApplyMa
} else if (loanSettleBankCost.getTopping() == 0) {
settleApplyAppVo.setTopping("否");
}
if ( null != loanSettleBankCost.getLoanDeposit()){
if (null != loanSettleBankCost.getLoanDeposit()) {
settleApplyAppVo.setLoanDepositBank(loanSettleBankCost.getLoanDeposit().toString());
}
if (null != loanSettleBankCost.getPrice()) {
@ -2407,6 +2407,8 @@ public class LoanSettleApplyService extends MybatisBaseService<LoanSettleApplyMa
baseMapper.updateBus(loanSettleApply.getBusVinSid(), "1");
//推送资方结清款到出纳代付款列表
pushBankSettlePrice(loanSettleApply);
//设置认款月还为已转付
updatePaymentStateByBusVinSid(loanSettleApply.getBusVinSid());
return rb.success();
}
@ -2419,9 +2421,9 @@ public class LoanSettleApplyService extends MybatisBaseService<LoanSettleApplyMa
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date closeDate = loanSettleApply.getCloseDate();
String formatDate = sdf.format(closeDate);
String jMoney = baseMapper.selJrMoneyByBusVinSidAndCloseDate(busVinSid,formatDate);
String jMoney = baseMapper.selJrMoneyByBusVinSidAndCloseDate(busVinSid, formatDate);
jrMoney = new BigDecimal(jMoney);
String dMoney = baseMapper.selDueMoneyByBusVinSidAndCloseDate(busVinSid,formatDate);
String dMoney = baseMapper.selDueMoneyByBusVinSidAndCloseDate(busVinSid, formatDate);
dueMoney = new BigDecimal(dMoney);
sumMoney = jrMoney.add(dueMoney);
LoanSettleCompanyReduction reduction = loanSettleCompanyReductionService.selectByMainSid(loanSettleApply.getSid());
@ -2435,4 +2437,8 @@ public class LoanSettleApplyService extends MybatisBaseService<LoanSettleApplyMa
}
return isSettle;
}
public void updatePaymentStateByBusVinSid(String busVinSid) {
baseMapper.updatePaymentStateByBusVinSid(busVinSid);
}
}

38
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansettlevehicle/LoanSettleVehicleMapper.xml

@ -8,22 +8,26 @@
</select>
<select id="selectPageVo" resultType="com.yxt.anrui.riskcenter.api.loansettlevehicle.LoanSettleVehicleVo">
select lv.sid,
lv.typeStateValue,
lv.useOrgName,
lv.createDept,
lv.loanContractNo,
lv.vinNo,
lv.busVinSid,
lv.vehMark,
lv.loanName,
lv.peroid,
lv.settingDate,
lv.bankSettlePrice,
lv.settleAll,
lv.amountTo,
lv.profit
from loan_settle_vehicle lv
SELECT
lv.sid,
lv.typeStateValue,
lv.useOrgName,
lv.createDept,
lv.loanContractNo,
lv.vinNo,
lv.busVinSid,
lv.vehMark,
lv.loanName,
lv.settingDate,
b.bankSettlePrice,
c.settleAll,
r.amountTo,
r.profit
FROM
loan_settle_apply lv
LEFT JOIN loan_settle_bank_cost as b ON lv.sid = b.mainSid
LEFT JOIN loan_settle_company_cost as c ON lv.sid = c.mainSid
LEFT JOIN loan_settle_company_reduction as r ON lv.sid = r.mainSid
<where>
${ew.sqlSegment}
</where>
@ -38,4 +42,4 @@
order by period desc
limit 1
</select>
</mapper>
</mapper>

1
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansettlevehicle/LoanSettleVehicleService.java

@ -127,6 +127,7 @@ public class LoanSettleVehicleService extends MybatisBaseService<LoanSettleVehic
return p;
}
}
qw.eq("lv.state", 1);
}
IPage<LoanSettleVehicle> page = PagerUtil.queryToPage(pagerQuery);
IPage<LoanSettleVehicleVo> pagging = baseMapper.selectPageVo(page, qw);

2
yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceitemapply/AsServiceItemApplyDetailsVo.java

@ -68,6 +68,7 @@ public class AsServiceItemApplyDetailsVo implements Vo {
private String taskId;
@ApiModelProperty("实例id")
private String instanceId;
private String procInsId;
@ApiModelProperty("创建组织sid分公司")
private String createOrgSid; // 创建组织sid
@ApiModelProperty("使用组织sid分公司")
@ -80,6 +81,7 @@ public class AsServiceItemApplyDetailsVo implements Vo {
private String remarks; // 备注
@ApiModelProperty("附件")
private List<FileUrlQuery> file = new ArrayList<>(); // 附件
private List<String> file2 = new ArrayList<>(); // 附件
@ApiModelProperty("维修项目列表")
private List<SitemsVo> sitemsVos; // 维修项目列表
}

2
yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceitemapply/SitemsVo.java

@ -36,7 +36,9 @@ public class SitemsVo {
private String remarks;
@ApiModelProperty("是否为预约项目,直接返回是否无需转换")
private String isReserve;
private String isReserve2;
@ApiModelProperty("是否为洗车项目,直接返回是否无需转换")
private String isClean;
private String isClean2;
}

8
yxt-as/src/main/java/com/yxt/anrui/as/biz/asserviceitemapply/AsServiceItemApplyRest.java

@ -100,4 +100,12 @@ public class AsServiceItemApplyRest {
AsServiceItemApplyDetailsVo vo = asServiceItemApplyService.applyInit(sids);
return rb.success().setData(vo);
}
@ApiOperation("app详情")
@GetMapping("/fetchDetailsBySid2/{sid}")
public ResultBean<AsServiceItemApplyDetailsVo> fetchDetailsBySid2(@PathVariable("sid") String sid){
ResultBean rb = ResultBean.fireFail();
AsServiceItemApplyDetailsVo vo = asServiceItemApplyService.fetchDetailsVoBySid(sid);
return rb.success().setData(vo);
}
}

14
yxt-as/src/main/java/com/yxt/anrui/as/biz/asserviceitemapply/AsServiceItemApplyService.java

@ -251,16 +251,28 @@ public class AsServiceItemApplyService extends MybatisBaseService<AsServiceItemA
BeanUtil.copyProperties(entity, vo);
if (StringUtils.isNotBlank(entity.getProcInstId())) {
vo.setInstanceId(entity.getProcInstId());
vo.setProcInsId(entity.getProcInstId());
}
vo.setCreateTime(DateUtil.formatDate(entity.getCreateTime()));
List<AsServiceItemApplyRecord> records = asServiceItemApplyRecordService.selByMainSid(sid);
List<SitemsVo> sitemsVos = new ArrayList<>();
List<String> file2 = new ArrayList<>();
if (!records.isEmpty()) {
for (AsServiceItemApplyRecord record : records) {
SitemsVo s = new SitemsVo();
AsServiceItem item = asServiceItemService.fetchBySid(record.getSitemSid());
BeanUtil.copyProperties(item, s, "id", "sid");
s.setSitemSid(item.getSid());
if (item.getIsClean().intValue() == 0) {
s.setIsClean2("否");
} else if (item.getIsClean().intValue() == 1) {
s.setIsClean2("是");
}
if (item.getIsReserve().intValue() == 0) {
s.setIsReserve2("否");
} else if (item.getIsReserve().intValue() == 1) {
s.setIsReserve2("是");
}
sitemsVos.add(s);
}
}
@ -273,9 +285,11 @@ public class AsServiceItemApplyService extends MybatisBaseService<AsServiceItemA
String url = fileUploadComponent.getUrlPrefix() + asAppendix.getFilePath();
fileUrlQuery.setUrl(url);
file.add(fileUrlQuery);
file2.add(url);
}
}
vo.setFile(file);
vo.setFile2(file2);
}
return vo;
}

Loading…
Cancel
Save