From b9e4e2edbb3767ee347a91d2238544ae736b53c0 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期二, 22 七月 2025 10:29:27 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override
---
north-glass-erp/northglass-erp/src/views/mm/stockReport/MaterialOutboundReport.vue | 4
north-glass-erp/src/main/java/com/example/erp/service/mm/BasicWarehouseTypeService.java | 7
north-glass-erp/src/main/java/com/example/erp/controller/mm/MaterialInventoryController.java | 9 +
north-glass-erp/src/main/java/com/example/erp/controller/mm/BasicWarehouseTypeController.java | 6
north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml | 4
north-glass-erp/src/main/resources/mapper/mm/BasicWarehouseType.xml | 4
north-glass-erp/northglass-erp/src/views/mm/ingredientStock/CreateOutBound.vue | 82 +++++++++
north-glass-erp/src/main/java/com/example/erp/entity/mm/MaterialLog.java | 2
north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheetLuoyang.vue | 67 +++----
north-glass-erp/northglass-erp/src/components/mm/PrintPackingListLuoyang.vue | 2
north-glass-erp/src/main/java/com/example/erp/service/mm/MaterialInventoryService.java | 130 ++++++++++++++++
north-glass-erp/src/main/java/com/example/erp/controller/sd/OrderController.java | 5
north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderMapper.java | 2
north-glass-erp/src/main/java/com/example/erp/mapper/mm/BasicWarehouseTypeMapper.java | 2
north-glass-erp/src/main/resources/mapper/mm/MaterialInventory.xml | 57 ++++++
north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheetLuoyangDetails.vue | 40 ++--
north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java | 22 ++
17 files changed, 375 insertions(+), 70 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/components/mm/PrintPackingListLuoyang.vue b/north-glass-erp/northglass-erp/src/components/mm/PrintPackingListLuoyang.vue
index 3ea366e..f8d17b8 100644
--- a/north-glass-erp/northglass-erp/src/components/mm/PrintPackingListLuoyang.vue
+++ b/north-glass-erp/northglass-erp/src/components/mm/PrintPackingListLuoyang.vue
@@ -178,7 +178,7 @@
<td colspan="5">
<div style="display:flex;">
<div style="width: 100%"><span style="font-weight: bold;">瀹㈡埛鍚嶇О</span>锛�
- <input class="contactNumber" style="width: 85%;font-size: 9px" type="text"
+ <input class="contactNumber" style="width: 80%;font-size: 9px" type="text"
v-model="customer.customer_name" />
</div>
</div>
diff --git a/north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheetLuoyang.vue b/north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheetLuoyang.vue
index ad35ab7..053f8af 100644
--- a/north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheetLuoyang.vue
+++ b/north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheetLuoyang.vue
@@ -217,15 +217,15 @@
</el-row>
<el-row id="footsum1" :gutter="20" >
<el-col :span="2" ></el-col>
- <el-col :span="5" style="font-weight: bolder;font-size: 19px">{{ delivery.contacts }}</el-col>
- <el-col :span="5" style="font-weight: bolder;font-size: 19px">{{ delivery.contactNumber }}</el-col>
+ <el-col :span="3" style="font-weight: bolder;font-size: 19px">{{ delivery.contacts }}</el-col>
+ <el-col :span="7" style="font-weight: bolder;font-size: 19px">{{ delivery.contactNumber }}</el-col>
<el-col :span="1" ></el-col>
<el-col :span="11" style="font-weight: bolder;font-size: 19px">{{ delivery.deliveryAddress }}</el-col>
</el-row>
- <table class="content1" v-for="(page,pageIndex) in pageData" >
+ <table class="content1" v-for="(page,pageIndex) in pageData" >
<thead>
- <tr style="height: 3.2cm"><td></td></tr>
+ <tr style="height: 3.6cm"><td></td></tr>
<tr>
<td colspan="6" >
@@ -237,24 +237,23 @@
height: 100%;font-size:19px;font-weight: bolder "/>
</el-col>
<el-col :span="5" style="font-size:19px;font-weight: bolder"> {{deliveryId}} </el-col>
- <el-col :span="5"></el-col>
- <el-col :span="3" style="white-space: nowrap;font-size:19px;font-weight: bolder">{{deliveryDate}}</el-col>
+ <el-col :span="3"></el-col>
+ <el-col :span="5" style="white-space: nowrap;font-size:19px;font-weight: bolder">{{deliveryDate}}</el-col>
</el-row>
</td>
</tr>
- <tr style="height: 0.5cm"><td></td></tr>
+ <tr style="height: 0.1cm"><td></td></tr>
<tr style="margin-top: 20px">
<td colspan="6">
<el-row :gutter="20">
- <el-col :span="3"></el-col>
- <el-col :span="9" style="font-size: 21px;font-weight: bolder">{{delivery.customerName }}</el-col>
- <el-col :span="3"> </el-col>
- <el-col :span="9" style="font-size: 21px;font-weight: bolder;white-space: nowrap;"> {{delivery.project }}</el-col>
+ <el-col :span="2"></el-col>
+ <el-col :span="14" style="font-size: 19px;font-weight: bolder">{{delivery.customerName }}</el-col>
+
+ <el-col :span="8" style="font-size: 19px;font-weight: bolder;white-space: nowrap;"> {{delivery.project }}</el-col>
</el-row>
</td>
</tr>
- <tr style="height: 0.3cm"><td></td></tr>
<tr>
<td colspan="6">
<el-row :gutter="20">
@@ -264,7 +263,7 @@
</td>
</tr>
- <tr style="height: 0.2cm"><td></td></tr>
+ <tr style="height: 1cm"><td></td></tr>
@@ -272,29 +271,28 @@
<tbody >
<tr v-for="(item,index) in page">
<td style="width: 5cm">
- <el-input class="textarea" type="textarea"
+ <el-input class="textarea bbb" type="textarea"
:autosize="{ minRows: 1, maxRows: 20 }"
v-model="item.DeliveryDetail.orderDetail.productName" />
</td>
- <td style="width: 0.8cm"></td>
- <td style="width: 5cm">
- <el-input class="textarea" type="textarea"
+ <td style="width: 150px" >
+ <el-input class="textarea aaa" type="textarea"
style="font-weight: bolder;"
:autosize="{ minRows: 1, maxRows: 20 }"
v-model="item.DeliveryDetail.orderId" />
</td>
- <td style="width: 60px">
+ <td style="width: 65px">
{{item.DeliveryDetail.quantity}}
</td>
- <td style="width: 100px">
- <input style="border: 0" v-model="item.DeliveryDetail.area">
+ <td style="width: 100px" >
+ <input style="border: 0;width: 100px" v-model="item.DeliveryDetail.area">
</td>
<td
+ style="width: 100px"
v-if="props.type===1"
- style="width: 80px"
>
{{item.DeliveryDetail.price}}
</td>
@@ -308,12 +306,11 @@
<tr>
<td></td>
<td></td>
- <td></td>
<td>
{{getQuantitySum(pageIndex)}}
</td>
<td>
- <input style="border: 0" :value="getAreaSum(pageIndex)">
+ <input style="border: 0;width: 100px" :value="getAreaSum(pageIndex)">
</td>
<td></td>
<td v-if="props.type===1">
@@ -342,7 +339,7 @@
width: 21cm;
}
table{
- width: 21cm
+ width: 18.3cm
}
.content1{
@@ -366,13 +363,13 @@
@media print {
#footsum{
position: fixed;
- bottom: 4.2cm;
+ bottom: 3.5cm;
width: 100%; /* 鎴栬�呰缃垚鍏蜂綋鐨勫搴� */
font-size: 17px;
}
#footsum1{
position: fixed;
- bottom: 1.8cm;
+ bottom: 1cm;
width: 100%; /* 鎴栬�呰缃垚鍏蜂綋鐨勫搴� */
}
}
@@ -383,21 +380,17 @@
--el-input-focus-border-width: 0px;
--el-input-hover-border-color: rgba(255,255,255,0.0);
--el-input-hover-border-width: 0px;
-}
-/*textarea {
-
- font-size: 16px;
- border:none;
- text-align: right;
- font-weight: bolder;
width: 100%;
- height: 100%;
-}*/
+}
:deep(.el-textarea__inner){
font-weight: bolder;
color: #333333;
font-family: 'Microsoft YaHei', '寰蒋闆呴粦', sans-serif;
}
-
-
+:deep(.aaa){
+ width: 150px;
+}
+:deep(.bbb){
+ width: 5cm;
+}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheetLuoyangDetails.vue b/north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheetLuoyangDetails.vue
index fbf4725..80b13f3 100644
--- a/north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheetLuoyangDetails.vue
+++ b/north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheetLuoyangDetails.vue
@@ -201,15 +201,15 @@
</el-row>
<el-row id="footsum1" :gutter="20" >
<el-col :span="2" ></el-col>
- <el-col :span="5" style="font-weight: bolder;font-size: 19px">{{ delivery.contacts }}</el-col>
- <el-col :span="5" style="font-weight: bolder;font-size: 19px">{{ delivery.contactNumber }}</el-col>
+ <el-col :span="3" style="font-weight: bolder;font-size: 19px">{{ delivery.contacts }}</el-col>
+ <el-col :span="7" style="font-weight: bolder;font-size: 19px">{{ delivery.contactNumber }}</el-col>
<el-col :span="1" ></el-col>
<el-col :span="11" style="font-weight: bolder;font-size: 19px">{{ delivery.deliveryAddress }}</el-col>
</el-row>
<table class="content1" v-for="(page,pageIndex) in pageData" >
<thead>
- <tr style="height: 3.2cm"><td></td></tr>
+ <tr style="height: 3.6cm"><td></td></tr>
<tr>
<td colspan="6" >
@@ -221,24 +221,24 @@
height: 100%;font-size:19px;font-weight: bolder "/>
</el-col>
<el-col :span="5" style="font-size:19px;font-weight: bolder"> {{deliveryId}} </el-col>
- <el-col :span="5"></el-col>
- <el-col :span="3" style="white-space: nowrap;font-size:19px;font-weight: bolder">{{deliveryDate}}</el-col>
+ <el-col :span="6"></el-col>
+ <el-col :span="2" style="white-space: nowrap;font-size:19px;font-weight: bolder">{{deliveryDate}}</el-col>
</el-row>
</td>
</tr>
- <tr style="height: 0.5cm"><td></td></tr>
+ <tr style="height: 0.1cm"><td></td></tr>
<tr style="margin-top: 20px">
<td colspan="6">
<el-row :gutter="20">
- <el-col :span="3"></el-col>
- <el-col :span="9" style="font-size: 21px;font-weight: bolder">{{delivery.customerName }}</el-col>
- <el-col :span="3"> </el-col>
- <el-col :span="9" style="font-size: 21px;font-weight: bolder;white-space: nowrap;"> {{delivery.project }}</el-col>
+ <el-col :span="2"></el-col>
+ <el-col :span="17" style="font-size: 17px;font-weight: bolder">{{delivery.customerName }}</el-col>
+
+ <el-col :span="5" style="font-size: 17px;font-weight: bolder;white-space: nowrap;"> {{delivery.project }}</el-col>
</el-row>
</td>
</tr>
- <tr style="height: 0.3cm"><td></td></tr>
+ <tr style="height: 0.1cm"><td></td></tr>
<tr>
<td colspan="6">
<el-row :gutter="20">
@@ -248,7 +248,7 @@
</td>
</tr>
- <tr style="height: 0.2cm"><td></td></tr>
+ <tr style="height: 1cm"><td></td></tr>
@@ -257,21 +257,21 @@
<template v-for="(items,index1) in page.DeliveryDetailList[0]">
<tr>
- <td style="width: 20cm" :rowspan="page.id" v-if="index1===0">
+ <td style="width: 4cm" :rowspan="page.id" v-if="index1===0">
<el-input class="textarea" type="textarea"
:autosize="{ minRows: 1, maxRows: 20 }"
v-model="page.DeliveryDetail.orderDetail.productName" />
</td>
<td style="width: 0.8cm"></td>
- <td style="width: 10cm">
+ <td style="width: 2cm">
<el-input class="textarea" type="textarea"
style="font-weight: bolder;"
:autosize="{ minRows: 1, maxRows: 20 }"
v-model="items.width" />
</td>
- <td style="width: 10cm">
+ <td style="width: 2cm">
<el-input class="textarea" type="textarea"
style="font-weight: bolder;"
:autosize="{ minRows: 1, maxRows: 20 }"
@@ -282,7 +282,7 @@
{{items.quantity}}
</td>
<td style="width: 100px">
- <input style="border: 0" v-model="items.area">
+ <input style="border: 0;width: 100px" v-model="items.area">
</td>
<td
@@ -308,7 +308,7 @@
{{getQuantitySum(pageIndex)}}
</td>
<td>
- <input style="border: 0" :value="getAreaSum(pageIndex)">
+ <input style="border: 0;width: 100px" :value="getAreaSum(pageIndex)">
</td>
<td></td>
<td v-if="props.type===1||props.type===3">
@@ -339,7 +339,7 @@
width: 21cm;
}
table{
- width: 21cm
+ width: 18.3cm
}
.content1{
@@ -363,13 +363,13 @@
@media print {
#footsum{
position: fixed;
- bottom: 4.2cm;
+ bottom: 3.5cm;
width: 100%; /* 鎴栬�呰缃垚鍏蜂綋鐨勫搴� */
font-size: 17px;
}
#footsum1{
position: fixed;
- bottom: 1.8cm;
+ bottom: 1cm;
width: 100%; /* 鎴栬�呰缃垚鍏蜂綋鐨勫搴� */
}
}
diff --git a/north-glass-erp/northglass-erp/src/views/mm/ingredientStock/CreateOutBound.vue b/north-glass-erp/northglass-erp/src/views/mm/ingredientStock/CreateOutBound.vue
index 3d450bb..c721dfa 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/ingredientStock/CreateOutBound.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/ingredientStock/CreateOutBound.vue
@@ -74,6 +74,8 @@
warehouseManager:userStore.user.userName
})
+let userNameCutting = ref([])
+
let filterData = ref({
@@ -111,9 +113,8 @@
if (res.code == 200) {
titleSelectJson.value = deepClone(res.data)
- console.log("a"+titleSelectJson.value)
const today = new Date
- today.setTime(today.getTime() + (15 * 24 * 60 * 60 * 1000))
+ today.setTime(today.getTime())
titleUploadData.value.materialRequisitionDate = today.getFullYear() +
'-' + ("0" + (today.getMonth() + 1)).slice(-2)
+ '-' + ("0" + today.getDate()).slice(-2)
@@ -123,6 +124,18 @@
}
})
}
+
+const initUser = async ()=> {
+ await request.get(`/BasicWarehouse/BasicWarehouseTypeUser/` + t('machine.cutting')).then((res) => {
+
+ if (res.code == 200) {
+ userNameCutting.value=res.data.userName
+ } else {
+ ElMessage.warning(res.msg)
+ }
+ })
+}
+
//鍒楁煡璇�
const getWork = async ()=> {
await request.get(`/BasicWarehouse/BasicWarehouseType/`+t('ingredients.originalFilm')+'|'+t('ingredients.accessories')).then((res) => {
@@ -156,6 +169,8 @@
onMounted(async()=>{
await initOrder()
+ await initUser()
+
//鍚敤琛ㄦ牸鎷栧姩閫変腑
addListener(xGrid.value,gridOptions,cellArea.value)
@@ -170,7 +185,6 @@
request.post("/materialInventory/getSelectMaterialInventory/1/100",filterData.value).then((res) => {
if(res.code==200){
- console.log("b"+titleSelectJson.value)
titleUploadData.value.warehouseManager=userStore.user.userName
titleUploadData.value.outboundType = titleSelectJson.value.outboundType[0].operateTypeName
materialStore.value=[]
@@ -243,6 +257,7 @@
if(titleUploadData.value.reviewedState!==0){
gridOptions.toolbarConfig.buttons[1].disabled = true
gridOptions.toolbarConfig.buttons[0].disabled = true
+ gridOptions.toolbarConfig.buttons[3].disabled = true
}
@@ -380,6 +395,46 @@
})
break
}
+ case 'addToExamine': {
+ const selectRecords = $grid.getCheckboxRecords()
+ if (selectRecords.length === 0) {
+ ElMessage.warning(t('productStock.unselectedData'))
+ return
+ }
+ const errMap = await $grid.validate(selectRecords)
+ if (errMap) {
+ ElMessage.warning(t('productStock.dataVerificationFailed'))
+ return
+ }
+ //琛ㄥご鏁版嵁鏍¢獙
+ const outboundType = titleUploadData.value.outboundType
+ if(outboundType === null || outboundType === undefined || outboundType === ''){
+ ElMessage.error(t('ingredientsStock.pleaseOutboundType'))
+ return
+ }
+ let flowData = ref({
+ materialOutboundDetail: selectRecords,
+ title: titleUploadData.value,
+ materialOutboundId: route.query.materialOutboundId,
+ userName:userStore.user.userName,
+ userId:userStore.user.userId
+
+ })
+ request.post("/materialInventory/saveToExamineMaterialOutbound", flowData.value).then((res) => {
+ if(res.code==200 && res.data==="true"){
+ ElMessage.success(t('basicData.msg.saveSuccess'))
+ router.push({path: '/main/ingredientsStock/MaterialOutbound', query:{random:Math.random()}})
+ }else if(res.data==="false1"){
+ ElMessage.warning(t('basicData.msg.quantityError'))
+ }else{
+ ElMessage.warning(t('basicData.msg.saveFail'))
+ }
+ }).catch((err)=>{
+ ElMessage.error(t('basicData.msg.ServerConnectionError'))
+ router.push("/login")
+ })
+ break
+ }
}
}
@@ -459,7 +514,8 @@
buttons: [
{'code': 'add', 'name': t('basicData.save'),status: 'primary',icon: 'vxe-icon-save'},
{'code': 'toExamine', 'name': t('basicData.review'),status: 'primary'},
- {'code': 'CounterExamination', 'name': t('basicData.cancelReview'),status: 'primary'}
+ {'code': 'CounterExamination', 'name': t('basicData.cancelReview'),status: 'primary'},
+ {'code': 'addToExamine', 'name': t('reportingWorks.saveAndReview'),status: 'primary',icon: 'vxe-icon-save'},
],
/*import: false,
export: true,
@@ -539,9 +595,23 @@
<div class="head" style="background-color: white">
<el-row>
<el-col :span="2"><el-text>{{$t('ingredientsStock.materialRequisitionDate')}}:</el-text></el-col>
- <el-col :span="3"><el-input v-model="titleUploadData.materialRequisitionDate" :readonly="true" ></el-input></el-col>
+ <el-col :span="3">
+ <el-date-picker
+ v-model="titleUploadData.materialRequisitionDate"
+ type="date"
+ format="YYYY-MM-DD"
+ value-format="YYYY-MM-DD"
+ :placeholder="$t('delivery.selectDate')"/>
+ </el-col>
<el-col :span="2"><el-text>{{$t('ingredientsStock.materialRequisitionPersonnel')}}:</el-text></el-col>
- <el-col :span="3"><el-input v-model="titleUploadData.materialRequisitionPersonnel" /></el-col>
+ <el-col :span="3">
+ <el-select v-model="titleUploadData.materialRequisitionPersonnel" clearable placeholder=" " >
+ <el-option v-for="item in userNameCutting"
+ :key="item.id"
+ :label="item"
+ :value="item"/>
+ </el-select>
+ </el-col>
<el-col :span="2"><el-text>{{$t('ingredientsStock.materialRequisitionTeam')}}:</el-text></el-col>
<el-col :span="3"><el-input v-model="titleUploadData.materialRequisitionTeam" /></el-col>
<el-col :span="2"><el-text>{{$t('ingredientsStock.outboundType')}}锛�</el-text></el-col>
diff --git a/north-glass-erp/northglass-erp/src/views/mm/stockReport/MaterialOutboundReport.vue b/north-glass-erp/northglass-erp/src/views/mm/stockReport/MaterialOutboundReport.vue
index 90912a8..e095f29 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/stockReport/MaterialOutboundReport.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/stockReport/MaterialOutboundReport.vue
@@ -14,7 +14,9 @@
{field: 'operationOrderNumber', width:'150', title: t('productStock.operationOrderNumber'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
{field: 'operationNumber', width: '100',title: t('order.OrderNum'), showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
{field: 'operateType', width: '120',title:t('warehouseBasicData.type'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
- {field: 'projectNo', width: '120',title:t('ingredientsStock.projectNo'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'materialOutbound.orderId', width: '120',title:t('order.orderId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'materialOutbound.project', width: '120',title:t('order.project'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+ {field: 'materialOutbound.batch', width: '120',title:t('order.batch'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
{field: 'quantity', width: '140',title: t('order.quantity'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
{field: 'inventoryId',width: '100', title: t('ingredientsStock.id'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
{field: 'materialCode',width: '140', title: t('ingredients.materialCode'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/mm/BasicWarehouseTypeController.java b/north-glass-erp/src/main/java/com/example/erp/controller/mm/BasicWarehouseTypeController.java
index bacef23..7ea0edc 100644
--- a/north-glass-erp/src/main/java/com/example/erp/controller/mm/BasicWarehouseTypeController.java
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/mm/BasicWarehouseTypeController.java
@@ -56,4 +56,10 @@
return Result.seccess(basicWarehouseTypeService.deleteBasicWarehouse(basicWarehouseType));
}
+ @ApiOperation("鐢ㄦ埛鍩虹鏁版嵁鏌ヨ杩斿洖json瀵硅薄鏍煎紡")
+ @GetMapping("/BasicWarehouseTypeUser/{type}")
+ public Result BasicWarehouseTypeUser(@PathVariable String type){
+ return Result.seccess(basicWarehouseTypeService.BasicWarehouseTypeUser(type));
+ }
+
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/mm/MaterialInventoryController.java b/north-glass-erp/src/main/java/com/example/erp/controller/mm/MaterialInventoryController.java
index 617b6f1..dbe4b0e 100644
--- a/north-glass-erp/src/main/java/com/example/erp/controller/mm/MaterialInventoryController.java
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/mm/MaterialInventoryController.java
@@ -207,5 +207,14 @@
return Result.seccess(materialInventoryService.getOptimizeOutboundReport(type,pageNum,pageSize,selectDate,materialLog));
}
+ @ApiOperation("鐗╂枡鍑哄簱淇濆瓨骞跺鏍告帴鍙�")
+ @SaCheckPermission("createOutbound.add")
+ @PostMapping("/saveToExamineMaterialOutbound")
+ public Result saveToExamineMaterialOutbound( @RequestBody Map<String,Object> object){
+
+ return Result.seccess(materialInventoryService.saveToExamineMaterialOutbound(object));
+
+ }
+
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/sd/OrderController.java b/north-glass-erp/src/main/java/com/example/erp/controller/sd/OrderController.java
index ac9c5ce..8454789 100644
--- a/north-glass-erp/src/main/java/com/example/erp/controller/sd/OrderController.java
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/sd/OrderController.java
@@ -275,5 +275,10 @@
return Result.seccess(orderService.selectUploadDxf(object));
}
+ @PostMapping("/updateOrderFile")
+ public Result updateOrderFile(@RequestBody Map<String,Object> map) {
+ return Result.seccess(orderService.updateOrderFile(map));
+ }
+
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/entity/mm/MaterialLog.java b/north-glass-erp/src/main/java/com/example/erp/entity/mm/MaterialLog.java
index 3ecc6bb..75063e7 100644
--- a/north-glass-erp/src/main/java/com/example/erp/entity/mm/MaterialLog.java
+++ b/north-glass-erp/src/main/java/com/example/erp/entity/mm/MaterialLog.java
@@ -53,5 +53,7 @@
@ExcelProperty("浼樺寲浣跨敤鏁伴噺")
private Integer useCount;
+ private MaterialOutbound materialOutbound;
+
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/mapper/mm/BasicWarehouseTypeMapper.java b/north-glass-erp/src/main/java/com/example/erp/mapper/mm/BasicWarehouseTypeMapper.java
index 8a9acb0..0288c12 100644
--- a/north-glass-erp/src/main/java/com/example/erp/mapper/mm/BasicWarehouseTypeMapper.java
+++ b/north-glass-erp/src/main/java/com/example/erp/mapper/mm/BasicWarehouseTypeMapper.java
@@ -30,5 +30,7 @@
Boolean updateBasicWarehouse(@Param("id") Long id,@Param("operateTypeName") String operateTypeName);
+ List<String> getBasicWarehouseUser(String type);
+
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderMapper.java b/north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderMapper.java
index 855fd5c..fd19d96 100644
--- a/north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderMapper.java
+++ b/north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderMapper.java
@@ -63,6 +63,8 @@
Boolean saveOrderFile(String fileName,String dxfData,String orderId,Integer orderNumber);
+ Boolean updateOrderFile(String fileName,String dxfData,String orderId,Integer orderNumber);
+
Map<String,String> selectOrderFile( String orderId,Integer orderNumber);
List<Map<String,String>> selectOrderFileList( String orderId);
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/mm/BasicWarehouseTypeService.java b/north-glass-erp/src/main/java/com/example/erp/service/mm/BasicWarehouseTypeService.java
index f118ffa..ec8ecae 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/mm/BasicWarehouseTypeService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/mm/BasicWarehouseTypeService.java
@@ -80,4 +80,11 @@
}
+ public Map<String, Object> BasicWarehouseTypeUser(String type){
+ Map<String, Object> map = new HashMap<>();
+ map.put("userName",basicWarehouseTypeMapper.getBasicWarehouseUser(type));
+ return map;
+ }
+
+
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/mm/MaterialInventoryService.java b/north-glass-erp/src/main/java/com/example/erp/service/mm/MaterialInventoryService.java
index c7115c0..d1863e6 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/mm/MaterialInventoryService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/mm/MaterialInventoryService.java
@@ -1112,4 +1112,134 @@
return map;
}
+ public String saveToExamineMaterialOutbound(Map<String,Object> object) {
+ String saveState = "true";
+ //璁剧疆鍥炴粴鐐�
+ Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint();
+ String materialOutboundId = "";
+ String oddNumber;
+ if (object.get("materialOutboundId") != null) {
+ materialOutboundId = object.get("materialOutboundId").toString();
+ }
+ Log log = new Log();
+ log.setOperatorId(object.get("userId").toString());
+ log.setOperator(object.get("userName").toString());
+ log.setContent(object.toString());
+ try {
+ MaterialOutbound materialOutbound = JSONObject.parseObject(JSONObject.toJSONString(object.get("title")), MaterialOutbound.class);
+ List<MaterialOutboundDetail> materialOutboundDetailList = JSONArray.parseArray(JSONObject.toJSONString(object.get("materialOutboundDetail")), MaterialOutboundDetail.class);
+ //鏌ヨ鍑哄簱鍗曟槸鍚﹀瓨鍦�
+ Integer MaterialOutboundConut = materialInventoryMapper.getMaterialOutboundCount(materialOutboundId);
+ if (MaterialOutboundConut != 0) {
+
+ List<MaterialOutboundDetail> materialOutboundDetailLists = materialInventoryMapper.getIsNotMaterialOutboundDetail(materialOutboundId);
+ if (!materialOutboundDetailLists.isEmpty()) {
+ for (MaterialOutboundDetail materialOutboundDetail : materialOutboundDetailLists) {
+ //杩樺師鐗╂枡搴撳瓨鏁�
+ materialInventoryMapper.updateMaterialInventoryAvailableInt(materialOutboundDetail.getInventoryId(), materialOutboundDetail.getOutboundQuantity());
+ if(materialOutboundDetail.getUseId()!=null){
+ //杩樺師浼樺寲宸ョ▼搴撳瓨鏁�
+ materialInventoryMapper.updateMaterialInventoryAvailableOptInt(materialOutboundDetail.getUseId(), materialOutboundDetail.getOutboundQuantity());
+ }/*else{
+ //杩樺師鐗╂枡搴撳瓨鏁�
+ materialInventoryMapper.updateMaterialInventoryAvailableInt(materialOutboundDetail.getId(), materialOutboundDetail.getOutboundQuantity());
+ }*/
+
+ }
+ }
+ //鍒犻櫎鏉愭枡鍑哄簱鏄庣粏鐨勬暟鎹�
+ materialInventoryMapper.deleteMaterialOutboundDetail(materialOutboundId);
+ materialInventoryMapper.updateMaterialOutbound(materialOutbound, materialOutboundId);
+ materialInventoryMapper.deleteMaterialLog(materialOutboundId);
+ oddNumber = materialOutboundId;
+ log.setFunction("saveMaterialOutbound淇敼:"+oddNumber);
+ } else {
+ //鑾峰彇鍗曞彿
+ oddNumber = orderNumberSetting("鍑哄簱");
+ //鏂板鏉愭枡鍑哄簱琛ㄦ暟鎹�
+ materialInventoryMapper.insertMaterialOutbound(materialOutbound, oddNumber);
+ log.setFunction("saveMaterialOutbound鏂板:"+oddNumber);
+ }
+
+ //鑾峰彇瀵硅薄闆嗗悎寰幆杩涜鏂板淇敼
+
+ if (!materialOutboundDetailList.isEmpty()) {
+ for (MaterialOutboundDetail materialOutboundDetail : materialOutboundDetailList) {
+ MaterialInventory materialInventory = materialInventoryMapper.getMaterialInventoryById(materialOutboundDetail.getId());
+ if(materialInventory.getAvailableQuantity()>=materialOutboundDetail.getOutboundQuantity()){
+ Integer materialOutboundDetailMaximum = materialInventoryMapper.getMaterialOutboundDetailMaximum(oddNumber);
+ //鏂板鏉愭枡鍑哄簱鏄庣粏鏁版嵁
+ materialInventoryMapper.insertMaterialOutboundDetail(materialOutboundDetail, oddNumber, materialOutboundDetailMaximum + 1);
+ //淇敼鐗╂枡搴撳瓨琛ㄥ嚭搴撴暟閲�
+ materialInventoryMapper.updateMaterialInventoryAvailableOut(materialOutboundDetail.getId(), materialOutboundDetail.getOutboundQuantity());
+
+ String projectNo="";
+ if(materialOutboundDetail.getUseId()!=null){
+ projectNo = materialInventoryMapper.selectProjectNo(materialOutboundDetail.getUseId());
+ //淇敼浼樺寲宸ョ▼琛ㄥ嚭搴撴暟閲�
+ materialInventoryMapper.updateMaterialInventoryAvailableOptOut(materialOutboundDetail.getUseId(), materialOutboundDetail.getOutboundQuantity());
+
+ }/*else{
+ //淇敼鐗╂枡搴撳瓨琛ㄥ嚭搴撴暟閲�
+ materialInventoryMapper.updateMaterialInventoryAvailableOut(materialOutboundDetail.getId(), materialOutboundDetail.getOutboundQuantity());
+ }*/
+
+ if(materialOutboundDetail.getUseId()!=null){
+ //淇敼鐗╂枡搴撳瓨鏁伴噺
+ materialInventoryMapper.updateMaterialInventoryInventoryPlanQuantityOut(materialOutboundDetail.getId(), materialOutboundDetail.getOutboundQuantity());
+ }else{
+ materialInventoryMapper.updateMaterialInventoryInventoryOut(materialOutboundDetail.getId(), materialOutboundDetail.getOutboundQuantity());
+ }
+
+ materialInventoryMapper.updateMaterialOutboundToExamine(oddNumber,1,object.get("userName").toString());
+ String json="";
+ MaterialStore materialStore=materialStoreMapper.getSelectMaterialStoreById(Long.valueOf(materialOutboundDetail.getMaterialCode()));
+ json=materialStore.getJson().substring(1, materialStore.getJson().length() - 1);
+ MaterialLog materialLog=new MaterialLog();
+ materialLog.setOperationOrderNumber(oddNumber);
+ materialLog.setOperationNumber(materialOutboundDetailMaximum + 1);
+ materialLog.setOperateType("鐗╂枡鍑哄簱");
+ materialLog.setMaterialCode(Long.valueOf(materialOutboundDetail.getMaterialCode()));
+ materialLog.setMaterialName(convertString(json,"\"name\""));
+ materialLog.setProducer(materialInventory.getProducer());
+ materialLog.setUnit(convertString(json,"\"unit\""));
+ materialLog.setWidth(convertDouble(json,"\"width\""));
+ materialLog.setHeight(convertDouble(json,"\"height\""));
+ materialLog.setThickness(convertDouble(json,"\"thickness\""));
+ materialLog.setQuantity(materialOutboundDetail.getOutboundQuantity());
+ materialLog.setSinglePieceArea(materialOutboundDetail.getSinglePieceArea());
+ materialLog.setInventoryId(materialOutboundDetail.getId());
+ materialLog.setInventoryArea(materialInventory.getInventoryArea());
+ materialLog.setRemarks(materialOutboundDetail.getRemarks());
+ materialLog.setProjectNo(projectNo);
+ materialLog.setOperator(object.get("userName").toString());
+ materialLog.setOperateTime(LocalDate.now());
+ materialLogMapper.insert(materialLog);
+ }else{
+ TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint);
+ return "false1";
+ }
+
+
+
+
+ }
+
+ }
+ logService.saveLog(log);
+
+ } catch (Exception e) {
+ TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint);
+ //灏嗗紓甯镐紶鍏ユ暟鎹簱
+ SysError sysError = new SysError();
+ sysError.setError(e+Arrays.toString(e.getStackTrace()));
+ sysError.setFunc("saveMaterialOutbound");
+ sysErrorService.insert(sysError);
+ saveState = "false";
+
+ }
+ return saveState;
+
+ }
+
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java b/north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java
index 3e78377..b4a90bf 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java
@@ -1011,4 +1011,26 @@
map.put("data",orderMapper.selectOrderFile(orderId,orderNumber));
return map;
}
+
+ public boolean updateOrderFile(Map<String,Object> object) {
+ String orderId = "";
+ if (object.get("orderId") != null) {
+ orderId = object.get("orderId").toString();
+ }
+ int orderNumber =0;
+ if (object.get("orderNumber") != null) {
+ orderNumber = Integer.parseInt(object.get("orderNumber").toString());
+ }
+ String dataBase64 = "";
+ if (object.get("dataBase64") != null) {
+ dataBase64 = object.get("dataBase64").toString();
+ }
+ Map<String,String> orderFile =orderMapper.selectOrderFile(orderId,orderNumber);
+ if(orderFile!=null){
+ orderMapper.updateOrderFile("map.dxf", dataBase64,orderId,orderNumber);
+ }else{
+ orderMapper.saveOrderFile("map.dxf", dataBase64,orderId,orderNumber);
+ }
+ return true;
+ }
}
diff --git a/north-glass-erp/src/main/resources/mapper/mm/BasicWarehouseType.xml b/north-glass-erp/src/main/resources/mapper/mm/BasicWarehouseType.xml
index f1ddbd1..1afd6dd 100644
--- a/north-glass-erp/src/main/resources/mapper/mm/BasicWarehouseType.xml
+++ b/north-glass-erp/src/main/resources/mapper/mm/BasicWarehouseType.xml
@@ -40,6 +40,10 @@
update mm.basic_warehouse_type set operate_type_name=#{operateTypeName},create_time=now() where id=#{id}
</update>
+ <select id="getBasicWarehouseUser" >
+ select user_name from erp_user_info.user u where u.address regexp #{type};
+ </select>
+
diff --git a/north-glass-erp/src/main/resources/mapper/mm/MaterialInventory.xml b/north-glass-erp/src/main/resources/mapper/mm/MaterialInventory.xml
index 099785e..21934e4 100644
--- a/north-glass-erp/src/main/resources/mapper/mm/MaterialInventory.xml
+++ b/north-glass-erp/src/main/resources/mapper/mm/MaterialInventory.xml
@@ -35,6 +35,32 @@
</resultMap>
+ <resultMap id="selectMaterialOutboundLog" type="com.example.erp.entity.mm.MaterialLog" >
+ <id column="id" property="id"/>
+ <result column="operation_order_number" property="operationOrderNumber"/>
+ <result column="operate_type" property="operateType"/>
+ <result column="operation_number" property="operationNumber"/>
+ <result column="inventory_id" property="inventoryId"/>
+ <result column="material_code" property="materialCode"/>
+ <result column="material_name" property="materialName"/>
+ <result column="producer" property="producer"/>
+ <result column="unit" property="unit"/>
+ <result column="width" property="width"/>
+ <result column="height" property="height"/>
+ <result column="thickness" property="thickness"/>
+ <result column="quantity" property="quantity"/>
+ <result column="single_piece_area" property="singlePieceArea"/>
+ <result column="inventory_area" property="inventoryArea"/>
+ <result column="operator" property="operator"/>
+ <result column="remarks" property="remarks"/>
+ <result column="operate_time" property="operateTime"/>
+ <result column="use_count" property="useCount"/>
+
+ <result column="order_id" property="materialOutbound.orderId"/>
+ <result column="project" property="materialOutbound.project"/>
+ <result column="batch" property="materialOutbound.batch"/>
+ </resultMap>
+
<select id="getSelectMaterialInventoryDate">
@@ -974,9 +1000,9 @@
where mi.id = #{id}
</select>
- <select id="getMaterialLogReport" >
+ <select id="getMaterialLogReport" resultMap="selectMaterialOutboundLog">
select *
- from mm.material_log ml
+ from mm.material_log ml left join mm.material_outbound mo on mo.material_outbound_id=ml.operation_order_number
<where>
date(ml.operate_time)>=#{startDate} and date(ml.operate_time) <= #{endDate} and ml.operate_type=#{type}
<if test="materialLog.operateType != null and materialLog.operateType != ''">
@@ -1026,10 +1052,19 @@
and ml.operator regexp #{materialLog.operator}
</if>
<if test="materialLog.remarks != null and materialLog.remarks != ''">
- and ml.remarks regexp #{materialLog.remarksr}
+ and ml.remarks regexp #{materialLog.remarks}
</if>
<if test="materialLog.projectNo != null and materialLog.projectNo != ''">
and ml.project_no regexp #{materialLog.projectNo}
+ </if>
+ <if test="materialLog.materialOutbound!=null and (materialLog.materialOutbound.orderId != null and materialLog.materialOutbound.orderId != '')">
+ and mo.order_id regexp #{materialLog.materialOutbound.orderId}
+ </if>
+ <if test=" materialLog.materialOutbound!=null and materialLog.materialOutbound.project != null and materialLog.materialOutbound.project != ''">
+ and mo.project regexp #{materialLog.materialOutbound.project}
+ </if>
+ <if test=" materialLog.materialOutbound!=null and materialLog.materialOutbound.batch != null and materialLog.materialOutbound.batch != ''">
+ and mo.batch regexp #{materialLog.materialOutbound.batch}
</if>
</where>
order by ml.id desc
@@ -1040,7 +1075,7 @@
<select id="getMaterialLogReportTotal">
select CEILING(count(ml.id)/#{pageSize}) as 'pageTotal',
count(ml.id) as 'total'
- from mm.material_log ml
+ from mm.material_log ml left join mm.material_outbound mo on mo.material_outbound_id=ml.operation_order_number
<where>
date(ml.operate_time)>=#{startDate} and date(ml.operate_time) <= #{endDate} and ml.operate_type=#{type}
<if test="materialLog.operateType != null and materialLog.operateType != ''">
@@ -1090,7 +1125,19 @@
and ml.operator regexp #{materialLog.operator}
</if>
<if test="materialLog.remarks != null and materialLog.remarks != ''">
- and ml.remarks regexp #{materialLog.remarksr}
+ and ml.remarks regexp #{materialLog.remarks}
+ </if>
+ <if test="materialLog.projectNo != null and materialLog.projectNo != ''">
+ and ml.project_no regexp #{materialLog.projectNo}
+ </if>
+ <if test="materialLog.materialOutbound!=null and (materialLog.materialOutbound.orderId != null and materialLog.materialOutbound.orderId != '')">
+ and mo.order_id regexp #{materialLog.materialOutbound.orderId}
+ </if>
+ <if test=" materialLog.materialOutbound!=null and materialLog.materialOutbound.project != null and materialLog.materialOutbound.project != ''">
+ and mo.project regexp #{materialLog.materialOutbound.project}
+ </if>
+ <if test=" materialLog.materialOutbound!=null and materialLog.materialOutbound.batch != null and materialLog.materialOutbound.batch != ''">
+ and mo.batch regexp #{materialLog.materialOutbound.batch}
</if>
</where>
</select>
diff --git a/north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml b/north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml
index 4a12860..2744652 100644
--- a/north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml
+++ b/north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml
@@ -432,4 +432,8 @@
where order_id = #{orderId}
</select>
+
+ <update id="updateOrderFile">
+ update sd.order_file set file_name=#{fileName},file_data=#{dxfData},create_time=now() where orderId=#{orderId} and orderNumber=#{orderNumber}
+ </update>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0