feat(admin): 新增费用项目拖拽排序功能
- 在 CostItemController 中新增 dragCostItem 接口,支持 PATCH 和 PUT 方法 - 引入 CostItemDragCmd 参数校验和权限注解 - 实现费用项目的拖拽排序逻辑,更新 sort 字段 - 优化查询逻辑,按 sort 升序和 createdAt 降序排列 - 添加事务管理确保排序操作的原子性 - 提供计算新排序值及重置排序的方法 - 支持插入到开头、中间、末尾三种场景 - 增加间隙耗尽时的批量重置排序机制
This commit is contained in:
parent
03e24c868f
commit
2ac7654203
@ -97,18 +97,6 @@
|
||||
<artifactId>mybatis-mate-annotation</artifactId>
|
||||
<version>1.3.4</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.itextpdf</groupId>
|
||||
<artifactId>itext7-core</artifactId>
|
||||
<version>8.0.3</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.itextpdf</groupId>
|
||||
<artifactId>html2pdf</artifactId>
|
||||
<version>5.0.3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@ -9,6 +9,7 @@ import com.xunhong.erp.turbo.api.biz.api.CostItemServiceI;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.CostItemCreateCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.CostItemDestroyCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.CostItemUpdateCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.CostItemDragCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.CostItemListQry;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.CostItemPageQry;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.CostItemShowQry;
|
||||
@ -82,4 +83,13 @@ public class CostItemController {
|
||||
costItemService.destroy(costItemDestroyCmd);
|
||||
return Response.buildSuccess();
|
||||
}
|
||||
|
||||
@SaCheckLogin
|
||||
// @SaCheckPermission(value = {PermissionConstant.MDB_BUSINESS_COST_ITEM_UPDATE})
|
||||
@RequestMapping(value = "dragCostItem", method = {RequestMethod.PATCH, RequestMethod.PUT})
|
||||
@Operation(summary = "费用项目拖拽排序", method = "PATCH")
|
||||
public Response dragCostItem(@RequestBody @Validated CostItemDragCmd costItemDragCmd) {
|
||||
costItemService.drag(costItemDragCmd);
|
||||
return Response.buildSuccess();
|
||||
}
|
||||
}
|
||||
@ -2,6 +2,9 @@ package com.xunhong.erp.turbo.admin.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.xunhong.erp.turbo.api.biz.api.DealerServiceI;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.DealerListQry;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.vo.DealerVO;
|
||||
import com.xunhong.erp.turbo.api.facade.api.DeepSeekServiceI;
|
||||
import com.xunhong.erp.turbo.api.facade.dto.cmd.VehicleExtractionCmd;
|
||||
import com.xunhong.erp.turbo.api.facade.dto.vo.VehicleExtractionVO;
|
||||
@ -16,6 +19,9 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 聊天
|
||||
*/
|
||||
@ -29,10 +35,30 @@ public class ExtractionController {
|
||||
@DubboReference(version = "1.0.0")
|
||||
private final DeepSeekServiceI deepSeekService;
|
||||
|
||||
@DubboReference(version = "1.0.0")
|
||||
private final DealerServiceI dealerService;
|
||||
|
||||
@SaCheckLogin
|
||||
@PostMapping("/extraction/vehicle")
|
||||
@Operation(summary = "智能提取物流信息", method = "POST")
|
||||
public SingleResponse<VehicleExtractionVO> vehicleExtraction(@RequestBody @Validated VehicleExtractionCmd vehicleExtractionCmd) {
|
||||
return SingleResponse.of(deepSeekService.vehicleExtraction(vehicleExtractionCmd));
|
||||
DealerListQry dealerListQry = new DealerListQry();
|
||||
dealerListQry.setStatus(Boolean.TRUE);
|
||||
List<DealerVO> dealerVOList = dealerService.list(dealerListQry);
|
||||
String dealerNames = dealerVOList.stream().map(DealerVO::getShortName).collect(Collectors.joining(","));
|
||||
vehicleExtractionCmd.setDealerNames(dealerNames);
|
||||
|
||||
VehicleExtractionVO vehicleExtractionVO = deepSeekService.vehicleExtraction(vehicleExtractionCmd);
|
||||
String dealerName = vehicleExtractionVO.getDealerName();
|
||||
if (dealerName != null) {
|
||||
dealerVOList.stream()
|
||||
.filter(dealerVO -> dealerVO.getShortName().equals(dealerName))
|
||||
.findFirst()
|
||||
.ifPresent(dealerVO -> {
|
||||
vehicleExtractionVO.setDealerId(dealerVO.getDealerId());
|
||||
vehicleExtractionVO.setDealerVO(dealerVO);
|
||||
});
|
||||
}
|
||||
return SingleResponse.of(vehicleExtractionVO);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.xunhong.erp.turbo.admin.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.Response;
|
||||
@ -9,6 +10,7 @@ import com.xunhong.erp.turbo.api.biz.api.SupplierServiceI;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.SupplierCreateCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.SupplierDestroyCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.SupplierUpdateCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.SupplierCheckQry;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.SupplierListQry;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.SupplierPageQry;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.SupplierShowQry;
|
||||
@ -82,4 +84,10 @@ public class SupplierController {
|
||||
supplierService.destroy(supplierDestroyCmd);
|
||||
return Response.buildSuccess();
|
||||
}
|
||||
@SaCheckLogin
|
||||
@GetMapping("/checkSupplier")
|
||||
@Operation(summary = "检查供应商", method = "GET")
|
||||
public SingleResponse<SupplierVO> checkSupplier(@ModelAttribute @Validated SupplierCheckQry supplierCheckQry) {
|
||||
return SingleResponse.of(supplierService.checkSupplier(supplierCheckQry));
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,21 @@
|
||||
package com.xunhong.erp.turbo.biz.app.executor.query;
|
||||
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.CostItemDragCmd;
|
||||
import com.xunhong.erp.turbo.biz.domain.gateway.CostItemGateway;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author shenyifei
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class CostItemDragCmdExe {
|
||||
private final CostItemGateway costItemGateway;
|
||||
|
||||
public void execute(CostItemDragCmd costItemDragCmd) {
|
||||
costItemGateway.drag(costItemDragCmd);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package com.xunhong.erp.turbo.biz.app.executor.query;
|
||||
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.SupplierCheckQry;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.SupplierShowQry;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.vo.SupplierVO;
|
||||
import com.xunhong.erp.turbo.biz.app.assembler.SupplierAssembler;
|
||||
import com.xunhong.erp.turbo.biz.domain.entity.Supplier;
|
||||
import com.xunhong.erp.turbo.biz.domain.gateway.SupplierGateway;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author shenyifei
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class SupplierCheckQryExe {
|
||||
|
||||
private final SupplierAssembler supplierAssembler;
|
||||
private final SupplierGateway supplierGateway;
|
||||
|
||||
public SupplierVO execute(SupplierCheckQry supplierCheckQry) {
|
||||
Supplier supplier = supplierGateway.check(supplierCheckQry);
|
||||
|
||||
return supplierAssembler.toSupplierVO(supplier);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ import com.xunhong.erp.turbo.api.biz.api.CostItemServiceI;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.CostItemCreateCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.CostItemDestroyCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.CostItemUpdateCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.CostItemDragCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.CostItemListQry;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.CostItemPageQry;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.CostItemShowQry;
|
||||
@ -15,6 +16,7 @@ import com.xunhong.erp.turbo.biz.app.executor.cmd.CostItemUpdateCmdExe;
|
||||
import com.xunhong.erp.turbo.biz.app.executor.query.CostItemListQryExe;
|
||||
import com.xunhong.erp.turbo.biz.app.executor.query.CostItemPageQryExe;
|
||||
import com.xunhong.erp.turbo.biz.app.executor.query.CostItemShowQryExe;
|
||||
import com.xunhong.erp.turbo.biz.app.executor.query.CostItemDragCmdExe;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
@ -37,6 +39,7 @@ public class CostItemServiceImpl implements CostItemServiceI {
|
||||
private final CostItemListQryExe costItemListQryExe;
|
||||
private final CostItemShowQryExe costItemShowQryExe;
|
||||
private final CostItemDestroyCmdExe costItemDestroyCmdExe;
|
||||
private final CostItemDragCmdExe costItemDragCmdExe;
|
||||
|
||||
@Override
|
||||
public CostItemVO create(CostItemCreateCmd costItemCreateCmd) {
|
||||
@ -67,5 +70,9 @@ public class CostItemServiceImpl implements CostItemServiceI {
|
||||
public void destroy(CostItemDestroyCmd costItemDestroyCmd) {
|
||||
costItemDestroyCmdExe.execute(costItemDestroyCmd);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drag(CostItemDragCmd costItemDragCmd) {
|
||||
costItemDragCmdExe.execute(costItemDragCmd);
|
||||
}
|
||||
}
|
||||
@ -4,6 +4,7 @@ import com.xunhong.erp.turbo.api.biz.api.SupplierServiceI;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.SupplierCreateCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.SupplierDestroyCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.SupplierUpdateCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.SupplierCheckQry;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.SupplierListQry;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.SupplierPageQry;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.SupplierShowQry;
|
||||
@ -12,6 +13,7 @@ import com.xunhong.erp.turbo.base.dto.PageDTO;
|
||||
import com.xunhong.erp.turbo.biz.app.executor.cmd.SupplierCreateCmdExe;
|
||||
import com.xunhong.erp.turbo.biz.app.executor.cmd.SupplierDestroyCmdExe;
|
||||
import com.xunhong.erp.turbo.biz.app.executor.cmd.SupplierUpdateCmdExe;
|
||||
import com.xunhong.erp.turbo.biz.app.executor.query.SupplierCheckQryExe;
|
||||
import com.xunhong.erp.turbo.biz.app.executor.query.SupplierListQryExe;
|
||||
import com.xunhong.erp.turbo.biz.app.executor.query.SupplierPageQryExe;
|
||||
import com.xunhong.erp.turbo.biz.app.executor.query.SupplierShowQryExe;
|
||||
@ -37,6 +39,7 @@ public class SupplierServiceImpl implements SupplierServiceI {
|
||||
private final SupplierListQryExe supplierListQryExe;
|
||||
private final SupplierShowQryExe supplierShowQryExe;
|
||||
private final SupplierDestroyCmdExe supplierDestroyCmdExe;
|
||||
private final SupplierCheckQryExe supplierCheckQryExe;
|
||||
|
||||
@Override
|
||||
public SupplierVO create(SupplierCreateCmd supplierCreateCmd) {
|
||||
@ -67,5 +70,10 @@ public class SupplierServiceImpl implements SupplierServiceI {
|
||||
public void destroy(SupplierDestroyCmd supplierDestroyCmd) {
|
||||
supplierDestroyCmdExe.execute(supplierDestroyCmd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SupplierVO checkSupplier(SupplierCheckQry supplierCheckQry) {
|
||||
return supplierCheckQryExe.execute(supplierCheckQry);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -62,5 +62,9 @@ public class CostItem extends DTO {
|
||||
*/
|
||||
private LocalDateTime createdAt;
|
||||
|
||||
}
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private BigDecimal sort;
|
||||
|
||||
}
|
||||
@ -103,4 +103,24 @@ public class Dealer extends DTO {
|
||||
*/
|
||||
private List<DealerPaymentAccount> dealerPaymentAccountList;
|
||||
|
||||
/**
|
||||
* 是否开启计提税金
|
||||
*/
|
||||
private Boolean enableAccrualTax;
|
||||
|
||||
/**
|
||||
* 计提税金比例
|
||||
*/
|
||||
private BigDecimal accrualTaxRatio;
|
||||
|
||||
/**
|
||||
* 是否开启公司返点
|
||||
*/
|
||||
private Boolean enableCompanyRebate;
|
||||
|
||||
/**
|
||||
* 公司返点比例
|
||||
*/
|
||||
private BigDecimal companyRebateRatio;
|
||||
|
||||
}
|
||||
@ -2,9 +2,11 @@ package com.xunhong.erp.turbo.biz.domain.entity;
|
||||
|
||||
import com.alibaba.cola.domain.Entity;
|
||||
import com.alibaba.cola.dto.DTO;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.enums.RebateCalcMethodEnum;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
@ -45,6 +47,21 @@ public class DealerRebateCustomer extends DTO {
|
||||
*/
|
||||
private LocalDateTime createdAt;
|
||||
|
||||
/**
|
||||
* 返点计算方式:1_按净重计算;2_固定金额;3_不固定
|
||||
*/
|
||||
private RebateCalcMethodEnum calcMethod;
|
||||
|
||||
/**
|
||||
* 返点单价
|
||||
*/
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
/**
|
||||
* 返点金额
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
|
||||
private Dealer dealer;
|
||||
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.CostItemCreateCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.CostItemDestroyCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.CostItemUpdateCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.CostItemDragCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.CostItemListQry;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.CostItemPageQry;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.CostItemShowQry;
|
||||
@ -26,5 +27,6 @@ public interface CostItemGateway {
|
||||
CostItem show(CostItemShowQry costItemShowQry);
|
||||
|
||||
void destroy(CostItemDestroyCmd costItemDestroyCmd);
|
||||
}
|
||||
|
||||
void drag(CostItemDragCmd costItemDragCmd);
|
||||
}
|
||||
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.SupplierCreateCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.SupplierDestroyCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.SupplierUpdateCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.SupplierCheckQry;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.SupplierListQry;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.SupplierPageQry;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.SupplierShowQry;
|
||||
@ -26,5 +27,7 @@ public interface SupplierGateway {
|
||||
Supplier show(SupplierShowQry supplierShowQry);
|
||||
|
||||
void destroy(SupplierDestroyCmd supplierDestroyCmd);
|
||||
|
||||
Supplier check(SupplierCheckQry supplierCheckQry);
|
||||
}
|
||||
|
||||
|
||||
@ -67,5 +67,10 @@ public class CostItemDO extends BaseDO<CostItemDO> {
|
||||
@TableField(value = "status")
|
||||
private Boolean status;
|
||||
|
||||
}
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@TableField(value = "sort")
|
||||
private BigDecimal sort;
|
||||
|
||||
}
|
||||
@ -110,6 +110,30 @@ public class DealerDO extends BaseDO<DealerDO> {
|
||||
@TableField(value = "sort")
|
||||
private BigDecimal sort;
|
||||
|
||||
/**
|
||||
* 是否开启计提税金
|
||||
*/
|
||||
@TableField(value = "enable_accrual_tax")
|
||||
private Boolean enableAccrualTax;
|
||||
|
||||
/**
|
||||
* 计提税金比例
|
||||
*/
|
||||
@TableField(value = "accrual_tax_ratio")
|
||||
private BigDecimal accrualTaxRatio;
|
||||
|
||||
/**
|
||||
* 是否开启公司返点
|
||||
*/
|
||||
@TableField(value = "enable_company_rebate")
|
||||
private Boolean enableCompanyRebate;
|
||||
|
||||
/**
|
||||
* 公司返点比例
|
||||
*/
|
||||
@TableField(value = "company_rebate_ratio")
|
||||
private BigDecimal companyRebateRatio;
|
||||
|
||||
/**
|
||||
* 付款账户列表
|
||||
*/
|
||||
|
||||
@ -4,10 +4,13 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.enums.RebateCalcMethodEnum;
|
||||
import com.xunhong.erp.turbo.datasource.domain.entity.BaseDO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author shenyifei
|
||||
*/
|
||||
@ -46,6 +49,24 @@ public class DealerRebateCustomerDO extends BaseDO<DealerRebateCustomerDO> {
|
||||
@TableField(value = "remark")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 返点计算方式:1_按净重计算;2_固定金额;3_不固定
|
||||
*/
|
||||
@TableField(value = "calc_method")
|
||||
private RebateCalcMethodEnum calcMethod;
|
||||
|
||||
/**
|
||||
* 返点单价
|
||||
*/
|
||||
@TableField(value = "unit_price")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
/**
|
||||
* 返点金额
|
||||
*/
|
||||
@TableField(value = "amount")
|
||||
private BigDecimal amount;
|
||||
|
||||
@TableField(exist = false)
|
||||
private DealerDO dealerDO;
|
||||
}
|
||||
|
||||
@ -2,12 +2,14 @@ package com.xunhong.erp.turbo.biz.infrastructure.gateway;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.CostItemCreateCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.CostItemDestroyCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.CostItemUpdateCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.CostItemDragCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.CostItemListQry;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.CostItemPageQry;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.CostItemShowQry;
|
||||
@ -18,9 +20,11 @@ import com.xunhong.erp.turbo.biz.infrastructure.entity.CostItemDO;
|
||||
import com.xunhong.erp.turbo.biz.infrastructure.mapper.CostItemMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author shenyifei
|
||||
@ -46,6 +50,7 @@ public class CostItemGatewayImpl implements CostItemGateway {
|
||||
queryWrapper.like(StrUtil.isNotBlank(costItemPageQry.getRemark()), CostItemDO::getRemark, costItemPageQry.getRemark());
|
||||
queryWrapper.eq(Objects.nonNull(costItemPageQry.getStatus()), CostItemDO::getStatus, costItemPageQry.getStatus());
|
||||
queryWrapper.eq(Objects.nonNull(costItemPageQry.getCostType()), CostItemDO::getCostType, costItemPageQry.getCostType());
|
||||
queryWrapper.orderByAsc(CostItemDO::getSort);
|
||||
queryWrapper.orderByDesc(CostItemDO::getCreatedAt);
|
||||
|
||||
IPage<CostItemDO> page = new Page<>(costItemPageQry.getPageIndex(), costItemPageQry.getPageSize());
|
||||
@ -60,6 +65,8 @@ public class CostItemGatewayImpl implements CostItemGateway {
|
||||
queryWrapper.eq(Objects.nonNull(costItemListQry.getShowInEntry()), CostItemDO::getStatus, costItemListQry.getShowInEntry());
|
||||
queryWrapper.eq(Objects.nonNull(costItemListQry.getStatus()), CostItemDO::getStatus, costItemListQry.getStatus());
|
||||
queryWrapper.eq(Objects.nonNull(costItemListQry.getCostType()), CostItemDO::getCostType, costItemListQry.getCostType());
|
||||
queryWrapper.orderByAsc(CostItemDO::getSort);
|
||||
queryWrapper.orderByDesc(CostItemDO::getCreatedAt);
|
||||
List<CostItemDO> costItemDOList = costItemMapper.selectList(queryWrapper);
|
||||
return costItemDOList.stream().map(costItemConvert::toCostItem).toList();
|
||||
}
|
||||
@ -97,5 +104,50 @@ public class CostItemGatewayImpl implements CostItemGateway {
|
||||
CostItemDO costItemDO = costItemMapper.selectOne(queryWrapper);
|
||||
costItemDO.deleteById();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void drag(CostItemDragCmd costItemDragCmd) {
|
||||
reorderTask(costItemDragCmd.getCurrentId(), costItemDragCmd.getPrevId(), costItemDragCmd.getNextId());
|
||||
}
|
||||
|
||||
// 拖拽排序核心方法
|
||||
public void reorderTask(Long currentId, Long prevId, Long nextId) {
|
||||
// 获取相邻元素的sort值
|
||||
Double prevSort = Optional.ofNullable(prevId)
|
||||
.map(id -> costItemMapper.selectById(id).getSort().doubleValue())
|
||||
.orElse(null);
|
||||
Double nextSort = Optional.ofNullable(nextId)
|
||||
.map(id -> costItemMapper.selectById(id).getSort().doubleValue())
|
||||
.orElse(null);
|
||||
// 计算新sort值
|
||||
Double newSort = calculateNewSort(prevSort, nextSort);
|
||||
// 检查是否需要重整排序
|
||||
if (needResetSort(prevSort, nextSort)) {
|
||||
costItemMapper.batchResetSort(costItemMapper.selectById(currentId).getItemId());
|
||||
} else {
|
||||
// 更新当前任务sort值
|
||||
costItemMapper.update(null, new LambdaUpdateWrapper<CostItemDO>()
|
||||
.eq(CostItemDO::getItemId, currentId)
|
||||
.set(CostItemDO::getSort, newSort)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
private Double calculateNewSort(Double prevSort, Double nextSort) {
|
||||
if (prevSort == null && nextSort != null) {
|
||||
return nextSort - 1000; // 插入到开头
|
||||
} else if (nextSort == null && prevSort != null) {
|
||||
return prevSort + 1000; // 插入到末尾
|
||||
} else if (prevSort == null && nextSort == null) {
|
||||
return 0.0;
|
||||
} else {
|
||||
return (prevSort + nextSort) / 2; // 插入中间
|
||||
}
|
||||
}
|
||||
|
||||
private boolean needResetSort(Double prevSort, Double nextSort) {
|
||||
return prevSort != null && nextSort != null
|
||||
&& (nextSort - prevSort) < 1.0; // 判断间隙是否耗尽
|
||||
}
|
||||
}
|
||||
@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.SupplierCreateCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.SupplierDestroyCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.SupplierUpdateCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.SupplierCheckQry;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.SupplierListQry;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.SupplierPageQry;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.SupplierShowQry;
|
||||
@ -15,6 +16,7 @@ import com.xunhong.erp.turbo.biz.domain.gateway.SupplierGateway;
|
||||
import com.xunhong.erp.turbo.biz.infrastructure.convert.SupplierConvert;
|
||||
import com.xunhong.erp.turbo.biz.infrastructure.entity.SupplierDO;
|
||||
import com.xunhong.erp.turbo.biz.infrastructure.mapper.SupplierMapper;
|
||||
import com.xunhong.erp.turbo.datasource.util.AesUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@ -98,5 +100,22 @@ public class SupplierGatewayImpl implements SupplierGateway {
|
||||
SupplierDO supplierDO = supplierMapper.selectOne(queryWrapper);
|
||||
supplierDO.deleteById();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Supplier check(SupplierCheckQry supplierCheckQry) {
|
||||
LambdaQueryWrapper<SupplierDO> queryWrapper = Wrappers.lambdaQuery(SupplierDO.class);
|
||||
queryWrapper.eq(Objects.nonNull(supplierCheckQry.getPhone()), SupplierDO::getPhone, AesUtil.encrypt(supplierCheckQry.getPhone()));
|
||||
queryWrapper.eq(Objects.nonNull(supplierCheckQry.getIdCard()), SupplierDO::getIdCard, AesUtil.encrypt(supplierCheckQry.getIdCard()));
|
||||
queryWrapper.eq(Objects.nonNull(supplierCheckQry.getName()), SupplierDO::getName, supplierCheckQry.getName());
|
||||
queryWrapper.ne(Objects.nonNull(supplierCheckQry.getSupplierId()), SupplierDO::getSupplierId, supplierCheckQry.getSupplierId());
|
||||
|
||||
queryWrapper.last("limit 1");
|
||||
SupplierDO userDO = supplierMapper.selectOne(queryWrapper);
|
||||
if (Objects.isNull(userDO)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return supplierConvert.toSupplier(userDO);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -3,11 +3,19 @@ package com.xunhong.erp.turbo.biz.infrastructure.mapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.xunhong.erp.turbo.biz.infrastructure.entity.CostItemDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Update;
|
||||
|
||||
/**
|
||||
* @author shenyifei
|
||||
*/
|
||||
@Mapper
|
||||
public interface CostItemMapper extends BaseMapper<CostItemDO> {
|
||||
// 批量更新排序值(用于间隙重整)
|
||||
@Update("UPDATE cost_item t " +
|
||||
"JOIN (SELECT item_id, (ROW_NUMBER() OVER (ORDER BY sort) - 1) * 1000 AS new_sort " +
|
||||
"FROM cost_item WHERE item_id = #{itemId}) AS sorted_rows " +
|
||||
"ON t.item_id = sorted_rows.item_id " +
|
||||
"SET t.sort = sorted_rows.new_sort WHERE t.item_id = #{itemId}")
|
||||
void batchResetSort(@Param("itemId") Long itemId);
|
||||
}
|
||||
|
||||
|
||||
@ -14,6 +14,10 @@
|
||||
<result property="freightCostFlag" column="freight_cost_flag"/>
|
||||
<result property="strawMatCostFlag" column="straw_mat_cost_flag"/>
|
||||
<result property="includePackingFlag" column="include_packing_flag"/>
|
||||
<result property="enableAccrualTax" column="enable_accrual_tax"/>
|
||||
<result property="accrualTaxRatio" column="accrual_tax_ratio"/>
|
||||
<result property="enableCompanyRebate" column="enable_company_rebate"/>
|
||||
<result property="companyRebateRatio" column="company_rebate_ratio"/>
|
||||
<result property="documentTypes" column="document_types"/>
|
||||
<result property="receivable" column="receivable"/>
|
||||
<result property="remark" column="remark"/>
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.xunhong.erp.turbo.facade.app.executor.cmd;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.xunhong.erp.turbo.api.facade.dto.cmd.VehicleExtractionCmd;
|
||||
import com.xunhong.erp.turbo.api.facade.dto.vo.VehicleExtractionVO;
|
||||
@ -26,9 +27,14 @@ public class VehicleExtractionCmdExe {
|
||||
public VehicleExtractionVO execute(VehicleExtractionCmd vehicleExtractionCmd) {
|
||||
SystemMessage systemMessage = SystemMessage.builder().text("# 角色\n" +
|
||||
"你是物流信息处理助手,可以快速提取和整理运单中的关键信息(车牌号、司机、电话、出发地、目的地、运费)。\n" +
|
||||
"# 任务1\n" +
|
||||
"请从运单信息中提取车牌、司机、电话、出发地、目的地、运费等信息,并返回一个JSON格式的字符串。\n" +
|
||||
"# 任务2\n" +
|
||||
"通过目的地去匹配经销商名称,待匹配列表如下" +
|
||||
"\n" + vehicleExtractionCmd.getDealerNames() +
|
||||
"\n" +
|
||||
"# 限制\n" +
|
||||
"只做信息提取,如果没有可提取的数据请返回 {}\n" +
|
||||
"只做信息提取和匹配,如果没有可提取的数据请返回 {}\n" +
|
||||
"\n" +
|
||||
"## 输入示例\n" +
|
||||
"15号装车 9米6高栏 兴仁拉纸箱\n" +
|
||||
@ -40,7 +46,7 @@ public class VehicleExtractionCmdExe {
|
||||
"工作上班时间,12小时内卸完货结运费,如遇雨天延迟装货不补运费\n" +
|
||||
"\n" +
|
||||
"## 输出示例\n" +
|
||||
"{\"plate\":\"豫RFC220\",\"driver\":null,\"phone\":\"13937795142\",\"origin\":\"五合镇附近\",\"destination\":\"湖北襄阳\",\"price\":\"7000\"}").build();
|
||||
"{\"plate\":\"豫RFC220\",\"driver\":null,\"phone\":\"13937795142\",\"origin\":\"五合镇附近\",\"destination\":\"湖北襄阳\",\"price\":\"7000\",\"dealerName\":\"xxxx\"}").build();
|
||||
|
||||
UserMessage userMessage = UserMessage.builder().text(vehicleExtractionCmd.getMessage()).build();
|
||||
Prompt prompt = Prompt.builder().messages(List.of(systemMessage, userMessage)).build();
|
||||
|
||||
@ -3,6 +3,7 @@ package com.xunhong.erp.turbo.api.biz.api;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.CostItemCreateCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.CostItemDestroyCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.CostItemUpdateCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.CostItemDragCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.CostItemListQry;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.CostItemPageQry;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.CostItemShowQry;
|
||||
@ -26,5 +27,6 @@ public interface CostItemServiceI {
|
||||
CostItemVO show(CostItemShowQry costItemShowQry);
|
||||
|
||||
void destroy(CostItemDestroyCmd costItemDestroyCmd);
|
||||
}
|
||||
|
||||
void drag(CostItemDragCmd costItemDragCmd);
|
||||
}
|
||||
@ -3,6 +3,7 @@ package com.xunhong.erp.turbo.api.biz.api;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.SupplierCreateCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.SupplierDestroyCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.cmd.SupplierUpdateCmd;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.SupplierCheckQry;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.SupplierListQry;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.SupplierPageQry;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.qry.SupplierShowQry;
|
||||
@ -26,5 +27,7 @@ public interface SupplierServiceI {
|
||||
SupplierVO show(SupplierShowQry supplierShowQry);
|
||||
|
||||
void destroy(SupplierDestroyCmd supplierDestroyCmd);
|
||||
|
||||
SupplierVO checkSupplier(SupplierCheckQry supplierCheckQry);
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,33 @@
|
||||
package com.xunhong.erp.turbo.api.biz.dto.cmd;
|
||||
|
||||
import com.xunhong.erp.turbo.base.dto.Command;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @author shenyifei
|
||||
*/
|
||||
@Data
|
||||
@Schema(title = "费用项目拖拽")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CostItemDragCmd extends Command {
|
||||
|
||||
/**
|
||||
* 相邻元素
|
||||
*/
|
||||
@Schema(title = "相邻元素前")
|
||||
private Long prevId;
|
||||
|
||||
/**
|
||||
* 相邻元素
|
||||
*/
|
||||
@Schema(title = "相邻元素后")
|
||||
private Long nextId;
|
||||
|
||||
/**
|
||||
* 当前元素
|
||||
*/
|
||||
@Schema(title = "当前元素")
|
||||
private Long currentId;
|
||||
}
|
||||
@ -94,5 +94,29 @@ public class DealerCreateCmd extends Command {
|
||||
@Schema(title = "状态:1_启用;0_禁用;", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Boolean status;
|
||||
|
||||
/**
|
||||
* 是否开启计提税金
|
||||
*/
|
||||
@Schema(title = "是否开启计提税金")
|
||||
private Boolean enableAccrualTax;
|
||||
|
||||
/**
|
||||
* 计提税金比例
|
||||
*/
|
||||
@Schema(title = "计提税金比例")
|
||||
private BigDecimal accrualTaxRatio;
|
||||
|
||||
/**
|
||||
* 是否开启公司返点
|
||||
*/
|
||||
@Schema(title = "是否开启公司返点")
|
||||
private Boolean enableCompanyRebate;
|
||||
|
||||
/**
|
||||
* 公司返点比例
|
||||
*/
|
||||
@Schema(title = "公司返点比例")
|
||||
private BigDecimal companyRebateRatio;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1,10 +1,13 @@
|
||||
package com.xunhong.erp.turbo.api.biz.dto.cmd;
|
||||
|
||||
import com.xunhong.erp.turbo.api.biz.dto.enums.RebateCalcMethodEnum;
|
||||
import com.xunhong.erp.turbo.base.dto.Command;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author shenyifei
|
||||
*/
|
||||
@ -43,5 +46,23 @@ public class DealerRebateCustomerCreateCmd extends Command {
|
||||
@Schema(title = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 返点计算方式:1_按净重计算;2_固定金额;3_不固定
|
||||
*/
|
||||
@Schema(title = "返点计算方式:1_按净重计算;2_固定金额;3_不固定")
|
||||
private RebateCalcMethodEnum calcMethod;
|
||||
|
||||
/**
|
||||
* 返点单价
|
||||
*/
|
||||
@Schema(title = "返点单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
/**
|
||||
* 返点金额
|
||||
*/
|
||||
@Schema(title = "返点金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,21 @@
|
||||
package com.xunhong.erp.turbo.api.biz.dto.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@Getter
|
||||
@RequiredArgsConstructor
|
||||
public enum RebateCalcMethodEnum {
|
||||
/**
|
||||
* 返点计算方式:1_按净重计算;2_固定金额;3_不固定
|
||||
*/
|
||||
NET_WEIGHT(1, "按净重计算"),
|
||||
FIXED_AMOUNT(2, "固定金额"),
|
||||
NOT_FIXED(3, "不固定");
|
||||
|
||||
@EnumValue
|
||||
private final int type;
|
||||
|
||||
private final String message;
|
||||
}
|
||||
@ -1,5 +1,6 @@
|
||||
package com.xunhong.erp.turbo.api.biz.dto.qry;
|
||||
|
||||
import com.xunhong.erp.turbo.api.biz.dto.enums.RebateCalcMethodEnum;
|
||||
import com.xunhong.erp.turbo.base.dto.Query;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@ -18,5 +19,11 @@ public class DealerRebateCustomerListQry extends Query {
|
||||
|
||||
@Schema(title = "客户名称", type = "string")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 返点计算方式
|
||||
*/
|
||||
@Schema(title = "返点计算方式")
|
||||
private RebateCalcMethodEnum calcMethod;
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.xunhong.erp.turbo.api.biz.dto.qry;
|
||||
|
||||
import com.xunhong.erp.turbo.api.biz.dto.enums.RebateCalcMethodEnum;
|
||||
import com.xunhong.erp.turbo.base.dto.PageQuery;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@ -18,5 +19,11 @@ public class DealerRebateCustomerPageQry extends PageQuery {
|
||||
|
||||
@Schema(title = "客户名称", type = "string")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 返点计算方式
|
||||
*/
|
||||
@Schema(title = "返点计算方式")
|
||||
private RebateCalcMethodEnum calcMethod;
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,28 @@
|
||||
package com.xunhong.erp.turbo.api.biz.dto.qry;
|
||||
|
||||
import com.xunhong.erp.turbo.base.dto.PageQuery;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @author shenyifei
|
||||
*/
|
||||
@Data
|
||||
@Schema(title = "供应商检测")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class SupplierCheckQry extends PageQuery {
|
||||
|
||||
@Schema(title = "供应商ID", type = "string")
|
||||
private Long supplierId;
|
||||
|
||||
@Schema(title = "供应商名称", type = "string")
|
||||
private String name;
|
||||
|
||||
@Schema(title = "身份证号", type = "string")
|
||||
private String idCard;
|
||||
|
||||
@Schema(title = "手机号", type = "string")
|
||||
private String phone;
|
||||
}
|
||||
|
||||
@ -1,10 +1,12 @@
|
||||
package com.xunhong.erp.turbo.api.biz.dto.vo;
|
||||
|
||||
import com.alibaba.cola.dto.DTO;
|
||||
import com.xunhong.erp.turbo.api.biz.dto.enums.RebateCalcMethodEnum;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
@ -57,5 +59,23 @@ public class DealerRebateCustomerVO extends DTO {
|
||||
@Schema(title = "经销商信息")
|
||||
private DealerVO dealerVO;
|
||||
|
||||
/**
|
||||
* 返点计算方式:1_按净重计算;2_固定金额;3_不固定
|
||||
*/
|
||||
@Schema(title = "返点计算方式:1_按净重计算;2_固定金额;3_不固定")
|
||||
private RebateCalcMethodEnum calcMethod;
|
||||
|
||||
/**
|
||||
* 返点单价
|
||||
*/
|
||||
@Schema(title = "返点单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
/**
|
||||
* 返点金额
|
||||
*/
|
||||
@Schema(title = "返点金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -113,5 +113,29 @@ public class DealerVO extends DTO {
|
||||
*/
|
||||
@Schema(title = "经销商账户列表")
|
||||
private List<DealerPaymentAccountVO> dealerPaymentAccountVOList;
|
||||
|
||||
/**
|
||||
* 是否开启计提税金
|
||||
*/
|
||||
@Schema(title = "是否开启计提税金")
|
||||
private Boolean enableAccrualTax;
|
||||
|
||||
/**
|
||||
* 计提税金比例
|
||||
*/
|
||||
@Schema(title = "计提税金比例")
|
||||
private BigDecimal accrualTaxRatio;
|
||||
|
||||
/**
|
||||
* 是否开启公司返点
|
||||
*/
|
||||
@Schema(title = "是否开启公司返点")
|
||||
private Boolean enableCompanyRebate;
|
||||
|
||||
/**
|
||||
* 公司返点比例
|
||||
*/
|
||||
@Schema(title = "公司返点比例")
|
||||
private BigDecimal companyRebateRatio;
|
||||
}
|
||||
|
||||
|
||||
@ -12,4 +12,7 @@ public class VehicleExtractionCmd extends Command {
|
||||
|
||||
@Schema(title = "消息内容", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String message;
|
||||
|
||||
@Schema(title = "经销商信息", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String dealerNames;
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.xunhong.erp.turbo.api.facade.dto.vo;
|
||||
|
||||
import com.xunhong.erp.turbo.api.biz.dto.vo.DealerVO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@ -25,4 +26,13 @@ public class VehicleExtractionVO {
|
||||
|
||||
@Schema(title = "价格")
|
||||
private BigDecimal price;
|
||||
|
||||
@Schema(title = "经销商")
|
||||
private String dealerName;
|
||||
|
||||
@Schema(title = "经销商ID", requiredMode = Schema.RequiredMode.REQUIRED, type = "string")
|
||||
private Long dealerId;
|
||||
|
||||
@Schema(title = "经销商信息")
|
||||
private DealerVO dealerVO;
|
||||
}
|
||||
|
||||
@ -0,0 +1,16 @@
|
||||
package com.xunhong.erp.turbo;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* @author hollis
|
||||
*/
|
||||
@SpringBootApplication(scanBasePackages = {"com.xunhong.erp.turbo", "com.alibaba.cola"})
|
||||
public class ErpTurboSvcApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(ErpTurboSvcApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
34
erp-turbo-svc/src/main/resources/application.yml
Normal file
34
erp-turbo-svc/src/main/resources/application.yml
Normal file
@ -0,0 +1,34 @@
|
||||
spring:
|
||||
profiles:
|
||||
active: dev
|
||||
application:
|
||||
name: @application.name@
|
||||
config:
|
||||
import: classpath:cache.yml,classpath:datasource.yml,classpath:sa-token.yml,classpath:openapi.yml
|
||||
|
||||
oss:
|
||||
enabled: true
|
||||
roleArn: acs:ram::1405760424165296:role/ramoss
|
||||
domain: https://img.qilincloud168.com/
|
||||
region: cn-beijing
|
||||
ossEndpoint: https://oss-cn-beijing.aliyuncs.com
|
||||
stsEndpoint: sts.cn-beijing.aliyuncs.com
|
||||
access-secret: nQjR51pOeVggk1AgSyroj2svegAH2q
|
||||
access-key: LTAI5tRk9oGxq7KYb5VtJbUm
|
||||
bucket: qilincloud168
|
||||
policy: '{"Version": "1","Statement": [{"Effect": "Allow","Action": ["oss:PutObject"],"Resource": ["acs:oss:*:*:qilincloud168/*"],"Condition": {}}]}'
|
||||
|
||||
iot:
|
||||
huaweicloud:
|
||||
enabled: true
|
||||
ak: HPUA0UCCTWRVXLQSHYWV
|
||||
sk: BkwHnQMONChjcQVWT8uLrSpOEMxPRcaMR8sEhtXl
|
||||
region-id: cn-north-4
|
||||
project-id: 0a5e9001800025732fd4c01f007f4a89
|
||||
endpoint: a15f98504b.iotda.cn-north-4.myhuaweicloud.com
|
||||
|
||||
server:
|
||||
port: 38080
|
||||
|
||||
dubbo:
|
||||
enabled: false
|
||||
7
erp-turbo-svc/src/main/resources/bootstrap.yml
Normal file
7
erp-turbo-svc/src/main/resources/bootstrap.yml
Normal file
@ -0,0 +1,7 @@
|
||||
spring:
|
||||
profiles:
|
||||
active: dev
|
||||
application:
|
||||
name: @application.name@
|
||||
config:
|
||||
import: classpath:base.yml,classpath:logging.yml
|
||||
BIN
output.pdf
BIN
output.pdf
Binary file not shown.
7
pom.xml
7
pom.xml
@ -78,13 +78,6 @@
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.itextpdf</groupId>
|
||||
<artifactId>itext7-core</artifactId>
|
||||
<version>8.0.3</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user