新购优化

This commit is contained in:
mashuai 2025-06-30 10:09:40 +08:00
parent a6639b8210
commit 8b614fd7dd
3 changed files with 10 additions and 4 deletions

View File

@ -231,4 +231,7 @@ public class Type extends BaseEntity {
@ApiModelProperty(value = "协议id") @ApiModelProperty(value = "协议id")
private Long agreementId; private Long agreementId;
@ApiModelProperty(value = "不含税单价")
private BigDecimal notTaxPrice;
} }

View File

@ -467,14 +467,16 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
bmFileInfoMapper.insertBmFileInfos(bmFileInfos); bmFileInfoMapper.insertBmFileInfos(bmFileInfos);
} }
Type type = new Type(); Type type = new Type();
type.setTypeId(details.getTypeId());
type.setUpdateTime(DateUtils.getNowDate());
type.setUpdateBy(SecurityUtils.getLoginUser().getUserid().toString());
type.setBuyPrice(details.getPurchaseTaxPrice());
type.setNotTaxPrice(details.getPurchasePrice());
Type maType = typeMapper.getMaType(details.getTypeId()); Type maType = typeMapper.getMaType(details.getTypeId());
if (maType != null && (maType.getRentPrice() == null || maType.getRentPrice().compareTo(BigDecimal.ZERO) == 0)) { if (maType != null && (maType.getRentPrice() == null || maType.getRentPrice().compareTo(BigDecimal.ZERO) == 0)) {
type.setTypeId(details.getTypeId());
type.setRentPrice(details.getRentPrice()); type.setRentPrice(details.getRentPrice());
type.setUpdateTime(DateUtils.getNowDate());
type.setUpdateBy(SecurityUtils.getLoginUser().getUserid().toString());
typeMapper.updateType(type);
} }
typeMapper.updateType(type);
} }
// 批量插入详情数据 // 批量插入详情数据
final int count = purchaseCheckDetailsMapper.insertPurchaseCheckDetailsList(purchaseCheckDetailsList); final int count = purchaseCheckDetailsMapper.insertPurchaseCheckDetailsList(purchaseCheckDetailsList);

View File

@ -325,6 +325,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="intelligentCode != null">intelligent_code = #{intelligentCode},</if> <if test="intelligentCode != null">intelligent_code = #{intelligentCode},</if>
<if test="isTest != null">is_test = #{isTest},</if> <if test="isTest != null">is_test = #{isTest},</if>
<if test="samplingRatio != null">sampling_ratio = #{samplingRatio},</if> <if test="samplingRatio != null">sampling_ratio = #{samplingRatio},</if>
<if test="notTaxPrice != null">notax_price = #{notTaxPrice},</if>
</trim> </trim>
where type_id = #{typeId} where type_id = #{typeId}
</update> </update>