已删除85个文件
已修改14个文件
已添加11个文件
| | |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicRepository/bin/Debug/net6.0/WIDESEA_StorageBasicRepository.deps.json |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/bin/Debug/net6.0/WIDESEA_StorageTaskServices.deps.json |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/bin/Debug/net6.0/WIDESEA_WMSServer.deps.json |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Tasks/bin/Debug/net6.0/WIDESEA_Tasks.dll |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Tasks/bin/Debug/net6.0/WIDESEA_Tasks.pdb |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Tasks/obj/Debug/net6.0/ref/WIDESEA_Tasks.dll |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Tasks/obj/Debug/net6.0/refint/WIDESEA_Tasks.dll |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Tasks/obj/Debug/net6.0/WIDESEA_Tasks.csproj.FileListAbsolute.txt |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Tasks/obj/Debug/net6.0/WIDESEA_Tasks.dll |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Tasks/obj/Debug/net6.0/WIDESEA_Tasks.pdb |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_BusinessesRepository/obj/WIDESEA_BusinessesRepository.csproj.nuget.g.props |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_BusinessesRepository/obj/WIDESEA_BusinessesRepository.csproj.nuget.g.targets |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_BusinessServices/obj/Debug/net6.0/WIDESEA_BusinessServices.assets.cache |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_BusinessServices/obj/WIDESEA_BusinessServices.csproj.nuget.g.props |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_BusinessServices/obj/WIDESEA_BusinessServices.csproj.nuget.g.targets |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/bin/Debug/net6.0/WIDESEA_Core.deps.json |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/obj/Debug/net6.0/WIDESEA_Core.assets.cache |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/obj/Debug/net6.0/WIDESEA_Core.csproj.AssemblyReference.cache |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/obj/Debug/net6.0/WIDESEA_Core.csproj.CoreCompileInputs.cache |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/obj/project.assets.json |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/obj/project.nuget.cache |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/obj/WIDESEA_Core.csproj.nuget.dgspec.json |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/obj/WIDESEA_Core.csproj.nuget.g.props |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/obj/WIDESEA_Core.csproj.nuget.g.targets |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_DTO/obj/WIDESEA_DTO.csproj.nuget.g.props |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_DTO/obj/WIDESEA_DTO.csproj.nuget.g.targets |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IBusinessesRepository/obj/WIDESEA_IBusinessesRepository.csproj.nuget.g.props |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IBusinessesRepository/obj/WIDESEA_IBusinessesRepository.csproj.nuget.g.targets |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IBusinessServices/obj/WIDESEA_IBusinessServices.csproj.nuget.g.props |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IBusinessServices/obj/WIDESEA_IBusinessServices.csproj.nuget.g.targets |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IRepository/obj/WIDESEA_IRepository.csproj.nuget.g.props |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IRepository/obj/WIDESEA_IRepository.csproj.nuget.g.targets |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IServices/obj/WIDESEA_IServices.csproj.nuget.g.props |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IServices/obj/WIDESEA_IServices.csproj.nuget.g.targets |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageBasicRepository/obj/WIDESEA_IStorageBasicRepository.csproj.nuget.g.props |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageBasicRepository/obj/WIDESEA_IStorageBasicRepository.csproj.nuget.g.targets |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageBasicService/obj/WIDESEA_IStorageBasicServices.csproj.nuget.g.props |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageBasicService/obj/WIDESEA_IStorageBasicServices.csproj.nuget.g.targets |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageOutOrderRepository/obj/WIDESEA_IStorageOutOrderRepository.csproj.nuget.g.props |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageOutOrderRepository/obj/WIDESEA_IStorageOutOrderRepository.csproj.nuget.g.targets |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageOutOrderService/obj/WIDESEA_IStorageOutOrderServices.csproj.nuget.g.props |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageOutOrderService/obj/WIDESEA_IStorageOutOrderServices.csproj.nuget.g.targets |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageTaskRepository/obj/WIDESEA_IStorageTaskRepository.csproj.nuget.g.props |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageTaskRepository/obj/WIDESEA_IStorageTaskRepository.csproj.nuget.g.targets |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageTaskService/obj/WIDESEA_IStorageTaskServices.csproj.nuget.g.props |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageTaskService/obj/WIDESEA_IStorageTaskServices.csproj.nuget.g.targets |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Model/obj/WIDESEA_Model.csproj.nuget.g.props |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Model/obj/WIDESEA_Model.csproj.nuget.g.targets |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Repository/obj/WIDESEA_Repository.csproj.nuget.g.props |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Repository/obj/WIDESEA_Repository.csproj.nuget.g.targets |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Services/obj/Debug/net6.0/WIDESEA_Services.assets.cache |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Services/obj/WIDESEA_Services.csproj.nuget.g.props |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Services/obj/WIDESEA_Services.csproj.nuget.g.targets |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicRepository/obj/WIDESEA_StorageBasicRepository.csproj.nuget.g.props |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicRepository/obj/WIDESEA_StorageBasicRepository.csproj.nuget.g.targets |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/obj/Debug/net6.0/WIDESEA_StorageBasicServices.assets.cache |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/obj/WIDESEA_StorageBasicServices.csproj.nuget.g.props |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/obj/WIDESEA_StorageBasicServices.csproj.nuget.g.targets |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageOutOrderRepository/obj/WIDESEA_StorageOutOrderRepository.csproj.nuget.g.props |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageOutOrderRepository/obj/WIDESEA_StorageOutOrderRepository.csproj.nuget.g.targets |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageOutOrderServices/obj/Debug/net6.0/WIDESEA_StorageOutOrderServices.assets.cache |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageOutOrderServices/obj/WIDESEA_StorageOutOrderServices.csproj.nuget.g.props |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageOutOrderServices/obj/WIDESEA_StorageOutOrderServices.csproj.nuget.g.targets |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskRepository/obj/WIDESEA_StorageTaskRepository.csproj.nuget.g.props |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskRepository/obj/WIDESEA_StorageTaskRepository.csproj.nuget.g.targets |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/obj/Debug/net6.0/WIDESEA_StorageTaskServices.assets.cache |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/obj/WIDESEA_StorageTaskServices.csproj.nuget.g.props |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/obj/WIDESEA_StorageTaskServices.csproj.nuget.g.targets |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/bin/Debug/net6.0/Microsoft.Win32.SystemEvents.dll |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/bin/Debug/net6.0/runtimes/win/lib/net6.0/Microsoft.Win32.SystemEvents.dll |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/bin/Debug/net6.0/runtimes/win/lib/net6.0/System.Diagnostics.PerformanceCounter.dll |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/bin/Debug/net6.0/runtimes/win/lib/net6.0/System.Drawing.Common.dll |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/bin/Debug/net6.0/runtimes/win/lib/net6.0/System.Security.Cryptography.ProtectedData.dll |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/bin/Debug/net6.0/runtimes/win/lib/net6.0/System.Windows.Extensions.dll |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/bin/Debug/net6.0/SixLabors.ImageSharp.dll |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/bin/Debug/net6.0/System.Configuration.ConfigurationManager.dll |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/bin/Debug/net6.0/System.Diagnostics.PerformanceCounter.dll |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/bin/Debug/net6.0/System.Drawing.Common.dll |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/bin/Debug/net6.0/System.Security.Cryptography.ProtectedData.dll |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/bin/Debug/net6.0/System.Security.Permissions.dll |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/bin/Debug/net6.0/System.Windows.Extensions.dll |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/bin/Debug/net6.0/runtimes/unix/lib/net6.0/System.Drawing.Common.dll |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/bin/Debug/net6.0/WIDESEA_WMSServer.runtimeconfig.json |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Log/å
¨å±å¼å¸¸é误æ¥å¿_1724081992.log |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/obj/Debug/net6.0/ApiEndpoints.json |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/obj/Debug/net6.0/WIDESEA_WMSServer.assets.cache |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/obj/WIDESEA_WMSServer.csproj.nuget.g.props |
| | | /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/obj/WIDESEA_WMSServer.csproj.nuget.g.targets |
| | |
| | | <meta charset="UTF-8" /> |
| | | <link rel="icon" href="/favicon.ico" /> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| | | <title>volå¼åæ¡æ¶</title> |
| | | <title>WIDESEA_WMS</title> |
| | | <script> |
| | | var lang_storage_key = 'vol_lang'; |
| | | </script> |
| | |
| | | export default defineComponent({ |
| | | setup() { |
| | | const table = ref({ |
| | | key: 'groupDetailId', |
| | | key: 'id', |
| | | footer: "Foots", |
| | | cnName: 'åºåæç»ä¿¡æ¯', |
| | | name: 'stock/Dt_BillGroupStockDetail', |
| | | url: "/StockInfoDetail/", |
| | | sortName: "GroupId" |
| | | sortName: "id" |
| | | }); |
| | | const editFormFields = ref({ |
| | | "palletCode": "", |
| | |
| | | { "title": "ç©æç¼å·", "field": "materialNo", type: "text" }, |
| | | ] |
| | | ]); |
| | | const columns = ref([{ field: 'groupDetailId', title: 'åºåæç»ID', type: 'int', width: 110, hidden: true, readonly: true, require: true, align: 'left' }, |
| | | { field: 'groupId', title: 'å¤å¥', type: 'int', width: 110, hidden: true, align: 'left', sort: true }, |
| | | { field: 'palletCode', title: 'æçå·', type: 'string', width: 110, align: 'left' }, |
| | | const columns = ref([{ field: 'id', title: 'åºåæç»ID', type: 'int', width: 110, hidden: true, readonly: true, require: true, align: 'left' }, |
| | | { field: 'stockId', title: 'å¤å¥', type: 'int', width: 110, hidden: true, align: 'left', sort: true }, |
| | | { field: 'orderNo', title: 'åæ®ç¼å·', type: 'string', width: 110, align: 'left' }, |
| | | { field: 'orderDate', title: 'åæ®æ¥æ', type: 'datetime', width: 150, align: 'left', sort: true }, |
| | | { field: 'batchNo', title: 'æ¹æ¬¡å·', type: 'string', width: 110, align: 'left' }, |
| | | { field: 'materialNo', title: 'ç©æç¼å·', type: 'string', width: 110, align: 'left' }, |
| | | { field: 'materialName', title: 'ç©æåç§°', type: 'string', width: 110, align: 'left' }, |
| | | { field: 'outBoxCode', title: 'å¤ç®±ç ', type: 'string', width: 120, align: 'left' }, |
| | | { field: 'inBoxCode', title: 'å
ç®±ç ', type: 'string', width: 120, align: 'left' }, |
| | | { field: 'emptyPalletCode', title: '空æçç ', type: 'string', width: 120, align: 'left' }, |
| | | { field: 'palletUnit', title: 'ç»çåä½', type: 'string', width: 110, align: 'left' }, |
| | | { field: 'palletQuantity', title: 'ç»çæ°é', type: 'decimal', width: 110, align: 'left' }, |
| | | { field: 'basicUnit', title: 'åä½', type: 'string', width: 110, align: 'left' }, |
| | | { field: 'basicQuantity', title: '计é', type: 'decimal', width: 110, align: 'left' }, |
| | | { field: 'createID', title: 'å建ID', type: 'int', sort: true, width: 100, hidden: true, align: 'left' }, |
| | | { field: 'materielCode', title: 'ç©æç¼å·', type: 'string', width: 110, align: 'left' }, |
| | | { field: 'materielName', title: 'ç©æåç§°', type: 'string', width: 110, align: 'left' }, |
| | | { field: 'serialNumber', title: 'åºåå·', type: 'string', width: 120, align: 'left' }, |
| | | { field: 'stockQuantity', title: 'åºåæ°é', type: 'string', width: 120, align: 'left' }, |
| | | { field: 'outboundQuantity', title: 'åºåºæ°é', type: 'string', width: 120, align: 'left' }, |
| | | { field: 'status', title: 'åºåç¶æ', type: 'string', width: 110, align: 'left' }, |
| | | { field: 'remark', title: '夿³¨', type: 'decimal', width: 110, align: 'left' }, |
| | | { field: 'creater', title: 'å建人', type: 'string', sort: true, width: 110, align: 'left' }, |
| | | { field: 'createDate', title: 'å建æ¶é´', type: 'datetime', sort: true, width: 150, align: 'left', sort: true }, |
| | | { field: 'modifyID', title: 'ä¿®æ¹äººID', type: 'int', sort: true, width: 100, hidden: true, align: 'left' }, |
| | | { field: 'modifier', title: 'ä¿®æ¹äºº', type: 'string', sort: true, width: 100, align: 'left' }, |
| | | { field: 'modifyDate', title: 'ä¿®æ¹æ¶é´', type: 'datetime', sort: true, width: 150, align: 'left', sort: true }]); |
| | | const detail = ref({ |
| | |
| | | **åå°æä½è§ï¼http://v2.volcore.xyz/document/netCoreDev |
| | | *****************************************************************************************/ |
| | | //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | import gridHeader from "./demo_Product/Dt_TaskExecuteDetail.vue"; |
| | | import gridHeader from './demo_Product/Dt_TaskExecuteDetail.vue' |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: gridHeader, |
| | | gridBody: "", |
| | | gridFooter: "", |
| | | gridBody: '', |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: "", |
| | | modelBody: "", |
| | | modelFooter: "", |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '' |
| | | }, |
| | | tableAction: "", //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | buttons: { view: [], box: [], detail: [] }, //æ©å±çæé® |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | //æ¡æ¶åå§åé
ç½®åï¼ |
| | | //示ä¾ï¼å¨æé®çæå颿·»å ä¸ä¸ªæé® |
| | | // this.buttons.unshift({ //ä¹å¯ä»¥ç¨pushæè
spliceæ¹æ³æ¥ä¿®æ¹buttonsæ°ç» |
| | | // name: 'æé®', //æé®åç§° |
| | | // icon: 'el-icon-document', //æé®å¾æ vue2çæ¬è§iviewææ¡£iconï¼vue3çæ¬è§element uiææ¡£icon(注æä¸æ¯element pulsææ¡£) |
| | | // type: 'primary', //æé®æ ·å¼vue2çæ¬è§iviewææ¡£buttonï¼vue3çæ¬è§element uiææ¡£button |
| | | // onClick: function () { |
| | | this.buttons.unshift({ |
| | | //ä¹å¯ä»¥ç¨pushæè
spliceæ¹æ³æ¥ä¿®æ¹buttonsæ°ç» |
| | | name: 'ä»»å¡å®æ', //æé®åç§° |
| | | icon: 'el-icon-document', //æé®å¾æ vue2çæ¬è§iviewææ¡£iconï¼vue3çæ¬è§element uiææ¡£icon(注æä¸æ¯element pulsææ¡£) |
| | | type: 'primary', //æé®æ ·å¼vue2çæ¬è§iviewææ¡£buttonï¼vue3çæ¬è§element uiææ¡£button |
| | | onClick: function () { |
| | | // this.$Message.success('ç¹å»äºæé®'); |
| | | // } |
| | | // }); |
| | | let row = this.$refs.table.getSelected() //è·åéä¸çè¡ |
| | | if (row <= 0) { |
| | | //å¦ææ²¡æéä¸è¡ |
| | | this.$Message.error('è¯·éæ©ä¸è¡æ°æ®') |
| | | return |
| | | } |
| | | debugger; |
| | | let taskNum = row[0].taskNum |
| | | this.http.get(`/api/Task/CompleteTaskAsync?taskNum=${taskNum}`, {}).then((res) => { |
| | | //示ä¾ï¼è°ç¨åå°æ¥å£ |
| | | if (res.data.code === 200) { |
| | | this.$Message.success('ä»»å¡å®æ') |
| | | } else { |
| | | this.$Message.error(res.data.msg) //é误æç¤º |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | //示ä¾ï¼è®¾ç½®ä¿®æ¹æ°å»ºãç¼è¾å¼¹åºæ¡å段æ ç¾çé¿åº¦ |
| | | this.boxOptions.labelWidth = 150; |
| | | this.boxOptions.labelWidth = 150 |
| | | |
| | | //æ¾ç¤ºæç¤º |
| | | this.columns.forEach((col) => { |
| | | col.showOverflowTooltip = true; |
| | | }); |
| | | col.showOverflowTooltip = true |
| | | }) |
| | | |
| | | //示ä¾ï¼èªå®ä¹è¡¨æ ¼å |
| | | //è¡¨æ ¼ä¸æ·»å èªå®ä¹æé® |
| | | this.columns.push({ |
| | | title: "æä½", |
| | | field: "æä½", |
| | | title: 'æä½', |
| | | field: 'æä½', |
| | | width: 150, |
| | | align: "left", // 'center', |
| | | align: 'left', // 'center', |
| | | render: (h, { row, column, index }) => { |
| | | return ( |
| | | <div> |
| | |
| | | onClick={($e) => { |
| | | // this.$refs.table.load(); |
| | | // console.log(this.$refs.table); |
| | | this.$refs.gridHeader.openModel1(row); |
| | | this.$refs.gridHeader.openModel1(row) |
| | | }} |
| | | type="primary" |
| | | plain |
| | |
| | | æ¥çæ§è¡ä¿¡æ¯ |
| | | </el-button> |
| | | </div> |
| | | ); |
| | | }, |
| | | }); |
| | | ) |
| | | } |
| | | }) |
| | | }, |
| | | btn1Click(row, column, index, $e) { |
| | | $e.stopPropagation(); |
| | | this.$refs.gridHeader.openModel1(row); |
| | | $e.stopPropagation() |
| | | this.$refs.gridHeader.openModel1(row) |
| | | }, |
| | | onInited() { |
| | | //æ¡æ¶åå§åé
ç½®å |
| | |
| | | searchBefore(param) { |
| | | //ç颿¥è¯¢å,å¯ä»¥ç»param.wheresæ·»å æ¥è¯¢åæ° |
| | | //è¿åfalseï¼åä¸ä¼æ§è¡æ¥è¯¢ |
| | | return true; |
| | | return true |
| | | }, |
| | | searchAfter(result) { |
| | | //æ¥è¯¢åï¼resultè¿åçæ¥è¯¢æ°æ®,å¯ä»¥å¨æ¾ç¤ºå°è¡¨æ ¼åå¤çè¡¨æ ¼çå¼ |
| | | return true; |
| | | return true |
| | | }, |
| | | addBefore(formData) { |
| | | //æ°å»ºä¿ååformData为对象ï¼å
æ¬æç»è¡¨ï¼å¯ä»¥ç»ç»è¡¨å设置å¼ï¼èªå·±è¾åºçformDataçå¼ |
| | | return true; |
| | | return true |
| | | }, |
| | | updateBefore(formData) { |
| | | //ç¼è¾ä¿ååformData为对象ï¼å
æ¬æç»è¡¨ãå é¤è¡çId |
| | | return true; |
| | | return true |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | this.$refs.table.$refs.table.toggleRowSelection(row) //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | |
| | | //(3)this.editFormFields.åæ®µ='xxx'; |
| | | //妿éè¦ç»ä¸ææ¡è®¾ç½®é»è®¤å¼ï¼è¯·éåthis.editFormOptionsæ¾å°å段é
置对åºdata屿§çkeyå¼ |
| | | //ç䏿就æè¾åºçï¼console.log(this.editFormOptions) |
| | | }, |
| | | }, |
| | | }; |
| | | export default extension; |
| | | } |
| | | } |
| | | } |
| | | export default extension |
| | |
| | | export default defineComponent({ |
| | | setup() { |
| | | const table = ref({ |
| | | key: 'groupId', |
| | | key: 'id', |
| | | footer: "Foots", |
| | | cnName: 'åºåä¿¡æ¯', |
| | | name: 'stock/Dt_BillGroupStock', |
| | |
| | | { "title": "ç»çç±»å", "field": "groupType", type: "select", dataKey: "GroupType", data: [] }, |
| | | ] |
| | | ]); |
| | | const columns = ref([{ field: 'groupId', title: 'åºåID', type: 'int', width: 110, hidden: true, readonly: true, require: true, align: 'left' }, |
| | | const columns = ref([{ field: 'id', title: 'åºåID', type: 'int', width: 110, hidden: true, readonly: true, require: true, align: 'left' }, |
| | | { field: 'locationCode', title: 'åºä½', type: 'string', width: 110, align: 'left' }, |
| | | { field: 'palletCode', title: 'æçæ¡ç ', type: 'string', width: 110, align: 'left', sort: true }, |
| | | { field: 'orderNo', title: 'åæ®ç¼å·', type: 'string', width: 110, align: 'left' }, |
| | | { field: 'orderType', title: '订åç±»å', type: 'int', width: 110, align: 'left' }, |
| | | { field: 'orderDetailId', title: 'åºåæç»ID', type: 'int', width: 110, hidden: true, align: 'left' }, |
| | | { field: 'materialNo', title: 'ç©æç¼å·', type: 'string', width: 110, align: 'left' }, |
| | | { field: 'batchNo', title: 'æ¹æ¬¡å·', type: 'string', width: 110, align: 'left' }, |
| | | { field: 'groupType', title: 'ç»çç±»å', type: 'int', width: 110, align: 'left', bind: { key: "GroupType", data: [] } }, |
| | | { field: 'groupWay', title: 'ç»çæ¹å¼', type: 'int', width: 110, align: 'left' }, |
| | | { field: 'isFull', title: 'æ¯å¦æ»¡ç', type: 'bool', width: 110, hidden: true, align: 'left' }, |
| | | { field: 'state', title: 'åºåç¶æ', type: 'int', width: 110, align: 'left', bind: { key: "StockState", data: [] } }, |
| | | { field: 'isFull', title: 'æ¯å¦æ»¡ç', type: 'bool', width: 110, align: 'left' }, |
| | | // { field: 'state', title: 'åºåç¶æ', type: 'int', width: 110, align: 'left', bind: { key: "StockState", data: [] } }, |
| | | { field: 'remark', title: '夿³¨', type: 'string', width: 120, hidden: true, align: 'left' }, |
| | | { field: 'createID', title: 'å建ID', type: 'int', sort: true, width: 100, hidden: true, align: 'left' }, |
| | | { field: 'creater', title: 'å建人', type: 'string', sort: true, width: 110, align: 'left' }, |
| | |
| | | /// SqlsugarClientå®ä½ |
| | | /// </summary> |
| | | ISqlSugarClient Db { get; } |
| | | |
| | | /// <summary> |
| | | /// éè¿ä¸»é®æ¥è¯¢æ°æ® |
| | | /// </summary> |
| | |
| | | int AddData(TEntity entity); |
| | | |
| | | Task<int> AddDataAsync(TEntity entity); |
| | | |
| | | /// <summary> |
| | | /// å¯¼èªæå
¥æ°æ®(åªæ¯æ2级) |
| | | /// </summary> |
| | | /// <param name="Entity"></param> |
| | | /// <returns></returns> |
| | | Task<bool> AddDataNavAsync(TEntity Entity); |
| | | |
| | | /// <summary> |
| | | /// æ·»å 夿¡æ°æ® |
| | |
| | | |
| | | Task<TEntity> QueryFirstAsync(Expression<Func<TEntity, bool>> whereExpression); |
| | | |
| | | Task<TEntity> QueryFirstNavAsync(Expression<Func<TEntity, bool>> whereExpression); |
| | | |
| | | TResult QueryFirst<TResult>(Expression<Func<TEntity, bool>> whereExpression, Expression<Func<TEntity, TResult>> expression); |
| | | |
| | | Task<TResult> QueryFirstAsync<TResult>(Expression<Func<TEntity, bool>> whereExpression, Expression<Func<TEntity, TResult>> expression); |
| | |
| | | using WIDESEA_Core.DB; |
| | | using WIDESEA_Core.Const; |
| | | using WIDESEA_Core.AOP; |
| | | using AngleSharp.Dom; |
| | | using OfficeOpenXml.FormulaParsing.Excel.Functions.Text; |
| | | using SharpCompress.Common; |
| | | |
| | | namespace WIDESEA_Core.BaseRepository |
| | | { |
| | |
| | | // Expression<Func<T, T2, T3, bool>> whereLambda = null) where T : class, new(){throw new NotImplementedException();} |
| | | //Task<PageModel<TEntity>> QueryPage(PaginationModel pagination){throw new NotImplementedException();} |
| | | |
| | | |
| | | public Task<TEntity> QureyDataByIdAsync(object id) |
| | | { |
| | | return _db.Queryable<TEntity>().In(id).SingleAsync(); |
| | |
| | | { |
| | | IInsertable<TEntity> insert = _db.Insertable(entity); |
| | | return insert.ExecuteReturnIdentityAsync(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å¯¼èªæå
¥æ°æ®(åªæ¯æ2级) |
| | | /// </summary> |
| | | /// <param name="Entity"></param> |
| | | /// <returns></returns> |
| | | public async Task<bool> AddDataNavAsync(TEntity Entity) |
| | | { |
| | | return await _db.InsertNav(Entity).IncludesAllFirstLayer().ExecuteCommandAsync(); |
| | | } |
| | | |
| | | public Task<int> AddDataAsync(List<TEntity> listEntity) |
| | |
| | | return _db.Queryable<TEntity>().WhereIF(whereExpression != null, whereExpression).FirstAsync(); |
| | | } |
| | | |
| | | public Task<TEntity> QueryFirstNavAsync(Expression<Func<TEntity, bool>> whereExpression) |
| | | { |
| | | return _db.Queryable<TEntity>().WhereIF(whereExpression != null, whereExpression).IncludesAllFirstLayer().FirstAsync(); |
| | | } |
| | | |
| | | public Task<TResult> QueryFirstAsync<TResult>(Expression<Func<TEntity, bool>> whereExpression, Expression<Func<TEntity, TResult>> expression) |
| | | { |
| | | return _db.Queryable<TEntity>().WhereIF(whereExpression != null, whereExpression).Select(expression).FirstAsync(); |
| | |
| | | <PackageReference Include="Autofac.Extensions.DependencyInjection" Version="9.0.0" /> |
| | | <PackageReference Include="Autofac.Extras.DynamicProxy" Version="7.1.0" /> |
| | | <PackageReference Include="AutoMapper" Version="13.0.1" /> |
| | | <PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.8" /> |
| | | <PackageReference Include="log4net" Version="2.0.17" /> |
| | | <PackageReference Include="Magicodes.IE.EPPlus" Version="2.7.5.1" /> |
| | | <PackageReference Include="Magicodes.IE.Excel" Version="2.7.5.1" /> |
| | | <PackageReference Include="MailKit" Version="4.7.1.1" /> |
| | | <PackageReference Include="Masuit.Tools.Core" Version="2024.5.6" /> |
| | | <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.29" /> |
| | | <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.1" /> |
| | | <PackageReference Include="MiniProfiler.AspNetCore.Mvc" Version="4.3.8" /> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace WIDESEA_IStorageBasicRepository |
| | | { |
| | | public interface IBoxingInfoDetailRepository : IRepository<DtBoxingInfoDetail> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace WIDESEA_IStorageBasicRepository |
| | | { |
| | | public interface IBoxingInfoRepository : IRepository<DtBoxingInfo> |
| | | { |
| | | } |
| | | } |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IStorageBasicRepository |
| | | namespace WIDESEA_IStorageBasicRepository |
| | | { |
| | | public interface IStockInfoRepository : IRepository<DtStockInfo> |
| | | { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace WIDESEA_IStorageBasicService; |
| | | |
| | | public interface IBoxingInfoDetailService : IService<DtBoxingInfoDetail> |
| | | { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | |
| | | namespace WIDESEA_IStorageBasicService; |
| | | |
| | | public interface IBoxingInfoService : IService<DtBoxingInfo> |
| | | { |
| | | /// <summary> |
| | | /// æ·»å ç»ç |
| | | /// </summary> |
| | | /// <param name="boxingInfo"></param> |
| | | /// <returns></returns> |
| | | Task<WebResponseContent> AddBoxingInfoAsync( DtBoxingInfo boxingInfo); |
| | | } |
| | |
| | | abstract Task<WebResponseContent> CompleteStackTaskAsync(Dt_Task task, DtStockInfo stock); |
| | | |
| | | /// <summary> |
| | | /// åºåºä»»å¡å®æ |
| | | /// </summary> |
| | | /// <param name="saveModel">任塿°æ®åé</param> |
| | | /// <returns>è¿åç»æé</returns> |
| | | abstract Task<WebResponseContent> CompleteTaskAsync(Dt_Task task, DtStockInfo stock); |
| | | |
| | | /// <summary> |
| | | /// ç§»åºä»»å¡å®æ |
| | | /// </summary> |
| | | /// <param name="saveModel">任塿°æ®åé</param> |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using SqlSugar; |
| | | using WIDESEA_Core.DB.Models; |
| | | namespace WIDESEA_Model.Models |
| | | { |
| | | |
| | | namespace WIDESEA_Model.Models; |
| | | |
| | | /// <summary> |
| | | /// ç©æåºæ¬ä¿¡æ¯è¡¨ |
| | | ///</summary> |
| | | [SugarTable("Dt_MaterielInfo")] |
| | | public class Dt_MaterielInfo : BaseEntity |
| | | { |
| | | |
| | | |
| | | /// <summary> |
| | | /// å¤ æ³¨:ç©æID |
| | | /// é»è®¤å¼: |
| | |
| | | /// å¤ æ³¨:ç©æç¼ç |
| | | /// é»è®¤å¼: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="MaterielCode" ) ] |
| | | [SugarColumn(ColumnName = "MaterielCode", IsNullable = false)] |
| | | public string? MaterielCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¤ æ³¨:æå±åºåº |
| | | /// é»è®¤å¼: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="WareAreaCode" ) ] |
| | | public string? WareAreaCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¤ æ³¨:ç©æåç§° |
| | | /// é»è®¤å¼: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="MaterielName" ) ] |
| | | [SugarColumn(ColumnName = "MaterielName", IsNullable = false)] |
| | | public string? MaterielName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¤ æ³¨:å
è£
è§æ ¼ |
| | | /// é»è®¤å¼: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="Packspes" ) ] |
| | | public string? Packspes { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¤ æ³¨:ç©ææè¿° |
| | | /// é»è®¤å¼: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="MaterielDesc" ) ] |
| | | [SugarColumn(ColumnName = "MaterielDesc", IsNullable = true)] |
| | | public string? MaterielDesc { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¤ æ³¨:ç©æå±æ§ |
| | | /// é»è®¤å¼: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="Attribute" ) ] |
| | | public string? Attribute { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¤ æ³¨:计éåä½ |
| | | /// é»è®¤å¼: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="Unit" ) ] |
| | | public string? Unit { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¤ æ³¨:å½åç¶æï¼0ï¼ç¦ç¨ 1ï¼å¯ç¨ï¼ |
| | | /// é»è®¤å¼: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="Status" ) ] |
| | | [SugarColumn(ColumnName = "Status", IsNullable = false)] |
| | | public int? Status { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¤ æ³¨:æå°å
è£
æ° |
| | | /// é»è®¤å¼: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="MinpackQty" ) ] |
| | | [SugarColumn(ColumnName = "MinpackQty", IsNullable = true)] |
| | | public decimal? MinpackQty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¤ æ³¨:ç产å |
| | | /// é»è®¤å¼: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="Mfacturer" ) ] |
| | | [SugarColumn(ColumnName = "Mfacturer", IsNullable = true)] |
| | | public string? Mfacturer { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¤ æ³¨:ä¾åºå |
| | | /// é»è®¤å¼: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="Supplier" ) ] |
| | | public string? Supplier { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¤ æ³¨:åé |
| | | /// é»è®¤å¼: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="Netweight" ) ] |
| | | [SugarColumn(ColumnName = "Netweight", IsNullable = true)] |
| | | public decimal? Netweight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¤ æ³¨:æ¯é |
| | | /// é»è®¤å¼: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="Grossweight" ) ] |
| | | [SugarColumn(ColumnName = "Grossweight", IsNullable = true)] |
| | | public decimal? Grossweight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¤ æ³¨:æææ |
| | | /// é»è®¤å¼: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="Validity" ) ] |
| | | [SugarColumn(ColumnName = "Validity", IsNullable = true)] |
| | | public int? Validity { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¤ æ³¨:å®å
¨åºå |
| | | /// é»è®¤å¼: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="Safety" ) ] |
| | | [SugarColumn(ColumnName = "Safety", IsNullable = true)] |
| | | public decimal? Safety { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¤ æ³¨:夿³¨ |
| | | /// é»è®¤å¼: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="Remark" ) ] |
| | | [SugarColumn(ColumnName = "Remark", IsNullable = true)] |
| | | public string? Remark { get; set; } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// å¤ æ³¨: |
| | | /// é»è®¤å¼: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="spare1" ) ] |
| | | public string? Spare1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¤ æ³¨: |
| | | /// é»è®¤å¼: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="spare2" ) ] |
| | | public string? Spare2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¤ æ³¨: |
| | | /// é»è®¤å¼: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="spare3" ) ] |
| | | public string? Spare3 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¤ æ³¨: |
| | | /// é»è®¤å¼: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="spare4" ) ] |
| | | public string? Spare4 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¤ æ³¨: |
| | | /// é»è®¤å¼: |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="spare5" ) ] |
| | | public string? Spare5 { get; set; } |
| | | |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Masuit.Tools.Core.Validator; |
| | | using SqlSugar; |
| | | using System.ComponentModel.DataAnnotations; |
| | | using WIDESEA_Core.DB.Models; |
| | | |
| | | namespace WIDESEA_Model.Models |
| | | { |
| | | [SugarTable(nameof(DtBoxingInfo), "ç»çä¿¡æ¯")] |
| | | public class DtBoxingInfo : BaseEntity |
| | | { |
| | | /// <summary> |
| | | /// ä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æçç¼ç |
| | | /// </summary> |
| | | [Required] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "æçç¼å·")] |
| | | public string PalletCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦æ»¡ç |
| | | /// </summary> |
| | | [Required] |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "æ¯å¦æ»¡ç")] |
| | | public bool IsFull { get; set; } = true; |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "夿³¨")] |
| | | public string Remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºåæç» |
| | | /// </summary> |
| | | [MinItemsCount(1)] // æ£æµéåå
ç´ æå°1个 |
| | | [SugarColumn(ColumnName = "BoxingInfoDetails")] |
| | | [Navigate(NavigateType.OneToMany, nameof(DtBoxingInfoDetail.BoxingInfoId))] |
| | | public List<DtBoxingInfoDetail>? BoxingInfoDetails { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System.ComponentModel.DataAnnotations; |
| | | using WIDESEA_Core.DB.Models; |
| | | |
| | | namespace WIDESEA_Model.Models; |
| | | |
| | | [SugarTable(nameof(DtBoxingInfoDetail), "ç»çæç»")] |
| | | public class DtBoxingInfoDetail : BaseEntity |
| | | { |
| | | /// <summary> |
| | | /// ä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç»çä¿¡æ¯ä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ç»çä¿¡æ¯ä¸»é®")] |
| | | public int BoxingInfoId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æç¼ç |
| | | /// </summary> |
| | | [Required] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "ç©æç¼å·")] |
| | | public string MaterielCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æåç§° |
| | | /// </summary> |
| | | [Required] |
| | | [SugarColumn(IsNullable = false, Length = 200, ColumnDescription = "ç©æåç§°")] |
| | | public string MaterielName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åæ®ç¼å· |
| | | /// </summary> |
| | | [Required] |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "åæ®ç¼å·")] |
| | | public string OrderNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¹æ¬¡å· |
| | | /// </summary> |
| | | [Required] |
| | | [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "æ¹æ¬¡å·")] |
| | | public string BatchNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºåå· |
| | | /// </summary> |
| | | [Required] |
| | | [SugarColumn(IsNullable = false, Length = 100, ColumnDescription = "åºåå·")] |
| | | public string SerialNumber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºåæ°é |
| | | /// </summary> |
| | | [Required] |
| | | [SugarColumn(IsNullable = false, DecimalDigits = 2, ColumnDescription = "åºåæ°é")] |
| | | public decimal StockQuantity { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºåºæ°é |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "åºåºæ°é", DefaultValue = "0")] |
| | | public decimal OutboundQuantity { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç»çç¶æ |
| | | /// </summary> |
| | | [Required] |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ç»çç¶æ")] |
| | | public int Status { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "夿³¨")] |
| | | public string Remark { get; set; } |
| | | } |
| | |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.DB.Models; |
| | | |
| | | namespace WIDESEA_Model.Models |
| | | { |
| | | namespace WIDESEA_Model.Models; |
| | | |
| | | [SugarTable(nameof(DtStockInfoDetail), "åºåä¿¡æ¯æç»")] |
| | | public class DtStockInfoDetail : BaseEntity |
| | | { |
| | |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "夿³¨")] |
| | | public string Remark { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace WIDESEA_StorageBasicRepository |
| | | { |
| | | public class BoxingInfoDetailRepository : RepositoryBase<DtBoxingInfoDetail>, IBoxingInfoDetailRepository |
| | | { |
| | | public BoxingInfoDetailRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace WIDESEA_StorageBasicRepository |
| | | { |
| | | public class BoxingInfoRepository : RepositoryBase<DtBoxingInfo>, IBoxingInfoRepository |
| | | { |
| | | public BoxingInfoRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace WIDESEA_StorageBasicService; |
| | | |
| | | public class BoxingInfoDetailService : ServiceBase<DtBoxingInfoDetail, IBoxingInfoDetailRepository>, IBoxingInfoDetailService |
| | | { |
| | | public BoxingInfoDetailService(IBoxingInfoDetailRepository BaseDal) : base(BaseDal) |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Masuit.Tools; |
| | | using System.ComponentModel.DataAnnotations; |
| | | |
| | | namespace WIDESEA_StorageBasicService; |
| | | |
| | | public class BoxingInfoService : ServiceBase<DtBoxingInfo, IBoxingInfoRepository>, IBoxingInfoService |
| | | { |
| | | public BoxingInfoService(IBoxingInfoRepository BaseDal) : base(BaseDal) |
| | | { |
| | | } |
| | | |
| | | public async Task<WebResponseContent> AddBoxingInfoAsync(DtBoxingInfo boxingInfo) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | // éªè¯æ¨¡åé颿°æ®æ¯å¦åæ³ï¼å¦æä¸åæ³æåºå¼å¸¸ |
| | | var errors = ValidateModel(boxingInfo); |
| | | if (errors.Count > 0) |
| | | { |
| | | foreach (var error in errors) |
| | | { |
| | | Console.WriteLine(error.ErrorMessage); |
| | | |
| | | } |
| | | string errorMessage = string.Join(",", errors.Select(e => e.ErrorMessage)); |
| | | content.Error(errorMessage); |
| | | } |
| | | else |
| | | { |
| | | var info = await BaseDal.QueryFirstAsync(x=>x.PalletCode == boxingInfo.PalletCode); |
| | | if (!info.IsNullOrEmpty()) |
| | | { |
| | | content.Error("该æçå·²åå¨ç»ç"); |
| | | } |
| | | else |
| | | { |
| | | // æ·»å ç»çä¿¡æ¯ |
| | | var result = await BaseDal.AddDataNavAsync(boxingInfo); |
| | | if (result) |
| | | { |
| | | content.OK("æ·»å æå", boxingInfo); |
| | | } |
| | | } |
| | | } |
| | | return content; |
| | | } |
| | | |
| | | // éªè¯æ¨¡å |
| | | public static List<ValidationResult> ValidateModel(object model) |
| | | { |
| | | // å建ä¸ä¸ªéªè¯ç»æå表 |
| | | var validationResults = new List<ValidationResult>(); |
| | | // å建ä¸ä¸ªéªè¯ä¸ä¸æ |
| | | var validationContext = new ValidationContext(model, serviceProvider: null, items: null); |
| | | |
| | | // 使ç¨éªè¯å¨å°è¯éªè¯æ¨¡åï¼å¹¶å°éªè¯ç»ææ·»å å°éªè¯ç»æåè¡¨ä¸ |
| | | Validator.TryValidateObject(model, validationContext, validationResults, validateAllProperties: true); |
| | | |
| | | // è¿åéªè¯ç»æå表 |
| | | return validationResults; |
| | | } |
| | | } |
| | |
| | | namespace WIDESEA_StorageOutTaskServices; |
| | | using Mapster; |
| | | namespace WIDESEA_StorageOutTaskServices; |
| | | |
| | | public class Dt_TaskService : ServiceBase<Dt_Task, IDt_TaskRepository>, IDt_TaskService |
| | | { |
| | |
| | | private readonly IPointStackerRelationRepository _pointStackerRelationRepository; |
| | | private readonly ITaskExecuteDetailRepository _taskExecuteDetailRepository; |
| | | private readonly ILocationStatusChangeRecordRepository _locationStatusChangeRecordRepository; |
| | | private readonly IBoxingInfoRepository _boxingInfoRepository; |
| | | |
| | | public Dt_TaskService(IDt_TaskRepository BaseDal, |
| | | IUnitOfWorkManage unitOfWorkManage, |
| | |
| | | IDt_WareAreaInfoRepository wareAreaInfoRepository, |
| | | IPointStackerRelationRepository pointStackerRelationRepository, |
| | | ITaskExecuteDetailRepository taskExecuteDetailRepository, |
| | | ILocationStatusChangeRecordRepository locationStatusChangeRecordRepository) : base(BaseDal) |
| | | ILocationStatusChangeRecordRepository locationStatusChangeRecordRepository, |
| | | IBoxingInfoRepository boxingInfoRepository) : base(BaseDal) |
| | | { |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | | _outOrderRepository = outOrderRepository; |
| | |
| | | _pointStackerRelationRepository = pointStackerRelationRepository; |
| | | _taskExecuteDetailRepository = taskExecuteDetailRepository; |
| | | _locationStatusChangeRecordRepository = locationStatusChangeRecordRepository; |
| | | _boxingInfoRepository = boxingInfoRepository; |
| | | } |
| | | |
| | | #region å¤é¨æ¥å£æ¹æ³ |
| | | |
| | | #region å åæºåºåºä»»å¡å®æ |
| | | |
| | | /// <summary> |
| | | /// å åæºåºåºä»»å¡å®æ |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ»åºåºä»»å¡å®æ |
| | | /// </summary> |
| | | /// <param name="saveModel">任塿°æ®åé</param> |
| | | /// <returns>è¿åç»æé</returns> |
| | | public async Task<WebResponseContent> CompleteTaskAsync(Dt_Task task, DtStockInfo stock) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | #endregion å åæºåºåºä»»å¡å®æ |
| | | |
| | | try |
| | | { |
| | | // æ´æ°åºåºè®¢åååºåè´§ä½ä¿¡æ¯ |
| | | var orderStock = await UpdateOrderAndStockAsync(stock, task.PalletCode); |
| | | LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "æ»ä»»å¡åºåºå®æ", $"æ´æ°åºåºè®¢åååºåè´§ä½ä¿¡æ¯:{JsonConvert.SerializeObject(orderStock)}"); |
| | | |
| | | // æ£æ¥è®¢åæ¯å¦å®æå¹¶å¤çåç»æä½ |
| | | if (IsOrderComplete(orderStock)) |
| | | { |
| | | LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "æ»ä»»å¡åºåºå®æ", $"订ååºåºå®æ"); |
| | | // å¤çå·²å®æè®¢å |
| | | await ProcessCompletedOrderAsync(orderStock, task); |
| | | } |
| | | else |
| | | { |
| | | LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "æ»ä»»å¡åºåºå®æ", $"è®¢åææªåºåºå®æ"); |
| | | // å¤çæªå®æè®¢å |
| | | await ProcessUpdateOrderAsync(orderStock, task); |
| | | } |
| | | |
| | | content.OK("ä»»å¡å®æ"); |
| | | } |
| | | catch (Exception err) |
| | | { |
| | | // è®°å½å¼å¸¸ä¿¡æ¯ |
| | | Console.WriteLine(err.Message.ToString()); |
| | | content.Error("ä»»å¡å®æå¤±è´¥"); |
| | | } |
| | | |
| | | return content; |
| | | } |
| | | #region ç§»åºä»»å¡å®æ |
| | | |
| | | /// <summary> |
| | | /// ç§»åºä»»å¡å®æ |
| | |
| | | return content; |
| | | } |
| | | |
| | | #endregion ç§»åºä»»å¡å®æ |
| | | |
| | | #region å
¥åºä»»å¡å®æ |
| | | |
| | | /// <summary> |
| | | /// å
¥åºä»»å¡å®æ |
| | | /// </summary> |
| | |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | var boxing = await _boxingInfoRepository.QueryFirstNavAsync(x => x.PalletCode == task.PalletCode); |
| | | |
| | | var boxDetail = boxing.BoxingInfoDetails.Adapt<List<DtStockInfoDetail>>(); |
| | | // å建åºåå®ä¾æ¨¡å |
| | | DtStockInfo stock = new DtStockInfo() |
| | | { |
| | | |
| | | PalletCode = task.PalletCode, |
| | | LocationCode = task.TargetAddress, |
| | | CreateDate = DateTime.Now, |
| | | Creater = "system", |
| | | IsFull = boxing.IsFull, |
| | | StockInfoDetails = boxDetail, |
| | | LocationInfo = new DtLocationInfo() |
| | | }; |
| | | |
| | | // å建åå²ä»»å¡å®ä¾æ¨¡å |
| | |
| | | } |
| | | return content; |
| | | } |
| | | |
| | | #endregion å
¥åºä»»å¡å®æ |
| | | |
| | | #region ä»»å¡å®æ |
| | | |
| | | /// <summary> |
| | | /// ä»»å¡å®æ |
| | |
| | | } |
| | | else |
| | | { |
| | | LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "æ»ä»»å¡åºåºå®æ", ""); |
| | | return await CompleteTaskAsync(task, stock); |
| | | LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "åºåä¸åå¨ä¹ä¸æ¯å
¥åºä»»å¡", ""); |
| | | return content.Error("åºåä¸åå¨"); |
| | | } |
| | | } |
| | | else if (task.TaskType == (int)TaskTypeEnum.RelocationIn) |
| | |
| | | return content.Error("ä»»å¡ç¶æå¼å¸¸"); |
| | | } |
| | | } |
| | | |
| | | #endregion ä»»å¡å®æ |
| | | |
| | | #region 请æ±ä»»å¡ |
| | | |
| | | /// <summary> |
| | | /// 请æ±ä»»å¡ |
| | |
| | | |
| | | return content; |
| | | } |
| | | |
| | | #endregion 请æ±ä»»å¡ |
| | | |
| | | #endregion å¤é¨æ¥å£æ¹æ³ |
| | | |
| | |
| | | /// <returns>æ´æ°åç订åååºåä¿¡æ¯</returns> |
| | | private async Task<Dt_OutOrderAndStock> UpdateOrderAndStockAsync(DtStockInfo stock, string barCode) |
| | | { |
| | | //æ ¹æ®PalletCodeè·å订åååºåä¿¡æ¯ |
| | | var orderStock = await _outOrderAndStockRepository.GetOrderAndStock(palletCode: barCode); |
| | | |
| | | //宿æ°éå¢å |
| | | orderStock.CompletedQuantity += stock.StockInfoDetails.Sum(x => x.StockQuantity); |
| | | |
| | | //订å详æ
宿æ°éå¢å |
| | | orderStock.OrderList.OrderDetailList.CompletedQuantity += stock.StockInfoDetails.Sum(x => x.StockQuantity); |
| | | |
| | | //è¿åæ´æ°åç订åååºåä¿¡æ¯ |
| | | return orderStock; |
| | | } |
| | | |
| | |
| | | /// </summary> |
| | | /// <param name="orderStock">订åååºåä¿¡æ¯</param> |
| | | /// <returns>æ¯å¦å®æ</returns> |
| | | // å¤æè®¢åæ¯å¦å®æ |
| | | private bool IsOrderComplete(Dt_OutOrderAndStock orderStock) |
| | | { |
| | | // 妿åºåºæ°éçäºå®æåºåºæ°éï¼å订å宿 |
| | | return orderStock.CompletedQuantity == orderStock.OutboundQuantity; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å¤ç已宿ç订å |
| | | /// </summary> |
| | | /// <param name="orderStock">订åååºåä¿¡æ¯</param> |
| | | /// <param name="task">任塿°æ®</param> |
| | | /// <returns>弿¥ä»»å¡</returns> |
| | | private async Task ProcessCompletedOrderAsync(Dt_OutOrderAndStock orderStock, Dt_Task task) |
| | | { |
| | | // å建åå²è®¢åè®°å½ |
| | | var stockHty = CreateHistoricalOrder(orderStock); |
| | | LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "æ»ä»»å¡åºåºå®æ,订å已宿", $"å建åå²è®¢åè®°å½ï¼{JsonConvert.SerializeObject(stockHty)}"); |
| | | |
| | | // å建è·ååå²ä»»å¡ |
| | | var taskHty = CreateHistoricalTask(task); |
| | | LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "æ»ä»»å¡åºåºå®æ,订å已宿", $"å建åå²ä»»å¡è®°å½ï¼{JsonConvert.SerializeObject(taskHty)}"); |
| | | |
| | | _unitOfWorkManage.BeginTran(); |
| | | |
| | | try |
| | | { |
| | | // æ·»å åå²ä»»å¡ |
| | | var isTaskHtyAdd = await _task_HtyRepository.AddDataAsync(taskHty) > 0; |
| | | |
| | | // å é¤ä»»å¡æ°æ® |
| | | var isTaskDelete = await Delete(task.TaskId); |
| | | |
| | | // æå
¥åå²è®¢å |
| | | var isStockInsert = _outOrderAndStock_HtyRepository.InsertNav(stockHty); |
| | | |
| | | // å é¤å订å |
| | | var isOrderStockDelete = _outOrderAndStockRepository.DeleteNavOrderStock(orderStock); |
| | | |
| | | if (isStockInsert && isOrderStockDelete && isTaskHtyAdd && isTaskDelete) |
| | | { |
| | | LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "æ»ä»»å¡åºåºå®æ,订å已宿", $"äºå¡å¤ç宿,æäº¤äºå¡ãæ·»å åå²ä»»å¡ï¼{isTaskHtyAdd},å é¤ä»»å¡æ°æ®ï¼{isTaskDelete},æå
¥åå²è®¢åï¼{isStockInsert},å é¤å订å:{isOrderStockDelete}"); |
| | | _unitOfWorkManage.CommitTran(); |
| | | } |
| | | else |
| | | { |
| | | LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "æ»ä»»å¡åºåºå®æ,订å已宿", $"æ·»å æ°æ®åºå¤±è´¥,è¯·æ£æ¥æ°æ®æ¯å¦æ£ç¡®,æ°æ®åæ»ãæ·»å åå²ä»»å¡ï¼{isTaskHtyAdd},å é¤ä»»å¡æ°æ®ï¼{isTaskDelete},æå
¥åå²è®¢åï¼{isStockInsert},å é¤å订å:{isOrderStockDelete}"); |
| | | _unitOfWorkManage.RollbackTran(); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, $"æ»ä»»å¡åºåºå®æ,订å已宿,ç³»ç»å¼å¸¸ï¼å¼å¸¸ä¿¡æ¯ï¼{ex.Message}", "æ åæ°"); |
| | | _unitOfWorkManage.RollbackTran(); |
| | | throw; // éæ°æåºå¼å¸¸ä»¥ä¾å¤é¨æè· |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å¤çæªå®æè®¢å |
| | | /// </summary> |
| | | /// <param name="orderStock">订åååºåä¿¡æ¯</param> |
| | | /// <param name="task">任塿°æ®</param> |
| | | /// <returns>弿¥ä»»å¡</returns> |
| | | private async Task ProcessUpdateOrderAsync(Dt_OutOrderAndStock orderStock, Dt_Task task) |
| | | { |
| | | // å建è·ååå²ä»»å¡ |
| | | var taskHty = CreateHistoricalTask(task); |
| | | |
| | | _unitOfWorkManage.BeginTran(); |
| | | try |
| | | { |
| | | // æ·»å åå²ä»»å¡ |
| | | var isTaskHtyAdd = await _task_HtyRepository.AddDataAsync(taskHty) > 0; |
| | | |
| | | // å é¤ä»»å¡æ°æ® |
| | | var isTaskDelete = await Delete(task.TaskId); |
| | | |
| | | // æ´æ°è®¢åä¸åºå |
| | | var isOrderUpdated = _outOrderAndStockRepository.UpdateNavOrderStock(orderStock); |
| | | if (isTaskDelete && isTaskHtyAdd && isOrderUpdated) |
| | | { |
| | | LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "æ»ä»»å¡åºåºå®æ,è®¢åææªå®æ", $"äºå¡å¤ç宿,æäº¤äºå¡ãæ·»å åå²ä»»å¡ï¼{isTaskHtyAdd},å é¤ä»»å¡æ°æ®ï¼{isTaskDelete},æ´æ°è®¢åä¸åºåï¼{isOrderUpdated}"); |
| | | _unitOfWorkManage.CommitTran(); |
| | | } |
| | | else |
| | | { |
| | | LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "æ»ä»»å¡åºåºå®æ,è®¢åææªå®æ", $"æ·»å æ°æ®åºå¤±è´¥,è¯·æ£æ¥æ°æ®æ¯å¦æ£ç¡®,æ°æ®åæ»ãæ·»å åå²ä»»å¡ï¼{isTaskHtyAdd},å é¤ä»»å¡æ°æ®ï¼{isTaskDelete},æ´æ°è®¢åä¸åºåï¼{isOrderUpdated}"); |
| | | _unitOfWorkManage.RollbackTran(); |
| | | } |
| | | } |
| | | catch (Exception err) |
| | | { |
| | | LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, $"æ»ä»»å¡åºåºå®æ,è®¢åææªå®æ,ç³»ç»å¼å¸¸ï¼å¼å¸¸ä¿¡æ¯ï¼{err.Message}", "æ åæ°"); |
| | | Console.WriteLine(err.Message.ToString()); |
| | | _unitOfWorkManage.RollbackTran(); |
| | | throw; // éæ°æåºå¼å¸¸ä»¥ä¾å¤é¨æè· |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å建åå²è®¢åè®°å½ |
| | | /// </summary> |
| | | /// <param name="orderStock">订åååºåä¿¡æ¯</param> |
| | | /// <returns>åå²è®¢åè®°å½</returns> |
| | | private Dt_OutOrderAndStock_Hty CreateHistoricalOrder(Dt_OutOrderAndStock orderStock) |
| | | { |
| | | var stockHty = _mapper.Map<Dt_OutOrderAndStock_Hty>(orderStock); |
| | | |
| | | //stockHty.StockList.FinishTime = DateTime.Now; |
| | | //stockHty.StockList.OperateType = (int)OperateTypeEnum.èªå¨å®æ; |
| | | //stockHty.StockList.SourceId = orderStock.StockList.GroupId; |
| | | //stockHty.StockList.GroupId = 0; |
| | | |
| | | //stockHty.StockList.StockDetailList.ForEach(x => |
| | | //{ |
| | | // x.FinishTime = DateTime.Now; |
| | | // x.OperateType = (int)OperateTypeEnum.èªå¨å®æ; |
| | | // x.GroupId = 0; |
| | | //}); |
| | | |
| | | stockHty.OrderList.FinishTime = DateTime.Now; |
| | | stockHty.OrderList.OperateType = (int)OperateTypeEnum.èªå¨å®æ; |
| | | stockHty.OrderList.SourceId = orderStock.OrderList.Id; |
| | | stockHty.OrderList.Id = 0; |
| | | |
| | | stockHty.OrderList.orderDetailList.FinishTime = DateTime.Now; |
| | | stockHty.OrderList.orderDetailList.OperateType = (int)OperateTypeEnum.èªå¨å®æ; |
| | | stockHty.OrderList.orderDetailList.Id = 0; |
| | | |
| | | return stockHty; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | /// <param name="stock">åºå对象</param> |
| | | /// <param name="toLocation">ç®æ ä½ç½®</param> |
| | | // æ´æ°åºååä½ç½®ä¿¡æ¯ |
| | | private (DtStockInfo, DtLocationInfo) UpdateStockLocation(DtStockInfo stock, string toLocation) |
| | | { |
| | | // è·ååºåä¿¡æ¯ |
| | | var locationInfo = _locationRepository.QueryFirst(x => x.LocationCode == stock.LocationCode); |
| | | // å°åºåç¶æè®¾ç½®ä¸ºå¨åº |
| | | locationInfo.LocationStatus = LocationEnum.InStock.ObjToInt(); |
| | | |
| | | // å°åºåä½ç½®è®¾ç½®ä¸ºç®æ ä½ç½® |
| | | stock.LocationCode = toLocation; |
| | | // å°åºåç¶æè®¾ç½®ä¸ºå¨åº |
| | | stock.LocationInfo.LocationStatus = LocationEnum.InStock.ObjToInt(); |
| | | |
| | | // è¿åæ´æ°åçåºååä½ç½®ä¿¡æ¯ |
| | | return (stock, locationInfo); |
| | | } |
| | | |
| | |
| | | else |
| | | { |
| | | // æ·»å åºå |
| | | isUpdateStock = await _stockInfoRepository.AddDataAsync(stock) > 0; |
| | | isUpdateStock = await _stockInfoRepository.AddDataNavAsync(stock); |
| | | } |
| | | |
| | | // æ·»å åå²ä»»å¡ |
| | |
| | | // æäº¤æåæ»äºå¡ |
| | | if (isUpdateStock && isTaskHtyAdd && isTaskDelete && isUpdateLoc) |
| | | { |
| | | LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "ç§»åºä»»å¡å®æ", $"äºå¡å¤ç宿,æäº¤äºå¡ãæ·»å åå²ä»»å¡ï¼{isTaskHtyAdd},å é¤ä»»å¡æ°æ®ï¼{isTaskDelete},æ´æ°ææ·»å åºåï¼{isUpdateStock},ä¿®æ¹ç§»åºåè´§ä½ç¶æï¼{isUpdateLoc}"); |
| | | LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "ä»»å¡å®æ", $"äºå¡å¤ç宿,æäº¤äºå¡ãæ·»å åå²ä»»å¡ï¼{isTaskHtyAdd},å é¤ä»»å¡æ°æ®ï¼{isTaskDelete},æ´æ°ææ·»å åºåï¼{isUpdateStock},ä¿®æ¹ç§»åºåè´§ä½ç¶æï¼{isUpdateLoc}"); |
| | | _unitOfWorkManage.CommitTran(); |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "ç§»åºä»»å¡å®æ", $"æ°æ®å¤ç失败,è¯·æ£æ¥æ°æ®æ¯å¦æ£ç¡®,æ°æ®åæ»ãæ·»å åå²ä»»å¡ï¼{isTaskHtyAdd},å é¤ä»»å¡æ°æ®ï¼{isTaskDelete},æ´æ°åºåï¼{isUpdateStock},ä¿®æ¹ç§»åºåè´§ä½ç¶æï¼{isUpdateLoc}"); |
| | | LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "ä»»å¡å®æ", $"æ°æ®å¤ç失败,è¯·æ£æ¥æ°æ®æ¯å¦æ£ç¡®,æ°æ®åæ»ãæ·»å åå²ä»»å¡ï¼{isTaskHtyAdd},å é¤ä»»å¡æ°æ®ï¼{isTaskDelete},æ´æ°åºåï¼{isUpdateStock},ä¿®æ¹ç§»åºåè´§ä½ç¶æï¼{isUpdateLoc}"); |
| | | _unitOfWorkManage.RollbackTran(); |
| | | return false; |
| | | } |
| | |
| | | /// <returns></returns> |
| | | private async Task<WebResponseContent> UpdateExistingTask(RequestTaskDto input, int areaId, Dt_Task task) |
| | | { |
| | | // å建WebResponseContent对象 |
| | | WebResponseContent content = new WebResponseContent(); |
| | | // å®ä¹åé |
| | | string toAddress; |
| | | int taskState; |
| | | string original = task.CurrentAddress; |
| | | DtLocationInfo location = new DtLocationInfo(); |
| | | int beforeStatus = 0; |
| | | |
| | | // æ ¹æ®ä»»å¡ç±»å夿æ¯åºåºä»»å¡è¿æ¯å
¥åºä»»å¡ |
| | | if (input.Type == (int)TaskTypeEnum.Outbound) |
| | | { |
| | | // å¤çåºåºä»»å¡ |
| | |
| | | task.NextAddress = toAddress; |
| | | task.TaskState = taskState; |
| | | |
| | | // å¼å§äºå¡ |
| | | _unitOfWorkManage.BeginTran(); |
| | | // å®ä¹åé |
| | | bool isUpdateLo = true; |
| | | bool isUpdateChange = true; |
| | | |
| | |
| | | bool isTaskDetail = await _taskExecuteDetailRepository.AddDetailAsync(task, false, TaskDescription.GetTaskUpdateDescription(task.PalletCode, original, input.Position, InTaskStatusEnum.Line_InFinish.GetIntegralRuleTypeEnumDesc())); |
| | | if (input.Type != (int)TaskTypeEnum.Outbound) |
| | | { |
| | | // å建LocationChangeRecordDto对象 |
| | | LocationChangeRecordDto changeRecordDto = new LocationChangeRecordDto() |
| | | { |
| | | // 设置åé |
| | | AfterStatus = location.LocationStatus, |
| | | BeforeStatus = beforeStatus, |
| | | TaskNum = task.TaskNum.Value, |
| | |
| | | LocationCode = location.LocationCode, |
| | | ChangeType = (int)StatusChangeTypeEnum.AutomaticStorage, |
| | | }; |
| | | // æ´æ°ä½ç½®ç¶æ |
| | | isUpdateChange = _locationStatusChangeRecordRepository.AddStatusChangeRecord(changeRecordDto); |
| | | isUpdateLo = await _locationRepository.UpdateDataAsync(location); |
| | | } |
| | | |
| | | if (isResult && isUpdateLo && isTaskDetail) |
| | | { |
| | | // æäº¤äºå¡ |
| | | _unitOfWorkManage.CommitTran(); |
| | | content.OK(data: task); |
| | | } |
| | | else |
| | | { |
| | | // åæ»äºå¡ |
| | | _unitOfWorkManage.RollbackTran(); |
| | | content.Error("æ´æ°ä»»å¡å¤±è´¥"); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace WIDESEA_WMSServer.Controllers; |
| | | |
| | | [Route("api/[controller]")] |
| | | [ApiController] |
| | | public class BoxingInfoController : ApiBaseController<IBoxingInfoService, DtBoxingInfo> |
| | | { |
| | | public BoxingInfoController(IBoxingInfoService service) : base(service) |
| | | { |
| | | } |
| | | |
| | | // POST api/<BoxingInfoController> |
| | | [HttpPost, Route("AddBoxingInfo"), AllowAnonymous] |
| | | public Task<WebResponseContent> AddBoxingInfoAsync([FromBody] DtBoxingInfo boxingInfo) |
| | | { |
| | | return Service.AddBoxingInfoAsync(boxingInfo); |
| | | } |
| | | } |
| | |
| | | CreateMap<RegistrationDTO, Sys_CompanyRegistration>(); |
| | | CreateMap<Dt_OutOrderAndStock, Dt_OutOrderAndStock_Hty>(); |
| | | CreateMap<Dt_Task, Dt_Task_Hty>(); |
| | | |
| | | } |
| | | } |
| | | } |