feat(partner): 新增系统用户字段并优化相关功能
- 在 PartnerInfo 模型中添加 systemUserId 和 systemUserName 字段 - 更新相关 mapper 和 SQL 文件以支持新增字段 - 修改前端模板,增加系统用户选择功能 -优化订单审批流程,增加对代理商系统用户的验证 - 修复邮件发送开关逻辑dev_1.0.0
parent
0656894960
commit
d9065d33d2
|
|
@ -137,7 +137,7 @@
|
||||||
align: 'center',
|
align: 'center',
|
||||||
formatter: function (value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
var actions = [];
|
var actions = [];
|
||||||
actions.push('<a class="btn btn-default btn-xs " href="javascript:void(0)" onclick="$.operate.view(\'' + row.id + '\')">发货记录</a> ');
|
actions.push('<a class="btn btn-default btn-sm " href="javascript:void(0)" onclick="$.operate.view(\'' + row.id + '\')">发货记录</a> ');
|
||||||
|
|
||||||
return actions.join('');
|
return actions.join('');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -519,7 +519,7 @@
|
||||||
formatter: function (value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
var actions = [];
|
var actions = [];
|
||||||
let disabled = Number(row.quantity) <= Number(row.generatedQuantity) + Number(row.confirmQuantity)
|
let disabled = Number(row.quantity) <= Number(row.generatedQuantity) + Number(row.confirmQuantity)
|
||||||
actions.push(`<a class="btn btn-default btn-xs " href="javascript:void(0)" ${disabled?'disabled':''}
|
actions.push(`<a class="btn btn-default btn-sm " href="javascript:void(0)" ${disabled?'disabled':''}
|
||||||
onclick="checkOut(\'${row.productCode}\',\'${row.model}\',\'${row.vendorName}\',\'${row.quantity}\',\'${row.generatedQuantity}\',\'${row.confirmQuantity}\',\'[[${projectOrderInfo.id}]]\')">出库</a>`);
|
onclick="checkOut(\'${row.productCode}\',\'${row.model}\',\'${row.vendorName}\',\'${row.quantity}\',\'${row.generatedQuantity}\',\'${row.confirmQuantity}\',\'[[${projectOrderInfo.id}]]\')">出库</a>`);
|
||||||
return actions.join('');
|
return actions.join('');
|
||||||
}
|
}
|
||||||
|
|
@ -761,13 +761,13 @@ function initWarehouseTable(data) {
|
||||||
formatter: function (value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
var actions = [];
|
var actions = [];
|
||||||
if (row.outerStatus === '1' || row.outerStatus === '4') {
|
if (row.outerStatus === '1' || row.outerStatus === '4') {
|
||||||
actions.push(`<a class="btn btn-danger btn-xs " style="margin:0px 5px" href="javascript:void(0)" onclick="deleteOuter('${row.id}','${row.orderCode}')">撤销</a>`);
|
actions.push(`<a class="btn btn-danger btn-sm " style="margin:0px 5px" href="javascript:void(0)" onclick="deleteOuter('${row.id}','${row.orderCode}')">撤销</a>`);
|
||||||
actions.push(`<a class="btn btn-default btn-xs " href="javascript:void(0)" onclick="updateStatus('${row.id}','${row.orderCode}')">确认出库</a>`);
|
actions.push(`<a class="btn btn-default btn-sm " href="javascript:void(0)" onclick="updateStatus('${row.id}','${row.orderCode}')">确认出库</a>`);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// actions.push('<a class="btn btn-default btn-xs " href="javascript:void(0)" onclick="viewOuter(' + row.id + ')">查看详情</a>');
|
// actions.push('<a class="btn btn-default btn-xs " href="javascript:void(0)" onclick="viewOuter(' + row.id + ')">查看详情</a>');
|
||||||
actions.push(`<a class="btn btn-default btn-xs " href="javascript:void(0)" onclick="$.modal.popupRight( '订单执行跟踪详情', outerPrefix+'/view/${row.id}');">查看详情</a>`);
|
actions.push(`<a class="btn btn-default btn-sm " href="javascript:void(0)" onclick="$.modal.popupRight( '订单执行跟踪详情', outerPrefix+'/view/${row.id}');">查看详情</a>`);
|
||||||
}
|
}
|
||||||
return actions.join('');
|
return actions.join('');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -112,8 +112,8 @@
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>物流单号:</td>
|
<td><label class="control-label is-required">物流单号:</label></td>
|
||||||
<td> <input id="logisticsCode" name="logisticsCode" class="form-control" type="text"></td>
|
<td> <input id="logisticsCode" name="logisticsCode" class="form-control" type="text" required></td>
|
||||||
<td> 发货方式:</td>
|
<td> 发货方式:</td>
|
||||||
<td> <select name="deliveryType" id="deliveryType" class="form-control"
|
<td> <select name="deliveryType" id="deliveryType" class="form-control"
|
||||||
th:with="type=${@dict.getType('delivery_type')}"
|
th:with="type=${@dict.getType('delivery_type')}"
|
||||||
|
|
@ -233,7 +233,7 @@
|
||||||
|
|
||||||
function submitHandler() {
|
function submitHandler() {
|
||||||
$.modal.confirm("确认要确认退回吗?", function () {
|
$.modal.confirm("确认要确认退回吗?", function () {
|
||||||
$.operate.save(prefix + "/status", {"id": [[${inventoryOuter.id}]], "outerStatus": '4'});
|
$.operate.save(prefix + "/status", {"id": [[${inventoryOuter.id}]], "outerStatus": '4',orderCode: [[${inventoryOuter.orderCode}]]});
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -398,7 +398,7 @@
|
||||||
formatter: function (value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
var actions = [];
|
var actions = [];
|
||||||
let disabled = Number(row.quantity) <= Number(row.deliveryGenerateQuantity) + Number(row.deliveryConfirmQuantity)
|
let disabled = Number(row.quantity) <= Number(row.deliveryGenerateQuantity) + Number(row.deliveryConfirmQuantity)
|
||||||
actions.push(`<span class="btn btn-default btn-xs " href="javascript:void(0)" ${disabled ? 'style="pointer-events: none;" disabled' : ''} onclick="checkDelivery(\'${row.quantity}\',\'${row.warehouseId}\','${row.productCode}')">发货</span>`);
|
actions.push(`<span class="btn btn-default btn-sm " href="javascript:void(0)" ${disabled ? 'style="pointer-events: none;" disabled' : ''} onclick="checkDelivery(\'${row.quantity}\',\'${row.warehouseId}\','${row.productCode}')">发货</span>`);
|
||||||
return actions.join('');
|
return actions.join('');
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
|
|
@ -428,6 +428,10 @@
|
||||||
content: $('#generateDelivery'), // 捕获的元素
|
content: $('#generateDelivery'), // 捕获的元素
|
||||||
btn: ['确定', '关闭'],
|
btn: ['确定', '关闭'],
|
||||||
yes: function (index, layero, that) {
|
yes: function (index, layero, that) {
|
||||||
|
if (!$('#logisticsCode').val()){
|
||||||
|
$.modal.msgError('物流单号必填')
|
||||||
|
return;
|
||||||
|
}
|
||||||
var arrays = $.table.selectColumns("productSn");
|
var arrays = $.table.selectColumns("productSn");
|
||||||
if (arrays.length != quantity) {
|
if (arrays.length != quantity) {
|
||||||
$.modal.msgError(`产品选中数量应与发货数量一致,应发货数量为[${quantity}]`)
|
$.modal.msgError(`产品选中数量应与发货数量一致,应发货数量为[${quantity}]`)
|
||||||
|
|
@ -545,13 +549,13 @@
|
||||||
formatter: function (value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
var actions = [];
|
var actions = [];
|
||||||
if (row.deliveryStatus === '0') {
|
if (row.deliveryStatus === '0') {
|
||||||
actions.push('<span class="btn btn-danger btn-xs " style="margin:0px 5px" href="javascript:void(0)" onclick="deleteDelivery(' + row.id + ')">撤销</span>');
|
actions.push('<span class="btn btn-danger btn-sm " style="margin:0px 5px" href="javascript:void(0)" onclick="deleteDelivery(' + row.id + ')">撤销</span>');
|
||||||
actions.push(`<span class="btn btn-default btn-xs " href="javascript:void(0)" onclick="updateStatus(' ${row.id} ','${row.outerCode}','${row.orderCode}','${row.productCode}')">确认发货</span>`);
|
actions.push(`<span class="btn btn-default btn-sm " href="javascript:void(0)" onclick="updateStatus(' ${row.id} ','${row.outerCode}','${row.orderCode}','${row.productCode}')">确认发货</span>`);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
actions.push(`<!--<a class="btn btn-default btn-xs " href="javascript:void(0)" data-delivery='${JSON.stringify(row)}' onclick='viewDelivery(this)'>查看详情</a>-->`);
|
actions.push(`<!--<a class="btn btn-default btn-xs " href="javascript:void(0)" data-delivery='${JSON.stringify(row)}' onclick='viewDelivery(this)'>查看详情</a>-->`);
|
||||||
actions.push(`<span class="btn btn-default btn-xs " href="javascript:void(0)" data-delivery='${JSON.stringify(row)}' onclick=' $.modal.popupRight( "发货信息详情", deliveryPrefix+"/view/${row.id}");'>查看详情</span>`);
|
actions.push(`<span class="btn btn-default btn-sm " href="javascript:void(0)" data-delivery='${JSON.stringify(row)}' onclick=' $.modal.popupRight( "发货信息详情", deliveryPrefix+"/view/${row.id}");'>查看详情</span>`);
|
||||||
}
|
}
|
||||||
return actions.join('');
|
return actions.join('');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@
|
||||||
//已接收
|
//已接收
|
||||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.editFull(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.editFull(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||||
} else {
|
} else {
|
||||||
actions.push('<a class="btn btn-default btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="refundable(\'' + row.id + '\')">退回</a> ');
|
actions.push('<a class="btn btn-default btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="refundable(\'' + row.id + '\',\''+row.orderCode+'\')">退回</a> ');
|
||||||
actions.push('<a class="btn btn-default btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="received(\'' + row.id + '\')">确认接收</a>');
|
actions.push('<a class="btn btn-default btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="received(\'' + row.id + '\')">确认接收</a>');
|
||||||
}
|
}
|
||||||
return actions.join('');
|
return actions.join('');
|
||||||
|
|
@ -147,9 +147,9 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function refundable(id) {
|
function refundable(id,orderCode) {
|
||||||
$.modal.confirm("确认要确认退回吗?", function () {
|
$.modal.confirm("确认要确认退回吗?", function () {
|
||||||
$.operate.post(prefix + "/status", {"id": id, "outerStatus": '4'},()=>{
|
$.operate.post(prefix + "/status", {"id": id, "outerStatus": '4',"orderCode":orderCode},()=>{
|
||||||
// $.table.refresh()
|
// $.table.refresh()
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -168,6 +168,9 @@
|
||||||
$('.all-price-discount-column').find('.allPrice-discount').each(function (index) {
|
$('.all-price-discount-column').find('.allPrice-discount').each(function (index) {
|
||||||
allPriceDiscount+=parseFloat($(this).val())
|
allPriceDiscount+=parseFloat($(this).val())
|
||||||
})
|
})
|
||||||
|
if (!allPriceDiscount){
|
||||||
|
allPriceDiscount=1.00
|
||||||
|
}
|
||||||
let shipmentAmount = $('#shipmentAmount');
|
let shipmentAmount = $('#shipmentAmount');
|
||||||
if (shipmentAmount){
|
if (shipmentAmount){
|
||||||
allPrice = Number(allPrice).toFixed(2);
|
allPrice = Number(allPrice).toFixed(2);
|
||||||
|
|
@ -175,8 +178,8 @@
|
||||||
$('#displayshipmentAmount').val(formatAmountNumber(allPrice))
|
$('#displayshipmentAmount').val(formatAmountNumber(allPrice))
|
||||||
}
|
}
|
||||||
let actualPurchaseAmount = $('#actualPurchaseAmount');
|
let actualPurchaseAmount = $('#actualPurchaseAmount');
|
||||||
if (actualPurchaseAmount){
|
if (actualPurchaseAmount.length>0 && !actualPurchaseAmount.val()){
|
||||||
allPriceDiscount = Number(allPriceDiscount).toFixed(2);
|
allPriceDiscount = Number(allPriceDiscount)*Number(allPrice).toFixed(2);
|
||||||
actualPurchaseAmount.val(allPriceDiscount)
|
actualPurchaseAmount.val(allPriceDiscount)
|
||||||
$('#displayactualPurchaseAmount').val(formatAmountNumber(allPriceDiscount))
|
$('#displayactualPurchaseAmount').val(formatAmountNumber(allPriceDiscount))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -722,7 +722,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
layer.close(index)
|
layer.close(index)
|
||||||
$.operate.save(prefix + "/edit", $('#form-order-edit').serialize());
|
$.operate.save(prefix + "/edit", $('#form-order-edit').serialize(),()=>{
|
||||||
|
parent.parent.$('.layui-layer-btn').show()
|
||||||
|
parent.parent.$('.saveDraft').show()
|
||||||
|
});
|
||||||
},
|
},
|
||||||
btn2: function (index) {
|
btn2: function (index) {
|
||||||
parent.parent.$('.layui-layer-btn').show()
|
parent.parent.$('.layui-layer-btn').show()
|
||||||
|
|
@ -772,13 +775,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
let shipmentAmount = [[${projectOrderInfo.shipmentAmount}]] || ''
|
let shipmentAmount = [[${projectOrderInfo.shipmentAmount}]] || 0
|
||||||
|
|
||||||
if (shipmentAmount) {
|
if (shipmentAmount) {
|
||||||
document.getElementById('displayshipmentAmount').value=formatAmountNumber(shipmentAmount);
|
document.getElementById('displayshipmentAmount').value=formatAmountNumber(shipmentAmount);
|
||||||
}
|
}
|
||||||
if( $('#displayactualPurchaseAmount').length>0){
|
if( $('#displayactualPurchaseAmount').length>0){
|
||||||
let actualPurchaseAmount = [[${projectOrderInfo.actualPurchaseAmount}]] || ''
|
let actualPurchaseAmount = [[${projectOrderInfo.actualPurchaseAmount}]] || 0
|
||||||
if (actualPurchaseAmount ) {
|
if (actualPurchaseAmount ) {
|
||||||
document.getElementById('displayactualPurchaseAmount').value=formatAmountNumber(actualPurchaseAmount);
|
document.getElementById('displayactualPurchaseAmount').value=formatAmountNumber(actualPurchaseAmount);
|
||||||
}else{
|
}else{
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,10 @@
|
||||||
</head>
|
</head>
|
||||||
<body class="white-bg">
|
<body class="white-bg">
|
||||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<div class="col-xs-12"><label class="col-sm-12 control-label" style=" text-align: c
|
||||||
|
\enter;
|
||||||
|
font-size: 20px;
|
||||||
|
color: #f8ac59;">创建代理商之前请先创建代理商用户</label></div>
|
||||||
<form class="form-horizontal m" id="form-partner-add">
|
<form class="form-horizontal m" id="form-partner-add">
|
||||||
<div class="col-xs-6">
|
<div class="col-xs-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
@ -58,11 +62,19 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label is-required">邮件:</label>
|
<label class="col-sm-4 control-label is-required">邮件:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input name="contactEmail" class="form-control" type="text">
|
<input name="contactEmail" class="form-control" required type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-4 control-label is-required">系统用户:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="systemUserName" onclick="selectPeople()" class="form-control" required type="text">
|
||||||
|
<input name="systemUserId" class="form-control" required type="hidden">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-6">
|
<div class="col-xs-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label">联系人:</label>
|
<label class="col-sm-4 control-label">联系人:</label>
|
||||||
|
|
@ -111,6 +123,28 @@
|
||||||
$.operate.save(prefix + "/add", $('#form-partner-add').serialize());
|
$.operate.save(prefix + "/add", $('#form-partner-add').serialize());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function selectPeople() {
|
||||||
|
var url = ctx + "sip/project/selectPeople";
|
||||||
|
var options = {
|
||||||
|
title: '选择责任人',
|
||||||
|
width: "800",
|
||||||
|
height: '600',
|
||||||
|
url: url,
|
||||||
|
callBack: doSubmitPeople
|
||||||
|
};
|
||||||
|
$.modal.openOptions(options);
|
||||||
|
}
|
||||||
|
function doSubmitPeople(index, layero) {
|
||||||
|
var rows = layero.find("iframe")[0].contentWindow.getSelections();
|
||||||
|
if (rows.length == 0) {
|
||||||
|
$.modal.alertWarning("请选择一个用户");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$('[name="systemUserId"]').val(rows[0].userId);
|
||||||
|
$('[name="systemUserName"]').val(rows[0].userName);
|
||||||
|
|
||||||
|
$.modal.close(index);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -65,6 +65,15 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-4 control-label is-required">系统用户:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="systemUserName" onclick="selectPeople()" th:field="*{systemUserName}" class="form-control" required type="text">
|
||||||
|
<input name="systemUserId" th:field="*{systemUserId}" class="form-control" type="hidden" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="col-xs-6">
|
<div class="col-xs-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label">联系人:</label>
|
<label class="col-sm-4 control-label">联系人:</label>
|
||||||
|
|
@ -110,6 +119,29 @@
|
||||||
selects: ['province', 'city'],
|
selects: ['province', 'city'],
|
||||||
nodata: 'none'
|
nodata: 'none'
|
||||||
});
|
});
|
||||||
|
function selectPeople() {
|
||||||
|
var url = ctx + "sip/project/selectPeople";
|
||||||
|
var options = {
|
||||||
|
title: '选择责任人',
|
||||||
|
width: "800",
|
||||||
|
height: '600',
|
||||||
|
url: url,
|
||||||
|
callBack: doSubmitPeople
|
||||||
|
};
|
||||||
|
$.modal.openOptions(options);
|
||||||
|
}
|
||||||
|
function doSubmitPeople(index, layero) {
|
||||||
|
var rows = layero.find("iframe")[0].contentWindow.getSelections();
|
||||||
|
if (rows.length == 0) {
|
||||||
|
$.modal.alertWarning("请选择一个用户");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$('[name="systemUserId"]').val(rows[0].userId);
|
||||||
|
$('[name="systemUserName"]').val(rows[0].userName);
|
||||||
|
|
||||||
|
$.modal.close(index);
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -43,6 +43,8 @@ public class PartnerInfo extends BaseEntity
|
||||||
/** 联系人 */
|
/** 联系人 */
|
||||||
@Excel(name = "联系人")
|
@Excel(name = "联系人")
|
||||||
private String contactPerson;
|
private String contactPerson;
|
||||||
|
private String systemUserId;
|
||||||
|
private String systemUserName;
|
||||||
|
|
||||||
/** 联系电话 */
|
/** 联系电话 */
|
||||||
@Excel(name = "联系电话")
|
@Excel(name = "联系电话")
|
||||||
|
|
|
||||||
|
|
@ -212,6 +212,8 @@ public class ProjectOrderInfo extends BaseEntity {
|
||||||
private String partnerEmail;
|
private String partnerEmail;
|
||||||
private String partnerUserName;
|
private String partnerUserName;
|
||||||
private String partnerPhone;
|
private String partnerPhone;
|
||||||
|
private String systemUserId;
|
||||||
|
|
||||||
private String level;
|
private String level;
|
||||||
/**
|
/**
|
||||||
* 订单处理方式 0:电子订单 1:纸质订单
|
* 订单处理方式 0:电子订单 1:纸质订单
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ public interface PartnerInfoMapper
|
||||||
* @return 供应商管理
|
* @return 供应商管理
|
||||||
*/
|
*/
|
||||||
public PartnerInfo selectPartnerInfoById(Long id);
|
public PartnerInfo selectPartnerInfoById(Long id);
|
||||||
|
public List<PartnerInfo> selectPartnerInfoByCode(List<String> codeList);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询供应商管理列表
|
* 查询供应商管理列表
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ public interface IPartnerInfoService
|
||||||
* @return 供应商管理
|
* @return 供应商管理
|
||||||
*/
|
*/
|
||||||
public PartnerInfo selectPartnerInfoById(Long id);
|
public PartnerInfo selectPartnerInfoById(Long id);
|
||||||
|
public List<PartnerInfo> selectPartnerInfoByCode(List<String> codeList);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询供应商管理列表
|
* 查询供应商管理列表
|
||||||
|
|
|
||||||
|
|
@ -194,7 +194,7 @@ public class ExecutionTrackServiceImpl implements IExecutionTrackService {
|
||||||
// 如果默认仓库不在现有列表中,创建一个新的条目
|
// 如果默认仓库不在现有列表中,创建一个新的条目
|
||||||
ProductWarehouseInfo defaultWarehouseInfo = new ProductWarehouseInfo();
|
ProductWarehouseInfo defaultWarehouseInfo = new ProductWarehouseInfo();
|
||||||
defaultWarehouseInfo.setWarehouseId(defaultVendor.getWarehouseId());
|
defaultWarehouseInfo.setWarehouseId(defaultVendor.getWarehouseId());
|
||||||
defaultWarehouseInfo.setWarehouseName(defaultVendor.getVendorName());
|
defaultWarehouseInfo.setWarehouseName(defaultVendor.getWarehouseName());
|
||||||
// 这里假设默认仓库有足够库存,实际应用中可能需要查询具体库存
|
// 这里假设默认仓库有足够库存,实际应用中可能需要查询具体库存
|
||||||
List<ProductInfo> productInfos = productInfoService.selectProductInfoByCodeList(Collections.singletonList(productCode));
|
List<ProductInfo> productInfos = productInfoService.selectProductInfoByCodeList(Collections.singletonList(productCode));
|
||||||
defaultWarehouseInfo.setAvailableCount(productInfos.get(0).getAvailableCount() == null ? 0L : productInfos.get(0).getAvailableCount());
|
defaultWarehouseInfo.setAvailableCount(productInfos.get(0).getAvailableCount() == null ? 0L : productInfos.get(0).getAvailableCount());
|
||||||
|
|
|
||||||
|
|
@ -107,15 +107,21 @@ public class InventoryOuterServiceImpl implements IInventoryOuterService
|
||||||
@Override
|
@Override
|
||||||
public int insertInventoryOuter(InventoryOuter inventoryOuter)
|
public int insertInventoryOuter(InventoryOuter inventoryOuter)
|
||||||
{
|
{
|
||||||
|
List<InventoryOuterDetail> detailList = inventoryOuter.getDetailList();
|
||||||
|
if (CollUtil.isEmpty(detailList)) {
|
||||||
|
throw new ServiceException("出库单详情为空,保存失败");
|
||||||
|
}
|
||||||
|
for (InventoryOuterDetail inventoryOuterDetail : detailList) {
|
||||||
|
if (inventoryOuterDetail.getWarehouseId()==null){
|
||||||
|
throw new ServiceException("请选择仓库");
|
||||||
|
}
|
||||||
|
}
|
||||||
inventoryOuter.setOuterCode(generateOutCode());
|
inventoryOuter.setOuterCode(generateOutCode());
|
||||||
inventoryOuter.setDeliveryStatus(InventoryOuter.DeliveryStatusEnum.WAIT_DELIVERY.getCode());
|
inventoryOuter.setDeliveryStatus(InventoryOuter.DeliveryStatusEnum.WAIT_DELIVERY.getCode());
|
||||||
inventoryOuter.setOuterStatus(InventoryOuter.OuterStatusEnum.WAIT_CONFIRM.getCode());
|
inventoryOuter.setOuterStatus(InventoryOuter.OuterStatusEnum.WAIT_CONFIRM.getCode());
|
||||||
inventoryOuter.setCreateBy(ShiroUtils.getUserId().toString());
|
inventoryOuter.setCreateBy(ShiroUtils.getUserId().toString());
|
||||||
inventoryOuter.setCreateTime(DateUtils.getNowDate());
|
inventoryOuter.setCreateTime(DateUtils.getNowDate());
|
||||||
List<InventoryOuterDetail> detailList = inventoryOuter.getDetailList();
|
|
||||||
if (CollUtil.isEmpty(detailList)) {
|
|
||||||
throw new ServiceException("出库单详情为空,保存失败");
|
|
||||||
}
|
|
||||||
for (InventoryOuterDetail inventoryOuterDetail : detailList) {
|
for (InventoryOuterDetail inventoryOuterDetail : detailList) {
|
||||||
inventoryOuterDetail.setOuterCode(inventoryOuter.getOuterCode());
|
inventoryOuterDetail.setOuterCode(inventoryOuter.getOuterCode());
|
||||||
}
|
}
|
||||||
|
|
@ -201,12 +207,10 @@ public class InventoryOuterServiceImpl implements IInventoryOuterService
|
||||||
List<ProjectProductInfo> projectProductInfos = projectProductInfoService.listDeliveryProductByOrderCode(Collections.singletonList(inventoryOuter.getOrderCode()));
|
List<ProjectProductInfo> projectProductInfos = projectProductInfoService.listDeliveryProductByOrderCode(Collections.singletonList(inventoryOuter.getOrderCode()));
|
||||||
//软硬件之和
|
//软硬件之和
|
||||||
long sum = projectProductInfos.stream().mapToLong(ProjectProductInfo::getQuantity).sum();
|
long sum = projectProductInfos.stream().mapToLong(ProjectProductInfo::getQuantity).sum();
|
||||||
|
|
||||||
|
|
||||||
List<InventoryOuter> list = inventoryOuterMapper.selectInventoryOuterList(queryDto);
|
List<InventoryOuter> list = inventoryOuterMapper.selectInventoryOuterList(queryDto);
|
||||||
long count = list.stream().filter(item ->
|
long count = list.stream().filter(item ->(item.getId().equals(inventoryOuter.getId()))||
|
||||||
//已确认和已接收数量
|
//已确认和已接收数量
|
||||||
InventoryOuter.OuterStatusEnum.WAIT_RECEIVE.getCode().equals(item.getOuterStatus()) || !InventoryOuter.OuterStatusEnum.RECEIVED.getCode().equals(item.getOuterStatus()))
|
InventoryOuter.OuterStatusEnum.WAIT_RECEIVE.getCode().equals(item.getOuterStatus()) || InventoryOuter.OuterStatusEnum.RECEIVED.getCode().equals(item.getOuterStatus()))
|
||||||
.mapToLong(InventoryOuter::getQuantity).sum();
|
.mapToLong(InventoryOuter::getQuantity).sum();
|
||||||
//部分接收
|
//部分接收
|
||||||
if (count == 0L) {
|
if (count == 0L) {
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package com.ruoyi.sip.service.impl;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import com.ruoyi.common.exception.ServiceException;
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
import com.ruoyi.common.utils.ShiroUtils;
|
import com.ruoyi.common.utils.ShiroUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
@ -36,6 +37,14 @@ public class PartnerInfoServiceImpl implements IPartnerInfoService
|
||||||
return partnerInfoMapper.selectPartnerInfoById(id);
|
return partnerInfoMapper.selectPartnerInfoById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PartnerInfo> selectPartnerInfoByCode(List<String> codeList) {
|
||||||
|
if (CollUtil.isEmpty(codeList)){
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
return partnerInfoMapper.selectPartnerInfoByCode(codeList);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询供应商管理列表
|
* 查询供应商管理列表
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import java.util.stream.Collectors;
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.lang.Dict;
|
import cn.hutool.core.lang.Dict;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.excel.EasyExcel;
|
import com.alibaba.excel.EasyExcel;
|
||||||
import com.alibaba.excel.metadata.CellData;
|
import com.alibaba.excel.metadata.CellData;
|
||||||
import com.alibaba.excel.metadata.Head;
|
import com.alibaba.excel.metadata.Head;
|
||||||
|
|
@ -345,6 +346,10 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
||||||
fileLogService.deleteProjectOrderFileLogByIds(deleteFileId);
|
fileLogService.deleteProjectOrderFileLogByIds(deleteFileId);
|
||||||
}
|
}
|
||||||
if (ProjectOrderInfo.OrderStatus.WAIT_APPROVE.getCode().equals(projectOrderInfo.getOrderStatus())) {
|
if (ProjectOrderInfo.OrderStatus.WAIT_APPROVE.getCode().equals(projectOrderInfo.getOrderStatus())) {
|
||||||
|
List<PartnerInfo> partnerInfos = partnerInfoService.selectPartnerInfoByCode(Collections.singletonList(projectOrderInfo.getPartnerCode()));
|
||||||
|
if (CollUtil.isEmpty(partnerInfos) || StringUtils.isEmpty(partnerInfos.get(0).getSystemUserId())) {
|
||||||
|
throw new ServiceException(StrUtil.format("代理商配置[{}]未指定系统用户,无法提交审批", existProjectOrderInfo.getPartnerName()));
|
||||||
|
}
|
||||||
List<ProcessInstance> processInstanceList = todoService.listProcessInstance(existProjectOrderInfo.getOrderCode());
|
List<ProcessInstance> processInstanceList = todoService.listProcessInstance(existProjectOrderInfo.getOrderCode());
|
||||||
if (CollUtil.isNotEmpty(processInstanceList)) {
|
if (CollUtil.isNotEmpty(processInstanceList)) {
|
||||||
for (ProcessInstance processInstance : processInstanceList) {
|
for (ProcessInstance processInstance : processInstanceList) {
|
||||||
|
|
@ -362,6 +367,7 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
||||||
put("processTemplate", projectOrderInfo.getProcessTemplate());
|
put("processTemplate", projectOrderInfo.getProcessTemplate());
|
||||||
put("applyUserName", ShiroUtils.getSysUser().getUserName());
|
put("applyUserName", ShiroUtils.getSysUser().getUserName());
|
||||||
put("applyUser", ShiroUtils.getUserId());
|
put("applyUser", ShiroUtils.getUserId());
|
||||||
|
put("partnerUser", existProjectOrderInfo.getSystemUserId());
|
||||||
put("extendField1", projectOrderInfo.getVersionCode());
|
put("extendField1", projectOrderInfo.getVersionCode());
|
||||||
}}, orderFlowKey);
|
}}, orderFlowKey);
|
||||||
complete(null, null, getFlowBusinessKey(existProjectOrderInfo.getOrderCode(), projectOrderInfo.getProcessType()));
|
complete(null, null, getFlowBusinessKey(existProjectOrderInfo.getOrderCode(), projectOrderInfo.getProcessType()));
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ public class TemplateMailUtil {
|
||||||
*/
|
*/
|
||||||
public static void sendTemplateMail(List<String> toEmail, String title, MailTemplate path, Dict dict) {
|
public static void sendTemplateMail(List<String> toEmail, String title, MailTemplate path, Dict dict) {
|
||||||
String enabled = SpringUtils.getProperty("unis.mail.enabled", "false");
|
String enabled = SpringUtils.getProperty("unis.mail.enabled", "false");
|
||||||
if (!Boolean.getBoolean(enabled)) {
|
if (!Boolean.parseBoolean(enabled)) {
|
||||||
log.warn("邮件发送开关未开启");
|
log.warn("邮件发送开关未开启");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
t1.delivery_status,t1.sign_status,t1.outer_status,t1.approve_time
|
t1.delivery_status,t1.sign_status,t1.outer_status,t1.approve_time
|
||||||
,t2.project_code,t2.project_name,t2.province,t2.customer_name,t2.customer_code,t2.industry_type,t2.bg_property,t2.agent_code,t2.estimated_order_time
|
,t2.project_code,t2.project_name,t2.province,t2.customer_name,t2.customer_code,t2.industry_type,t2.bg_property,t2.agent_code,t2.estimated_order_time
|
||||||
,t2.customer_phone,t2.customer_user_name,t2.agent_code,t2.customer_code,t2.partner_name project_partner_name
|
,t2.customer_phone,t2.customer_user_name,t2.agent_code,t2.customer_code,t2.partner_name project_partner_name
|
||||||
,t3.partner_name,t3.level
|
,t3.partner_name,t3.level,t3.system_user_id
|
||||||
,t4.agent_name
|
,t4.agent_name
|
||||||
,t5.user_name as duty_name
|
,t5.user_name as duty_name
|
||||||
from project_order_info t1
|
from project_order_info t1
|
||||||
|
|
|
||||||
|
|
@ -21,23 +21,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectPartnerInfoVo">
|
<sql id="selectPartnerInfoVo">
|
||||||
select id, partner_code, partner_name, contact_email,province, city, address, contact_person, contact_phone, level, create_at, update_at, delete_at, status from partner_info
|
select t1.id, t1.partner_code, t1.partner_name, t1.contact_email,t1.province, t1.city, t1.address, t1.contact_person, t1.contact_phone
|
||||||
|
, t1.level, t1.create_at, t1.update_at, t1.delete_at, t1.status,t1.system_user_id,t2.user_name as system_user_name
|
||||||
|
from partner_info t1 left join sys_user t2 on t1.system_user_id=t2.user_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectPartnerInfoList" parameterType="PartnerInfo" resultMap="PartnerInfoResult">
|
<select id="selectPartnerInfoList" parameterType="PartnerInfo" resultMap="PartnerInfoResult">
|
||||||
<include refid="selectPartnerInfoVo"/>
|
<include refid="selectPartnerInfoVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="partnerCode != null and partnerCode != ''"> and partner_code like concat('%', #{partnerCode}, '%')</if>
|
<if test="partnerCode != null and partnerCode != ''"> and t1.partner_code like concat('%', #{partnerCode}, '%')</if>
|
||||||
<if test="partnerName != null and partnerName != ''"> and partner_name like concat('%', #{partnerName}, '%')</if>
|
<if test="partnerName != null and partnerName != ''"> and t1.partner_name like concat('%', #{partnerName}, '%')</if>
|
||||||
<if test="level != null and level != ''"> and level = #{level}</if>
|
<if test="level != null and level != ''"> and t1.level = #{level}</if>
|
||||||
<if test="province != null and province != ''"> and province = #{province}</if>
|
<if test="province != null and province != ''"> and t1.province = #{province}</if>
|
||||||
<if test="city != null and city != ''"> and city = #{city}</if>
|
<if test="city != null and city != ''"> and t1.city = #{city}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectPartnerInfoById" parameterType="Long" resultMap="PartnerInfoResult">
|
<select id="selectPartnerInfoById" parameterType="Long" resultMap="PartnerInfoResult">
|
||||||
<include refid="selectPartnerInfoVo"/>
|
<include refid="selectPartnerInfoVo"/>
|
||||||
where id = #{id}
|
where t1.id = #{id}
|
||||||
|
</select>
|
||||||
|
<select id="selectPartnerInfoByCode" parameterType="Long" resultMap="PartnerInfoResult">
|
||||||
|
<include refid="selectPartnerInfoVo"/>
|
||||||
|
where t1.partner_code in <foreach collection="list" item="item" separator="," open="(" close=")">#{item}</foreach>
|
||||||
</select>
|
</select>
|
||||||
<select id="selectCountByCode" resultType="java.lang.Integer">
|
<select id="selectCountByCode" resultType="java.lang.Integer">
|
||||||
select count(1) from partner_info where partner_code = #{partnerCode} and status=0
|
select count(1) from partner_info where partner_code = #{partnerCode} and status=0
|
||||||
|
|
@ -45,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</select>
|
</select>
|
||||||
<select id="listByOrderCode" resultType="com.ruoyi.sip.domain.PartnerInfo">
|
<select id="listByOrderCode" resultType="com.ruoyi.sip.domain.PartnerInfo">
|
||||||
<include refid="selectPartnerInfoVo"/>
|
<include refid="selectPartnerInfoVo"/>
|
||||||
where partner_code IN (
|
where t1.partner_code IN (
|
||||||
SELECT
|
SELECT
|
||||||
t2.partner_code
|
t2.partner_code
|
||||||
FROM
|
FROM
|
||||||
|
|
@ -67,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="city != null">city,</if>
|
<if test="city != null">city,</if>
|
||||||
<if test="address != null">address,</if>
|
<if test="address != null">address,</if>
|
||||||
<if test="contactPerson != null">contact_person,</if>
|
<if test="contactPerson != null">contact_person,</if>
|
||||||
|
<if test="systemUserId != null and systemUserId!=''">system_user_id,</if>
|
||||||
<if test="contactPhone != null">contact_phone,</if>
|
<if test="contactPhone != null">contact_phone,</if>
|
||||||
<if test="contactEmail != null">contact_email,</if>
|
<if test="contactEmail != null">contact_email,</if>
|
||||||
<if test="level != null">level,</if>
|
<if test="level != null">level,</if>
|
||||||
|
|
@ -83,6 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="city != null">#{city},</if>
|
<if test="city != null">#{city},</if>
|
||||||
<if test="address != null">#{address},</if>
|
<if test="address != null">#{address},</if>
|
||||||
<if test="contactPerson != null">#{contactPerson},</if>
|
<if test="contactPerson != null">#{contactPerson},</if>
|
||||||
|
<if test="systemUserId != null and systemUserId!=''">#{systemUserId},</if>
|
||||||
<if test="contactPhone != null">#{contactPhone},</if>
|
<if test="contactPhone != null">#{contactPhone},</if>
|
||||||
<if test="contactEmail != null">#{contactEmail},</if>
|
<if test="contactEmail != null">#{contactEmail},</if>
|
||||||
<if test="level != null">#{level},</if>
|
<if test="level != null">#{level},</if>
|
||||||
|
|
@ -101,6 +109,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="partnerName != null and partnerName != ''">partner_name = #{partnerName},</if>
|
<if test="partnerName != null and partnerName != ''">partner_name = #{partnerName},</if>
|
||||||
<if test="province != null">province = #{province},</if>
|
<if test="province != null">province = #{province},</if>
|
||||||
<if test="city != null">city = #{city},</if>
|
<if test="city != null">city = #{city},</if>
|
||||||
|
<if test="systemUserId != null and systemUserId!=''">system_user_id=#{systemUserId},</if>
|
||||||
<if test="address != null">address = #{address},</if>
|
<if test="address != null">address = #{address},</if>
|
||||||
<if test="contactEmail != null">contact_email=#{contactEmail},</if>
|
<if test="contactEmail != null">contact_email=#{contactEmail},</if>
|
||||||
<if test="contactPerson != null">contact_person = #{contactPerson},</if>
|
<if test="contactPerson != null">contact_person = #{contactPerson},</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue