1、资金管理部分接口查询中组织被删除无法显示组织名称修复;2、组织明细补充充值赠送金;3、延期记录分页参数修改为组织名称;4、带首次购买记录的组织在软件购买时续订,定价原则的原价由单价计算;

This commit is contained in:
gaoqr
2025-09-26 14:44:34 +08:00
parent 7a153f721c
commit 628087d26c
9 changed files with 34 additions and 6 deletions
@@ -41,6 +41,10 @@ public class BalanceDetailsRespVO {
@ExcelProperty("充值金额") @ExcelProperty("充值金额")
private BigDecimal rechargeAmount; private BigDecimal rechargeAmount;
@Schema(description = "充值赠送金金额")
@ExcelProperty("充值赠送金金额")
private BigDecimal rechargeGiftAmount;
@Schema(description = "产品金额") @Schema(description = "产品金额")
@ExcelProperty("产品金额") @ExcelProperty("产品金额")
private BigDecimal productPrice; private BigDecimal productPrice;
@@ -19,7 +19,7 @@ import java.time.LocalDate;
@ToString(callSuper = true) @ToString(callSuper = true)
public class ProductDelayPageReqVO extends PageParam { public class ProductDelayPageReqVO extends PageParam {
@Schema(description = "组织编号") @Schema(description = "组织编号")
private Long organId; private Long organName;
@Schema(description = "产品名称") @Schema(description = "产品名称")
@Size(max = 64, message = "产品名称长度不能超过64个字符") @Size(max = 64, message = "产品名称长度不能超过64个字符")
@@ -22,7 +22,7 @@ public interface ProductDelayRecordMapper extends BaseMapperX<ProductDelayRecord
*/ */
default PageResult<ProductDelayRecordDO> selectPage(ProductDelayPageReqVO pageReqVO) { default PageResult<ProductDelayRecordDO> selectPage(ProductDelayPageReqVO pageReqVO) {
return selectPage(pageReqVO, new LambdaQueryWrapperX<ProductDelayRecordDO>() return selectPage(pageReqVO, new LambdaQueryWrapperX<ProductDelayRecordDO>()
.eqIfPresent(ProductDelayRecordDO::getOrganId, pageReqVO.getOrganId()) .eqIfPresent(ProductDelayRecordDO::getOrganName, pageReqVO.getOrganName())
.eqIfPresent(ProductDelayRecordDO::getProductName, pageReqVO.getProductName()) .eqIfPresent(ProductDelayRecordDO::getProductName, pageReqVO.getProductName())
.eqIfPresent(ProductDelayRecordDO::getDelayDuration, pageReqVO.getDelayDuration()) .eqIfPresent(ProductDelayRecordDO::getDelayDuration, pageReqVO.getDelayDuration())
.betweenIfPresent(ProductDelayRecordDO::getCreateTime, pageReqVO.getCreateTime()) .betweenIfPresent(ProductDelayRecordDO::getCreateTime, pageReqVO.getCreateTime())
@@ -11,6 +11,7 @@ import com.cf.imes.module.system.controller.admin.organ.vo.organ.OrganPageReqVO;
import com.cf.imes.module.system.dal.dataobject.organ.OrganizationDO; import com.cf.imes.module.system.dal.dataobject.organ.OrganizationDO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;
@@ -25,6 +26,14 @@ import java.util.List;
@Mapper @Mapper
public interface OrganMapper extends BaseMapperX<OrganizationDO> { public interface OrganMapper extends BaseMapperX<OrganizationDO> {
/**
* 忽略逻辑删除查询组织
* @param id
* @return
*/
@Select("SELECT * FROM system_organization WHERE id = #{id}")
OrganizationDO selectByIdWithDeleted(@Param("id") Long id);
default PageResult<OrganizationDO> selectPage(OrganPageReqVO reqVO) { default PageResult<OrganizationDO> selectPage(OrganPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<OrganizationDO>() return selectPage(reqVO, new LambdaQueryWrapperX<OrganizationDO>()
.likeIfPresent(OrganizationDO::getContactName, reqVO.getContactName()) .likeIfPresent(OrganizationDO::getContactName, reqVO.getContactName())
@@ -63,6 +63,7 @@ public class IncomeExpenseServiceImpl implements IncomeExpenseService {
respVO.setTradeType(tradeType); respVO.setTradeType(tradeType);
if (TradeTypeEnum.RECHARGE.getCode().equals(tradeType)) { if (TradeTypeEnum.RECHARGE.getCode().equals(tradeType)) {
respVO.setRechargeAmount(i.getCashAmountChange()); respVO.setRechargeAmount(i.getCashAmountChange());
respVO.setRechargeGiftAmount(i.getGiftAmountChange());
} else if (TradeTypeEnum.PRODUCT.getCode().equals(tradeType)) { } else if (TradeTypeEnum.PRODUCT.getCode().equals(tradeType)) {
Long purchaseId = i.getPurchaseId(); Long purchaseId = i.getPurchaseId();
if (ObjectUtil.isNotNull(purchaseId)) { if (ObjectUtil.isNotNull(purchaseId)) {
@@ -79,7 +80,7 @@ public class IncomeExpenseServiceImpl implements IncomeExpenseService {
respVO.setTradeType(TradeTypeEnum.RECHARGE.getCode()); respVO.setTradeType(TradeTypeEnum.RECHARGE.getCode());
} }
// 查询操作组织名 // 查询操作组织名
OrganizationDO organ = organService.getOrgan(i.getOrganId()); OrganizationDO organ = organService.getOrganWithDeleted(i.getOrganId());
if (ObjectUtil.isNotNull(organ)) { if (ObjectUtil.isNotNull(organ)) {
respVO.setOrganName(organ.getName()); respVO.setOrganName(organ.getName());
} }
@@ -213,7 +213,7 @@ public class ManualAdjustAccountBalanceServiceImpl implements ManualAdjustAccoun
// 从收支类型转调账类型 // 从收支类型转调账类型
respVO.setAdjustType(IncomeExpenseTypeEnum.getAdjustType(detailsDO.getIncomeExpenseType())); respVO.setAdjustType(IncomeExpenseTypeEnum.getAdjustType(detailsDO.getIncomeExpenseType()));
// 查询操作组织名 // 查询操作组织名
OrganizationDO organ = organService.getOrgan(detailsDO.getOrganId()); OrganizationDO organ = organService.getOrganWithDeleted(detailsDO.getOrganId());
if (ObjectUtil.isNotNull(organ)) { if (ObjectUtil.isNotNull(organ)) {
respVO.setOrganName(organ.getName()); respVO.setOrganName(organ.getName());
} }
@@ -102,7 +102,7 @@ public class PurchaseServiceImpl implements PurchaseService {
} }
List<PurchaseRecordRespVO> respVOS = BeanUtils.toBean(resultList, PurchaseRecordRespVO.class); List<PurchaseRecordRespVO> respVOS = BeanUtils.toBean(resultList, PurchaseRecordRespVO.class);
respVOS.forEach(respVO -> { respVOS.forEach(respVO -> {
OrganizationDO organ = organService.getOrgan(respVO.getOrganId()); OrganizationDO organ = organService.getOrganWithDeleted(respVO.getOrganId());
if (ObjectUtil.isNotNull(organ)) { if (ObjectUtil.isNotNull(organ)) {
respVO.setOrganName(organ.getName()); respVO.setOrganName(organ.getName());
} }
@@ -238,7 +238,7 @@ public class PurchaseServiceImpl implements PurchaseService {
// 充值支付=支付宝/微信 // 充值支付=支付宝/微信
respVO.setRechargeSpent(detailDO.getAlipaySpent().add(detailDO.getWechatSpent())); respVO.setRechargeSpent(detailDO.getAlipaySpent().add(detailDO.getWechatSpent()));
// 查询组织名称 // 查询组织名称
OrganizationDO organ = organService.getOrgan(detailDO.getOrganId()); OrganizationDO organ = organService.getOrganWithDeleted(detailDO.getOrganId());
if (ObjectUtil.isNotNull(organ)) { if (ObjectUtil.isNotNull(organ)) {
respVO.setOrganName(organ.getName()); respVO.setOrganName(organ.getName());
} }
@@ -332,6 +332,7 @@ public class PurchaseServiceImpl implements PurchaseService {
default -> throw new ServiceException(PRODUCTS_DETAIL_DURATION_UNIT_NOT_SUPPORT); default -> throw new ServiceException(PRODUCTS_DETAIL_DURATION_UNIT_NOT_SUPPORT);
} }
newDetailDO.setCurrentPrice(totalAmount); newDetailDO.setCurrentPrice(totalAmount);
newDetailDO.setOriginalPrice(totalAmount);
resultList.add(newDetailDO); resultList.add(newDetailDO);
} }
@@ -63,6 +63,14 @@ public interface OrganService {
*/ */
OrganizationDO getOrgan(Long id); OrganizationDO getOrgan(Long id);
/**
* 获取组织,包括被逻辑删除的
*
* @param id
* @return
*/
OrganizationDO getOrganWithDeleted(Long id);
/** /**
* 获得组织分页 * 获得组织分页
* *
@@ -444,6 +444,11 @@ public class OrganServiceImpl implements OrganService {
return organMapper.selectById(id); return organMapper.selectById(id);
} }
@Override
public OrganizationDO getOrganWithDeleted(Long id) {
return organMapper.selectByIdWithDeleted(id);
}
@Override @Override
public PageResult<OrganizationDO> getOrganPage(OrganPageReqVO pageReqVO) { public PageResult<OrganizationDO> getOrganPage(OrganPageReqVO pageReqVO) {
if(CharSequenceUtil.isNotBlank(pageReqVO.getName())) { if(CharSequenceUtil.isNotBlank(pageReqVO.getName())) {