feat(inventory): 新增执行单功能
- 添加执行单相关页面和功能 - 新增 ExecutionOrderVo 类用于执行单数据传输- 实现 ExecutionTrackServiceImpl 类中的 selectInfo 方法 - 添加生成出库单功能和相关页面 - 移除 GroupInfo 类 - 更新 IInventoryInfoService 接口,移除 listGroup 方法dev_1.0.0
parent
d760e5f09d
commit
b55f406e12
|
|
@ -0,0 +1,729 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('新增项目管理')"/>
|
||||||
|
<th:block th:include="include :: datetimepicker-css"/>
|
||||||
|
</head>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: "微软雅黑", Arial, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
th, td {
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
padding: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.is-required {
|
||||||
|
color: red;
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: middle;
|
||||||
|
font-size: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
background: #f5f5f5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-title {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 30px;
|
||||||
|
padding: 10px 0;
|
||||||
|
color: black;
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline; /* 垂直居中 */
|
||||||
|
font-family: "微软雅黑", Arial, sans-serif; /* 统一字体 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkbox-group label {
|
||||||
|
margin-right: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.add-btn-div {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.add-btn {
|
||||||
|
background: #409eff;
|
||||||
|
color: #fff;
|
||||||
|
border: none;
|
||||||
|
padding: 5px 10px;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkbox-box label {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
gap: 5px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.shortTd {
|
||||||
|
width: 160px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input, textarea, .productTable td {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*[name="bgProperty"], #industryTypeBox select {*/
|
||||||
|
/* pointer-events: none;*/
|
||||||
|
/*}*/
|
||||||
|
|
||||||
|
#projectNameBox {
|
||||||
|
margin-left: 20px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.productTable label[id*="iscount"] {
|
||||||
|
top: -30px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
table tr:nth-child(odd) {
|
||||||
|
background: #f3f3f3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-left{
|
||||||
|
text-align:left !important;
|
||||||
|
}
|
||||||
|
#generateOuter label{
|
||||||
|
padding-right: 0px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form id="form-order-edit" th:object="${projectOrderInfo}">
|
||||||
|
<div class="section-title">
|
||||||
|
<span>订单信息</span>
|
||||||
|
</div>
|
||||||
|
<table>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="shortTd">项目名称<span class="is-required">*</span></td>
|
||||||
|
<td colspan="3"><input type="text" name="projectName"
|
||||||
|
class="form-control" placeholder="选择项目后带入" th:field="*{projectName}"
|
||||||
|
readonly></td>
|
||||||
|
<td>版本号<span class="is-required">*</span></td>
|
||||||
|
<td><input readonly name="versionCode" class="form-control" th:field="*{versionCode}"
|
||||||
|
required type="number" min="0"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="shortTd">项目编号<span class="is-required">*</span></td>
|
||||||
|
<td>
|
||||||
|
<input name="projectId" class="form-control" type="hidden" th:field="*{projectId}">
|
||||||
|
<input name="id" class="form-control" type="hidden" th:field="*{id}">
|
||||||
|
<input name="processType" class="form-control" type="hidden" th:field="*{processType}">
|
||||||
|
<input name="processTemplate" class="form-control" type="hidden" th:field="*{processTemplate}">
|
||||||
|
<input name="orderStatus" class="form-control" type="hidden" th:field="*{orderStatus}">
|
||||||
|
|
||||||
|
<input type="text" name="projectCode" th:field="*{projectCode}" placeholder="请选择"
|
||||||
|
class="form-control"
|
||||||
|
readonly>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td class="shortTd">最终客户<span class="is-required">*</span></td>
|
||||||
|
<td colspan="3"><input name="customerName" class="form-control" th:field="*{customerName}" type="text"
|
||||||
|
readonly
|
||||||
|
placeholder="选择项目后带入"
|
||||||
|
required>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>BG<span class="is-required">*</span></td>
|
||||||
|
<td>
|
||||||
|
<select name="bgProperty" class="form-control" th:field="*{bgProperty}" required
|
||||||
|
th:with="type=${@dict.getType('bg_type')}" onchange="changeBg()" readonly
|
||||||
|
>
|
||||||
|
<option value="">请选择BG</option>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
||||||
|
th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
<td>行业<span class="is-required">*</span></td>
|
||||||
|
<td id="industryTypeBox">
|
||||||
|
<select name="industryType" class="form-control" required
|
||||||
|
>
|
||||||
|
<option value="">请先选择BG</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
<td>代表处<span class="is-required">*</span></td>
|
||||||
|
<td colspan="3">
|
||||||
|
<input name="agentName" class="form-control" th:field="*{agentName}" type="text" readonly required>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>进货商接口人<span class="is-required">*</span></td>
|
||||||
|
<td><input type="text" name="businessPerson" th:field="*{businessPerson}" class="form-control" required>
|
||||||
|
</td>
|
||||||
|
<td>Email</td>
|
||||||
|
<td><input type="text" name="businessEmail" th:field="*{businessEmail}"
|
||||||
|
class="form-control"></td>
|
||||||
|
<td>联系方式<span class="is-required">*</span></td>
|
||||||
|
<td><input name="businessPhone" class="form-control" th:field="*{businessPhone}" type="text" required>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>合同编号<span class="is-required">*</span></td>
|
||||||
|
<td><input type="text" name="orderCode" th:field="*{orderCode}" class="form-control" readonly
|
||||||
|
placeholder="自动生成">
|
||||||
|
</td>
|
||||||
|
<td>执行单有效截止时间</td>
|
||||||
|
<td colspan="3">
|
||||||
|
<input disabled name="orderEndTime" class="form-control" autocomplete="off"
|
||||||
|
th:value="${#dates.format(projectOrderInfo.orderEndTime, 'yyyy-MM-dd')}"
|
||||||
|
placeholder="审批完成后自动计算"
|
||||||
|
>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<!-- <td>实际进货金额<span class="is-required">*</span></td>-->
|
||||||
|
<!-- <td><input type="hidden" id="actualPurchaseAmount" name="actualPurchaseAmount" th:field="*{actualPurchaseAmount}"-->
|
||||||
|
<!-- class="form-control" >-->
|
||||||
|
<!-- <input type="text" required id="displayactualPurchaseAmount" class="form-control" placeholder="输入金额"-->
|
||||||
|
<!-- oninput="this.value = this.value.replace(/[^0-9.]/g,'').replace(/(\..*)\./g, '$1');"-->
|
||||||
|
<!-- onfocus="this.value=document.getElementById('actualPurchaseAmount').value"-->
|
||||||
|
<!-- onblur="updateShipmentAmountValue('actualPurchaseAmount')" >-->
|
||||||
|
<!-- </td>-->
|
||||||
|
|
||||||
|
<td>币种<span class="is-required">*</span></td>
|
||||||
|
<td>
|
||||||
|
<select name="currencyType" th:field="*{currencyType}" class="form-control"
|
||||||
|
th:with="type=${@dict.getType('currency_type')}"
|
||||||
|
required>
|
||||||
|
<option value="">请选择币种</option>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
||||||
|
th:value="${dict.dictValue}"></option>
|
||||||
|
</select></td>
|
||||||
|
<td th:if="${projectOrderInfo.processTemplate=='1'}">总代进货金额</td>
|
||||||
|
<td th:if="${projectOrderInfo.processTemplate=='1'}"><input type="hidden" id="actualPurchaseAmount"
|
||||||
|
name="actualPurchaseAmount"
|
||||||
|
th:field="*{actualPurchaseAmount}"
|
||||||
|
class="form-control">
|
||||||
|
<input type="text" required id="displayactualPurchaseAmount" class="form-control"
|
||||||
|
placeholder="输入金额"
|
||||||
|
oninput="this.value = this.value.replace(/[^0-9.]/g,'').replace(/(\..*)\./g, '$1');"
|
||||||
|
onfocus="this.value=document.getElementById('actualPurchaseAmount').value"
|
||||||
|
onblur="updateShipmentAmountValue('actualPurchaseAmount')">
|
||||||
|
</td>
|
||||||
|
<td class="shortTd">总代出货金额</td>
|
||||||
|
<td th:colspan="${projectOrderInfo.processTemplate=='1'?1:3}"><input name="shipmentAmount"
|
||||||
|
id="shipmentAmount"
|
||||||
|
th:field="*{shipmentAmount}"
|
||||||
|
class="form-control"
|
||||||
|
type="hidden"
|
||||||
|
>
|
||||||
|
<input type="text" required id="displayshipmentAmount" class="form-control"
|
||||||
|
placeholder="输入金额"
|
||||||
|
oninput="this.value = this.value.replace(/[^0-9.]/g,'').replace(/(\..*)\./g, '$1');"
|
||||||
|
onfocus="this.value=document.getElementById('shipmentAmount').value"
|
||||||
|
onblur="updateShipmentAmountValue('shipmentAmount')">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td>要求到货时间<span class="is-required">*</span></td>
|
||||||
|
<td>
|
||||||
|
<input name="deliveryTime" class="form-control" autocomplete="off"
|
||||||
|
th:value="${#dates.format(projectOrderInfo.deliveryTime, 'yyyy-MM-dd')}"
|
||||||
|
placeholder="yyyy-MM-dd"
|
||||||
|
required>
|
||||||
|
</td>
|
||||||
|
<td>公司直发</td>
|
||||||
|
<td colspan="3">
|
||||||
|
<select name="companyDelivery" class="form-control" th:field="*{companyDelivery}"
|
||||||
|
th:with="type=${@dict.getType('company_delivery')}"
|
||||||
|
>
|
||||||
|
<option value="">请选择</option>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
||||||
|
th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>下单通路<span class="is-required">*</span></td>
|
||||||
|
<td>
|
||||||
|
<select name="orderChannel" id="orderChannel" class="form-control" required
|
||||||
|
th:field="*{orderChannel}">
|
||||||
|
<option value="">请选择</option>
|
||||||
|
<option value="1">总代</option>
|
||||||
|
<option value="2">直签</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
<td>供货商<span class="is-required">*</span></td>
|
||||||
|
<td colspan="3">
|
||||||
|
<input name="supplier" class="form-control" type="text" required th:field="*{supplier}">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>汇智责任人</td>
|
||||||
|
<td><input name="dutyName" class="form-control" type="text"
|
||||||
|
onclick="selectPeople()" th:field="*{dutyName}">
|
||||||
|
<input name="duty" class="form-control" th:field="*{duty}" type="hidden">
|
||||||
|
</td>
|
||||||
|
<td>Email</td>
|
||||||
|
<td><input type="text" name="dutyEmail" th:field="*{dutyEmail}"
|
||||||
|
class="form-control"></td>
|
||||||
|
<td>联系方式<span class="is-required">*</span></td>
|
||||||
|
<td><input name="dutyPhone" class="form-control" th:field="*{dutyPhone}" type="text" required></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>进货商<span class="is-required">*</span></td>
|
||||||
|
<td colspan="3"><input name="partnerName" class="form-control" type="text" th:field="*{partnerName}"
|
||||||
|
onclick="selectPartner()" required>
|
||||||
|
<input type="hidden" name="partnerCode" th:field="*{partnerCode}"
|
||||||
|
class="form-control" readonly placeholder="选择后带入" required></td>
|
||||||
|
|
||||||
|
<td>进货商类型<span class="is-required">*</span></td>
|
||||||
|
<td>
|
||||||
|
<select name="level" id="level" class="form-control" readonly :placeholder="选择后带入"
|
||||||
|
th:field="*{level}"
|
||||||
|
th:with="type=${@dict.getType('identify_level')}" style="pointer-events: none">
|
||||||
|
<option value="">选择后带入</option>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
||||||
|
th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>进货商联系人</td>
|
||||||
|
<td><input name="partnerUserName" class="form-control" type="text" th:field="*{partnerUserName}"></td>
|
||||||
|
<td>Email</td>
|
||||||
|
<td><input type="text" name="partnerEmail" th:field="*{partnerEmail}"
|
||||||
|
class="form-control"></td>
|
||||||
|
<td>联系方式<span class="is-required">*</span></td>
|
||||||
|
<td><input name="partnerPhone" class="form-control" type="text" required th:field="*{partnerPhone}">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<!-- <tr>-->
|
||||||
|
<!-- <td>收货地址<span class="is-required">*</span></td>-->
|
||||||
|
<!-- <td colspan="5">-->
|
||||||
|
<!-- <input name="notifierAddress" required class="form-control" type="text" th:field="*{notifierAddress}">-->
|
||||||
|
<!-- </td>-->
|
||||||
|
<!-- </tr>-->
|
||||||
|
<!-- <tr>-->
|
||||||
|
<!-- <td>收货人</td>-->
|
||||||
|
<!-- <td><input name="notifier" class="form-control" type="text" th:field="*{notifier}"></td>-->
|
||||||
|
<!-- <td>Email</td>-->
|
||||||
|
<!-- <td><input type="text" name="notifierEmail" th:field="*{notifierEmail}"-->
|
||||||
|
<!-- class="form-control"></td>-->
|
||||||
|
<!-- <td>联系方式<span class="is-required">*</span></td>-->
|
||||||
|
<!-- <td><input name="notifierPhone" class="form-control" type="text" required th:field="*{notifierPhone}">-->
|
||||||
|
<!-- </td>-->
|
||||||
|
<!-- </tr>-->
|
||||||
|
<tr>
|
||||||
|
<td>其他特别说明</td>
|
||||||
|
<td colspan="5">
|
||||||
|
<input name="remark" class="form-control" type="text" th:field="*{remark}">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="section-title">
|
||||||
|
<span>产品信息</span>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 select-table table-striped">
|
||||||
|
<table id="bootstrap-table"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="section-title">
|
||||||
|
<span>已生成出库单</span>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 select-table table-striped">
|
||||||
|
<table id="outer-table"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div id="generateOuter" style="display: none">
|
||||||
|
<div class="col-xs-12 section-title" style="display: flex;justify-content: center">
|
||||||
|
<span>生成出库单</span>
|
||||||
|
</div>
|
||||||
|
<form class="form-horizontal m" id="generateOuterForm">
|
||||||
|
<div class="col-xs-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-4 control-label ">出库单号:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input placeholder="自动生成" class="form-control" type="text" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-8">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-4 control-label ">出库时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input placeholder="自动生成" class="form-control" type="text" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-4 control-label">产品编码:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="outer-productCode" name="productCode" class="form-control" type="text" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-4">
|
||||||
|
<label class="col-sm-4 control-label">产品型号:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="outer-model" class="form-control" type="text" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-4">
|
||||||
|
<label class="col-sm-4 control-label">制造商:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="outer-vendorName" class="form-control" type="text" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 section-title" >
|
||||||
|
<span>仓库信息</span>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<table id="warehouse-table"></table>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<label class="col-sm-3 control-label text-left">应出库(台):</label>
|
||||||
|
<label class="col-sm-9 control-label text-left " id="out-quantity">80</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<label class="col-sm-3 control-label text-left" >已提交出库(台):</label>
|
||||||
|
<label class="col-sm-9 control-label text-left" id="out-generatedQuantity">80</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<label class="col-sm-3 control-label text-left" style="font-weight: bold;">本次提交出库(台):</label>
|
||||||
|
<label class="col-sm-9 control-label text-left" style="font-weight: bold;" id="out-current-quantity">80</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<label class="col-sm-3 control-label text-left">收货地址:</label>
|
||||||
|
<input class="col-sm-9 control-label text-left" th:value="${projectOrderInfo.notifierAddress}" ></input>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<label class="col-sm-3 control-label text-left">联系人:</label>
|
||||||
|
<input class="col-sm-9 control-label text-left" th:value="${projectOrderInfo.notifier}"></input>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<label class="col-sm-3 control-label text-left">联系电话(台):</label>
|
||||||
|
<input class="col-sm-9 control-label text-left" th:value="${projectOrderInfo.notifierPhone}"></input>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<label class="col-sm-3 control-label text-left">要求发货时间:</label>
|
||||||
|
<label class="col-sm-9 control-label text-left">80</label>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer"/>
|
||||||
|
<th:block th:include="include :: datetimepicker-js"/>
|
||||||
|
<th:block th:include="include :: layui"/>
|
||||||
|
<th:block th:include="include :: jquery-cxselect-js"/>
|
||||||
|
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "project/order"
|
||||||
|
const executionPrefix = ctx + "inventory/execution"
|
||||||
|
const canUpdate = [[${canUpdate}]]
|
||||||
|
const viewFlag = [[${view}]]
|
||||||
|
$("#form-order-edit").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function initProductDetailTable(data) {
|
||||||
|
var options = {
|
||||||
|
data: data ?? [[${productDetailList}]],
|
||||||
|
pagination: false,
|
||||||
|
showSearch: false,
|
||||||
|
showRefresh: false,
|
||||||
|
showToggle: false,
|
||||||
|
showColumns: false,
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: '序号',
|
||||||
|
formatter: function (value, row, index) {
|
||||||
|
return $.table.serialNumber(index);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'id',
|
||||||
|
title: '',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'productCode',
|
||||||
|
title: '产品编码'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'model',
|
||||||
|
title: '产品型号'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'quantity',
|
||||||
|
title: '应出库(台)'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'generatedQuantity',
|
||||||
|
title: '已生成出库(台)'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'confirmQuantity',
|
||||||
|
title: '已确认出库(台)'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'availableCount',
|
||||||
|
title: '实时库存',
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function (value, row, index) {
|
||||||
|
var actions = [];
|
||||||
|
actions.push('<a class="btn btn-default btn-xs " href="javascript:void(0)" onclick="checkOut(\'' + row.productCode + '\'' +
|
||||||
|
',\'' + row.model + '\',\'' + row.vendorName + '\',\'' + row.quantity + '\',\'' + row.generatedQuantity + '\')">出库</a>');
|
||||||
|
return actions.join('');
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
$.table.init(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
function initWarehouseTable(data) {
|
||||||
|
var options = {
|
||||||
|
id:'warehouse-table',
|
||||||
|
pagination: false,
|
||||||
|
showSearch: false,
|
||||||
|
showRefresh: false,
|
||||||
|
showToggle: false,
|
||||||
|
showColumns: false,
|
||||||
|
columns: [
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'warehouseName',
|
||||||
|
title: '仓库'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'warehouseId',
|
||||||
|
title: '仓库',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'model',
|
||||||
|
title: '实时用库存(台)'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'quantity',
|
||||||
|
title: '本次提交出库(台)'
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
$.table.init(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function checkOut(productCode,model,vendorName,quantity,generatedQuantity) {
|
||||||
|
$('#outer-productCode').val(productCode)
|
||||||
|
$('#outer-model').val(model)
|
||||||
|
$('#outer-vendorName').val(vendorName)
|
||||||
|
$('#out-quantity').text(quantity)
|
||||||
|
$('#out-generatedQuantity').text(generatedQuantity)
|
||||||
|
|
||||||
|
parent.$('.layui-layer-btn').css('display', 'none')
|
||||||
|
let width = 1000, height = 700
|
||||||
|
|
||||||
|
if ($.common.isMobile()) {
|
||||||
|
width = 'auto';
|
||||||
|
height = 'auto';
|
||||||
|
}
|
||||||
|
let index=layer.open({
|
||||||
|
id: 'generate_outer',
|
||||||
|
type: 1,
|
||||||
|
title: '生成出库单',
|
||||||
|
shade: 0.5, // 不显示遮罩
|
||||||
|
area: [width + 'px', height + 'px'],
|
||||||
|
content: $('#generateOuter'), // 捕获的元素
|
||||||
|
btn: ['确定', '关闭'],
|
||||||
|
yes: function (index, layero, that) {
|
||||||
|
|
||||||
|
},
|
||||||
|
end: function () {
|
||||||
|
parent.$('.layui-layer-btn').css('display', '')
|
||||||
|
|
||||||
|
// layer.msg('关闭后的回调', {icon:6});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
layer.full(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
function initOuterTable(data) {
|
||||||
|
var options = {
|
||||||
|
id: "outer-table",
|
||||||
|
|
||||||
|
showSearch: false,
|
||||||
|
showRefresh: false,
|
||||||
|
showToggle: false,
|
||||||
|
showColumns: false,
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: '序号',
|
||||||
|
formatter: function (value, row, index) {
|
||||||
|
return $.table.serialNumber(index);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'id',
|
||||||
|
title: '',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'outerCode',
|
||||||
|
title: '出库单号'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'productCode',
|
||||||
|
title: '产品编码'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'model',
|
||||||
|
title: '产品型号'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'quantity',
|
||||||
|
title: '数量'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'outerStatus',
|
||||||
|
title: '出库状态'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'contactPerson',
|
||||||
|
title: '联系人'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'contactAddress',
|
||||||
|
title: '收货地址',
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'createTime',
|
||||||
|
title: '生成时间',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function (value, row, index) {
|
||||||
|
var actions = [];
|
||||||
|
actions.push('<a class="btn btn-default btn-xs " href="javascript:void(0)" onclick="">出库</a>');
|
||||||
|
return actions.join('');
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
$.table.init(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$(function () {
|
||||||
|
parent.$('.layui-layer-btn0').css('display', 'none')
|
||||||
|
let shipmentAmount = [[${projectOrderInfo.shipmentAmount}]] || ''
|
||||||
|
|
||||||
|
if (shipmentAmount) {
|
||||||
|
document.getElementById('displayshipmentAmount').value = formatAmountNumber(shipmentAmount);
|
||||||
|
}
|
||||||
|
if ($('#displayactualPurchaseAmount').length > 0) {
|
||||||
|
let actualPurchaseAmount = [[${projectOrderInfo.actualPurchaseAmount}]] || ''
|
||||||
|
if (actualPurchaseAmount) {
|
||||||
|
document.getElementById('displayactualPurchaseAmount').value = formatAmountNumber(actualPurchaseAmount);
|
||||||
|
} else {
|
||||||
|
document.getElementById('displayactualPurchaseAmount').value = '0.00'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
changeBg()
|
||||||
|
$('[name="industryType"]').val([[${projectOrderInfo.industryType}]]);
|
||||||
|
initProductDetailTable()
|
||||||
|
initOuterTable()
|
||||||
|
initWarehouseTable()
|
||||||
|
var urlChina = '/cnarea/select';
|
||||||
|
$.cxSelect.defaults.url = urlChina;
|
||||||
|
$('#element1').cxSelect({
|
||||||
|
selects: ['province', 'city'],
|
||||||
|
nodata: 'none'
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
if (!canUpdate) {
|
||||||
|
$('#form-order-edit').find('input,select').each(function () {
|
||||||
|
if ($(this).attr('type') === 'file') {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
$(this).prop("disabled", true);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
function updateShipmentAmountValue(key) {
|
||||||
|
// 获取显示用的输入框
|
||||||
|
const displayInput = document.getElementById('display' + key);
|
||||||
|
// 获取隐藏字段
|
||||||
|
const rawInput = document.getElementById(key);
|
||||||
|
// 去除逗号并过滤非数字字符
|
||||||
|
let rawValue = displayInput.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');
|
||||||
|
|
||||||
|
// 更新隐藏字段的值
|
||||||
|
rawInput.value = rawValue;
|
||||||
|
|
||||||
|
// 格式化显示(可选)
|
||||||
|
if (rawValue) {
|
||||||
|
displayInput.value = Number(rawValue).toLocaleString('en-US');
|
||||||
|
} else {
|
||||||
|
displayInput.value = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 添加软件
|
||||||
|
|
||||||
|
|
||||||
|
function changeBg() {
|
||||||
|
if ($('[name="bgProperty"]').val() != 'YYS') {
|
||||||
|
let datas = [[${@dict.getType('bg_hysy')}]]
|
||||||
|
let str = ``
|
||||||
|
datas.forEach((ele) => {
|
||||||
|
str += `<option value="${ele.dictValue}">${ele.dictLabel}</option> `
|
||||||
|
})
|
||||||
|
$('#industryTypeBox').html(`
|
||||||
|
<select name="industryType" class="form-control" >
|
||||||
|
<option value="">请选择行业</option>
|
||||||
|
${str}
|
||||||
|
</select>
|
||||||
|
`)
|
||||||
|
} else {
|
||||||
|
let datas = [[${@dict.getType('bg_yys')}]]
|
||||||
|
let str = ``
|
||||||
|
datas.forEach((ele) => {
|
||||||
|
str += `<option value="${ele.dictValue}">${ele.dictLabel}</option> `
|
||||||
|
})
|
||||||
|
$('#industryTypeBox').html(`
|
||||||
|
<select name="industryType" class="form-control" >
|
||||||
|
<option value="">请选择行业</option>
|
||||||
|
${str}
|
||||||
|
</select>
|
||||||
|
`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,101 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('生成出库单')" />
|
||||||
|
<th:block th:include="include :: datetimepicker-css" />
|
||||||
|
</head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-outer-edit" th:object="${inventoryOuter}">
|
||||||
|
<input name="id" th:field="*{id}" type="hidden">
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">出库单号:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="outerCode" th:field="*{outerCode}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">产品BOM编码:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="productCode" th:field="*{productCode}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">数量:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="quantity" th:field="*{quantity}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">订单编码:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="orderCode" th:field="*{orderCode}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">联系人:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="contactPerson" th:field="*{contactPerson}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">联系电话:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="contactPhone" th:field="*{contactPhone}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">联系地址:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="contactAddress" th:field="*{contactAddress}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">发货时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group date">
|
||||||
|
<input name="deliveryTime" th:value="${#dates.format(inventoryOuter.deliveryTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
||||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<th:block th:include="include :: datetimepicker-js" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "inventory/outer";
|
||||||
|
$("#form-outer-edit").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/edit", $('#form-outer-edit').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$("input[name='deliveryTime']").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd",
|
||||||
|
minView: "month",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,310 @@
|
||||||
|
<!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="orderCode" placeholder="合同编号"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>项目名称:</label>
|
||||||
|
<input type="text" name="projectName" placeholder="项目名称"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<label>出库状态:</label>
|
||||||
|
<select name="outerStatus" class="form-control" th:with="type=${@dict.getType('execution_outer_status')}">
|
||||||
|
<option value="">请选择</option>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
||||||
|
th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<label>发货状态:</label>
|
||||||
|
<select name="deliveryStatus" class="form-control" th:with="type=${@dict.getType('execution_delivery_status')}">
|
||||||
|
<option value="">请选择</option>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
||||||
|
th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>签收状态:</label>
|
||||||
|
<select name="signStatus" class="form-control" th:with="type=${@dict.getType('execution_sign_status')}">
|
||||||
|
<option value="">请选择</option>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
||||||
|
th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="timeSearch">
|
||||||
|
<div>
|
||||||
|
<label>时间选择:</label>
|
||||||
|
<select name="timeType" onchange="changeTimeType()" value="0">
|
||||||
|
<option value="0">要求到货时间</option>
|
||||||
|
<option value="1">订单生效时间</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="timeSearch">
|
||||||
|
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="deliveryTimeStart"/>
|
||||||
|
<span>-</span>
|
||||||
|
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="deliveryTimeEnd"/>
|
||||||
|
|
||||||
|
</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="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 + "project/order";
|
||||||
|
var executionPrefix = ctx + "inventory/execution";
|
||||||
|
|
||||||
|
|
||||||
|
function changeTimeType() {
|
||||||
|
let timeType = $("[name='timeType']").val()
|
||||||
|
if (timeType == 0) {
|
||||||
|
$('#startTime').attr('name', 'deliveryTimeStart')
|
||||||
|
$('#endTime').attr('name', 'deliveryTimeEnd')
|
||||||
|
} else if (timeType == 1) {
|
||||||
|
$('#startTime').attr('name', 'approveTimeStart')
|
||||||
|
$('#endTime').attr('name', 'approveTimeEnd')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function viewDetail(id) {
|
||||||
|
$.modal.openFull("订单详情", ctx + "project/order/view/" + 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: executionPrefix + "/list",
|
||||||
|
createUrl: prefix + "/add",
|
||||||
|
updateUrl: executionPrefix + "/edit/{id}",
|
||||||
|
removeUrl: prefix + "/remove",
|
||||||
|
exportUrl: prefix + "/export",
|
||||||
|
modalName: "订单管理",
|
||||||
|
sortName:'outerStatus',
|
||||||
|
sortOrder: 'asc',
|
||||||
|
fixedColumns: true,
|
||||||
|
fixedRightNumber: 1,
|
||||||
|
columns: [{
|
||||||
|
title: '序号',
|
||||||
|
width: 100,
|
||||||
|
formatter: function (value, row, index) {
|
||||||
|
return $.table.serialNumber(index);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'id',
|
||||||
|
title: '',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'projectCode',
|
||||||
|
title: '项目编号',
|
||||||
|
width: 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'orderCode',
|
||||||
|
title: '合同编号',
|
||||||
|
width: 200,
|
||||||
|
formatter: function (value, row, index) {
|
||||||
|
return '<a href="javascript:viewDetail(' + row.id + ')">' + value + '</a>';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'projectName',
|
||||||
|
title: '项目名称',
|
||||||
|
width: 300,
|
||||||
|
formatter: function (value, row, index) {
|
||||||
|
return '<a href="javascript:viewProjectDetail(' + row.projectId + ')">' + value + '</a>';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'outerStatus',
|
||||||
|
title: '出库状态',
|
||||||
|
width: 100,
|
||||||
|
formatter: function (value, row, index) {
|
||||||
|
return $.table.selectDictLabel([[${@dict.getType('execution_outer_status')}]], value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'signStatus',
|
||||||
|
title: '签收状态',
|
||||||
|
width: 100,
|
||||||
|
formatter: function (value, row, index) {
|
||||||
|
return $.table.selectDictLabel([[${@dict.getType('execution_sign_status')}]], value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'deliveryStatus',
|
||||||
|
title: '发货状态',
|
||||||
|
width: 100,
|
||||||
|
formatter: function (value, row, index) {
|
||||||
|
return $.table.selectDictLabel([[${@dict.getType('execution_delivery_status')}]], value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'approveTime',
|
||||||
|
title: '订单生效时间',
|
||||||
|
class: 'time1',
|
||||||
|
width: 200,
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'deliveryTime',
|
||||||
|
title: '要求到货时间',
|
||||||
|
class: 'time2',
|
||||||
|
width: 200,
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
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="$.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="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);
|
||||||
|
|
||||||
|
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>
|
||||||
|
|
@ -95,11 +95,17 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'availableCount',
|
field: 'availableCount',
|
||||||
title: '实时库存'
|
title: '实时库存',
|
||||||
|
formatter: function (value, row, index) {
|
||||||
|
return value ??0;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'reservedCount',
|
field: 'cumulativeCount',
|
||||||
title: '累计发货'
|
title: '累计发货',
|
||||||
|
formatter: function (value, row, index) {
|
||||||
|
return value ??0;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'vendorName',
|
field: 'vendorName',
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,72 @@
|
||||||
|
package com.ruoyi.sip.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
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.common.utils.ShiroUtils;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.sip.domain.*;
|
||||||
|
import com.ruoyi.sip.dto.warehouse.WarehouseInnerExcelDto;
|
||||||
|
import com.ruoyi.sip.flowable.domain.Todo;
|
||||||
|
import com.ruoyi.sip.service.*;
|
||||||
|
import com.ruoyi.sip.vo.ExecutionOrderVo;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入库单信息Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-08-06
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/inventory/execution")
|
||||||
|
public class InventoryExecutionController extends BaseController {
|
||||||
|
private String prefix = "inventory/execution";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IProjectOrderInfoService orderInfoService;
|
||||||
|
@Autowired
|
||||||
|
private IExecutionTrackService service;
|
||||||
|
|
||||||
|
@RequiresPermissions("inventory:inner:view")
|
||||||
|
@GetMapping()
|
||||||
|
public String inner() {
|
||||||
|
return prefix + "/track";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo list(ProjectOrderInfo projectOrderInfo) {
|
||||||
|
startPage();
|
||||||
|
projectOrderInfo.setOrderStatus(ProjectOrderInfo.OrderStatus.APPROVE_COMPLETE.getCode());
|
||||||
|
List<ProjectOrderInfo> list = orderInfoService.selectProjectOrderInfoList(projectOrderInfo);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
@GetMapping("/edit/{id}")
|
||||||
|
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||||
|
{
|
||||||
|
ExecutionOrderVo vo = service.selectInfo(id);
|
||||||
|
mmap.put("projectOrderInfo", vo.getProjectOrderInfo());
|
||||||
|
mmap.put("productDetailList", vo.getProductDetailList());
|
||||||
|
mmap.put("inventoryOuterList", vo.getInventoryOuterList());
|
||||||
|
|
||||||
|
|
||||||
|
return prefix + "/edit";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,8 +1,16 @@
|
||||||
package com.ruoyi.sip.controller;
|
package com.ruoyi.sip.controller;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.ruoyi.sip.dto.inventory.GroupInfo;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import com.ruoyi.common.utils.ShiroUtils;
|
||||||
|
import com.ruoyi.sip.domain.ProductInfo;
|
||||||
|
import com.ruoyi.sip.domain.ProjectInfo;
|
||||||
|
import com.ruoyi.sip.domain.VendorInfo;
|
||||||
|
import com.ruoyi.sip.service.IProductInfoService;
|
||||||
|
import com.ruoyi.sip.service.IVendorInfoService;
|
||||||
|
import liquibase.pro.packaged.A;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
|
|
@ -35,6 +43,10 @@ public class InventoryInfoController extends BaseController
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IInventoryInfoService inventoryInfoService;
|
private IInventoryInfoService inventoryInfoService;
|
||||||
|
@Autowired
|
||||||
|
private IProductInfoService productInfoService;
|
||||||
|
@Autowired
|
||||||
|
private IVendorInfoService vendorInfoService;
|
||||||
|
|
||||||
@RequiresPermissions("inventory:info:view")
|
@RequiresPermissions("inventory:info:view")
|
||||||
@GetMapping()
|
@GetMapping()
|
||||||
|
|
@ -57,10 +69,17 @@ public class InventoryInfoController extends BaseController
|
||||||
}
|
}
|
||||||
@PostMapping("/group/list")
|
@PostMapping("/group/list")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public TableDataInfo groupList(GroupInfo info)
|
public TableDataInfo groupList(ProductInfo info)
|
||||||
{
|
{
|
||||||
startPage();
|
startPage();
|
||||||
List<GroupInfo> list = inventoryInfoService.listGroup(info);
|
// List<VendorInfo> current = vendorInfoService.current();
|
||||||
|
// if (CollUtil.isEmpty(current)) {
|
||||||
|
// return getDataTable(Collections.emptyList());
|
||||||
|
// }
|
||||||
|
// if (!ShiroUtils.getSysUser().isAdmin()) {
|
||||||
|
// info.setVendorCode(current.get(0).getVendorCode());
|
||||||
|
// }
|
||||||
|
List<ProductInfo> list = productInfoService.selectProductInfoList(info);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,128 @@
|
||||||
|
package com.ruoyi.sip.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.sip.domain.InventoryOuter;
|
||||||
|
import com.ruoyi.sip.service.IInventoryOuterService;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库单Controller
|
||||||
|
*
|
||||||
|
* @author ch
|
||||||
|
* @date 2025-08-08
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/inventory/outer")
|
||||||
|
public class InventoryOuterController extends BaseController
|
||||||
|
{
|
||||||
|
private String prefix = "inventory/outer";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IInventoryOuterService inventoryOuterService;
|
||||||
|
|
||||||
|
@RequiresPermissions("inventory:outer:view")
|
||||||
|
@GetMapping()
|
||||||
|
public String outer()
|
||||||
|
{
|
||||||
|
return prefix + "/outer";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询出库单列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("inventory:outer:list")
|
||||||
|
@PostMapping("/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo list(InventoryOuter inventoryOuter)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<InventoryOuter> list = inventoryOuterService.selectInventoryOuterList(inventoryOuter);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出出库单列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("inventory:outer:export")
|
||||||
|
@Log(title = "出库单", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult export(InventoryOuter inventoryOuter)
|
||||||
|
{
|
||||||
|
List<InventoryOuter> list = inventoryOuterService.selectInventoryOuterList(inventoryOuter);
|
||||||
|
ExcelUtil<InventoryOuter> util = new ExcelUtil<InventoryOuter>(InventoryOuter.class);
|
||||||
|
return util.exportExcel(list, "出库单数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增出库单
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("inventory:outer:add")
|
||||||
|
@GetMapping("/add")
|
||||||
|
public String add()
|
||||||
|
{
|
||||||
|
return prefix + "/add";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存出库单
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("inventory:outer:add")
|
||||||
|
@Log(title = "出库单", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult addSave(InventoryOuter inventoryOuter)
|
||||||
|
{
|
||||||
|
return toAjax(inventoryOuterService.insertInventoryOuter(inventoryOuter));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改出库单
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("inventory:outer:edit")
|
||||||
|
@GetMapping("/edit/{id}")
|
||||||
|
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||||
|
{
|
||||||
|
InventoryOuter inventoryOuter = inventoryOuterService.selectInventoryOuterById(id);
|
||||||
|
mmap.put("inventoryOuter", inventoryOuter);
|
||||||
|
return prefix + "/edit";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存出库单
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("inventory:outer:edit")
|
||||||
|
@Log(title = "出库单", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/edit")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult editSave(InventoryOuter inventoryOuter)
|
||||||
|
{
|
||||||
|
return toAjax(inventoryOuterService.updateInventoryOuter(inventoryOuter));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除出库单
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("inventory:outer:remove")
|
||||||
|
@Log(title = "出库单", businessType = BusinessType.DELETE)
|
||||||
|
@PostMapping( "/remove")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult remove(String ids)
|
||||||
|
{
|
||||||
|
return toAjax(inventoryOuterService.deleteInventoryOuterByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,71 @@
|
||||||
|
package com.ruoyi.sip.domain;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库单对象 oms_inventory_outer
|
||||||
|
*
|
||||||
|
* @author ch
|
||||||
|
* @date 2025-08-08
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ToString
|
||||||
|
public class InventoryOuter extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 出库单号 */
|
||||||
|
@Excel(name = "出库单号")
|
||||||
|
private String outerCode;
|
||||||
|
|
||||||
|
/** 产品BOM编码 */
|
||||||
|
@Excel(name = "产品BOM编码")
|
||||||
|
private String productCode;
|
||||||
|
private List<String> productCodeList;
|
||||||
|
|
||||||
|
/** 数量 */
|
||||||
|
@Excel(name = "数量")
|
||||||
|
private Long quantity;
|
||||||
|
|
||||||
|
/** 出库状态 */
|
||||||
|
@Excel(name = "出库状态")
|
||||||
|
private String outerStatus;
|
||||||
|
|
||||||
|
/** 订单编码 */
|
||||||
|
@Excel(name = "订单编码")
|
||||||
|
private String orderCode;
|
||||||
|
|
||||||
|
/** 联系人 */
|
||||||
|
@Excel(name = "联系人")
|
||||||
|
private String contactPerson;
|
||||||
|
|
||||||
|
/** 联系电话 */
|
||||||
|
@Excel(name = "联系电话")
|
||||||
|
private String contactPhone;
|
||||||
|
|
||||||
|
/** 联系地址 */
|
||||||
|
@Excel(name = "联系地址")
|
||||||
|
private String contactAddress;
|
||||||
|
|
||||||
|
/** 发货时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
@Excel(name = "发货时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date deliveryTime;
|
||||||
|
|
||||||
|
/** 发货时间选择(0:立即发货 1:自定义) */
|
||||||
|
@Excel(name = "发货时间选择(0:立即发货 1:自定义)")
|
||||||
|
private String deliveryTimeType;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -62,6 +62,8 @@ public class ProductInfo extends BaseEntity
|
||||||
private String serialNumber;
|
private String serialNumber;
|
||||||
private String vendorCode;
|
private String vendorCode;
|
||||||
private String vendorName;
|
private String vendorName;
|
||||||
|
private Long availableCount;
|
||||||
|
private Long cumulativeCount;
|
||||||
@Getter
|
@Getter
|
||||||
public enum ProductTypeEnum {
|
public enum ProductTypeEnum {
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -129,6 +129,7 @@ public class ProjectOrderInfo extends BaseEntity {
|
||||||
private String partnerCode;
|
private String partnerCode;
|
||||||
@Excel(name = "进货商")
|
@Excel(name = "进货商")
|
||||||
private String partnerName;
|
private String partnerName;
|
||||||
|
private String projectPartnerName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 实际进货金额
|
* 实际进货金额
|
||||||
|
|
@ -216,6 +217,12 @@ public class ProjectOrderInfo extends BaseEntity {
|
||||||
* 模板 0:直签 1:总代 2 定制开发
|
* 模板 0:直签 1:总代 2 定制开发
|
||||||
*/
|
*/
|
||||||
private String processTemplate;
|
private String processTemplate;
|
||||||
|
private String deliveryStatus;
|
||||||
|
private String signStatus;
|
||||||
|
private String outerStatus;
|
||||||
|
private Date approveTime;
|
||||||
|
private Date approveTimeStart;
|
||||||
|
private Date approveTimeEnd;
|
||||||
private BigDecimal discountFold;
|
private BigDecimal discountFold;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -286,4 +293,57 @@ public class ProjectOrderInfo extends BaseEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@Getter
|
||||||
|
public enum DeliveryStatusEnum {
|
||||||
|
NOT_DELIVERY("0", "未发货"),
|
||||||
|
PART_DELIVERY("1", "部分发货"),
|
||||||
|
ALL_DELIVERY("2", "全部发货"),
|
||||||
|
|
||||||
|
;
|
||||||
|
|
||||||
|
private final String value;
|
||||||
|
private final String code;
|
||||||
|
|
||||||
|
DeliveryStatusEnum(String code, String value) {
|
||||||
|
this.code = code;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
@Getter
|
||||||
|
public enum SignStatusEnum {
|
||||||
|
NOT_SIGN("0", "未签收"),
|
||||||
|
SIGN("1", "已签收"),
|
||||||
|
|
||||||
|
|
||||||
|
;
|
||||||
|
|
||||||
|
private final String value;
|
||||||
|
private final String code;
|
||||||
|
|
||||||
|
SignStatusEnum(String code, String value) {
|
||||||
|
this.code = code;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
@Getter
|
||||||
|
public enum OuterStatusEnum {
|
||||||
|
NOT_OUTER("0", "未出库"),
|
||||||
|
PART_OUTER("1", "部分出库"),
|
||||||
|
ALL_OUTER("2", "全部出库"),
|
||||||
|
RETURN("3", "已退回"),
|
||||||
|
|
||||||
|
|
||||||
|
;
|
||||||
|
|
||||||
|
private final String value;
|
||||||
|
private final String code;
|
||||||
|
|
||||||
|
OuterStatusEnum(String code, String value) {
|
||||||
|
this.code = code;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,35 +1,28 @@
|
||||||
package com.ruoyi.sip.dto.inventory;
|
package com.ruoyi.sip.dto.inventory;
|
||||||
|
|
||||||
|
|
||||||
import com.ruoyi.common.annotation.Excel;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author : ch
|
* @author : ch
|
||||||
* @version : 1.0
|
* @version : 1.0
|
||||||
* @ClassName : GroupInfo
|
* @ClassName : ProductDetail
|
||||||
* @Description :
|
* @Description :
|
||||||
* @DATE : Created in 17:32 2025/8/7
|
* @DATE : Created in 11:28 2025/8/8
|
||||||
* <pre> Copyright: Copyright(c) 2025 </pre>
|
* <pre> Copyright: Copyright(c) 2025 </pre>
|
||||||
* <pre> Company : 紫光汇智信息技术有限公司 </pre>
|
* <pre> Company : 紫光汇智信息技术有限公司 </pre>
|
||||||
* Modification History:
|
* Modification History:
|
||||||
* Date Author Version Discription
|
* Date Author Version Discription
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
* 2025/08/07 ch 1.0 Why & What is modified: <修改原因描述> *
|
* 2025/08/08 ch 1.0 Why & What is modified: <修改原因描述> *
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class GroupInfo {
|
public class ProductDetail {
|
||||||
@Excel(name = "产品编码")
|
|
||||||
private String productCode;
|
private String productCode;
|
||||||
@Excel(name = "产品型号")
|
|
||||||
private String model;
|
|
||||||
@Excel(name = "产品名称")
|
|
||||||
private String productName;
|
|
||||||
@Excel(name = "实时库存")
|
|
||||||
private Long availableCount;
|
|
||||||
@Excel(name = "累计发货")
|
|
||||||
private Long reservedCount;
|
|
||||||
@Excel(name = "制造商")
|
|
||||||
private String vendorName;
|
private String vendorName;
|
||||||
|
private String model;
|
||||||
|
private Long quantity;
|
||||||
|
private Long generatedQuantity;
|
||||||
|
private Long confirmQuantity;
|
||||||
|
private Long availableCount;
|
||||||
}
|
}
|
||||||
|
|
@ -2,7 +2,7 @@ package com.ruoyi.sip.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.ruoyi.sip.domain.InventoryInfo;
|
import com.ruoyi.sip.domain.InventoryInfo;
|
||||||
import com.ruoyi.sip.dto.inventory.GroupInfo;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 产品库存Mapper接口
|
* 产品库存Mapper接口
|
||||||
|
|
@ -61,6 +61,4 @@ public interface InventoryInfoMapper
|
||||||
public int deleteInventoryInfoByIds(String[] ids);
|
public int deleteInventoryInfoByIds(String[] ids);
|
||||||
|
|
||||||
void saveBatch(List<InventoryInfo> inventoryInfoList);
|
void saveBatch(List<InventoryInfo> inventoryInfoList);
|
||||||
|
|
||||||
List<GroupInfo> listGroup(GroupInfo inventoryInfo);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.ruoyi.sip.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.sip.domain.InventoryOuter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库单Mapper接口
|
||||||
|
*
|
||||||
|
* @author ch
|
||||||
|
* @date 2025-08-08
|
||||||
|
*/
|
||||||
|
public interface InventoryOuterMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询出库单
|
||||||
|
*
|
||||||
|
* @param id 出库单主键
|
||||||
|
* @return 出库单
|
||||||
|
*/
|
||||||
|
public InventoryOuter selectInventoryOuterById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询出库单列表
|
||||||
|
*
|
||||||
|
* @param inventoryOuter 出库单
|
||||||
|
* @return 出库单集合
|
||||||
|
*/
|
||||||
|
public List<InventoryOuter> selectInventoryOuterList(InventoryOuter inventoryOuter);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增出库单
|
||||||
|
*
|
||||||
|
* @param inventoryOuter 出库单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertInventoryOuter(InventoryOuter inventoryOuter);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改出库单
|
||||||
|
*
|
||||||
|
* @param inventoryOuter 出库单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateInventoryOuter(InventoryOuter inventoryOuter);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除出库单
|
||||||
|
*
|
||||||
|
* @param id 出库单主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteInventoryOuterById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除出库单
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteInventoryOuterByIds(String[] ids);
|
||||||
|
}
|
||||||
|
|
@ -70,4 +70,6 @@ public interface ProductInfoMapper
|
||||||
|
|
||||||
List<ProductInfo> query(MaintenanceRecordsDto dto);
|
List<ProductInfo> query(MaintenanceRecordsDto dto);
|
||||||
|
|
||||||
|
void updateAvailableCount(@Param("quantity") Long quantity, @Param("productCode") String productCode);
|
||||||
|
void updateCumulativeCount(@Param("quantity") Long quantity, @Param("productCode") String productCode);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
package com.ruoyi.sip.service;
|
||||||
|
|
||||||
|
|
||||||
|
import com.ruoyi.sip.domain.ProjectOrderInfo;
|
||||||
|
import com.ruoyi.sip.domain.ProjectProductInfo;
|
||||||
|
import com.ruoyi.sip.mapper.ProjectOrderInfoMapper;
|
||||||
|
import com.ruoyi.sip.vo.ExecutionOrderVo;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author : ch
|
||||||
|
* @version : 1.0
|
||||||
|
* @ClassName : IExecutionTrackService
|
||||||
|
* @Description :
|
||||||
|
* @DATE : Created in 11:05 2025/8/8
|
||||||
|
* <pre> Copyright: Copyright(c) 2025 </pre>
|
||||||
|
* <pre> Company : 紫光汇智信息技术有限公司 </pre>
|
||||||
|
* Modification History:
|
||||||
|
* Date Author Version Discription
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* 2025/08/08 ch 1.0 Why & What is modified: <修改原因描述> *
|
||||||
|
*/
|
||||||
|
public interface IExecutionTrackService {
|
||||||
|
|
||||||
|
ExecutionOrderVo selectInfo(Long id);
|
||||||
|
}
|
||||||
|
|
@ -2,7 +2,6 @@ package com.ruoyi.sip.service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.ruoyi.sip.domain.InventoryInfo;
|
import com.ruoyi.sip.domain.InventoryInfo;
|
||||||
import com.ruoyi.sip.dto.inventory.GroupInfo;
|
|
||||||
import com.ruoyi.sip.dto.warehouse.WarehouseInnerExcelDto;
|
import com.ruoyi.sip.dto.warehouse.WarehouseInnerExcelDto;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -72,5 +71,5 @@ public interface IInventoryInfoService
|
||||||
|
|
||||||
void saveBatch(List<InventoryInfo> inventoryInfoList);
|
void saveBatch(List<InventoryInfo> inventoryInfoList);
|
||||||
|
|
||||||
List<GroupInfo> listGroup(GroupInfo inventoryInfo);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.ruoyi.sip.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.sip.domain.InventoryOuter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库单Service接口
|
||||||
|
*
|
||||||
|
* @author ch
|
||||||
|
* @date 2025-08-08
|
||||||
|
*/
|
||||||
|
public interface IInventoryOuterService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询出库单
|
||||||
|
*
|
||||||
|
* @param id 出库单主键
|
||||||
|
* @return 出库单
|
||||||
|
*/
|
||||||
|
public InventoryOuter selectInventoryOuterById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询出库单列表
|
||||||
|
*
|
||||||
|
* @param inventoryOuter 出库单
|
||||||
|
* @return 出库单集合
|
||||||
|
*/
|
||||||
|
public List<InventoryOuter> selectInventoryOuterList(InventoryOuter inventoryOuter);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增出库单
|
||||||
|
*
|
||||||
|
* @param inventoryOuter 出库单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertInventoryOuter(InventoryOuter inventoryOuter);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改出库单
|
||||||
|
*
|
||||||
|
* @param inventoryOuter 出库单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateInventoryOuter(InventoryOuter inventoryOuter);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除出库单
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的出库单主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteInventoryOuterByIds(String ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除出库单信息
|
||||||
|
*
|
||||||
|
* @param id 出库单主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteInventoryOuterById(Long id);
|
||||||
|
}
|
||||||
|
|
@ -2,7 +2,6 @@ package com.ruoyi.sip.service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.ruoyi.sip.controller.ProductInfoController;
|
|
||||||
import com.ruoyi.sip.domain.MaintenanceRecordsDto;
|
import com.ruoyi.sip.domain.MaintenanceRecordsDto;
|
||||||
import com.ruoyi.sip.domain.ProductInfo;
|
import com.ruoyi.sip.domain.ProductInfo;
|
||||||
|
|
||||||
|
|
@ -64,4 +63,6 @@ public interface IProductInfoService
|
||||||
|
|
||||||
List<ProductInfo> query(MaintenanceRecordsDto dto);
|
List<ProductInfo> query(MaintenanceRecordsDto dto);
|
||||||
List<ProductInfo> selectProductInfoByCodeList(List<String> productCodeList);
|
List<ProductInfo> selectProductInfoByCodeList(List<String> productCodeList);
|
||||||
|
|
||||||
|
void updateAvailableCount(Long quantity, String productCode);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,149 @@
|
||||||
|
package com.ruoyi.sip.service.impl;
|
||||||
|
|
||||||
|
|
||||||
|
import com.ruoyi.sip.domain.InventoryOuter;
|
||||||
|
import com.ruoyi.sip.domain.ProductInfo;
|
||||||
|
import com.ruoyi.sip.domain.ProjectOrderInfo;
|
||||||
|
import com.ruoyi.sip.domain.ProjectProductInfo;
|
||||||
|
import com.ruoyi.sip.dto.inventory.ProductDetail;
|
||||||
|
import com.ruoyi.sip.mapper.ProjectOrderInfoMapper;
|
||||||
|
import com.ruoyi.sip.service.*;
|
||||||
|
import com.ruoyi.sip.vo.ExecutionOrderVo;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.function.Function;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author : ch
|
||||||
|
* @version : 1.0
|
||||||
|
* @ClassName : ExecutionTrackServiceImpl
|
||||||
|
* @Description :
|
||||||
|
* @DATE : Created in 11:05 2025/8/8
|
||||||
|
* <pre> Copyright: Copyright(c) 2025 </pre>
|
||||||
|
* <pre> Company : 紫光汇智信息技术有限公司 </pre>
|
||||||
|
* Modification History:
|
||||||
|
* Date Author Version Discription
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* 2025/08/08 ch 1.0 Why & What is modified: <修改原因描述> *
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ExecutionTrackServiceImpl implements IExecutionTrackService {
|
||||||
|
@Resource
|
||||||
|
private ProjectOrderInfoMapper projectOrderInfoMapper;
|
||||||
|
@Autowired
|
||||||
|
private IProjectProductInfoService projectProductInfoService;
|
||||||
|
@Autowired
|
||||||
|
private IInventoryInfoService inventoryInfoService;
|
||||||
|
@Autowired
|
||||||
|
private IProductInfoService productInfoService;
|
||||||
|
@Autowired
|
||||||
|
private IInventoryOuterService outerService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ExecutionOrderVo selectInfo(Long id) {
|
||||||
|
ExecutionOrderVo vo = new ExecutionOrderVo();
|
||||||
|
//基础信息
|
||||||
|
ProjectOrderInfo projectOrderInfo = projectOrderInfoMapper.selectProjectOrderInfoById(id);
|
||||||
|
vo.setProjectOrderInfo(projectOrderInfo);
|
||||||
|
//产品清单
|
||||||
|
List<ProjectProductInfo> projectProductInfos = projectProductInfoService.selectProjectProductInfoListByProjectId(Collections.singletonList(projectOrderInfo.getProjectId()));
|
||||||
|
// 筛选软件或硬件产品并合并相同产品代码的记录
|
||||||
|
List<ProductDetail> productDetails = projectProductInfos.stream()
|
||||||
|
.filter(item -> item.getType().equals(ProductInfo.ProductTypeEnum.HARDWARE.getType()) ||
|
||||||
|
item.getType().equals(ProductInfo.ProductTypeEnum.SOFTWARE.getType()))
|
||||||
|
.collect(Collectors.groupingBy(ProjectProductInfo::getProductBomCode))
|
||||||
|
.entrySet().stream()
|
||||||
|
.map(entry -> {
|
||||||
|
ProductDetail detail = new ProductDetail();
|
||||||
|
String productCode = entry.getKey();
|
||||||
|
List<ProjectProductInfo> items = entry.getValue();
|
||||||
|
|
||||||
|
// 合并数量
|
||||||
|
Long totalQuantity = items.stream()
|
||||||
|
.mapToLong(ProjectProductInfo::getQuantity)
|
||||||
|
.sum();
|
||||||
|
|
||||||
|
detail.setProductCode(productCode);
|
||||||
|
detail.setQuantity(totalQuantity);
|
||||||
|
|
||||||
|
// 设置型号(取第一个匹配项的型号)
|
||||||
|
if (!items.isEmpty()) {
|
||||||
|
detail.setModel(items.get(0).getModel());
|
||||||
|
}
|
||||||
|
|
||||||
|
return detail;
|
||||||
|
})
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
// 获取产品代码列表
|
||||||
|
List<String> productCodeList = productDetails.stream()
|
||||||
|
.map(ProductDetail::getProductCode)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
// 查询库存信息
|
||||||
|
List<ProductInfo> groupInfos = productInfoService.selectProductInfoByCodeList(productCodeList);
|
||||||
|
|
||||||
|
// 将库存信息映射到产品详情中
|
||||||
|
if (groupInfos != null && !groupInfos.isEmpty()) {
|
||||||
|
Map<String, ProductInfo> inventoryMap = groupInfos.stream()
|
||||||
|
.collect(Collectors.toMap(ProductInfo::getProductCode,
|
||||||
|
Function.identity(), (v1, v2) -> v1));
|
||||||
|
|
||||||
|
for (ProductDetail detail : productDetails) {
|
||||||
|
ProductInfo info = inventoryMap.get(detail.getProductCode());
|
||||||
|
detail.setAvailableCount((info != null && info.getAvailableCount() != null) ? info.getAvailableCount() : 0L);
|
||||||
|
detail.setVendorName((info != null && info.getVendorName() != null) ? info.getVendorName():"" );
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
productDetails.forEach(detail -> detail.setAvailableCount(0L));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询出库单信息
|
||||||
|
InventoryOuter inventoryOuter = new InventoryOuter();
|
||||||
|
inventoryOuter.setOuterCode(projectOrderInfo.getOrderCode());
|
||||||
|
List<InventoryOuter> inventoryOuters = outerService.selectInventoryOuterList(inventoryOuter);
|
||||||
|
vo.setInventoryOuterList(inventoryOuters);
|
||||||
|
// 根据出库单状态设置generatedQuantity和confirmQuantity
|
||||||
|
if (inventoryOuters != null && !inventoryOuters.isEmpty()) {
|
||||||
|
Map<String, List<InventoryOuter>> outersByProductCode = inventoryOuters.stream()
|
||||||
|
.collect(Collectors.groupingBy(InventoryOuter::getProductCode));
|
||||||
|
|
||||||
|
productDetails.forEach(detail -> {
|
||||||
|
List<InventoryOuter> outers = outersByProductCode.get(detail.getProductCode());
|
||||||
|
if (outers != null) {
|
||||||
|
// generatedQuantity: 状态为"已生成"(假设为"1")的出库单数量总和
|
||||||
|
Long generated = outers.stream()
|
||||||
|
.filter(outer -> "1".equals(outer.getOuterStatus()))
|
||||||
|
.mapToLong(InventoryOuter::getQuantity)
|
||||||
|
.sum();
|
||||||
|
|
||||||
|
// confirmQuantity: 状态为"已确认"(假设为"2")的出库单数量总和
|
||||||
|
Long confirmed = outers.stream()
|
||||||
|
.filter(outer -> "2".equals(outer.getOuterStatus()))
|
||||||
|
.mapToLong(InventoryOuter::getQuantity)
|
||||||
|
.sum();
|
||||||
|
|
||||||
|
detail.setGeneratedQuantity(generated);
|
||||||
|
detail.setConfirmQuantity(confirmed);
|
||||||
|
} else {
|
||||||
|
detail.setGeneratedQuantity(0L);
|
||||||
|
detail.setConfirmQuantity(0L);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
productDetails.forEach(detail -> {
|
||||||
|
detail.setGeneratedQuantity(0L);
|
||||||
|
detail.setConfirmQuantity(0L);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
vo.setProductDetailList(productDetails);
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,28 +1,26 @@
|
||||||
package com.ruoyi.sip.service.impl;
|
package com.ruoyi.sip.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import com.ruoyi.sip.domain.InventoryInfo;
|
||||||
|
import com.ruoyi.sip.domain.OmsWarehouseInfo;
|
||||||
|
import com.ruoyi.sip.domain.ProductInfo;
|
||||||
|
import com.ruoyi.sip.dto.warehouse.WarehouseInnerExcelDto;
|
||||||
|
import com.ruoyi.sip.mapper.InventoryInfoMapper;
|
||||||
|
import com.ruoyi.sip.service.IInventoryInfoService;
|
||||||
|
import com.ruoyi.sip.service.IOmsWarehouseInfoService;
|
||||||
|
import com.ruoyi.sip.service.IProductInfoService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
|
||||||
import com.ruoyi.sip.domain.OmsWarehouseInfo;
|
|
||||||
import com.ruoyi.sip.domain.ProductInfo;
|
|
||||||
import com.ruoyi.sip.dto.inventory.GroupInfo;
|
|
||||||
import com.ruoyi.sip.dto.warehouse.WarehouseInnerExcelDto;
|
|
||||||
import com.ruoyi.sip.service.IOmsWarehouseInfoService;
|
|
||||||
import com.ruoyi.sip.service.IProductInfoService;
|
|
||||||
import liquibase.pro.packaged.A;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import com.ruoyi.sip.mapper.InventoryInfoMapper;
|
|
||||||
import com.ruoyi.sip.domain.InventoryInfo;
|
|
||||||
import com.ruoyi.sip.service.IInventoryInfoService;
|
|
||||||
import com.ruoyi.common.core.text.Convert;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 产品库存Service业务层处理
|
* 产品库存Service业务层处理
|
||||||
*
|
*
|
||||||
|
|
@ -151,8 +149,5 @@ public class InventoryInfoServiceImpl implements IInventoryInfoService {
|
||||||
inventoryInfoMapper.saveBatch(inventoryInfoList);
|
inventoryInfoMapper.saveBatch(inventoryInfoList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<GroupInfo> listGroup(GroupInfo inventoryInfo) {
|
|
||||||
return inventoryInfoMapper.listGroup(inventoryInfo);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,97 @@
|
||||||
|
package com.ruoyi.sip.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.sip.mapper.InventoryOuterMapper;
|
||||||
|
import com.ruoyi.sip.domain.InventoryOuter;
|
||||||
|
import com.ruoyi.sip.service.IInventoryOuterService;
|
||||||
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库单Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ch
|
||||||
|
* @date 2025-08-08
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class InventoryOuterServiceImpl implements IInventoryOuterService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private InventoryOuterMapper inventoryOuterMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询出库单
|
||||||
|
*
|
||||||
|
* @param id 出库单主键
|
||||||
|
* @return 出库单
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public InventoryOuter selectInventoryOuterById(Long id)
|
||||||
|
{
|
||||||
|
return inventoryOuterMapper.selectInventoryOuterById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询出库单列表
|
||||||
|
*
|
||||||
|
* @param inventoryOuter 出库单
|
||||||
|
* @return 出库单
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<InventoryOuter> selectInventoryOuterList(InventoryOuter inventoryOuter)
|
||||||
|
{
|
||||||
|
return inventoryOuterMapper.selectInventoryOuterList(inventoryOuter);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增出库单
|
||||||
|
*
|
||||||
|
* @param inventoryOuter 出库单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertInventoryOuter(InventoryOuter inventoryOuter)
|
||||||
|
{
|
||||||
|
inventoryOuter.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return inventoryOuterMapper.insertInventoryOuter(inventoryOuter);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改出库单
|
||||||
|
*
|
||||||
|
* @param inventoryOuter 出库单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateInventoryOuter(InventoryOuter inventoryOuter)
|
||||||
|
{
|
||||||
|
inventoryOuter.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return inventoryOuterMapper.updateInventoryOuter(inventoryOuter);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除出库单
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的出库单主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteInventoryOuterByIds(String ids)
|
||||||
|
{
|
||||||
|
return inventoryOuterMapper.deleteInventoryOuterByIds(Convert.toStrArray(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除出库单信息
|
||||||
|
*
|
||||||
|
* @param id 出库单主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteInventoryOuterById(Long id)
|
||||||
|
{
|
||||||
|
return inventoryOuterMapper.deleteInventoryOuterById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -7,16 +7,14 @@ import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.date.DateUtil;
|
|
||||||
import com.ruoyi.common.exception.ServiceException;
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
import com.ruoyi.common.utils.ShiroUtils;
|
import com.ruoyi.common.utils.ShiroUtils;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.sip.domain.InventoryInfo;
|
import com.ruoyi.sip.domain.InventoryInfo;
|
||||||
import com.ruoyi.sip.domain.VendorInfo;
|
import com.ruoyi.sip.domain.VendorInfo;
|
||||||
import com.ruoyi.sip.dto.warehouse.WarehouseInnerExcelDto;
|
|
||||||
import com.ruoyi.sip.mapper.InventoryInfoMapper;
|
|
||||||
import com.ruoyi.sip.service.IInventoryInfoService;
|
import com.ruoyi.sip.service.IInventoryInfoService;
|
||||||
|
import com.ruoyi.sip.service.IProductInfoService;
|
||||||
import com.ruoyi.sip.service.IVendorInfoService;
|
import com.ruoyi.sip.service.IVendorInfoService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
@ -24,6 +22,7 @@ import com.ruoyi.sip.mapper.OmsInventoryInnerMapper;
|
||||||
import com.ruoyi.sip.domain.OmsInventoryInner;
|
import com.ruoyi.sip.domain.OmsInventoryInner;
|
||||||
import com.ruoyi.sip.service.IOmsInventoryInnerService;
|
import com.ruoyi.sip.service.IOmsInventoryInnerService;
|
||||||
import com.ruoyi.common.core.text.Convert;
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 入库单信息Service业务层处理
|
* 入库单信息Service业务层处理
|
||||||
|
|
@ -32,6 +31,7 @@ import com.ruoyi.common.core.text.Convert;
|
||||||
* @date 2025-08-06
|
* @date 2025-08-06
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public class OmsInventoryInnerServiceImpl implements IOmsInventoryInnerService {
|
public class OmsInventoryInnerServiceImpl implements IOmsInventoryInnerService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private OmsInventoryInnerMapper omsInventoryInnerMapper;
|
private OmsInventoryInnerMapper omsInventoryInnerMapper;
|
||||||
|
|
@ -40,6 +40,8 @@ public class OmsInventoryInnerServiceImpl implements IOmsInventoryInnerService {
|
||||||
private IInventoryInfoService inventoryInfoService;
|
private IInventoryInfoService inventoryInfoService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IVendorInfoService vendorInfoService;
|
private IVendorInfoService vendorInfoService;
|
||||||
|
@Autowired
|
||||||
|
private IProductInfoService productInfoService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询入库单信息
|
* 查询入库单信息
|
||||||
|
|
@ -105,6 +107,7 @@ public class OmsInventoryInnerServiceImpl implements IOmsInventoryInnerService {
|
||||||
item.setCreateTime(nowDate);
|
item.setCreateTime(nowDate);
|
||||||
});
|
});
|
||||||
inventoryInfoService.saveBatch(inventoryInfoList);
|
inventoryInfoService.saveBatch(inventoryInfoList);
|
||||||
|
productInfoService.updateAvailableCount(omsInventoryInner.getQuantity(),omsInventoryInner.getProductCode());
|
||||||
return omsInventoryInnerMapper.insertOmsInventoryInner(omsInventoryInner);
|
return omsInventoryInnerMapper.insertOmsInventoryInner(omsInventoryInner);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -124,4 +124,9 @@ public class ProductInfoServiceImpl implements IProductInfoService
|
||||||
}
|
}
|
||||||
return productInfoMapper.selectProductInfoByCodeList(productCodeList);
|
return productInfoMapper.selectProductInfoByCodeList(productCodeList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateAvailableCount(Long quantity, String productCode) {
|
||||||
|
productInfoMapper.updateAvailableCount(quantity,productCode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -667,6 +667,7 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
||||||
headerList.add(Collections.singletonList("最终客户"));
|
headerList.add(Collections.singletonList("最终客户"));
|
||||||
headerList.add(Collections.singletonList("BG"));
|
headerList.add(Collections.singletonList("BG"));
|
||||||
headerList.add(Collections.singletonList("行业"));
|
headerList.add(Collections.singletonList("行业"));
|
||||||
|
headerList.add(Collections.singletonList("运作方"));
|
||||||
|
|
||||||
headerList.add(Collections.singletonList("进货商接口人"));
|
headerList.add(Collections.singletonList("进货商接口人"));
|
||||||
// headerList.add(Collections.singletonList("Email"));
|
// headerList.add(Collections.singletonList("Email"));
|
||||||
|
|
@ -830,7 +831,7 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
||||||
totalPrice = processProducts(deployList, maxDeployService, row, totalPrice);
|
totalPrice = processProducts(deployList, maxDeployService, row, totalPrice);
|
||||||
//添加维保
|
//添加维保
|
||||||
totalPrice = processProducts(maintenanceList, maxMaintenanceService, row, totalPrice);
|
totalPrice = processProducts(maintenanceList, maxMaintenanceService, row, totalPrice);
|
||||||
int insertIndex=17;
|
int insertIndex=18;
|
||||||
row.add(insertIndex++, wssDto.getQuantity().toString());
|
row.add(insertIndex++, wssDto.getQuantity().toString());
|
||||||
row.add(insertIndex++, wssDto.getAllPrice().toString());
|
row.add(insertIndex++, wssDto.getAllPrice().toString());
|
||||||
row.add(insertIndex++, wspDto.getQuantity().toString());
|
row.add(insertIndex++, wspDto.getQuantity().toString());
|
||||||
|
|
@ -883,7 +884,7 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
||||||
|
|
||||||
row.add(DictUtils.getDictLabel("bg_type", info.getBgProperty()));
|
row.add(DictUtils.getDictLabel("bg_type", info.getBgProperty()));
|
||||||
row.add(info.getIndustryType());
|
row.add(info.getIndustryType());
|
||||||
|
row.add(info.getProjectPartnerName());
|
||||||
row.add(info.getBusinessPerson());
|
row.add(info.getBusinessPerson());
|
||||||
// row.add(info.getBusinessEmail());
|
// row.add(info.getBusinessEmail());
|
||||||
row.add(info.getBusinessPhone());
|
row.add(info.getBusinessPhone());
|
||||||
|
|
@ -1015,6 +1016,7 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
||||||
ProjectOrderInfo dbProjectOrderInfo = projectOrderInfoMapper.selectProjectOrderInfoByCode(todo.getBusinessKey());
|
ProjectOrderInfo dbProjectOrderInfo = projectOrderInfoMapper.selectProjectOrderInfoByCode(todo.getBusinessKey());
|
||||||
ProjectOrderInfo projectOrderInfo = new ProjectOrderInfo();
|
ProjectOrderInfo projectOrderInfo = new ProjectOrderInfo();
|
||||||
projectOrderInfo.setOrderStatus(ProjectOrderInfo.OrderStatus.APPROVE_COMPLETE.getCode());
|
projectOrderInfo.setOrderStatus(ProjectOrderInfo.OrderStatus.APPROVE_COMPLETE.getCode());
|
||||||
|
projectOrderInfo.setApproveTime(DateUtils.getNowDate());
|
||||||
//修改执行单时间 只有直签且有现金折扣的时间才是配置时间 否则默认30天
|
//修改执行单时间 只有直签且有现金折扣的时间才是配置时间 否则默认30天
|
||||||
int addHour = ProjectOrderInfo.ProcessTemplateEnum.DIRECT_SIGNING.getCode().equals(dbProjectOrderInfo.getProcessTemplate())
|
int addHour = ProjectOrderInfo.ProcessTemplateEnum.DIRECT_SIGNING.getCode().equals(dbProjectOrderInfo.getProcessTemplate())
|
||||||
&& dbProjectOrderInfo.getDiscountFold() != null && dbProjectOrderInfo.getDiscountFold().compareTo(BigDecimal.ONE) < 0 ? endHour : 30;
|
&& dbProjectOrderInfo.getDiscountFold() != null && dbProjectOrderInfo.getDiscountFold().compareTo(BigDecimal.ONE) < 0 ? endHour : 30;
|
||||||
|
|
@ -1026,7 +1028,7 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
||||||
// projectInfo
|
// projectInfo
|
||||||
if (dbProjectOrderInfo.getDiscountFold().compareTo(BigDecimal.ONE)!=0){
|
if (dbProjectOrderInfo.getDiscountFold().compareTo(BigDecimal.ONE)!=0){
|
||||||
|
|
||||||
productInfoService.calcByDiscountFold(dbProjectOrderInfo.getDiscountFold(), projectOrderInfo.getProjectId());
|
productInfoService.calcByDiscountFold(dbProjectOrderInfo.getDiscountFold(), dbProjectOrderInfo.getProjectId());
|
||||||
}
|
}
|
||||||
|
|
||||||
//todo 总代 发 代理商 商务 执行单发 商务 制造商
|
//todo 总代 发 代理商 商务 执行单发 商务 制造商
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
package com.ruoyi.sip.vo;
|
||||||
|
|
||||||
|
|
||||||
|
import com.ruoyi.sip.domain.InventoryOuter;
|
||||||
|
import com.ruoyi.sip.domain.ProductInfo;
|
||||||
|
import com.ruoyi.sip.domain.ProjectOrderInfo;
|
||||||
|
import com.ruoyi.sip.dto.inventory.ProductDetail;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author : ch
|
||||||
|
* @version : 1.0
|
||||||
|
* @ClassName : ExecutionOrderVo
|
||||||
|
* @Description :
|
||||||
|
* @DATE : Created in 15:05 2025/8/8
|
||||||
|
* <pre> Copyright: Copyright(c) 2025 </pre>
|
||||||
|
* <pre> Company : 紫光汇智信息技术有限公司 </pre>
|
||||||
|
* Modification History:
|
||||||
|
* Date Author Version Discription
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* 2025/08/08 ch 1.0 Why & What is modified: <修改原因描述> *
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ExecutionOrderVo {
|
||||||
|
private ProjectOrderInfo projectOrderInfo;
|
||||||
|
private List<ProductDetail> productDetailList;
|
||||||
|
private List<InventoryOuter> inventoryOuterList;
|
||||||
|
}
|
||||||
|
|
@ -47,23 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<include refid="selectInventoryInfoVo"/>
|
<include refid="selectInventoryInfoVo"/>
|
||||||
where t1.id = #{id}
|
where t1.id = #{id}
|
||||||
</select>
|
</select>
|
||||||
<select id="listGroup" resultType="com.ruoyi.sip.dto.inventory.GroupInfo">
|
|
||||||
|
|
||||||
select t1.product_code, t1.available_count, t1.reserved_count, t2.model, t2.product_name, t3.vendor_name
|
|
||||||
from (SELECT product_code,
|
|
||||||
COUNT(CASE WHEN inventory_status = 0 THEN 1 END) AS available_count,
|
|
||||||
COUNT(CASE WHEN inventory_status = 1 THEN 1 END) AS reserved_count
|
|
||||||
FROM oms_inventory_info
|
|
||||||
GROUP BY product_code) t1
|
|
||||||
left join product_info t2 on t1.product_code = t2.product_code
|
|
||||||
left join oms_vendor_info t3 on t2.vendor_code = t3.vendor_code
|
|
||||||
<where>
|
|
||||||
<if test="productCode != null and productCode != ''">and t1.product_code like concat( #{productCode},'%')</if>
|
|
||||||
<if test="model != null and model != ''">and t2.model = #{model}</if>
|
|
||||||
<if test="productName != null and productName != ''">and t2.product_name like concat('%',#{productName},'%')</if>
|
|
||||||
<if test="vendorName != null and vendorName != ''">and t3.vendor_name like concat('%',#{vendorName},'%')</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<insert id="insertInventoryInfo" parameterType="InventoryInfo" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertInventoryInfo" parameterType="InventoryInfo" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into oms_inventory_info
|
insert into oms_inventory_info
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,125 @@
|
||||||
|
<?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.InventoryOuterMapper">
|
||||||
|
|
||||||
|
<resultMap type="InventoryOuter" id="InventoryOuterResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="outerCode" column="outer_code" />
|
||||||
|
<result property="productCode" column="product_code" />
|
||||||
|
<result property="quantity" column="quantity" />
|
||||||
|
<result property="outerStatus" column="outer_status" />
|
||||||
|
<result property="orderCode" column="order_code" />
|
||||||
|
<result property="contactPerson" column="contact_person" />
|
||||||
|
<result property="contactPhone" column="contact_phone" />
|
||||||
|
<result property="contactAddress" column="contact_address" />
|
||||||
|
<result property="deliveryTime" column="delivery_time" />
|
||||||
|
<result property="deliveryTimeType" column="delivery_time_type" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectInventoryOuterVo">
|
||||||
|
select id, outer_code, product_code, quantity, outer_status, order_code, contact_person, contact_phone, contact_address, delivery_time, delivery_time_type, create_by, update_by, create_time, update_time from oms_inventory_outer
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectInventoryOuterList" parameterType="InventoryOuter" resultMap="InventoryOuterResult">
|
||||||
|
<include refid="selectInventoryOuterVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="outerCode != null and outerCode != ''">and outer_code = #{outerCode}</if>
|
||||||
|
<if test="productCode != null and productCode != ''">and product_code = #{productCode}</if>
|
||||||
|
<if test="productCodeList != null and productCodeList.size>0">and product_code in
|
||||||
|
<foreach item="item" index="index" collection="productCodeList" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="quantity != null ">and quantity = #{quantity}</if>
|
||||||
|
<if test="outerStatus != null and outerStatus != ''">and outer_status = #{outerStatus}</if>
|
||||||
|
<if test="orderCode != null and orderCode != ''">and order_code = #{orderCode}</if>
|
||||||
|
<if test="contactPerson != null and contactPerson != ''">and contact_person = #{contactPerson}</if>
|
||||||
|
<if test="contactPhone != null and contactPhone != ''">and contact_phone = #{contactPhone}</if>
|
||||||
|
<if test="contactAddress != null and contactAddress != ''">and contact_address = #{contactAddress}</if>
|
||||||
|
<if test="deliveryTime != null ">and delivery_time = #{deliveryTime}</if>
|
||||||
|
<if test="deliveryTimeType != null and deliveryTimeType != ''">and delivery_time_type =
|
||||||
|
#{deliveryTimeType}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectInventoryOuterById" parameterType="Long" resultMap="InventoryOuterResult">
|
||||||
|
<include refid="selectInventoryOuterVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertInventoryOuter" parameterType="InventoryOuter" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into oms_inventory_outer
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="outerCode != null">outer_code,</if>
|
||||||
|
<if test="productCode != null">product_code,</if>
|
||||||
|
<if test="quantity != null">quantity,</if>
|
||||||
|
<if test="outerStatus != null">outer_status,</if>
|
||||||
|
<if test="orderCode != null">order_code,</if>
|
||||||
|
<if test="contactPerson != null">contact_person,</if>
|
||||||
|
<if test="contactPhone != null">contact_phone,</if>
|
||||||
|
<if test="contactAddress != null">contact_address,</if>
|
||||||
|
<if test="deliveryTime != null">delivery_time,</if>
|
||||||
|
<if test="deliveryTimeType != null">delivery_time_type,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="outerCode != null">#{outerCode},</if>
|
||||||
|
<if test="productCode != null">#{productCode},</if>
|
||||||
|
<if test="quantity != null">#{quantity},</if>
|
||||||
|
<if test="outerStatus != null">#{outerStatus},</if>
|
||||||
|
<if test="orderCode != null">#{orderCode},</if>
|
||||||
|
<if test="contactPerson != null">#{contactPerson},</if>
|
||||||
|
<if test="contactPhone != null">#{contactPhone},</if>
|
||||||
|
<if test="contactAddress != null">#{contactAddress},</if>
|
||||||
|
<if test="deliveryTime != null">#{deliveryTime},</if>
|
||||||
|
<if test="deliveryTimeType != null">#{deliveryTimeType},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateInventoryOuter" parameterType="InventoryOuter">
|
||||||
|
update oms_inventory_outer
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="outerCode != null">outer_code = #{outerCode},</if>
|
||||||
|
<if test="productCode != null">product_code = #{productCode},</if>
|
||||||
|
<if test="quantity != null">quantity = #{quantity},</if>
|
||||||
|
<if test="outerStatus != null">outer_status = #{outerStatus},</if>
|
||||||
|
<if test="orderCode != null">order_code = #{orderCode},</if>
|
||||||
|
<if test="contactPerson != null">contact_person = #{contactPerson},</if>
|
||||||
|
<if test="contactPhone != null">contact_phone = #{contactPhone},</if>
|
||||||
|
<if test="contactAddress != null">contact_address = #{contactAddress},</if>
|
||||||
|
<if test="deliveryTime != null">delivery_time = #{deliveryTime},</if>
|
||||||
|
<if test="deliveryTimeType != null">delivery_time_type = #{deliveryTimeType},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteInventoryOuterById" parameterType="Long">
|
||||||
|
delete from oms_inventory_outer where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteInventoryOuterByIds" parameterType="String">
|
||||||
|
delete from oms_inventory_outer where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -40,16 +40,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
select id, project_id,province, city, business_person, business_email, business_phone, order_code, currencyType,
|
select id, project_id,province, city, business_person, business_email, business_phone, order_code, currencyType,
|
||||||
shipment_amount, actual_purchase_amount, order_end_time, delivery_time, company_delivery, notifier,
|
shipment_amount, actual_purchase_amount, order_end_time, delivery_time, company_delivery, notifier,
|
||||||
notifier_email, notifier_phone, duty, duty_email, duty_phone, order_channel, partner_code, supplier,notifier_address,
|
notifier_email, notifier_phone, duty, duty_email, duty_phone, order_channel, partner_code, supplier,notifier_address,
|
||||||
remark, order_status, create_by, create_time, update_by, update_time,version_code,process_type,process_template,discount_fold from project_order_info t1
|
remark, order_status, create_by, create_time, update_by, update_time,version_code,process_type,process_template,discount_fold,
|
||||||
|
delivery_status,sign_status,outer_status,approve_time
|
||||||
|
|
||||||
|
from project_order_info t1
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="selectProjectOrderInfoRelationVo">
|
<sql id="selectProjectOrderInfoRelationVo">
|
||||||
select t1.id, t1.project_id,t1.province, t1.city, t1.business_person, t1.business_email, t1.business_phone, t1.order_code, t1.currencyType,
|
select t1.id, t1.project_id,t1.province, t1.city, t1.business_person, t1.business_email, t1.business_phone, t1.order_code, t1.currencyType,
|
||||||
t1.shipment_amount, t1.actual_purchase_amount, t1.order_end_time, t1.delivery_time, t1.company_delivery, t1.notifier,
|
t1.shipment_amount, t1.actual_purchase_amount, t1.order_end_time, t1.delivery_time, t1.company_delivery, t1.notifier,
|
||||||
t1.notifier_email, t1.notifier_phone, t1.duty, t1.duty_email, t1.duty_phone, t1.order_channel, t1.partner_code, t1.supplier,
|
t1.notifier_email, t1.notifier_phone, t1.duty, t1.duty_email, t1.duty_phone, t1.order_channel, t1.partner_code, t1.supplier,
|
||||||
t1.remark, t1.order_status, t1.create_by, t1.create_time, t1.update_by, t1.update_time,t1.partner_user_name,t1.partner_email
|
t1.remark, t1.order_status, t1.create_by, t1.create_time, t1.update_by, t1.update_time,t1.partner_user_name,t1.partner_email
|
||||||
,t1.partner_phone,t1.version_code,t1.process_type,t1.process_template,t1.discount_fold,t1.notifier_address
|
,t1.partner_phone,t1.version_code,t1.process_type,t1.process_template,t1.discount_fold,t1.notifier_address,
|
||||||
|
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.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
|
||||||
,t4.agent_name
|
,t4.agent_name
|
||||||
,t5.user_name as duty_name
|
,t5.user_name as duty_name
|
||||||
|
|
@ -109,6 +113,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
</choose>
|
</choose>
|
||||||
</if>
|
</if>
|
||||||
|
<if test="approveTimeStart != null or approveTimeEnd != null">
|
||||||
|
<choose>
|
||||||
|
<when test="approveTimeStart != null and approveTimeEnd != null">
|
||||||
|
and t1.approve_time between date_format(#{approveTimeStart}, '%Y-%m-%d 00:00:00') and date_format(#{approveTimeEnd}, '%Y-%m-%d 23:59:59')
|
||||||
|
</when>
|
||||||
|
<when test="deliveryTimeStart != null">
|
||||||
|
and t1.approve_time <![CDATA[ >= ]]> date_format(#{approveTimeStart}, '%Y-%m-%d 00:00:00')
|
||||||
|
</when>
|
||||||
|
<when test="approveTimeEnd != null">
|
||||||
|
and t1.approve_time <![CDATA[ <= ]]> date_format(#{approveTimeEnd}, '%Y-%m-%d 23:59:59')
|
||||||
|
</when>
|
||||||
|
|
||||||
|
</choose>
|
||||||
|
</if>
|
||||||
<if test="estimatedOrderTimeStart != null or estimatedOrderTimeEnd != null">
|
<if test="estimatedOrderTimeStart != null or estimatedOrderTimeEnd != null">
|
||||||
<choose>
|
<choose>
|
||||||
<when test="estimatedOrderTimeStart != null and estimatedOrderTimeEnd != null">
|
<when test="estimatedOrderTimeStart != null and estimatedOrderTimeEnd != null">
|
||||||
|
|
@ -298,6 +316,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="approveTime != null">approve_time = #{approveTime},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
@ -310,6 +329,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="businessPerson != null">business_person = #{businessPerson},</if>
|
<if test="businessPerson != null">business_person = #{businessPerson},</if>
|
||||||
<if test="businessEmail != null">business_email = #{businessEmail},</if>
|
<if test="businessEmail != null">business_email = #{businessEmail},</if>
|
||||||
<if test="businessPhone != null">business_phone = #{businessPhone},</if>
|
<if test="businessPhone != null">business_phone = #{businessPhone},</if>
|
||||||
|
<if test="approveTime != null">approve_time = #{approveTime},</if>
|
||||||
|
|
||||||
<if test="versionCode != null">
|
<if test="versionCode != null">
|
||||||
<choose>
|
<choose>
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
<sql id="selectProductInfoVo">
|
<sql id="selectProductInfoVo">
|
||||||
select t1.id, t1.product_code, t1.product_name, t1.model, t1.description, t1.remark, t1.created_at, t1.updated_at,
|
select t1.id, t1.product_code, t1.product_name, t1.model, t1.description, t1.remark, t1.created_at, t1.updated_at,
|
||||||
t1.deleted_at,t1.value,t1.type,t1.hz_code,t1.catalogue_price,t1.guidance_discount,t1.vendor_code
|
t1.deleted_at,t1.value,t1.type,t1.hz_code,t1.catalogue_price,t1.guidance_discount,t1.vendor_code,t1.available_count,t1.cumulative_count
|
||||||
,t2.vendor_name
|
,t2.vendor_name
|
||||||
from product_info t1 left join oms_vendor_info t2 on t1.vendor_code = t2.vendor_code
|
from product_info t1 left join oms_vendor_info t2 on t1.vendor_code = t2.vendor_code
|
||||||
</sql>
|
</sql>
|
||||||
|
|
@ -35,6 +35,7 @@
|
||||||
<if test="model != null and model != ''"> and t1.model like concat('%', #{model}, '%')</if>
|
<if test="model != null and model != ''"> and t1.model like concat('%', #{model}, '%')</if>
|
||||||
<if test="type != null and type != ''"> and find_in_set(t1.type , #{type})</if>
|
<if test="type != null and type != ''"> and find_in_set(t1.type , #{type})</if>
|
||||||
<if test="vendorName != null and vendorName != ''"> and t2.vendor_name like concat('%', #{vendorName}, '%')</if>
|
<if test="vendorName != null and vendorName != ''"> and t2.vendor_name like concat('%', #{vendorName}, '%')</if>
|
||||||
|
<if test="vendorCode != null and vendorCode != ''"> and t1.vendor_code = #{vendorCode}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -147,6 +148,16 @@
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateAvailableCount">
|
||||||
|
update product_info
|
||||||
|
set available_count=ifnull(available_count,0) + #{quantity}
|
||||||
|
where product_code = #{productCode}
|
||||||
|
</update>
|
||||||
|
<update id="updateCumulativeCount">
|
||||||
|
update product_info
|
||||||
|
set cumulative_count=ifnull(cumulative_count,0) + #{quantity}
|
||||||
|
where product_code = #{productCode}
|
||||||
|
</update>
|
||||||
|
|
||||||
<delete id="deleteProductInfoById" parameterType="Long">
|
<delete id="deleteProductInfoById" parameterType="Long">
|
||||||
update product_info set status=1, deleted_at=now() where id = #{id}
|
update product_info set status=1, deleted_at=now() where id = #{id}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue