feat(stock): 新增备货管理功能并优化订单导出
- 新增备货信息表(OmsStockInfo)及相关CRUD功能 - 实现库存执行页面权限控制 - 优化订单导出逻辑, 增加税率字段显示 - 移除前端调试代码及冗余排序功能 - 调整订单状态审批逻辑, 增加部门权限判断 - 完善订单列表页时间筛选与排序功能 -修复出库数量校验逻辑问题dev_1.0.0
parent
25951a668f
commit
f92d540d2b
|
|
@ -706,7 +706,7 @@ function initWarehouseTable(data) {
|
|||
$.modal.msgError("本次提交出库数量应大于0")
|
||||
return;
|
||||
}
|
||||
debugger
|
||||
|
||||
let generateNumber = $('#out-generatedQuantity').text();
|
||||
let allTotal = totalConfirmQuantity + Number(generateNumber)
|
||||
if (allTotal > Number($('#out-quantity').text())) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,364 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('订单管理列表')"/>
|
||||
|
||||
</head>
|
||||
<style>
|
||||
.select-list li p, .select-list li label:not(.radio-box) {
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
.bootstrap-table table {
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
.sortBox {
|
||||
display: flex;
|
||||
float: right;
|
||||
flex-direction: column;
|
||||
gap: 0;
|
||||
height: 20px;
|
||||
justify-content: center;
|
||||
margin-right: 30px;
|
||||
}
|
||||
|
||||
.sortBox div {
|
||||
font-size: 10px;
|
||||
transform: scale(1.2, 1);
|
||||
cursor: pointer;
|
||||
color: #bbb;
|
||||
}
|
||||
|
||||
.sortBox .timeAction {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.timeSearch {
|
||||
display: flex;
|
||||
gap: 20px;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<!-- <div th:replace="layout/product-list::product()"></div>-->
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div id="content"></div>
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>项目编号:</label>
|
||||
<input type="text" name="projectCode" placeholder="项目编号"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>项目名称:</label>
|
||||
<input type="text" name="projectName" placeholder="项目名称"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>合同编号:</label>
|
||||
<input type="text" name="orderCode" placeholder="合同编号"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>最终客户:</label>
|
||||
<input type="text" name="customerName" placeholder="最终客户"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label>订单状态:</label>
|
||||
<select name="orderStatus" class="form-control"
|
||||
th:with="type=${@dict.getType('order_status')}">
|
||||
<option value="">请选择</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
||||
th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label>代表处:</label>
|
||||
<input type="text" name="agentName" placeholder="代表处"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>汇智负责人:</label>
|
||||
<input type="text" name="dutyName" placeholder="项目负责人"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>进货商:</label>
|
||||
<input type="text" name="partnerName" placeholder="进货商"/>
|
||||
|
||||
</li>
|
||||
<li class="timeSearch">
|
||||
<!-- <div>-->
|
||||
<!-- <label>时间选择:</label>-->
|
||||
<!-- <select name="timeType" onchange="changeTimeType()" value="0">-->
|
||||
<!-- <option value="0">到货时间</option>-->
|
||||
<!-- <option value="1">下单时间</option>-->
|
||||
<!-- <option value="2">执行单截止时间</option>-->
|
||||
<!-- </select>-->
|
||||
<!-- </div>-->
|
||||
<label>到货时间 :</label>
|
||||
<div class="timeSearch">
|
||||
<input name="deliveryTimeStart" type="text" class="input-sm form-control"
|
||||
id="laydate-startTime"
|
||||
placeholder="yyyy-MM-dd"/>
|
||||
<span>到</span>
|
||||
<input name="deliveryTimeEnd" type="text" class="input-sm form-control"
|
||||
id="laydate-endTime"
|
||||
placeholder="yyyy-MM-dd"/>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
|
||||
class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
|
||||
class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
<input type="hidden" name="orderByColumn"/>
|
||||
<input type="hidden" name="isAsc"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.addFull()" shiro:hasPermission="project:order:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()"
|
||||
shiro:hasPermission="project:order:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="project:order:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer"/>
|
||||
<th:block th:include="include :: bootstrap-table-fixed-columns-js"/>
|
||||
<th:block th:include="include :: jquery-cxselect-js"/>
|
||||
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('project:order:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('project:order:remove')}]];
|
||||
var prefix = ctx + "stock";
|
||||
|
||||
function initSrot() {
|
||||
let sort3 = $(`<div class="sortBox"><div class="sortBtn" onclick="changeSort(this, 0)" sort="asc">▲</div><div class="sortBtn" onclick="changeSort(this, 0)" sort="desc">▼</div></div>`)
|
||||
$('thead .time3 .th-inner').append(sort3)
|
||||
let sort4 = $(`<div class="sortBox"><div class="sortBtn" onclick="changeSort(this, 1)" sort="asc">▲</div><div onclick="changeSort(this, 1)" class="sortBtn" sort="desc">▼</div></div>`)
|
||||
$('thead .time4 .th-inner').append(sort4)
|
||||
let sort5 = $(`<div class="sortBox"><div class="sortBtn" onclick="changeSort(this, 2)" sort="asc">▲</div><div onclick="changeSort(this, 2)" class="sortBtn" sort="desc">▼</div></div>`)
|
||||
$('thead .time5 .th-inner').append(sort5)
|
||||
bindSort([sort3, sort4, sort5])
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function updateStatus(id) {
|
||||
$.ajax({
|
||||
url: prefix + "/update",
|
||||
type: "post",
|
||||
data: {
|
||||
id: id,
|
||||
stockStatus: "1"
|
||||
},
|
||||
success: function (result) {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
$.modal.msgSuccess("操作成功");
|
||||
$.table.refresh();
|
||||
} else {
|
||||
$.modal.msgError(result.msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function changeTimeType() {
|
||||
let timeType = $("[name='timeType']").val()
|
||||
if (timeType == 0) {
|
||||
$('#laydate-startTime').attr('name', 'deliveryTimeStart')
|
||||
$('#laydate-endTime').attr('name', 'deliveryTimeEnd')
|
||||
} else if (timeType == 1) {
|
||||
$('#laydate-startTime').attr('name', 'estimatedOrderTimeStart')
|
||||
$('#laydate-endTime').attr('name', 'estimatedOrderTimeEnd')
|
||||
} else if (timeType == 2) {
|
||||
$('#laydate-startTime').attr('name', 'orderEndTimeStart')
|
||||
$('#laydate-endTime').attr('name', 'orderEndTimeEnd')
|
||||
}
|
||||
}
|
||||
|
||||
function bindSort(list) {
|
||||
list.forEach((ele, index) => {
|
||||
$(ele).find('.sortBtn').on('click', function () {
|
||||
changeSort(this, index)
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
function changeSort(ele, index) {
|
||||
let arr = ['t2.deliveryTime', 't1.createTime', 'orderEndTime']
|
||||
$('.sortBox').find('.timeAction').removeClass('timeAction')
|
||||
$(ele).addClass('timeAction')
|
||||
$('input[name="orderByColumn"]').val(arr[index])
|
||||
$('input[name="isAsc"]').val($(ele).attr('sort'))
|
||||
$.table.search()
|
||||
}
|
||||
|
||||
function viewDetail(id) {
|
||||
$.modal.openFull("订单详情", ctx + "project/order/view/" + id)
|
||||
}
|
||||
|
||||
function viewApproveLog(id) {
|
||||
$.modal.open("订单详情", ctx + "project/order/approveLog/" + id)
|
||||
}
|
||||
|
||||
function viewProjectDetail(id) {
|
||||
$.modal.openFull("项目详情", ctx + "sip/project/view/" + id)
|
||||
}
|
||||
|
||||
$(function () {
|
||||
// $('#content').load(ctx + 'project/order/add');
|
||||
var urlChina = '/cnarea/select';
|
||||
$.cxSelect.defaults.url = urlChina;
|
||||
// $.cxSelect.defaults.jsonSpace = 'data';
|
||||
$('#element1').cxSelect({
|
||||
selects: ['province', 'city'],
|
||||
nodata: 'none'
|
||||
|
||||
});
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "订单管理",
|
||||
fixedColumns: true,
|
||||
fixedRightNumber: 1,
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'id',
|
||||
title: '',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'projectCode',
|
||||
title: '项目编号',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
field: 'projectName',
|
||||
title: '项目名称',
|
||||
width: 300,
|
||||
formatter: function (value, row, index) {
|
||||
return '<a href="javascript:viewProjectDetail(' + row.projectId + ')">' + value + '</a>';
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'orderCode',
|
||||
title: '合同编号',
|
||||
width: 200,
|
||||
formatter: function (value, row, index) {
|
||||
return '<a href="javascript:viewDetail(' + row.orderId + ')">' + value + '</a>';
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'stockStatus',
|
||||
title: '备货状态',
|
||||
width: 200,
|
||||
formatter: function (value, row, index) {
|
||||
return value === '0' ? '未备货' : '已备货'
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'allQuantity',
|
||||
title: '数量',
|
||||
width: 100
|
||||
},
|
||||
|
||||
{
|
||||
field: 'deliveryTime',
|
||||
title: '到货时间',
|
||||
class: 'time3',
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '审批时间',
|
||||
class: 'time4',
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
width: 200,
|
||||
formatter: function (value, row, index) {
|
||||
var actions = [];
|
||||
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="updateStatus(\'' + row.id + '\')"><i class="fa fa-edit"></i>开始备货</a> ');
|
||||
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="viewDetail(\'' + row.id + '\')"><i class="fa fa-edit"></i>详情</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
initSrot()
|
||||
layui.use('laydate', function () {
|
||||
var laydate = layui.laydate;
|
||||
var startDate = laydate.render({
|
||||
elem: '#laydate-startTime',
|
||||
max: $('#laydate-endTime').val(),
|
||||
theme: 'molv',
|
||||
trigger: 'click',
|
||||
done: function (value, date) {
|
||||
// 结束时间大于开始时间
|
||||
if (value !== '') {
|
||||
endDate.config.min.year = date.year;
|
||||
endDate.config.min.month = date.month - 1;
|
||||
endDate.config.min.date = date.date;
|
||||
} else {
|
||||
endDate.config.min.year = '';
|
||||
endDate.config.min.month = '';
|
||||
endDate.config.min.date = '';
|
||||
}
|
||||
}
|
||||
});
|
||||
var endDate = laydate.render({
|
||||
elem: '#laydate-endTime',
|
||||
min: $('#laydate-startTime').val(),
|
||||
theme: 'molv',
|
||||
trigger: 'click',
|
||||
done: function (value, date) {
|
||||
// 开始时间小于结束时间
|
||||
if (value !== '') {
|
||||
startDate.config.max.year = date.year;
|
||||
startDate.config.max.month = date.month - 1;
|
||||
startDate.config.max.date = date.date;
|
||||
} else {
|
||||
startDate.config.max.year = '';
|
||||
startDate.config.max.month = '';
|
||||
startDate.config.max.date = '';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -146,8 +146,6 @@
|
|||
</li>
|
||||
|
||||
</ul>
|
||||
<input type="hidden" name="orderByColumn"/>
|
||||
<input type="hidden" name="isAsc"/>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
|
@ -191,6 +189,7 @@
|
|||
modalName: "项目管理",
|
||||
fixedColumns: true,
|
||||
fixedRightNumber:1,
|
||||
sortable: true,
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
|
|
@ -289,6 +288,7 @@
|
|||
{
|
||||
field: 'estimatedAmount',
|
||||
title: '预计金额(元)',
|
||||
sortable: true,
|
||||
width: 140,
|
||||
formatter: function (value, row, index) {
|
||||
return value?formatAmountNumber(value):'';
|
||||
|
|
@ -298,12 +298,14 @@
|
|||
field: 'estimatedOrderTime',
|
||||
title: '预计下单时间',
|
||||
class: 'time1',
|
||||
sortable: true,
|
||||
width: 140
|
||||
},
|
||||
{
|
||||
field: 'lastWorkUpdateTime',
|
||||
title: '更新时间',
|
||||
class: 'time3',
|
||||
sortable: true,
|
||||
width: 160,
|
||||
formatter: function (value, row, index) {
|
||||
return value;
|
||||
|
|
@ -327,7 +329,6 @@
|
|||
}
|
||||
};
|
||||
$.table.init(options);
|
||||
initSrot()
|
||||
changeTimeType()
|
||||
layui.use('laydate', function () {
|
||||
var laydate = layui.laydate;
|
||||
|
|
@ -382,29 +383,8 @@
|
|||
$('span.highlight').parent().parent().addClass('highlightRow')
|
||||
}
|
||||
|
||||
function initSrot() {
|
||||
let sort1 = $(`<div class="sortBox"><div class="sortBtn timeAction" onclick="changeSort(this,0)" sort="asc">▲</div><div class="sortBtn" onclick="changeSort(this,0)" sort="desc">▼</div></div>`)
|
||||
$('thead .time1 .th-inner').append(sort1)
|
||||
let sort2 = $(`<div class="sortBox"><div class="sortBtn" onclick="changeSort(this,1)" sort="asc">▲</div><div onclick="changeSort(this,1)" class="sortBtn" sort="desc">▼</div></div>`)
|
||||
$('thead .time2 .th-inner').append(sort2)
|
||||
let sort3 = $(`<div class="sortBox"><div class="sortBtn" onclick="changeSort(this,2)" sort="asc">▲</div><div onclick="changeSort(this,2)" class="sortBtn" sort="desc">▼</div></div>`)
|
||||
$('thead .time3 .th-inner').append(sort3)
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function changeSort(ele, index) {
|
||||
|
||||
let arr = ['estimated_orderTime', 'estimated_deliverTime', 'last_work_update_time']
|
||||
$('.sortBox').find('.timeAction').removeClass('timeAction')
|
||||
$(ele).addClass('timeAction')
|
||||
$('input[name="orderByColumn"]').val(arr[index])
|
||||
$('input[name="isAsc"]').val($(ele).attr('sort'))
|
||||
$.table.search()
|
||||
}
|
||||
|
||||
function changeTimeType() {
|
||||
let timeType = $("[name='timeType']").val()
|
||||
if (timeType == 0) {
|
||||
|
|
|
|||
|
|
@ -552,8 +552,9 @@
|
|||
<h2 class="padding-top-20">[[${log.approveOpinion}]]</h2>
|
||||
|
||||
<!-- <p>审批意见:[[${log.approveOpinion}]]</p>-->
|
||||
<p > 接收人:[[${log.taskName == '公司领导'?log.applyUserName:
|
||||
log.nextAllApproveUserName} ]]</p>
|
||||
<!-- log.taskName == '公司领导'?log.applyUserName:
|
||||
-->
|
||||
<p > 接收人:[[${ log.nextAllApproveUserName} ]]</p>
|
||||
<span class="vertical-date">
|
||||
<p> <small>[[${#dates.format(log.approveTime,'yyyy-MM-dd HH:mm:ss')}]]</small> <span
|
||||
style="margin-left: 20px">审批状态 : [ [[${log.approveStatus==3?'批准':log.approveStatus==2?'驳回':'提交审批'}]] ]</span></p>
|
||||
|
|
@ -848,6 +849,8 @@
|
|||
}
|
||||
|
||||
$(function () {
|
||||
|
||||
|
||||
let shipmentAmount = [[${projectOrderInfo.shipmentAmount}]] || 0
|
||||
|
||||
if (shipmentAmount) {
|
||||
|
|
|
|||
|
|
@ -110,8 +110,6 @@
|
|||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
<input type="hidden" name="orderByColumn"/>
|
||||
<input type="hidden" name="isAsc"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
@ -141,17 +139,7 @@
|
|||
var editFlag = [[${@permission.hasPermi('project:order:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('project:order:remove')}]];
|
||||
var prefix = ctx + "project/order";
|
||||
function initSrot() {
|
||||
let sort3 = $(`<div class="sortBox"><div class="sortBtn" onclick="changeSort(this, 0)" sort="asc">▲</div><div class="sortBtn" onclick="changeSort(this, 0)" sort="desc">▼</div></div>`)
|
||||
$('thead .time3 .th-inner').append(sort3)
|
||||
let sort4 = $(`<div class="sortBox"><div class="sortBtn" onclick="changeSort(this, 1)" sort="asc">▲</div><div onclick="changeSort(this, 1)" class="sortBtn" sort="desc">▼</div></div>`)
|
||||
$('thead .time4 .th-inner').append(sort4)
|
||||
let sort5 = $(`<div class="sortBox"><div class="sortBtn" onclick="changeSort(this, 2)" sort="asc">▲</div><div onclick="changeSort(this, 2)" class="sortBtn" sort="desc">▼</div></div>`)
|
||||
$('thead .time5 .th-inner').append(sort5)
|
||||
bindSort([ sort3, sort4, sort5])
|
||||
|
||||
|
||||
}
|
||||
function changeTimeType() {
|
||||
let timeType = $("[name='timeType']").val()
|
||||
if (timeType == 0) {
|
||||
|
|
@ -165,22 +153,6 @@
|
|||
$('#laydate-endTime').attr('name', 'orderEndTimeEnd')
|
||||
}
|
||||
}
|
||||
function bindSort(list) {
|
||||
list.forEach((ele, index) => {
|
||||
$(ele).find('.sortBtn').on('click', function () {
|
||||
changeSort(this, index)
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
function changeSort(ele, index) {
|
||||
let arr = ['deliveryTime','t2.estimatedOrderTime','orderEndTime']
|
||||
$('.sortBox').find('.timeAction').removeClass('timeAction')
|
||||
$(ele).addClass('timeAction')
|
||||
$('input[name="orderByColumn"]').val(arr[index])
|
||||
$('input[name="isAsc"]').val($(ele).attr('sort'))
|
||||
$.table.search()
|
||||
}
|
||||
function viewDetail(id){
|
||||
$.modal.openFull("订单详情", ctx + "project/order/view/"+id)
|
||||
}
|
||||
|
|
@ -209,6 +181,7 @@
|
|||
exportUrl: prefix + "/export",
|
||||
modalName: "订单管理",
|
||||
fixedColumns:true,
|
||||
sortable: true,
|
||||
fixedRightNumber:1,
|
||||
columns: [{
|
||||
checkbox: true
|
||||
|
|
@ -247,6 +220,7 @@
|
|||
{
|
||||
field: 'shipmentAmount',
|
||||
title: '金额(¥)',
|
||||
sortable: true,
|
||||
width:100,
|
||||
formatter: function (value, row, index) {
|
||||
return value?formatAmountNumber(value):'';
|
||||
|
|
@ -283,18 +257,21 @@
|
|||
{
|
||||
field: 'deliveryTime',
|
||||
title: '到货时间',
|
||||
sortable: true,
|
||||
class: 'time3',
|
||||
width:200
|
||||
},
|
||||
{
|
||||
field: 'estimatedOrderTime',
|
||||
title: '下单时间',
|
||||
sortable: true,
|
||||
class: 'time4',
|
||||
width:200
|
||||
},
|
||||
{
|
||||
field: 'orderEndTime',
|
||||
title: '执行单截止时间',
|
||||
sortable: true,
|
||||
class: 'time5',
|
||||
width:200
|
||||
},
|
||||
|
|
@ -317,7 +294,6 @@
|
|||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
initSrot()
|
||||
layui.use('laydate', function () {
|
||||
var laydate = layui.laydate;
|
||||
var startDate = laydate.render({
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ public class InventoryExecutionController extends BaseController {
|
|||
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
@RequiresPermissions("inventory:execution:view")
|
||||
public TableDataInfo list(ProjectOrderInfo projectOrderInfo) {
|
||||
|
||||
projectOrderInfo.setOrderStatus(ProjectOrderInfo.OrderStatus.APPROVE_COMPLETE.getCode());
|
||||
|
|
|
|||
|
|
@ -0,0 +1,82 @@
|
|||
package com.ruoyi.sip.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.sip.domain.OmsStockInfo;
|
||||
import com.ruoyi.sip.service.IOmsStockInfoService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Author ch
|
||||
* @Desc 备货信息(OmsStockInfo)表控制层
|
||||
* @Date 2025-10-16 09:43:37
|
||||
*/
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/stock")
|
||||
public class OmsStockInfoController extends BaseController {
|
||||
private String prefix = "inventory/stock";
|
||||
@Autowired
|
||||
private IOmsStockInfoService omsStockInfoService;
|
||||
|
||||
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(OmsStockInfo omsStockInfo) {
|
||||
startPage();
|
||||
List<OmsStockInfo> list = omsStockInfoService.queryAll(omsStockInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
@RequiresPermissions("stock:index:view")
|
||||
@GetMapping()
|
||||
public String stock()
|
||||
{
|
||||
return prefix + "/index";
|
||||
}
|
||||
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Integer id) {
|
||||
return AjaxResult.success(omsStockInfoService.queryById(id));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PostMapping("/insert")
|
||||
public AjaxResult add(@RequestBody OmsStockInfo omsStockInfo) {
|
||||
return toAjax(omsStockInfoService.insert(omsStockInfo));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PostMapping("/update")
|
||||
@Log(title = "备货管理", businessType = BusinessType.UPDATE)
|
||||
@ResponseBody
|
||||
public AjaxResult edit(OmsStockInfo omsStockInfo) {
|
||||
return toAjax(omsStockInfoService.update(omsStockInfo));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Log(title = "备货管理", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(omsStockInfoService.batchRemove(ids.split(",")));
|
||||
}
|
||||
public AjaxResult remove(@PathVariable("id") Integer id) {
|
||||
return toAjax(omsStockInfoService.deleteById(id));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
package com.ruoyi.sip.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 备货信息(OmsStockInfo)实体类
|
||||
*
|
||||
* @author ch
|
||||
* @since 2025-10-16 09:43:37
|
||||
*/
|
||||
@Data
|
||||
public class OmsStockInfo {
|
||||
|
||||
private Integer id;
|
||||
/**
|
||||
* 订单编码
|
||||
*/
|
||||
private String orderCode;
|
||||
/**
|
||||
* 备货状态 0:未备货 1:已备货
|
||||
*/
|
||||
private String stockStatus;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
private Long allQuantity;
|
||||
private Date deliveryTime;
|
||||
private Date deliveryTimeStart;
|
||||
private Date deliveryTimeEnd;
|
||||
private String projectName;
|
||||
private String projectCode;
|
||||
private Long projectId;
|
||||
private Long orderId;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -12,4 +12,5 @@ import java.math.BigDecimal;
|
|||
public class OrderExcelNumStaticsDto {
|
||||
private BigDecimal allPrice;
|
||||
private Long quantity;
|
||||
private String taxRate;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -153,8 +153,8 @@ public class TodoServiceImpl implements TodoService {
|
|||
}, (v1, v2) -> v1));
|
||||
for (int i = 0; i < todoCompletedList.size(); i++) {
|
||||
Todo todoDto = todoCompletedList.get(i);
|
||||
String nextApproveUserName=i==0?
|
||||
todoList.stream().map(Todo::getApproveUserName).collect(Collectors.joining("、")) : todoCompletedList.get(i-1).getAllApproveUserName();
|
||||
String todoListApproveName = CollUtil.isEmpty(todoList) ? todoDto.getApplyUserName() : todoList.stream().map(Todo::getApproveUserName).collect(Collectors.joining("、"));
|
||||
String nextApproveUserName = i == 0 ? todoListApproveName : todoCompletedList.get(i - 1).getAllApproveUserName();
|
||||
todoDto.setNextAllApproveUserName(nextApproveUserName);
|
||||
todoDto.setRoleName(userRoleMap.get(Long.parseLong(todoDto.getApproveUser())));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,49 @@
|
|||
package com.ruoyi.sip.mapper;
|
||||
|
||||
import com.ruoyi.sip.domain.OmsStockInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author ch
|
||||
* @Desc 备货信息(OmsStockInfo)表数据库访问层
|
||||
* @Date 2025-10-16 09:43:37
|
||||
*/
|
||||
public interface OmsStockInfoMapper {
|
||||
|
||||
/**
|
||||
* 通过实体作为筛选条件查询
|
||||
*
|
||||
* @param omsStockInfo 实例对象
|
||||
* @return 对象列表
|
||||
*/
|
||||
List<OmsStockInfo> queryAll(OmsStockInfo omsStockInfo);
|
||||
|
||||
/**
|
||||
* 根据ID查详情
|
||||
*/
|
||||
OmsStockInfo queryById(Integer id);
|
||||
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*/
|
||||
int insert(OmsStockInfo omsStockInfo);
|
||||
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*/
|
||||
int update(OmsStockInfo omsStockInfo);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*/
|
||||
int deleteById(Integer id);
|
||||
|
||||
/**
|
||||
* 通过id批量删除备货信息
|
||||
*/
|
||||
int batchRemove(String[] ids);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
package com.ruoyi.sip.service;
|
||||
|
||||
import com.ruoyi.sip.domain.OmsStockInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author ch
|
||||
* @Desc 备货信息(OmsStockInfo)表服务接口
|
||||
* @Date 2025-10-16 09:43:37
|
||||
*/
|
||||
public interface IOmsStockInfoService {
|
||||
|
||||
/**
|
||||
* 通过实体作为筛选条件查询
|
||||
*/
|
||||
List<OmsStockInfo> queryAll(OmsStockInfo omsStockInfo);
|
||||
|
||||
|
||||
/**
|
||||
* 根据ID查详情
|
||||
*/
|
||||
OmsStockInfo queryById(Integer id);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*/
|
||||
int insert(OmsStockInfo omsStockInfo);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*/
|
||||
int update(OmsStockInfo omsStockInfo);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*/
|
||||
int deleteById(Integer id);
|
||||
|
||||
/**
|
||||
* 通过id批量删除备货信息
|
||||
*/
|
||||
int batchRemove(String[] ids);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -2,6 +2,7 @@ package com.ruoyi.sip.service.impl;
|
|||
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
|
|
@ -54,8 +55,11 @@ public class InventoryAuthServiceImpl implements IInventoryAuthService {
|
|||
@Override
|
||||
public boolean authAll() {
|
||||
SysUser sysUser = ShiroUtils.getSysUser();
|
||||
Set<Long> roleSet = Arrays.stream(allAuthRole.split(",")).filter(StringUtils::isNotEmpty).map(Long::parseLong).collect(Collectors.toSet());
|
||||
return sysUser.isAdmin() || sysUser.getRoles().stream().anyMatch(role -> roleSet.contains(role.getRoleId()));
|
||||
SysDept dept = sysUser.getDept();
|
||||
if (dept == null) {
|
||||
return false;
|
||||
}
|
||||
return sysUser.isAdmin() || dept.getAncestors().contains("0,100,") || sysUser.getDeptId() == 100;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,69 @@
|
|||
package com.ruoyi.sip.service.impl;
|
||||
|
||||
import com.ruoyi.sip.domain.OmsStockInfo;
|
||||
import com.ruoyi.sip.mapper.OmsStockInfoMapper;
|
||||
import com.ruoyi.sip.service.IOmsStockInfoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author ch
|
||||
* @Desc 备货信息(OmsStockInfo)表服务实现类
|
||||
* @Date 2025-10-16 09:43:37
|
||||
*/
|
||||
|
||||
@Service
|
||||
public class OmsStockInfoServiceImpl implements IOmsStockInfoService {
|
||||
|
||||
@Resource
|
||||
private OmsStockInfoMapper omsStockInfoMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
* @param omsStockInfo 实例对象
|
||||
* @return 对象列表
|
||||
*/
|
||||
@Override
|
||||
public List<OmsStockInfo> queryAll(OmsStockInfo omsStockInfo) {
|
||||
List<OmsStockInfo> dataList = omsStockInfoMapper.queryAll(omsStockInfo);
|
||||
return dataList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OmsStockInfo queryById(Integer id) {
|
||||
return omsStockInfoMapper.queryById(id);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int insert(OmsStockInfo omsStockInfo) {
|
||||
return omsStockInfoMapper.insert(omsStockInfo);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int update(OmsStockInfo omsStockInfo) {
|
||||
return omsStockInfoMapper.update(omsStockInfo);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int deleteById(Integer id) {
|
||||
return omsStockInfoMapper.deleteById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id批量删除备货信息
|
||||
*/
|
||||
@Override
|
||||
public int batchRemove(String[] ids) {
|
||||
return omsStockInfoMapper.batchRemove(ids);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -41,6 +41,7 @@ import com.ruoyi.sip.dto.HomepageQueryDto;
|
|||
import com.ruoyi.sip.dto.OrderExcelNumStaticsDto;
|
||||
import com.ruoyi.sip.dto.StatisticsDetailDto;
|
||||
import com.ruoyi.sip.flowable.service.IBuApproveConfigService;
|
||||
import com.ruoyi.sip.mapper.OmsStockInfoMapper;
|
||||
import com.ruoyi.sip.mapper.ProjectInfoMapper;
|
||||
import com.ruoyi.sip.service.*;
|
||||
import com.ruoyi.sip.flowable.service.DeleteFlowableProcessInstanceCmd;
|
||||
|
|
@ -119,7 +120,7 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
|||
private static final List<String> CSS_EMAIL_LIST = Arrays.asList("wangxiaojun@pcitech.com", "huiwang@pcitech.com", "zhaoqian1@pcitech.com", "pci-ict@pcitech.com");
|
||||
|
||||
@Autowired
|
||||
private IBuApproveConfigService approveConfigService;
|
||||
private OmsStockInfoMapper omsStockInfoMapper;
|
||||
@Autowired
|
||||
private IProjectTaxRateTempService projectTaxRateTempService;
|
||||
@Value("${unis.order.endHour:96}")
|
||||
|
|
@ -779,10 +780,13 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
|||
// headerList.add(Collections.singletonList("订单状态"));
|
||||
headerList.add(Collections.singletonList("WS瘦授权软件数量-3130A6LC"));
|
||||
headerList.add(Collections.singletonList("WS瘦授权软件金额"));
|
||||
headerList.add(Collections.singletonList("WS瘦授权软件税率"));
|
||||
headerList.add(Collections.singletonList("WS胖授权软件数量-3130A6LE"));
|
||||
headerList.add(Collections.singletonList("WS胖授权软件金额"));
|
||||
headerList.add(Collections.singletonList("WS胖授权软件税率"));
|
||||
headerList.add(Collections.singletonList("LS软件数量-3130A6LD"));
|
||||
headerList.add(Collections.singletonList("LS软件金额"));
|
||||
headerList.add(Collections.singletonList("LS软件税率"));
|
||||
addHeadList(maxOne, headerList, "ONEstor");
|
||||
addHeadList(maxNvidia, headerList, "nVIDIA");
|
||||
// headerList.add(Collections.singletonList("ONEstor数量"));
|
||||
|
|
@ -829,6 +833,7 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
|||
headerList.add(Collections.singletonList(prefix + "型号" + i));
|
||||
headerList.add(Collections.singletonList(prefix + "数量" + i));
|
||||
headerList.add(Collections.singletonList(prefix + "金额" + i));
|
||||
headerList.add(Collections.singletonList(prefix + "税率" + i));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -850,11 +855,11 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
|||
BigDecimal totalPrice = BigDecimal.ZERO;
|
||||
BigDecimal maintenancePrice = BigDecimal.ZERO;
|
||||
|
||||
OrderExcelNumStaticsDto wssDto = new OrderExcelNumStaticsDto(BigDecimal.ZERO, 0L);
|
||||
OrderExcelNumStaticsDto wspDto = new OrderExcelNumStaticsDto(BigDecimal.ZERO, 0L);
|
||||
OrderExcelNumStaticsDto lsDto = new OrderExcelNumStaticsDto(BigDecimal.ZERO, 0L);
|
||||
OrderExcelNumStaticsDto oneStorDto = new OrderExcelNumStaticsDto(BigDecimal.ZERO, 0L);
|
||||
OrderExcelNumStaticsDto nVIDIADto = new OrderExcelNumStaticsDto(BigDecimal.ZERO, 0L);
|
||||
OrderExcelNumStaticsDto wssDto = new OrderExcelNumStaticsDto(BigDecimal.ZERO, 0L,"");
|
||||
OrderExcelNumStaticsDto wspDto = new OrderExcelNumStaticsDto(BigDecimal.ZERO, 0L,"");
|
||||
OrderExcelNumStaticsDto lsDto = new OrderExcelNumStaticsDto(BigDecimal.ZERO, 0L,"");
|
||||
OrderExcelNumStaticsDto oneStorDto = new OrderExcelNumStaticsDto(BigDecimal.ZERO, 0L,"");
|
||||
OrderExcelNumStaticsDto nVIDIADto = new OrderExcelNumStaticsDto(BigDecimal.ZERO, 0L,"");
|
||||
List<ProjectProductInfo> maintenanceList = new ArrayList<>();
|
||||
List<ProjectProductInfo> deployList = new ArrayList<>();
|
||||
List<ProjectProductInfo> oneList = new ArrayList<>();
|
||||
|
|
@ -919,10 +924,13 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
|||
int insertIndex=18;
|
||||
row.add(insertIndex++, wssDto.getQuantity().toString());
|
||||
row.add(insertIndex++, wssDto.getAllPrice().toString());
|
||||
row.add(insertIndex++, wssDto.getTaxRate());
|
||||
row.add(insertIndex++, wspDto.getQuantity().toString());
|
||||
row.add(insertIndex++, wspDto.getAllPrice().toString());
|
||||
row.add(insertIndex++, wspDto.getTaxRate());
|
||||
row.add(insertIndex++, lsDto.getQuantity().toString());
|
||||
row.add(insertIndex++, lsDto.getAllPrice().toString());
|
||||
row.add(insertIndex++, lsDto.getTaxRate());
|
||||
for (int i = 0; i < maxOne; i++) {
|
||||
ProjectProductInfo projectProductInfo = i < oneList.size() ? oneList.get(i) : null;
|
||||
insertIndex = addProductRowByIndex(projectProductInfo, row, insertIndex);
|
||||
|
|
@ -1010,6 +1018,7 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
|||
Long dtoQuantity = dto.getQuantity() == null ? 0L : dto.getQuantity();
|
||||
dto.setAllPrice(allPrice.add(dtoAllPrice));
|
||||
dto.setQuantity(quantity + dtoQuantity);
|
||||
dto.setTaxRate(info.getTaxRate()==null?"":info.getTaxRate().toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1026,12 +1035,14 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
|||
row.add("");
|
||||
row.add("");
|
||||
row.add("");
|
||||
row.add("");
|
||||
return totalPrice;
|
||||
}
|
||||
row.add(productInfo.getProductBomCode());
|
||||
row.add(productInfo.getModel());
|
||||
row.add(productInfo.getQuantity() == null ? "" : productInfo.getQuantity().toString());
|
||||
row.add(productInfo.getAllPrice() == null ? "" : productInfo.getAllPrice().toString());
|
||||
row.add(productInfo.getTaxRate() == null ? "" : productInfo.getTaxRate().toString());
|
||||
if (productInfo.getAllPrice() != null) {
|
||||
totalPrice = totalPrice.add(productInfo.getAllPrice());
|
||||
}
|
||||
|
|
@ -1044,12 +1055,14 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
|||
row.add(index++, "");
|
||||
row.add(index++, "");
|
||||
row.add(index++, "");
|
||||
row.add(index++, "");
|
||||
return index;
|
||||
}
|
||||
row.add(index++, productInfo.getProductBomCode());
|
||||
row.add(index++, productInfo.getModel());
|
||||
row.add(index++, productInfo.getQuantity() == null ? "" : productInfo.getQuantity().toString());
|
||||
row.add(index++, productInfo.getAllPrice() == null ? "" : productInfo.getAllPrice().toString());
|
||||
row.add(index++, productInfo.getTaxRate() == null ? "" : productInfo.getTaxRate().toString());
|
||||
return index;
|
||||
}
|
||||
|
||||
|
|
@ -1106,26 +1119,50 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
|||
// handleProductManagerApproval(businessKey);
|
||||
} else if (taskName.startsWith("商务")) {
|
||||
handleBusinessApproval(businessKey);
|
||||
} else if ("省代".equals(taskName)) {
|
||||
handlePartnerApproval(businessKey);
|
||||
} else if ("公司领导".equals(taskName)) {
|
||||
|
||||
//黄雪秋处理 流程状态更改
|
||||
if (ShiroUtils.getUserId().equals(118L)) {
|
||||
handleCompanyLeaderApproval(businessKey);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return TodoCommonTemplate.super.todoApproveCallback(todo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean multiInstanceApproveCallback(String activityName,ProcessInstance processInstance) {
|
||||
String flowBusinessKey = processInstance.getBusinessKey();
|
||||
String[] split = flowBusinessKey.split("#");
|
||||
String businessKey = split.length > 1 ? split[1] : split[0];
|
||||
Map<String, Object> processVariables = processInstance.getProcessVariables();
|
||||
Integer approveBtn = (Integer) processVariables.get("approveBtn");
|
||||
if ("公司领导".equals(activityName) && approveBtn == 1) {
|
||||
handleCompanyLeaderApproval(businessKey);
|
||||
}
|
||||
private void handlePartnerApproval(String businessKey) {
|
||||
// ProjectOrderInfo dbProjectOrderInfo = projectOrderInfoMapper.selectProjectOrderInfoByCode(businessKey);
|
||||
addStock(businessKey);
|
||||
|
||||
return TodoCommonTemplate.super.multiInstanceApproveCallback(activityName,processInstance);
|
||||
}
|
||||
|
||||
|
||||
private void addStock(String businessKey) {
|
||||
OmsStockInfo omsStockInfo = new OmsStockInfo();
|
||||
omsStockInfo.setOrderCode(businessKey);
|
||||
omsStockInfoMapper.insert(omsStockInfo);
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public boolean multiInstanceApproveCallback(String activityName,ProcessInstance processInstance) {
|
||||
// String flowBusinessKey = processInstance.getBusinessKey();
|
||||
// String[] split = flowBusinessKey.split("#");
|
||||
// String businessKey = split.length > 1 ? split[1] : split[0];
|
||||
// Map<String, Object> processVariables = processInstance.getProcessVariables();
|
||||
// Integer approveBtn = (Integer) processVariables.get("approveBtn");
|
||||
// if ("公司领导".equals(activityName) && approveBtn == 1) {
|
||||
// handleCompanyLeaderApproval(businessKey);
|
||||
// }
|
||||
//
|
||||
// return TodoCommonTemplate.super.multiInstanceApproveCallback(activityName,processInstance);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 处理订单驳回
|
||||
*/
|
||||
|
|
@ -1136,6 +1173,7 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
|||
|
||||
if ("公司领导".equals(taskName)) {
|
||||
projectOrderInfo.setVersionCode("add");
|
||||
//todo 陈鹏驳回需要单独处理 现有流程为 陈鹏黄雪秋并行审批 但黄雪秋审批完成流程已经下行 陈鹏驳回时如黄雪秋已审批通过时需要特殊处理
|
||||
}
|
||||
handleRejectOrder(businessKey);
|
||||
projectOrderInfoMapper.updateProjectOrderInfoByCode(projectOrderInfo);
|
||||
|
|
@ -1163,7 +1201,9 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
|||
|
||||
private void handleBusinessApproval(String businessKey) {
|
||||
ProjectOrderInfo dbProjectOrderInfo = projectOrderInfoMapper.selectProjectOrderInfoByCode(businessKey);
|
||||
|
||||
if (ProjectOrderInfo.ProcessTypeEnum.OFFLINE.getCode().equals(dbProjectOrderInfo.getProcessType())) {
|
||||
addStock(businessKey);
|
||||
}
|
||||
// 查询代理商邮箱
|
||||
List<String> emailList = new ArrayList<>();
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,150 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.sip.mapper.OmsStockInfoMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.sip.domain.OmsStockInfo" id="OmsStockInfoMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="orderCode" column="order_code"/>
|
||||
<result property="stockStatus" column="stock_status"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 基本字段 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, order_code, stock_status, create_time
|
||||
</sql>
|
||||
|
||||
<!--通过实体作为筛选条件查询-->
|
||||
<select id="queryAll" resultMap="OmsStockInfoMap">
|
||||
SELECT
|
||||
t1.*,
|
||||
t2.project_id,
|
||||
t2.id as order_id,
|
||||
t2.delivery_time,
|
||||
t3.project_name,
|
||||
t3.project_code ,
|
||||
t4.all_quantity
|
||||
FROM
|
||||
oms_stock_info t1
|
||||
LEFT JOIN project_order_info t2 ON t1.order_code = t2.order_code
|
||||
LEFT JOIN project_info t3 ON t2.project_id = t3.id
|
||||
left join ( select sum(quantity) all_quantity,project_id from project_product_info group by project_id) t4 on t2.project_id=t4.project_id
|
||||
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and t1.id = #{id}
|
||||
</if>
|
||||
<if test="orderCode != null and orderCode != ''">
|
||||
and t1.order_code = #{orderCode}
|
||||
</if>
|
||||
<if test="stockStatus != null and stockStatus != ''">
|
||||
and t1.stock_status = #{stockStatus}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
and t1.create_time = #{createTime}
|
||||
</if>
|
||||
|
||||
<if test="orderCode!= null and orderCode!=''">
|
||||
and t2.order_code = #{orderCode}
|
||||
</if>
|
||||
<if test="deliveryTimeStart != null or deliveryTimeEnd != null">
|
||||
<choose>
|
||||
<when test="deliveryTimeStart != null and deliveryTimeEnd != null">
|
||||
and t2.delivery_time between date_format(#{deliveryTimeStart}, '%Y-%m-%d 00:00:00') and
|
||||
date_format(#{deliveryTimeEnd}, '%Y-%m-%d 23:59:59')
|
||||
</when>
|
||||
<when test="deliveryTimeStart != null">
|
||||
and t2.delivery_time <![CDATA[ >= ]]> date_format(#{deliveryTimeStart}, '%Y-%m-%d 00:00:00')
|
||||
</when>
|
||||
<when test="deliveryTimeEnd != null">
|
||||
and t2.delivery_time <![CDATA[ <= ]]> date_format(#{deliveryTimeEnd}, '%Y-%m-%d 23:59:59')
|
||||
</when>
|
||||
|
||||
</choose>
|
||||
</if>
|
||||
<if test="projectCode != null and projectCode!=''">
|
||||
and t3.project_code = #{projectCode}
|
||||
</if>
|
||||
<if test="projectName!= null and projectName!=''">
|
||||
and t3.project_name = #{projectName}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<!--根据ID查详情-->
|
||||
<select id="queryById" parameterType="Integer" resultMap="OmsStockInfoMap">
|
||||
SELECT id,
|
||||
order_code,
|
||||
stock_status,
|
||||
create_time
|
||||
FROM oms_stock_info
|
||||
WHERE id = #{id}
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
||||
INSERT INTO oms_stock_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orderCode != null and orderCode != ''">
|
||||
order_code,
|
||||
</if>
|
||||
<if test="stockStatus != null and stockStatus != ''">
|
||||
stock_status,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderCode != null and orderCode != ''">
|
||||
#{orderCode},
|
||||
</if>
|
||||
<if test="stockStatus != null and stockStatus != ''">
|
||||
#{stockStatus},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<!--通过主键修改数据-->
|
||||
<update id="update">
|
||||
UPDATE oms_stock_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="orderCode != null and orderCode != ''">
|
||||
order_code = #{orderCode},
|
||||
</if>
|
||||
<if test="stockStatus != null and stockStatus != ''">
|
||||
stock_status = #{stockStatus},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime},
|
||||
</if>
|
||||
</trim>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<!--通过主键删除-->
|
||||
<delete id="deleteById">
|
||||
DELETE
|
||||
FROM oms_stock_info
|
||||
WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
<!--通过id批量删除-->
|
||||
<delete id="batchRemove">
|
||||
delete from oms_stock_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue