From 8ee78175a7eb08457efea2b385db404ba6fc91a6 Mon Sep 17 00:00:00 2001 From: dimengzhe Date: Thu, 15 May 2025 16:27:48 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BD=A6=E8=BE=86?= =?UTF-8?q?=E5=88=A9=E6=B6=A6=E6=8A=A5=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BusDeliveredApplyService.java | 4 ++- .../api/carsSoldProfit/CarsSoldProfit.java | 4 --- .../api/carsSoldProfit/CarsSoldProfitDto.java | 4 --- .../carsSoldProfit/CarsSoldProfitQuery.java | 2 +- .../api/carsSoldProfit/CarsSoldProfitVo.java | 12 ++++++--- .../carsSoldProfit/CarsSoldProfitMapper.xml | 24 ++++++++++++++++- .../carsSoldProfit/CarsSoldProfitService.java | 26 +++++++++---------- 7 files changed, 48 insertions(+), 28 deletions(-) diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapply/BusDeliveredApplyService.java b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapply/BusDeliveredApplyService.java index 7025535c34..0bdcbb36bb 100644 --- a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapply/BusDeliveredApplyService.java +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapply/BusDeliveredApplyService.java @@ -1432,10 +1432,12 @@ public class BusDeliveredApplyService extends MybatisBaseService + SELECT * + FROM affiliated_company + + ${ew.sqlSegment} + + + + + \ No newline at end of file diff --git a/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/affiliatedcompany/AffiliatedCompanyQuery.java b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/affiliatedcompany/AffiliatedCompanyQuery.java new file mode 100644 index 0000000000..6ea1b7471d --- /dev/null +++ b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/affiliatedcompany/AffiliatedCompanyQuery.java @@ -0,0 +1,14 @@ +package com.yxt.anrui.vehfleet.biz.affiliatedcompany; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2025/5/14 10:39 + */ +@Data +public class AffiliatedCompanyQuery implements Query { + private String corporateName;//公司名称 + +} diff --git a/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/affiliatedcompany/AffiliatedCompanyService.java b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/affiliatedcompany/AffiliatedCompanyService.java new file mode 100644 index 0000000000..c2c73bfa9a --- /dev/null +++ b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/affiliatedcompany/AffiliatedCompanyService.java @@ -0,0 +1,68 @@ + +package com.yxt.anrui.vehfleet.biz.affiliatedcompany; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2023/4/12 11:50 + */ +@Service +public class AffiliatedCompanyService extends MybatisBaseService { + public PagerVo listPageVo(PagerQuery pq) { + AffiliatedCompanyQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if(StringUtils.isNotBlank(query.getCorporateName())){ + qw.like("corporateName",query.getCorporateName()); + } + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + public ResultBean saveOrUpdate(AffiliatedCompanyDto dto) { + ResultBean rb=new ResultBean(); + String sid =dto.getSid(); + if(StringUtils.isNotBlank(sid)){ + AffiliatedCompany entity=fetchBySid(sid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + return rb.success().setMsg("修改成功"); + }else{ + AffiliatedCompany entity=new AffiliatedCompany(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + return rb.success().setMsg("保存成功"); + } + } + public AffiliatedCompanyVo fetchSid(String sid){ + //根据sid查询的企业 + AffiliatedCompanyVo bank=baseMapper.fetchSid(sid); + return bank; + } + public ResultBean delete(String sid) { + ResultBean rb=new ResultBean(); + baseMapper.delete(new QueryWrapper().eq("sid",sid)); + return rb.success().setMsg("删除成功"); + } + public List list(){ + return baseMapper.selectList(new QueryWrapper<>()); + + } + public ResultBean delAll(String[] sids) { + ResultBean rb = ResultBean.fireFail(); + delBySids(sids); + return rb.success(); + } +} diff --git a/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/affiliatedcompany/AffiliatedCompanyVo.java b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/affiliatedcompany/AffiliatedCompanyVo.java new file mode 100644 index 0000000000..ac00a69a5a --- /dev/null +++ b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/affiliatedcompany/AffiliatedCompanyVo.java @@ -0,0 +1,15 @@ +package com.yxt.anrui.vehfleet.biz.affiliatedcompany; + +import lombok.Data; + +/** + * @author wangpengfei + * @date 2025/5/14 10:38 + */ +@Data +public class AffiliatedCompanyVo { + private String sid; + private String corporateName;//公司名称 + private String contacts;//联系人 + private String contactNumber;//联系方式 +} diff --git a/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/appendix/Appendix.java b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/appendix/Appendix.java new file mode 100644 index 0000000000..d7d98969b6 --- /dev/null +++ b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/appendix/Appendix.java @@ -0,0 +1,53 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.vehfleet.biz.appendix; + +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("appendix") +public class Appendix extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("文件名") + private String fileName; // 文件名 + @ApiModelProperty("文件类型") + private String fileType; // 文件类型 + @ApiModelProperty("关联业务对象sid") + private String linkSid; // 关联业务对象sid + @ApiModelProperty("附件类型") + private String attachType; // 附件类型 + @ApiModelProperty("文件大小") + private String fileSize; // 文件大小 + @ApiModelProperty("文件的路径") + private String filePath; // 文件的路径 + +} diff --git a/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/appendix/AppendixDetailsVo.java b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/appendix/AppendixDetailsVo.java new file mode 100644 index 0000000000..f4dad5ab02 --- /dev/null +++ b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/appendix/AppendixDetailsVo.java @@ -0,0 +1,52 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.vehfleet.biz.appendix; + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +@ApiModel(value = "附件表 视图数据详情", description = "附件表 视图数据详情") +public class AppendixDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("文件名") + private String fileName; // 文件名 + @ApiModelProperty("文件类型") + private String fileType; // 文件类型 + @ApiModelProperty("关联业务对象sid") + private String linkSid; // 关联业务对象sid + @ApiModelProperty("附件类型") + private String attachType; // 附件类型 + @ApiModelProperty("文件大小") + private String fileSize; // 文件大小 + @ApiModelProperty("文件的路径") + private String filePath; // 文件的路径 + +} \ No newline at end of file diff --git a/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/appendix/AppendixDto.java b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/appendix/AppendixDto.java new file mode 100644 index 0000000000..739632bddc --- /dev/null +++ b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/appendix/AppendixDto.java @@ -0,0 +1,52 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.vehfleet.biz.appendix; + +import com.yxt.common.core.dto.Dto; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +@ApiModel(value = "附件表 数据传输对象", description = "附件表 数据传输对象") +public class AppendixDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("文件名") + private String fileName; // 文件名 + @ApiModelProperty("文件类型") + private String fileType; // 文件类型 + @ApiModelProperty("关联业务对象sid") + private String linkSid; // 关联业务对象sid + @ApiModelProperty("附件类型") + private String attachType; // 附件类型 + @ApiModelProperty("文件大小") + private String fileSize; // 文件大小 + @ApiModelProperty("文件的路径") + private String filePath; // 文件的路径 + +} \ No newline at end of file diff --git a/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/appendix/AppendixMapper.java b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/appendix/AppendixMapper.java new file mode 100644 index 0000000000..d927fbaf32 --- /dev/null +++ b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/appendix/AppendixMapper.java @@ -0,0 +1,45 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.vehfleet.biz.appendix; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +@Mapper +public interface AppendixMapper extends BaseMapper { + + @Select("select * from appendix where linkSid = #{linkSid}") + List fetchByLinkSid(String linkSid); + + int deleteByLinkSid(@Param("sid") String sid,@Param("fileType") String fileType); + + @Select("select * from appendix where linkSid = #{linkSid} and fileType = #{fileType}") + List fetchByLinkSid2(@Param("linkSid") String linkSid, @Param("fileType") String type); +} \ No newline at end of file diff --git a/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/appendix/AppendixMapper.xml b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/appendix/AppendixMapper.xml new file mode 100644 index 0000000000..3ca04192cf --- /dev/null +++ b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/appendix/AppendixMapper.xml @@ -0,0 +1,15 @@ + + + + + + + + delete + from appendix + where linkSid = #{sid} + + and fileType = #{fileType} + + + \ No newline at end of file diff --git a/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/appendix/AppendixService.java b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/appendix/AppendixService.java new file mode 100644 index 0000000000..f79544dbd3 --- /dev/null +++ b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/appendix/AppendixService.java @@ -0,0 +1,107 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.vehfleet.biz.appendix; + +import com.yxt.common.base.config.component.FileUploadComponent; +import com.yxt.common.base.service.MybatisBaseService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; + +@Service +public class AppendixService extends MybatisBaseService { + + @Autowired + private FileUploadComponent fileUploadComponent; + + public List fetchByLinkSid(String linkSid) { + return baseMapper.fetchByLinkSid(linkSid); + } + + public void saveOrUpdateFile(String sid, List oaAppendixList, String fileType) { + baseMapper.deleteByLinkSid(sid, fileType); + if (!oaAppendixList.isEmpty()) { + oaAppendixList.forEach(v -> { + baseMapper.insert(v); + }); + } + } + + public int deleteByLinkSid(String sid, String fileType) { + return baseMapper.deleteByLinkSid(sid, fileType); + } + + public void saveFile(String sid, List files, String attachType, String fileType) { + List oaAppendixList = new ArrayList<>(); + if (!files.isEmpty()) { + for (String file : files) { + String filePath = file.replace(fileUploadComponent.getUrlPrefix(), ""); + Appendix oaAppendix = new Appendix(); + oaAppendix.setLinkSid(sid); + oaAppendix.setAttachType(attachType); + oaAppendix.setFilePath(filePath); + /* File filess = new File(fileUploadComponent.getUploadPath() + file.replace("/", File.separator)); + if (file != null) { + try { + boolean isTrue = ImageIO.read(filess) != null; + if (isTrue) { + oaAppendix.setFileType("图片"); + } else { + oaAppendix.setFileType("文件"); + } + } catch (IOException e) { + e.printStackTrace(); + } + }*/ + oaAppendix.setFileType(fileType); + oaAppendixList.add(oaAppendix); + } + } + saveOrUpdateFile(sid, oaAppendixList, fileType); + } + + public List selectByLinkSid(String sid) { + List fileList = fetchByLinkSid(sid); + List files = new ArrayList<>(); + for (Appendix oaAppendix : fileList) { + String url = fileUploadComponent.getUrlPrefix() + oaAppendix.getFilePath(); + files.add(url); + } + return files; + } + + public List selectByLinkSid(String sid, String type) { + List fileList = baseMapper.fetchByLinkSid2(sid, type); + List files = new ArrayList<>(); + for (Appendix oaAppendix : fileList) { + String url = fileUploadComponent.getUrlPrefix() + oaAppendix.getFilePath(); + files.add(url); + } + return files; + } +} \ No newline at end of file diff --git a/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/regulatorydocuments/RegulatoryDocuments.java b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/regulatorydocuments/RegulatoryDocuments.java new file mode 100644 index 0000000000..c85ae1bb6a --- /dev/null +++ b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/regulatorydocuments/RegulatoryDocuments.java @@ -0,0 +1,24 @@ +package com.yxt.anrui.vehfleet.biz.regulatorydocuments; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2025/5/14 10:12 + */ +@Data +@ApiModel(value = "监管企业信息", description = "监管企业信息") +@TableName("regulatory_documents") +public class RegulatoryDocuments extends BaseEntity { + private String fileNameKey;//文件名 + private String fileNameValue; + private String departmentKey;//监管部门 + private String departmentValue; + private String fleetSid;//车队 + private String fleetName; + private String uploaderSid;//上传人 + private String uploaderName; +} diff --git a/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/regulatorydocuments/RegulatoryDocumentsDto.java b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/regulatorydocuments/RegulatoryDocumentsDto.java new file mode 100644 index 0000000000..3cb3486908 --- /dev/null +++ b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/regulatorydocuments/RegulatoryDocumentsDto.java @@ -0,0 +1,26 @@ +package com.yxt.anrui.vehfleet.biz.regulatorydocuments; + +import io.swagger.annotations.ApiModel; +import lombok.Data; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2025/5/14 10:38 + */ +@ApiModel(value = "监管企业信息 数据传输对象", description = "监管企业信息 数据传输对象") +@Data +public class RegulatoryDocumentsDto { + private String sid; + private String remarks; + private String fileNameKey;//文件名 + private String fileNameValue; + private String departmentKey;//监管部门 + private String departmentValue; + private String fleetSid;//车队 + private String fleetName; + private String uploaderSid;//上传人 + private String uploaderName; + private List filePaths; +} diff --git a/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/regulatorydocuments/RegulatoryDocumentsMapper.java b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/regulatorydocuments/RegulatoryDocumentsMapper.java new file mode 100644 index 0000000000..0f1f8c2caf --- /dev/null +++ b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/regulatorydocuments/RegulatoryDocumentsMapper.java @@ -0,0 +1,18 @@ +package com.yxt.anrui.vehfleet.biz.regulatorydocuments; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * @author wangpengfei + * @date 2023/4/12 11:49 + */ +@Mapper +public interface RegulatoryDocumentsMapper extends BaseMapper { + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + RegulatoryDocumentsVo fetchSid(@Param("sid") String sid); +} diff --git a/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/regulatorydocuments/RegulatoryDocumentsMapper.xml b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/regulatorydocuments/RegulatoryDocumentsMapper.xml new file mode 100644 index 0000000000..39d680e9e4 --- /dev/null +++ b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/regulatorydocuments/RegulatoryDocumentsMapper.xml @@ -0,0 +1,19 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/regulatorydocuments/RegulatoryDocumentsQuery.java b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/regulatorydocuments/RegulatoryDocumentsQuery.java new file mode 100644 index 0000000000..ab6659b694 --- /dev/null +++ b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/regulatorydocuments/RegulatoryDocumentsQuery.java @@ -0,0 +1,23 @@ +package com.yxt.anrui.vehfleet.biz.regulatorydocuments; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2025/5/14 10:39 + */ +@Data +public class RegulatoryDocumentsQuery implements Query { + + private String fileNameValue;//文件名 + + private String departmentValue;//部门 + private String fleetSid;//车队 + + private String uploaderName;//上传人 + private String remarks;//备注 + private String endTime; + private String startTime; + +} diff --git a/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/regulatorydocuments/RegulatoryDocumentsService.java b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/regulatorydocuments/RegulatoryDocumentsService.java new file mode 100644 index 0000000000..93fac892f5 --- /dev/null +++ b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/regulatorydocuments/RegulatoryDocumentsService.java @@ -0,0 +1,99 @@ + +package com.yxt.anrui.vehfleet.biz.regulatorydocuments; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.anrui.vehfleet.biz.appendix.AppendixService; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Collections; +import java.util.List; + +/** + * @author wangpengfei + * @date 2023/4/12 11:50 + */ +@Service +public class RegulatoryDocumentsService extends MybatisBaseService { + @Autowired + AppendixService appendixService; + public PagerVo listPageVo(PagerQuery pq) { + RegulatoryDocumentsQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if(StringUtils.isNotBlank(query.getFileNameValue())){ + qw.eq("fileNameValue",query.getFileNameValue()); + } + if(StringUtils.isNotBlank(query.getDepartmentValue())){ + qw.eq("departmentValue",query.getDepartmentValue()); + } + if(StringUtils.isNotBlank(query.getFleetSid())){ + qw.eq("fleetSid",query.getFleetSid()); + } + if(StringUtils.isNotBlank(query.getUploaderName())){ + qw.like("uploaderName",query.getUploaderName()); + } + if(StringUtils.isNotBlank(query.getRemarks())){ + qw.like("remarks",query.getRemarks()); + } + qw.apply(com.yxt.common.base.utils.StringUtils.isNotBlank(query.getStartTime()), "date_format (createTime,'%Y-%m-%d') >= date_format('" + query.getStartTime() + "','%Y-%m-%d')"). + apply(com.yxt.common.base.utils.StringUtils.isNotBlank(query.getEndTime()), "date_format (createTime,'%Y-%m-%d') <= date_format('" + query.getEndTime() + "','%Y-%m-%d')" + ); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + public ResultBean saveOrUpdate(RegulatoryDocumentsDto dto) { + ResultBean rb=new ResultBean(); + String sid =dto.getSid(); + List files = dto.getFilePaths(); + if(StringUtils.isNotBlank(sid)){ + RegulatoryDocuments entity=fetchBySid(sid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + }else{ + RegulatoryDocuments entity=new RegulatoryDocuments(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + sid=entity.getSid(); + } + saveFiles(sid, files, "", "文件"); + return rb.success().setMsg("成功"); + } + private void saveFiles(String sid, List files, String attachType, String fileType) { + files.removeAll(Collections.singleton(null)); + appendixService.saveFile(sid, files, attachType, fileType); + } + public RegulatoryDocumentsVo fetchSid(String sid){ + RegulatoryDocumentsVo bank=baseMapper.fetchSid(sid); + List appes = appendixService.selectByLinkSid(sid, "文件"); + bank.setFilePaths(appes); + return bank; + } + public ResultBean delete(String sid) { + ResultBean rb=new ResultBean(); + baseMapper.delete(new QueryWrapper().eq("sid",sid)); + return rb.success().setMsg("删除成功"); + } + public List list(){ + return baseMapper.selectList(new QueryWrapper<>()); + + } + public ResultBean delAll(String[] sids) { + ResultBean rb = ResultBean.fireFail(); + delBySids(sids); + for (String sid : sids) { + appendixService.deleteByLinkSid(sid,"文件"); + } + + return rb.success(); + } +} diff --git a/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/regulatorydocuments/RegulatoryDocumentsVo.java b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/regulatorydocuments/RegulatoryDocumentsVo.java new file mode 100644 index 0000000000..39865f660b --- /dev/null +++ b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/regulatorydocuments/RegulatoryDocumentsVo.java @@ -0,0 +1,29 @@ +package com.yxt.anrui.vehfleet.biz.regulatorydocuments; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; +import java.util.List; + +/** + * @author wangpengfei + * @date 2025/5/14 10:38 + */ +@Data +public class RegulatoryDocumentsVo { + private String sid; + private String remarks; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private Date createTime; + private String fileNameKey;//文件名 + private String fileNameValue; + private String departmentKey;//监管部门 + private String departmentValue; + private String fleetSid;//车队 + private String fleetName; + private String uploaderSid;//上传人 + private String uploaderName; + private List filePaths; +} From 6b29d5c80e5e0185832bdd0bf5df3b87c3489237 Mon Sep 17 00:00:00 2001 From: myTest383
Date: Thu, 15 May 2025 17:27:01 +0800 Subject: [PATCH 5/7] 111 --- yxt-vehfleet-ui/.env.development | 2 +- .../affiliatedCompany/affiliatedCompany.js | 48 +++ .../src/api/superviseFile/superviseFile.js | 39 ++ .../vehicleAdmissionApply.js | 0 .../vehicleInsuranceLedger.js | 0 .../src/api/vehicleLedger/vehicleLedger.js | 0 .../src/components/uploadFile/uploadImg.vue | 1 + yxt-vehfleet-ui/src/router/index.js | 100 ++++-- .../affiliatedCompany/affiliatedCompany.vue | 257 +++++++++++++ .../affiliatedCompanyAdd.vue | 177 +++++++++ .../src/views/superviseFile/superviseFile.vue | 339 ++++++++++++++++++ .../views/superviseFile/superviseFileAdd.vue | 296 +++++++++++++++ .../vehicleAdmissionApply.vue | 11 + .../vehicleInsuranceLedger.vue | 302 ++++++++++++++++ .../vehicleInsuranceLedgerAdd.vue | 11 + .../src/views/vehicleLedger/vehicleLedger.vue | 11 + yxt-vehfleet-ui/vue.config.js | 4 +- 17 files changed, 1558 insertions(+), 40 deletions(-) create mode 100644 yxt-vehfleet-ui/src/api/affiliatedCompany/affiliatedCompany.js create mode 100644 yxt-vehfleet-ui/src/api/superviseFile/superviseFile.js create mode 100644 yxt-vehfleet-ui/src/api/vehicleAdmissionApply/vehicleAdmissionApply.js create mode 100644 yxt-vehfleet-ui/src/api/vehicleInsuranceLedger/vehicleInsuranceLedger.js create mode 100644 yxt-vehfleet-ui/src/api/vehicleLedger/vehicleLedger.js create mode 100644 yxt-vehfleet-ui/src/views/affiliatedCompany/affiliatedCompany.vue create mode 100644 yxt-vehfleet-ui/src/views/affiliatedCompany/affiliatedCompanyAdd.vue create mode 100644 yxt-vehfleet-ui/src/views/superviseFile/superviseFile.vue create mode 100644 yxt-vehfleet-ui/src/views/superviseFile/superviseFileAdd.vue create mode 100644 yxt-vehfleet-ui/src/views/vehicleAdmissionApply/vehicleAdmissionApply.vue create mode 100644 yxt-vehfleet-ui/src/views/vehicleInsuranceLedger/vehicleInsuranceLedger.vue create mode 100644 yxt-vehfleet-ui/src/views/vehicleInsuranceLedger/vehicleInsuranceLedgerAdd.vue create mode 100644 yxt-vehfleet-ui/src/views/vehicleLedger/vehicleLedger.vue diff --git a/yxt-vehfleet-ui/.env.development b/yxt-vehfleet-ui/.env.development index e36360e0c0..43a35a0453 100644 --- a/yxt-vehfleet-ui/.env.development +++ b/yxt-vehfleet-ui/.env.development @@ -6,5 +6,5 @@ VUE_APP_BASE_API = '/api' ## 配置测试和本地开发时的 接口地址 ##VUE_APP_URL = "http://26077a35f5.wicp.vip" -VUE_APP_URL = "http://192.168.0.106:8111" +VUE_APP_URL = "http://192.168.0.105:8111" diff --git a/yxt-vehfleet-ui/src/api/affiliatedCompany/affiliatedCompany.js b/yxt-vehfleet-ui/src/api/affiliatedCompany/affiliatedCompany.js new file mode 100644 index 0000000000..172f0f8ea8 --- /dev/null +++ b/yxt-vehfleet-ui/src/api/affiliatedCompany/affiliatedCompany.js @@ -0,0 +1,48 @@ +import request from '@/utils/request' + +export default { + + // 查询分页列表 + listPage: function(params) { + return request({ + url: '/vehfleet/v1/affiliatedcompany/listPage', method: 'post', data: params, headers: { + 'Content-Type': 'application/json' + } + }) + }, + + // 查询全部列表 + listAll: function() { + return request({ + url: '/vehfleet/v1/affiliatedcompany/list', method: 'post', headers: { + 'Content-Type': 'application/json' + } + }) + }, + + // 新增、保存 + saveAffiliatedcompany: function(data) { + return request({ + url: '/vehfleet/v1/affiliatedcompany/saveOrUpdate', method: 'post', data: data, headers: { + 'Content-Type': 'application/json' + } + }) + }, + + // 初始化 + initAffiliatedcompany: function(data) { + return request({ + url: '/vehfleet/v1/affiliatedcompany/fetchSid/' + data, method: 'get' + }) + }, + + // 删除 + deleteBySids: function(data) { + return request({ + url: '/vehfleet/v1/affiliatedcompany/delBySids', method: 'DELETE', data: data, headers: { + 'Content-Type': 'application/json' + } + }) + } + +} diff --git a/yxt-vehfleet-ui/src/api/superviseFile/superviseFile.js b/yxt-vehfleet-ui/src/api/superviseFile/superviseFile.js new file mode 100644 index 0000000000..62f6d7c99f --- /dev/null +++ b/yxt-vehfleet-ui/src/api/superviseFile/superviseFile.js @@ -0,0 +1,39 @@ +import request from '@/utils/request' + +export default { + + // 查询分页列表 + listPage: function(params) { + return request({ + url: '/vehfleet/v1/regulatorydocuments/listPage', method: 'post', data: params, headers: { + 'Content-Type': 'application/json' + } + }) + }, + + // 新增、保存 + saveRegulatorydocuments: function(data) { + return request({ + url: '/vehfleet/v1/regulatorydocuments/saveOrUpdate', method: 'post', data: data, headers: { + 'Content-Type': 'application/json' + } + }) + }, + + // 初始化 + initRegulatorydocuments: function(data) { + return request({ + url: '/vehfleet/v1/regulatorydocuments/fetchSid/' + data, method: 'get' + }) + }, + + // 删除 + deleteBySids: function(data) { + return request({ + url: '/vehfleet/v1/regulatorydocuments/delBySids', method: 'DELETE', data: data, headers: { + 'Content-Type': 'application/json' + } + }) + } + +} diff --git a/yxt-vehfleet-ui/src/api/vehicleAdmissionApply/vehicleAdmissionApply.js b/yxt-vehfleet-ui/src/api/vehicleAdmissionApply/vehicleAdmissionApply.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/yxt-vehfleet-ui/src/api/vehicleInsuranceLedger/vehicleInsuranceLedger.js b/yxt-vehfleet-ui/src/api/vehicleInsuranceLedger/vehicleInsuranceLedger.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/yxt-vehfleet-ui/src/api/vehicleLedger/vehicleLedger.js b/yxt-vehfleet-ui/src/api/vehicleLedger/vehicleLedger.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/yxt-vehfleet-ui/src/components/uploadFile/uploadImg.vue b/yxt-vehfleet-ui/src/components/uploadFile/uploadImg.vue index 01a1c5d960..701580e716 100644 --- a/yxt-vehfleet-ui/src/components/uploadFile/uploadImg.vue +++ b/yxt-vehfleet-ui/src/components/uploadFile/uploadImg.vue @@ -148,6 +148,7 @@ export default { imgFiles.push(o.url) }) this.$emit('fileChange', this.files) + this.$emit('change', this.files) }, handleRemove(file, fileList) { console.log('file:' + JSON.stringify(file)) diff --git a/yxt-vehfleet-ui/src/router/index.js b/yxt-vehfleet-ui/src/router/index.js index fb34bc6a6b..9e22aab96b 100644 --- a/yxt-vehfleet-ui/src/router/index.js +++ b/yxt-vehfleet-ui/src/router/index.js @@ -1,47 +1,72 @@ import Vue from 'vue' import Router from 'vue-router' +/* Layout */ +import Layout from '@/layout' Vue.use(Router) -/* Layout */ -import Layout from '@/layout' /* 所有角色可以访问/没有权限要求的基页 */ export const constantRoutes = [{ - path: '/redirect', - component: Layout, - hidden: true, - children: [{ - path: '/redirect/:path(.*)', - component: () => import('@/views/redirect/index.vue') - }] - }, - { - path: '/', - redirect: 'index' - }, - { - path: '/index', - component: Layout, - redirect: '/index', - children: [{ - path: '/index', - component: () => - import('@/views/index.vue'), - name: 'index', - meta: { - title: '主页', - noCache: true, - affix: true - } - }] - }, - { - path: '/404', - component: () => - import('@/views/404'), - hidden: true - } + path: '/redirect', component: Layout, hidden: true, children: [{ + path: '/redirect/:path(.*)', component: () => import('@/views/redirect/index.vue') + }] +}, { + path: '/', redirect: 'index' +}, { + path: '/index', component: Layout, redirect: '/index', children: [{ + path: '/index', component: () => import('@/views/index.vue'), name: 'index', meta: { + title: '主页', noCache: true, affix: true + } + }] +}, { + path: '/vehicleAdmissionApply', component: Layout, redirect: '/vehicleAdmissionApply', children: [{ + path: '/vehicleAdmissionApply', + component: () => import('@/views/vehicleAdmissionApply/vehicleAdmissionApply.vue'), + name: 'VehicleAdmissionApply', + meta: { + title: '车辆准入申请管理' + } + }] +}, { + path: '/vehicleLedger', component: Layout, redirect: '/vehicleLedger', children: [{ + path: '/vehicleLedger', + component: () => import('@/views/vehicleLedger/vehicleLedger.vue'), + name: 'VehicleLedger', + meta: { + title: '挂靠车辆台账管理' + } + }] +}, { + path: '/affiliatedCompany', component: Layout, redirect: '/affiliatedCompany', children: [{ + path: '/affiliatedCompany', + component: () => import('@/views/affiliatedCompany/affiliatedCompany.vue'), + name: 'AffiliatedCompany', + meta: { + title: '挂靠公司管理' + } + }] +}, { + path: '/vehicleInsuranceLedger', component: Layout, redirect: '/vehicleInsuranceLedger', children: [{ + path: '/vehicleInsuranceLedger', + component: () => import('@/views/vehicleInsuranceLedger/vehicleInsuranceLedger.vue'), + name: 'VehicleInsuranceLedger', + meta: { + title: '车辆保险台账管理' + } + }] +}, { + path: '/superviseFile', component: Layout, redirect: '/superviseFile', children: [{ + path: '/superviseFile', + component: () => import('@/views/superviseFile/superviseFile.vue'), + name: 'SuperviseFile', + meta: { + title: '监管部门文件管理' + } + }] +}, { + path: '/404', component: () => import('@/views/404'), hidden: true +} // 404 page must be placed at the end !!! // { path: '*', redirect: '/404', hidden: true } ] @@ -50,8 +75,7 @@ const createRouter = () => new Router({ // mode: 'history', // require service support scrollBehavior: () => ({ y: 0 - }), - routes: constantRoutes + }), routes: constantRoutes }) const router = createRouter() diff --git a/yxt-vehfleet-ui/src/views/affiliatedCompany/affiliatedCompany.vue b/yxt-vehfleet-ui/src/views/affiliatedCompany/affiliatedCompany.vue new file mode 100644 index 0000000000..fdb0d68e5e --- /dev/null +++ b/yxt-vehfleet-ui/src/views/affiliatedCompany/affiliatedCompany.vue @@ -0,0 +1,257 @@ + + + + + diff --git a/yxt-vehfleet-ui/src/views/affiliatedCompany/affiliatedCompanyAdd.vue b/yxt-vehfleet-ui/src/views/affiliatedCompany/affiliatedCompanyAdd.vue new file mode 100644 index 0000000000..e0dc1fc3f4 --- /dev/null +++ b/yxt-vehfleet-ui/src/views/affiliatedCompany/affiliatedCompanyAdd.vue @@ -0,0 +1,177 @@ + + + + diff --git a/yxt-vehfleet-ui/src/views/superviseFile/superviseFile.vue b/yxt-vehfleet-ui/src/views/superviseFile/superviseFile.vue new file mode 100644 index 0000000000..83f5baeb6a --- /dev/null +++ b/yxt-vehfleet-ui/src/views/superviseFile/superviseFile.vue @@ -0,0 +1,339 @@ + + + + + diff --git a/yxt-vehfleet-ui/src/views/superviseFile/superviseFileAdd.vue b/yxt-vehfleet-ui/src/views/superviseFile/superviseFileAdd.vue new file mode 100644 index 0000000000..47898e6817 --- /dev/null +++ b/yxt-vehfleet-ui/src/views/superviseFile/superviseFileAdd.vue @@ -0,0 +1,296 @@ + + + + diff --git a/yxt-vehfleet-ui/src/views/vehicleAdmissionApply/vehicleAdmissionApply.vue b/yxt-vehfleet-ui/src/views/vehicleAdmissionApply/vehicleAdmissionApply.vue new file mode 100644 index 0000000000..51760449ae --- /dev/null +++ b/yxt-vehfleet-ui/src/views/vehicleAdmissionApply/vehicleAdmissionApply.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/yxt-vehfleet-ui/src/views/vehicleInsuranceLedger/vehicleInsuranceLedger.vue b/yxt-vehfleet-ui/src/views/vehicleInsuranceLedger/vehicleInsuranceLedger.vue new file mode 100644 index 0000000000..d22ba001f4 --- /dev/null +++ b/yxt-vehfleet-ui/src/views/vehicleInsuranceLedger/vehicleInsuranceLedger.vue @@ -0,0 +1,302 @@ + + + + + diff --git a/yxt-vehfleet-ui/src/views/vehicleInsuranceLedger/vehicleInsuranceLedgerAdd.vue b/yxt-vehfleet-ui/src/views/vehicleInsuranceLedger/vehicleInsuranceLedgerAdd.vue new file mode 100644 index 0000000000..51760449ae --- /dev/null +++ b/yxt-vehfleet-ui/src/views/vehicleInsuranceLedger/vehicleInsuranceLedgerAdd.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/yxt-vehfleet-ui/src/views/vehicleLedger/vehicleLedger.vue b/yxt-vehfleet-ui/src/views/vehicleLedger/vehicleLedger.vue new file mode 100644 index 0000000000..51760449ae --- /dev/null +++ b/yxt-vehfleet-ui/src/views/vehicleLedger/vehicleLedger.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/yxt-vehfleet-ui/vue.config.js b/yxt-vehfleet-ui/vue.config.js index 9cb6faeadf..e29794d36b 100644 --- a/yxt-vehfleet-ui/vue.config.js +++ b/yxt-vehfleet-ui/vue.config.js @@ -24,7 +24,7 @@ module.exports = { *在大多数情况下,请使用“/”!!! *详细信息:https://cli.vuejs.org/config/#publicpath */ - publicPath: process.env.NODE_ENV === 'production' ? '/riskcenter/' : '/', + publicPath: process.env.NODE_ENV === 'production' ? '/vehfleet/' : '/', outputDir: 'System', assetsDir: 'static', lintOnSave: process.env.NODE_ENV === 'development', @@ -41,6 +41,7 @@ module.exports = { proxy: { '/api': { // 匹配所有以 '/api'开头的请求路径 // target: 'http://127.0.0.1:8111/', + // target: 'http://192.168.0.105:8111/vehfleet', target: process.env.VUE_APP_URL, // 代理目标的基础路径 changeOrigin: true, // 支持跨域 pathRewrite: { // 重写路径: 去掉路径中开头的'/api' @@ -49,6 +50,7 @@ module.exports = { }, '/upload': { // 匹配所有以 '/api'开头的请求路径 // target: 'http://4424790b0u.qicp.vip/', + // target: 'http://192.168.0.105:8111/vehfleet', target: process.env.VUE_APP_URL, // 代理目标的基础路径 changeOrigin: true, // 支持跨域 pathRewrite: { // 重写路径: 去掉路径中开头的'/api' From 7abc3529fd397fc83e8bf80fe57de6310105496b Mon Sep 17 00:00:00 2001 From: dimengzhe Date: Fri, 16 May 2025 08:39:50 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E8=B4=B7=E6=AC=BE=E4=BF=9D=E8=AF=81?= =?UTF-8?q?=E9=87=91=E4=BF=AE=E6=94=B9=E4=B8=BA=E4=B8=AA=E8=B4=B7=E4=BF=9D?= =?UTF-8?q?=E8=AF=81=E9=87=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FinCollectionConfirmationService.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java index b2fb214e47..06735cc141 100644 --- a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java +++ b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java @@ -2165,8 +2165,8 @@ public class FinCollectionConfirmationService extends MybatisBaseService Date: Fri, 16 May 2025 10:46:01 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=BD=A6=E8=BE=86?= =?UTF-8?q?=E5=88=A9=E6=B6=A6=E6=8A=A5=E8=A1=A8=E7=9A=84=E8=BF=94=E5=88=A9?= =?UTF-8?q?=E6=98=8E=E7=BB=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BusDeliveredApplyService.java | 14 ++++++-- .../api/carsSoldProfit/CarsSoldProfitVo.java | 6 ++-- .../carsSoldProfit/CarsSoldProfitMapper.xml | 3 +- .../carsSoldProfit/CarsSoldProfitService.java | 36 ++++++++++++++++++- .../ScmVehRebateCarsSoldProfitVo.java | 33 +++++++++++++++++ .../api/scmvehrebate/ScmVehRebateFeign.java | 5 +++ .../biz/scmvehrebate/ScmVehRebateMapper.java | 2 ++ .../biz/scmvehrebate/ScmVehRebateMapper.xml | 14 ++++++++ .../biz/scmvehrebate/ScmVehRebateRest.java | 5 +++ .../biz/scmvehrebate/ScmVehRebateService.java | 27 ++++++++++++++ 10 files changed, 138 insertions(+), 7 deletions(-) create mode 100644 anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateCarsSoldProfitVo.java diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapply/BusDeliveredApplyService.java b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapply/BusDeliveredApplyService.java index 0bdcbb36bb..895b32c4bb 100644 --- a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapply/BusDeliveredApplyService.java +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapply/BusDeliveredApplyService.java @@ -1441,14 +1441,22 @@ public class BusDeliveredApplyService extends MybatisBaseService diff --git a/anrui-reportcenter/anrui-reportcenter-biz/src/main/java/com/yxt/anrui/reportcenter/biz/carsSoldProfit/CarsSoldProfitService.java b/anrui-reportcenter/anrui-reportcenter-biz/src/main/java/com/yxt/anrui/reportcenter/biz/carsSoldProfit/CarsSoldProfitService.java index ec622f2801..7bf1916d2b 100644 --- a/anrui-reportcenter/anrui-reportcenter-biz/src/main/java/com/yxt/anrui/reportcenter/biz/carsSoldProfit/CarsSoldProfitService.java +++ b/anrui-reportcenter/anrui-reportcenter-biz/src/main/java/com/yxt/anrui/reportcenter/biz/carsSoldProfit/CarsSoldProfitService.java @@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.yxt.anrui.portal.api.sysuser.PrivilegeQuery; import com.yxt.anrui.portal.api.sysuser.SysUserFeign; import com.yxt.anrui.reportcenter.api.carsSoldProfit.*; +import com.yxt.anrui.scm.api.scmvehrebate.ScmVehRebateCarsSoldProfitVo; +import com.yxt.anrui.scm.api.scmvehrebate.ScmVehRebateFeign; import com.yxt.common.base.service.MybatisBaseService; import com.yxt.common.base.utils.PagerUtil; import com.yxt.common.base.utils.StringUtils; @@ -16,6 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.math.BigDecimal; +import java.util.ArrayList; import java.util.Collections; import java.util.Date; import java.util.List; @@ -30,6 +33,8 @@ public class CarsSoldProfitService extends MybatisBaseService dtoList) { ResultBean rb = ResultBean.fireFail(); @@ -138,6 +143,35 @@ public class CarsSoldProfitService extends MybatisBaseService rebates(String sid) { - return null; + ResultBean rb = ResultBean.fireFail(); + CarsSoldProfitRebateAllVo carsSoldProfitRebateAllVo = new CarsSoldProfitRebateAllVo(); + List list = new ArrayList<>(); + String vinSid = sid; + BigDecimal expectedRebateTotalAll = BigDecimal.ZERO; + BigDecimal adjustedRebateTotalAll = BigDecimal.ZERO; + List scmList = scmVehRebateFeign.getDetailByVinSid(vinSid).getData(); + if (!scmList.isEmpty()) { + for (int i = 0; i < scmList.size(); i++) { + ScmVehRebateCarsSoldProfitVo scmVehRebateCarsSoldProfitVo = scmList.get(i); + CarsSoldProfitRebateDetailsVo carsSoldProfitRebateDetailsVo = new CarsSoldProfitRebateDetailsVo(); + carsSoldProfitRebateDetailsVo.setPolicy(scmVehRebateCarsSoldProfitVo.getPolicy()); + carsSoldProfitRebateDetailsVo.setRebateType(scmVehRebateCarsSoldProfitVo.getRebateTypeValue()); + carsSoldProfitRebateDetailsVo.setYearAndMonth(scmVehRebateCarsSoldProfitVo.getPalceGenDate()); + carsSoldProfitRebateDetailsVo.setRebateName(scmVehRebateCarsSoldProfitVo.getRebateName()); + carsSoldProfitRebateDetailsVo.setExpectedRebate(scmVehRebateCarsSoldProfitVo.getExpectedRebate()); + carsSoldProfitRebateDetailsVo.setRebatesAdjust(scmVehRebateCarsSoldProfitVo.getAdjustmentMoney()); + list.add(carsSoldProfitRebateDetailsVo); + if (StringUtils.isNotBlank(carsSoldProfitRebateDetailsVo.getExpectedRebate())) { + expectedRebateTotalAll.add(new BigDecimal(carsSoldProfitRebateDetailsVo.getExpectedRebate())); + } + if (StringUtils.isNotBlank(carsSoldProfitRebateDetailsVo.getRebatesAdjust())) { + adjustedRebateTotalAll.add(new BigDecimal(carsSoldProfitRebateDetailsVo.getRebatesAdjust())); + } + } + } + carsSoldProfitRebateAllVo.setList(list); + carsSoldProfitRebateAllVo.setAdjustedRebateTotal(adjustedRebateTotalAll.toString()); + carsSoldProfitRebateAllVo.setExpectedRebateTotal(adjustedRebateTotalAll.toString()); + return rb.success().setData(carsSoldProfitRebateAllVo); } } diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateCarsSoldProfitVo.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateCarsSoldProfitVo.java new file mode 100644 index 0000000000..efc216583b --- /dev/null +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateCarsSoldProfitVo.java @@ -0,0 +1,33 @@ +package com.yxt.anrui.scm.api.scmvehrebate; + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2025/5/16 + **/ +@Data +public class ScmVehRebateCarsSoldProfitVo implements Vo { + private static final long serialVersionUID = -5925794987523752087L; + + @ApiModelProperty("政策方") + private String policy; + @ApiModelProperty("所属年月") + private String palceGenDate; + @ApiModelProperty("返利类型") + private String rebateTypeValue; + @ApiModelProperty("返利名称") + private String rebateName; + @ApiModelProperty("预提返利:预提返利-预提费用的结果(待支付+抵顶)") + private String expectedRebate; + @ApiModelProperty("预计待支付费用") + private String expectTreatCost; + @ApiModelProperty("预计抵顶费用") + private String expectSuppCost; + @ApiModelProperty("返利调整") + private String adjustmentMoney; + +} diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateFeign.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateFeign.java index 7488de1e3f..fa9cd383bd 100644 --- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateFeign.java +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateFeign.java @@ -66,6 +66,11 @@ public interface ScmVehRebateFeign { @ResponseBody public ResultBean> getDetail(@PathVariable("sid") String sid); + @ApiOperation("车辆利润报表查询返利明细") + @GetMapping("/getDetailByVinSid") + @ResponseBody + ResultBean> getDetailByVinSid(@RequestParam("vinSid")String vinSid); + @ApiOperation("返利类型统计") @PostMapping("/typeStatistics") @ResponseBody diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateMapper.java b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateMapper.java index 7cb77f32dc..36981f480d 100644 --- a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateMapper.java +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateMapper.java @@ -84,4 +84,6 @@ public interface ScmVehRebateMapper extends BaseMapper { List getDetail(String vehSid); List getTypeDetail(@Param("sids") List sids); + + List getDetailByVinSid(String vinSid); } \ No newline at end of file diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateMapper.xml b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateMapper.xml index 13373f97e2..f713e55dea 100644 --- a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateMapper.xml +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateMapper.xml @@ -415,4 +415,18 @@ + + diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateRest.java b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateRest.java index 7eefa1aa8f..f6e71dc107 100644 --- a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateRest.java +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateRest.java @@ -89,6 +89,11 @@ public class ScmVehRebateRest implements ScmVehRebateFeign { return rb.success().setData(scmVehRebateStatMxVos); } + @Override + public ResultBean> getDetailByVinSid(String vinSid) { + return scmVehRebateService.getDetailByVinSid(vinSid); + } + @Override public ResultBean> typeStatistics(PagerQuery pq) { ResultBean rb = ResultBean.fireFail(); 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 688e3b2719..6770f93b91 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 @@ -2718,4 +2718,31 @@ public class ScmVehRebateService extends MybatisBaseService> getDetailByVinSid(String vinSid) { + ResultBean> rb = ResultBean.fireFail(); + List list = baseMapper.getDetailByVinSid(vinSid); + list.removeAll(Collections.singleton(null)); + if(!list.isEmpty()){ + for (int i = 0; i < list.size(); i++) { + ScmVehRebateCarsSoldProfitVo scmVehRebateCarsSoldProfitVo = list.get(i); + String expectedRebate = scmVehRebateCarsSoldProfitVo.getExpectedRebate(); + BigDecimal expectAll = BigDecimal.ZERO; + String expectTreatCost = scmVehRebateCarsSoldProfitVo.getExpectTreatCost(); + String expectSuppCost = scmVehRebateCarsSoldProfitVo.getExpectSuppCost(); + if(StringUtils.isNotBlank(expectedRebate)){ + expectAll = expectAll.add(new BigDecimal(expectedRebate)); + } + if(StringUtils.isNotBlank(expectTreatCost)){ + expectAll = expectAll.subtract(new BigDecimal(expectTreatCost)); + } + if(StringUtils.isNotBlank(expectSuppCost)){ + expectAll = expectAll.subtract(new BigDecimal(expectSuppCost)); + } + scmVehRebateCarsSoldProfitVo.setExpectedRebate(expectAll.toString()); + + } + } + return rb.success().setData(list); + } } \ No newline at end of file