From deb789b123fc47b37859da8a6dd16910cf7c96cb Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期五, 26 一月 2024 16:00:15 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
---
north-glass-erp/src/main/resources/mapper/mm/FinishedOperateLog.xml | 37 +-
/dev/null | 90 -----
north-glass-erp/target/classes/mapper/mm/FinishedOperateLog.xml | 37 +-
north-glass-erp/src/main/java/com/example/erp/service/mm/FinishedGoodsInventoryService.java | 66 ++++
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/CreateProductStock.vue | 311 ++++++++++++-------
north-glass-erp/src/main/java/com/example/erp/controller/mm/FinishedGoodsInventoryController.java | 24 +
north-glass-erp/pom.xml | 19
north-glass-erp/src/main/resources/mapper/mm/FinishedGoodsInventory.xml | 281 +++++++++++++++--
north-glass-erp/src/main/java/com/example/erp/entity/mm/FinishedOperateLog.java | 5
north-glass-erp/src/main/java/com/example/erp/mapper/mm/FinishedGoodsInventoryMapper.java | 27 +
north-glass-erp/src/main/java/com/example/erp/mapper/mm/FinishedOperateLogMapper.java | 9
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ProductStockList.vue | 6
12 files changed, 617 insertions(+), 295 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/CreateProductStock.vue b/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/CreateProductStock.vue
index 0063324..6cee0e5 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/CreateProductStock.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/CreateProductStock.vue
@@ -2,7 +2,12 @@
import {reactive, ref} from "vue";
import {useRouter} from 'vue-router'
+import request from "@/utils/request";
+import deepClone from "@/utils/deepClone";
+import VXETable from "vxe-table";
let router=useRouter()
+let produceList = ref([])
+let tableRef = ref([])
const getTableRow = (row,type) =>{
switch (type) {
case 'edit' :{
@@ -21,6 +26,109 @@
}
}
}
+
+
+
+const hasDecimal=(value)=>{
+ const regex=/\./ // 瀹氫箟姝e垯琛ㄨ揪寮忥紝鏌ユ壘灏忔暟鐐�
+ return regex.test(value) //杩斿洖true/false
+}
+
+const hasDecimalhtml=(item,row)=>{
+ let aa=item.split('.').length
+ if (aa===2){
+ return row[item.split('.')[0]][item.split('.')[1]]
+ }else if(aa===3){
+ return row[item.split('.')[0]][item.split('.')[1]][item.split('.')[2]]
+ }
+
+
+}
+
+
+//绛涢�夋潯浠讹紝鏈夊閿渶瑕佸厛瀹氫箟鏄庣粏閲岄潰鐨勬暟鎹�
+let filterData = ref({
+ orderDetail:{
+ orderNumber:'',
+ productName:'',
+ productId:'',
+ width:'',
+ height:'',
+ quantity:''
+ },
+ order:{
+ orderId:'',
+ creater:'',
+ project:'',
+ area:'',
+ batch:''
+
+ }
+})
+
+
+//绗竴娆¤皟鐢�
+request.post("/FinishedGoodsInventory/getseletwarehousing/1/100",filterData.value).then((res) => {
+
+ if(res.code==200){
+ console.log(res.data)
+ pageTotal.value=res.data.total
+ pageNum=1
+ produceList = deepClone(res.data.data)
+ xGrid.value.loadData(produceList)
+ gridOptions.loading=false
+ }else{
+ ElMessage.warning(res.msg)
+ router.push("/login")
+ }
+})
+
+
+//瀹氫箟椤甸潰鎬婚〉鏁�
+let pageTotal=ref('')
+//瀹氫箟褰撳墠椤垫暟
+let pageNum=$ref(1)
+let pageState = null
+
+/*浣跨敤绛涢�夛紝鍚庣鑾峰彇鏁版嵁*/
+const changeFilterEvent = (event, option, $panel,) => {
+ // 鎵嬪姩瑙﹀彂绛涢��
+ $panel.changeOption(event, !!option.data, option)
+}
+function filterChanged(column){
+ gridOptions.loading=true
+ //绛涢�夋潯浠跺彂鐢熷彉鍖栨潯浠跺彂鐢熷彉鍖�
+ let value = column.datas[0]!=undefined?column.datas[0]:''
+ value = value.trim()
+ //鍒ゆ柇鏄惁瀛樺湪澶栭敭
+ if (column.property.indexOf('.')>-1){
+ const columnArr = column.property.split('.')
+ filterData.value[columnArr[0]] = {
+ [columnArr[1]]:value
+ }
+ }else{
+ filterData.value[column.property] = value
+ }
+ request.post("/FinishedGoodsInventory/getseletwarehousing/1/100",filterData.value).then((res) => {
+
+ if(res.code==200){
+ console.log(res.data)
+ pageTotal.value=res.data.total
+ pageNum=1
+ produceList = deepClone(res.data.data)
+ xGrid.value.loadData(produceList)
+ gridOptions.loading=false
+ }else{
+ ElMessage.warning(res.msg)
+ router.push("/login")
+ }
+ })
+}
+
+
+
+
+
@@ -55,32 +163,29 @@
showStatus: true
},//琛ㄥご鍙傛暟
columns:[
- {type:'expand',fixed:"left",slots: { content:'content' },width: '50'},
+ {type:'expand',fixed:"left",slots: { content:'content' },width: '60'},
{ type: 'checkbox',fixed:"left", title: '閫夋嫨', width: '80' },
{ type: 'seq',fixed:"left", title: '鑷簭', width: '80' },
// {title: '鎿嶄綔', width: '220', slots: { default: 'button_slot' },fixed:"left"},
- {field: 'SalesOrderNumber', width: '150',title: '閿�鍞崟鍙�', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
- {field: 'floorNumber', width: '120',title: '妤煎眰缂栧彿', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
- {field: 'finishedProductNumber',width: '100', title: '浜у搧缂栧彿', sortable: true,showOverflow:"ellipsis"},
- {field: 'productName',width: '100', title: '浜у搧鍚嶇О', sortable: true},
- {field: 'length', width: '100',title: '闀垮害', sortable: true},
- {field: 'width',width: '100', title: '瀹藉害', sortable: true},
- {field: 'salesperson', width: '100',title: '涓氬姟鍛�', sortable: true},
- {field: 'projectName', width: '100',title: '椤圭洰鍚嶇О', sortable: true},
- {field: 'orderNumber',width: '140', title: '璁㈠簭', sortable: true},
- {field: 'totalOrders',width: '140', title: '璁㈠崟鎬绘暟', sortable: true},
- {field: 'quantity',width: '100', title: '鏁伴噺', sortable: true},
- {field: 'completion',width: '140', title: '瀹屽伐', sortable: true},
- {field: 'area',width: '140', title: '闈㈢Н', sortable: true},
- {field: 'processCardNumber',width: '100', title: '娴佺▼鍗″彿', sortable: true},
- {field: 'quantityEntered',width: '100', title: '宸插叆鏁伴噺', sortable: true},
- {field: 'nextProcess',width: '100', title: ' 涓嬪伐搴�', sortable: true},
- {field: 'Batch',width: '100', title: '鎵规', sortable: true},
+ {field: 'order.orderId', width: '150',title: '閿�鍞崟鍙�', showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'orderDetail.buildingNumber', width: '120',title: '妤煎彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'orderDetail.productId',width: '100', title: '浜у搧缂栧彿', filters:[{ data: '' }],showOverflow:"ellipsis",slots: { filter: 'num1_filter' }},
+ {field: 'orderDetail.productName',width: '100', title: '浜у搧鍚嶇О', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'orderDetail.width', width: '100',title: '瀹藉害', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'orderDetail.height',width: '100', title: '楂樺害', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'order.creater', width: '100',title: '涓氬姟鍛�', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'order.project', width: '100',title: '椤圭洰鍚嶇О', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'orderNumber',width: '140', title: '璁㈠簭', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'orderDetail.quantity',width: '140', title: '璁㈠崟鎬绘暟', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'inventoryQuantity',width: '100', title: '瀹屽伐鏁伴噺', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'order.area',width: '140', title: '闈㈢Н', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'processId',width: '100', title: '娴佺▼鍗″彿', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'receivedQuantity',width: '100', title: '宸插叆鏁伴噺', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'order.batch',width: '100', title: '鎵规', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
],//琛ㄥご鎸夐挳
toolbarConfig: {
buttons: [{
'name': '纭鍏ュ簱',status: 'primary',
-
'code':'add'
}
],
@@ -89,103 +194,15 @@
print: true,
zoom: true,
custom: true
- },
- data: [
- {
- "SalesOrderNumber": "NG23072003",
- "floorNumber": "10059419",
- "finishedProductNumber": "0604000027",
- "finishedProductName": "NG23072003A01",
- "productName": '閽㈠寲鐜荤拑',
- "length": "1075.00",
- "width": "440.00",
- "salesperson": "灏忓渤",
- "customerName": "澶уご",
- "projectName": "Tempered Glass",
- "orderNumber": "1",
- "totalOrders": "3800",
- "quantity": "1140",
- "completion":'1140',
- "area": "505.270000",
- "processCardNumber": "NG23112311A01",
- "quantityEntered": "0",
- "nextProcess": "Finished Product",
- "Batch": "涓�",
- },
- {
- "SalesOrderNumber": "NG23072003",
- "floorNumber": "10059419",
- "finishedProductNumber": "0604000027",
- "finishedProductName": "NG23072003A01",
- "productName": '閽㈠寲鐜荤拑',
- "length": "1075.00",
- "width": "440.00",
- "salesperson": "灏忓渤",
- "customerName": "澶уご",
- "projectName": "Tempered Glass",
- "orderNumber": "1",
- "totalOrders": "3800",
- "quantity": "1140",
- "completion":'1140',
- "area": "505.270000",
- "processCardNumber": "NG23112311A01",
- "quantityEntered": "0",
- "nextProcess": "Finished Product",
- "Batch": "涓�",
- },
- {
- "SalesOrderNumber": "NG23072003",
- "floorNumber": "10059419",
- "finishedProductNumber": "0604000027",
- "finishedProductName": "NG23072003A01",
- "productName": '閽㈠寲鐜荤拑',
- "length": "1075.00",
- "width": "440.00",
- "salesperson": "灏忓渤",
- "customerName": "澶уご",
- "projectName": "Tempered Glass",
- "orderNumber": "1",
- "totalOrders": "3800",
- "quantity": "1140",
- "completion":'1140',
- "area": "505.270000",
- "processCardNumber": "NG23112311A01",
- "quantityEntered": "0",
- "nextProcess": "Finished Product",
- "Batch": "涓�",
- },
- {
- "SalesOrderNumber": "NG23072003",
- "floorNumber": "10059419",
- "finishedProductNumber": "0604000027",
- "finishedProductName": "NG23072003A01",
- "productName": '閽㈠寲鐜荤拑',
- "length": "1075.00",
- "width": "440.00",
- "salesperson": "灏忓渤",
- "customerName": "澶уご",
- "projectName": "Tempered Glass",
- "orderNumber": "1",
- "totalOrders": "3800",
- "quantity": "1140",
- "completion":'1140',
- "area": "505.270000",
- "processCardNumber": "NG23112311A01",
- "quantityEntered": "0",
- "nextProcess": "Finished Product",
- "Batch": "涓�",
- },
-
- ],//table body瀹為檯鏁版嵁
+ }
+ ,//table body瀹為檯鏁版嵁
footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
return[
columns.map((column, columnIndex) => {
if (columnIndex === 0) {
- return '鍚堣:'
+ return `椤垫暟:${pageNum}/${pageTotal.value}`
}
- // if (props.tableProp.footList.includes(column.field)) {
- // return sumNum(data, column.field)
- // }
+
return ''
})
]
@@ -193,14 +210,64 @@
})
const xGrid = ref();
+const storageRegion = ref(null);
+const remark = ref(null);
+const flowcard = ref(null);
const gridEvents = {
toolbarButtonClick ({ code }) {
const $grid = xGrid.value
if ($grid) {
switch (code) {
case 'add': {
- alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
- return;
+ //鍒ゆ柇杈撳叆妗嗗�间笉鑳戒负null
+ if(storageRegion.value!==null && storageRegion.value!=""){
+ const $table = xGrid.value
+ if ($table) {
+ const selectRecords = $table.getCheckboxRecords()
+ //寰幆鑾峰彇閫変腑鐨勫閫夋
+ for (let i=0;i<selectRecords.length;i++){
+ //瀹氫箟鍚庣闇�瑕佺殑鍙傛暟
+ let flowData = ref({
+ finishedGoodsInventory:{
+ storageRegion:storageRegion.value,
+ remark:remark.value
+ },
+
+ flowcard:selectRecords[0]
+ })
+ console.log(flowcard.value)
+ request.post("/FinishedGoodsInventory/addseletwarehousing",flowData.value).then((res) => {
+ /* request.post("/FinishedGoodsInventory/addseletwarehousing/"+storageRegion.value+"/"+remark.value,flowData.value).then((res) => {*/
+ if(res.code===200){
+ alert(`鍏ュ簱鎴愬姛`)
+ request.post("/FinishedGoodsInventory/getseletwarehousing/1/100",filterData.value).then((res) => {
+
+ if(res.code===200){
+ console.log(res.data)
+ pageTotal.value=res.data.total
+ pageNum=1
+ produceList = deepClone(res.data.data)
+ xGrid.value.loadData(produceList)
+ gridOptions.loading=false
+ }else{
+ ElMessage.warning(res.msg)
+ router.push("/login")
+ }
+ })
+ }else{
+ ElMessage.warning(res.msg)
+ router.push("/login")
+ }
+ })
+ }
+ }
+ return;
+
+
+ }else{
+ alert(`璇疯緭鍏ュ簱浣峘)
+ }
+
}
}
@@ -213,6 +280,17 @@
<template>
<div class="main-div-customer">
+ <div id="selectForm">
+ <el-input style="width: 200px" v-model="storageRegion" class="m-2" placeholder="璇疯緭鍏ュ簱浣�">
+ </el-input>
+ <el-input style="width: 200px" v-model="remark" class="m-2" placeholder="璇疯緭鍏ュ娉�">
+ </el-input>
+
+
+
+ </div>
+
+
<vxe-grid
max-height="100%"
@filter-change="filterChanged"
@@ -225,9 +303,10 @@
<!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
<template #content="{ row}">
<ul class="expand-wrapper">
- <li v-for="(item,key,index) in row">
- <span style="font-weight: bold">{{key+': '}}</span>
- <span>{{ item }}</span>
+ <li v-for="(item,key,index) in gridOptions.columns" v-show="item.field!=undefined ">
+ <span style="font-weight: bold">{{item.title+': '}}</span>
+ <span v-if="hasDecimal(item.field)">{{ hasDecimalhtml(item.field,row) }}</span>
+ <span v-else>{{ row[item.field] }}</span>
</li>
</ul>
</template>
diff --git a/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ProductStockList.vue b/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ProductStockList.vue
index b6c783f..dc100ed 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ProductStockList.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ProductStockList.vue
@@ -161,8 +161,8 @@
{field: 'order.orderId', width: '150',title: '閿�鍞崟鍙�',showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
{field: 'order.project', width: '120',title: '椤圭洰鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
{field: 'order.orderType', width: '100',title: '璁㈠崟绫诲瀷', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
- {field: 'orderDetail.product.productName', width: '100',title: '浜у搧鍚嶇О', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
- {field: 'orderDetail.product.id',width: '100', title: '浜у搧缂栧彿', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'orderDetail.productName', width: '100',title: '浜у搧鍚嶇О', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'orderDetail.productId',width: '100', title: '浜у搧缂栧彿', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
{field: 'orderDetail.width', width: '100',title: '瀹藉害',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
{field: 'orderDetail.height',width: '100', title: '楂樺害', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
@@ -172,7 +172,7 @@
{field: 'actualSignalArea',width: '140', title: '瀹為檯鍗曠墖闈㈢Н', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
{field: 'area',width: '100', title: '鎬婚潰绉�', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
- {field: 'warehouseNumber',width: '100', title: '浠撳簱缂栧彿', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ /*{field: 'warehouseNumber',width: '100', title: '浠撳簱缂栧彿', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},*/
{field: 'storageRegion',width: '100', title: '搴撳瓨鍖哄煙', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
{field: 'status',width: '100', title: '鐘舵��', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
diff --git a/north-glass-erp/pom.xml b/north-glass-erp/pom.xml
index 7d7140c..5123162 100644
--- a/north-glass-erp/pom.xml
+++ b/north-glass-erp/pom.xml
@@ -78,7 +78,7 @@
<version>3.5.1</version>
</dependency>
-<!-- SwaggerUi-->
+ <!-- SwaggerUi-->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
@@ -102,11 +102,11 @@
<artifactId>spring-boot-starter-cache</artifactId>
</dependency>
-<!--websocket-->
-<!-- <dependency>-->
-<!-- <groupId>org.springframework.boot</groupId>-->
-<!-- <artifactId>spring-boot-starter-websocket</artifactId>-->
-<!-- </dependency>-->
+ <!--websocket-->
+ <!-- <dependency>-->
+ <!-- <groupId>org.springframework.boot</groupId>-->
+ <!-- <artifactId>spring-boot-starter-websocket</artifactId>-->
+ <!-- </dependency>-->
<dependency>
<groupId>io.netty</groupId>
@@ -119,6 +119,11 @@
<artifactId>fastjson</artifactId>
<version>1.2.24</version>
<scope>import</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.data</groupId>
+ <artifactId>spring-data-commons</artifactId>
+ <version>2.5.8</version>
</dependency>
</dependencies>
@@ -168,4 +173,4 @@
</snapshots>
</pluginRepository>
</pluginRepositories>-->
-</project>
+</project>
\ No newline at end of file
diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/mm/FinishedGoodsInventoryController.java b/north-glass-erp/src/main/java/com/example/erp/controller/mm/FinishedGoodsInventoryController.java
index 7544332..6f36346 100644
--- a/north-glass-erp/src/main/java/com/example/erp/controller/mm/FinishedGoodsInventoryController.java
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/mm/FinishedGoodsInventoryController.java
@@ -1,10 +1,18 @@
package com.example.erp.controller.mm;
+
+
+import com.example.erp.common.Constants;
import com.example.erp.common.Result;
+import com.example.erp.entity.pp.FlowCard;
+import com.example.erp.exception.ServiceException;
import com.example.erp.service.mm.FinishedGoodsInventoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.example.erp.entity.mm.FinishedGoodsInventory;
+
+
+import java.util.Map;
@RestController
@RequestMapping("/FinishedGoodsInventory")
@@ -17,4 +25,20 @@
System.out.println(finishedGoodsInventory);
return Result.seccess(finishedGoodsInventoryService.defaultDateFinishedGoodsInventory(pageNum,pageSize,finishedGoodsInventory));
}
+
+ @PostMapping("/getseletwarehousing/{pageNum}/{pageSize}")
+ public Result getseletwarehousing(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody FlowCard flowCard){
+ System.out.println(flowCard);
+ return Result.seccess(finishedGoodsInventoryService.getseletwarehousing(pageNum,pageSize,flowCard));
+ }
+
+ @PostMapping("/addseletwarehousing")
+ public Result addseletwarehousing( @RequestBody Map<String,Map<String,Object>> object){
+ if(finishedGoodsInventoryService.addseletwarehousing(object)){
+ return Result.seccess();
+ }else {
+ throw new ServiceException(Constants.Code_500,"鍏ュ簱澶辫触");
+
+ }
+ }
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/entity/mm/FinishedOperateLog.java b/north-glass-erp/src/main/java/com/example/erp/entity/mm/FinishedOperateLog.java
index 80c328e..2e74943 100644
--- a/north-glass-erp/src/main/java/com/example/erp/entity/mm/FinishedOperateLog.java
+++ b/north-glass-erp/src/main/java/com/example/erp/entity/mm/FinishedOperateLog.java
@@ -13,10 +13,13 @@
private Long id;
private String operationOrderNumber;
private Long productNumber;
- private Integer operationNumber ;
+ private Integer operationNumber;
+ private Integer quantity;
private String operateType;
private String operator;
private LocalDate operateTime;
+ private String staterOperationOrderNumber;
+ private String endOperationOrderNumber;;
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/mapper/mm/FinishedGoodsInventoryMapper.java b/north-glass-erp/src/main/java/com/example/erp/mapper/mm/FinishedGoodsInventoryMapper.java
index 3f1a8cb..1bfa322 100644
--- a/north-glass-erp/src/main/java/com/example/erp/mapper/mm/FinishedGoodsInventoryMapper.java
+++ b/north-glass-erp/src/main/java/com/example/erp/mapper/mm/FinishedGoodsInventoryMapper.java
@@ -1,17 +1,42 @@
package com.example.erp.mapper.mm;
import com.example.erp.entity.mm.FinishedGoodsInventory;
+import com.example.erp.entity.pp.FlowCard;
+import com.example.erp.entity.sd.Order;
+import com.example.erp.entity.sd.OrderDetail;
import com.example.erp.entity.sd.Product;
+import com.example.erp.entity.userInfo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
+import org.springframework.data.repository.CrudRepository;
import java.util.List;
@Mapper
-public interface FinishedGoodsInventoryMapper {
+public interface FinishedGoodsInventoryMapper extends CrudRepository<FinishedGoodsInventory,Long> {
+
+
+
List<FinishedGoodsInventory> defaultfinishedGoods(@Param("offset") Integer offset,
@Param("pageSize") Integer pageSize,
@Param("finishedGoodsInventory") FinishedGoodsInventory finishedGoodsInventory);
Integer getPageTotal(Integer offset, Integer pageSize,FinishedGoodsInventory finishedGoodsInventory);
+
+ List<FlowCard> getseletwarehousing(@Param("offset") Integer offset,
+ @Param("pageSize") Integer pageSize,
+ @Param("flowCard") FlowCard flowCard);
+
+ Integer getseletwarehousingPageTotal(Integer offset, Integer pageSize,FlowCard flowCard);
+
+ Integer findOrderNumberdcount(Integer orderNumber);
+
+ Boolean updateInventory(FlowCard flowCard);
+ Boolean updateflowcard(FlowCard flowCard);
+
+ Boolean insertFinishedGoodsInventory(@Param("flowCard") FlowCard flowCard,
+ @Param("storageRegion") String storageRegion,
+ @Param("remark") String remark);
}
+
+
diff --git a/north-glass-erp/src/main/java/com/example/erp/mapper/mm/FinishedOperateLogMapper.java b/north-glass-erp/src/main/java/com/example/erp/mapper/mm/FinishedOperateLogMapper.java
index 523b395..8552966 100644
--- a/north-glass-erp/src/main/java/com/example/erp/mapper/mm/FinishedOperateLogMapper.java
+++ b/north-glass-erp/src/main/java/com/example/erp/mapper/mm/FinishedOperateLogMapper.java
@@ -1,12 +1,17 @@
package com.example.erp.mapper.mm;
+import com.example.erp.entity.mm.FinishedGoodsInventory;
import com.example.erp.entity.mm.FinishedOperateLog;
+import com.example.erp.entity.pp.FlowCard;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
+import org.springframework.data.repository.CrudRepository;
import java.util.List;
@Mapper
-public interface FinishedOperateLogMapper {
- List<FinishedOperateLog> defaultProduct(@Param("offset") Integer offset, @Param("pageSize") Integer pageSize);
+public interface FinishedOperateLogMapper extends CrudRepository<FinishedOperateLog,Long> {
+ FinishedOperateLog getselectFinishedOperateLog();
+
+ Boolean insertFinishedOperateLog(FlowCard flowCard);
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/mm/FinishedGoodsInventoryService.java b/north-glass-erp/src/main/java/com/example/erp/service/mm/FinishedGoodsInventoryService.java
index 134017d..b3ac882 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/mm/FinishedGoodsInventoryService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/mm/FinishedGoodsInventoryService.java
@@ -1,11 +1,19 @@
package com.example.erp.service.mm;
+import com.alibaba.fastjson.JSONObject;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.example.erp.entity.mm.FinishedGoodsInventory;
+import com.example.erp.entity.mm.FinishedOperateLog;
+import com.example.erp.entity.pp.FlowCard;
+import com.example.erp.entity.sd.Order;
+import com.example.erp.entity.sd.OrderDetail;
import com.example.erp.mapper.mm.FinishedGoodsInventoryMapper;
+import com.example.erp.mapper.mm.FinishedOperateLogMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import java.sql.SQLException;
+import java.time.LocalDate;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -15,6 +23,8 @@
public class FinishedGoodsInventoryService {
@Autowired
FinishedGoodsInventoryMapper finishedGoodsInventoryMapper;
+ @Autowired
+ FinishedOperateLogMapper finishedOperateLogMapper;
public Map<String,Object> defaultDateFinishedGoodsInventory(Integer pageNum, Integer pageSize,FinishedGoodsInventory finishedGoodsInventory) {
Integer offset = (pageNum-1)*pageSize;
Map<String,Object> map = new HashMap<>();
@@ -22,4 +32,60 @@
map.put("total",finishedGoodsInventoryMapper.getPageTotal(offset,pageSize,finishedGoodsInventory));
return map;
}
+
+ public Map<String,Object> getseletwarehousing(Integer pageNum, Integer pageSize, FlowCard flowCard) {
+ Integer offset = (pageNum-1)*pageSize;
+ Map<String,Object> map = new HashMap<>();
+ map.put("data",finishedGoodsInventoryMapper.getseletwarehousing(offset,pageSize,flowCard));
+ map.put("total",finishedGoodsInventoryMapper.getseletwarehousingPageTotal(offset,pageSize,flowCard));
+
+ return map;
+ }
+
+ public Boolean addseletwarehousing(Map<String,Map<String,Object>> object) {
+
+ Map<String,Object> maps= object.get("finishedGoodsInventory");
+ String storageRegion= maps.get("storageRegion").toString();
+ String remark= maps.get("remark").toString();
+ JSONObject jsonObject = new JSONObject(object.get("flowcard"));
+ FlowCard flowCard = JSONObject.parseObject(JSONObject.toJSONString(jsonObject), FlowCard.class);
+ System.out.println("鏁版嵁2锛�"+flowCard);
+ //娣诲姞鍑哄叆搴撹褰�
+ finishedOperateLogMapper.insertFinishedOperateLog(flowCard);
+ System.out.println(flowCard.getOrder().getOrderId());
+ Integer finishedGoodsInventorycount=finishedGoodsInventoryMapper.findOrderNumberdcount(flowCard.getOrderNumber());
+ System.out.println("鏁伴噺:"+finishedGoodsInventorycount);
+ if(finishedGoodsInventorycount>0){
+ finishedGoodsInventoryMapper.updateInventory(flowCard);
+ finishedGoodsInventoryMapper.updateflowcard(flowCard);
+ return true;
+ }else{
+ if (finishedGoodsInventoryMapper.insertFinishedGoodsInventory(flowCard,storageRegion,remark)){
+ finishedGoodsInventoryMapper.updateflowcard(flowCard);
+ return true;
+ }else{
+ return false;
+ }
+ }
+
+
+ /*Order order=finishedGoodsInventoryMapper.findOrderId(flowCard.getOrder().getOrderId());
+ OrderDetail orderDetail=finishedGoodsInventoryMapper.findOrderNumber(flowCard.getOrderNumber());*/
+ /*finishedGoodsInventory.setOrder(order);
+ finishedGoodsInventory.setOrderDetail(orderDetail);
+ finishedGoodsInventory.setInventory(flowCard.getInventoryQuantity());
+ finishedGoodsInventory.setActualSignalArea(flowCard.getOrderDetail().getHeight()*flowCard.getOrderDetail().getWidth());
+ finishedGoodsInventory.setArea(flowCard.getOrderDetail().getHeight()*flowCard.getOrderDetail().getWidth()*flowCard.getInventoryQuantity());
+ finishedGoodsInventory.setQuantityAvailable(flowCard.getInventoryQuantity());
+ finishedGoodsInventory.setWarehouseNumber(flowCard.getOrderDetail().getBuildingNumber());
+ finishedGoodsInventory.setStorageRegion(flowCard.getOrderDetail().getBuildingNumber());
+ finishedGoodsInventory.setStatus(0);
+ finishedGoodsInventory.setEnterStorageTime(LocalDate.now());
+ finishedGoodsInventory.setUpdateTime(LocalDate.now());
+ finishedGoodsInventory.setEndTime(null);
+ finishedGoodsInventory.setRemark("");*/
+
+
+
+ }
}
diff --git a/north-glass-erp/src/main/resources/mapper/mm/FinishedGoodsInventory.xml b/north-glass-erp/src/main/resources/mapper/mm/FinishedGoodsInventory.xml
index ee7221f..eb359fa 100644
--- a/north-glass-erp/src/main/resources/mapper/mm/FinishedGoodsInventory.xml
+++ b/north-glass-erp/src/main/resources/mapper/mm/FinishedGoodsInventory.xml
@@ -3,10 +3,10 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.example.erp.mapper.mm.FinishedGoodsInventoryMapper" >
+<mapper namespace="com.example.erp.mapper.mm.FinishedGoodsInventoryMapper">
- <resultMap id="selectFinishedGoodsInventory" type="com.example.erp.entity.mm.FinishedGoodsInventory" >
- <id column="id" property="id"/>
+ <resultMap id="selectFinishedGoodsInventory" type="com.example.erp.entity.mm.FinishedGoodsInventory">
+ <id column="fid" property="id"/>
<result column="inventory" property="inventory"/>
<result column="area" property="area"/>
<result column="actual_signal_area" property="actualSignalArea"/>
@@ -19,50 +19,255 @@
<result column="update_time" property="updateTime"/>
<result column="end_time" property="endTime"/>
-
- <result column="order_id" property="order.orderId"/>
- <result column="project" property="order.project"/>
- <result column="order_type" property="order.orderType"/>
+ <result column="order_id" property="order.orderId"/>
+ <result column="project" property="order.project"/>
+ <result column="order_type" property="order.orderType"/>
- <result column="order_number" property="orderDetail.orderNumber"/>
- <result column="width" property="orderDetail.width"/>
- <result column="height" property="orderDetail.height"/>
- <result column="product_name" property="orderDetail.product.productName"/>
- <result column="product_id" property="orderDetail.product.id"/>
-
-
+ <result column="order_number" property="orderDetail.orderNumber"/>
+ <result column="width" property="orderDetail.width"/>
+ <result column="height" property="orderDetail.height"/>
+ <result column="product_name" property="orderDetail.productName"/>
+ <result column="product_id" property="orderDetail.productId"/>
</resultMap>
+
+ <resultMap id="selectFlowCard" type="com.example.erp.entity.pp.FlowCard">
+ <id column="id" property="id"/>
+ <result column="order_number" property="orderNumber"/>
+ <result column="inventory_quantity" property="inventoryQuantity"/>
+ <result column="process_id" property="processId"/>
+ <result column="received_quantity" property="receivedQuantity"/>
+
+
+ <result column="order_id" property="order.orderId"/>
+ <result column="project" property="order.project"/>
+ <result column="creater" property="order.creater"/>
+ <result column="area" property="order.area"/>
+ <result column="batch" property="order.batch"/>
+
+ <result column="building_number" property="orderDetail.buildingNumber"/>
+ <result column="width" property="orderDetail.width"/>
+ <result column="height" property="orderDetail.height"/>
+ <result column="product_name" property="orderDetail.productName"/>
+ <result column="product_id" property="orderDetail.productId"/>
+ <result column="quantity" property="orderDetail.quantity"/>
+ </resultMap>
+
+ <update id="updateflowcard">
+ update pp.flow_card
+ set received_quantity=received_quantity+${inventoryQuantity}
+ where order_number=#{orderNumber} and process_id=#{processId}
+ </update>
+
+ <update id="updateInventory">
+ update mm.finished_goods_inventory
+ set inventory=inventory+${inventoryQuantity},quantity_available=quantity_available+${inventoryQuantity},
+ update_time=now(),area=area+actual_signal_area*${inventoryQuantity}
+ where order_number=#{orderNumber}
+ </update>
+
+ <insert id="insertFinishedGoodsInventory" useGeneratedKeys="true" >
+ insert into mm.finished_goods_inventory (order_id,
+ order_number,
+ inventory,
+ actual_signal_area,
+ area,
+ quantity_available,
+ warehouse_number,
+ storage_region,
+ `status`,
+ enter_storage_time,
+ update_time,
+ end_time,
+ remark
+ )
+ values (
+ #{flowCard.order.orderId} ,#{flowCard.orderNumber},#{flowCard.inventoryQuantity},ROUND(#{flowCard.orderDetail.width}*#{flowCard.orderDetail.height}/1000000,2),
+ ROUND(#{flowCard.orderDetail.width}*#{flowCard.orderDetail.height}*#{flowCard.inventoryQuantity}/1000000,2),
+ #{flowCard.inventoryQuantity},null,#{storageRegion},
+ 0,now(),now(),null,#{remark}
+ )
+ </insert>
+
+ <select id="findOrderNumberdcount" >
+ select count(*)
+ from mm.`finished_goods_inventory`
+ where order_number = #{orderNumber}
+
+ </select>
+
+ <select id="findOrderNumberd" >
+ select *
+ from sd.finished_goods_inventory
+ where order_number = #{orderNumber}
+
+ </select>
+
+ <select id="getseletwarehousing" resultMap="selectFlowCard">
+ select
+ fc.id,
+ o.order_id,
+ od.building_number,
+ od.product_id,
+ od.product_name,
+ od.width,
+ od.height,
+ o.creater,
+ o.project,
+ fc.order_number,
+ od.quantity,
+ fc.inventory_quantity,
+ o.area,
+ fc.process_id,
+ fc.received_quantity,
+ o.batch
+ from pp.flow_card fc left join sd.order_detail od on fc.order_number=od.order_number inner join sd.`order` o on
+ o.order_id=fc.order_id
+ <where>
+ and fc.received_quantity <![CDATA[<]]> fc.inventory_quantity
+ <if test="flowCard.order.orderId != null and flowCard.order.orderId != ''">
+ and o.order_id regexp #{flowCard.order.orderId}
+ </if>
+ <if test="flowCard.orderDetail.buildingNumber != null and flowCard.orderDetail.buildingNumber != ''">
+ and od.building_number regexp #{flowCard.orderDetail.buildingNumber}
+ </if>
+ <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''">
+ and od.product_id regexp #{flowCard.orderDetail.productId}
+ </if>
+ <if test="flowCard.orderDetail.productName != null and flowCard.orderDetail.productName != ''">
+ and od.product_name regexp #{flowCard.orderDetail.productName}
+ </if>
+ <if test="flowCard.orderDetail.width != null and flowCard.orderDetail.width != ''">
+ and od.width regexp #{flowCard.orderDetail.width}
+ </if>
+ <if test="flowCard.orderDetail.height != null and flowCard.orderDetail.height != ''">
+ and od.height regexp #{flowCard.orderDetail.height}
+ </if>
+ <if test="flowCard.order.creater != null and flowCard.order.creater != ''">
+ and o.creater regexp #{flowCard.order.creater}
+ </if>
+ <if test="flowCard.order.project != null and flowCard.order.project != ''">
+ and o.project regexp #{flowCard.order.project}
+ </if>
+ <if test="flowCard.orderNumber != null and flowCard.orderNumber != ''">
+ and fc.order_number regexp #{flowCard.orderNumber}
+ </if>
+ <if test="flowCard.orderDetail.quantity != null and flowCard.orderDetail.quantity != ''">
+ and od.quantity regexp #{flowCard.orderDetail.quantity}
+ </if>
+ <if test="flowCard.inventoryQuantity != null and flowCard.inventoryQuantity != ''">
+ and fc.inventory_quantity regexp #{flowCard.inventoryQuantity}
+ </if>
+ <if test="flowCard.order.area != null and flowCard.order.area != ''">
+ and o.area regexp #{flowCard.order.area}
+ </if>
+ <if test="flowCard.order.batch != null and flowCard.order.batch != ''">
+ and o.batch regexp #{flowCard.order.batch}
+ </if>
+ <if test="flowCard.processId != null and flowCard.processId != ''">
+ and fc.process_id regexp #{flowCard.processId}
+ </if>
+ <if test="flowCard.receivedQuantity != null and flowCard.receivedQuantity != ''">
+ and fc.received_quantity regexp #{flowCard.receivedQuantity}
+ </if>
+
+ </where>
+ group by fc.order_number,fc.process_id order by fc.create_time
+ limit #{offset},#{pageSize};
+ </select>
+ <select id="getseletwarehousingPageTotal" >
+ select CEILING(count(zu.order_number)/#{pageSize}) from (
+ select fc.order_number as order_number,fc.process_id from pp.flow_card fc left join sd.order_detail od on
+ fc.order_number=od.order_number inner join sd.`order` o on o.order_id=fc.order_id
+ <where>
+ and fc.received_quantity <![CDATA[<]]> fc.inventory_quantity
+ <if test="flowCard.order.orderId != null and flowCard.order.orderId != ''">
+ and o.order_id regexp #{flowCard.order.orderId}
+ </if>
+ <if test="flowCard.orderDetail.buildingNumber != null and flowCard.orderDetail.buildingNumber != ''">
+ and od.building_number regexp #{flowCard.orderDetail.buildingNumber}
+ </if>
+ <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''">
+ and od.product_id regexp #{flowCard.orderDetail.productId}
+ </if>
+ <if test="flowCard.orderDetail.productName != null and flowCard.orderDetail.productName != ''">
+ and od.product_name regexp #{flowCard.orderDetail.productName}
+ </if>
+ <if test="flowCard.orderDetail.width != null and flowCard.orderDetail.width != ''">
+ and od.width regexp #{flowCard.orderDetail.width}
+ </if>
+ <if test="flowCard.orderDetail.height != null and flowCard.orderDetail.height != ''">
+ and od.height regexp #{flowCard.orderDetail.height}
+ </if>
+ <if test="flowCard.order.creater != null and flowCard.order.creater != ''">
+ and o.creater regexp #{flowCard.order.creater}
+ </if>
+ <if test="flowCard.order.project != null and flowCard.order.project != ''">
+ and o.project regexp #{flowCard.order.project}
+ </if>
+ <if test="flowCard.orderNumber != null and flowCard.orderNumber != ''">
+ and fc.order_number regexp #{flowCard.orderNumber}
+ </if>
+ <if test="flowCard.orderDetail.quantity != null and flowCard.orderDetail.quantity != ''">
+ and od.quantity regexp #{flowCard.orderDetail.quantity}
+ </if>
+ <if test="flowCard.inventoryQuantity != null and flowCard.inventoryQuantity != ''">
+ and fc.inventory_quantity regexp #{flowCard.inventoryQuantity}
+ </if>
+ <if test="flowCard.order.area != null and flowCard.order.area != ''">
+ and o.area regexp #{flowCard.order.area}
+ </if>
+ <if test="flowCard.order.batch != null and flowCard.order.batch != ''">
+ and o.batch regexp #{flowCard.order.batch}
+ </if>
+ <if test="flowCard.processId != null and flowCard.processId != ''">
+ and fc.process_id regexp #{flowCard.processId}
+ </if>
+ <if test="flowCard.receivedQuantity != null and flowCard.receivedQuantity != ''">
+ and fc.received_quantity regexp #{flowCard.receivedQuantity}
+ </if>
+
+ </where>
+ group by fc.order_number,fc.process_id order by fc.create_time) as zu
+ </select>
+
+
<select id="defaultfinishedGoods" resultMap="selectFinishedGoodsInventory">
select od.order_number,
- o.order_id,
- o.project,
- o.order_type,
- od.product_name,
- od.product_id,
- od.width,
- od.height,
- fgi.inventory,
- fgi.quantity_available,
- fgi.actual_signal_area,
- fgi.area,
- fgi.warehouse_number,
- fgi.storage_region,
- fgi.`status`,
- fgi.update_time,
- fgi.enter_storage_time,
- fgi.end_time,
- fgi.remark
+ o.order_id,
+ o.project,
+ o.order_type,
+ od.product_name,
+ od.product_id,
+ od.width,
+ od.height,
+ fgi.inventory,
+ fgi.quantity_available,
+ fgi.actual_signal_area,
+ fgi.area,
+ fgi.warehouse_number,
+ fgi.storage_region,
+ fgi.`status`,
+ fgi.update_time,
+ fgi.enter_storage_time,
+ fgi.end_time,
+ fgi.remark
from finished_goods_inventory fgi
- left join sd.order_detail od on fgi.order_number = od.order_number
- inner join sd.`order` o on fgi.order_id = o.order_id
+ left join sd.order_detail od on fgi.order_number = od.order_number
+ inner join sd.`order` o on fgi.order_id = o.order_id
<where>
<if test="finishedGoodsInventory.orderDetail.width != null and finishedGoodsInventory.orderDetail.width != ''">
and od.width regexp #{finishedGoodsInventory.orderDetail.width}
</if>
<if test="finishedGoodsInventory.orderDetail.orderNumber != null and finishedGoodsInventory.orderDetail.orderNumber != ''">
and od.order_number regexp #{finishedGoodsInventory.orderDetail.orderNumber}
+ </if>
+ <if test="finishedGoodsInventory.orderDetail.productName != null and finishedGoodsInventory.orderDetail.productName != ''">
+ and od.product_name regexp #{finishedGoodsInventory.orderDetail.productName}
+ </if>
+ <if test="finishedGoodsInventory.orderDetail.productId != null and finishedGoodsInventory.orderDetail.productId != ''">
+ and od.product_id regexp #{finishedGoodsInventory.orderDetail.productId}
</if>
<if test="finishedGoodsInventory.order.orderId != null and finishedGoodsInventory.order.orderId != ''">
and o.order_id regexp #{finishedGoodsInventory.order.orderId}
@@ -118,7 +323,7 @@
</select>
- <select id="getPageTotal" >
+ <select id="getPageTotal">
select
CEILING(count(fgi.id)/#{pageSize})
from finished_goods_inventory fgi
@@ -131,6 +336,12 @@
<if test="finishedGoodsInventory.orderDetail.orderNumber != null and finishedGoodsInventory.orderDetail.orderNumber != ''">
and od.order_number regexp #{finishedGoodsInventory.orderDetail.orderNumber}
</if>
+ <if test="finishedGoodsInventory.orderDetail.productName != null and finishedGoodsInventory.orderDetail.productName != ''">
+ and od.product_name regexp #{finishedGoodsInventory.orderDetail.productName}
+ </if>
+ <if test="finishedGoodsInventory.orderDetail.productId != null and finishedGoodsInventory.orderDetail.productId != ''">
+ and od.product_id regexp #{finishedGoodsInventory.orderDetail.productId}
+ </if>
<if test="finishedGoodsInventory.order.orderId != null and finishedGoodsInventory.order.orderId != ''">
and o.order_id regexp #{finishedGoodsInventory.order.orderId}
</if>
diff --git a/north-glass-erp/src/main/resources/mapper/mm/FinishedOperateLog.xml b/north-glass-erp/src/main/resources/mapper/mm/FinishedOperateLog.xml
index f51db16..d69dd89 100644
--- a/north-glass-erp/src/main/resources/mapper/mm/FinishedOperateLog.xml
+++ b/north-glass-erp/src/main/resources/mapper/mm/FinishedOperateLog.xml
@@ -16,27 +16,24 @@
<result column="g_type" property="glassTypes.type"/>-->
</resultMap>
- <select id="defaultFinishedGoodsInventory" resultMap="selectFinishedGoodsInventory">
+ <select id="getselectFinishedOperateLog" >
select
- a.id,
- prodID,
- product,
- glassType,
- typeName,
- totalThickness,
- thickness,
- Query,
- remarks,
- state,
- creator,
- date(a.createTime) as 'createTime',
- updateTime
+ *
from
- product as a
- left join basic_glass_type bgt on bgt.typeID = a.glassType
-
- order by id desc
- limit #{offset},#{pageSize}
- ;
+ mm.finished_operate_log limit 0,1;
</select>
+
+ <insert id="insertFinishedOperateLog" useGeneratedKeys="true" keyProperty="id" >
+ insert into mm.finished_operate_log(operation_order_number,
+ product_number,
+ operation_number,
+ operate_type,
+ operator,
+ quantity,
+ operate_time
+ )
+ values (
+ #{processId} ,#{orderDetail.productId},#{orderNumber},"鍏ュ簱","鐜嬩簲",#{inventoryQuantity},now()
+ )
+ </insert>
</mapper>
\ No newline at end of file
diff --git a/north-glass-erp/target/classes/mapper/mm/FinishedGoodsInventory.xml b/north-glass-erp/target/classes/mapper/mm/FinishedGoodsInventory.xml
deleted file mode 100644
index 1a874fd..0000000
--- a/north-glass-erp/target/classes/mapper/mm/FinishedGoodsInventory.xml
+++ /dev/null
@@ -1,90 +0,0 @@
-<?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.example.erp.mapper.mm.FinishedGoodsInventoryMapper" >
-
- <resultMap id="selectFinishedGoodsInventory" type="com.example.erp.entity.mm.FinishedGoodsInventory" >
- <id column="id" property="id"/>
- <result column="inventory" property="inventory"/>
- <result column="area" property="area"/>
- <result column="actual_signal_area" property="actualSignalArea"/>
- <result column="quantity_available" property="quantityAvailable"/>
- <result column="warehouse_number" property="warehouseNumber"/>
- <result column="storage_region" property="storageRegion"/>
- <result column="status" property="status"/>
- <result column="enter_storage_time" property="enterStorageTime"/>
- <result column="remark" property="remark"/>
- <result column="update_time" property="updateTime"/>
- <result column="end_time" property="endTime"/>
-
-
- <result column="order_id" property="order.orderId"/>
- <result column="project" property="order.project"/>
- <result column="order_type" property="order.orderType"/>
-
-
- <result column="order_number" property="orderDetail.orderNumber"/>
- <result column="width" property="orderDetail.width"/>
- <result column="height" property="orderDetail.height"/>
- <result column="product_name" property="orderDetail.product.productName"/>
- <result column="product_id" property="orderDetail.product.id"/>
-
-
-
- </resultMap>
- <select id="defaultfinishedGoods" resultMap="selectFinishedGoodsInventory">
- select od.order_number,
- o.order_id,
- o.project,
- o.order_type,
- od.product_name,
- od.product_id,
- od.width,
- od.height,
- fgi.inventory,
- fgi.quantity_available,
- fgi.actual_signal_area,
- fgi.area,
- fgi.warehouse_number,
- fgi.storage_region,
- fgi.`status`,
- fgi.update_time,
- fgi.enter_storage_time,
- fgi.end_time
- from finished_goods_inventory fgi
- left join sd.order_detail od on fgi.order_number = od.order_number
- inner join sd.`order` o on fgi.order_id = o.order_id
- <where>
- <if test="finishedGoodsInventory.orderDetail.width != null and finishedGoodsInventory.orderDetail.width != ''">
- and od.width regexp #{finishedGoodsInventory.orderDetail.width}
- </if>
-
- </where>
- order by fgi.id
-
- limit #{offset},#{pageSize}
- ;
- </select>
-
-
- <select id="getPageTotal" >
- select
- CEILING(count(fgi.id)/#{pageSize})
- from finished_goods_inventory fgi
- left join sd.order_detail od on fgi.order_number = od.order_number
- inner join sd.`order` o on fgi.order_id = o.order_id
- <where>
- <if test="finishedGoodsInventory.orderDetail.width != null and finishedGoodsInventory.orderDetail.width != ''">
- and od.width regexp #{finishedGoodsInventory.orderDetail.width}
- </if>
-
- </where>
-
- order by fgi.id desc
- limit #{offset},#{pageSize}
- ;
- </select>
-
-</mapper>
\ No newline at end of file
diff --git a/north-glass-erp/target/classes/mapper/mm/FinishedOperateLog.xml b/north-glass-erp/target/classes/mapper/mm/FinishedOperateLog.xml
index f51db16..d69dd89 100644
--- a/north-glass-erp/target/classes/mapper/mm/FinishedOperateLog.xml
+++ b/north-glass-erp/target/classes/mapper/mm/FinishedOperateLog.xml
@@ -16,27 +16,24 @@
<result column="g_type" property="glassTypes.type"/>-->
</resultMap>
- <select id="defaultFinishedGoodsInventory" resultMap="selectFinishedGoodsInventory">
+ <select id="getselectFinishedOperateLog" >
select
- a.id,
- prodID,
- product,
- glassType,
- typeName,
- totalThickness,
- thickness,
- Query,
- remarks,
- state,
- creator,
- date(a.createTime) as 'createTime',
- updateTime
+ *
from
- product as a
- left join basic_glass_type bgt on bgt.typeID = a.glassType
-
- order by id desc
- limit #{offset},#{pageSize}
- ;
+ mm.finished_operate_log limit 0,1;
</select>
+
+ <insert id="insertFinishedOperateLog" useGeneratedKeys="true" keyProperty="id" >
+ insert into mm.finished_operate_log(operation_order_number,
+ product_number,
+ operation_number,
+ operate_type,
+ operator,
+ quantity,
+ operate_time
+ )
+ values (
+ #{processId} ,#{orderDetail.productId},#{orderNumber},"鍏ュ簱","鐜嬩簲",#{inventoryQuantity},now()
+ )
+ </insert>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0