From 170e86de3140d8e35167bd3c0dfd4c115e505869 Mon Sep 17 00:00:00 2001 From: ligaode Date: Thu, 19 Dec 2024 16:59:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/scmvehrebate/ScmVehRebateQuery.java | 8 ++- .../ScmVehRebateWithDetailsVo.java | 4 ++ .../ScmVehRebateWithApply.java | 8 +++ .../ScmVehRebateWithApplyDetailsVo.java | 7 +++ .../ScmVehRebateWithApplyDto.java | 18 ++++--- .../ScmVehRebateWithApplyQuery.java | 23 +++++---- .../ScmVehRebateWithApplyVo.java | 39 +++++++------- .../biz/scmvehrebate/ScmVehRebateService.java | 51 ++++++++++++++----- .../ScmVehRebateWithMapper.xml | 14 ++--- .../ScmVehRebateWithApplyMapper.java | 12 ++--- .../ScmVehRebateWithApplyMapper.xml | 18 ++++--- .../ScmVehRebateWithApplyService.java | 48 ++++++++++++----- 12 files changed, 162 insertions(+), 88 deletions(-) diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateQuery.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateQuery.java index 69963598ab..12c5049dc2 100644 --- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateQuery.java +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateQuery.java @@ -51,8 +51,8 @@ import java.util.List; @ApiModel(value = "单车返利表 查询条件", description = "单车返利表 查询条件") public class ScmVehRebateQuery implements Query { - @ApiModelProperty("品牌sid") - private String brandSid; + @ApiModelProperty("品牌") + private String brandName; @ApiModelProperty("车型名称") private String vehModelName; @ApiModelProperty("车架号") @@ -73,6 +73,10 @@ public class ScmVehRebateQuery implements Query { private List sidList; @ApiModelProperty("调整状态") private String adjustmentState; + @ApiModelProperty("分公司") + private String useOrgName; + @ApiModelProperty("采购系统") + private String purchaseSystemName; private String userSid; private String orgPath; diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewith/ScmVehRebateWithDetailsVo.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewith/ScmVehRebateWithDetailsVo.java index 302716dba7..0945ca675c 100644 --- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewith/ScmVehRebateWithDetailsVo.java +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewith/ScmVehRebateWithDetailsVo.java @@ -54,6 +54,10 @@ public class ScmVehRebateWithDetailsVo implements Vo { private String sid; // sid + @ApiModelProperty("采购系统") + private String purchaseSystemName; + @ApiModelProperty("品牌名称") + private String brandName; @ApiModelProperty("备注") private String remarks; // 备注 @ApiModelProperty("预提返利") diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApply.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApply.java index 80b0b60072..f5718949f5 100644 --- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApply.java +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApply.java @@ -26,11 +26,14 @@ package com.yxt.anrui.scm.api.scmvehrebatewithapply; import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; import com.yxt.common.core.domain.BaseEntity; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.util.Date; + /** * Project: anrui-scm(单车返利预提申请)
* File: ScmVehRebateWithApply.java
@@ -50,6 +53,8 @@ import lombok.Data; public class ScmVehRebateWithApply extends BaseEntity { private static final long serialVersionUID = 1L; + @ApiModelProperty("单据编号") + private String billNo; @ApiModelProperty("部门sid") private String deptSid; @ApiModelProperty("部门") @@ -82,4 +87,7 @@ public class ScmVehRebateWithApply extends BaseEntity { private String taskId; @ApiModelProperty("组织全路径") private String orgPath; + @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") + @ApiModelProperty("办结日期") + private Date finishTime; } diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyDetailsVo.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyDetailsVo.java index 808b0023b4..5fe879ec25 100644 --- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyDetailsVo.java +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyDetailsVo.java @@ -26,6 +26,7 @@ package com.yxt.anrui.scm.api.scmvehrebatewithapply; +import com.fasterxml.jackson.annotation.JsonFormat; import com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWithDetailsVo; import com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWithDto; import com.yxt.common.core.vo.Vo; @@ -34,6 +35,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.util.Date; import java.util.List; /** @@ -55,6 +57,11 @@ public class ScmVehRebateWithApplyDetailsVo implements Vo { private String sid; // sid + @ApiModelProperty("单据编号") + private String billNo; + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @ApiModelProperty("创建日期") + private Date createTime; @ApiModelProperty("申请人sid") private String createBySid; // 申请人sid @ApiModelProperty("备注") diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyDto.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyDto.java index 93c5ff4bc3..46d3da6f98 100644 --- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyDto.java +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyDto.java @@ -54,29 +54,31 @@ public class ScmVehRebateWithApplyDto implements Dto { private String sid; // sid + @ApiModelProperty("单据编号") + private String billNo; @ApiModelProperty("备注") private String remarks; // 备注 @ApiModelProperty("部门sid") private String deptSid; @ApiModelProperty("部门") private String deptName; - @ApiModelProperty("品牌sid") + @ApiModelProperty("品牌sid") private String brandSid; // 品牌sid - @ApiModelProperty("品牌名称") + @ApiModelProperty("品牌名称") private String brandName; // 品牌名称 - @ApiModelProperty("预提申请") + @ApiModelProperty("预提申请") private String withApply; // 预提申请 @ApiModelProperty("创建人sid") private String createBySid; // 创建人sid - @ApiModelProperty("创建人姓名") + @ApiModelProperty("创建人姓名") private String createByName; // 创建人姓名 - @ApiModelProperty("使用组织sid") + @ApiModelProperty("使用组织sid") private String useOrgSid; // 使用组织sid - @ApiModelProperty("使用组织名称") + @ApiModelProperty("使用组织名称") private String useOrgName; // 使用组织名称 - @ApiModelProperty("创建组织sid") + @ApiModelProperty("创建组织sid") private String createOrgSid; // 创建组织sid - @ApiModelProperty("创建组织名称") + @ApiModelProperty("创建组织名称") private String createOrgName; // 创建组织名称 @ApiModelProperty("流程定义的id") private String procDefId; diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyQuery.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyQuery.java index f0fb84b9f4..9406dfd1dd 100644 --- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyQuery.java +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyQuery.java @@ -51,18 +51,21 @@ public class ScmVehRebateWithApplyQuery implements Query { @ApiModelProperty("分公司名称") private String useOrgName; + @ApiModelProperty("部门") + private String deptName; @ApiModelProperty("创建人") private String createByName; - @ApiModelProperty("品牌sid") - private String brandSid; // 品牌sid - @ApiModelProperty("预提申请") - private String withApply; // 预提申请 - @ApiModelProperty("创建开始日期") - private String createStartTime; // 创建开始日期 - @ApiModelProperty("创建结束日期") - private String createEndTime; // 创建结束日期 - @ApiModelProperty("流程状态") - private String nodeState; + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("预提申请") + private String withApply; + @ApiModelProperty("创建日期") + private String createStartTime; + private String createEndTime; + @ApiModelProperty("办结日期") + private String finishTimeStart; + private String finishTimeEnd; + private String userSid; private String orgPath; diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyVo.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyVo.java index 4e21301dc5..c80969d97f 100644 --- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyVo.java +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyVo.java @@ -55,31 +55,28 @@ public class ScmVehRebateWithApplyVo implements Vo { private String sid; // sid - @ApiModelProperty("创建日期") + @ApiModelProperty("流程状态") + private String nodeState; + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("使用组织名称") + private String useOrgName; + @ApiModelProperty("部门") + private String deptName; + @ApiModelProperty("创建人姓名") + private String createByName; @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @ApiModelProperty("创建日期") private Date createTime; // 创建日期 - @ApiModelProperty("品牌sid") - private String brandSid; // 品牌sid - @ApiModelProperty("品牌名称") - private String brandName; // 品牌名称 - @ApiModelProperty("预提申请") - private String withApply; // 预提申请 - @ApiModelProperty("预提返利合计") - private BigDecimal withRebateTotal; // 预提返利合计 + @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") + @ApiModelProperty("办结日期") + private Date finishTime; + @ApiModelProperty("预提申请") + private String withApply; @ApiModelProperty("预提费用") private BigDecimal withholdCost; - @ApiModelProperty("创建人姓名") - private String createByName; // 创建人姓名 - @ApiModelProperty("使用组织sid") - private String useOrgSid; // 使用组织sid - @ApiModelProperty("使用组织名称") - private String useOrgName; // 使用组织名称 - @ApiModelProperty("创建组织sid") - private String createOrgSid; // 创建组织sid - @ApiModelProperty("创建组织名称") - private String createOrgName; // 创建组织名称 - @ApiModelProperty("流程状态") - private String nodeState; + @ApiModelProperty("预提返利合计") + private BigDecimal withRebateTotal; @ApiModelProperty("流程定义的id") private String procDefId; @ApiModelProperty("流程实例的sid") diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateService.java b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateService.java index 7c9e8a89ff..09f7b469d0 100644 --- a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateService.java +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateService.java @@ -141,8 +141,8 @@ public class ScmVehRebateService extends MybatisBaseService= date_format('" + createStartTime + "','%Y-%m-%d')"). @@ -175,8 +181,8 @@ public class ScmVehRebateService extends MybatisBaseService qw = new QueryWrapper<>(); qw.eq("createOrgSid", query.getCreateOrgSid()); - if (StringUtils.isNotBlank(query.getBrandSid())) { - qw.eq("brandSid", query.getBrandSid()); + if (StringUtils.isNotBlank(query.getBrandName())) { + qw.like("brandName", query.getBrandName()); } if (StringUtils.isNotBlank(query.getVehModelName())) { qw.like("vehModelName", query.getVehModelName()); @@ -190,6 +196,9 @@ public class ScmVehRebateService extends MybatisBaseService= date_format('" + createStartTime + "','%Y-%m-%d')"). @@ -248,8 +257,8 @@ public class ScmVehRebateService extends MybatisBaseService= date_format('" + createStartTime + "','%Y-%m-%d')"). @@ -327,8 +342,14 @@ public class ScmVehRebateService extends MybatisBaseService qw = new QueryWrapper<>(); qw.eq("createOrgSid", query.getCreateOrgSid()); - if (StringUtils.isNotBlank(query.getBrandSid())) { - qw.eq("brandSid", query.getBrandSid()); + if (StringUtils.isNotBlank(query.getBrandName())) { + qw.like("brandName", query.getBrandName()); } if (StringUtils.isNotBlank(query.getVehModelName())) { qw.like("vehModelName", query.getVehModelName()); diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewith/ScmVehRebateWithMapper.xml b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewith/ScmVehRebateWithMapper.xml index 4fa8d62d03..3d9de782d1 100644 --- a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewith/ScmVehRebateWithMapper.xml +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewith/ScmVehRebateWithMapper.xml @@ -19,16 +19,18 @@ \ No newline at end of file diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyMapper.java b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyMapper.java index 48b5abc9bd..a2805e0c7f 100644 --- a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyMapper.java +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyMapper.java @@ -54,17 +54,11 @@ import java.util.Map; @Mapper public interface ScmVehRebateWithApplyMapper extends BaseMapper { - //@Update("update scm_veh_rebate_with_apply set name=#{msg} where id=#{id}") - //IPage voPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); - - IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); - - List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); - - @Select("select * from scm_veh_rebate_with_apply") - List selectListVo(); + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); int updateFlowFiled(Map beanToMap); int selectBySid(String join); + + String selectNum(String billNo); } \ No newline at end of file diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyMapper.xml b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyMapper.xml index 05dfaaffc1..c0716bd934 100644 --- a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyMapper.xml +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyMapper.xml @@ -19,16 +19,12 @@ - - UPDATE scm_veh_rebate_with_apply SET nodeState=#{nodeState}, nodeSid=#{taskDefKey} + + , finishTime = NOW() + , procDefId=#{procDefId} @@ -47,4 +43,12 @@ WHERE nodeState != '待提交' and find_in_set(sid, #{list}) + + \ No newline at end of file diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyService.java b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyService.java index 8668429f18..ec50893289 100644 --- a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyService.java +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyService.java @@ -26,11 +26,13 @@ package com.yxt.anrui.scm.biz.scmvehrebatewithapply; import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateUtil; import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.yxt.anrui.base.api.basevehicle.BaseVehicle; import com.yxt.anrui.base.api.basevehicle.BaseVehicleFeign; +import com.yxt.anrui.base.common.utils.Rule; import com.yxt.anrui.fin.api.kingdee.FinKingDeeFeign; import com.yxt.anrui.fin.api.kingdee.costadjustmentsbill.CostAdjustmentsBill; import com.yxt.anrui.fin.api.kingdee.voucher.GeneralVoucher; @@ -110,6 +112,7 @@ public class ScmVehRebateWithApplyService extends MybatisBaseService createQueryWrapper(ScmVehRebateWithApplyQuery query) { // todo: 这里根据具体业务调整查询条件 // 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName())); @@ -161,13 +164,16 @@ public class ScmVehRebateWithApplyService extends MybatisBaseService= date_format('" + createStartTime + "','%Y-%m-%d')"). apply(StringUtils.isNotBlank(createEndTime), "date_format (svrwa.createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')" ); + String finishTimeStart = query.getFinishTimeStart(); + String finishTimeEnd = query.getFinishTimeEnd(); + qw.apply(StringUtils.isNotBlank(finishTimeStart), "date_format (svrwa.finishTime,'%Y-%m-%d') >= date_format('" + finishTimeStart + "','%Y-%m-%d')"). + apply(StringUtils.isNotBlank(finishTimeEnd), "date_format (svrwa.finishTime,'%Y-%m-%d') <= date_format('" + finishTimeEnd + "','%Y-%m-%d')" + ); qw.groupBy("svrwa.sid"); qw.orderByDesc("svrwa.createTime"); IPage page = PagerUtil.queryToPage(pq); @@ -193,6 +204,18 @@ public class ScmVehRebateWithApplyService extends MybatisBaseService vehRebateSids = scmVehRebateWith.getVehRebateSids(); @@ -383,17 +406,18 @@ public class ScmVehRebateWithApplyService extends MybatisBaseService beanToMap) { @@ -516,7 +538,7 @@ public class ScmVehRebateWithApplyService extends MybatisBaseService map = BeanUtil.beanToMap(resultBean.getData()); updateFlowFiled(map); for (ScmVehRebateWithDetailsVo scmVehRebateWithDetailsVo : scmVehRebateWithDetailsVos) { - scmVehRebateService.updateState(scmVehRebateWithDetailsVo.getVehRebateSid(),0); + scmVehRebateService.updateState(scmVehRebateWithDetailsVo.getVehRebateSid(), 0); } return rb.success().setData(resultBean.getData()); } else { @@ -612,7 +634,7 @@ public class ScmVehRebateWithApplyService extends MybatisBaseService map = BeanUtil.beanToMap(resultBean.getData()); updateFlowFiled(map); for (ScmVehRebateWithDetailsVo scmVehRebateWithDetailsVo : scmVehRebateWithDetailsVos) { - scmVehRebateService.updateState(scmVehRebateWithDetailsVo.getVehRebateSid(),0); + scmVehRebateService.updateState(scmVehRebateWithDetailsVo.getVehRebateSid(), 0); } return rb.success().setData(resultBean.getData()); }