Browse Source

Merge remote-tracking branch 'origin/master'

master
yunuo970428 2 months ago
parent
commit
8082ceb50f
  1. 42
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/baseaccadjapply/BaseAccadjApplyService.java
  2. 21
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/baseinternalpurchase/BaseInternalPurchaseService.java
  3. 28
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java
  4. 2
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserMapper.xml
  5. 2
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/OneExcelInfo.java
  6. 2
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/OneExcelVo.java
  7. 2
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/TwoExcelInfo.java
  8. 2
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/TwoExcelVo.java
  9. 2
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateMapper.java
  10. 12
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateMapper.xml
  11. 415
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateService.java
  12. 18
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateRest.java
  13. 397
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateService.java
  14. 2
      yxt-oa/src/main/java/com/yxt/anrui/oa/api/AdOffSpaceApplyRest.java
  15. 2
      yxt-oa/src/main/java/com/yxt/anrui/oa/api/AdPircarpulApplyRest.java
  16. 105
      yxt-oa/src/main/java/com/yxt/anrui/oa/api/AdSalecarpulApplyRest.java
  17. 36
      yxt-oa/src/main/java/com/yxt/anrui/oa/api/AdSalecarpulDetailRest.java
  18. 4
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adexpatriateshomeapply/AdExpatriatesHomeApplyService.java
  19. 6
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adfeteapply/AdFeteApplyDetailsVo.java
  20. 4
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adfeteapply/AdFeteApplyMapper.xml
  21. 6
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adfeteapply/AdFeteApplyService.java
  22. 4
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adfetedetail/AdFeteDetailDto.java
  23. 4
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adfetedetail/AdFeteDetailMapper.xml
  24. 2
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adfetedetail/AdFeteDetailService.java
  25. 4
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adfetedetail/AdFeteDetailVo.java
  26. 3
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adfetedetail/AdFeteListDetailVo.java
  27. 4
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adfrockallotapply/AdFrockallotApplyDetailsVo.java
  28. 2
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adfrockallotapply/AdFrockallotApplyMapper.xml
  29. 11
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adfrockallotapply/AdFrockallotApplyService.java
  30. 4
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adfrockallotdetail/AdFrockallotDetailDto.java
  31. 64
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adfrockallotdetail/AdFrockallotDetailService.java
  32. 4
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adfrockallotdetail/AdFrockallotDetailVo.java
  33. 4
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adfrockallotdetail/AdFrockallotListDetailVo.java
  34. 1
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adgroupdocumentsapply/AdGroupDocumentsApplyMapper.xml
  35. 1
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adgroupsystemapply/AdGroupSystemApplyMapper.xml
  36. 21
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adleasehostapply/AdLeasehostApplyDetailsVo.java
  37. 2
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adleasehostapply/AdLeasehostApplyMapper.xml
  38. 4
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adleasehostapply/AdLeasehostApplyService.java
  39. 6
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adnoexpatriateshostelapply/AdNoexpatriatesHostelApplyDetailsVo.java
  40. 3
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adnoexpatriateshostelapply/AdNoexpatriatesHostelApplyMapper.xml
  41. 4
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adnoexpatriateshostelapply/AdNoexpatriatesHostelApplyService.java
  42. 9
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adoffspaceapply/AdOffspaceApplyDetailsVo.java
  43. 2
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adoffspaceapply/AdOffspaceApplyMapper.xml
  44. 4
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adoffspaceapply/AdOffspaceApplyService.java
  45. 20
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adpircarpulapply/AdPircarpulApplyDetailsVo.java
  46. 5
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adpircarpulapply/AdPircarpulApplyMapper.xml
  47. 4
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adpircarpulapply/AdPircarpulApplyService.java
  48. 6
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adpircarpuldetail/AdPircarpulDetailService.java
  49. 45
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsalecarpulapply/AdSalecarpulApply.java
  50. 49
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsalecarpulapply/AdSalecarpulApplyDetailsVo.java
  51. 52
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsalecarpulapply/AdSalecarpulApplyDto.java
  52. 35
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsalecarpulapply/AdSalecarpulApplyMapper.java
  53. 24
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsalecarpulapply/AdSalecarpulApplyMapper.xml
  54. 307
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsalecarpulapply/AdSalecarpulApplyService.java
  55. 60
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsalecarpulapply/AdSalecarpulApplyVo.java
  56. 56
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsalecarpuldetail/AdSalecarpulDetail.java
  57. 56
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsalecarpuldetail/AdSalecarpulDetailDto.java
  58. 40
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsalecarpuldetail/AdSalecarpulDetailMapper.java
  59. 11
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsalecarpuldetail/AdSalecarpulDetailMapper.xml
  60. 79
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsalecarpuldetail/AdSalecarpulDetailService.java
  61. 58
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsalecarpuldetail/AdSalecarpulDetailVo.java
  62. 56
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsalecarpuldetail/AdSalecarpulListDetailVo.java
  63. 17
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsenpircarpulapply/AdSenpircarpulApply.java
  64. 24
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsenpircarpulapply/AdSenpircarpulApplyDetailsVo.java
  65. 6
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsenpircarpulapply/AdSenpircarpulApplyMapper.xml
  66. 12
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsenpircarpulapply/AdSenpircarpulApplyService.java
  67. 5
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsenpircarpuldetail/AdSenpircarpulDetailDto.java
  68. 21
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsenpircarpuldetail/AdSenpircarpulDetailService.java
  69. 5
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsenpircarpuldetail/AdSenpircarpulDetailVo.java
  70. 5
      yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsenpircarpuldetail/AdSenpircarpulListDetailVo.java
  71. 9
      yxt-oa/src/main/java/com/yxt/anrui/oa/feign/file/OaFileEnum.java
  72. 1
      yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsSalesBillMapper.xml

42
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/baseaccadjapply/BaseAccadjApplyService.java

@ -88,6 +88,7 @@ import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.*;
import java.util.stream.Collectors;
@ -481,21 +482,21 @@ public class BaseAccadjApplyService extends MybatisBaseService<BaseAccadjApplyMa
String confirmSid = "";
String confirmName = "";
String confirmDate = "";
if (baseAccadjApply.getAccadjTypeValue().equals("调入")){
if (baseAccadjApply.getAccadjTypeValue().equals("调入")) {
FlowRecordVo flowRecordVo = flowTaskFeign.businessFlowRecord(bv.getInstanceId()).getData();
List<FlowTask> flowList = flowRecordVo.getFlowList();
for (FlowTask flowTask : flowList) {
if (flowTask.getTaskName().equals("发起方分公司会计主管审批")){
if (flowTask.getTaskName().equals("发起方分公司会计主管审批")) {
confirmSid = flowTask.getTaskUserInfos().get(0).getAssigneeSid();
confirmName = flowTask.getTaskUserInfos().get(0).getAssigneeName();
confirmDate = DateUtil.formatDate(flowTask.getFinishTime());
}
}
}else if (baseAccadjApply.getAccadjTypeValue().equals("调出")){
} else if (baseAccadjApply.getAccadjTypeValue().equals("调出")) {
FlowRecordVo flowRecordVo = flowTaskFeign.businessFlowRecord(bv.getInstanceId()).getData();
List<FlowTask> flowList = flowRecordVo.getFlowList();
for (FlowTask flowTask : flowList) {
if (flowTask.getTaskName().equals("应对方分公司会计主管审批")){
if (flowTask.getTaskName().equals("应对方分公司会计主管审批")) {
confirmSid = flowTask.getTaskUserInfos().get(0).getAssigneeSid();
confirmName = flowTask.getTaskUserInfos().get(0).getAssigneeName();
confirmDate = DateUtil.formatDate(flowTask.getFinishTime());
@ -1050,24 +1051,10 @@ public class BaseAccadjApplyService extends MybatisBaseService<BaseAccadjApplyMa
return rb.setMsg("参数错误:userSid");
}
BaseAccadjApply baseAccadjApply = fetchBySid(query.getBusinessSid());
List<String> purchaseSids = baseAccadjApplyeVehService.fetchByMainSid(baseAccadjApply.getSid());
if (query.getUserSid().equals(baseAccadjApply.getCreateBySid())) {
FlowTaskVo flowTaskVo = new FlowTaskVo();
BeanUtil.copyProperties(query, flowTaskVo);
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.breakProcess(flowTaskVo);
if (!resultBean.getSuccess()) {
return rb.setMsg(resultBean.getMsg());
}
Map<String, Object> map = BeanUtil.beanToMap(resultBean.getData());
updateFlowFiled(map);
for (String purchaseSid : purchaseSids) {
baseInternalPurchaseVehicleService.updateIsAccadj(purchaseSid, "0");
}
return rb.success().setData(resultBean.getData());
}
String businessTaskId = baseAccadjApply.getTaskId();
List<String> purchaseSids = baseAccadjApplyeVehService.fetchByMainSid(baseAccadjApply.getSid());
if (StringUtils.isNotBlank(businessTaskId)) {
if (businessTaskId.equals(query.getTaskId())) {
if (query.getUserSid().equals(baseAccadjApply.getCreateBySid())) {
FlowTaskVo flowTaskVo = new FlowTaskVo();
BeanUtil.copyProperties(query, flowTaskVo);
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.breakProcess(flowTaskVo);
@ -1080,6 +1067,21 @@ public class BaseAccadjApplyService extends MybatisBaseService<BaseAccadjApplyMa
baseInternalPurchaseVehicleService.updateIsAccadj(purchaseSid, "0");
}
return rb.success().setData(resultBean.getData());
} else {
if (businessTaskId.equals(query.getTaskId())) {
FlowTaskVo flowTaskVo = new FlowTaskVo();
BeanUtil.copyProperties(query, flowTaskVo);
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.breakProcess(flowTaskVo);
if (!resultBean.getSuccess()) {
return rb.setMsg(resultBean.getMsg());
}
Map<String, Object> map = BeanUtil.beanToMap(resultBean.getData());
updateFlowFiled(map);
for (String purchaseSid : purchaseSids) {
baseInternalPurchaseVehicleService.updateIsAccadj(purchaseSid, "0");
}
return rb.success().setData(resultBean.getData());
}
}
}
return rb.setMsg("操作失败!提交的数据不一致!");

21
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/baseinternalpurchase/BaseInternalPurchaseService.java

@ -940,7 +940,7 @@ public class BaseInternalPurchaseService extends MybatisBaseService<BaseInternal
BaseInternalPurchase baseInternalPurchase = fetchBySid(query.getBusinessSid());
String businessTaskId = baseInternalPurchase.getTaskId();
if (StringUtils.isNotBlank(businessTaskId)) {
if (businessTaskId.equals(query.getTaskId())) {
if (query.getUserSid().equals(baseInternalPurchase.getCreateBySid())) {
FlowTaskVo flowTaskVo = new FlowTaskVo();
BeanUtil.copyProperties(query, flowTaskVo);
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.breakProcess(flowTaskVo);
@ -957,6 +957,25 @@ public class BaseInternalPurchaseService extends MybatisBaseService<BaseInternal
baseVehicleService.updateVeh(baseVehicle);
}
return rb.success().setData(resultBean.getData());
} else {
if (businessTaskId.equals(query.getTaskId())) {
FlowTaskVo flowTaskVo = new FlowTaskVo();
BeanUtil.copyProperties(query, flowTaskVo);
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.breakProcess(flowTaskVo);
if (!resultBean.getSuccess()) {
return rb.setMsg(resultBean.getMsg());
}
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData()));
List<BaseInternalPurchaseVehicleVo> baseInternalPurchaseVehicleVos = baseInternalPurchaseVehicleService.fetchByMainSid(query.getBusinessSid());
for (BaseInternalPurchaseVehicleVo baseInternalPurchaseVehicleVo : baseInternalPurchaseVehicleVos) {
BaseVehicle baseVehicle = baseVehicleService.selVehicleByVinNoAndOrgSid(baseInternalPurchaseVehicleVo.getVinNo(), baseInternalPurchase.getCreateOrgSid());
baseVehicle.setVinNo(baseInternalPurchaseVehicleVo.getVinNo());
baseVehicle.setVehicleState(VehicleState.StockEnum.STOCK.getCode());
baseVehicle.setVehicleStateValue(VehicleState.StockEnum.STOCK.getRemarks());
baseVehicleService.updateVeh(baseVehicle);
}
return rb.success().setData(resultBean.getData());
}
}
}
return rb.setMsg("操作失败!提交的数据不一致!");

28
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java

@ -52,14 +52,19 @@ 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.crm.api.crmcustomertemp.*;
import com.yxt.anrui.crm.api.crmcustomertemp.AppCrmCustomerTempDto;
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempFeign;
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempVo;
import com.yxt.anrui.crm.api.crmcustomertemp.CustomerQuery;
import com.yxt.anrui.fin.api.fincollectionconfirmation.*;
import com.yxt.anrui.fin.api.fincollectionconfirmation.app.AppBusArrearsCarryMoneyVo;
import com.yxt.anrui.fin.api.fincollectionconfirmation.app.FinConfirmDto;
import com.yxt.anrui.fin.api.fincollectionconfirmation.as.*;
import com.yxt.anrui.fin.api.fincollectionconfirmation.rsk.*;
import com.yxt.anrui.fin.api.finpaymentrecord.FinPaymentrecordDto;
import com.yxt.anrui.fin.api.finselectedreceivablesdetailed.*;
import com.yxt.anrui.fin.api.finselectedreceivablesdetailed.AppFinSelectedReceivablesDetailedDto;
import com.yxt.anrui.fin.api.finselectedreceivablesdetailed.FinSelectedReceivablesDetailed;
import com.yxt.anrui.fin.api.finselectedreceivablesdetailed.FinSelectedReceivablesDetailedDto;
import com.yxt.anrui.fin.api.finselectedreceivablesdetailed.FinSelectedReceivablesDetailedVo;
import com.yxt.anrui.fin.api.finuncollectedreceivablesdetailed.AppFinUncollectedReceivablesDetailedVo;
import com.yxt.anrui.fin.api.finuncollectedreceivablesdetailed.FinUncollectedReceivablesDetailed;
import com.yxt.anrui.fin.api.finuncollectedreceivablesdetailedjr.FinUncollectedReceivablesDetailedJR;
@ -96,9 +101,6 @@ import com.yxt.anrui.riskcenter.api.loanfinbank.LoanFinBank;
import com.yxt.anrui.riskcenter.api.loanfinbank.LoanFinBankFeign;
import com.yxt.anrui.riskcenter.api.loanfinotherPolicy.LoanFinOtherPolicy;
import com.yxt.anrui.riskcenter.api.loanfinpolicy.LoanFinPolicy;
import com.yxt.anrui.riskcenter.api.loanfinpolicy.LoanFinPolicyFeign;
import com.yxt.anrui.riskcenter.api.loanfinpolicy.LoanFinPolicyVo;
import com.yxt.anrui.riskcenter.api.loanmonthlyaccrualrecord.LoanMonthlyAccrualRecord;
import com.yxt.anrui.riskcenter.api.loanpushfundhistory.LoanPushFundHistory;
import com.yxt.anrui.riskcenter.api.loanpushfundhistory.LoanPushFundHistoryFeign;
import com.yxt.anrui.riskcenter.api.loanrepaymenthistory.LoanRepaymentHistory;
@ -106,15 +108,11 @@ import com.yxt.anrui.riskcenter.api.loanrepaymenthistory.LoanRepaymentHistoryFei
import com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.LoanPlanDetailsVoForFundVoucher;
import com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.LoanRepaymentPlanDetails;
import com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.LoanRepaymentPlanDetailsFeign;
import com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.LoanRepaymentPlanDetailsForOverDue;
import com.yxt.anrui.riskcenter.api.loanrepaymentschedule.LoanRepaymentSchedule;
import com.yxt.anrui.riskcenter.api.loanrepaymentschedule.LoanRepaymentScheduleFeign;
import com.yxt.anrui.riskcenter.api.loansettleapply.LoanSettleApply;
import com.yxt.anrui.riskcenter.api.loansettleapply.LoanSettleApplyFeign;
import com.yxt.anrui.riskcenter.api.loansettleapply.SettleFinVo;
import com.yxt.anrui.riskcenter.api.loansettlebankcost.LoanSettleBankCost;
import com.yxt.anrui.riskcenter.api.loansolutions.LoanSolutions;
import com.yxt.anrui.riskcenter.api.loansolutions.LoanSolutionsFeign;
import com.yxt.anrui.riskcenter.api.loansolutionsdetail.LoanSolutionsDetail;
import com.yxt.anrui.riskcenter.api.loansolutionsotherpolicy.LoanSolutionsOtherpolicy;
import com.yxt.anrui.scm.api.scmvehrebate.ScmVehRebateDto;
@ -123,7 +121,10 @@ import com.yxt.anrui.scm.api.scmvehrebate.ScmVehRebateVehDto;
import com.yxt.common.base.config.component.DocPdfComponent;
import com.yxt.common.base.config.component.FileUploadComponent;
import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.*;
import com.yxt.common.base.utils.HanZiConverterPinYin;
import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.base.utils.WordConvertUtils;
import com.yxt.common.base.utils.WordUtils;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
@ -5833,6 +5834,11 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl
if (finSelectedReceivablesDetailedDtos.isEmpty()) {
return rb.setMsg("请添加认款信息");
}
for (AppFinSelectedReceivablesDetailedRskDto s : finSelectedReceivablesDetailedDtos) {
if (s.getConfirmMoney() == null) {
return rb.setMsg("款项明细中认款金额不能为空");
}
}
//认款金额相加
BigDecimal subscriptionMoneyAll = finSelectedReceivablesDetailedDtos.stream().map(AppFinSelectedReceivablesDetailedRskDto::getConfirmMoney).reduce(BigDecimal.ZERO, BigDecimal::add);
//判断收款金额与所选的总认款金额是否相等

2
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserMapper.xml

@ -481,10 +481,12 @@
#{deptSid},
'%'
)
<if test="name != null and name != ''">
AND st.name LIKE CONCAT(
'%',
#{name},
'%'
)
</if>
</select>
</mapper>

2
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/OneExcelInfo.java

@ -43,6 +43,8 @@ public class OneExcelInfo {
private String onceSuppRemark;
//调整说明
private String adjustmentRemarks;
//备注
private String remarks;
//是否调整
private String isAdjustment;
//调整金额

2
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/OneExcelVo.java

@ -43,4 +43,6 @@ public class OneExcelVo {
private String onceSuppRemark;
@ExportEntityMap(CnName = "调整说明", EnName = "adjustmentRemarks")
private String adjustmentRemarks;
@ExportEntityMap(CnName = "备注", EnName = "remarks")
private String remarks;
}

2
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/TwoExcelInfo.java

@ -48,6 +48,8 @@ public class TwoExcelInfo {
private String secondSuppRemark;
//调整说明
private String adjustmentRemarks;
//备注
private String remarks;
//是否调整
private String isAdjustment;
//调整金额

2
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/TwoExcelVo.java

@ -49,4 +49,6 @@ public class TwoExcelVo {
private String secondSuppRemark;
@ExportEntityMap(CnName = "调整说明", EnName = "adjustmentRemarks")
private String adjustmentRemarks;
@ExportEntityMap(CnName = "备注", EnName = "remarks")
private String remarks;
}

2
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateMapper.java

@ -66,8 +66,6 @@ public interface ScmSpecialRebateMapper extends BaseMapper<ScmSpecialRebate> {
IPage<ScmStayDisRebateVo> stayDisRebate(IPage<ScmSpecialRebate> page, @Param(Constants.WRAPPER) QueryWrapper<ScmSpecialRebate> qw);
ScmSpecialRebateVo selectExcelInfo(@Param("createOrgSid") String createOrgSid, @Param("rebateTypeValue") String rebateTypeValue, @Param("rebateName") String rebateName, @Param("estimateRebate") String estimateRebate, @Param("palceGenDate") String palceGenDate, @Param("purchaseSystemName") String purchaseSystemName, @Param("brandName") String brandName);
ScmSpecialRebateVo selectExcel(@Param("createOrgSid") String createOrgSid, @Param("rebateTypeValue") String rebateTypeValue, @Param("rebateName") String rebateName, @Param("estimateRebate") String estimateRebate, @Param("palceGenDate") String palceGenDate, @Param("purchaseSystemName") String purchaseSystemName, @Param("brandName") String brandName, @Param("remarks") String remarks);
void updateOneExcelInfo(@Param("uploadDate") String uploadDate, @Param("uploadMoney") String uploadMoney, @Param("stayDetermineMoney") String stayDetermineMoney, @Param("onceItureCost") String onceItureCost, @Param("onceTreatCost") String onceTreatCost, @Param("onceSuppCost") String onceSuppCost, @Param("onceSuppRemark") String onceSuppRemark, @Param("adjustmentRemarks") String adjustmentRemarks, @Param("isAdjustment") String isAdjustment, @Param("adjustmentMoney") String adjustmentMoney, @Param("diffAmount") String diffAmount, @Param("sid") String sid);

12
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateMapper.xml

@ -65,18 +65,6 @@
</where>
</select>
<select id="selectExcelInfo" resultType="com.yxt.anrui.scm.api.scmspecialrebate.ScmSpecialRebateVo">
SELECT *
FROM scm_special_rebate
WHERE createOrgSid = #{createOrgSid}
AND rebateName = #{rebateName}
AND rebateTypeValue = #{rebateTypeValue}
AND estimateRebate = #{estimateRebate}
AND palceGenDate = #{palceGenDate}
AND purchaseSystemName = #{purchaseSystemName}
AND brandName = #{brandName}
</select>
<select id="selectExcel" resultType="com.yxt.anrui.scm.api.scmspecialrebate.ScmSpecialRebateVo">
SELECT *
FROM scm_special_rebate

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

@ -155,11 +155,12 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
qw.eq("palceGenDate", query.getPalceGenDate());
}
if (StringUtils.isNotBlank(query.getWithholdingDate())) {
String withholdingDate = query.getWithholdingDate().replace("-", "年") + "月";
String[] w = query.getWithholdingDate().split("-");
String withholdingDate = w[0] + "年" + Integer.parseInt(w[1]) + "月";
qw.eq("withholdingDate", withholdingDate);
}
if (StringUtils.isNotBlank(query.getUploadState())) {
if (query.getUploadState().equals("未上传")) {
if (query.getUploadState().equals("0")) {
qw.and(wrapper -> wrapper.eq("uploadDate", "")
.or().isNull("uploadDate")
);
@ -172,17 +173,17 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
qw.eq("isAdjustment", query.getIsAdjustment());
}
if (StringUtils.isNotBlank(query.getIsUploadFinish())) {
if (query.getIsUploadFinish().equals("")) {
qw.eq("estimateRebate - uploadMoney - secondaryUploadMoney + adjustmentMoney", 0);
if (query.getIsUploadFinish().equals("1")) {
qw.eq("estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0)", 0);
} else {
qw.ne("estimateRebate - uploadMoney - secondaryUploadMoney + adjustmentMoney", 0);
qw.ne("estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0)", 0);
}
}
if (StringUtils.isNotBlank(query.getOnceCheckState())) {
qw.eq("onceCheckState", query.getOnceCheckState());
}
if (StringUtils.isNotBlank(query.getSecondUploadState())) {
if (query.getSecondUploadState().equals("")) {
if (query.getSecondUploadState().equals("1")) {
qw.isNotNull("secondaryUploadMoney");
qw.ne("secondaryUploadMoney", "");
qw.ne("secondaryUploadMoney", 0);
@ -191,6 +192,11 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
qw.and(wrapper -> wrapper.eq("isAdjustment", '否').or().isNull("secondaryUploadMoney").or().eq("secondaryUploadMoney", ""));
}
}
String createStartTime = query.getCreateStartTime();
String createEndTime = query.getCreateEndTime();
qw.apply(StringUtils.isNotBlank(createStartTime), "date_format (createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(createEndTime), "date_format (createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
);
String uploadStartDate = query.getUploadStartDate();
String uploadEndDate = query.getUploadEndDate();
qw.apply(StringUtils.isNotBlank(uploadStartDate), "date_format (uploadDate,'%Y-%m-%d') >= date_format('" + uploadStartDate + "','%Y-%m-%d')").
@ -199,17 +205,12 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
apply(StringUtils.isNotBlank(uploadStartDate), "date_format (secondaryUploadDate,'%Y-%m-%d') >= date_format('" + uploadStartDate + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(uploadEndDate), "date_format (secondaryUploadDate,'%Y-%m-%d') <= date_format('" + uploadEndDate + "','%Y-%m-%d')"
);
String createStartTime = query.getCreateStartTime();
String createEndTime = query.getCreateEndTime();
qw.apply(StringUtils.isNotBlank(createStartTime), "date_format (createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(createEndTime), "date_format (createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
);
qw.orderByDesc("createTime");
IPage<ScmSpecialRebate> page = PagerUtil.queryToPage(pq);
IPage<ScmSpecialRebateVo> pagging = baseMapper.selectPageVo(page, qw);
for (ScmSpecialRebateVo record : pagging.getRecords()) {
if (StringUtils.isNotBlank(record.getSecondaryUploadMoney())) {
if (Integer.parseInt(record.getSecondaryUploadMoney()) > 0 && "是".equals(record.getIsAdjustment())) {
if (new BigDecimal(record.getSecondaryUploadMoney()).compareTo(BigDecimal.ZERO) == 1 && "是".equals(record.getIsAdjustment())) {
record.setSecondCheckState("是");
} else {
record.setSecondCheckState("否");
@ -282,11 +283,60 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
if (StringUtils.isNotBlank(query.getState())) {
qw.eq("state", query.getState());
}
if (StringUtils.isNotBlank(query.getPalceGenDate())) {
qw.eq("palceGenDate", query.getPalceGenDate());
}
if (StringUtils.isNotBlank(query.getWithholdingDate())) {
String[] w = query.getWithholdingDate().split("-");
String withholdingDate = w[0] + "年" + Integer.parseInt(w[1]) + "月";
qw.eq("withholdingDate", withholdingDate);
}
if (StringUtils.isNotBlank(query.getUploadState())) {
if (query.getUploadState().equals("0")) {
qw.and(wrapper -> wrapper.eq("uploadDate", "")
.or().isNull("uploadDate")
);
} else {
qw.ne("uploadDate", "");
qw.isNotNull("uploadDate");
}
}
if (StringUtils.isNotBlank(query.getIsAdjustment())) {
qw.eq("isAdjustment", query.getIsAdjustment());
}
if (StringUtils.isNotBlank(query.getIsUploadFinish())) {
if (query.getIsUploadFinish().equals("1")) {
qw.eq("estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0)", 0);
} else {
qw.ne("estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0)", 0);
}
}
if (StringUtils.isNotBlank(query.getOnceCheckState())) {
qw.eq("onceCheckState", query.getOnceCheckState());
}
if (StringUtils.isNotBlank(query.getSecondUploadState())) {
if (query.getSecondUploadState().equals("1")) {
qw.isNotNull("secondaryUploadMoney");
qw.ne("secondaryUploadMoney", "");
qw.ne("secondaryUploadMoney", 0);
qw.eq("isAdjustment", "是");
} else {
qw.and(wrapper -> wrapper.eq("isAdjustment", '否').or().isNull("secondaryUploadMoney").or().eq("secondaryUploadMoney", ""));
}
}
String createStartTime = query.getCreateStartTime();
String createEndTime = query.getCreateEndTime();
qw.apply(StringUtils.isNotBlank(createStartTime), "date_format (createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(createEndTime), "date_format (createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
);
String uploadStartDate = query.getUploadStartDate();
String uploadEndDate = query.getUploadEndDate();
qw.apply(StringUtils.isNotBlank(uploadStartDate), "date_format (uploadDate,'%Y-%m-%d') >= date_format('" + uploadStartDate + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(uploadEndDate), "date_format (uploadDate,'%Y-%m-%d') <= date_format('" + uploadEndDate + "','%Y-%m-%d')").
or().
apply(StringUtils.isNotBlank(uploadStartDate), "date_format (secondaryUploadDate,'%Y-%m-%d') >= date_format('" + uploadStartDate + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(uploadEndDate), "date_format (secondaryUploadDate,'%Y-%m-%d') <= date_format('" + uploadEndDate + "','%Y-%m-%d')"
);
qw.orderByDesc("createTime");
List<ScmSpecialRebateVo> scmSpecialRebateVoList = baseMapper.listAll(qw);
return scmSpecialRebateVoList;
@ -438,18 +488,19 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
if (StringUtils.isNotBlank(query.getRebateName())) {
qw.like("rebateName", query.getRebateName());
}
if (StringUtils.isNotBlank(query.getOnceCheckState())) {
qw.eq("onceCheckState", query.getOnceCheckState());
if (StringUtils.isNotBlank(query.getState())) {
qw.eq("state", query.getState());
}
if (StringUtils.isNotBlank(query.getPalceGenDate())) {
qw.eq("palceGenDate", query.getPalceGenDate());
}
if (StringUtils.isNotBlank(query.getWithholdingDate())) {
String withholdingDate = query.getWithholdingDate().replace("-", "年") + "月";
String[] w = query.getWithholdingDate().split("-");
String withholdingDate = w[0] + "年" + Integer.parseInt(w[1]) + "月";
qw.eq("withholdingDate", withholdingDate);
}
if (StringUtils.isNotBlank(query.getUploadState())) {
if (query.getUploadState().equals("未上传")) {
if (query.getUploadState().equals("0")) {
qw.and(wrapper -> wrapper.eq("uploadDate", "")
.or().isNull("uploadDate")
);
@ -462,17 +513,17 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
qw.eq("isAdjustment", query.getIsAdjustment());
}
if (StringUtils.isNotBlank(query.getIsUploadFinish())) {
if (query.getIsUploadFinish().equals("")) {
qw.eq("estimateRebate - uploadMoney - secondaryUploadMoney + adjustmentMoney", 0);
if (query.getIsUploadFinish().equals("1")) {
qw.eq("estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0)", 0);
} else {
qw.ne("estimateRebate - uploadMoney - secondaryUploadMoney + adjustmentMoney", 0);
qw.ne("estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0)", 0);
}
}
if (StringUtils.isNotBlank(query.getOnceCheckState())) {
qw.eq("onceCheckState", query.getOnceCheckState());
}
if (StringUtils.isNotBlank(query.getSecondUploadState())) {
if (query.getSecondUploadState().equals("")) {
if (query.getSecondUploadState().equals("1")) {
qw.isNotNull("secondaryUploadMoney");
qw.ne("secondaryUploadMoney", "");
qw.ne("secondaryUploadMoney", 0);
@ -481,6 +532,11 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
qw.and(wrapper -> wrapper.eq("isAdjustment", '否').or().isNull("secondaryUploadMoney").or().eq("secondaryUploadMoney", ""));
}
}
String createStartTime = query.getCreateStartTime();
String createEndTime = query.getCreateEndTime();
qw.apply(StringUtils.isNotBlank(createStartTime), "date_format (createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(createEndTime), "date_format (createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
);
String uploadStartDate = query.getUploadStartDate();
String uploadEndDate = query.getUploadEndDate();
qw.apply(StringUtils.isNotBlank(uploadStartDate), "date_format (uploadDate,'%Y-%m-%d') >= date_format('" + uploadStartDate + "','%Y-%m-%d')").
@ -489,11 +545,6 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
apply(StringUtils.isNotBlank(uploadStartDate), "date_format (secondaryUploadDate,'%Y-%m-%d') >= date_format('" + uploadStartDate + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(uploadEndDate), "date_format (secondaryUploadDate,'%Y-%m-%d') <= date_format('" + uploadEndDate + "','%Y-%m-%d')"
);
String createStartTime = query.getCreateStartTime();
String createEndTime = query.getCreateEndTime();
qw.apply(StringUtils.isNotBlank(createStartTime), "date_format (createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(createEndTime), "date_format (createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
);
qw.orderByDesc("createTime");
IPage<ScmSpecialRebate> page = PagerUtil.queryToPage(pq);
IPage<ScmSpecialRebateVo> pagging = baseMapper.selectPageVo(page, qw);
@ -504,6 +555,15 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
} else {//上传状态:已上传
record.setUploadState("1");
}
if (StringUtils.isNotBlank(record.getSecondaryUploadMoney())) {
if (new BigDecimal(record.getSecondaryUploadMoney()).compareTo(BigDecimal.ZERO) == 1 && "是".equals(record.getIsAdjustment())) {
record.setSecondCheckState("是");
} else {
record.setSecondCheckState("否");
}
} else {
record.setSecondCheckState("否");
}
}
PagerVo<ScmSpecialRebateVo> p = PagerUtil.pageToVo(pagging, null);
return p;
@ -568,18 +628,19 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
if (StringUtils.isNotBlank(query.getRebateName())) {
qw.like("rebateName", query.getRebateName());
}
if (StringUtils.isNotBlank(query.getOnceCheckState())) {
qw.eq("onceCheckState", query.getOnceCheckState());
if (StringUtils.isNotBlank(query.getState())) {
qw.eq("state", query.getState());
}
if (StringUtils.isNotBlank(query.getPalceGenDate())) {
qw.eq("palceGenDate", query.getPalceGenDate());
}
if (StringUtils.isNotBlank(query.getWithholdingDate())) {
String withholdingDate = query.getWithholdingDate().replace("-", "年") + "月";
String[] w = query.getWithholdingDate().split("-");
String withholdingDate = w[0] + "年" + Integer.parseInt(w[1]) + "月";
qw.eq("withholdingDate", withholdingDate);
}
if (StringUtils.isNotBlank(query.getUploadState())) {
if (query.getUploadState().equals("未上传")) {
if (query.getUploadState().equals("0")) {
qw.and(wrapper -> wrapper.eq("uploadDate", "")
.or().isNull("uploadDate")
);
@ -592,25 +653,30 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
qw.eq("isAdjustment", query.getIsAdjustment());
}
if (StringUtils.isNotBlank(query.getIsUploadFinish())) {
if (query.getIsUploadFinish().equals("")) {
qw.eq("estimateRebate - uploadMoney - secondaryUploadMoney + adjustmentMoney", 0);
if (query.getIsUploadFinish().equals("1")) {
qw.eq("estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0)", 0);
} else {
qw.ne("estimateRebate - uploadMoney - secondaryUploadMoney + adjustmentMoney", 0);
qw.ne("estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0)", 0);
}
}
if (StringUtils.isNotBlank(query.getOnceCheckState())) {
qw.eq("onceCheckState", query.getOnceCheckState());
}
if (StringUtils.isNotBlank(query.getSecondUploadState())) {
if (query.getSecondUploadState().equals("")) {
if (query.getSecondUploadState().equals("1")) {
qw.isNotNull("secondaryUploadMoney");
qw.ne("secondaryUploadMoney", "");
qw.ne("secondaryUploadMoney", 0);
qw.eq("isAdjustment", "是");
} else {
qw.and(wrapper -> wrapper.eq("isAdjustment", '否').or().isNull("secondaryUploadMoney").or().eq("secondaryUploadMoney", ""));
qw.and(wrapper -> wrapper.eq("isAdjustment", '否').or().isNull("secondaryUploadMoney").or().eq("secondaryUploadMoney", "").or().eq("secondaryUploadMoney", 0));
}
}
String createStartTime = query.getCreateStartTime();
String createEndTime = query.getCreateEndTime();
qw.apply(StringUtils.isNotBlank(createStartTime), "date_format (createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(createEndTime), "date_format (createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
);
String uploadStartDate = query.getUploadStartDate();
String uploadEndDate = query.getUploadEndDate();
qw.apply(StringUtils.isNotBlank(uploadStartDate), "date_format (uploadDate,'%Y-%m-%d') >= date_format('" + uploadStartDate + "','%Y-%m-%d')").
@ -619,11 +685,6 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
apply(StringUtils.isNotBlank(uploadStartDate), "date_format (secondaryUploadDate,'%Y-%m-%d') >= date_format('" + uploadStartDate + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(uploadEndDate), "date_format (secondaryUploadDate,'%Y-%m-%d') <= date_format('" + uploadEndDate + "','%Y-%m-%d')"
);
String createStartTime = query.getCreateStartTime();
String createEndTime = query.getCreateEndTime();
qw.apply(StringUtils.isNotBlank(createStartTime), "date_format (createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(createEndTime), "date_format (createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
);
qw.orderByDesc("createTime");
List<ScmSpecialRebateVo> scmSpecialRebateVoList = baseMapper.checkApplyGetSpecialRebateAll(qw);
for (ScmSpecialRebateVo record : scmSpecialRebateVoList) {
@ -634,7 +695,7 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
record.setUploadState("1");
}
if (StringUtils.isNotBlank(record.getSecondaryUploadMoney())) {
if (Integer.parseInt(record.getSecondaryUploadMoney()) > 0 && "是".equals(record.getIsAdjustment())) {
if (new BigDecimal(record.getSecondaryUploadMoney()).compareTo(BigDecimal.ZERO) == 1 && "是".equals(record.getIsAdjustment())) {
record.setSecondCheckState("是");
} else {
record.setSecondCheckState("否");
@ -650,23 +711,6 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
ScmSpecialRebateQuery query = pq.getParams();
QueryWrapper<ScmSpecialRebate> qw = new QueryWrapper<>();
qw.eq("createOrgSid", query.getCreateOrgSid());
if (StringUtils.isNotBlank(query.getBrandName())) {
qw.like("brandName", query.getBrandName());
}
if (StringUtils.isNotBlank(query.getPurchaseSystemName())) {
qw.like("purchaseSystemName", query.getPurchaseSystemName());
}
if (StringUtils.isNotBlank(query.getRebateTypeKey())) {
qw.eq("rebateTypeKey", query.getRebateTypeKey());
}
if (StringUtils.isNotBlank(query.getRebateName())) {
qw.like("rebateName", query.getRebateName());
}
String createStartTime = query.getCreateStartTime();
String createEndTime = query.getCreateEndTime();
qw.apply(StringUtils.isNotBlank(createStartTime), "date_format (createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(createEndTime), "date_format (createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
);
qw.eq("adjustmentState", 0);
qw.eq("state", 2);
if (query.getSidList().size() > 0) {
@ -1098,7 +1142,7 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
return rb.fail().setMsg("上传文件不正确");
}
int[] resultCell = new int[]{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
int[] resultCell = new int[]{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
boolean isExcel2003 = true;
if (fileName.matches("^.+\\.(?i)(xlsx)$")) {
isExcel2003 = false;
@ -1118,15 +1162,17 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
} else {
List<OneExcelInfo> infos = importReturn.getInfos();
for (OneExcelInfo info : infos) {
ScmSpecialRebateVo scmSpecialRebateVo = baseMapper.selectExcelInfo(createOrgSid, info.getRebateTypeValue(), info.getRebateName(), info.getEstimateRebate(), info.getPalceGenDate(), info.getPurchaseSystemName(), info.getBrandName());
String uploadDate = "";
if (isNumber(info.getUploadDate())) {
Date javaDate = new Date((long) ((Double.valueOf(info.getUploadDate()) - 25569) * 86400 * 1000));
uploadDate = DateUtil.formatDate(javaDate);
} else {
uploadDate = info.getUploadDate();
if (StringUtils.isNotBlank(info.getUploadDate()) && StringUtils.isNotBlank(info.getUploadMoney())) {
ScmSpecialRebateVo scmSpecialRebateVo = baseMapper.selectExcel(createOrgSid, info.getRebateTypeValue(), info.getRebateName(), info.getEstimateRebate(), info.getPalceGenDate(), info.getPurchaseSystemName(), info.getBrandName(), info.getRemarks());
String uploadDate = "";
if (isNumber(info.getUploadDate())) {
Date javaDate = new Date((long) ((Double.valueOf(info.getUploadDate()) - 25569) * 86400 * 1000));
uploadDate = DateUtil.formatDate(javaDate);
} else {
uploadDate = info.getUploadDate();
}
baseMapper.updateOneExcelInfo(uploadDate, info.getUploadMoney(), info.getStayDetermineMoney(), info.getOnceItureCost(), info.getOnceTreatCost(), info.getOnceSuppCost(), info.getOnceSuppRemark(), info.getAdjustmentRemarks(), info.getIsAdjustment(), info.getAdjustmentMoney(), info.getDiffAmount(), scmSpecialRebateVo.getSid());
}
baseMapper.updateOneExcelInfo(uploadDate, info.getUploadMoney(), info.getStayDetermineMoney(), info.getOnceItureCost(), info.getOnceTreatCost(), info.getOnceSuppCost(), info.getOnceSuppRemark(), info.getAdjustmentRemarks(), info.getIsAdjustment(), info.getAdjustmentMoney(), info.getDiffAmount(), scmSpecialRebateVo.getSid());
}
return rb.success().setMsg("成功导入数据,请点击确定按钮");
}
@ -1143,8 +1189,8 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
}
OneExcelInfo importVo = new OneExcelInfo();
int physicalNumberOfCells = row.getPhysicalNumberOfCells();
if (physicalNumberOfCells < 8) {
physicalNumberOfCells = 8;
if (physicalNumberOfCells < 17) {
physicalNumberOfCells = 17;
}
for (int i = 0; i < physicalNumberOfCells; i++) {
String trim = new String();
@ -1205,6 +1251,9 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
case 15:
importVo.setAdjustmentRemarks(temp);
break;
case 16:
importVo.setRemarks(temp);
break;
default:
break;
}
@ -1264,6 +1313,9 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
case 15:
word = "调整说明";
break;
case 16:
word = "备注";
break;
default:
break;
}
@ -1275,7 +1327,7 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
}
if (!importVoList.isEmpty()) {
for (OneExcelInfo excelInfo : importVoList) {
ScmSpecialRebateVo scmSpecialRebateVo = baseMapper.selectExcelInfo(createOrgSid, excelInfo.getRebateTypeValue(), excelInfo.getRebateName(), excelInfo.getEstimateRebate(), excelInfo.getPalceGenDate(), excelInfo.getPurchaseSystemName(), excelInfo.getBrandName());
ScmSpecialRebateVo scmSpecialRebateVo = baseMapper.selectExcel(createOrgSid, excelInfo.getRebateTypeValue(), excelInfo.getRebateName(), excelInfo.getEstimateRebate(), excelInfo.getPalceGenDate(), excelInfo.getPurchaseSystemName(), excelInfo.getBrandName(), excelInfo.getRemarks());
if (scmSpecialRebateVo == null || StringUtils.isBlank(scmSpecialRebateVo.getSid())) {
checkWord.add("返利名称" + excelInfo.getRebateName() + "导入的返利信息不存在");
break;
@ -1321,13 +1373,6 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
checkWord.add("返利类型不能为空");
break;
}
if (StringUtils.isNotBlank(excelInfo.getRebateTypeValue())) {
String dictKey = dictCommonFeign.selectByValue(excelInfo.getRebateTypeValue()).getData();
if (StringUtils.isBlank(dictKey)) {
checkWord.add("返利名称" + excelInfo.getRebateName() + "导入的返利类型填写不正确");
break;
}
}
if (StringUtils.isBlank(excelInfo.getEstimateRebate())) {
checkWord.add("预提返利不能为空");
break;
@ -1558,7 +1603,7 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
return rb.fail().setMsg("上传文件不正确");
}
int[] resultCell = new int[]{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18};
int[] resultCell = new int[]{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19};
boolean isExcel2003 = true;
if (fileName.matches("^.+\\.(?i)(xlsx)$")) {
isExcel2003 = false;
@ -1578,15 +1623,17 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
} else {
List<TwoExcelInfo> infos = importReturn.getInfos();
for (TwoExcelInfo info : infos) {
ScmSpecialRebateVo scmSpecialRebateVo = baseMapper.selectExcelInfo(createOrgSid, info.getRebateTypeValue(), info.getRebateName(), info.getEstimateRebate(), info.getPalceGenDate(), info.getPurchaseSystemName(), info.getBrandName());
String secondaryUploadDate = "";
if (isNumber(info.getSecondaryUploadDate())) {
Date javaDate = new Date((long) ((Double.valueOf(info.getSecondaryUploadDate()) - 25569) * 86400 * 1000));
secondaryUploadDate = DateUtil.formatDate(javaDate);
} else {
secondaryUploadDate = info.getSecondaryUploadDate();
if (StringUtils.isNotBlank(info.getSecondaryUploadDate()) && StringUtils.isNotBlank(info.getSecondaryUploadMoney())) {
ScmSpecialRebateVo scmSpecialRebateVo = baseMapper.selectExcel(createOrgSid, info.getRebateTypeValue(), info.getRebateName(), info.getEstimateRebate(), info.getPalceGenDate(), info.getPurchaseSystemName(), info.getBrandName(), info.getRemarks());
String secondaryUploadDate = "";
if (isNumber(info.getSecondaryUploadDate())) {
Date javaDate = new Date((long) ((Double.valueOf(info.getSecondaryUploadDate()) - 25569) * 86400 * 1000));
secondaryUploadDate = DateUtil.formatDate(javaDate);
} else {
secondaryUploadDate = info.getSecondaryUploadDate();
}
baseMapper.updateTwoExcelInfo(secondaryUploadDate, info.getSecondaryUploadMoney(), info.getSecondItureCost(), info.getSecondTreatCost(), info.getSecondSuppCost(), info.getSecondSuppRemark(), info.getAdjustmentRemarks(), info.getIsAdjustment(), info.getAdjustmentMoney(), info.getDiffAmount(), scmSpecialRebateVo.getSid());
}
baseMapper.updateTwoExcelInfo(secondaryUploadDate, info.getSecondaryUploadMoney(), info.getSecondItureCost(), info.getSecondTreatCost(), info.getSecondSuppCost(), info.getSecondSuppRemark(), info.getAdjustmentRemarks(), info.getIsAdjustment(), info.getAdjustmentMoney(), info.getDiffAmount(), scmSpecialRebateVo.getSid());
}
return rb.success().setMsg("成功导入数据,请点击确定按钮");
}
@ -1603,8 +1650,8 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
}
TwoExcelInfo importVo = new TwoExcelInfo();
int physicalNumberOfCells = row.getPhysicalNumberOfCells();
if (physicalNumberOfCells < 8) {
physicalNumberOfCells = 8;
if (physicalNumberOfCells < 20) {
physicalNumberOfCells = 20;
}
for (int i = 0; i < physicalNumberOfCells; i++) {
String trim = new String();
@ -1674,6 +1721,9 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
case 18:
importVo.setAdjustmentRemarks(temp);
break;
case 19:
importVo.setRemarks(temp);
break;
default:
break;
}
@ -1742,6 +1792,9 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
case 18:
word = "调整说明";
break;
case 19:
word = "备注";
break;
default:
break;
}
@ -1753,15 +1806,11 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
}
if (!importVoList.isEmpty()) {
for (TwoExcelInfo excelInfo : importVoList) {
ScmSpecialRebateVo scmSpecialRebateVo = baseMapper.selectExcelInfo(createOrgSid, excelInfo.getRebateTypeValue(), excelInfo.getRebateName(), excelInfo.getEstimateRebate(), excelInfo.getPalceGenDate(), excelInfo.getPurchaseSystemName(), excelInfo.getBrandName());
ScmSpecialRebateVo scmSpecialRebateVo = baseMapper.selectExcel(createOrgSid, excelInfo.getRebateTypeValue(), excelInfo.getRebateName(), excelInfo.getEstimateRebate(), excelInfo.getPalceGenDate(), excelInfo.getPurchaseSystemName(), excelInfo.getBrandName(), excelInfo.getRemarks());
if (scmSpecialRebateVo == null || StringUtils.isBlank(scmSpecialRebateVo.getSid())) {
checkWord.add("返利名称" + excelInfo.getRebateName() + "导入的返利信息不存在");
break;
}
if (scmSpecialRebateVo.getOnceCheckState() == 1) {
checkWord.add("返利名称" + excelInfo.getRebateName() + "导入的返利信息已核对");
break;
}
if (StringUtils.isBlank(excelInfo.getPurchaseSystemName())) {
checkWord.add("采购系统不能为空");
break;
@ -1799,13 +1848,6 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
checkWord.add("返利类型不能为空");
break;
}
if (StringUtils.isNotBlank(excelInfo.getRebateTypeValue())) {
String dictKey = dictCommonFeign.selectByValue(excelInfo.getRebateTypeValue()).getData();
if (StringUtils.isBlank(dictKey)) {
checkWord.add("返利名称" + excelInfo.getRebateName() + "导入的返利类型填写不正确");
break;
}
}
if (StringUtils.isBlank(excelInfo.getEstimateRebate())) {
checkWord.add("预提返利不能为空");
break;
@ -1907,11 +1949,11 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
break;
}
}
if (StringUtils.isBlank(excelInfo.getUploadDate()) && StringUtils.isNotBlank(excelInfo.getSecondaryUploadMoney())) {
if (StringUtils.isBlank(excelInfo.getSecondaryUploadDate()) && StringUtils.isNotBlank(excelInfo.getSecondaryUploadMoney())) {
checkWord.add("二次上传日期不能为空");
break;
}
if (StringUtils.isNotBlank(excelInfo.getUploadDate()) && StringUtils.isBlank(excelInfo.getSecondaryUploadMoney())) {
if (StringUtils.isNotBlank(excelInfo.getSecondaryUploadDate()) && StringUtils.isBlank(excelInfo.getSecondaryUploadMoney())) {
checkWord.add("二次上传金额不能为空");
break;
}
@ -2068,17 +2110,69 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
if (StringUtils.isNotBlank(query.getRebateName())) {
qw.like("rebateName", query.getRebateName());
}
String createStartTime = query.getCreateStartTime();
String createEndTime = query.getCreateEndTime();
qw.apply(StringUtils.isNotBlank(createStartTime), "date_format (createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(createEndTime), "date_format (createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
);
if (StringUtils.isNotBlank(query.getState())) {
qw.eq("state", query.getState());
}
qw.eq("adjustmentState", 0);
qw.eq("state", 2);
qw.eq("onceCheckState", 0);
qw.and(wrapper -> wrapper.eq("uploadDate", "")
.or().isNull("uploadDate")
);
if (StringUtils.isNotBlank(query.getPalceGenDate())) {
qw.eq("palceGenDate", query.getPalceGenDate());
}
if (StringUtils.isNotBlank(query.getWithholdingDate())) {
String[] w = query.getWithholdingDate().split("-");
String withholdingDate = w[0] + "年" + Integer.parseInt(w[1]) + "月";
qw.eq("withholdingDate", withholdingDate);
}
if (StringUtils.isNotBlank(query.getUploadState())) {
if (query.getUploadState().equals("0")) {
qw.and(wrapper -> wrapper.eq("uploadDate", "")
.or().isNull("uploadDate")
);
} else {
qw.ne("uploadDate", "");
qw.isNotNull("uploadDate");
}
}
if (StringUtils.isNotBlank(query.getIsAdjustment())) {
qw.eq("isAdjustment", query.getIsAdjustment());
}
if (StringUtils.isNotBlank(query.getIsUploadFinish())) {
if (query.getIsUploadFinish().equals("1")) {
qw.eq("estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0)", 0);
} else {
qw.ne("estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0)", 0);
}
}
if (StringUtils.isNotBlank(query.getOnceCheckState())) {
qw.eq("onceCheckState", query.getOnceCheckState());
}
if (StringUtils.isNotBlank(query.getSecondUploadState())) {
if (query.getSecondUploadState().equals("1")) {
qw.isNotNull("secondaryUploadMoney");
qw.ne("secondaryUploadMoney", "");
qw.ne("secondaryUploadMoney", 0);
qw.eq("isAdjustment", "是");
} else {
qw.and(wrapper -> wrapper.eq("isAdjustment", '否').or().isNull("secondaryUploadMoney").or().eq("secondaryUploadMoney", ""));
}
}
String createStartTime = query.getCreateStartTime();
String createEndTime = query.getCreateEndTime();
qw.apply(StringUtils.isNotBlank(createStartTime), "date_format (createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(createEndTime), "date_format (createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
);
String uploadStartDate = query.getUploadStartDate();
String uploadEndDate = query.getUploadEndDate();
qw.apply(StringUtils.isNotBlank(uploadStartDate), "date_format (uploadDate,'%Y-%m-%d') >= date_format('" + uploadStartDate + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(uploadEndDate), "date_format (uploadDate,'%Y-%m-%d') <= date_format('" + uploadEndDate + "','%Y-%m-%d')").
or().
apply(StringUtils.isNotBlank(uploadStartDate), "date_format (secondaryUploadDate,'%Y-%m-%d') >= date_format('" + uploadStartDate + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(uploadEndDate), "date_format (secondaryUploadDate,'%Y-%m-%d') <= date_format('" + uploadEndDate + "','%Y-%m-%d')"
);
qw.orderByDesc("createTime");
List<OneExcelVo> oneExcelVos = baseMapper.excelListOne(qw);
for (OneExcelVo oneExcelVo : oneExcelVos) {
@ -2141,15 +2235,67 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
if (StringUtils.isNotBlank(query.getRebateName())) {
qw.like("rebateName", query.getRebateName());
}
if (StringUtils.isNotBlank(query.getState())) {
qw.eq("state", query.getState());
}
qw.eq("adjustmentState", 0);
qw.eq("state", 2);
qw.ne("uploadDate", "");
qw.isNotNull("uploadDate");
if (StringUtils.isNotBlank(query.getPalceGenDate())) {
qw.eq("palceGenDate", query.getPalceGenDate());
}
if (StringUtils.isNotBlank(query.getWithholdingDate())) {
String[] w = query.getWithholdingDate().split("-");
String withholdingDate = w[0] + "年" + Integer.parseInt(w[1]) + "月";
qw.eq("withholdingDate", withholdingDate);
}
if (StringUtils.isNotBlank(query.getUploadState())) {
if (query.getUploadState().equals("0")) {
qw.and(wrapper -> wrapper.eq("uploadDate", "")
.or().isNull("uploadDate")
);
} else {
qw.ne("uploadDate", "");
qw.isNotNull("uploadDate");
}
}
if (StringUtils.isNotBlank(query.getIsAdjustment())) {
qw.eq("isAdjustment", query.getIsAdjustment());
}
if (StringUtils.isNotBlank(query.getIsUploadFinish())) {
if (query.getIsUploadFinish().equals("1")) {
qw.eq("estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0)", 0);
} else {
qw.ne("estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0)", 0);
}
}
if (StringUtils.isNotBlank(query.getOnceCheckState())) {
qw.eq("onceCheckState", query.getOnceCheckState());
}
if (StringUtils.isNotBlank(query.getSecondUploadState())) {
if (query.getSecondUploadState().equals("1")) {
qw.isNotNull("secondaryUploadMoney");
qw.ne("secondaryUploadMoney", "");
qw.ne("secondaryUploadMoney", 0);
qw.eq("isAdjustment", "是");
} else {
qw.and(wrapper -> wrapper.eq("isAdjustment", '否').or().isNull("secondaryUploadMoney").or().eq("secondaryUploadMoney", ""));
}
}
String createStartTime = query.getCreateStartTime();
String createEndTime = query.getCreateEndTime();
qw.apply(StringUtils.isNotBlank(createStartTime), "date_format (createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(createEndTime), "date_format (createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
);
qw.eq("adjustmentState", 0);
qw.eq("state", 2);
qw.ne("uploadDate", "");
qw.isNotNull("uploadDate");
String uploadStartDate = query.getUploadStartDate();
String uploadEndDate = query.getUploadEndDate();
qw.apply(StringUtils.isNotBlank(uploadStartDate), "date_format (uploadDate,'%Y-%m-%d') >= date_format('" + uploadStartDate + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(uploadEndDate), "date_format (uploadDate,'%Y-%m-%d') <= date_format('" + uploadEndDate + "','%Y-%m-%d')").
or().
apply(StringUtils.isNotBlank(uploadStartDate), "date_format (secondaryUploadDate,'%Y-%m-%d') >= date_format('" + uploadStartDate + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(uploadEndDate), "date_format (secondaryUploadDate,'%Y-%m-%d') <= date_format('" + uploadEndDate + "','%Y-%m-%d')"
);
qw.orderByDesc("createTime");
List<TwoExcelVo> twoExcelVos = baseMapper.excelListTwo(qw);
for (TwoExcelVo twoExcelVo : twoExcelVos) {
@ -2226,11 +2372,60 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
if (StringUtils.isNotBlank(query.getState())) {
qw.eq("state", query.getState());
}
if (StringUtils.isNotBlank(query.getPalceGenDate())) {
qw.eq("palceGenDate", query.getPalceGenDate());
}
if (StringUtils.isNotBlank(query.getWithholdingDate())) {
String[] w = query.getWithholdingDate().split("-");
String withholdingDate = w[0] + "年" + Integer.parseInt(w[1]) + "月";
qw.eq("withholdingDate", withholdingDate);
}
if (StringUtils.isNotBlank(query.getUploadState())) {
if (query.getUploadState().equals("0")) {
qw.and(wrapper -> wrapper.eq("uploadDate", "")
.or().isNull("uploadDate")
);
} else {
qw.ne("uploadDate", "");
qw.isNotNull("uploadDate");
}
}
if (StringUtils.isNotBlank(query.getIsAdjustment())) {
qw.eq("isAdjustment", query.getIsAdjustment());
}
if (StringUtils.isNotBlank(query.getIsUploadFinish())) {
if (query.getIsUploadFinish().equals("1")) {
qw.eq("estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0)", 0);
} else {
qw.ne("estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0)", 0);
}
}
if (StringUtils.isNotBlank(query.getOnceCheckState())) {
qw.eq("onceCheckState", query.getOnceCheckState());
}
if (StringUtils.isNotBlank(query.getSecondUploadState())) {
if (query.getSecondUploadState().equals("1")) {
qw.isNotNull("secondaryUploadMoney");
qw.ne("secondaryUploadMoney", "");
qw.ne("secondaryUploadMoney", 0);
qw.eq("isAdjustment", "是");
} else {
qw.and(wrapper -> wrapper.eq("isAdjustment", '否').or().isNull("secondaryUploadMoney").or().eq("secondaryUploadMoney", ""));
}
}
String createStartTime = query.getCreateStartTime();
String createEndTime = query.getCreateEndTime();
qw.apply(StringUtils.isNotBlank(createStartTime), "date_format (createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(createEndTime), "date_format (createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
);
String uploadStartDate = query.getUploadStartDate();
String uploadEndDate = query.getUploadEndDate();
qw.apply(StringUtils.isNotBlank(uploadStartDate), "date_format (uploadDate,'%Y-%m-%d') >= date_format('" + uploadStartDate + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(uploadEndDate), "date_format (uploadDate,'%Y-%m-%d') <= date_format('" + uploadEndDate + "','%Y-%m-%d')").
or().
apply(StringUtils.isNotBlank(uploadStartDate), "date_format (secondaryUploadDate,'%Y-%m-%d') >= date_format('" + uploadStartDate + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(uploadEndDate), "date_format (secondaryUploadDate,'%Y-%m-%d') <= date_format('" + uploadEndDate + "','%Y-%m-%d')"
);
qw.orderByDesc("createTime");
List<ScmSpecialRebateExcelVo> scmSpecialRebateExcelVos = baseMapper.excelList(qw);
for (ScmSpecialRebateExcelVo scmSpecialRebateExcelVo : scmSpecialRebateExcelVos) {

18
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateRest.java

@ -25,8 +25,6 @@
*********************************************************/
package com.yxt.anrui.scm.biz.scmvehrebate;
import com.yxt.anrui.scm.api.scmspecialrebate.ScmSpecialRebateExcelVo;
import com.yxt.anrui.scm.api.scmspecialrebate.ScmSpecialRebateQuery;
import com.yxt.anrui.scm.api.scmvehrebate.*;
import com.yxt.common.base.utils.ExportExcelUtils;
import com.yxt.common.core.query.PagerQuery;
@ -35,36 +33,20 @@ import com.yxt.common.core.vo.PagerVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.compress.utils.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.xssf.usermodel.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.text.ParseException;
import java.util.List;
/**
* Project: anrui-scm(单车返利) <br/>
* File: ScmVehRebateFeignFallback.java <br/>
* Class: com.yxt.anrui.scm.biz.scmvehrebate.ScmVehRebateRest <br/>
* Description: 单车返利表. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-08-24 09:01:54 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Api(tags = "单车返利表")
@RestController
@RequestMapping("v1/scmvehrebate")

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

@ -152,11 +152,12 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
qw.eq("palceGenDate", query.getPalceGenDate());
}
if (StringUtils.isNotBlank(query.getWithholdingDate())) {
String withholdingDate = query.getWithholdingDate().replace("-", "年") + "月";
String[] w = query.getWithholdingDate().split("-");
String withholdingDate = w[0] + "年" + Integer.parseInt(w[1]) + "月";
qw.eq("withholdingDate", withholdingDate);
}
if (StringUtils.isNotBlank(query.getUploadState())) {
if (query.getUploadState().equals("未上传")) {
if (query.getUploadState().equals("0")) {
qw.and(wrapper -> wrapper.eq("uploadDate", "")
.or().isNull("uploadDate")
);
@ -169,17 +170,17 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
qw.eq("isAdjustment", query.getIsAdjustment());
}
if (StringUtils.isNotBlank(query.getIsUploadFinish())) {
if (query.getIsUploadFinish().equals("")) {
qw.eq("estimateRebate - uploadMoney - secondaryUploadMoney + adjustmentMoney", 0);
if (query.getIsUploadFinish().equals("1")) {
qw.eq("estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0)", 0);
} else {
qw.ne("estimateRebate - uploadMoney - secondaryUploadMoney + adjustmentMoney", 0);
qw.ne("estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0)", 0);
}
}
if (StringUtils.isNotBlank(query.getOnceCheckState())) {
qw.eq("onceCheckState", query.getOnceCheckState());
}
if (StringUtils.isNotBlank(query.getSecondUploadState())) {
if (query.getSecondUploadState().equals("")) {
if (query.getSecondUploadState().equals("1")) {
qw.isNotNull("secondaryUploadMoney");
qw.ne("secondaryUploadMoney", "");
qw.ne("secondaryUploadMoney", 0);
@ -188,6 +189,11 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
qw.and(wrapper -> wrapper.eq("isAdjustment", '否').or().isNull("secondaryUploadMoney").or().eq("secondaryUploadMoney", ""));
}
}
String createStartTime = query.getCreateStartTime();
String createEndTime = query.getCreateEndTime();
qw.apply(StringUtils.isNotBlank(createStartTime), "date_format (createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(createEndTime), "date_format (createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
);
String uploadStartDate = query.getUploadStartDate();
String uploadEndDate = query.getUploadEndDate();
qw.apply(StringUtils.isNotBlank(uploadStartDate), "date_format (uploadDate,'%Y-%m-%d') >= date_format('" + uploadStartDate + "','%Y-%m-%d')").
@ -196,11 +202,6 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
apply(StringUtils.isNotBlank(uploadStartDate), "date_format (secondaryUploadDate,'%Y-%m-%d') >= date_format('" + uploadStartDate + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(uploadEndDate), "date_format (secondaryUploadDate,'%Y-%m-%d') <= date_format('" + uploadEndDate + "','%Y-%m-%d')"
);
String createStartTime = query.getCreateStartTime();
String createEndTime = query.getCreateEndTime();
qw.apply(StringUtils.isNotBlank(createStartTime), "date_format (createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(createEndTime), "date_format (createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
);
qw.orderByDesc("createTime");
IPage<ScmVehRebate> page = PagerUtil.queryToPage(pq);
IPage<ScmVehRebateVo> pagging = baseMapper.selectPageVo(page, qw);
@ -209,7 +210,7 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
record.setCalculationStandard(record.getCalculationStandard() + "%");
}
if (StringUtils.isNotBlank(record.getSecondaryUploadMoney())) {
if (Integer.parseInt(record.getSecondaryUploadMoney()) > 0 && "是".equals(record.getIsAdjustment())) {
if (new BigDecimal(record.getSecondaryUploadMoney()).compareTo(BigDecimal.ZERO) == 1 && "是".equals(record.getIsAdjustment())) {
record.setSecondCheckState("是");
} else {
record.setSecondCheckState("否");
@ -288,11 +289,60 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
if (StringUtils.isNotBlank(query.getPurchaseSystemName())) {
qw.like("purchaseSystemName", query.getPurchaseSystemName());
}
if (StringUtils.isNotBlank(query.getPalceGenDate())) {
qw.eq("palceGenDate", query.getPalceGenDate());
}
if (StringUtils.isNotBlank(query.getWithholdingDate())) {
String[] w = query.getWithholdingDate().split("-");
String withholdingDate = w[0] + "年" + Integer.parseInt(w[1]) + "月";
qw.eq("withholdingDate", withholdingDate);
}
if (StringUtils.isNotBlank(query.getUploadState())) {
if (query.getUploadState().equals("0")) {
qw.and(wrapper -> wrapper.eq("uploadDate", "")
.or().isNull("uploadDate")
);
} else {
qw.ne("uploadDate", "");
qw.isNotNull("uploadDate");
}
}
if (StringUtils.isNotBlank(query.getIsAdjustment())) {
qw.eq("isAdjustment", query.getIsAdjustment());
}
if (StringUtils.isNotBlank(query.getIsUploadFinish())) {
if (query.getIsUploadFinish().equals("1")) {
qw.eq("estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0)", 0);
} else {
qw.ne("estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0)", 0);
}
}
if (StringUtils.isNotBlank(query.getOnceCheckState())) {
qw.eq("onceCheckState", query.getOnceCheckState());
}
if (StringUtils.isNotBlank(query.getSecondUploadState())) {
if (query.getSecondUploadState().equals("1")) {
qw.isNotNull("secondaryUploadMoney");
qw.ne("secondaryUploadMoney", "");
qw.ne("secondaryUploadMoney", 0);
qw.eq("isAdjustment", "是");
} else {
qw.and(wrapper -> wrapper.eq("isAdjustment", '否').or().isNull("secondaryUploadMoney").or().eq("secondaryUploadMoney", ""));
}
}
String createStartTime = query.getCreateStartTime();
String createEndTime = query.getCreateEndTime();
qw.apply(StringUtils.isNotBlank(createStartTime), "date_format (createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(createEndTime), "date_format (createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
);
String uploadStartDate = query.getUploadStartDate();
String uploadEndDate = query.getUploadEndDate();
qw.apply(StringUtils.isNotBlank(uploadStartDate), "date_format (uploadDate,'%Y-%m-%d') >= date_format('" + uploadStartDate + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(uploadEndDate), "date_format (uploadDate,'%Y-%m-%d') <= date_format('" + uploadEndDate + "','%Y-%m-%d')").
or().
apply(StringUtils.isNotBlank(uploadStartDate), "date_format (secondaryUploadDate,'%Y-%m-%d') >= date_format('" + uploadStartDate + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(uploadEndDate), "date_format (secondaryUploadDate,'%Y-%m-%d') <= date_format('" + uploadEndDate + "','%Y-%m-%d')"
);
qw.orderByDesc("createTime");
List<ScmVehRebateVo> scmVehRebateVoList = baseMapper.listAll(qw);
for (ScmVehRebateVo record : scmVehRebateVoList) {
@ -400,6 +450,9 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
if (StringUtils.isNotBlank(query.getRebateName())) {
qw.like("rebateName", query.getRebateName());
}
if (StringUtils.isNotBlank(query.getState())) {
qw.eq("state", query.getState());
}
if (StringUtils.isNotBlank(query.getPurchaseSystemName())) {
qw.like("purchaseSystemName", query.getPurchaseSystemName());
}
@ -410,11 +463,12 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
qw.eq("palceGenDate", query.getPalceGenDate());
}
if (StringUtils.isNotBlank(query.getWithholdingDate())) {
String withholdingDate = query.getWithholdingDate().replace("-", "年") + "月";
String[] w = query.getWithholdingDate().split("-");
String withholdingDate = w[0] + "年" + Integer.parseInt(w[1]) + "月";
qw.eq("withholdingDate", withholdingDate);
}
if (StringUtils.isNotBlank(query.getUploadState())) {
if (query.getUploadState().equals("未上传")) {
if (query.getUploadState().equals("0")) {
qw.and(wrapper -> wrapper.eq("uploadDate", "")
.or().isNull("uploadDate")
);
@ -427,17 +481,17 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
qw.eq("isAdjustment", query.getIsAdjustment());
}
if (StringUtils.isNotBlank(query.getIsUploadFinish())) {
if (query.getIsUploadFinish().equals("")) {
qw.eq("estimateRebate - uploadMoney - secondaryUploadMoney + adjustmentMoney", 0);
if (query.getIsUploadFinish().equals("1")) {
qw.eq("estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0)", 0);
} else {
qw.ne("estimateRebate - uploadMoney - secondaryUploadMoney + adjustmentMoney", 0);
qw.ne("estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0)", 0);
}
}
if (StringUtils.isNotBlank(query.getOnceCheckState())) {
qw.eq("onceCheckState", query.getOnceCheckState());
}
if (StringUtils.isNotBlank(query.getSecondUploadState())) {
if (query.getSecondUploadState().equals("")) {
if (query.getSecondUploadState().equals("1")) {
qw.isNotNull("secondaryUploadMoney");
qw.ne("secondaryUploadMoney", "");
qw.ne("secondaryUploadMoney", 0);
@ -446,6 +500,11 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
qw.and(wrapper -> wrapper.eq("isAdjustment", '否').or().isNull("secondaryUploadMoney").or().eq("secondaryUploadMoney", ""));
}
}
String createStartTime = query.getCreateStartTime();
String createEndTime = query.getCreateEndTime();
qw.apply(StringUtils.isNotBlank(createStartTime), "date_format (createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(createEndTime), "date_format (createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
);
String uploadStartDate = query.getUploadStartDate();
String uploadEndDate = query.getUploadEndDate();
qw.apply(StringUtils.isNotBlank(uploadStartDate), "date_format (uploadDate,'%Y-%m-%d') >= date_format('" + uploadStartDate + "','%Y-%m-%d')").
@ -454,11 +513,6 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
apply(StringUtils.isNotBlank(uploadStartDate), "date_format (secondaryUploadDate,'%Y-%m-%d') >= date_format('" + uploadStartDate + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(uploadEndDate), "date_format (secondaryUploadDate,'%Y-%m-%d') <= date_format('" + uploadEndDate + "','%Y-%m-%d')"
);
String createStartTime = query.getCreateStartTime();
String createEndTime = query.getCreateEndTime();
qw.apply(StringUtils.isNotBlank(createStartTime), "date_format (createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(createEndTime), "date_format (createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
);
qw.orderByDesc("createTime");
IPage<ScmVehRebate> page = PagerUtil.queryToPage(pq);
IPage<ScmVehRebateVo> pagging = baseMapper.selectPageVo(page, qw);
@ -533,6 +587,9 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
if (StringUtils.isNotBlank(query.getRebateName())) {
qw.like("rebateName", query.getRebateName());
}
if (StringUtils.isNotBlank(query.getState())) {
qw.eq("state", query.getState());
}
if (StringUtils.isNotBlank(query.getPurchaseSystemName())) {
qw.like("purchaseSystemName", query.getPurchaseSystemName());
}
@ -543,11 +600,12 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
qw.eq("palceGenDate", query.getPalceGenDate());
}
if (StringUtils.isNotBlank(query.getWithholdingDate())) {
String withholdingDate = query.getWithholdingDate().replace("-", "年") + "月";
String[] w = query.getWithholdingDate().split("-");
String withholdingDate = w[0] + "年" + Integer.parseInt(w[1]) + "月";
qw.eq("withholdingDate", withholdingDate);
}
if (StringUtils.isNotBlank(query.getUploadState())) {
if (query.getUploadState().equals("未上传")) {
if (query.getUploadState().equals("0")) {
qw.and(wrapper -> wrapper.eq("uploadDate", "")
.or().isNull("uploadDate")
);
@ -560,17 +618,17 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
qw.eq("isAdjustment", query.getIsAdjustment());
}
if (StringUtils.isNotBlank(query.getIsUploadFinish())) {
if (query.getIsUploadFinish().equals("")) {
qw.eq("estimateRebate - uploadMoney - secondaryUploadMoney + adjustmentMoney", 0);
if (query.getIsUploadFinish().equals("1")) {
qw.eq("estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0)", 0);
} else {
qw.ne("estimateRebate - uploadMoney - secondaryUploadMoney + adjustmentMoney", 0);
qw.ne("estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0)", 0);
}
}
if (StringUtils.isNotBlank(query.getOnceCheckState())) {
qw.eq("onceCheckState", query.getOnceCheckState());
}
if (StringUtils.isNotBlank(query.getSecondUploadState())) {
if (query.getSecondUploadState().equals("")) {
if (query.getSecondUploadState().equals("1")) {
qw.isNotNull("secondaryUploadMoney");
qw.ne("secondaryUploadMoney", "");
qw.ne("secondaryUploadMoney", 0);
@ -579,6 +637,11 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
qw.and(wrapper -> wrapper.eq("isAdjustment", '否').or().isNull("secondaryUploadMoney").or().eq("secondaryUploadMoney", ""));
}
}
String createStartTime = query.getCreateStartTime();
String createEndTime = query.getCreateEndTime();
qw.apply(StringUtils.isNotBlank(createStartTime), "date_format (createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(createEndTime), "date_format (createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
);
String uploadStartDate = query.getUploadStartDate();
String uploadEndDate = query.getUploadEndDate();
qw.apply(StringUtils.isNotBlank(uploadStartDate), "date_format (uploadDate,'%Y-%m-%d') >= date_format('" + uploadStartDate + "','%Y-%m-%d')").
@ -587,11 +650,6 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
apply(StringUtils.isNotBlank(uploadStartDate), "date_format (secondaryUploadDate,'%Y-%m-%d') >= date_format('" + uploadStartDate + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(uploadEndDate), "date_format (secondaryUploadDate,'%Y-%m-%d') <= date_format('" + uploadEndDate + "','%Y-%m-%d')"
);
String createStartTime = query.getCreateStartTime();
String createEndTime = query.getCreateEndTime();
qw.apply(StringUtils.isNotBlank(createStartTime), "date_format (createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(createEndTime), "date_format (createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
);
qw.orderByDesc("createTime");
List<ScmVehRebateVo> scmVehRebateVoList = baseMapper.checkApplyGetVehRebateAll(qw);
for (ScmVehRebateVo record : scmVehRebateVoList) {
@ -602,7 +660,7 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
record.setUploadState("1");
}
if (StringUtils.isNotBlank(record.getSecondaryUploadMoney())) {
if (Integer.parseInt(record.getSecondaryUploadMoney()) > 0 && "是".equals(record.getIsAdjustment())) {
if (new BigDecimal(record.getSecondaryUploadMoney()).compareTo(BigDecimal.ZERO) == 1 && "是".equals(record.getIsAdjustment())) {
record.setSecondCheckState("是");
} else {
record.setSecondCheckState("否");
@ -659,12 +717,6 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
if (StringUtils.isNotBlank(query.getBrandName())) {
qw.like("brandName", query.getBrandName());
}
if (StringUtils.isNotBlank(query.getUseOrgName())) {
qw.like("useOrgName", query.getUseOrgName());
}
if (StringUtils.isNotBlank(query.getPurchaseSystemName())) {
qw.like("purchaseSystemName", query.getPurchaseSystemName());
}
if (StringUtils.isNotBlank(query.getVehModelName())) {
qw.like("vehModelName", query.getVehModelName());
}
@ -677,17 +729,75 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
if (StringUtils.isNotBlank(query.getRebateName())) {
qw.like("rebateName", query.getRebateName());
}
String createStartTime = query.getCreateStartTime();
String createEndTime = query.getCreateEndTime();
qw.apply(StringUtils.isNotBlank(createStartTime), "date_format (createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(createEndTime), "date_format (createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
);
if (StringUtils.isNotBlank(query.getState())) {
qw.eq("state", query.getState());
}
if (StringUtils.isNotBlank(query.getUseOrgName())) {
qw.like("useOrgName", query.getUseOrgName());
}
if (StringUtils.isNotBlank(query.getPurchaseSystemName())) {
qw.like("purchaseSystemName", query.getPurchaseSystemName());
}
qw.eq("adjustmentState", 0);
qw.eq("state", 2);
qw.eq("onceCheckState", 0);
qw.and(wrapper -> wrapper.eq("uploadDate", "")
.or().isNull("uploadDate")
);
if (StringUtils.isNotBlank(query.getPalceGenDate())) {
qw.eq("palceGenDate", query.getPalceGenDate());
}
if (StringUtils.isNotBlank(query.getWithholdingDate())) {
String[] w = query.getWithholdingDate().split("-");
String withholdingDate = w[0] + "年" + Integer.parseInt(w[1]) + "月";
qw.eq("withholdingDate", withholdingDate);
}
if (StringUtils.isNotBlank(query.getUploadState())) {
if (query.getUploadState().equals("0")) {
qw.and(wrapper -> wrapper.eq("uploadDate", "")
.or().isNull("uploadDate")
);
} else {
qw.ne("uploadDate", "");
qw.isNotNull("uploadDate");
}
}
if (StringUtils.isNotBlank(query.getIsAdjustment())) {
qw.eq("isAdjustment", query.getIsAdjustment());
}
if (StringUtils.isNotBlank(query.getIsUploadFinish())) {
if (query.getIsUploadFinish().equals("1")) {
qw.eq("estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0)", 0);
} else {
qw.ne("estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0)", 0);
}
}
if (StringUtils.isNotBlank(query.getOnceCheckState())) {
qw.eq("onceCheckState", query.getOnceCheckState());
}
if (StringUtils.isNotBlank(query.getSecondUploadState())) {
if (query.getSecondUploadState().equals("1")) {
qw.isNotNull("secondaryUploadMoney");
qw.ne("secondaryUploadMoney", "");
qw.ne("secondaryUploadMoney", 0);
qw.eq("isAdjustment", "是");
} else {
qw.and(wrapper -> wrapper.eq("isAdjustment", '否').or().isNull("secondaryUploadMoney").or().eq("secondaryUploadMoney", ""));
}
}
String createStartTime = query.getCreateStartTime();
String createEndTime = query.getCreateEndTime();
qw.apply(StringUtils.isNotBlank(createStartTime), "date_format (createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(createEndTime), "date_format (createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
);
String uploadStartDate = query.getUploadStartDate();
String uploadEndDate = query.getUploadEndDate();
qw.apply(StringUtils.isNotBlank(uploadStartDate), "date_format (uploadDate,'%Y-%m-%d') >= date_format('" + uploadStartDate + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(uploadEndDate), "date_format (uploadDate,'%Y-%m-%d') <= date_format('" + uploadEndDate + "','%Y-%m-%d')").
or().
apply(StringUtils.isNotBlank(uploadStartDate), "date_format (secondaryUploadDate,'%Y-%m-%d') >= date_format('" + uploadStartDate + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(uploadEndDate), "date_format (secondaryUploadDate,'%Y-%m-%d') <= date_format('" + uploadEndDate + "','%Y-%m-%d')"
);
qw.orderByDesc("createTime");
List<OneExcelVo> oneExcelVos = baseMapper.excelListOne(qw);
for (OneExcelVo oneExcelVo : oneExcelVos) {
@ -741,12 +851,6 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
if (StringUtils.isNotBlank(query.getBrandName())) {
qw.like("brandName", query.getBrandName());
}
if (StringUtils.isNotBlank(query.getUseOrgName())) {
qw.like("useOrgName", query.getUseOrgName());
}
if (StringUtils.isNotBlank(query.getPurchaseSystemName())) {
qw.like("purchaseSystemName", query.getPurchaseSystemName());
}
if (StringUtils.isNotBlank(query.getVehModelName())) {
qw.like("vehModelName", query.getVehModelName());
}
@ -759,15 +863,73 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
if (StringUtils.isNotBlank(query.getRebateName())) {
qw.like("rebateName", query.getRebateName());
}
if (StringUtils.isNotBlank(query.getState())) {
qw.eq("state", query.getState());
}
if (StringUtils.isNotBlank(query.getUseOrgName())) {
qw.like("useOrgName", query.getUseOrgName());
}
if (StringUtils.isNotBlank(query.getPurchaseSystemName())) {
qw.like("purchaseSystemName", query.getPurchaseSystemName());
}
qw.eq("adjustmentState", 0);
qw.eq("state", 2);
qw.ne("uploadDate", "");
qw.isNotNull("uploadDate");
if (StringUtils.isNotBlank(query.getPalceGenDate())) {
qw.eq("palceGenDate", query.getPalceGenDate());
}
if (StringUtils.isNotBlank(query.getWithholdingDate())) {
String[] w = query.getWithholdingDate().split("-");
String withholdingDate = w[0] + "年" + Integer.parseInt(w[1]) + "月";
qw.eq("withholdingDate", withholdingDate);
}
if (StringUtils.isNotBlank(query.getUploadState())) {
if (query.getUploadState().equals("0")) {
qw.and(wrapper -> wrapper.eq("uploadDate", "")
.or().isNull("uploadDate")
);
} else {
qw.ne("uploadDate", "");
qw.isNotNull("uploadDate");
}
}
if (StringUtils.isNotBlank(query.getIsAdjustment())) {
qw.eq("isAdjustment", query.getIsAdjustment());
}
if (StringUtils.isNotBlank(query.getIsUploadFinish())) {
if (query.getIsUploadFinish().equals("1")) {
qw.eq("estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0)", 0);
} else {
qw.ne("estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0)", 0);
}
}
if (StringUtils.isNotBlank(query.getOnceCheckState())) {
qw.eq("onceCheckState", query.getOnceCheckState());
}
if (StringUtils.isNotBlank(query.getSecondUploadState())) {
if (query.getSecondUploadState().equals("1")) {
qw.isNotNull("secondaryUploadMoney");
qw.ne("secondaryUploadMoney", "");
qw.ne("secondaryUploadMoney", 0);
qw.eq("isAdjustment", "是");
} else {
qw.and(wrapper -> wrapper.eq("isAdjustment", '否').or().isNull("secondaryUploadMoney").or().eq("secondaryUploadMoney", ""));
}
}
String createStartTime = query.getCreateStartTime();
String createEndTime = query.getCreateEndTime();
qw.apply(StringUtils.isNotBlank(createStartTime), "date_format (createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(createEndTime), "date_format (createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
);
qw.eq("adjustmentState", 0);
qw.eq("state", 2);
qw.ne("uploadDate", "");
qw.isNotNull("uploadDate");
String uploadStartDate = query.getUploadStartDate();
String uploadEndDate = query.getUploadEndDate();
qw.apply(StringUtils.isNotBlank(uploadStartDate), "date_format (uploadDate,'%Y-%m-%d') >= date_format('" + uploadStartDate + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(uploadEndDate), "date_format (uploadDate,'%Y-%m-%d') <= date_format('" + uploadEndDate + "','%Y-%m-%d')").
or().
apply(StringUtils.isNotBlank(uploadStartDate), "date_format (secondaryUploadDate,'%Y-%m-%d') >= date_format('" + uploadStartDate + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(uploadEndDate), "date_format (secondaryUploadDate,'%Y-%m-%d') <= date_format('" + uploadEndDate + "','%Y-%m-%d')"
);
qw.orderByDesc("createTime");
List<TwoExcelVo> twoExcelVos = baseMapper.excelListTwo(qw);
for (TwoExcelVo twoExcelVo : twoExcelVos) {
@ -780,26 +942,6 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
ScmVehRebateQuery query = pq.getParams();
QueryWrapper<ScmVehRebate> qw = new QueryWrapper<>();
qw.eq("createOrgSid", query.getCreateOrgSid());
if (StringUtils.isNotBlank(query.getBrandName())) {
qw.like("brandName", query.getBrandName());
}
if (StringUtils.isNotBlank(query.getVehModelName())) {
qw.like("vehModelName", query.getVehModelName());
}
if (StringUtils.isNotBlank(query.getVinNo())) {
qw.like("vinNo", query.getVinNo());
}
if (StringUtils.isNotBlank(query.getRebateTypeKey())) {
qw.eq("rebateTypeKey", query.getRebateTypeKey());
}
if (StringUtils.isNotBlank(query.getRebateName())) {
qw.like("rebateName", query.getRebateName());
}
String createStartTime = query.getCreateStartTime();
String createEndTime = query.getCreateEndTime();
qw.apply(StringUtils.isNotBlank(createStartTime), "date_format (createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(createEndTime), "date_format (createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
);
qw.eq("adjustmentState", 0);
qw.eq("state", 2);
if (query.getSidList().size() > 0) {
@ -1355,15 +1497,17 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
} else {
List<OneExcelInfo> infos = importReturn.getInfos();
for (OneExcelInfo info : infos) {
ScmVehRebateVo scmVehRebateVo = baseMapper.selectByVinNoAndOrgSid(info.getVinNo(), info.getRebateTypeValue(), info.getRebateName(), info.getPalceGenDate(), info.getEstimateRebate(), useOrgSid);
String uploadDate = "";
if (isNumber(info.getUploadDate())) {
Date javaDate = new Date((long) ((Double.valueOf(info.getUploadDate()) - 25569) * 86400 * 1000));
uploadDate = DateUtil.formatDate(javaDate);
} else {
uploadDate = info.getUploadDate();
if (StringUtils.isNotBlank(info.getUploadDate()) && StringUtils.isNotBlank(info.getUploadMoney())) {
ScmVehRebateVo scmVehRebateVo = baseMapper.selectByVinNoAndOrgSid(info.getVinNo(), info.getRebateTypeValue(), info.getRebateName(), info.getPalceGenDate(), info.getEstimateRebate(), useOrgSid);
String uploadDate = "";
if (isNumber(info.getUploadDate())) {
Date javaDate = new Date((long) ((Double.valueOf(info.getUploadDate()) - 25569) * 86400 * 1000));
uploadDate = DateUtil.formatDate(javaDate);
} else {
uploadDate = info.getUploadDate();
}
baseMapper.updateOneExcelInfo(uploadDate, info.getUploadMoney(), info.getStayDetermineMoney(), info.getOnceTreatCost(), info.getOnceSuppCost(), info.getOnceSuppRemark(), info.getAdjustmentRemarks(), info.getIsAdjustment(), info.getAdjustmentMoney(), info.getDiffAmount(), scmVehRebateVo.getSid());
}
baseMapper.updateOneExcelInfo(uploadDate, info.getUploadMoney(), info.getStayDetermineMoney(), info.getOnceTreatCost(), info.getOnceSuppCost(), info.getOnceSuppRemark(), info.getAdjustmentRemarks(), info.getIsAdjustment(), info.getAdjustmentMoney(), info.getDiffAmount(), scmVehRebateVo.getSid());
}
return rb.success().setMsg("成功导入数据,请点击确定按钮");
}
@ -1598,13 +1742,6 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
checkWord.add("返利类型不能为空");
break;
}
if (StringUtils.isNotBlank(excelInfo.getRebateTypeValue())) {
String dictKey = dictCommonFeign.selectByValue(excelInfo.getRebateTypeValue()).getData();
if (StringUtils.isBlank(dictKey)) {
checkWord.add("车架号" + excelInfo.getVinNo() + "导入的返利类型填写不正确");
break;
}
}
if (StringUtils.isBlank(excelInfo.getEstimateRebate())) {
checkWord.add("预提返利不能为空");
break;
@ -1785,15 +1922,17 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
} else {
List<TwoExcelInfo> infos = importReturn.getInfos();
for (TwoExcelInfo info : infos) {
ScmVehRebateVo scmVehRebateVo = baseMapper.selectByVinNoAndOrgSid(info.getVinNo(), info.getRebateTypeValue(), info.getRebateName(), info.getPalceGenDate(), info.getEstimateRebate(), useOrgSid);
String secondaryUploadDate = "";
if (isNumber(info.getSecondaryUploadDate())) {
Date javaDate = new Date((long) ((Double.valueOf(info.getSecondaryUploadDate()) - 25569) * 86400 * 1000));
secondaryUploadDate = DateUtil.formatDate(javaDate);
} else {
secondaryUploadDate = info.getSecondaryUploadDate();
if (StringUtils.isNotBlank(info.getSecondaryUploadDate()) && StringUtils.isNotBlank(info.getSecondaryUploadMoney())) {
ScmVehRebateVo scmVehRebateVo = baseMapper.selectByVinNoAndOrgSid(info.getVinNo(), info.getRebateTypeValue(), info.getRebateName(), info.getPalceGenDate(), info.getEstimateRebate(), useOrgSid);
String secondaryUploadDate = "";
if (isNumber(info.getSecondaryUploadDate())) {
Date javaDate = new Date((long) ((Double.valueOf(info.getSecondaryUploadDate()) - 25569) * 86400 * 1000));
secondaryUploadDate = DateUtil.formatDate(javaDate);
} else {
secondaryUploadDate = info.getSecondaryUploadDate();
}
baseMapper.updateTwoExcelInfo(secondaryUploadDate, info.getSecondaryUploadMoney(), info.getSecondTreatCost(), info.getSecondSuppCost(), info.getSecondSuppRemark(), info.getAdjustmentRemarks(), info.getIsAdjustment(), info.getAdjustmentMoney(), info.getDiffAmount(), scmVehRebateVo.getSid());
}
baseMapper.updateTwoExcelInfo(secondaryUploadDate, info.getSecondaryUploadMoney(), info.getSecondTreatCost(), info.getSecondSuppCost(), info.getSecondSuppRemark(), info.getAdjustmentRemarks(), info.getIsAdjustment(), info.getAdjustmentMoney(), info.getDiffAmount(), scmVehRebateVo.getSid());
}
return rb.success().setMsg("成功导入数据,请点击确定按钮");
}
@ -2040,13 +2179,6 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
checkWord.add("返利类型不能为空");
break;
}
if (StringUtils.isNotBlank(excelInfo.getRebateTypeValue())) {
String dictKey = dictCommonFeign.selectByValue(excelInfo.getRebateTypeValue()).getData();
if (StringUtils.isBlank(dictKey)) {
checkWord.add("车架号" + excelInfo.getVinNo() + "导入的返利类型填写不正确");
break;
}
}
if (StringUtils.isBlank(excelInfo.getEstimateRebate())) {
checkWord.add("预提返利不能为空");
break;
@ -2148,11 +2280,11 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
break;
}
}
if (StringUtils.isBlank(excelInfo.getUploadDate()) && StringUtils.isNotBlank(excelInfo.getSecondaryUploadMoney())) {
if (StringUtils.isBlank(excelInfo.getSecondaryUploadDate()) && StringUtils.isNotBlank(excelInfo.getSecondaryUploadMoney())) {
checkWord.add("二次上传日期不能为空");
break;
}
if (StringUtils.isNotBlank(excelInfo.getUploadDate()) && StringUtils.isBlank(excelInfo.getSecondaryUploadMoney())) {
if (StringUtils.isNotBlank(excelInfo.getSecondaryUploadDate()) && StringUtils.isBlank(excelInfo.getSecondaryUploadMoney())) {
checkWord.add("二次上传金额不能为空");
break;
}
@ -2332,11 +2464,60 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
if (StringUtils.isNotBlank(query.getPurchaseSystemName())) {
qw.like("purchaseSystemName", query.getPurchaseSystemName());
}
if (StringUtils.isNotBlank(query.getPalceGenDate())) {
qw.eq("palceGenDate", query.getPalceGenDate());
}
if (StringUtils.isNotBlank(query.getWithholdingDate())) {
String[] w = query.getWithholdingDate().split("-");
String withholdingDate = w[0] + "年" + Integer.parseInt(w[1]) + "月";
qw.eq("withholdingDate", withholdingDate);
}
if (StringUtils.isNotBlank(query.getUploadState())) {
if (query.getUploadState().equals("0")) {
qw.and(wrapper -> wrapper.eq("uploadDate", "")
.or().isNull("uploadDate")
);
} else {
qw.ne("uploadDate", "");
qw.isNotNull("uploadDate");
}
}
if (StringUtils.isNotBlank(query.getIsAdjustment())) {
qw.eq("isAdjustment", query.getIsAdjustment());
}
if (StringUtils.isNotBlank(query.getIsUploadFinish())) {
if (query.getIsUploadFinish().equals("1")) {
qw.eq("estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0)", 0);
} else {
qw.ne("estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0)", 0);
}
}
if (StringUtils.isNotBlank(query.getOnceCheckState())) {
qw.eq("onceCheckState", query.getOnceCheckState());
}
if (StringUtils.isNotBlank(query.getSecondUploadState())) {
if (query.getSecondUploadState().equals("1")) {
qw.isNotNull("secondaryUploadMoney");
qw.ne("secondaryUploadMoney", "");
qw.ne("secondaryUploadMoney", 0);
qw.eq("isAdjustment", "是");
} else {
qw.and(wrapper -> wrapper.eq("isAdjustment", '否').or().isNull("secondaryUploadMoney").or().eq("secondaryUploadMoney", ""));
}
}
String createStartTime = query.getCreateStartTime();
String createEndTime = query.getCreateEndTime();
qw.apply(StringUtils.isNotBlank(createStartTime), "date_format (createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(createEndTime), "date_format (createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
);
String uploadStartDate = query.getUploadStartDate();
String uploadEndDate = query.getUploadEndDate();
qw.apply(StringUtils.isNotBlank(uploadStartDate), "date_format (uploadDate,'%Y-%m-%d') >= date_format('" + uploadStartDate + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(uploadEndDate), "date_format (uploadDate,'%Y-%m-%d') <= date_format('" + uploadEndDate + "','%Y-%m-%d')").
or().
apply(StringUtils.isNotBlank(uploadStartDate), "date_format (secondaryUploadDate,'%Y-%m-%d') >= date_format('" + uploadStartDate + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(uploadEndDate), "date_format (secondaryUploadDate,'%Y-%m-%d') <= date_format('" + uploadEndDate + "','%Y-%m-%d')"
);
qw.orderByDesc("createTime");
List<ScmVehRebateExcelVo> scmVehRebateExcelVos = baseMapper.excelList(qw);
for (ScmVehRebateExcelVo scmVehRebateExcelVo : scmVehRebateExcelVos) {

2
yxt-oa/src/main/java/com/yxt/anrui/oa/api/AdOffSpaceApplyRest.java

@ -40,7 +40,7 @@ import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
@Api(tags = "宿舍租赁申请")
@Api(tags = "办公场地租赁申请")
@RestController
@RequestMapping("v1/officeSpaceRentalapply")
public class AdOffSpaceApplyRest {

2
yxt-oa/src/main/java/com/yxt/anrui/oa/api/AdPircarpulApplyRest.java

@ -39,7 +39,7 @@ import javax.validation.Valid;
@Api(tags = "临时私车公用申请")
@RestController
@RequestMapping("v1/adpircarpulapply")
@RequestMapping("v1/privateCarPublicUseapply")
public class AdPircarpulApplyRest {
@Autowired

105
yxt-oa/src/main/java/com/yxt/anrui/oa/api/AdSalecarpulApplyRest.java

@ -0,0 +1,105 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.oa.api;
import com.yxt.anrui.oa.biz.adpircarpulapply.AdPircarpulApplyDetailsVo;
import com.yxt.anrui.oa.biz.adsalecarpulapply.*;
import com.yxt.anrui.oa.biz.oaform.flowable.CompleteDto;
import com.yxt.anrui.oa.biz.oaform.flowable.NodeQuery;
import com.yxt.anrui.oa.biz.oaform.flowable.TaskDto;
import com.yxt.common.core.result.ResultBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
@Api(tags = "销售人员固定私车公用申请")
@RestController
@RequestMapping("v1/salesPrivateCarPublicUse")
public class AdSalecarpulApplyRest {
@Autowired
private AdSalecarpulApplyService adSalecarpulApplyService;
@ApiOperation("初始化(新增或修改)")
@GetMapping({"/getInit", "/getInit/{sid}"})
public ResultBean<AdSalecarpulApplyVo> getInit(
@PathVariable(value = "sid", required = false) String sid,
@RequestParam(value = "userSid", required = false) String userSid,
@RequestParam(value = "orgPath", required = false) String orgPath) {
ResultBean<AdSalecarpulApplyVo> rb = ResultBean.fireFail();
if (sid == null || sid.isEmpty()) {
// 执行新增初始化
if (userSid == null || orgPath == null) {
return rb.setMsg("userSid和orgPath不能为空");
}
return adSalecarpulApplyService.getSaveInit(userSid, orgPath);
} else {
// 执行修改初始化
return adSalecarpulApplyService.getUpdateInit(sid);
}
}
@ApiOperation("新增或修改")
@PostMapping("/save")
public ResultBean save(@RequestBody AdSalecarpulApplyDto dto) {
return adSalecarpulApplyService.saveOrUpdateDto(dto);
}
@ApiOperation("详情")
@GetMapping("/details/{sid}")
ResultBean<AdSalecarpulApplyDetailsVo> details(@PathVariable("sid") String sid
, @RequestParam(value = "application", required = false) String application) {
return adSalecarpulApplyService.details(sid,application);
}
@ApiOperation("提交审批流程")
@PostMapping("/submit")
public ResultBean submit(@RequestBody AdSalecarpulApplyDto dto) {
return adSalecarpulApplyService.submit(dto);
}
@ApiOperation(value = "办理(同意)")
@PutMapping("/complete")
public ResultBean complete(@Valid @RequestBody CompleteDto dto) {
return adSalecarpulApplyService.complete(dto);
}
@ApiOperation(value = "驳回任务")
@PutMapping(value = "/reject")
public ResultBean reject(@Valid @RequestBody TaskDto dto) {
return adSalecarpulApplyService.reject(dto);
}
@ApiOperation("获取流程操作标题")
@GetMapping("/getFlowOperateTitle")
@ResponseBody
ResultBean<String> getFlowOperateTitle(@SpringQueryMap NodeQuery query) {
return adSalecarpulApplyService.getFlowOperateTitle(query);
}
}

36
yxt-oa/src/main/java/com/yxt/anrui/oa/api/AdSalecarpulDetailRest.java

@ -0,0 +1,36 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.oa.api;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;
@Api(tags = "销售人员固定私车公用列表")
@RestController
@RequestMapping("v1/adsalecarpuldetail")
public class AdSalecarpulDetailRest {
}

4
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adexpatriateshomeapply/AdExpatriatesHomeApplyService.java

@ -148,8 +148,8 @@ public class AdExpatriatesHomeApplyService extends MybatisBaseService<AdExpatria
baseMapper.updateById(entity);
}
// 处理附件
saveFiles(sid, files, OaFileEnum.ADEXPATRIATESAPPLY.getAttachType(), "图片");
saveFiles(sid, appes, OaFileEnum.ADEXPATRIATESAPPLY.getAttachType(), "文件");
saveFiles(sid, files, OaFileEnum.ADEXPATRIATESHOMEAPPLY.getAttachType(), "图片");
saveFiles(sid, appes, OaFileEnum.ADEXPATRIATESHOMEAPPLY.getAttachType(), "文件");
return rb.success().setData(sid);
}

6
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adfeteapply/AdFeteApplyDetailsVo.java

@ -26,18 +26,16 @@
package com.yxt.anrui.oa.biz.adfeteapply;
import com.yxt.anrui.oa.biz.adfetedetail.AdFeteListDetailVo;
import com.yxt.common.core.vo.Vo;
import com.yxt.anrui.oa.biz.oaform.OaFormCommonVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
@Data
@ApiModel(value = "商务宴请事前申请 视图数据详情", description = "商务宴请事前申请 视图数据详情")
public class AdFeteApplyDetailsVo implements Vo {
public class AdFeteApplyDetailsVo extends OaFormCommonVo {
@ApiModelProperty("备注")
private String remarks;

4
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adfeteapply/AdFeteApplyMapper.xml

@ -3,7 +3,7 @@
<mapper namespace="com.yxt.anrui.oa.biz.adfeteapply.AdFeteApplyMapper">
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="details" resultType="com.yxt.anrui.oa.biz.adfeteapply.AdFeteApplyDetailsVo">
<select id="details" resultMap="detailMap">
select remarks, sid
from ad_fete_apply
where sid = #{sid}
@ -18,7 +18,7 @@
<select id="selectList" resultType="com.yxt.anrui.oa.biz.adfetedetail.AdFeteListDetailVo">
select sid,
deptName,
deptName as deptValue,
banquetDate,
banquetNum,
banquetObject,

6
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adfeteapply/AdFeteApplyService.java

@ -87,7 +87,7 @@ public class AdFeteApplyService extends MybatisBaseService<AdFeteApplyMapper, Ad
list.removeAll(Collections.singleton(null));
if (!list.isEmpty()) {
list.stream().forEach(details -> {
FormCommon deptObj = FormCommon.of(details.getDeptSid(), details.getDeptName());
FormCommon deptObj = FormCommon.of(details.getDeptKey(), details.getDeptValue());
details.setDeptObj(deptObj);
FormCommon isUseCanteenObj = FormCommon.of(details.getIsUseCanteenKey(), details.getIsUseCanteenValue());
details.setIsUseCanteenObj(isUseCanteenObj);
@ -134,8 +134,8 @@ public class AdFeteApplyService extends MybatisBaseService<AdFeteApplyMapper, Ad
}
adFeteDetailService.saveDetails(list, sid);
// 处理附件
saveFiles(sid, files, OaFileEnum.ADEXPATRIATESAPPLY.getAttachType(), "图片");
saveFiles(sid, appes, OaFileEnum.ADEXPATRIATESAPPLY.getAttachType(), "文件");
saveFiles(sid, files, OaFileEnum.ADFETEAPPLY.getAttachType(), "图片");
saveFiles(sid, appes, OaFileEnum.ADFETEAPPLY.getAttachType(), "文件");
return rb.success().setData(sid);
}

4
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adfetedetail/AdFeteDetailDto.java

@ -38,8 +38,8 @@ public class AdFeteDetailDto implements Dto {
@ApiModelProperty("部门")
private FormCommon deptObj;
private String deptSid;
private String deptName;
private String deptKey;
private String deptValue;
@ApiModelProperty("宴请时间")
private String banquetDate;
@ApiModelProperty("宴请人数")

4
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adfetedetail/AdFeteDetailMapper.xml

@ -5,8 +5,8 @@
<!-- ${ew.customSqlSegment} -->
<select id="getUpdateInit" resultType="com.yxt.anrui.oa.biz.adfetedetail.AdFeteDetailVo">
select sid,
deptSid,
deptName,
deptSid as deptKey,
deptName as deptValue,
banquetDate,
banquetNum,
banquetObject,

2
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adfetedetail/AdFeteDetailService.java

@ -48,6 +48,8 @@ public class AdFeteDetailService extends MybatisBaseService<AdFeteDetailMapper,
list.stream().forEach(details -> {
AdFeteDetail adFeteDetail = new AdFeteDetail();
BeanUtil.copyProperties(details, adFeteDetail);
adFeteDetail.setDeptSid(details.getDeptKey());
adFeteDetail.setDeptName(details.getDeptValue());
adFeteDetail.setMainSid(sid);
baseMapper.insert(adFeteDetail);
});

4
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adfetedetail/AdFeteDetailVo.java

@ -40,8 +40,8 @@ public class AdFeteDetailVo implements Vo {
@ApiModelProperty("部门")
private FormCommon deptObj;
private String deptSid;
private String deptName;
private String deptKey;
private String deptValue;
@ApiModelProperty("宴请时间")
private String banquetDate;
@ApiModelProperty("宴请人数")

3
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adfetedetail/AdFeteListDetailVo.java

@ -25,6 +25,7 @@
*********************************************************/
package com.yxt.anrui.oa.biz.adfetedetail;
import com.yxt.anrui.oa.biz.oaform.FormCommon;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -38,7 +39,7 @@ public class AdFeteListDetailVo implements Vo {
private String sid;
@ApiModelProperty("部门")
private String deptName;
private String deptValue;
@ApiModelProperty("宴请时间")
private String banquetDate;
@ApiModelProperty("宴请人数")

4
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adfrockallotapply/AdFrockallotApplyDetailsVo.java

@ -26,7 +26,7 @@
package com.yxt.anrui.oa.biz.adfrockallotapply;
import com.yxt.anrui.oa.biz.adfrockallotdetail.AdFrockallotListDetailVo;
import com.yxt.common.core.vo.Vo;
import com.yxt.anrui.oa.biz.oaform.OaFormCommonVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -35,7 +35,7 @@ import java.util.List;
@Data
@ApiModel(value = "工装订制配发申请 视图数据详情", description = "工装订制配发申请 视图数据详情")
public class AdFrockallotApplyDetailsVo implements Vo {
public class AdFrockallotApplyDetailsVo extends OaFormCommonVo {
@ApiModelProperty("备注")
private String remarks;

2
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adfrockallotapply/AdFrockallotApplyMapper.xml

@ -3,7 +3,7 @@
<mapper namespace="com.yxt.anrui.oa.biz.adfrockallotapply.AdFrockallotApplyMapper">
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="details" resultType="com.yxt.anrui.oa.biz.adfrockallotapply.AdFrockallotApplyDetailsVo">
<select id="details" resultMap="detailMap">
select remarks, sid
from ad_frockallot_apply
where sid = #{sid}

11
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adfrockallotapply/AdFrockallotApplyService.java

@ -29,6 +29,7 @@ import cn.hutool.core.bean.BeanUtil;
import com.yxt.anrui.oa.biz.adfrockallotdetail.AdFrockallotDetailDto;
import com.yxt.anrui.oa.biz.adfrockallotdetail.AdFrockallotDetailService;
import com.yxt.anrui.oa.biz.adfrockallotdetail.AdFrockallotDetailVo;
import com.yxt.anrui.oa.biz.adfrockallotdetail.AdFrockallotListDetailVo;
import com.yxt.anrui.oa.biz.oaappendix.OaAppendixService;
import com.yxt.anrui.oa.biz.oaform.*;
import com.yxt.anrui.oa.biz.oaform.flowable.*;
@ -49,6 +50,7 @@ import java.util.Map;
@Service
public class AdFrockallotApplyService extends MybatisBaseService<AdFrockallotApplyMapper, AdFrockallotApply> {
@Autowired
private OaAppendixService oaAppendixService;
@Autowired
@ -123,8 +125,8 @@ public class AdFrockallotApplyService extends MybatisBaseService<AdFrockallotApp
}
adFrockallotDetailService.saveDetails(list, sid);
// 处理附件
saveFiles(sid, files, OaFileEnum.ADEXPATRIATESAPPLY.getAttachType(), "图片");
saveFiles(sid, appes, OaFileEnum.ADEXPATRIATESAPPLY.getAttachType(), "文件");
saveFiles(sid, files, OaFileEnum.ADFROCKALLOTAPPLY.getAttachType(), "图片");
saveFiles(sid, appes, OaFileEnum.ADFROCKALLOTAPPLY.getAttachType(), "文件");
return rb.success().setData(sid);
}
@ -144,6 +146,11 @@ public class AdFrockallotApplyService extends MybatisBaseService<AdFrockallotApp
List<String> appes = oaAppendixService.selectByLinkSid(sid, "文件");
adFrockallotApplyDetailsVo.setFiles(files);
adFrockallotApplyDetailsVo.setAppes(appes);
//子表附件赋值
for (AdFrockallotListDetailVo adFrockallotListDetailVo : adFrockallotApplyDetailsVo.getList()) {
List<String> detailFiles = oaAppendixService.selectByLinkSid(adFrockallotListDetailVo.getSid());
adFrockallotListDetailVo.setDetailFiles(detailFiles);
}
//基础字段赋值
BeanUtil.copyProperties(oaFormService.getDetails(sid), adFrockallotApplyDetailsVo);
return rb.success().setData(adFrockallotApplyDetailsVo);

4
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adfrockallotdetail/AdFrockallotDetailDto.java

@ -33,6 +33,8 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
@Data
@ -43,4 +45,6 @@ public class AdFrockallotDetailDto implements Dto {
private BigDecimal expectCost; // 预计费用
@ApiModelProperty("费用明细")
private String costRemarks; // 费用明细
private List<String> detailFiles = new ArrayList<>();
}

64
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adfrockallotdetail/AdFrockallotDetailService.java

@ -26,35 +26,55 @@
package com.yxt.anrui.oa.biz.adfrockallotdetail;
import cn.hutool.core.bean.BeanUtil;
import com.yxt.anrui.oa.biz.oaappendix.OaAppendixService;
import com.yxt.anrui.oa.feign.file.OaFileEnum;
import com.yxt.common.base.service.MybatisBaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Collections;
import java.util.List;
@Service
public class AdFrockallotDetailService extends MybatisBaseService<AdFrockallotDetailMapper, AdFrockallotDetail> {
public void saveDetails(List<AdFrockallotDetailDto> list, String sid) {
//根据sid查询明细并删除
List<AdFrockallotDetail> list2 = baseMapper.selectByMainSid(sid);
list2.removeAll(Collections.singleton(null));
if (!list2.isEmpty()) {
list2.stream().forEach(v -> {
deleteBySid(v.getSid());
});
}
list.removeAll(Collections.singleton(null));
if (!list.isEmpty()) {
list.stream().forEach(details -> {
AdFrockallotDetail adFrockallotDetail = new AdFrockallotDetail();
BeanUtil.copyProperties(details, adFrockallotDetail);
adFrockallotDetail.setMainSid(sid);
baseMapper.insert(adFrockallotDetail);
});
}
}
@Autowired
private OaAppendixService oaAppendixService;
public void saveDetails(List<AdFrockallotDetailDto> list, String sid) {
//根据sid查询明细并删除
List<AdFrockallotDetail> list2 = baseMapper.selectByMainSid(sid);
list2.removeAll(Collections.singleton(null));
if (!list2.isEmpty()) {
list2.stream().forEach(v -> {
deleteBySid(v.getSid());
});
}
list.removeAll(Collections.singleton(null));
if (!list.isEmpty()) {
list.stream().forEach(details -> {
AdFrockallotDetail adFrockallotDetail = new AdFrockallotDetail();
BeanUtil.copyProperties(details, adFrockallotDetail);
adFrockallotDetail.setMainSid(sid);
baseMapper.insert(adFrockallotDetail);
List<String> detailFiles = details.getDetailFiles();
saveFiles(adFrockallotDetail.getSid(), detailFiles, OaFileEnum.ADFROCKALLOTAPPLY.getAttachType(), "");
});
}
}
public List<AdFrockallotDetailVo> getUpdateInit(String sid) {
List<AdFrockallotDetailVo> adFrockallotDetailVos = baseMapper.getUpdateInit(sid);
for (AdFrockallotDetailVo adFrockallotDetailVo : adFrockallotDetailVos) {
List<String> detailFiles = oaAppendixService.selectByLinkSid(adFrockallotDetailVo.getSid());
adFrockallotDetailVo.setDetailFiles(detailFiles);
}
return adFrockallotDetailVos;
}
public List<AdFrockallotDetailVo> getUpdateInit(String sid) {
return baseMapper.getUpdateInit(sid);
}
// 保存文件
private void saveFiles(String sid, List<String> files, String attachType, String fileType) {
files.removeAll(Collections.singleton(null));
oaAppendixService.saveFile(sid, files, attachType, fileType);
}
}

4
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adfrockallotdetail/AdFrockallotDetailVo.java

@ -33,6 +33,8 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
@Data
@ -45,4 +47,6 @@ public class AdFrockallotDetailVo implements Vo {
private BigDecimal expectCost; // 预计费用
@ApiModelProperty("费用明细")
private String costRemarks; // 费用明细
private List<String> detailFiles = new ArrayList<>();
}

4
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adfrockallotdetail/AdFrockallotListDetailVo.java

@ -30,6 +30,8 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
@Data
@ApiModel(value = "工装订制配发列表 视图数据对象", description = "工装订制配发列表 视图数据对象")
@ -41,4 +43,6 @@ public class AdFrockallotListDetailVo implements Vo {
private BigDecimal expectCost; // 预计费用
@ApiModelProperty("费用明细")
private String costRemarks; // 费用明细
private List<String> detailFiles = new ArrayList<>();
}

1
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adgroupdocumentsapply/AdGroupDocumentsApplyMapper.xml

@ -9,6 +9,7 @@
${ew.sqlSegment}
</where>
</select>
<select id="details" resultType="com.yxt.anrui.oa.biz.adgroupdocumentsapply.AdGroupDocumentsApplyVo">
select *
from ad_group_documentsapply_apply

1
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adgroupsystemapply/AdGroupSystemApplyMapper.xml

@ -9,6 +9,7 @@
${ew.sqlSegment}
</where>
</select>
<select id="details" resultType="com.yxt.anrui.oa.biz.adgroupsystemapply.AdGroupSystemApplyVo">
select *
from ad_group_system_apply

21
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adleasehostapply/AdLeasehostApplyDetailsVo.java

@ -25,34 +25,17 @@
*********************************************************/
package com.yxt.anrui.oa.biz.adleasehostapply;
import com.yxt.anrui.oa.biz.adexpatriatesdetail.AdExpatriatesListDetailVo;
import com.yxt.anrui.oa.biz.adleasehostdetail.AdLeasehostListDetailVo;
import com.yxt.common.core.vo.Vo;
import com.yxt.anrui.oa.biz.oaform.OaFormCommonVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* Project: yxt-oa(宿舍租赁) <br/>
* File: AdLeasehostApplyVo.java <br/>
* Class: com.yxt.anrui.oa.api.adleasehostapply.AdLeasehostApplyVo <br/>
* Description: 宿舍租赁申请 视图数据对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2025-02-17 14:11:50 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "宿舍租赁申请 视图数据详情", description = "宿舍租赁申请 视图数据详情")
public class AdLeasehostApplyDetailsVo implements Vo {
public class AdLeasehostApplyDetailsVo extends OaFormCommonVo {
@ApiModelProperty("备注")
private String remarks;

2
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adleasehostapply/AdLeasehostApplyMapper.xml

@ -3,7 +3,7 @@
<mapper namespace="com.yxt.anrui.oa.biz.adleasehostapply.AdLeasehostApplyMapper">
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="details" resultType="com.yxt.anrui.oa.biz.adleasehostapply.AdLeasehostApplyDetailsVo">
<select id="details" resultMap="detailMap">
select remarks, sid
from ad_leasehost_apply
where sid = #{sid}

4
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adleasehostapply/AdLeasehostApplyService.java

@ -130,8 +130,8 @@ public class AdLeasehostApplyService extends MybatisBaseService<AdLeasehostApply
}
adLeasehostDetailService.saveDetails(list, sid);
// 处理附件
saveFiles(sid, files, OaFileEnum.ADEXPATRIATESAPPLY.getAttachType(), "图片");
saveFiles(sid, appes, OaFileEnum.ADEXPATRIATESAPPLY.getAttachType(), "文件");
saveFiles(sid, files, OaFileEnum.ADLEASEHOSTAPPLY.getAttachType(), "图片");
saveFiles(sid, appes, OaFileEnum.ADLEASEHOSTAPPLY.getAttachType(), "文件");
return rb.success().setData(sid);
}

6
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adnoexpatriateshostelapply/AdNoexpatriatesHostelApplyDetailsVo.java

@ -26,18 +26,16 @@
package com.yxt.anrui.oa.biz.adnoexpatriateshostelapply;
import com.yxt.anrui.oa.biz.adnoexpatriateshosteldetail.AdNoexpatriatesHostelListDetailVo;
import com.yxt.common.core.vo.Vo;
import com.yxt.anrui.oa.biz.oaform.OaFormCommonVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
@Data
@ApiModel(value = "非驻外人员申请宿舍申请 视图数据详情", description = "非驻外人员申请宿舍申请 视图数据详情")
public class AdNoexpatriatesHostelApplyDetailsVo implements Vo {
public class AdNoexpatriatesHostelApplyDetailsVo extends OaFormCommonVo {
@ApiModelProperty("备注")
private String remarks;

3
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adnoexpatriateshostelapply/AdNoexpatriatesHostelApplyMapper.xml

@ -4,8 +4,7 @@
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="details"
resultType="com.yxt.anrui.oa.biz.adnoexpatriateshostelapply.AdNoexpatriatesHostelApplyDetailsVo">
<select id="details" resultMap="detailMap">
select sid,
remarks
from ad_noexpatriates_hostel_apply

4
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adnoexpatriateshostelapply/AdNoexpatriatesHostelApplyService.java

@ -136,8 +136,8 @@ public class AdNoexpatriatesHostelApplyService extends MybatisBaseService<AdNoex
}
adNoexpatriatesHostelDetailService.saveDetails(list, sid);
// 处理附件
saveFiles(sid, files, OaFileEnum.ADEXPATRIATESAPPLY.getAttachType(), "图片");
saveFiles(sid, appes, OaFileEnum.ADEXPATRIATESAPPLY.getAttachType(), "文件");
saveFiles(sid, files, OaFileEnum.ADNOEXPATRIATESHOSTELAPPLY.getAttachType(), "图片");
saveFiles(sid, appes, OaFileEnum.ADNOEXPATRIATESHOSTELAPPLY.getAttachType(), "文件");
return rb.success().setData(sid);
}

9
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adoffspaceapply/AdOffspaceApplyDetailsVo.java

@ -25,22 +25,17 @@
*********************************************************/
package com.yxt.anrui.oa.biz.adoffspaceapply;
import com.yxt.anrui.oa.biz.adleasehostdetail.AdLeasehostListDetailVo;
import com.yxt.anrui.oa.biz.adoffspacedetail.AdOffspaceListDetailVo;
import com.yxt.common.core.vo.Vo;
import com.yxt.anrui.oa.biz.oaform.OaFormCommonVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
@Data
@ApiModel(value = "办公场地租赁申请 视图数据详情", description = "办公场地租赁申请 视图数据详情")
public class AdOffspaceApplyDetailsVo implements Vo {
public class AdOffspaceApplyDetailsVo extends OaFormCommonVo {
@ApiModelProperty("备注")
private String remarks;

2
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adoffspaceapply/AdOffspaceApplyMapper.xml

@ -4,7 +4,7 @@
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="details" resultType="com.yxt.anrui.oa.biz.adoffspaceapply.AdOffspaceApplyDetailsVo">
<select id="details" resultMap="detailMap">
select remarks, sid
from ad_offspace_apply
where sid = #{sid}

4
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adoffspaceapply/AdOffspaceApplyService.java

@ -126,8 +126,8 @@ public class AdOffspaceApplyService extends MybatisBaseService<AdOffspaceApplyMa
}
adOffspaceDetailService.saveDetails(list, sid);
// 处理附件
saveFiles(sid, files, OaFileEnum.ADEXPATRIATESAPPLY.getAttachType(), "图片");
saveFiles(sid, appes, OaFileEnum.ADEXPATRIATESAPPLY.getAttachType(), "文件");
saveFiles(sid, files, OaFileEnum.ADOFFSPACEAPPLY.getAttachType(), "图片");
saveFiles(sid, appes, OaFileEnum.ADOFFSPACEAPPLY.getAttachType(), "文件");
return rb.success().setData(sid);
}

20
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adpircarpulapply/AdPircarpulApplyDetailsVo.java

@ -25,33 +25,17 @@
*********************************************************/
package com.yxt.anrui.oa.biz.adpircarpulapply;
import com.yxt.anrui.oa.biz.adleasehostdetail.AdLeasehostListDetailVo;
import com.yxt.common.core.vo.Vo;
import com.yxt.anrui.oa.biz.oaform.OaFormCommonVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* Project: yxt-oa(私车临时公用) <br/>
* File: AdPircarpulApplyVo.java <br/>
* Class: com.yxt.anrui.oa.api.adpircarpulapply.AdPircarpulApplyVo <br/>
* Description: 临时私车公用申请 视图数据对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2025-02-20 09:42:01 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "临时私车公用申请 视图数据详情", description = "临时私车公用申请 视图数据详情")
public class AdPircarpulApplyDetailsVo implements Vo {
public class AdPircarpulApplyDetailsVo extends OaFormCommonVo {
@ApiModelProperty("备注")
private String remarks;

5
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adpircarpulapply/AdPircarpulApplyMapper.xml

@ -3,7 +3,7 @@
<mapper namespace="com.yxt.anrui.oa.biz.adpircarpulapply.AdPircarpulApplyMapper">
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="details" resultType="com.yxt.anrui.oa.biz.adpircarpulapply.AdPircarpulApplyDetailsVo">
<select id="details" resultMap="detailMap">
select remarks, sid
from ad_pircarpul_apply
where sid = #{sid}
@ -18,11 +18,8 @@
<select id="selectList" resultType="com.yxt.anrui.oa.biz.adpircarpuldetail.AdPircarpulListDetailVo">
select sid,
userSid as userKey,
userName as userValue,
deptSid as deptKey,
deptName as deptValue,
postSid as jobKey,
postName as jobValue,
reasonsForUsingVehicles,
departureAddress,

4
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adpircarpulapply/AdPircarpulApplyService.java

@ -134,8 +134,8 @@ public class AdPircarpulApplyService extends MybatisBaseService<AdPircarpulApply
}
adPircarpulDetailService.saveDetails(list, sid);
// 处理附件
saveFiles(sid, files, OaFileEnum.ADEXPATRIATESAPPLY.getAttachType(), "图片");
saveFiles(sid, appes, OaFileEnum.ADEXPATRIATESAPPLY.getAttachType(), "文件");
saveFiles(sid, files, OaFileEnum.ADPIRCARPULAPPLY.getAttachType(), "图片");
saveFiles(sid, appes, OaFileEnum.ADPIRCARPULAPPLY.getAttachType(), "文件");
return rb.success().setData(sid);
}

6
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adpircarpuldetail/AdPircarpulDetailService.java

@ -48,6 +48,12 @@ public class AdPircarpulDetailService extends MybatisBaseService<AdPircarpulDeta
list.stream().forEach(details -> {
AdPircarpulDetail adPircarpulDetail = new AdPircarpulDetail();
BeanUtil.copyProperties(details, adPircarpulDetail);
adPircarpulDetail.setDeptSid(details.getDeptKey());
adPircarpulDetail.setDeptName(details.getDeptValue());
adPircarpulDetail.setUserSid(details.getUserKey());
adPircarpulDetail.setUserName(details.getUserValue());
adPircarpulDetail.setPostSid(details.getJobKey());
adPircarpulDetail.setPostName(details.getJobValue());
adPircarpulDetail.setMainSid(sid);
baseMapper.insert(adPircarpulDetail);
});

45
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsalecarpulapply/AdSalecarpulApply.java

@ -0,0 +1,45 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.oa.biz.adsalecarpulapply;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yxt.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value = "销售人员固定私车公用申请", description = "销售人员固定私车公用申请")
@TableName("ad_salecarpul_apply")
public class AdSalecarpulApply extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty("基础表单sid")
private String formSid; // 基础表单sid
@ApiModelProperty("关联审批sid列表,英文逗号分隔")
private String linkFormSids; // 关联审批sid列表,英文逗号分隔
}

49
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsalecarpulapply/AdSalecarpulApplyDetailsVo.java

@ -0,0 +1,49 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.oa.biz.adsalecarpulapply;
import com.yxt.anrui.oa.biz.adsalecarpuldetail.AdSalecarpulListDetailVo;
import com.yxt.anrui.oa.biz.oaform.OaFormCommonVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
@Data
@ApiModel(value = "销售人员固定私车公用申请 视图数据详情", description = "销售人员固定私车公用申请 视图数据详情")
public class AdSalecarpulApplyDetailsVo extends OaFormCommonVo {
@ApiModelProperty("备注")
private String remarks;
@ApiModelProperty("图片")
private List<String> files = new ArrayList<>();
@ApiModelProperty("附件")
private List<String> appes = new ArrayList<>();
private List<AdSalecarpulListDetailVo> list = new ArrayList<>();
}

52
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsalecarpulapply/AdSalecarpulApplyDto.java

@ -0,0 +1,52 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.oa.biz.adsalecarpulapply;
import com.yxt.anrui.oa.biz.adsalecarpuldetail.AdSalecarpulDetailDto;
import com.yxt.anrui.oa.biz.oaform.OaFormDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
@Data
@ApiModel(value = "销售人员固定私车公用申请 数据传输对象", description = "销售人员固定私车公用申请 数据传输对象")
public class AdSalecarpulApplyDto extends OaFormDto {
@ApiModelProperty("备注")
private String remarks;
@ApiModelProperty("基础表单sid")
private String formSid;
@ApiModelProperty("关联审批单")
private String linkFormSids;
@ApiModelProperty("图片")
private List<String> files = new ArrayList<>();
@ApiModelProperty("文件")
private List<String> appes = new ArrayList<>();
private List<AdSalecarpulDetailDto> list = new ArrayList<>();
}

35
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsalecarpulapply/AdSalecarpulApplyMapper.java

@ -0,0 +1,35 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.oa.biz.adsalecarpulapply;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface AdSalecarpulApplyMapper extends BaseMapper<AdSalecarpulApply> {
AdSalecarpulApplyDetailsVo details(String sid);
}

24
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsalecarpulapply/AdSalecarpulApplyMapper.xml

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yxt.anrui.oa.biz.adsalecarpulapply.AdSalecarpulApplyMapper">
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="details" resultMap="detailMap">
select remarks, sid
from ad_salecarpul_apply
where sid = #{sid}
</select>
<resultMap id="detailMap" type="com.yxt.anrui.oa.biz.adsalecarpulapply.AdSalecarpulApplyDetailsVo">
<result column="remarks" property="remarks"/>
<collection property="list" ofType="com.yxt.anrui.oa.biz.adsalecarpuldetail.AdSalecarpulListDetailVo"
select="selectList" column="sid">
</collection>
</resultMap>
<select id="selectList" resultType="com.yxt.anrui.oa.biz.adsalecarpuldetail.AdSalecarpulListDetailVo">
select sid
from ad_salecarpul_detail
where mainSid = #{sid}
</select>
</mapper>

307
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsalecarpulapply/AdSalecarpulApplyService.java

@ -0,0 +1,307 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.oa.biz.adsalecarpulapply;
import cn.hutool.core.bean.BeanUtil;
import com.yxt.anrui.oa.biz.adfrockallotdetail.AdFrockallotListDetailVo;
import com.yxt.anrui.oa.biz.adpircarpulapply.AdPircarpulApplyDetailsVo;
import com.yxt.anrui.oa.biz.adsalecarpuldetail.AdSalecarpulDetailDto;
import com.yxt.anrui.oa.biz.adsalecarpuldetail.AdSalecarpulDetailService;
import com.yxt.anrui.oa.biz.adsalecarpuldetail.AdSalecarpulDetailVo;
import com.yxt.anrui.oa.biz.adsalecarpuldetail.AdSalecarpulListDetailVo;
import com.yxt.anrui.oa.biz.oaappendix.OaAppendixService;
import com.yxt.anrui.oa.biz.oaform.*;
import com.yxt.anrui.oa.biz.oaform.flowable.*;
import com.yxt.anrui.oa.feign.file.OaFileEnum;
import com.yxt.anrui.oa.feign.flowable.flow.ProcDefEnum;
import com.yxt.anrui.oa.feign.portal.sysorganization.SysOrganizationFeign;
import com.yxt.anrui.oa.feign.portal.sysorganization.SysOrganizationVo;
import org.apache.commons.lang3.StringUtils;
import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.core.result.ResultBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service
public class AdSalecarpulApplyService extends MybatisBaseService<AdSalecarpulApplyMapper, AdSalecarpulApply> {
@Autowired
private OaAppendixService oaAppendixService;
@Autowired
private OaFormService oaFormService;
@Autowired
private AdSalecarpulDetailService adSalecarpulDetailService;
@Autowired
private SysOrganizationFeign sysOrganizationFeign;
public ResultBean<AdSalecarpulApplyVo> getSaveInit(String userSid, String orgPath) {
ResultBean<AdSalecarpulApplyVo> rb = ResultBean.fireFail();
AdSalecarpulApplyVo adSalecarpulApplyVo = new AdSalecarpulApplyVo();
adSalecarpulApplyVo.setCreateBySid(userSid);
adSalecarpulApplyVo.setOrgSidPath(orgPath);
return rb.success().setData(adSalecarpulApplyVo);
}
public ResultBean<AdSalecarpulApplyVo> getUpdateInit(String sid) {
ResultBean<AdSalecarpulApplyVo> rb = ResultBean.fireFail();
AdSalecarpulApplyVo adSalecarpulApplyVo = new AdSalecarpulApplyVo();
AdSalecarpulApply adSalecarpulApply = fetchBySid(sid);
if (adSalecarpulApply == null) {
return rb.setMsg("该申请不存在");
}
// adExpatriatesApplyVo.setTestPage(adExpatriatesApply.getTestPage());
OaForm oaForm = oaFormService.fetchBySid(sid);
adSalecarpulApplyVo.setTaskId(oaForm.getTaskId());
adSalecarpulApplyVo.setProcInsId(oaForm.getProcInstId());
//根据部门sid获取orgPath并赋值
SysOrganizationVo organizationVo = sysOrganizationFeign.fetchBySid(oaForm.getDeptSid()).getData();
String orgSidPath = organizationVo.getOrgSidPath();
adSalecarpulApplyVo.setOrgSidPath(orgSidPath);
adSalecarpulApplyVo.setCreateBySid(oaForm.getCreateBySid());
BeanUtil.copyProperties(adSalecarpulApply, adSalecarpulApplyVo);
List<AdSalecarpulDetailVo> list = adSalecarpulDetailService.getUpdateInit(sid);
List<String> files = oaAppendixService.selectByLinkSid(sid, "图片");
adSalecarpulApplyVo.setFiles(files);
List<String> appes = oaAppendixService.selectByLinkSid(sid, "文件");
adSalecarpulApplyVo.setAppes(appes);
adSalecarpulApplyVo.setList(list);
adSalecarpulApplyVo.setSid(sid);
return rb.success().setData(adSalecarpulApplyVo);
}
public ResultBean<String> saveOrUpdateDto(AdSalecarpulApplyDto dto) {
ResultBean<String> rb = ResultBean.fireFail();
String sid = dto.getSid();
List<String> files = dto.getFiles();
List<String> appes = dto.getAppes();
List<AdSalecarpulDetailDto> list = dto.getList();
if (StringUtils.isBlank(sid)) {
// 新建操作
AdSalecarpulApply entity = new AdSalecarpulApply();
BeanUtil.copyProperties(dto, entity, "sid");
dto.setBillNo("XSRYGDSCGYSQ");
dto.setSid(entity.getSid());
ResultBean<String> resultBean = oaFormService.saveOaForm(dto);
if (!resultBean.getSuccess()) {
return rb;
}
entity.setFormSid(resultBean.getData());
baseMapper.insert(entity);
sid = entity.getSid();
} else {
// 更新操作
AdSalecarpulApply entity = fetchBySid(sid);
BeanUtil.copyProperties(dto, entity, "id", "sid");
baseMapper.updateById(entity);
}
adSalecarpulDetailService.saveDetails(list, sid);
// 处理附件
saveFiles(sid, files, OaFileEnum.ADSALECARPULAPPLY.getAttachType(), "图片");
saveFiles(sid, appes, OaFileEnum.ADSALECARPULAPPLY.getAttachType(), "文件");
return rb.success().setData(sid);
}
// 保存文件
private void saveFiles(String sid, List<String> files, String attachType, String fileType) {
files.removeAll(Collections.singleton(null));
oaAppendixService.saveFile(sid, files, attachType, fileType);
}
public ResultBean<AdSalecarpulApplyDetailsVo> details(String sid, String application) {
ResultBean rb = ResultBean.fireFail();
AdSalecarpulApplyDetailsVo adSalecarpulApplyDetailsVo = baseMapper.details(sid);
if (adSalecarpulApplyDetailsVo == null) {
return rb.setMsg("该申请不存在");
}
List<String> files = oaAppendixService.selectByLinkSid(sid, "图片");
List<String> appes = oaAppendixService.selectByLinkSid(sid, "文件");
adSalecarpulApplyDetailsVo.setFiles(files);
adSalecarpulApplyDetailsVo.setAppes(appes);
//子表附件赋值
for (AdSalecarpulListDetailVo adSalecarpulListDetailVo : adSalecarpulApplyDetailsVo.getList()) {
List<String> detailFiles = oaAppendixService.selectByLinkSid(adSalecarpulListDetailVo.getSid());
adSalecarpulListDetailVo.setDetailFiles(detailFiles);
}
//基础字段赋值
BeanUtil.copyProperties(oaFormService.getDetails(sid), adSalecarpulApplyDetailsVo);
return rb.success().setData(adSalecarpulApplyDetailsVo);
}
/**
* 提交
*
* @param dto
* @return
*/
public ResultBean submit(AdSalecarpulApplyDto dto) {
ResultBean rb = ResultBean.fireFail();
ResultBean<String> stringResultBean = saveOrUpdateDto(dto);
if (!stringResultBean.getSuccess()) {
return rb.setMsg(stringResultBean.getData());
}
String businessSid = stringResultBean.getData();
SubmitDto submitDto = new SubmitDto();
submitDto.setUserSid(dto.getCreateBySid());
submitDto.setBusinessSid(businessSid);
Map<String, Object> formVariables = new HashMap<>();
formVariables = getMap(formVariables, businessSid);
submitDto.setFormVariables(formVariables);
submitDto.setProcDefId(ProcDefEnum.HIHIREAPPLY.getProDefId());
submitDto.setNextTaskId(dto.getTaskId());
submitDto.setRule(OaFormRuleEnum.DIRECTLY_UNDER.getRule());
return oaFormService.submit(submitDto);
}
/**
* 办理同意
*
* @param dto
* @return
*/
public ResultBean complete(CompleteDto dto) {
Map<String, Object> formVariables = dto.getFormVariables();
formVariables = getMap(formVariables, dto.getBusinessSid());
dto.setFormVariables(formVariables);
BusinessVariablesDto businessVariablesDto = new BusinessVariablesDto();
BeanUtil.copyProperties(dto, businessVariablesDto);
return oaFormService.complete(businessVariablesDto);
}
/**
* 驳回
*
* @param dto
* @return
*/
public ResultBean reject(TaskDto dto) {
Map<String, Object> formVariables = dto.getFormVariables();
formVariables = getMap(formVariables, dto.getBusinessSid());
dto.setFormVariables(formVariables);
return oaFormService.reject(dto);
}
public ResultBean<String> getFlowOperateTitle(NodeQuery query) {
// 默认失败返回
ResultBean<String> rb = ResultBean.fireFail();
// 获取next值和formVariables
int next = query.getNext();
// 获取并更新formVariables
Map<String, Object> formVariables = getMap(query.getFormVariables(), query.getBusinessSid());
query.setFormVariables(formVariables);
// 校验next参数是否有效(只允许0或1)
if (next != 0 && next != 1) {
return rb.setMsg("参数错误:next"); // 如果next不是0或1,返回错误信息
}
// 获取节点名称
String data = getNodeName(query, next);
// 如果data为null,表示未获取到有效的节点信息
if (data == null) {
return rb.setMsg("没有获取到节点信息"); // 返回错误消息
}
// 返回成功的结果和获取到的节点名称
return rb.success().setData(data);
}
/**
* 网关参数组成
*
* @param formVariables
* @param sid
* @return
*/
public Map<String, Object> getMap(Map<String, Object> formVariables, String sid) {
Map<String, Object> appMap = new HashMap<>();
appMap.put("sid", sid);
/*appMap.put("editUrl", "approval/#/pages/EditOnboradingApplyActivity?sid=" + sid);
appMap.put("detailUrl", "approval/#/pages/DetailOnboradingApplyActivity?sid=" + sid);
appMap.put("flowOperateUrl", "oa/v1/HrHireApply/getFlowOperateTitle");
appMap.put("agreeUrl", "oa/v1/HrHireApply/complete");
appMap.put("stopUrl", "oa/v1/oaform/breakProcess");
appMap.put("rejectUrl", "oa/v1/HrHireApply/reject");
appMap.put("recallUrl", "oa/v1/oaform/revokeProcess");
appMap.put("signUrl", "oa/v1/oaform/delegate");
appMap.put("transferUrl", "oa/v1/oaform/assignTask");*/
appMap.put(OaFormUrlEnum.HRHIREAPPLY_EDIT.getType(), OaFormUrlEnum.HRHIREAPPLY_EDIT.getUrl() + "?sid=" + sid);
appMap.put(OaFormUrlEnum.HRHIREAPPLY_DETAIL.getType(), OaFormUrlEnum.HRHIREAPPLY_DETAIL.getUrl() + "?sid=" + sid);
appMap.put(OaFormUrlEnum.HRHIREAPPLY_FLOWOPERATEURL.getType(), OaFormUrlEnum.HRHIREAPPLY_FLOWOPERATEURL.getUrl());
appMap.put(OaFormUrlEnum.HRHIREAPPLY_AGREEURL.getType(), OaFormUrlEnum.HRHIREAPPLY_AGREEURL.getUrl());
appMap.put(OaFormUrlEnum.STOPURL.getType(), OaFormUrlEnum.STOPURL.getUrl());
appMap.put(OaFormUrlEnum.HRHIREAPPLY_REJECTURL.getType(), OaFormUrlEnum.HRHIREAPPLY_REJECTURL.getUrl());
appMap.put(OaFormUrlEnum.RECALLURL.getType(), OaFormUrlEnum.RECALLURL.getUrl());
appMap.put(OaFormUrlEnum.SIGNURL.getType(), OaFormUrlEnum.SIGNURL.getUrl());
appMap.put(OaFormUrlEnum.TRANSFERURL.getType(), OaFormUrlEnum.TRANSFERURL.getUrl());
formVariables.put("app", appMap);
//根据组织查询是否是分公司
OaForm oaForm = oaFormService.fetchBySid(sid);
AdSalecarpulApply adSalecarpulApply = fetchBySid(sid);
SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(oaForm.getUseOrgSid()).getData();
//是否是分公司
formVariables.put("isTrue", sysOrganization.getIsDept() == 0);
return formVariables;
}
/**
* 根据next的值获取前一个节点或下一个节点的名称
*
* @param query 包含查询所需参数的NodeQuery对象
* @param next 参数0表示上一环节1表示下一环节
* @return 节点名称如果失败则返回null
*/
private String getNodeName(NodeQuery query, int next) {
// 根据next值选择相应的服务方法获取节点信息
ResultBean<List<NodeVo>> resultBean = (next == 0)
? oaFormService.getPreviousNodesForReject(query) // 获取上一环节的节点
: oaFormService.getNextNodesForSubmit(query); // 获取下一环节的节点
// 如果服务调用成功
if (resultBean.getSuccess()) {
// 清除结果列表中的null值,避免空节点
resultBean.getData().removeAll(Collections.singleton(null));
// 如果结果列表非空,返回第一个节点的名称
if (!resultBean.getData().isEmpty()) {
return resultBean.getData().get(0).getName();
}
} else {
// 如果服务调用失败,返回null
return null;
}
// 如果结果为空,返回null
return null;
}
}

60
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsalecarpulapply/AdSalecarpulApplyVo.java

@ -0,0 +1,60 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.oa.biz.adsalecarpulapply;
import com.yxt.anrui.oa.biz.adsalecarpuldetail.AdSalecarpulDetailVo;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
@Data
@ApiModel(value = "销售人员固定私车公用申请 视图数据对象", description = "销售人员固定私车公用申请 视图数据对象")
public class AdSalecarpulApplyVo implements Vo {
private String sid;
/* private String userSid;
private String orgPath;*/
private String orgSidPath;
private String createBySid;
@ApiModelProperty("备注")
private String remarks;
@ApiModelProperty("图片")
private List<String> files = new ArrayList<>();
@ApiModelProperty("附件")
private List<String> appes = new ArrayList<>();
private List<AdSalecarpulDetailVo> list = new ArrayList<>();
private String taskId;
@ApiModelProperty("流程实例id")
private String procInsId;
// private String testPage;
}

56
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsalecarpuldetail/AdSalecarpulDetail.java

@ -0,0 +1,56 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.oa.biz.adsalecarpuldetail;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yxt.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* Project: 1(1) <br/>
* File: AdSalecarpulDetail.java <br/>
* Class: com.yxt.anrui.oa.api.adsalecarpuldetail.AdSalecarpulDetail <br/>
* Description: 销售人员固定私车公用列表. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2025-02-26 11:41:34 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "销售人员固定私车公用列表", description = "销售人员固定私车公用列表")
@TableName("ad_salecarpul_detail")
public class AdSalecarpulDetail extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty("申请sid")
private String mainSid; // 申请sid
}

56
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsalecarpuldetail/AdSalecarpulDetailDto.java

@ -0,0 +1,56 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.oa.biz.adsalecarpuldetail;
import com.yxt.common.core.dto.Dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* Project: 1(1) <br/>
* File: AdSalecarpulDetailDto.java <br/>
* Class: com.yxt.anrui.oa.api.adsalecarpuldetail.AdSalecarpulDetailDto <br/>
* Description: 销售人员固定私车公用列表 数据传输对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2025-02-26 11:41:34 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "销售人员固定私车公用列表 数据传输对象", description = "销售人员固定私车公用列表 数据传输对象")
public class AdSalecarpulDetailDto implements Dto {
private List<String> detailFiles = new ArrayList<>();
}

40
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsalecarpuldetail/AdSalecarpulDetailMapper.java

@ -0,0 +1,40 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.oa.biz.adsalecarpuldetail;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@Mapper
public interface AdSalecarpulDetailMapper extends BaseMapper<AdSalecarpulDetail> {
List<AdSalecarpulDetailVo> getUpdateInit(String sid);
@Select("select * from ad_salecarpul_detail where mainSid = #{mainSid}")
List<AdSalecarpulDetail> selectByMainSid(String mainSid);
}

11
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsalecarpuldetail/AdSalecarpulDetailMapper.xml

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yxt.anrui.oa.biz.adsalecarpuldetail.AdSalecarpulDetailMapper">
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="getUpdateInit" resultType="com.yxt.anrui.oa.biz.adsalecarpuldetail.AdSalecarpulDetailVo">
select sid
from ad_salecarpul_detail
where mainSid = #{sid}
</select>
</mapper>

79
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsalecarpuldetail/AdSalecarpulDetailService.java

@ -0,0 +1,79 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.oa.biz.adsalecarpuldetail;
import cn.hutool.core.bean.BeanUtil;
import com.yxt.anrui.oa.biz.oaappendix.OaAppendixService;
import com.yxt.anrui.oa.feign.file.OaFileEnum;
import com.yxt.common.base.service.MybatisBaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Collections;
import java.util.List;
@Service
public class AdSalecarpulDetailService extends MybatisBaseService<AdSalecarpulDetailMapper, AdSalecarpulDetail> {
@Autowired
private OaAppendixService oaAppendixService;
public void saveDetails(List<AdSalecarpulDetailDto> list, String sid) {
//根据sid查询明细并删除
List<AdSalecarpulDetail> list2 = baseMapper.selectByMainSid(sid);
list2.removeAll(Collections.singleton(null));
if (!list2.isEmpty()) {
list2.stream().forEach(v -> {
deleteBySid(v.getSid());
});
}
list.removeAll(Collections.singleton(null));
if (!list.isEmpty()) {
list.stream().forEach(details -> {
AdSalecarpulDetail adSalecarpulDetail = new AdSalecarpulDetail();
BeanUtil.copyProperties(details, adSalecarpulDetail);
adSalecarpulDetail.setMainSid(sid);
baseMapper.insert(adSalecarpulDetail);
List<String> detailFiles = details.getDetailFiles();
saveFiles(adSalecarpulDetail.getSid(), detailFiles, OaFileEnum.ADSALECARPULAPPLY.getAttachType(), "");
});
}
}
public List<AdSalecarpulDetailVo> getUpdateInit(String sid) {
List<AdSalecarpulDetailVo> adSalecarpulDetailVos = baseMapper.getUpdateInit(sid);
for (AdSalecarpulDetailVo adSalecarpulDetailVo : adSalecarpulDetailVos) {
List<String> detailFiles = oaAppendixService.selectByLinkSid(adSalecarpulDetailVo.getSid());
adSalecarpulDetailVo.setDetailFiles(detailFiles);
}
return adSalecarpulDetailVos;
}
// 保存文件
private void saveFiles(String sid, List<String> files, String attachType, String fileType) {
files.removeAll(Collections.singleton(null));
oaAppendixService.saveFile(sid, files, attachType, fileType);
}
}

58
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsalecarpuldetail/AdSalecarpulDetailVo.java

@ -0,0 +1,58 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.oa.biz.adsalecarpuldetail;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* Project: 1(1) <br/>
* File: AdSalecarpulDetailVo.java <br/>
* Class: com.yxt.anrui.oa.api.adsalecarpuldetail.AdSalecarpulDetailVo <br/>
* Description: 销售人员固定私车公用列表 视图数据对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2025-02-26 11:41:34 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "销售人员固定私车公用列表 视图数据对象", description = "销售人员固定私车公用列表 视图数据对象")
public class AdSalecarpulDetailVo implements Vo {
private String sid; // sid
private List<String> detailFiles = new ArrayList<>();
}

56
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsalecarpuldetail/AdSalecarpulListDetailVo.java

@ -0,0 +1,56 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.oa.biz.adsalecarpuldetail;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* Project: 1(1) <br/>
* File: AdSalecarpulDetailVo.java <br/>
* Class: com.yxt.anrui.oa.api.adsalecarpuldetail.AdSalecarpulDetailVo <br/>
* Description: 销售人员固定私车公用列表 视图数据对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2025-02-26 11:41:34 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "销售人员固定私车公用列表 视图数据对象", description = "销售人员固定私车公用列表 视图数据对象")
public class AdSalecarpulListDetailVo implements Vo {
private String sid; // sid
private List<String> detailFiles = new ArrayList<>();
}

17
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsenpircarpulapply/AdSenpircarpulApply.java

@ -31,28 +31,15 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* Project: yxt-oa(1) <br/>
* File: AdSenpircarpulApply.java <br/>
* Class: com.yxt.anrui.oa.api.adsenpircarpulapply.AdSenpircarpulApply <br/>
* Description: 总经理级固定私车公用申请. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2025-02-20 11:28:22 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "总经理级固定私车公用申请", description = "总经理级固定私车公用申请")
@TableName("ad_senpircarpul_apply")
public class AdSenpircarpulApply extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty("基础表单sid")
@ApiModelProperty("基础表单sid")
private String formSid; // 基础表单sid
@ApiModelProperty("关联审批sid列表,英文逗号分隔")
@ApiModelProperty("关联审批sid列表,英文逗号分隔")
private String linkFormSids; // 关联审批sid列表,英文逗号分隔
}

24
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsenpircarpulapply/AdSenpircarpulApplyDetailsVo.java

@ -25,33 +25,17 @@
*********************************************************/
package com.yxt.anrui.oa.biz.adsenpircarpulapply;
import com.yxt.anrui.oa.biz.adleasehostdetail.AdLeasehostListDetailVo;
import com.yxt.common.core.vo.Vo;
import com.yxt.anrui.oa.biz.adsenpircarpuldetail.AdSenpircarpulListDetailVo;
import com.yxt.anrui.oa.biz.oaform.OaFormCommonVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* Project: yxt-oa(1) <br/>
* File: AdSenpircarpulApplyVo.java <br/>
* Class: com.yxt.anrui.oa.api.adsenpircarpulapply.AdSenpircarpulApplyVo <br/>
* Description: 总经理级固定私车公用申请 视图数据对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2025-02-20 11:28:22 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "总经理级固定私车公用申请 视图数据详情", description = "总经理级固定私车公用申请 视图数据详情")
public class AdSenpircarpulApplyDetailsVo implements Vo {
public class AdSenpircarpulApplyDetailsVo extends OaFormCommonVo {
@ApiModelProperty("备注")
private String remarks;
@ -61,5 +45,5 @@ public class AdSenpircarpulApplyDetailsVo implements Vo {
@ApiModelProperty("附件")
private List<String> appes = new ArrayList<>();
private List<AdLeasehostListDetailVo> list = new ArrayList<>();
private List<AdSenpircarpulListDetailVo> list = new ArrayList<>();
}

6
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsenpircarpulapply/AdSenpircarpulApplyMapper.xml

@ -3,9 +3,9 @@
<mapper namespace="com.yxt.anrui.oa.biz.adsenpircarpulapply.AdSenpircarpulApplyMapper">
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="details" resultType="com.yxt.anrui.oa.biz.adsenpircarpulapply.AdSenpircarpulApplyDetailsVo">
<select id="details" resultMap="detailMap">
select remarks, sid
from ad_pircarpul_apply
from ad_senpircarpul_apply
where sid = #{sid}
</select>
@ -21,7 +21,7 @@
userName as userValue,
deptName as deptValue,
postName as jobValue
from ad_pircarpul_detail
from ad_senpircarpul_detail
where mainSid = #{sid}
</select>
</mapper>

12
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsenpircarpulapply/AdSenpircarpulApplyService.java

@ -26,9 +26,11 @@
package com.yxt.anrui.oa.biz.adsenpircarpulapply;
import cn.hutool.core.bean.BeanUtil;
import com.yxt.anrui.oa.biz.adfrockallotdetail.AdFrockallotListDetailVo;
import com.yxt.anrui.oa.biz.adsenpircarpuldetail.AdSenpircarpulDetailDto;
import com.yxt.anrui.oa.biz.adsenpircarpuldetail.AdSenpircarpulDetailService;
import com.yxt.anrui.oa.biz.adsenpircarpuldetail.AdSenpircarpulDetailVo;
import com.yxt.anrui.oa.biz.adsenpircarpuldetail.AdSenpircarpulListDetailVo;
import com.yxt.anrui.oa.biz.oaappendix.OaAppendixService;
import com.yxt.anrui.oa.biz.oaform.*;
import com.yxt.anrui.oa.biz.oaform.flowable.*;
@ -48,6 +50,7 @@ import java.util.Map;
@Service
public class AdSenpircarpulApplyService extends MybatisBaseService<AdSenpircarpulApplyMapper, AdSenpircarpulApply> {
@Autowired
private OaAppendixService oaAppendixService;
@Autowired
@ -133,8 +136,8 @@ public class AdSenpircarpulApplyService extends MybatisBaseService<AdSenpircarpu
}
adSenpircarpulDetailService.saveDetails(list, sid);
// 处理附件
saveFiles(sid, files, OaFileEnum.ADEXPATRIATESAPPLY.getAttachType(), "图片");
saveFiles(sid, appes, OaFileEnum.ADEXPATRIATESAPPLY.getAttachType(), "文件");
saveFiles(sid, files, OaFileEnum.ADSENPIRCARPULAPPLY.getAttachType(), "图片");
saveFiles(sid, appes, OaFileEnum.ADSENPIRCARPULAPPLY.getAttachType(), "文件");
return rb.success().setData(sid);
}
@ -154,6 +157,11 @@ public class AdSenpircarpulApplyService extends MybatisBaseService<AdSenpircarpu
List<String> appes = oaAppendixService.selectByLinkSid(sid, "文件");
adSenpircarpulApplyDetailsVo.setFiles(files);
adSenpircarpulApplyDetailsVo.setAppes(appes);
//子表附件赋值
for (AdSenpircarpulListDetailVo adSenpircarpulListDetailVo : adSenpircarpulApplyDetailsVo.getList()) {
List<String> detailFiles = oaAppendixService.selectByLinkSid(adSenpircarpulListDetailVo.getSid());
adSenpircarpulListDetailVo.setDetailFiles(detailFiles);
}
//基础字段赋值
BeanUtil.copyProperties(oaFormService.getDetails(sid), adSenpircarpulApplyDetailsVo);
return rb.success().setData(adSenpircarpulApplyDetailsVo);

5
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsenpircarpuldetail/AdSenpircarpulDetailDto.java

@ -33,6 +33,9 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* Project: yxt-oa(1) <br/>
* File: AdSenpircarpulDetailDto.java <br/>
@ -62,4 +65,6 @@ public class AdSenpircarpulDetailDto implements Dto {
private FormCommon jobObj;
private String jobKey;
private String jobValue;
private List<String> detailFiles = new ArrayList<>();
}

21
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsenpircarpuldetail/AdSenpircarpulDetailService.java

@ -26,7 +26,10 @@
package com.yxt.anrui.oa.biz.adsenpircarpuldetail;
import cn.hutool.core.bean.BeanUtil;
import com.yxt.anrui.oa.biz.oaappendix.OaAppendixService;
import com.yxt.anrui.oa.feign.file.OaFileEnum;
import com.yxt.common.base.service.MybatisBaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Collections;
import java.util.List;
@ -34,6 +37,9 @@ import java.util.List;
@Service
public class AdSenpircarpulDetailService extends MybatisBaseService<AdSenpircarpulDetailMapper, AdSenpircarpulDetail> {
@Autowired
private OaAppendixService oaAppendixService;
public void saveDetails(List<AdSenpircarpulDetailDto> list, String sid) {
//根据sid查询明细并删除
List<AdSenpircarpulDetail> list2 = baseMapper.selectByMainSid(sid);
@ -50,11 +56,24 @@ public class AdSenpircarpulDetailService extends MybatisBaseService<AdSenpircarp
BeanUtil.copyProperties(details, adSenpircarpulDetail);
adSenpircarpulDetail.setMainSid(sid);
baseMapper.insert(adSenpircarpulDetail);
List<String> detailFiles = details.getDetailFiles();
saveFiles(adSenpircarpulDetail.getSid(), detailFiles, OaFileEnum.ADSENPIRCARPULAPPLY.getAttachType(), "");
});
}
}
public List<AdSenpircarpulDetailVo> getUpdateInit(String sid) {
return baseMapper.getUpdateInit(sid);
List<AdSenpircarpulDetailVo> adSenpircarpulDetailVos = baseMapper.getUpdateInit(sid);
for (AdSenpircarpulDetailVo adSenpircarpulDetailVo : adSenpircarpulDetailVos) {
List<String> detailFiles = oaAppendixService.selectByLinkSid(adSenpircarpulDetailVo.getSid());
adSenpircarpulDetailVo.setDetailFiles(detailFiles);
}
return adSenpircarpulDetailVos;
}
// 保存文件
private void saveFiles(String sid, List<String> files, String attachType, String fileType) {
files.removeAll(Collections.singleton(null));
oaAppendixService.saveFile(sid, files, attachType, fileType);
}
}

5
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsenpircarpuldetail/AdSenpircarpulDetailVo.java

@ -33,6 +33,9 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* Project: yxt-oa(1) <br/>
* File: AdSenpircarpulDetailVo.java <br/>
@ -64,4 +67,6 @@ public class AdSenpircarpulDetailVo implements Vo {
private FormCommon jobObj;
private String jobKey;
private String jobValue;
private List<String> detailFiles = new ArrayList<>();
}

5
yxt-oa/src/main/java/com/yxt/anrui/oa/biz/adsenpircarpuldetail/AdSenpircarpulListDetailVo.java

@ -32,6 +32,9 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* Project: yxt-oa(1) <br/>
* File: AdSenpircarpulDetailVo.java <br/>
@ -57,4 +60,6 @@ public class AdSenpircarpulListDetailVo implements Vo {
private String deptValue;
@ApiModelProperty("岗位")
private String jobValue;
private List<String> detailFiles = new ArrayList<>();
}

9
yxt-oa/src/main/java/com/yxt/anrui/oa/feign/file/OaFileEnum.java

@ -15,6 +15,15 @@ public enum OaFileEnum {
ADALLOCATEASSETAPPLY("006", "固定资产调拨附件"),
ADDISPOSALASSETAPPLY("007", "固定资产处置附件"),
GROUPSYSTEMAPPLY("008", "集团制度会签附件"),
ADEXPATRIATESHOMEAPPLY("009", "驻外人员探亲附件"),
ADNOEXPATRIATESHOSTELAPPLY("010", "非驻外人员申请宿舍附件"),
ADLEASEHOSTAPPLY("011", "宿舍租赁附件"),
ADOFFSPACEAPPLY("012", "办公场地租赁附件"),
ADFROCKALLOTAPPLY("013", "工装订制配发附件"),
ADPIRCARPULAPPLY("014", "临时私车公用附件"),
ADSENPIRCARPULAPPLY("015", "总经理级固定私车公用附件"),
ADSALECARPULAPPLY("016", "销售人员固定私车公用方案附件"),
ADFETEAPPLY("017", "商务宴请事前附件"),
;

1
yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsSalesBillMapper.xml

@ -163,6 +163,7 @@
s.goodsAmount,
s.addAmount,
s.discountAmount,
s.settleAmount,
date_format(s.settleTime, '%Y-%m-%d') as settleDate
from
sms_sales_bill AS s

Loading…
Cancel
Save