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..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 @@ -1432,21 +1432,31 @@ public class BusDeliveredApplyService extends MybatisBaseService dtoList); @PostMapping("list") @ResponseBody + @ApiOperation("车辆利润报表分页") ResultBean> list(@RequestBody PagerQuery pagerQuery); + + @GetMapping("rebates") + @ResponseBody + @ApiOperation("返利明细") + ResultBean rebates(@RequestParam("sid")String sid); } diff --git a/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/carsSoldProfit/CarsSoldProfitQuery.java b/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/carsSoldProfit/CarsSoldProfitQuery.java index 8b559bfa3a..c257346de0 100644 --- a/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/carsSoldProfit/CarsSoldProfitQuery.java +++ b/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/carsSoldProfit/CarsSoldProfitQuery.java @@ -15,7 +15,7 @@ public class CarsSoldProfitQuery implements Query { @ApiModelProperty("菜单sid") private String menuSid; @ApiModelProperty("机构组织全路径") - private String orgSidPath; + private String orgPath; @ApiModelProperty("搜索分公司、车架号、车型、排产订单、销售专员") private String names; diff --git a/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/carsSoldProfit/CarsSoldProfitRebateAllVo.java b/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/carsSoldProfit/CarsSoldProfitRebateAllVo.java new file mode 100644 index 0000000000..35a138a2b3 --- /dev/null +++ b/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/carsSoldProfit/CarsSoldProfitRebateAllVo.java @@ -0,0 +1,23 @@ +package com.yxt.anrui.reportcenter.api.carsSoldProfit; + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2025/5/15 + **/ +@Data +public class CarsSoldProfitRebateAllVo implements Vo { + private static final long serialVersionUID = -9016391824372444422L; + + private List list; + @ApiModelProperty("预提返利合计") + private String expectedRebateTotal; + @ApiModelProperty("调整返利合计") + private String adjustedRebateTotal; +} diff --git a/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/carsSoldProfit/CarsSoldProfitRebateDetailsVo.java b/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/carsSoldProfit/CarsSoldProfitRebateDetailsVo.java new file mode 100644 index 0000000000..a0914cf1ca --- /dev/null +++ b/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/carsSoldProfit/CarsSoldProfitRebateDetailsVo.java @@ -0,0 +1,28 @@ +package com.yxt.anrui.reportcenter.api.carsSoldProfit; + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2025/5/15 + **/ +@Data +public class CarsSoldProfitRebateDetailsVo implements Vo { + private static final long serialVersionUID = -2059450221052046209L; + + @ApiModelProperty("政策方") + private String policy; + @ApiModelProperty("所属年月") + private String yearAndMonth; + @ApiModelProperty("返利类型") + private String rebateType; + @ApiModelProperty("返利名称") + private String rebateName; + @ApiModelProperty("预提返利") + private String expectedRebate; + @ApiModelProperty("返利调整") + private String rebatesAdjust; +} diff --git a/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/carsSoldProfit/CarsSoldProfitVo.java b/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/carsSoldProfit/CarsSoldProfitVo.java index a31ed77a1d..eb2b540b83 100644 --- a/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/carsSoldProfit/CarsSoldProfitVo.java +++ b/anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/carsSoldProfit/CarsSoldProfitVo.java @@ -27,7 +27,8 @@ public class CarsSoldProfitVo { @ApiModelProperty("事业部") private String division; @ApiModelProperty("车型") - private String model; + @JsonProperty("model") + private String vehicleAlias; @ApiModelProperty("采购系统") @JsonProperty("buySystem") @@ -58,14 +59,19 @@ public class CarsSoldProfitVo { private String moveCarPrice; @ApiModelProperty("变速箱") - private String gearbox; + @JsonProperty("gearbox") + private String gearboxTypeValue; @ApiModelProperty("排产订单编号") private String schedulingId; @ApiModelProperty("数据日期") - private String dataTime; + @JsonProperty("dataTime") + private String createDate; @ApiModelProperty("更新日期") - private String updateTime; - - private String sid; + @JsonProperty("updateTime") + private String updateDate; + + @ApiModelProperty("跳转返利明细使用") + @JsonProperty("sid") + private String vinSid; } diff --git a/anrui-reportcenter/anrui-reportcenter-biz/src/main/java/com/yxt/anrui/reportcenter/biz/carsSoldProfit/CarsSoldProfitMapper.xml b/anrui-reportcenter/anrui-reportcenter-biz/src/main/java/com/yxt/anrui/reportcenter/biz/carsSoldProfit/CarsSoldProfitMapper.xml index 650a8a5697..3d94e7f58e 100644 --- a/anrui-reportcenter/anrui-reportcenter-biz/src/main/java/com/yxt/anrui/reportcenter/biz/carsSoldProfit/CarsSoldProfitMapper.xml +++ b/anrui-reportcenter/anrui-reportcenter-biz/src/main/java/com/yxt/anrui/reportcenter/biz/carsSoldProfit/CarsSoldProfitMapper.xml @@ -8,7 +8,30 @@ + + 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 diff --git a/doc/databases/统计报表/车辆利润报表.sql b/doc/databases/统计报表/车辆利润报表.sql index 1cecb5d622..5033f29d5e 100644 --- a/doc/databases/统计报表/车辆利润报表.sql +++ b/doc/databases/统计报表/车辆利润报表.sql @@ -23,7 +23,6 @@ CREATE TABLE `cars_sold_profit` `division` varchar(64) DEFAULT NULL COMMENT '事业部名称', `divisionSid` varchar(64) DEFAULT NULL COMMENT '事业部sid', `vehModelSid` varchar(64) DEFAULT NULL COMMENT '车型sid', - `vehModel` varchar(64) DEFAULT NULL COMMENT '车型', `vehMConfigSid` varchar(64) DEFAULT NULL COMMENT '车型配置sid', `purchaseSystemSid` varchar(64) DEFAULT NULL COMMENT '采购系统sid', `purchaseSystemName` varchar(64) DEFAULT NULL COMMENT '采购系统名称', @@ -31,7 +30,6 @@ CREATE TABLE `cars_sold_profit` `vinSid` varchar(200) DEFAULT NULL COMMENT '车辆sid', `locationSid` varchar(200) DEFAULT NULL COMMENT '存放地点sid', `locationName` varchar(200) DEFAULT NULL COMMENT '存放地点', - `type` varchar(200) DEFAULT NULL COMMENT '类型', `exStockPrice` decimal(10, 2) DEFAULT NULL COMMENT '出库价', `expectedMaori` decimal(10, 2) DEFAULT NULL COMMENT '预计毛利', `rebatesAdjust` decimal(10, 2) DEFAULT NULL COMMENT '返利调整', @@ -44,7 +42,6 @@ CREATE TABLE `cars_sold_profit` `moveCarPrice` decimal(10, 2) DEFAULT NULL COMMENT '调车费', `costPrice` decimal(10, 2) DEFAULT NULL COMMENT '入库价', `schedulingId` varchar(500) DEFAULT NULL COMMENT '排产订单编号', - `gearbox` varchar(500) DEFAULT NULL COMMENT '变速箱', `createDate` date DEFAULT NULL COMMENT '数据日期', `updateDate` date DEFAULT NULL COMMENT '更新日期', PRIMARY KEY (`id`), 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' diff --git a/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/VehfleetApplication.java b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/VehfleetApplication.java index d02f695e92..1d0b07b5cb 100644 --- a/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/VehfleetApplication.java +++ b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/VehfleetApplication.java @@ -11,7 +11,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients; @EnableDiscoveryClient @SpringBootApplication(scanBasePackages = { "com.yxt.common.base.config", - "com.yxt.anrui.oa" + "com.yxt.anrui.vehfleet" }) @EnableFeignClients(basePackages = {"com.yxt.*.*"}) public class VehfleetApplication { diff --git a/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/api/AffiliatedCompanyRest.java b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/api/AffiliatedCompanyRest.java new file mode 100644 index 0000000000..c2ebf9238f --- /dev/null +++ b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/api/AffiliatedCompanyRest.java @@ -0,0 +1,62 @@ +package com.yxt.anrui.vehfleet.api; + +import com.yxt.anrui.vehfleet.biz.affiliatedcompany.*; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2025/5/14 10:12 + */ +@RestController +@RequestMapping("v1/affiliatedcompany") +public class AffiliatedCompanyRest { + @Autowired + AffiliatedCompanyService affiliatedCompanyService; + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = affiliatedCompanyService.listPageVo(pq); + return rb.success().setData(pv); + } + @ApiOperation("查询全部") + @PostMapping("/list") + public ResultBean> list() { + ResultBean rb = ResultBean.fireFail(); + List pv = affiliatedCompanyService.list(); + return rb.success().setData(pv); + } + @ApiOperation("保存或者保存") + @PostMapping("/saveOrUpdate") + public ResultBean save(@RequestBody AffiliatedCompanyDto dto) { + return affiliatedCompanyService.saveOrUpdate(dto); + } + + @ApiOperation("根据sid查询数据") + @GetMapping("/fetchSid/{sid}") + public ResultBean getEnterpriseBySid(@PathVariable String sid){ + ResultBean rb = ResultBean.fireFail(); + AffiliatedCompanyVo AffiliatedCompanyVo=affiliatedCompanyService.fetchSid(sid); + return rb.success().setData(AffiliatedCompanyVo); + } + @ApiOperation("删除") + @DeleteMapping("/delete/{sid}") + public ResultBean delete(@PathVariable String sid) { + return affiliatedCompanyService.delete(sid); + } + @ApiOperation("根据sid批量删除") + @DeleteMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids) { + ResultBean rb = ResultBean.fireFail(); + affiliatedCompanyService.delAll(sids); + return rb.success(); + } +} diff --git a/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/api/RegulatoryDocumentsRest.java b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/api/RegulatoryDocumentsRest.java new file mode 100644 index 0000000000..58b15d1183 --- /dev/null +++ b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/api/RegulatoryDocumentsRest.java @@ -0,0 +1,62 @@ +package com.yxt.anrui.vehfleet.api; + +import com.yxt.anrui.vehfleet.biz.regulatorydocuments.*; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2025/5/15 10:55 + */ +@RestController +@RequestMapping("v1/regulatorydocuments") +public class RegulatoryDocumentsRest { + @Autowired + RegulatoryDocumentsService regulatoryDocumentsService; + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = regulatoryDocumentsService.listPageVo(pq); + return rb.success().setData(pv); + } + @ApiOperation("查询全部") + @PostMapping("/list") + public ResultBean> list() { + ResultBean rb = ResultBean.fireFail(); + List pv = regulatoryDocumentsService.list(); + return rb.success().setData(pv); + } + @ApiOperation("保存或者保存") + @PostMapping("/saveOrUpdate") + public ResultBean save(@RequestBody RegulatoryDocumentsDto dto) { + return regulatoryDocumentsService.saveOrUpdate(dto); + } + + @ApiOperation("根据sid查询数据") + @GetMapping("/fetchSid/{sid}") + public ResultBean getEnterpriseBySid(@PathVariable String sid){ + ResultBean rb = ResultBean.fireFail(); + RegulatoryDocumentsVo RegulatoryDocumentsVo=regulatoryDocumentsService.fetchSid(sid); + return rb.success().setData(RegulatoryDocumentsVo); + } + @ApiOperation("删除") + @DeleteMapping("/delete/{sid}") + public ResultBean delete(@PathVariable String sid) { + return regulatoryDocumentsService.delete(sid); + } + @ApiOperation("根据sid批量删除") + @DeleteMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids) { + ResultBean rb = ResultBean.fireFail(); + regulatoryDocumentsService.delAll(sids); + return rb.success(); + } +} diff --git a/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/affiliatedcompany/AffiliatedCompany.java b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/affiliatedcompany/AffiliatedCompany.java new file mode 100644 index 0000000000..2e7a6e601f --- /dev/null +++ b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/affiliatedcompany/AffiliatedCompany.java @@ -0,0 +1,19 @@ +package com.yxt.anrui.vehfleet.biz.affiliatedcompany; + +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("affiliated_company") +public class AffiliatedCompany extends BaseEntity { + private String corporateName;//公司名称 + private String contacts;//联系人 + private String contactNumber;//联系方式 +} diff --git a/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/affiliatedcompany/AffiliatedCompanyDto.java b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/affiliatedcompany/AffiliatedCompanyDto.java new file mode 100644 index 0000000000..9167be0012 --- /dev/null +++ b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/affiliatedcompany/AffiliatedCompanyDto.java @@ -0,0 +1,17 @@ +package com.yxt.anrui.vehfleet.biz.affiliatedcompany; + +import io.swagger.annotations.ApiModel; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2025/5/14 10:38 + */ +@ApiModel(value = "挂靠车辆 数据传输对象", description = "挂靠车辆 数据传输对象") +@Data +public class AffiliatedCompanyDto { + 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/affiliatedcompany/AffiliatedCompanyMapper.java b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/affiliatedcompany/AffiliatedCompanyMapper.java new file mode 100644 index 0000000000..397781a173 --- /dev/null +++ b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/affiliatedcompany/AffiliatedCompanyMapper.java @@ -0,0 +1,20 @@ +package com.yxt.anrui.vehfleet.biz.affiliatedcompany; + +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; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2023/4/12 11:49 + */ +@Mapper +public interface AffiliatedCompanyMapper extends BaseMapper { + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + AffiliatedCompanyVo fetchSid( @Param("sid") String sid); +} diff --git a/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/affiliatedcompany/AffiliatedCompanyMapper.xml b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/affiliatedcompany/AffiliatedCompanyMapper.xml new file mode 100644 index 0000000000..9a63ddca45 --- /dev/null +++ b/yxt-vehfleet/src/main/java/com/yxt/anrui/vehfleet/biz/affiliatedcompany/AffiliatedCompanyMapper.xml @@ -0,0 +1,19 @@ + + + + + + + + + \ 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; +}