Merge remote-tracking branch 'origin/dev_1.0.2' into dev_1.0.1

# Conflicts:
#	ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/InventoryDeliveryServiceImpl.java
dev_1.0.1
wangy 2026-02-27 14:57:01 +08:00
commit ab03f70fd6
35 changed files with 331 additions and 51 deletions

View File

@ -70,6 +70,14 @@ export function recallExecution(id) {
params: { id }
})
}
export function exportExecution(data) {
return request({
url: `/inventory/execution/vue/export`,
method: 'post',
data: { data },
headers: { 'Content-Type': 'multipart/form-data' },
})
}
// 查询出库预览信息
export function getCheckOutPreview(data) {

View File

@ -84,12 +84,13 @@
<el-table-column label="报价单" align="center" prop="quotationName" />
<el-table-column label="项目编号" align="center" prop="projectCode" />
<!-- <el-table-column label="报价金额" align="center" prop="quotationAmount" />-->
<el-table-column label="报价金额(¥)" align="center" prop="discountAmount" />
<el-table-column label="报价金额(¥)" align="center" prop="discountAmount" :formatter="(row, column, cellValue)=>formatCurrency(cellValue)" />
<el-table-column label="状态" align="center" prop="quotationStatus" >
<template slot-scope="scope">
<dict-tag :options="dict.type.quotation_status" :value="scope.row.quotationStatus"/>
</template>
</el-table-column>
<el-table-column label="创建人" align="center" prop="createByName" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
@ -147,8 +148,13 @@
<!-- 添加或修改报价单对话框 -->
<el-dialog :title="title" :visible.sync="open" width="80%" append-to-body :close-on-click-modal="false" @close="cancel">
<el-steps :active="activeStep" simple finish-status="success" style="margin-bottom: 20px; cursor: pointer;">
<el-step title="报价单列表" @click.native="handleStepClick(0)"></el-step>
<el-step title="设置基本信息" @click.native="handleStepClick(1)"></el-step>
<el-step icon="el-icon-caret-left" @click.native="handleStepClick(0)">
<template #title>
<i class="el-icon-caret-left"></i>
报价单列表
</template>
</el-step>
<el-step title="设置基本信息" @click.native="handleStepClick(1)"></el-step>
<el-step title="配置信息" @click.native="handleStepClick(2)"></el-step>
</el-steps>
@ -289,6 +295,8 @@ export default {
quotationStatus: null,
createTimeStart: null,
createTimeEnd: null,
isAsc : 'desc',
orderByColumn : 'createTime',
},
//
form: {
@ -571,3 +579,24 @@ export default {
}
};
</script>
<style scoped>
/* 只有第一步显示自定义图标,覆盖完成状态的对勾 */
::v-deep .el-step:first-child .el-step__icon-inner.is-status {
display: none;
}
::v-deep .el-step:first-child .el-step__icon-inner:not(.is-status) {
display: inline-block;
}
/* 当前激活步骤标题颜色鲜明 */
::v-deep .el-step__title.is-process {
color: #1890ff;
font-weight: 700;
}
/* 当前激活步骤图标颜色鲜明 */
::v-deep .el-step__head.is-process {
color: #1890ff;
border-color: #1890ff;
}
</style>

View File

@ -76,7 +76,7 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
createBy: this.createBy,
// createBy: this.createBy,
quotationCode: null,
quotationName: null,
orderByColumn: 'createTime',
@ -87,7 +87,7 @@ export default {
watch: {
visible(val) {
if (val) {
this.queryParams.createBy = this.createBy||"-1";
// this.queryParams.createBy = this.createBy||"-1";
this.getList();
}
},

View File

@ -330,6 +330,8 @@ export default {
vendorAddress: null,
vendorUser: null,
vendorStatus: null,
isAsc : 'desc',
orderByColumn : 'createTime',
},
//
form: {

View File

@ -5,7 +5,7 @@
</div>
<div v-else class="receipt-dialog-body">
<div v-if="canUpload" class="upload-btn-container">
<el-button type="primary" icon="el-icon-upload" v-hasPermi="['finance:payment:upload']" @click="openUploadDialog">{{ titleText }}</el-button>
<el-button type="primary" icon="el-icon-upload" v-hasPermi="['finance:payment:uploadReceipt']" @click="openUploadDialog">{{ titleText }}</el-button>
</div>
<el-timeline v-if="attachments.length > 0">

View File

@ -5,7 +5,7 @@
</div>
<div v-else class="receipt-dialog-body">
<div v-if="canUpload" class="upload-btn-container">
<el-button type="primary" icon="el-icon-upload" v-hasPermi="['finance:receive:upload']" @click="openUploadDialog">{{ titleText }}</el-button>
<el-button type="primary" icon="el-icon-upload" v-hasPermi="['finance:receipt:uploadReceipt']" @click="openUploadDialog">{{ titleText }}</el-button>
</div>
<el-timeline v-if="attachments.length > 0">

View File

@ -27,6 +27,12 @@
<el-option v-for="item in dict.type.delivery_type" :key="item.value" :label="item.label" :value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="产品编码" prop="productCode">
<el-input v-model="queryParams.productCode" placeholder="请输入产品编码" clearable size="small" @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="产品型号" prop="model">
<el-input v-model="queryParams.model" placeholder="请输入产品型号" clearable size="small" @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item>
<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>
@ -169,6 +175,10 @@ export default {
orderCode: null,
projectName: null,
deliveryType: null,
productCode: undefined,
model: undefined,
isAsc : 'desc',
orderByColumn : 'createTime',
},
//
form: {},

View File

@ -55,6 +55,12 @@
/>
</el-select>
</el-form-item>
<el-form-item label="产品编码" prop="productCode">
<el-input v-model="queryParams.productCode" placeholder="请输入产品编码" clearable size="small" @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="产品型号" prop="productModel">
<el-input v-model="queryParams.productModel" placeholder="请输入产品型号" clearable size="small" @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="时间选择">
<el-select v-model="queryParams.timeType" placeholder="请选择时间类型" clearable style="width: 150px">
<el-option label="要求到货时间" value="0" />
@ -75,7 +81,13 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['project:order:export']"></el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="executionList" @sort-change="handleSortChange">
<el-table-column label="序号" type="index" width="55" align="center" />
<el-table-column label="项目编号" align="center" prop="projectCode" />
@ -206,11 +218,11 @@
</template>
<script>
import { listExecution, recallExecution, downloadSignFile } from "@/api/inventory/execution";
import { listExecution, recallExecution, downloadSignFile,exportExecution } from "@/api/inventory/execution";
import { getToken } from "@/utils/auth";
import OrderDetailDrawer from '../../project/order/OrderDetailDrawer.vue';
import ProjectDetailDrawer from '../../project/info/ProjectDetailDrawer.vue';
import Edit from './edit.vue'; // Import the Edit component
import Edit from './edit.vue';
export default {
name: "Execution",
@ -249,6 +261,8 @@ export default {
projectName: null,
outerStatus: null,
deliveryStatus: null,
productCode: null,
productModel: null,
signStatus: null,
timeType: '0', //
orderByColumn: 'approveTime',
@ -320,6 +334,24 @@ export default {
};
this.upload.open = true;
},
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有订单管理数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportExecution(queryParams);
}).then(response => {
this.exportLoading = false;
console.log("response:", response)
const fileName = response.msg;
window.location.href = process.env.VUE_APP_BASE_API + "/common/download?fileName=" + encodeURIComponent(fileName) + "&delete=" + true;
})
},
//
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;

View File

@ -19,6 +19,12 @@
<el-option v-for="dict in dict.type.outer_delivery_status" :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item label="产品编码" prop="productCode">
<el-input v-model="queryParams.productCode" placeholder="请输入产品编码" clearable size="small" @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="产品型号" prop="model">
<el-input v-model="queryParams.model" placeholder="请输入产品型号" clearable size="small" @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item>
<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>
@ -102,6 +108,10 @@ export default {
orderCode: undefined,
projectName: undefined,
deliveryStatus: undefined,
productCode: undefined,
model: undefined,
isAsc : 'desc',
orderByColumn : 'createTime',
},
};
},

View File

@ -1,4 +1,4 @@
<template>
<template xmlns="http://www.w3.org/1999/html">
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="项目编号" prop="projectCode">
@ -96,6 +96,13 @@
<el-option label="否" value="0" />
</el-select>
</el-form-item>
<el-form-item label="产品编码" prop="productCode">
<el-input v-model="queryParams.productCode" placeholder="请输入产品编码" clearable size="small" @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="产品型号" prop="productModel">
<el-input v-model="queryParams.productModel" placeholder="请输入产品型号" clearable size="small" @keyup.enter.native="handleQuery"/>
</el-form-item>
<br/>
<el-form-item label="时间选择" prop="timeType">
<el-select v-model="queryParams.timeType" placeholder="请选择时间类型" @change="handleTimeTypeChange">
<el-option label="预计下单时间" value="0" />
@ -328,6 +335,8 @@ export default {
pageSize: 10,
projectCode: null,
projectName: null,
productCode: null,
productModel: null,
customerName: null,
bgProperty: null,
industryType: null,
@ -344,6 +353,8 @@ export default {
estimatedOrderTimeEnd: null,
lastWorkUpdateTimeStart: null,
lastWorkUpdateTimeEnd: null,
isAsc : 'desc',
orderByColumn : 'createTime',
},
dateRange: [],
};

View File

@ -334,7 +334,7 @@ export default {
if (this.form.maintenanceProjectProductInfoList) {
total += this.form.maintenanceProjectProductInfoList.reduce((sum, item) => sum + (item.allPrice || 0), 0);
}
return total;
return this.$calc.toFixed(total,2);
}
},
watch: {

View File

@ -27,6 +27,12 @@
</el-form-item>
<el-form-item label="进货商" prop="partnerName">
<el-input v-model="queryParams.partnerName" placeholder="请输入进货商" clearable size="small" @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="产品编码" prop="productCode">
<el-input v-model="queryParams.productCode" placeholder="请输入产品编码" clearable size="small" @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="产品型号" prop="productModel">
<el-input v-model="queryParams.productModel" placeholder="请输入产品型号" clearable size="small" @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="时间选择">
<el-select v-model="queryParams.timeType" size="small" style="width: 140px">
@ -195,6 +201,8 @@ export default {
agentName: null,
dutyName: null,
partnerName: null,
productCode: null,
productModel: null,
timeType: 'deliveryTime',
params: {},
orderByColumn:'createTime',

View File

@ -130,7 +130,7 @@
<span>{{ scope.row.productModel }}</span>
</template>
</el-table-column>
<el-table-column label="产品描述" show-overflow-tooltip>
<el-table-column label="产品描述" width="300" >
<template slot-scope="scope">
<span>{{ scope.row.productDescription }}</span>
</template>

View File

@ -25,6 +25,22 @@
@keyup.enter.native="handleQuery"
/>
</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 label="汇智负责人" prop="ownerName">
<el-input
v-model="queryParams.ownerName"
@ -103,6 +119,44 @@
<el-table-column label="制造商名称" align="center" prop="vendorName" width="120"/>
<el-table-column label="联系人" align="center" prop="vendorUser" width="100"/>
<el-table-column label="联系电话" align="center" prop="vendorPhone" width="120"/>
<el-table-column label="产品编码" align="center" width="150">
<template slot-scope="scope">
<div v-if="scope.row.omsPurchaseOrderItemList && scope.row.omsPurchaseOrderItemList.length > 0">
<span v-if="scope.row.omsPurchaseOrderItemList.length === 1">
{{ scope.row.omsPurchaseOrderItemList[0].productCode }}
</span>
<el-popover v-else placement="bottom" width="500" trigger="click">
<el-table :data="scope.row.omsPurchaseOrderItemList" size="mini">
<el-table-column property="productCode" label="产品编码" width="180"></el-table-column>
<el-table-column property="productModel" label="产品型号" width="180"></el-table-column>
<el-table-column property="quantity" label="数量" width="80"></el-table-column>
</el-table>
<div slot="reference" style="cursor: pointer; color: #409EFF">
{{ scope.row.omsPurchaseOrderItemList[0].productCode }} <i class="el-icon-arrow-down"></i>
</div>
</el-popover>
</div>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="产品型号" align="center" width="150">
<template slot-scope="scope">
<span v-if="scope.row.omsPurchaseOrderItemList && scope.row.omsPurchaseOrderItemList.length > 0">
{{ scope.row.omsPurchaseOrderItemList[0].productModel }}
<span v-if="scope.row.omsPurchaseOrderItemList.length > 1">...</span>
</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="数量" align="center" width="80">
<template slot-scope="scope">
<span v-if="scope.row.omsPurchaseOrderItemList && scope.row.omsPurchaseOrderItemList.length > 0">
{{ scope.row.omsPurchaseOrderItemList[0].quantity }}
<span v-if="scope.row.omsPurchaseOrderItemList.length > 1">...</span>
</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="含税总计金额" align="center" prop="totalAmount" width="120"/>
<el-table-column label="发起日期" align="center" prop="createTime" width="180" sortable>
<template slot-scope="scope">
@ -345,6 +399,8 @@ export default {
ownerName: null,
approveStatus: null,
confirmStatus: null,
productModel: null,
productCode: null,
status: null,
orderByColumn: 'createTime',
isAsc: 'desc'

View File

@ -221,7 +221,9 @@ export default {
agentCode: null,
agentName: null,
province: null,
city: null
city: null,
isAsc : 'desc',
orderByColumn : 'createAt',
},
//
provinceOptions: [],

View File

@ -287,7 +287,9 @@ export default {
province: null,
city: null,
bgProperty: null,
industryType: null
industryType: null,
isAsc : 'desc',
orderByColumn : 'createAt',
},
//
provinceOptions: [],

View File

@ -305,6 +305,8 @@ export default {
level: null,
province: null,
city: null,
isAsc : 'desc',
orderByColumn : 'createTime',
},
//
provinceOptions: [],

View File

@ -236,6 +236,8 @@ export default {
productName: null,
model: null,
vendorName: null,
isAsc : 'desc',
orderByColumn : 'createTime',
},
//
form: {},

View File

@ -534,15 +534,15 @@ export default {
/** 分配数据权限操作 */
handleDataScope(row) {
this.reset()
// const deptTreeSelect = this.getDeptTree(row.roleId)
const deptTreeSelect = this.getDeptTree(row.roleId)
getRole(row.roleId).then(response => {
this.form = response.data
this.openDataScope = true
// this.$nextTick(() => {
// deptTreeSelect.then(res => {
// this.$refs.dept.setCheckedKeys(res.checkedKeys)
// })
// })
this.$nextTick(() => {
deptTreeSelect.then(res => {
this.$refs.dept.setCheckedKeys(res.checkedKeys)
})
})
})
this.title = "分配数据权限"
},

View File

@ -237,6 +237,8 @@ export default {
managerName: null,
managerPhone: null,
managerEmail: null,
isAsc : 'desc',
orderByColumn : 'createTime',
},
//
form: {},

View File

@ -0,0 +1,32 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="renderer" content="webkit">
</head>
<style>
tr td, th {
text-align: center;
border: 1px solid black;
padding: 5px 10px;
}
p {
margin-top: 20px;
}
</style>
<body>
<div>
<!-- <p>尊敬的用户:您好!</p>-->
<p>您好,紫光汇智有新 PO 单【[[${purchaseNo}]]】送达,请进入紫光汇智 OMS 系统【进销存管理】供应商界面,确认订单,完成相关操作,并及时处理后续入库手续。</p>
<p>如有疑问,可随时与我司沟通。联系人:徐心钰 15168396014</p>
<div style="margin-top:50px">
<img src="cid:signature" style="width: 200px; height: auto;"/>
<p>紫光汇智信息技术有限公司</p>
</div>
</div>
</body>
</html>

View File

@ -101,6 +101,7 @@ public class TemplateMailUtil {
PAYABLE_REFUNDED_EMAIL("payableRefundedTemplate.html", "预付款恢复通知"),
RECEIPT_EMAIL("receiptTemplate.html", "预收款变动通知"),
RECEIPT_REFUNDED_EMAIL("receiptRefundedTemplate.html", "预收款恢复通知"),
VENDOR_CONFIRM_EMAIL("vendorConfirmTemplate.html", "预收款恢复通知"),
;

View File

@ -62,6 +62,25 @@ public class VueInventoryExecutionController extends BaseController
List<ProjectOrderInfo> list = projectOrderInfoService.selectProjectOrderInfoList(projectOrderInfo);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("project:order:export")
@PostMapping("/export")
public AjaxResult export(ProjectOrderInfo projectOrderInfo)
{
projectOrderInfo.setOrderStatus(ProjectOrderInfo.OrderStatus.APPROVE_COMPLETE.getCode());
if (!inventoryAuthService.authAll()) {
List<String> productCodeList = inventoryAuthService.authProductCode();
if (CollUtil.isEmpty(productCodeList)) {
return AjaxResult.error("无数据导出");
}
projectOrderInfo.setProductCodeList(productCodeList);
}
String fileName = projectOrderInfoService.exportList(projectOrderInfo);
return AjaxResult.success(fileName);
}
/**
*

View File

@ -129,6 +129,7 @@ public class OmsPurchaseOrder extends BaseEntity
private String taskId;
private String productCode;
private String productModel;
private String vendorEmail;
private Integer fileId;
private OmsFileLog fileLog;

View File

@ -231,6 +231,8 @@ public class ProjectInfo extends BaseEntity
private List<OmsFileLog> projectFileList;
private String fileId;
private String partnerSystemUserId;
private String productCode;
private String productModel;
private Integer quotationId;
private List<Integer> quotationIdList;

View File

@ -73,6 +73,7 @@ public class Quotation extends BaseEntity {
*
*/
private String customerName;
private String createByName;
// @Excel(name = "软件")
private List<QuotationProductInfo> softwareProjectProductInfoList;
// @Excel(name = "终端")

View File

@ -4,6 +4,8 @@ package com.ruoyi.sip.domain;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import java.math.BigDecimal;
/**
* (QuotationProductInfo)
@ -34,31 +36,31 @@ public class QuotationProductInfo extends BaseEntity {
/**
*
*/
private Double quantity;
private BigDecimal quantity;
/**
*
*/
private Double cataloguePrice;
private BigDecimal cataloguePrice;
/**
*
*/
private Double catalogueAllPrice;
private BigDecimal catalogueAllPrice;
/**
*
*/
private Double price;
private BigDecimal price;
/**
*
*/
private Double allPrice;
private BigDecimal allPrice;
/**
*
*/
private Double guidanceDiscount;
private BigDecimal guidanceDiscount;
/**
*
*/
private Double discount;
private BigDecimal discount;
/**
*
*/
@ -66,7 +68,7 @@ public class QuotationProductInfo extends BaseEntity {
/**
*
*/
private Double taxRate;
private BigDecimal taxRate;
/**
* id
*/

View File

@ -6,6 +6,7 @@ import java.util.*;
import java.util.stream.Collectors;
import cn.hutool.core.collection.CollUtil;
import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
@ -84,6 +85,7 @@ public class InventoryDeliveryServiceImpl implements IInventoryDeliveryService {
* @return
*/
@Override
@DataScope(deptAlias = "t8", userAlias = "t8")
public List<InventoryDelivery> selectInventoryDeliveryList(InventoryDelivery inventoryDelivery) {
return inventoryDeliveryMapper.selectInventoryDeliveryList(inventoryDelivery);
}
@ -114,7 +116,7 @@ public class InventoryDeliveryServiceImpl implements IInventoryDeliveryService {
//修改数据的时候同步修改出库价
BigDecimal bigDecimal = inventoryOuterMapper.selectOutPriceByCode(inventoryDelivery.getOuterCode());
List<OmsInventoryDeliveryDetail> detailList=new ArrayList<>();
List<OmsInventoryDeliveryDetail> detailList = new ArrayList<>();
if (CollUtil.isEmpty(productSnDataList)) {
List<InventoryInfo> inventoryInfoList = productSnList.stream().map(item -> {
InventoryInfo info = new InventoryInfo();
@ -131,7 +133,7 @@ public class InventoryDeliveryServiceImpl implements IInventoryDeliveryService {
return info;
}).collect(Collectors.toList());
inventoryInfoService.saveBatch(inventoryInfoList);
}else{
} else {
for (InventoryInfo inventoryInfo : productSnDataList) {
inventoryInfo.setInventoryStatus(InventoryInfo.InventoryStatusEnum.OUTER.getCode());
inventoryInfo.setOuterCode(inventoryDelivery.getOuterCode());
@ -142,7 +144,7 @@ public class InventoryDeliveryServiceImpl implements IInventoryDeliveryService {
detail.setProductSn(inventoryInfo.getProductSn());
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.setId(inventoryDelivery.getDetailId());
@ -151,7 +153,7 @@ public class InventoryDeliveryServiceImpl implements IInventoryDeliveryService {
//todo 限制只能发一次货 防止重复发货
int i = inventoryDeliveryMapper.insertInventoryDelivery(inventoryDelivery);
if (CollUtil.isNotEmpty(detailList)){
if (CollUtil.isNotEmpty(detailList)) {
for (OmsInventoryDeliveryDetail detail : detailList) {
detail.setDeliveryId(inventoryDelivery.getId());
}
@ -231,7 +233,7 @@ public class InventoryDeliveryServiceImpl implements IInventoryDeliveryService {
updateOrder.setDeliveryStatus(sum == allSum ? ProjectOrderInfo.DeliveryStatusEnum.ALL_DELIVERY.getCode() : ProjectOrderInfo.DeliveryStatusEnum.PART_DELIVERY.getCode());
projectOrderInfoService.updateProjectOrderInfoByCode(updateOrder);
//新增计收数据
if (sum==allSum){
if (sum == allSum) {
//新增计收数据
OmsFinanceCharge omsFinanceCharge = new OmsFinanceCharge();
omsFinanceCharge.setOrderCode(inventoryDelivery.getOrderCode());
@ -298,7 +300,7 @@ public class InventoryDeliveryServiceImpl implements IInventoryDeliveryService {
InventoryDelivery inventoryDelivery1 = selectInventoryDeliveryById(inventoryDelivery.getId());
BigDecimal allPrice = price.multiply(new BigDecimal(inventoryDelivery1.getQuantity().toString()));
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);
receivableBill.setTaxRate(defaultTaxRate);
receivableBill.setTotalPriceWithoutTax(allPriceWithOutTax);
@ -330,7 +332,7 @@ public class InventoryDeliveryServiceImpl implements IInventoryDeliveryService {
public List<DeliveryInfoVo> getNumberInfo(ApiDataQueryDto dto) {
List<DeliveryInfoVo> resultList = inventoryDeliveryMapper.listSn(dto);
List<String> orderCodeList = resultList.stream().map(DeliveryInfoVo::getOrderCode).collect(Collectors.toList());
if (CollUtil.isEmpty(orderCodeList)){
if (CollUtil.isEmpty(orderCodeList)) {
return Collections.emptyList();
}
// 根据订单ID查询合同信息
@ -358,7 +360,6 @@ public class InventoryDeliveryServiceImpl implements IInventoryDeliveryService {
//todo 判断应付或应收状态 不允许退
InventoryDelivery inventoryDelivery = inventoryDeliveryMapper.selectInventoryDeliveryById(id);
deleteInventoryOuterById(id);
List<ProjectProductInfo> projectProductInfos = projectProductInfoService.listDeliveryProductByOrderCode(Collections.singletonList(inventoryDelivery.getOrderCode()));
@ -400,14 +401,14 @@ public class InventoryDeliveryServiceImpl implements IInventoryDeliveryService {
InventoryDelivery dbData = inventoryDeliveryMapper.selectInventoryDeliveryById(inventoryDelivery.getId());
List<OmsInventoryDeliveryDetail> omsInventoryDeliveryDetails = deliveryDetailService.selectOmsInventoryDeliveryDetailByDeliveryId(dbData.getId());
InventoryInfo queryParams = new InventoryInfo();
if (CollUtil.isNotEmpty(omsInventoryDeliveryDetails)){
if (CollUtil.isNotEmpty(omsInventoryDeliveryDetails)) {
queryParams.setProductSnList(omsInventoryDeliveryDetails.stream()
.map(OmsInventoryDeliveryDetail::getProductSn).collect(Collectors.toList()));
}
queryParams.setOuterCode(dbData.getOuterCode());
queryParams.setWarehouseId(dbData.getWarehouseId());
List<InventoryInfo> inventoryInfos = inventoryInfoService.selectInventoryInfoList(queryParams);
return inventoryInfos.stream().map(item->{
return inventoryInfos.stream().map(item -> {
InventoryDeliveryDetailExcelDto detailExcelDto = new InventoryDeliveryDetailExcelDto();
detailExcelDto.setProductSn(item.getProductSn());
detailExcelDto.setProductCode(item.getProductCode());
@ -468,7 +469,7 @@ public class InventoryDeliveryServiceImpl implements IInventoryDeliveryService {
private Date updateStartTimeAndAddList(DeliveryInfoVo deliveryInfoVo, ProjectProductInfo productInfo, Date startTime, List<DeliveryInfoVo.ServiceInfo> serviceInfoList) {
int year = productInfo.getValue() == null ? 0 : Integer.parseInt(productInfo.getValue());
year= Math.toIntExact(year * (productInfo.getQuantity()==null? 1:productInfo.getQuantity()));
year = Math.toIntExact(year * (productInfo.getQuantity() == null ? 1 : productInfo.getQuantity()));
DeliveryInfoVo.ServiceInfo serviceInfo = deliveryInfoVo.new ServiceInfo();
serviceInfo.setServiceLevel(productInfo.getProductBomCode());
serviceInfo.setServiceDescribe(productInfo.getProductDesc());

View File

@ -6,12 +6,14 @@ import java.util.function.Function;
import java.util.stream.Collectors;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.lang.Dict;
import com.alibaba.fastjson.JSON;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.enums.ApproveStatusEnum;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.common.utils.mail.TemplateMailUtil;
import com.ruoyi.sip.domain.*;
import com.ruoyi.sip.dto.inventory.OmsPurchaseOrderItemDto;
import com.ruoyi.sip.flowable.domain.Todo;
@ -108,7 +110,13 @@ public class OmsPurchaseOrderServiceImpl implements IOmsPurchaseOrderService, To
@Override
public List<OmsPurchaseOrder> selectOmsPurchaseOrderList(OmsPurchaseOrder omsPurchaseOrder)
{
return omsPurchaseOrderMapper.selectOmsPurchaseOrderList(omsPurchaseOrder);
List<OmsPurchaseOrder> omsPurchaseOrders = omsPurchaseOrderMapper.selectOmsPurchaseOrderList(omsPurchaseOrder);
if (CollUtil.isNotEmpty(omsPurchaseOrders)) {
List<OmsPurchaseOrderItem> omsPurchaseOrderItems = omsPurchaseOrderMapper.listItemByCodeList(omsPurchaseOrders.stream().map(OmsPurchaseOrder::getPurchaseNo).collect(Collectors.toList()));
Map<String, List<OmsPurchaseOrderItem>> collect = omsPurchaseOrderItems.stream().collect(Collectors.groupingBy(OmsPurchaseOrderItem::getPurchaseNo));
omsPurchaseOrders.forEach(item -> item.setOmsPurchaseOrderItemList(collect.get(item.getPurchaseNo())));
}
return omsPurchaseOrders;
}
/**
@ -415,7 +423,29 @@ public class OmsPurchaseOrderServiceImpl implements IOmsPurchaseOrderService, To
@Override
public int vendorConfirmStatus(OmsPurchaseOrder omsPurchaseOrder) {
omsPurchaseOrder.setUpdateTime(DateUtils.getNowDate());
return omsPurchaseOrderMapper.updateOmsPurchaseOrder(omsPurchaseOrder);
int i = omsPurchaseOrderMapper.updateOmsPurchaseOrder(omsPurchaseOrder);
//发送邮件
OmsPurchaseOrder existsOrder = omsPurchaseOrderMapper.selectOmsPurchaseOrderById(omsPurchaseOrder.getId());
List<String> cssMailList = new ArrayList<>();
//鼎盛需要抄送
if ("P004".equals(existsOrder.getVendorCode())){
cssMailList.add("laiyk@dsipc.com.cn");
}
if (StringUtils.isEmpty(existsOrder.getVendorEmail())){
log.info("发货邮件发送失败,收件人为空");
return i;
}
String templateTile="紫光汇智云桌面-{}-采购单入库通知";
Dict dict = Dict.create();
dict.put("purchaseNo",existsOrder.getPurchaseNo());
String title = StringUtils.format(templateTile, existsOrder.getPurchaseNo());
TemplateMailUtil.sendTemplateMail(Collections.singletonList(existsOrder.getVendorEmail()),title,
TemplateMailUtil.MailTemplate.VENDOR_CONFIRM_EMAIL, dict,cssMailList);
return i;
}

View File

@ -793,6 +793,8 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
List<List<String>> headerList = new ArrayList<>();
headerList.add(Collections.singletonList("项目编号"));
headerList.add(Collections.singletonList("下单时间"));
headerList.add(Collections.singletonList("订单生效时间"));
headerList.add(Collections.singletonList("要求到货时间"));
headerList.add(Collections.singletonList("合同编号"));
headerList.add(Collections.singletonList("项目名称"));
headerList.add(Collections.singletonList("代表处"));
@ -977,7 +979,7 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
totalPrice = processProducts(deployList, maxDeployService, row, totalPrice);
//添加维保
totalPrice = processProducts(maintenanceList, maxMaintenanceService, row, totalPrice);
int insertIndex=21;
int insertIndex=23;
row.add(insertIndex++, wssDto.getQuantity());
row.add(insertIndex++, wssDto.getAllPrice());
row.add(insertIndex++, wssDto.getTaxRate());
@ -1034,6 +1036,8 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
private void addBasicFields(ProjectOrderInfo info, List<Object> row) {
row.add(info.getProjectCode());
row.add(DateUtil.format(info.getEstimatedOrderTime(), "yyyy-MM-dd"));
row.add(DateUtil.format(info.getApproveTime(), "yyyy-MM-dd"));
row.add(DateUtil.format(info.getDeliveryTime(), "yyyy-MM-dd"));
row.add(info.getOrderCode());
row.add(info.getProjectName());
row.add(info.getAgentName());

View File

@ -32,6 +32,7 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.io.InputStream;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.*;
@ -238,7 +239,7 @@ public class QuotationServiceImpl implements IQuotationService {
// 2. 第二部分:列标题
List<String> headers = Arrays.asList(
"序号", "产品编码", "产品型号", "产品代码描述", "数量",
"目录单价(RMB)", "推荐折扣", "折扣单价(RMB)", "总价(RMB)",
"目录单价(RMB)", "推荐折扣(%)","折扣(%)", "单价(RMB)", "总价(RMB)",
"目录总价(RMB)", "CID信息", "备注"
);
// 记录列标题行索引
@ -452,8 +453,8 @@ public class QuotationServiceImpl implements IQuotationService {
double sumAllPrice = 0.0;
double sumCatalogueAllPrice = 0.0;
BigDecimal sumAllPrice = BigDecimal.ZERO;
BigDecimal sumCatalogueAllPrice = BigDecimal.ZERO;
// 添加数据行
int index = 1;
@ -465,7 +466,8 @@ public class QuotationServiceImpl implements IQuotationService {
row.add(item.getProductDesc());
row.add(item.getQuantity());
row.add(item.getCataloguePrice());
row.add(item.getGuidanceDiscount());
row.add(item.getGuidanceDiscount()==null?"":item.getGuidanceDiscount().multiply(new BigDecimal("100")));
row.add(item.getDiscount()==null?"":item.getDiscount().multiply(new BigDecimal("100")));
row.add(item.getPrice());
row.add(item.getAllPrice());
row.add(item.getCatalogueAllPrice());
@ -474,10 +476,10 @@ public class QuotationServiceImpl implements IQuotationService {
rows.add(row);
if (item.getAllPrice() != null) {
sumAllPrice += item.getAllPrice();
sumAllPrice = sumAllPrice.add(item.getAllPrice());
}
if (item.getCatalogueAllPrice() != null) {
sumCatalogueAllPrice += item.getCatalogueAllPrice();
sumCatalogueAllPrice =sumCatalogueAllPrice.add(item.getCatalogueAllPrice());
}
}

View File

@ -30,7 +30,7 @@
select
t1.id, t1.quotation_code, t1.quotation_name, t1.quotation_amount, t1.discount_amount,
t1.quotation_status, t1.create_time, t1.create_by, t1.update_by, t1.update_time, t1.remark,
t1.agent_code, t1.amount_type, t1.customer_name
t1.agent_code, t1.amount_type, t1.customer_name,u.user_name as create_by_name
from oms_quotation t1
LEFT join sys_user u on t1.create_by = u.user_id
<where>

View File

@ -54,6 +54,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deliveryTime != null ">and t1.delivery_time = #{deliveryTime}</if>
<if test="deliveryType != null and deliveryType != ''">and t1.delivery_type = #{deliveryType}</if>
<if test="projectCode != null and projectCode != ''">and t5.project_code = #{projectCode}</if>
<if test="model != null and model != ''">and t7.model like concat('%',#{model},'%')</if>
<if test="productCode != null and productCode != ''">and t7.product_code = #{productCode}</if>
<if test="productCodeList != null and productCodeList.size>0">and t3.product_code in
<foreach item="item" index="index" collection="productCodeList" separator="," open="(" close=")">
#{item}

View File

@ -72,7 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
, t1.purchaser_mobile, t1.purchaser_email, t1.warehouse_id, t1.pay_method, t1.owner_id, t1.owner_name, t1.remark, t1.total_amount,t1.flow_type
, t1.status, t1.approve_status, t1.approve_time, t1.approve_node, t1.confirm_status, t1.create_time, t1.update_time, t1.del_flag,t1.version
, t1.file_id
,t2.vendor_name,t2.vendor_user,t2.vendor_phone,t3.warehouse_name
,t2.vendor_name,t2.vendor_user,t2.vendor_code,t2.vendor_phone,t2.vendor_email,t3.warehouse_name
from oms_purchase_order t1
left join oms_vendor_info t2 on t1.vendor_id = t2.vendor_id
left join oms_warehouse_info t3 on t1.warehouse_id = t3.id
@ -90,6 +90,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="flowType != null "> and t1.flow_type = #{flowType}</if>
<if test="vendorName != null "> and t2.vendor_name = #{vendorName}</if>
<if test="ownerName != null "> and t1.owner_name = #{ownerName}</if>
<if test="productCode != null and productCode!='' "> and t1.id in (select purchase_id from oms_purchase_order_item where product_code =#{productCode})</if>
<if test="productModel != null and productModel!=''"> and t1.id in
(select 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('%',#{productModel},'%'))</if>
<if test="authVendorCodeList != null and authVendorCodeList.size>0 "> and t2.vendor_code in
<foreach item="item" collection="authVendorCodeList" separator="," open="(" close=")">#{item}</foreach>
</if>
@ -260,10 +263,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
t1.amount_total,
t1.delivery_date,
t1.inner_quantity,
opo.purchase_no
opo.purchase_no,
t3.model as product_model
FROM
oms_purchase_order_item t1
inner join oms_purchase_order opo on t1.purchase_id = opo.id
left join product_info t3 on t1.product_code=t3.product_code
where opo.purchase_no in
<foreach item="item" collection="list" separator="," open="(" close=")">
#{item}

View File

@ -148,6 +148,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="partnerCode != null and partnerCode != ''"> and t1.partner_code = #{partnerCode}</if>
<if test="partnerName != null and partnerName != ''"> and t1.partner_name = #{partnerName}</if>
<if test="contactWay != null and contactWay != ''"> and t1.contact_way = #{contactWay}</if>
<if test="productCode != null and productCode != ''"> and t1.id in (select project_id from project_product_info where product_bom_code = #{productCode})</if>
<if test="productModel != null and productModel != ''"> and t1.id in (select project_id from project_product_info where model like concat('%', #{productModel},'%'))</if>
<if test="estimatedAmount != null "> and t1.estimated_amount = #{estimatedAmount}</if>
<if test="currencyType != null and currencyType != ''"> and t1.currency_type = #{currencyType}</if>
<if test="estimatedOrderTime != null "> and t1.estimated_order_time = #{estimatedOrderTime}</if>