feat(approve): 添加产品编码和型号筛选功能并优化订单金额显示

- 在审批订单页面添加产品编码和产品型号搜索条件
- 实现订单金额的货币格式化显示功能
- 添加格式化工具函数用于金额显示
- 修改订单总金额计算逻辑以支持不同订单状态
- 调整表格列布局以适应不同的订单状态显示需求
- 在采购审批相关页面添加产品筛选条件
- 更新后端实体类以支持产品编码和型号字段
- 优化库存发货服务中的代码格式和业务逻辑
- 添加年份计算的乘法逻辑用于服务期限计算
dev_1.0.0
chenhao 2026-01-26 17:48:19 +08:00
parent baa4b52553
commit b96d006f9c
11 changed files with 137 additions and 16 deletions

View File

@ -14,7 +14,10 @@ export function formatDate(cellValue) {
var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds() var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds
} }
export function formatCurrency(value) {
if (value == null) return '0.00';
return Number(value).toLocaleString('en-US', {minimumFractionDigits: 2, maximumFractionDigits: 2});
}
/** /**
* @param {number} time * @param {number} time
* @param {string} option * @param {string} option

View File

@ -49,6 +49,22 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="产品编码" prop="productCode">
<el-input
v-model="queryParams.productCode"
placeholder="请输入产品编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="产品型号" prop="productModel">
<el-input
v-model="queryParams.productModel"
placeholder="请输入产品型号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -72,7 +88,11 @@
<el-table-column label="项目名称" align="center" prop="projectName" /> <el-table-column label="项目名称" align="center" prop="projectName" />
<el-table-column label="项目编号" align="center" prop="projectCode" /> <el-table-column label="项目编号" align="center" prop="projectCode" />
<el-table-column label="客户名称" align="center" prop="customerName" /> <el-table-column label="客户名称" align="center" prop="customerName" />
<el-table-column label="订单金额" align="center" prop="actualPurchaseAmount" /> <el-table-column label="订单金额" align="center" prop="actualPurchaseAmount" >
<template slot-scope="scope">
<span>{{ formatCurrency(scope.row.actualPurchaseAmount || scope.row.shipmentAmount) }}</span>
</template>
</el-table-column>
<el-table-column label="汇智负责人" align="center" prop="dutyName" /> <el-table-column label="汇智负责人" align="center" prop="dutyName" />
<el-table-column label="审批节点" align="center" prop="approveNode"> <el-table-column label="审批节点" align="center" prop="approveNode">
<template slot-scope="scope"> <template slot-scope="scope">
@ -127,6 +147,7 @@
<script> <script>
import { listOrder } from "@/api/approve/order/orderLog"; import { listOrder } from "@/api/approve/order/orderLog";
import ApproveDialog from '../order/Approve.vue'; import ApproveDialog from '../order/Approve.vue';
import {formatCurrency} from "../../../utils";
export default { export default {
name: "ApprovedOrder", name: "ApprovedOrder",
@ -153,6 +174,8 @@ export default {
orderCode: null, orderCode: null,
projectName: null, projectName: null,
projectCode: null, projectCode: null,
productCode: null,
productModel: null,
customerName: null, customerName: null,
dutyName: null, dutyName: null,
approveNode: null, approveNode: null,
@ -165,6 +188,7 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
formatCurrency,
/** 查询订单列表 */ /** 查询订单列表 */
getList() { getList() {
this.loading = true; this.loading = true;

View File

@ -178,7 +178,7 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row type="flex" justify="end" align="middle" class="summary-row"> <el-row type="flex" justify="end" align="middle" class="summary-row">
<el-col :span="18" style="text-align: center;"> <el-col :span="orderData.orderStatus==='1'?18:24" style="text-align: center;">
<span style="margin-right: 5px;">商业折扣</span> <span style="margin-right: 5px;">商业折扣</span>
<el-select <el-select
v-model="selectedDiscount" v-model="selectedDiscount"
@ -278,7 +278,12 @@ export default {
return this.calculateTotal(this.order.maintenanceProjectProductInfoList, this.selectedDiscount); return this.calculateTotal(this.order.maintenanceProjectProductInfoList, this.selectedDiscount);
}, },
grandTotal() { grandTotal() {
if (this.orderData.orderStatus === '1'){
return this.softwareTotal + this.hardwareTotal + this.maintenanceTotal; return this.softwareTotal + this.hardwareTotal + this.maintenanceTotal;
}else{
return this.finalTotal;
}
}, },
finalTotal() { finalTotal() {
return this.softwareDiscountedTotal + this.hardwareDiscountedTotal + this.maintenanceDiscountedTotal; return this.softwareDiscountedTotal + this.hardwareDiscountedTotal + this.maintenanceDiscountedTotal;

View File

@ -49,6 +49,22 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="产品编码" prop="productCode">
<el-input
v-model="queryParams.productCode"
placeholder="请输入产品编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="产品型号" prop="productModel">
<el-input
v-model="queryParams.productModel"
placeholder="请输入产品型号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -72,7 +88,12 @@
<el-table-column label="项目名称" align="center" prop="projectName" /> <el-table-column label="项目名称" align="center" prop="projectName" />
<el-table-column label="项目编号" align="center" prop="projectCode" /> <el-table-column label="项目编号" align="center" prop="projectCode" />
<el-table-column label="客户名称" align="center" prop="customerName" /> <el-table-column label="客户名称" align="center" prop="customerName" />
<el-table-column label="订单金额" align="center" prop="actualPurchaseAmount" />
<el-table-column label="订单金额" align="center" prop="actualPurchaseAmount" >
<template slot-scope="scope">
<span>{{ formatCurrency(scope.row.actualPurchaseAmount || scope.row.shipmentAmount) }}</span>
</template>
</el-table-column>
<el-table-column label="汇智负责人" align="center" prop="dutyName" /> <el-table-column label="汇智负责人" align="center" prop="dutyName" />
<el-table-column label="审批节点" align="center" prop="approveNode"> <el-table-column label="审批节点" align="center" prop="approveNode">
<template slot-scope="scope"> <template slot-scope="scope">
@ -128,6 +149,7 @@
<script> <script>
import { listOrder } from "@/api/approve/order"; import { listOrder } from "@/api/approve/order";
import ApproveDialog from './Approve.vue'; import ApproveDialog from './Approve.vue';
import {formatCurrency} from "../../../utils";
export default { export default {
name: "Order", name: "Order",
@ -154,6 +176,8 @@ export default {
orderCode: null, orderCode: null,
projectName: null, projectName: null,
projectCode: null, projectCode: null,
productCode: null,
productModel: null,
customerName: null, customerName: null,
dutyName: null, dutyName: null,
approveNode: null, approveNode: null,
@ -164,6 +188,7 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
formatCurrency,
toApproved(){ toApproved(){
this.$router.push({ this.$router.push({
path: '/approve/orderLog', path: '/approve/orderLog',

View File

@ -23,7 +23,22 @@
end-placeholder="结束日期" end-placeholder="结束日期"
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="产品编码" prop="productCode">
<el-input
v-model="queryParams.productCode"
placeholder="请输入产品编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="产品型号" prop="productModel">
<el-input
v-model="queryParams.productModel"
placeholder="请输入产品型号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -142,6 +157,8 @@ export default {
buyerName: null, buyerName: null,
vendorName: null, vendorName: null,
ownerName: null, ownerName: null,
productCode: null,
productModel: null,
approveStatus: '1', approveStatus: '1',
params:{ params:{
applyTimeStart: null, applyTimeStart: null,

View File

@ -23,7 +23,22 @@
end-placeholder="结束日期" end-placeholder="结束日期"
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="产品编码" prop="productCode">
<el-input
v-model="queryParams.productCode"
placeholder="请输入产品编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="产品型号" prop="productModel">
<el-input
v-model="queryParams.productModel"
placeholder="请输入产品型号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -134,6 +149,8 @@ export default {
purchaseNo: null, purchaseNo: null,
buyerName: null, buyerName: null,
vendorName: null, vendorName: null,
productCode: null,
productModel: null,
ownerName: null, ownerName: null,
approveStatus: '3', // 3 approveStatus: '3', // 3
params:{ params:{

View File

@ -127,6 +127,8 @@ public class OmsPurchaseOrder extends BaseEntity
private String processKey; private String processKey;
private String todoId; private String todoId;
private String taskId; private String taskId;
private String productCode;
private String productModel;
private Integer fileId; private Integer fileId;
private OmsFileLog fileLog; private OmsFileLog fileLog;

View File

@ -138,6 +138,8 @@ public class ProjectOrderInfo extends BaseEntity {
private String partnerName; private String partnerName;
private String partnerAddress; private String partnerAddress;
private String projectPartnerName; private String projectPartnerName;
private String productModel;
private String productCode;
private List<String> productCodeList; private List<String> productCodeList;
/** /**

View File

@ -114,7 +114,7 @@ public class InventoryDeliveryServiceImpl implements IInventoryDeliveryService {
//修改数据的时候同步修改出库价 //修改数据的时候同步修改出库价
BigDecimal bigDecimal = inventoryOuterMapper.selectOutPriceByCode(inventoryDelivery.getOuterCode()); BigDecimal bigDecimal = inventoryOuterMapper.selectOutPriceByCode(inventoryDelivery.getOuterCode());
List<OmsInventoryDeliveryDetail> detailList=new ArrayList<>(); List<OmsInventoryDeliveryDetail> detailList = new ArrayList<>();
if (CollUtil.isEmpty(productSnDataList)) { if (CollUtil.isEmpty(productSnDataList)) {
List<InventoryInfo> inventoryInfoList = productSnList.stream().map(item -> { List<InventoryInfo> inventoryInfoList = productSnList.stream().map(item -> {
InventoryInfo info = new InventoryInfo(); InventoryInfo info = new InventoryInfo();
@ -131,7 +131,7 @@ public class InventoryDeliveryServiceImpl implements IInventoryDeliveryService {
return info; return info;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
inventoryInfoService.saveBatch(inventoryInfoList); inventoryInfoService.saveBatch(inventoryInfoList);
}else{ } else {
for (InventoryInfo inventoryInfo : productSnDataList) { for (InventoryInfo inventoryInfo : productSnDataList) {
inventoryInfo.setInventoryStatus(InventoryInfo.InventoryStatusEnum.OUTER.getCode()); inventoryInfo.setInventoryStatus(InventoryInfo.InventoryStatusEnum.OUTER.getCode());
inventoryInfo.setOuterCode(inventoryDelivery.getOuterCode()); inventoryInfo.setOuterCode(inventoryDelivery.getOuterCode());
@ -142,7 +142,7 @@ public class InventoryDeliveryServiceImpl implements IInventoryDeliveryService {
detail.setProductSn(inventoryInfo.getProductSn()); detail.setProductSn(inventoryInfo.getProductSn());
detailList.add(detail); detailList.add(detail);
} }
omsInventoryInnerService.importByOuter(productSnDataList,inventoryDelivery.getProductCode(),inventoryDelivery.getPurchaseNo(),inventoryDelivery.getItemId()); omsInventoryInnerService.importByOuter(productSnDataList, inventoryDelivery.getProductCode(), inventoryDelivery.getPurchaseNo(), inventoryDelivery.getItemId());
} }
InventoryOuterDetail inventoryOuterDetail = new InventoryOuterDetail(); InventoryOuterDetail inventoryOuterDetail = new InventoryOuterDetail();
inventoryOuterDetail.setId(inventoryDelivery.getDetailId()); inventoryOuterDetail.setId(inventoryDelivery.getDetailId());
@ -151,7 +151,7 @@ public class InventoryDeliveryServiceImpl implements IInventoryDeliveryService {
//todo 限制只能发一次货 防止重复发货 //todo 限制只能发一次货 防止重复发货
int i = inventoryDeliveryMapper.insertInventoryDelivery(inventoryDelivery); int i = inventoryDeliveryMapper.insertInventoryDelivery(inventoryDelivery);
if (CollUtil.isNotEmpty(detailList)){ if (CollUtil.isNotEmpty(detailList)) {
for (OmsInventoryDeliveryDetail detail : detailList) { for (OmsInventoryDeliveryDetail detail : detailList) {
detail.setDeliveryId(inventoryDelivery.getId()); detail.setDeliveryId(inventoryDelivery.getId());
} }
@ -231,7 +231,7 @@ public class InventoryDeliveryServiceImpl implements IInventoryDeliveryService {
updateOrder.setDeliveryStatus(sum == allSum ? ProjectOrderInfo.DeliveryStatusEnum.ALL_DELIVERY.getCode() : ProjectOrderInfo.DeliveryStatusEnum.PART_DELIVERY.getCode()); updateOrder.setDeliveryStatus(sum == allSum ? ProjectOrderInfo.DeliveryStatusEnum.ALL_DELIVERY.getCode() : ProjectOrderInfo.DeliveryStatusEnum.PART_DELIVERY.getCode());
projectOrderInfoService.updateProjectOrderInfoByCode(updateOrder); projectOrderInfoService.updateProjectOrderInfoByCode(updateOrder);
//新增计收数据 //新增计收数据
if (sum==allSum){ if (sum == allSum) {
//新增计收数据 //新增计收数据
OmsFinanceCharge omsFinanceCharge = new OmsFinanceCharge(); OmsFinanceCharge omsFinanceCharge = new OmsFinanceCharge();
omsFinanceCharge.setOrderCode(inventoryDelivery.getOrderCode()); omsFinanceCharge.setOrderCode(inventoryDelivery.getOrderCode());
@ -298,7 +298,7 @@ public class InventoryDeliveryServiceImpl implements IInventoryDeliveryService {
InventoryDelivery inventoryDelivery1 = selectInventoryDeliveryById(inventoryDelivery.getId()); InventoryDelivery inventoryDelivery1 = selectInventoryDeliveryById(inventoryDelivery.getId());
BigDecimal allPrice = price.multiply(new BigDecimal(inventoryDelivery1.getQuantity().toString())); BigDecimal allPrice = price.multiply(new BigDecimal(inventoryDelivery1.getQuantity().toString()));
receivableBill.setTotalPriceWithTax(allPrice); receivableBill.setTotalPriceWithTax(allPrice);
BigDecimal defaultTaxRate = projectProductInfo.getTaxRate()==null?new BigDecimal(defaultTax):projectProductInfo.getTaxRate().divide(new BigDecimal("100")); BigDecimal defaultTaxRate = projectProductInfo.getTaxRate() == null ? new BigDecimal(defaultTax) : projectProductInfo.getTaxRate().divide(new BigDecimal("100"));
BigDecimal allPriceWithOutTax = allPrice.divide(BigDecimal.ONE.add(defaultTaxRate), 2, RoundingMode.HALF_UP); BigDecimal allPriceWithOutTax = allPrice.divide(BigDecimal.ONE.add(defaultTaxRate), 2, RoundingMode.HALF_UP);
receivableBill.setTaxRate(defaultTaxRate); receivableBill.setTaxRate(defaultTaxRate);
receivableBill.setTotalPriceWithoutTax(allPriceWithOutTax); receivableBill.setTotalPriceWithoutTax(allPriceWithOutTax);
@ -330,7 +330,7 @@ public class InventoryDeliveryServiceImpl implements IInventoryDeliveryService {
public List<DeliveryInfoVo> getNumberInfo(ApiDataQueryDto dto) { public List<DeliveryInfoVo> getNumberInfo(ApiDataQueryDto dto) {
List<DeliveryInfoVo> resultList = inventoryDeliveryMapper.listSn(dto); List<DeliveryInfoVo> resultList = inventoryDeliveryMapper.listSn(dto);
List<String> orderCodeList = resultList.stream().map(DeliveryInfoVo::getOrderCode).collect(Collectors.toList()); List<String> orderCodeList = resultList.stream().map(DeliveryInfoVo::getOrderCode).collect(Collectors.toList());
if (CollUtil.isEmpty(orderCodeList)){ if (CollUtil.isEmpty(orderCodeList)) {
return Collections.emptyList(); return Collections.emptyList();
} }
// 根据订单ID查询合同信息 // 根据订单ID查询合同信息
@ -358,7 +358,6 @@ public class InventoryDeliveryServiceImpl implements IInventoryDeliveryService {
//todo 判断应付或应收状态 不允许退 //todo 判断应付或应收状态 不允许退
InventoryDelivery inventoryDelivery = inventoryDeliveryMapper.selectInventoryDeliveryById(id); InventoryDelivery inventoryDelivery = inventoryDeliveryMapper.selectInventoryDeliveryById(id);
deleteInventoryOuterById(id); deleteInventoryOuterById(id);
List<ProjectProductInfo> projectProductInfos = projectProductInfoService.listDeliveryProductByOrderCode(Collections.singletonList(inventoryDelivery.getOrderCode())); List<ProjectProductInfo> projectProductInfos = projectProductInfoService.listDeliveryProductByOrderCode(Collections.singletonList(inventoryDelivery.getOrderCode()));
@ -400,14 +399,14 @@ public class InventoryDeliveryServiceImpl implements IInventoryDeliveryService {
InventoryDelivery dbData = inventoryDeliveryMapper.selectInventoryDeliveryById(inventoryDelivery.getId()); InventoryDelivery dbData = inventoryDeliveryMapper.selectInventoryDeliveryById(inventoryDelivery.getId());
List<OmsInventoryDeliveryDetail> omsInventoryDeliveryDetails = deliveryDetailService.selectOmsInventoryDeliveryDetailByDeliveryId(dbData.getId()); List<OmsInventoryDeliveryDetail> omsInventoryDeliveryDetails = deliveryDetailService.selectOmsInventoryDeliveryDetailByDeliveryId(dbData.getId());
InventoryInfo queryParams = new InventoryInfo(); InventoryInfo queryParams = new InventoryInfo();
if (CollUtil.isNotEmpty(omsInventoryDeliveryDetails)){ if (CollUtil.isNotEmpty(omsInventoryDeliveryDetails)) {
queryParams.setProductSnList(omsInventoryDeliveryDetails.stream() queryParams.setProductSnList(omsInventoryDeliveryDetails.stream()
.map(OmsInventoryDeliveryDetail::getProductSn).collect(Collectors.toList())); .map(OmsInventoryDeliveryDetail::getProductSn).collect(Collectors.toList()));
} }
queryParams.setOuterCode(dbData.getOuterCode()); queryParams.setOuterCode(dbData.getOuterCode());
queryParams.setWarehouseId(dbData.getWarehouseId()); queryParams.setWarehouseId(dbData.getWarehouseId());
List<InventoryInfo> inventoryInfos = inventoryInfoService.selectInventoryInfoList(queryParams); List<InventoryInfo> inventoryInfos = inventoryInfoService.selectInventoryInfoList(queryParams);
return inventoryInfos.stream().map(item->{ return inventoryInfos.stream().map(item -> {
InventoryDeliveryDetailExcelDto detailExcelDto = new InventoryDeliveryDetailExcelDto(); InventoryDeliveryDetailExcelDto detailExcelDto = new InventoryDeliveryDetailExcelDto();
detailExcelDto.setProductSn(item.getProductSn()); detailExcelDto.setProductSn(item.getProductSn());
detailExcelDto.setProductCode(item.getProductCode()); detailExcelDto.setProductCode(item.getProductCode());
@ -468,6 +467,7 @@ public class InventoryDeliveryServiceImpl implements IInventoryDeliveryService {
private Date updateStartTimeAndAddList(DeliveryInfoVo deliveryInfoVo, ProjectProductInfo productInfo, Date startTime, List<DeliveryInfoVo.ServiceInfo> serviceInfoList) { private Date updateStartTimeAndAddList(DeliveryInfoVo deliveryInfoVo, ProjectProductInfo productInfo, Date startTime, List<DeliveryInfoVo.ServiceInfo> serviceInfoList) {
int year = productInfo.getValue() == null ? 0 : Integer.parseInt(productInfo.getValue()); int year = productInfo.getValue() == null ? 0 : Integer.parseInt(productInfo.getValue());
year = Math.toIntExact(year * (productInfo.getQuantity() == null ? 1 : productInfo.getQuantity()));
DeliveryInfoVo.ServiceInfo serviceInfo = deliveryInfoVo.new ServiceInfo(); DeliveryInfoVo.ServiceInfo serviceInfo = deliveryInfoVo.new ServiceInfo();
serviceInfo.setServiceLevel(productInfo.getProductBomCode()); serviceInfo.setServiceLevel(productInfo.getProductBomCode());
serviceInfo.setServiceDescribe(productInfo.getProductDesc()); serviceInfo.setServiceDescribe(productInfo.getProductDesc());

View File

@ -158,6 +158,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="entity.purchaseNo != null and entity.purchaseNo != ''"> and t1.purchase_no = #{entity.purchaseNo}</if> <if test="entity.purchaseNo != null and entity.purchaseNo != ''"> and t1.purchase_no = #{entity.purchaseNo}</if>
<if test="entity.vendorName != null "> and t2.vendor_name = #{entity.vendorName}</if> <if test="entity.vendorName != null "> and t2.vendor_name = #{entity.vendorName}</if>
<if test="entity.ownerName != null "> and t1.owner_name = #{entity.ownerName}</if> <if test="entity.ownerName != null "> and t1.owner_name = #{entity.ownerName}</if>
<if test="entity.productCode != null and entity.productCode != ''">
and t1.id in (select distinct purchase_id from oms_purchase_order_item where product_code like concat(#{entity.productCode },'%'))
</if>
<if test="entity.productModel != null and entity.productModel != '' ">
and t1.id in (select distinct purchase_id from oms_purchase_order_item t1 left join product_info t2 on t1.product_code=t2.product_code where t2.model like concat(#{entity.productModel },'%'))
</if>
<!-- <if test="entity.approveUser != null "> and t3.approve_user = #{entity.approveUser}</if>--> <!-- <if test="entity.approveUser != null "> and t3.approve_user = #{entity.approveUser}</if>-->
<if test="entity.params.applyTimeStart != null and entity.params.applyTimeEnd != ''"> <if test="entity.params.applyTimeStart != null and entity.params.applyTimeEnd != ''">
<choose> <choose>

View File

@ -266,6 +266,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach> </foreach>
) )
</if> </if>
<if test="productCode!=null and productCode!=''">
and t1.project_id in (select distinct t2.project_id from project_product_info t2 where t2.product_bom_code
like concat('%',#{productCode},'%')
)
</if>
<if test="productModel!=null and productModel!=''">
and t1.project_id in (select distinct t2.project_id from project_product_info t2 where t2.model like
concat('%',#{productModel},'%'))
</if>
${params.authSql} ${params.authSql}
${params.dataScope} ${params.dataScope}
</select> </select>
@ -518,6 +528,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach> </foreach>
) )
</if> </if>
<if test="productCode!=null and productCode!=''">
and t1.project_id in (select distinct t2.project_id from project_product_info t2 where t2.product_bom_code
like concat('%',#{productCode},'%')
)
</if>
<if test="productModel!=null and productModel!=''">
and t1.project_id in (select distinct t2.project_id from project_product_info t2 where t2.model like
concat('%',#{productModel},'%'))
</if>
${params.authSql} ${params.authSql}
${params.dataScope} ${params.dataScope}
</select> </select>