已修改54个文件
已添加25个文件
已重命名13个文件
已删除8个文件
| | |
| | | this.edit(); |
| | | } |
| | | }, |
| | | |
| | | { |
| | | name: "ä»»å¡å®æ", |
| | | name: "å é¤", |
| | | icon: 'el-icon-delete', |
| | | class: '', |
| | | value: 'Delete', |
| | | type: 'danger', |
| | | onClick: function () { |
| | | this.del(); |
| | | } |
| | | }, |
| | | { |
| | | name: "审 æ ¸", |
| | | icon: 'el-icon-check', |
| | | class: '', |
| | | value: 'Audit', |
| | | plain: true, |
| | | type: 'primary', |
| | | onClick: function () { |
| | | this.audit(); |
| | | } |
| | | }, |
| | | { |
| | | name: "导 å
¥", |
| | | icon: 'el-icon-top', |
| | | class: '', |
| | | type: 'success', |
| | | plain: true, |
| | | value: 'Import', |
| | | onClick: function () { |
| | | this.import(); |
| | | } |
| | | }, |
| | | { |
| | | name: "导 åº", |
| | | icon: 'el-icon-bottom', |
| | | type: 'success', |
| | | plain: true, |
| | | value: 'Export', |
| | | onClick: function () { |
| | | this.export(); |
| | | } |
| | | },{ |
| | | name: "å¯ ç¨", |
| | | icon: '', |
| | | class: '', |
| | | value: 'TaskCompleted', |
| | | value: 'Enable', |
| | | type: 'primary', |
| | | onClick: function () { |
| | | } |
| | | }, |
| | | { |
| | | name: "ä»»å¡åæ¶", |
| | | name: "ç¦ ç¨", |
| | | icon: '', |
| | | class: '', |
| | | value: 'TaskCancel', |
| | | value: 'Disable', |
| | | type: 'danger', |
| | | onClick: function () { |
| | | } |
| | |
| | | onClick: function () { |
| | | } |
| | | }, |
| | | { |
| | | name: "å é¤", |
| | | icon: 'el-icon-delete', |
| | | class: '', |
| | | value: 'Delete', |
| | | type: 'danger', |
| | | onClick: function () { |
| | | this.del(); |
| | | } |
| | | }, |
| | | { |
| | | name: "审 æ ¸", |
| | | icon: 'el-icon-check', |
| | | class: '', |
| | | value: 'Audit', |
| | | plain: true, |
| | | type: 'primary', |
| | | onClick: function () { |
| | | this.audit(); |
| | | } |
| | | }, |
| | | { |
| | | name: "导 å
¥", |
| | | icon: 'el-icon-top', |
| | | class: '', |
| | | type: 'success', |
| | | plain: true, |
| | | value: 'Import', |
| | | onClick: function () { |
| | | this.import(); |
| | | } |
| | | }, |
| | | { |
| | | name: "导 åº", |
| | | icon: 'el-icon-bottom', |
| | | type: 'success', |
| | | plain: true, |
| | | value: 'Export', |
| | | onClick: function () { |
| | | this.export(); |
| | | } |
| | | } |
| | | |
| | | ] |
| | | |
| | |
| | | //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: '', |
| | | gridBody: '', |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '' |
| | | }, |
| | | tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | buttons: { view: [], box: [], detail: [] }, //æ©å±çæé® |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | }, |
| | | onInited() { |
| | | //æ¡æ¶åå§åé
ç½®å |
| | | //妿è¦é
ç½®æç»è¡¨,卿¤æ¹æ³æä½ |
| | | //this.detailOptions.columns.forEach(column=>{ }); |
| | | }, |
| | | searchBefore(param) { |
| | | //ç颿¥è¯¢å,å¯ä»¥ç»param.wheresæ·»å æ¥è¯¢åæ° |
| | | //è¿åfalseï¼åä¸ä¼æ§è¡æ¥è¯¢ |
| | | return true; |
| | | }, |
| | | searchAfter(result) { |
| | | //æ¥è¯¢åï¼resultè¿åçæ¥è¯¢æ°æ®,å¯ä»¥å¨æ¾ç¤ºå°è¡¨æ ¼åå¤çè¡¨æ ¼çå¼ |
| | | return true; |
| | | }, |
| | | addBefore(formData) { |
| | | //æ°å»ºä¿ååformData为对象ï¼å
æ¬æç»è¡¨ï¼å¯ä»¥ç»ç»è¡¨å设置å¼ï¼èªå·±è¾åºçformDataçå¼ |
| | | return true; |
| | | }, |
| | | updateBefore(formData) { |
| | | //ç¼è¾ä¿ååformData为对象ï¼å
æ¬æç»è¡¨ãå é¤è¡çId |
| | | return true; |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | | //(1)夿æ¯ç¼è¾è¿æ¯æ°å»ºæä½ï¼ this.currentAction=='Add'; |
| | | //(2)ç»å¼¹åºæ¡è®¾ç½®é»è®¤å¼ |
| | | //(3)this.editFormFields.åæ®µ='xxx'; |
| | | //妿éè¦ç»ä¸ææ¡è®¾ç½®é»è®¤å¼ï¼è¯·éåthis.editFormOptionsæ¾å°å段é
置对åºdata屿§çkeyå¼ |
| | | //ç䏿就æè¾åºçï¼console.log(this.editFormOptions) |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: '', |
| | | gridBody: '', |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '' |
| | | }, |
| | | tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | buttons: { view: [], box: [], detail: [] }, //æ©å±çæé® |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | let enableBtn = this.buttons.find(x => x.value == 'Enable'); |
| | | if (enableBtn) { |
| | | enableBtn.onClick = function () { |
| | | this.$message.success('èªå®ä¹æé®ç¹å»äºä»¶'); |
| | | } |
| | | } |
| | | let disableBtn = this.buttons.find(x => x.value == 'Disable'); |
| | | if (disableBtn) { |
| | | disableBtn.onClick = function () { |
| | | this.$message.success('èªå®ä¹æé®ç¹å»äºä»¶'); |
| | | } |
| | | } |
| | | }, |
| | | onInited() { |
| | | //æ¡æ¶åå§åé
ç½®å |
| | | //妿è¦é
ç½®æç»è¡¨,卿¤æ¹æ³æä½ |
| | | //this.detailOptions.columns.forEach(column=>{ }); |
| | | }, |
| | | searchBefore(param) { |
| | | //ç颿¥è¯¢å,å¯ä»¥ç»param.wheresæ·»å æ¥è¯¢åæ° |
| | | //è¿åfalseï¼åä¸ä¼æ§è¡æ¥è¯¢ |
| | | return true; |
| | | }, |
| | | searchAfter(result) { |
| | | //æ¥è¯¢åï¼resultè¿åçæ¥è¯¢æ°æ®,å¯ä»¥å¨æ¾ç¤ºå°è¡¨æ ¼åå¤çè¡¨æ ¼çå¼ |
| | | return true; |
| | | }, |
| | | addBefore(formData) { |
| | | //æ°å»ºä¿ååformData为对象ï¼å
æ¬æç»è¡¨ï¼å¯ä»¥ç»ç»è¡¨å设置å¼ï¼èªå·±è¾åºçformDataçå¼ |
| | | return true; |
| | | }, |
| | | updateBefore(formData) { |
| | | //ç¼è¾ä¿ååformData为对象ï¼å
æ¬æç»è¡¨ãå é¤è¡çId |
| | | return true; |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | | //(1)夿æ¯ç¼è¾è¿æ¯æ°å»ºæä½ï¼ this.currentAction=='Add'; |
| | | //(2)ç»å¼¹åºæ¡è®¾ç½®é»è®¤å¼ |
| | | //(3)this.editFormFields.åæ®µ='xxx'; |
| | | //妿éè¦ç»ä¸ææ¡è®¾ç½®é»è®¤å¼ï¼è¯·éåthis.editFormOptionsæ¾å°å段é
置对åºdata屿§çkeyå¼ |
| | | //ç䏿就æè¾åºçï¼console.log(this.editFormOptions) |
| | | } |
| | | }; |
| | | export default extension; |
| | | |
| | | } |
| | | }; |
| | | export default extension; |
| | |
| | | //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: '', |
| | | gridBody: '', |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '' |
| | | }, |
| | | tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | buttons: { view: [], box: [], detail: [] }, //æ©å±çæé® |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | }, |
| | | onInited() { |
| | | //æ¡æ¶åå§åé
ç½®å |
| | | //妿è¦é
ç½®æç»è¡¨,卿¤æ¹æ³æä½ |
| | | //this.detailOptions.columns.forEach(column=>{ }); |
| | | }, |
| | | searchBefore(param) { |
| | | //ç颿¥è¯¢å,å¯ä»¥ç»param.wheresæ·»å æ¥è¯¢åæ° |
| | | //è¿åfalseï¼åä¸ä¼æ§è¡æ¥è¯¢ |
| | | return true; |
| | | }, |
| | | searchAfter(result) { |
| | | //æ¥è¯¢åï¼resultè¿åçæ¥è¯¢æ°æ®,å¯ä»¥å¨æ¾ç¤ºå°è¡¨æ ¼åå¤çè¡¨æ ¼çå¼ |
| | | return true; |
| | | }, |
| | | addBefore(formData) { |
| | | //æ°å»ºä¿ååformData为对象ï¼å
æ¬æç»è¡¨ï¼å¯ä»¥ç»ç»è¡¨å设置å¼ï¼èªå·±è¾åºçformDataçå¼ |
| | | return true; |
| | | }, |
| | | updateBefore(formData) { |
| | | //ç¼è¾ä¿ååformData为对象ï¼å
æ¬æç»è¡¨ãå é¤è¡çId |
| | | return true; |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | | //(1)夿æ¯ç¼è¾è¿æ¯æ°å»ºæä½ï¼ this.currentAction=='Add'; |
| | | //(2)ç»å¼¹åºæ¡è®¾ç½®é»è®¤å¼ |
| | | //(3)this.editFormFields.åæ®µ='xxx'; |
| | | //妿éè¦ç»ä¸ææ¡è®¾ç½®é»è®¤å¼ï¼è¯·éåthis.editFormOptionsæ¾å°å段é
置对åºdata屿§çkeyå¼ |
| | | //ç䏿就æè¾åºçï¼console.log(this.editFormOptions) |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: '', |
| | | gridBody: '', |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '' |
| | | }, |
| | | tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | buttons: { view: [], box: [], detail: [] }, //æ©å±çæé® |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | let enableBtn = this.buttons.find(x => x.value == 'Enable'); |
| | | if (enableBtn) { |
| | | enableBtn.onClick = function () { |
| | | this.$message.success('èªå®ä¹æé®ç¹å»äºä»¶'); |
| | | } |
| | | } |
| | | let disableBtn = this.buttons.find(x => x.value == 'Disable'); |
| | | if (disableBtn) { |
| | | disableBtn.onClick = function () { |
| | | this.$message.success('èªå®ä¹æé®ç¹å»äºä»¶'); |
| | | } |
| | | } |
| | | |
| | | this.columns.push({ |
| | | field: 'æä½', |
| | | title: 'æä½', |
| | | width: 90, |
| | | fixed: 'right', |
| | | align: 'center', |
| | | formatter: (row) => { |
| | | return ( |
| | | '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">æ¥çæç»</i>' |
| | | ); |
| | | }, |
| | | click: (row) => { |
| | | this.$refs.gridBody.open(row); |
| | | } |
| | | }); |
| | | }, |
| | | onInited() { |
| | | //æ¡æ¶åå§åé
ç½®å |
| | | //妿è¦é
ç½®æç»è¡¨,卿¤æ¹æ³æä½ |
| | | //this.detailOptions.columns.forEach(column=>{ }); |
| | | }, |
| | | searchBefore(param) { |
| | | //ç颿¥è¯¢å,å¯ä»¥ç»param.wheresæ·»å æ¥è¯¢åæ° |
| | | //è¿åfalseï¼åä¸ä¼æ§è¡æ¥è¯¢ |
| | | return true; |
| | | }, |
| | | searchAfter(result) { |
| | | //æ¥è¯¢åï¼resultè¿åçæ¥è¯¢æ°æ®,å¯ä»¥å¨æ¾ç¤ºå°è¡¨æ ¼åå¤çè¡¨æ ¼çå¼ |
| | | return true; |
| | | }, |
| | | addBefore(formData) { |
| | | //æ°å»ºä¿ååformData为对象ï¼å
æ¬æç»è¡¨ï¼å¯ä»¥ç»ç»è¡¨å设置å¼ï¼èªå·±è¾åºçformDataçå¼ |
| | | return true; |
| | | }, |
| | | updateBefore(formData) { |
| | | //ç¼è¾ä¿ååformData为对象ï¼å
æ¬æç»è¡¨ãå é¤è¡çId |
| | | return true; |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | | //(1)夿æ¯ç¼è¾è¿æ¯æ°å»ºæä½ï¼ this.currentAction=='Add'; |
| | | //(2)ç»å¼¹åºæ¡è®¾ç½®é»è®¤å¼ |
| | | //(3)this.editFormFields.åæ®µ='xxx'; |
| | | //妿éè¦ç»ä¸ææ¡è®¾ç½®é»è®¤å¼ï¼è¯·éåthis.editFormOptionsæ¾å°å段é
置对åºdata屿§çkeyå¼ |
| | | //ç䏿就æè¾åºçï¼console.log(this.editFormOptions) |
| | | } |
| | | }; |
| | | export default extension; |
| | | |
| | | } |
| | | }; |
| | | export default extension; |
| | |
| | | //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: '', |
| | | gridBody: '', |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '' |
| | | }, |
| | | tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | buttons: { view: [], box: [], detail: [] }, //æ©å±çæé® |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | }, |
| | | onInited() { |
| | | //æ¡æ¶åå§åé
ç½®å |
| | | //妿è¦é
ç½®æç»è¡¨,卿¤æ¹æ³æä½ |
| | | //this.detailOptions.columns.forEach(column=>{ }); |
| | | }, |
| | | searchBefore(param) { |
| | | //ç颿¥è¯¢å,å¯ä»¥ç»param.wheresæ·»å æ¥è¯¢åæ° |
| | | //è¿åfalseï¼åä¸ä¼æ§è¡æ¥è¯¢ |
| | | return true; |
| | | }, |
| | | searchAfter(result) { |
| | | //æ¥è¯¢åï¼resultè¿åçæ¥è¯¢æ°æ®,å¯ä»¥å¨æ¾ç¤ºå°è¡¨æ ¼åå¤çè¡¨æ ¼çå¼ |
| | | return true; |
| | | }, |
| | | addBefore(formData) { |
| | | //æ°å»ºä¿ååformData为对象ï¼å
æ¬æç»è¡¨ï¼å¯ä»¥ç»ç»è¡¨å设置å¼ï¼èªå·±è¾åºçformDataçå¼ |
| | | return true; |
| | | }, |
| | | updateBefore(formData) { |
| | | //ç¼è¾ä¿ååformData为对象ï¼å
æ¬æç»è¡¨ãå é¤è¡çId |
| | | return true; |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | | //(1)夿æ¯ç¼è¾è¿æ¯æ°å»ºæä½ï¼ this.currentAction=='Add'; |
| | | //(2)ç»å¼¹åºæ¡è®¾ç½®é»è®¤å¼ |
| | | //(3)this.editFormFields.åæ®µ='xxx'; |
| | | //妿éè¦ç»ä¸ææ¡è®¾ç½®é»è®¤å¼ï¼è¯·éåthis.editFormOptionsæ¾å°å段é
置对åºdata屿§çkeyå¼ |
| | | //ç䏿就æè¾åºçï¼console.log(this.editFormOptions) |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: '', |
| | | gridBody: '', |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '' |
| | | }, |
| | | tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | buttons: { view: [], box: [], detail: [] }, //æ©å±çæé® |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | let enableBtn = this.buttons.find(x => x.value == 'Enable'); |
| | | if (enableBtn) { |
| | | enableBtn.onClick = function () { |
| | | this.$message.success('èªå®ä¹æé®ç¹å»äºä»¶'); |
| | | } |
| | | } |
| | | let disableBtn = this.buttons.find(x => x.value == 'Disable'); |
| | | if (disableBtn) { |
| | | disableBtn.onClick = function () { |
| | | this.$message.success('èªå®ä¹æé®ç¹å»äºä»¶'); |
| | | } |
| | | } |
| | | }, |
| | | onInited() { |
| | | //æ¡æ¶åå§åé
ç½®å |
| | | //妿è¦é
ç½®æç»è¡¨,卿¤æ¹æ³æä½ |
| | | //this.detailOptions.columns.forEach(column=>{ }); |
| | | }, |
| | | searchBefore(param) { |
| | | //ç颿¥è¯¢å,å¯ä»¥ç»param.wheresæ·»å æ¥è¯¢åæ° |
| | | //è¿åfalseï¼åä¸ä¼æ§è¡æ¥è¯¢ |
| | | return true; |
| | | }, |
| | | searchAfter(result) { |
| | | //æ¥è¯¢åï¼resultè¿åçæ¥è¯¢æ°æ®,å¯ä»¥å¨æ¾ç¤ºå°è¡¨æ ¼åå¤çè¡¨æ ¼çå¼ |
| | | return true; |
| | | }, |
| | | addBefore(formData) { |
| | | //æ°å»ºä¿ååformData为对象ï¼å
æ¬æç»è¡¨ï¼å¯ä»¥ç»ç»è¡¨å设置å¼ï¼èªå·±è¾åºçformDataçå¼ |
| | | return true; |
| | | }, |
| | | updateBefore(formData) { |
| | | //ç¼è¾ä¿ååformData为对象ï¼å
æ¬æç»è¡¨ãå é¤è¡çId |
| | | return true; |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | | //(1)夿æ¯ç¼è¾è¿æ¯æ°å»ºæä½ï¼ this.currentAction=='Add'; |
| | | //(2)ç»å¼¹åºæ¡è®¾ç½®é»è®¤å¼ |
| | | //(3)this.editFormFields.åæ®µ='xxx'; |
| | | //妿éè¦ç»ä¸ææ¡è®¾ç½®é»è®¤å¼ï¼è¯·éåthis.editFormOptionsæ¾å°å段é
置对åºdata屿§çkeyå¼ |
| | | //ç䏿就æè¾åºçï¼console.log(this.editFormOptions) |
| | | } |
| | | }; |
| | | export default extension; |
| | | |
| | | } |
| | | }; |
| | | export default extension; |
| | |
| | | //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: '', |
| | | gridBody: '', |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '' |
| | | }, |
| | | tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | buttons: { view: [], box: [], detail: [] }, //æ©å±çæé® |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | }, |
| | | onInited() { |
| | | //æ¡æ¶åå§åé
ç½®å |
| | | //妿è¦é
ç½®æç»è¡¨,卿¤æ¹æ³æä½ |
| | | //this.detailOptions.columns.forEach(column=>{ }); |
| | | }, |
| | | searchBefore(param) { |
| | | //ç颿¥è¯¢å,å¯ä»¥ç»param.wheresæ·»å æ¥è¯¢åæ° |
| | | //è¿åfalseï¼åä¸ä¼æ§è¡æ¥è¯¢ |
| | | return true; |
| | | }, |
| | | searchAfter(result) { |
| | | //æ¥è¯¢åï¼resultè¿åçæ¥è¯¢æ°æ®,å¯ä»¥å¨æ¾ç¤ºå°è¡¨æ ¼åå¤çè¡¨æ ¼çå¼ |
| | | return true; |
| | | }, |
| | | addBefore(formData) { |
| | | //æ°å»ºä¿ååformData为对象ï¼å
æ¬æç»è¡¨ï¼å¯ä»¥ç»ç»è¡¨å设置å¼ï¼èªå·±è¾åºçformDataçå¼ |
| | | return true; |
| | | }, |
| | | updateBefore(formData) { |
| | | //ç¼è¾ä¿ååformData为对象ï¼å
æ¬æç»è¡¨ãå é¤è¡çId |
| | | return true; |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | | //(1)夿æ¯ç¼è¾è¿æ¯æ°å»ºæä½ï¼ this.currentAction=='Add'; |
| | | //(2)ç»å¼¹åºæ¡è®¾ç½®é»è®¤å¼ |
| | | //(3)this.editFormFields.åæ®µ='xxx'; |
| | | //妿éè¦ç»ä¸ææ¡è®¾ç½®é»è®¤å¼ï¼è¯·éåthis.editFormOptionsæ¾å°å段é
置对åºdata屿§çkeyå¼ |
| | | //ç䏿就æè¾åºçï¼console.log(this.editFormOptions) |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: '', |
| | | gridBody: '', |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '' |
| | | }, |
| | | tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | buttons: { view: [], box: [], detail: [] }, //æ©å±çæé® |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | let enableBtn = this.buttons.find(x => x.value == 'Enable'); |
| | | if (enableBtn) { |
| | | enableBtn.onClick = function () { |
| | | this.$message.success('èªå®ä¹æé®ç¹å»äºä»¶'); |
| | | } |
| | | } |
| | | let disableBtn = this.buttons.find(x => x.value == 'Disable'); |
| | | if (disableBtn) { |
| | | disableBtn.onClick = function () { |
| | | this.$message.success('èªå®ä¹æé®ç¹å»äºä»¶'); |
| | | } |
| | | } |
| | | }, |
| | | onInited() { |
| | | //æ¡æ¶åå§åé
ç½®å |
| | | //妿è¦é
ç½®æç»è¡¨,卿¤æ¹æ³æä½ |
| | | //this.detailOptions.columns.forEach(column=>{ }); |
| | | }, |
| | | searchBefore(param) { |
| | | //ç颿¥è¯¢å,å¯ä»¥ç»param.wheresæ·»å æ¥è¯¢åæ° |
| | | //è¿åfalseï¼åä¸ä¼æ§è¡æ¥è¯¢ |
| | | return true; |
| | | }, |
| | | searchAfter(result) { |
| | | //æ¥è¯¢åï¼resultè¿åçæ¥è¯¢æ°æ®,å¯ä»¥å¨æ¾ç¤ºå°è¡¨æ ¼åå¤çè¡¨æ ¼çå¼ |
| | | return true; |
| | | }, |
| | | addBefore(formData) { |
| | | //æ°å»ºä¿ååformData为对象ï¼å
æ¬æç»è¡¨ï¼å¯ä»¥ç»ç»è¡¨å设置å¼ï¼èªå·±è¾åºçformDataçå¼ |
| | | return true; |
| | | }, |
| | | updateBefore(formData) { |
| | | //ç¼è¾ä¿ååformData为对象ï¼å
æ¬æç»è¡¨ãå é¤è¡çId |
| | | return true; |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | | //(1)夿æ¯ç¼è¾è¿æ¯æ°å»ºæä½ï¼ this.currentAction=='Add'; |
| | | //(2)ç»å¼¹åºæ¡è®¾ç½®é»è®¤å¼ |
| | | //(3)this.editFormFields.åæ®µ='xxx'; |
| | | //妿éè¦ç»ä¸ææ¡è®¾ç½®é»è®¤å¼ï¼è¯·éåthis.editFormOptionsæ¾å°å段é
置对åºdata屿§çkeyå¼ |
| | | //ç䏿就æè¾åºçï¼console.log(this.editFormOptions) |
| | | } |
| | | }; |
| | | export default extension; |
| | | |
| | | } |
| | | }; |
| | | export default extension; |
| | |
| | | :width="item.width" |
| | | align="center" |
| | | > |
| | | <template #default="scoped" v-if="item.type == 'icon'"> |
| | | <el-tooltip |
| | | class="item" |
| | | effect="dark" |
| | | :content="item.title" |
| | | placement="bottom" |
| | | ><el-link |
| | | type="primary" |
| | | :disabled="getButtonEnable(item.prop, scoped.row)" |
| | | @click="tableButtonClick(scoped.row, item)" |
| | | ><i :class="item.icon" style="font-size: 22px"></i></el-link |
| | | ></el-tooltip> |
| | | <template #default="scoped"> |
| | | <div v-if="item.type == 'icon'"> |
| | | <el-tooltip |
| | | class="item" |
| | | effect="dark" |
| | | :content="item.title" |
| | | placement="bottom" |
| | | ><el-link |
| | | type="primary" |
| | | :disabled="getButtonEnable(item.prop, scoped.row)" |
| | | @click="tableButtonClick(scoped.row, item)" |
| | | ><i :class="item.icon" style="font-size: 22px"></i></el-link |
| | | ></el-tooltip> |
| | | </div> |
| | | |
| | | <div v-else-if="item.type == 'tag'"> |
| | | <el-tag size="small"> |
| | | {{ getDictionary(scoped.row, item) }} |
| | | </el-tag> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | { |
| | | prop: "batchNo", |
| | | title: "æ¹æ¬¡å·", |
| | | type: "tag", |
| | | type: "string", |
| | | width: 90, |
| | | }, |
| | | { |
| | |
| | | { |
| | | prop: "orderDetailStatus", |
| | | title: "订åæç»ç¶æ", |
| | | type: "string", |
| | | type: "tag", |
| | | width: 180, |
| | | bindKey:"orderDetailStatusEnum" |
| | | }, |
| | | { |
| | | prop: "assignStock", |
| | |
| | | allocation_type: "", |
| | | allocation_state: "", |
| | | }, |
| | | dictionaryList: null, |
| | | }; |
| | | }, |
| | | methods: { |
| | | open(row) { |
| | | this.row = row; |
| | | this.showDetialBox = true; |
| | | this.getDictionaryData(); |
| | | this.getData(); |
| | | }, |
| | | getData() { |
| | |
| | | handleSelectionChange(val) { |
| | | this.selection = val; |
| | | }, |
| | | getDictionaryData() { |
| | | if (this.dictionaryList) { |
| | | return; |
| | | } |
| | | var param = []; |
| | | this.tableColumns.forEach((x) => { |
| | | if (x.type == "tag" && x.bindKey != "") { |
| | | param.push(x.bindKey); |
| | | } |
| | | }); |
| | | this.http |
| | | .post("api/Sys_Dictionary/GetVueDictionary", param, "æ¥è¯¢ä¸") |
| | | .then((x) => { |
| | | if (x.length > 0) { |
| | | this.dictionaryList = x; |
| | | } |
| | | }); |
| | | }, |
| | | getDictionary(row, column) { |
| | | if (this.dictionaryList) { |
| | | var item = this.dictionaryList.find((x) => x.dicNo == column.bindKey); |
| | | if (item) { |
| | | var dicItem = item.data.find((x) => x.key == row[column.prop]); |
| | | if (dicItem) { |
| | | return dicItem.value; |
| | | } else { |
| | | return row[column.prop]; |
| | | } |
| | | } else { |
| | | return row[column.prop]; |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "åºåç±»å", |
| | | required: true, |
| | | field: "areaType", |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "åºåç¶æ", |
| | | required: true, |
| | | field: "areaStatus", |
| | | type: "string", |
| | | }, |
| | | ], |
| | | [ |
| | | { |
| | | title: "ä»åºä¸»é®", |
| | | required: true, |
| | | field: "warehouseId", |
| | | type: "string", |
| | | type: "select", |
| | | dataKey: "warehouse", |
| | | data: [], |
| | | }, |
| | | { |
| | | title: "åºåæè¿°", |
| | |
| | | const searchFormFields = ref({ |
| | | areaCode: "", |
| | | areaName: "", |
| | | areaType: "", |
| | | areaStatus: "", |
| | | warehouseId: "", |
| | | areaDes: "", |
| | | }); |
| | |
| | | [ |
| | | { title: "åºåç¼å·", field: "areaCode", type: "like" }, |
| | | { title: "åºååç§°", field: "areaName", type: "like" }, |
| | | { title: "åºåç±»å", field: "areaType", type: "like" }, |
| | | { title: "åºåç¶æ", field: "areaStatus", type: "like" }, |
| | | { title: "åºåç±»å", field: "areaType" }, |
| | | { |
| | | title: "åºåç¶æ", |
| | | field: "areaStatus", |
| | | type: "select", |
| | | dataKey: "enableEnum", |
| | | data: [], |
| | | }, |
| | | ], |
| | | [{ title: "ä»åºä¸»é®", field: "warehouseId", type: "like" }], |
| | | [ |
| | | { |
| | | title: "ä»åºä¸»é®", |
| | | field: "warehouseId", |
| | | type: "select", |
| | | dataKey: "warehouse", |
| | | data: [], |
| | | }, |
| | | ], |
| | | ]); |
| | | const columns = ref([ |
| | | { |
| | |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | bind:{ key: "warehouse", data: [] }, |
| | | }, |
| | | { |
| | | field: "areaCode", |
| | |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | bind: { key: "enableEnum", data: [] }, |
| | | }, |
| | | { |
| | | field: "areaDes", |
| | |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "è´§ä½ç¶æ", |
| | | required: true, |
| | | field: "locationStatus", |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "ç¦ç¨ç¶æ", |
| | | required: true, |
| | | field: "enalbeStatus", |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "åºå主é®", |
| | | required: true, |
| | | field: "areaId", |
| | | type: "string", |
| | | }, |
| | | ], |
| | | [ |
| | | { |
| | | title: "å··éç¼å·", |
| | | required: true, |
| | |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | bind: { |
| | | key: "areainfo", |
| | | data: [] |
| | | } |
| | | }, |
| | | { |
| | | field: "locationCode", |
| | |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | bind:{key: "locationTypeEnum", data: []} |
| | | }, |
| | | { |
| | | field: "locationStatus", |
| | |
| | | type: "string", |
| | | width: 200, |
| | | align: "left", |
| | | bind: { key: "locationStatusEnum", data: [] }, |
| | | }, |
| | | { |
| | | field: "enalbeStatus", |
| | | field: "enableStatus", |
| | | title: "ç¦ç¨ç¶æ", |
| | | type: "string", |
| | | width: 180, |
| | | align: "left", |
| | | bind: { key: "enableStatusEnum", data: [] }, |
| | | }, |
| | | { |
| | | field: "creater", |
| | |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "enalbeStatus", |
| | | field: "enableStatus", |
| | | title: "ç¦ç¨ç¶æ", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | bind: { key: "enableStatusEnum", data: [] }, |
| | | }, |
| | | { |
| | | field: "deviceNo", |
| | |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "ä»åºç±»å", |
| | | required: true, |
| | | field: "warehouseType", |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "ä»åºç¶æ", |
| | | required: true, |
| | | field: "warehouseStatus", |
| | | type: "string", |
| | | }, |
| | | ], |
| | | [ |
| | | { |
| | | title: "ä»åºæè¿°", |
| | | field: "warehouseDes", |
| | | type: "textarea", |
| | |
| | | { title: "ä»åºç¼å·", field: "warehouseCode", type: "like" }, |
| | | { title: "ä»åºåç§°", field: "warehouseName", type: "like" }, |
| | | { title: "ä»åºç±»å", field: "warehouseType", type: "like" }, |
| | | { title: "ä»åºç¶æ", field: "warehouseStatus", type: "like" }, |
| | | { |
| | | title: "ä»åºç¶æ", |
| | | field: "warehouseStatus", |
| | | type: "select", |
| | | dataKey: "enableEnum", |
| | | data: [], |
| | | }, |
| | | ], |
| | | ]); |
| | | const columns = ref([ |
| | |
| | | type: "decimal", |
| | | width: 90, |
| | | align: "left", |
| | | bind: { key: "enableEnum", data: [] }, |
| | | }, |
| | | { |
| | | field: "warehouseDes", |
| | |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | link: true, |
| | | }, |
| | | { |
| | | field: "upperOrderNo", |
| | |
| | | { |
| | | field: "materielCode", |
| | | title: "ç©æç¼å·", |
| | | type: "string", |
| | | type: "select", |
| | | width: 150, |
| | | align: "left", |
| | | edit: { type: "string" }, |
| | | edit: { type: "select" }, |
| | | bind: { key: "orderDetailStatusEnum", data: [] }, |
| | | required: true, |
| | | }, |
| | | { |
| | |
| | | type: "string", |
| | | width: 180, |
| | | align: "left", |
| | | bind: { key: "orderDetailStatusEnum", data: [] }, |
| | | }, |
| | | { |
| | | field: "creater", |
| | |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | link: true, |
| | | }, |
| | | { |
| | | field: "upperOrderNo", |
| | |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | bind: { key: "outOrderType", data: [] }, |
| | | }, |
| | | { |
| | | field: "orderStatus", |
| | |
| | | type: "decimal", |
| | | width: 90, |
| | | align: "left", |
| | | bind: { key: "outboundStatusEnum", data: [] }, |
| | | }, |
| | | { |
| | | field: "createType", |
| | |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | bind: { key: "createType", data: [] }, |
| | | }, |
| | | { |
| | | field: "creater", |
| | |
| | | type: "string", |
| | | width: 180, |
| | | align: "left", |
| | | bind: { key: "orderDetailStatusEnum", data: [] }, |
| | | }, |
| | | { |
| | | field: "creater", |
| | |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | bind: { key: "yesno", data: [] }, |
| | | }, |
| | | { |
| | | field: "creater", |
| | |
| | | type: "string", |
| | | width: 200, |
| | | align: "left", |
| | | bind: { key: "stockStatusEmun", data: [] }, |
| | | }, |
| | | { |
| | | field: "locationType", |
| | |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | bind:{key: "locationTypeEnum", data: []} |
| | | }, |
| | | { |
| | | field: "locationStatus", |
| | |
| | | type: "string", |
| | | width: 200, |
| | | align: "left", |
| | | bind: { key: "locationStatusEnum", data: [] }, |
| | | }, |
| | | { |
| | | field: "enalbeStatus", |
| | |
| | | type: "string", |
| | | width: 180, |
| | | align: "left", |
| | | bind: { key: "enableStatusEnum", data: [] }, |
| | | }, |
| | | { |
| | | field: "isFull", |
| | |
| | | width: 150, |
| | | align: "left", |
| | | hidden: true, |
| | | bind: { key: "yesno", data: [] }, |
| | | }, |
| | | { |
| | | field: "creater", |
| | |
| | | parentId: "", |
| | | orderNo: "", |
| | | enable: "", |
| | | dbSql: "", |
| | | sql: "", |
| | | remark: "", |
| | | systemType: 1, |
| | | }); |
| | | const editFormOptions = ref([ |
| | | [ |
| | |
| | | }, |
| | | ], |
| | | [ |
| | | { title: "sqlè¯å¥", field: "dbSql", colSize: 8, type: "textarea" }, |
| | | { title: "sqlè¯å¥", field: "sql", colSize: 8, type: "textarea" }, |
| | | { title: "夿³¨", field: "remark", type: "textarea" }, |
| | | ], |
| | | ]); |
| | |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "dbSql", |
| | | field: "sql", |
| | | title: "sqlè¯å¥", |
| | | type: "string", |
| | | width: 200, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "dBServer", |
| | | title: "DBServer", |
| | | type: "string", |
| | | width: 90, |
| | | hidden: true, |
| | | align: "left", |
| | | }, |
| | | { |
| | |
| | | ], |
| | | }, |
| | | { |
| | | // 2022.03.26å¢ç§»å¨ç«¯å èåç±»å |
| | | title: "èåç±»å", |
| | | field: "menuType", |
| | | required: true, |
| | |
| | | |
| | | <template> |
| | | <view-grid |
| | | ref="grid" |
| | | :columns="columns" |
| | | :detail="detail" |
| | | :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" |
| | | :searchFormFields="searchFormFields" |
| | | :searchFormOptions="searchFormOptions" |
| | | :table="table" |
| | | :extend="extend" |
| | | > |
| | | </view-grid> |
| | | </template> |
| | | <view-grid |
| | | ref="grid" |
| | | :columns="columns" |
| | | :detail="detail" |
| | | :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" |
| | | :searchFormFields="searchFormFields" |
| | | :searchFormOptions="searchFormOptions" |
| | | :table="table" |
| | | :extend="extend" |
| | | > |
| | | </view-grid> |
| | | </template> |
| | | <script> |
| | | import extend from "@/extension/taskinfo/task.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | | setup() { |
| | | const table = ref({ |
| | | key: "taskId", |
| | | footer: "Foots", |
| | | cnName: "ä»»å¡ä¿¡æ¯", |
| | | name: "task", |
| | | url: "/Task/", |
| | | sortName: "CreateDate", |
| | | }); |
| | | const editFormFields = ref({}); |
| | | const editFormOptions = ref([]); |
| | | const searchFormFields = ref({ |
| | | taskNum: "", |
| | | palletCode: "", |
| | | roadway: "", |
| | | sourceAddress: "", |
| | | targetAddress: "", |
| | | currentAddress: "", |
| | | nextAddress: "", |
| | | creater: "", |
| | | createDate: "", |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "ä»»å¡å·", field: "taskNum", type: "int" }, |
| | | { title: "æçç¼å·", field: "palletCode", type: "like" }, |
| | | { |
| | | title: "ä»»å¡ç±»å", |
| | | field: "taskType", |
| | | type: "selectList", |
| | | dataKey: "taskType", |
| | | data: [], |
| | | }, |
| | | { |
| | | title: "ä»»å¡ç¶æ", |
| | | field: "taskState", |
| | | type: "selectList", |
| | | dataKey: "taskState", |
| | | data: [], |
| | | }, |
| | | ], |
| | | [ |
| | | { title: "èµ·å§å°å", field: "sourceAddress", type: "like" }, |
| | | { title: "ç®æ å°å", field: "targetAddress", type: "like" }, |
| | | { title: "å½åä½ç½®", field: "currentAddress", type: "like" }, |
| | | { title: "ä¸ä¸ä½ç½®", field: "nextAddress", type: "like" }, |
| | | ], |
| | | [ |
| | | { title: "å··éå·", field: "roadway", type: "like" }, |
| | | { title: "å建人", field: "creater", type: "like" }, |
| | | { title: "å建æ¶é´", field: "createDate", type: "datetime" }, |
| | | ], |
| | | ]); |
| | | const columns = ref([ |
| | | import extend from "@/extension/taskinfo/task.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | | setup() { |
| | | const table = ref({ |
| | | key: "taskId", |
| | | footer: "Foots", |
| | | cnName: "ä»»å¡ä¿¡æ¯", |
| | | name: "task", |
| | | url: "/Task/", |
| | | sortName: "CreateDate", |
| | | }); |
| | | const editFormFields = ref({}); |
| | | const editFormOptions = ref([]); |
| | | const searchFormFields = ref({ |
| | | taskNum: "", |
| | | palletCode: "", |
| | | roadway: "", |
| | | taskStatus: "", |
| | | taskType: "", |
| | | sourceAddress: "", |
| | | targetAddress: "", |
| | | currentAddress: "", |
| | | nextAddress: "", |
| | | creater: "", |
| | | createDate: "", |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "ä»»å¡å·", field: "taskNum", type: "int" }, |
| | | { title: "æçç¼å·", field: "palletCode", type: "like" }, |
| | | { |
| | | field: "taskId", |
| | | title: "taskId", |
| | | type: "int", |
| | | width: 90, |
| | | hidden: true, |
| | | readonly: true, |
| | | require: true, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "taskNum", |
| | | title: "ä»»å¡å·", |
| | | type: "int", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "palletCode", |
| | | title: "æçç¼å·", |
| | | type: "string", |
| | | width: 200, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "roadway", |
| | | title: "å··éå·", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "taskType", |
| | | title: "ä»»å¡ç±»å", |
| | | type: "int", |
| | | width: 90, |
| | | align: "left", |
| | | bind: { key: "taskType", data: [] }, |
| | | field: "taskType", |
| | | type: "selectList", |
| | | dataKey: "taskTypeEnum", |
| | | data: [], |
| | | }, |
| | | { |
| | | field: "taskState", |
| | | title: "ä»»å¡ç¶æ", |
| | | type: "int", |
| | | width: 150, |
| | | align: "left", |
| | | bind: { key: "taskState", data: [] }, |
| | | field: "taskStatus", |
| | | type: "selectList", |
| | | dataKey: "taskStatusEnum", |
| | | data: [], |
| | | }, |
| | | { |
| | | field: "sourceAddress", |
| | | title: "èµ·å§å°å", |
| | | type: "int", |
| | | width: 120, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "targetAddress", |
| | | title: "ç®æ å°å", |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "currentAddress", |
| | | title: "å½åä½ç½®", |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "nextAddress", |
| | | title: "ä¸ä¸ä½ç½®", |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "exceptionMessage", |
| | | title: "å¼å¸¸ä¿¡æ¯", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | hidden: true, |
| | | }, |
| | | { |
| | | field: "grade", |
| | | title: "ä¼å
级", |
| | | type: "int", |
| | | width: 80, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "dispatchertime", |
| | | title: "ä»»å¡ä¸åæ¶é´", |
| | | type: "datetime", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "wMSId", |
| | | title: "WMSä»»å¡ä¸»é®", |
| | | type: "int", |
| | | width: 120, |
| | | align: "left", |
| | | hidden: true, |
| | | }, |
| | | { |
| | | field: "creater", |
| | | title: "å建人", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "createDate", |
| | | title: "å建æ¶é´", |
| | | type: "datetime", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "modifier", |
| | | title: "ä¿®æ¹äºº", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "modifyDate", |
| | | title: "ä¿®æ¹æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "remark", |
| | | title: "夿³¨", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | hidden: true, |
| | | }, |
| | | ]); |
| | | const detail = ref({ |
| | | cnName: "#detailCnName", |
| | | table: "", |
| | | columns: [], |
| | | sortName: "", |
| | | }); |
| | | return { |
| | | table, |
| | | extend, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | columns, |
| | | detail, |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | | ], |
| | | [ |
| | | { title: "èµ·å§å°å", field: "sourceAddress", type: "like" }, |
| | | { title: "ç®æ å°å", field: "targetAddress", type: "like" }, |
| | | { title: "å½åä½ç½®", field: "currentAddress", type: "like" }, |
| | | { title: "ä¸ä¸ä½ç½®", field: "nextAddress", type: "like" }, |
| | | ], |
| | | [ |
| | | { title: "å··éå·", field: "roadway", type: "like" }, |
| | | { title: "å建人", field: "creater", type: "like" }, |
| | | { title: "å建æ¶é´", field: "createDate", type: "datetime" }, |
| | | ], |
| | | ]); |
| | | const columns = ref([ |
| | | { |
| | | field: "taskId", |
| | | title: "taskId", |
| | | type: "int", |
| | | width: 90, |
| | | hidden: true, |
| | | readonly: true, |
| | | require: true, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "taskNum", |
| | | title: "ä»»å¡å·", |
| | | type: "int", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "palletCode", |
| | | title: "æçç¼å·", |
| | | type: "string", |
| | | width: 200, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "roadway", |
| | | title: "å··éå·", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "taskType", |
| | | title: "ä»»å¡ç±»å", |
| | | type: "int", |
| | | width: 90, |
| | | align: "left", |
| | | bind: { key: "taskTypeEnum", data: [] }, |
| | | }, |
| | | { |
| | | field: "taskStatus", |
| | | title: "ä»»å¡ç¶æ", |
| | | type: "int", |
| | | width: 150, |
| | | align: "left", |
| | | bind: { key: "taskStatusEnum", data: [] }, |
| | | }, |
| | | { |
| | | field: "sourceAddress", |
| | | title: "èµ·å§å°å", |
| | | type: "int", |
| | | width: 120, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "targetAddress", |
| | | title: "ç®æ å°å", |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "currentAddress", |
| | | title: "å½åä½ç½®", |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "nextAddress", |
| | | title: "ä¸ä¸ä½ç½®", |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "exceptionMessage", |
| | | title: "å¼å¸¸ä¿¡æ¯", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | hidden: true, |
| | | }, |
| | | { |
| | | field: "grade", |
| | | title: "ä¼å
级", |
| | | type: "int", |
| | | width: 80, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "dispatchertime", |
| | | title: "ä»»å¡ä¸åæ¶é´", |
| | | type: "datetime", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "wMSId", |
| | | title: "WMSä»»å¡ä¸»é®", |
| | | type: "int", |
| | | width: 120, |
| | | align: "left", |
| | | hidden: true, |
| | | }, |
| | | { |
| | | field: "creater", |
| | | title: "å建人", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "createDate", |
| | | title: "å建æ¶é´", |
| | | type: "datetime", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "modifier", |
| | | title: "ä¿®æ¹äºº", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "modifyDate", |
| | | title: "ä¿®æ¹æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "remark", |
| | | title: "夿³¨", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | hidden: true, |
| | | }, |
| | | ]); |
| | | const detail = ref({ |
| | | cnName: "#detailCnName", |
| | | table: "", |
| | | columns: [], |
| | | sortName: "", |
| | | }); |
| | | return { |
| | | table, |
| | | extend, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | columns, |
| | | detail, |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | | |
| | |
| | | |
| | | public List<string> GetCanOutLocationCodes(List<string> roadways, List<int> areaIds) |
| | | { |
| | | return QueryData(x => x.LocationCode, x => roadways.Contains(x.RoadwayNo) && (areaIds.Contains(x.AreaId) || x.AreaId == 0) && x.LocationStatus == LocationStatusEnum.InStock.ObjToInt() && (x.EnableStatus == LocationEnalbeStatusEnum.OnlyOut.ObjToInt() || x.EnableStatus == LocationEnalbeStatusEnum.Normal.ObjToInt())).Distinct().ToList(); |
| | | return QueryData(x => x.LocationCode, x => roadways.Contains(x.RoadwayNo) && (areaIds.Contains(x.AreaId) || x.AreaId == 0) && x.LocationStatus == LocationStatusEnum.InStock.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyOut.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt())).Distinct().ToList(); |
| | | } |
| | | |
| | | public List<Dt_LocationInfo> GetLocationInfos(List<string> locationCodes) |
| | |
| | | /// <summary> |
| | | /// å¯åºåºçå··éç¼å·éå |
| | | /// </summary> |
| | | public List<string> CanOutRoadwayNos => QueryData(x => x.RoadwayNo, x => x.EnableStatus == RoadwayStatusEnum.Normal.ObjToInt() || x.EnableStatus == RoadwayStatusEnum.OnlyOut.ObjToInt()).Distinct().ToList(); |
| | | public List<string> CanOutRoadwayNos => QueryData(x => x.RoadwayNo, x => x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() || x.EnableStatus == EnableStatusEnum.OnlyOut.ObjToInt()).Distinct().ToList(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_BasicService |
| | | { |
| | | public partial class AreaInfoService : ServiceBase<Dt_AreaInfo, IAreaInfoRepository>, IAreaInfoService |
| | | { |
| | | public AreaInfoService(IAreaInfoRepository BaseDal) : base(BaseDal) |
| | | { |
| | | } |
| | | |
| | | public IAreaInfoRepository Repository => BaseDal; |
| | | |
| | | public override WebResponseContent AddData(SaveModel saveModel) |
| | | { |
| | | Dt_AreaInfo areaInfo = saveModel.MainData.DicToModel<Dt_AreaInfo>(); |
| | | return base.AddData(areaInfo); |
| | | } |
| | | |
| | | public override WebResponseContent UpdateData(Dt_AreaInfo entity) |
| | | { |
| | | return base.UpdateData(entity); |
| | | } |
| | | |
| | | public override WebResponseContent DeleteData(object[] keys) |
| | | { |
| | | return base.DeleteData(keys); |
| | | } |
| | | |
| | | public WebResponseContent AreaEnableStatus(int[] keys) |
| | | { |
| | | List<Dt_AreaInfo> areaInfos = Repository.QueryData(x => keys.Contains(x.Id)); |
| | | areaInfos.ForEach(x => |
| | | { |
| | | x.AreaStatus = EnableEnum.Enable.ObjToInt(); |
| | | }); |
| | | Repository.UpdateData(areaInfos); |
| | | |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | |
| | | public WebResponseContent AreaDisableStatus(int[] keys) |
| | | { |
| | | List<Dt_AreaInfo> areaInfos = Repository.QueryData(x => keys.Contains(x.Id)); |
| | | areaInfos.ForEach(x => |
| | | { |
| | | x.AreaStatus = EnableEnum.Disable.ObjToInt(); |
| | | }); |
| | | Repository.UpdateData(areaInfos); |
| | | |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | |
| | | public WebResponseContent AreaEnableStatus(int key) |
| | | { |
| | | return AreaEnableStatus(new int[] { key }); |
| | | } |
| | | |
| | | public WebResponseContent AreaDisableStatus(int key) |
| | | { |
| | | return AreaDisableStatus(new int[] { key }); |
| | | } |
| | | } |
| | | } |
ÎļþÃû´Ó ´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/AreaRouterService.cs ÐÞ¸Ä |
| | |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IBasicService; |
| | |
| | | |
| | | namespace WIDESEA_BasicService |
| | | { |
| | | public class AreaRouterService : ServiceBase<Dt_AreaRouter, IAreaRouterRepository>, IAreaRouterService |
| | | public partial class AreaRouterService : ServiceBase<Dt_AreaRouter, IAreaRouterRepository>, IAreaRouterService |
| | | { |
| | | public AreaRouterService(IAreaRouterRepository BaseDal) : base(BaseDal) |
| | | { |
| | | } |
| | | |
| | | public IAreaRouterRepository Repository => BaseDal; |
| | | |
| | | public override WebResponseContent AddData(SaveModel saveModel) |
| | | { |
| | | return base.AddData(saveModel); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_DTO.Basic; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_BasicService |
| | | { |
| | | public partial class CachePointService : ServiceBase<Dt_CachePoint, ICachePointRepository>, ICachePointService |
| | | { |
| | | public CachePointService(ICachePointRepository BaseDal) : base(BaseDal) |
| | | { |
| | | } |
| | | |
| | | public ICachePointRepository Repository => BaseDal; |
| | | |
| | | public override WebResponseContent AddData(SaveModel saveModel) |
| | | { |
| | | Dt_CachePoint cachePoint = saveModel.MainData.DicToModel<Dt_CachePoint>(); |
| | | return base.AddData(cachePoint); |
| | | } |
| | | |
| | | public override WebResponseContent UpdateData(SaveModel saveModel) |
| | | { |
| | | return base.UpdateData(saveModel); |
| | | } |
| | | |
| | | public override WebResponseContent DeleteData(object[] keys) |
| | | { |
| | | return base.DeleteData(keys); |
| | | } |
| | | |
| | | public WebResponseContent CachePointEnableStatus(int[] keys) |
| | | { |
| | | List<Dt_CachePoint> cachePoints = Repository.QueryData(x => keys.Contains(x.Id)); |
| | | cachePoints.ForEach(x => |
| | | { |
| | | x.EnableStatus = EnableEnum.Enable.ObjToInt(); |
| | | }); |
| | | Repository.UpdateData(cachePoints); |
| | | |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | |
| | | public WebResponseContent CachePointDisableStatus(int[] keys) |
| | | { |
| | | List<Dt_CachePoint> cachePoints = Repository.QueryData(x => keys.Contains(x.Id)); |
| | | cachePoints.ForEach(x => |
| | | { |
| | | x.EnableStatus = EnableEnum.Disable.ObjToInt(); |
| | | }); |
| | | Repository.UpdateData(cachePoints); |
| | | |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | |
| | | public WebResponseContent CachePointEnableStatus(int key) |
| | | { |
| | | return CachePointEnableStatus(new int[] { key }); |
| | | } |
| | | |
| | | public WebResponseContent CachePointDisableStatus(int key) |
| | | { |
| | | return CachePointDisableStatus(new int[] { key }); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_Core.Utilities; |
| | | using WIDESEA_DTO.Basic; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_BasicService |
| | | { |
| | | public partial class LocationInfoService : ServiceBase<Dt_LocationInfo, ILocationInfoRepository>, ILocationInfoService |
| | | { |
| | | private readonly IBasicRepository _basicRepository; |
| | | public ILocationInfoRepository Repository => BaseDal; |
| | | |
| | | public LocationInfoService(ILocationInfoRepository BaseDal, IBasicRepository basicRepository) : base(BaseDal) |
| | | { |
| | | _basicRepository = basicRepository; |
| | | } |
| | | |
| | | public override WebResponseContent AddData(SaveModel saveModel) |
| | | { |
| | | Dt_LocationInfo locationInfo = saveModel.MainData.DicToModel<Dt_LocationInfo>(); |
| | | return base.AddData(locationInfo); |
| | | } |
| | | |
| | | public override WebResponseContent UpdateData(SaveModel saveModel) |
| | | { |
| | | return base.UpdateData(saveModel); |
| | | } |
| | | |
| | | public override WebResponseContent DeleteData(object[] keys) |
| | | { |
| | | return base.DeleteData(keys); |
| | | } |
| | | |
| | | public WebResponseContent LocationEnableStatus(int[] keys) |
| | | { |
| | | List<Dt_LocationInfo> locationInfos = Repository.QueryData(x => keys.Contains(x.Id)); |
| | | locationInfos.ForEach(x => |
| | | { |
| | | x.EnableStatus = EnableEnum.Enable.ObjToInt(); |
| | | }); |
| | | Repository.UpdateData(locationInfos); |
| | | |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | |
| | | public WebResponseContent LocationDisableStatus(int[] keys) |
| | | { |
| | | List<Dt_LocationInfo> locationInfos = Repository.QueryData(x => keys.Contains(x.Id)); |
| | | locationInfos.ForEach(x => |
| | | { |
| | | x.EnableStatus = EnableEnum.Disable.ObjToInt(); |
| | | }); |
| | | Repository.UpdateData(locationInfos); |
| | | |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | |
| | | public WebResponseContent LocationEnableStatus(int key) |
| | | { |
| | | return LocationEnableStatus(new int[] { key }); |
| | | } |
| | | |
| | | public WebResponseContent LocationDisableStatus(int key) |
| | | { |
| | | return LocationDisableStatus(new int[] { key }); |
| | | } |
| | | |
| | | public WebResponseContent InitializationLocation(InitializationLocationDTO initializationLocationDTO) |
| | | { |
| | | try |
| | | { |
| | | (bool, string, object?) result = ModelValidate.ValidateModelData(initializationLocationDTO); |
| | | if (!result.Item1) return WebResponseContent.Instance.Error(result.Item2); |
| | | |
| | | int side = 1; |
| | | List<Dt_LocationInfo> locationInfos = new List<Dt_LocationInfo>(); |
| | | for (int i = 0; i < initializationLocationDTO.MaxRow; i++) |
| | | { |
| | | for (int j = 0; j < initializationLocationDTO.MaxColumn; j++) |
| | | { |
| | | for (int k = 0; k < initializationLocationDTO.MaxLayer; k++) |
| | | { |
| | | Dt_LocationInfo locationInfo = new Dt_LocationInfo() |
| | | { |
| | | AreaId = 0, |
| | | Column = j + 1, |
| | | EnableStatus = EnableStatusEnum.Normal.ObjToInt(), |
| | | Layer = k + 1, |
| | | LocationStatus = LocationStatusEnum.Free.ObjToInt(), |
| | | LocationType = LocationTypeEnum.Cube.ObjToInt(), |
| | | RoadwayNo = initializationLocationDTO.Roadway, |
| | | Row = i + 1, |
| | | }; |
| | | |
| | | if (initializationLocationDTO.IsSingleDepth) |
| | | { |
| | | locationInfo.Depth = 1; |
| | | locationInfo.LocationCode = $"R{initializationLocationDTO.Roadway.ToString().PadLeft(2, '0')}-{locationInfo.Row.ToString().PadLeft(3, '0')}-{locationInfo.Column.ToString().PadLeft(3, '0')}-{locationInfo.Layer.ToString().PadLeft(3, '0')}-{locationInfo.Depth.ToString().PadLeft(2, '0')}"; |
| | | locationInfo.LocationName = $"R{initializationLocationDTO.Roadway.ToString().PadLeft(2, '0')}å··é{locationInfo.Row.ToString().PadLeft(3, '0')}è¡{locationInfo.Column.ToString().PadLeft(3, '0')}å{locationInfo.Layer.ToString().PadLeft(3, '0')}å±{locationInfo.Depth.ToString().PadLeft(2, '0')}æ·±"; |
| | | } |
| | | else |
| | | { |
| | | if (initializationLocationDTO.FirstDepthRows.Contains(i + 1)) |
| | | { |
| | | locationInfo.Depth = 1; |
| | | } |
| | | else |
| | | { |
| | | locationInfo.Depth = 2; |
| | | } |
| | | locationInfo.LocationCode = $"R{initializationLocationDTO.Roadway.ToString().PadLeft(2, '0')}-{locationInfo.Row.ToString().PadLeft(3, '0')}-{locationInfo.Column.ToString().PadLeft(3, '0')}-{locationInfo.Layer.ToString().PadLeft(3, '0')}-{locationInfo.Depth.ToString().PadLeft(2, '0')}"; |
| | | locationInfo.LocationName = $"R{initializationLocationDTO.Roadway.ToString().PadLeft(2, '0')}å··é{locationInfo.Row.ToString().PadLeft(3, '0')}è¡{locationInfo.Column.ToString().PadLeft(3, '0')}å{locationInfo.Layer.ToString().PadLeft(3, '0')}å±{locationInfo.Depth.ToString().PadLeft(2, '0')}æ·±"; |
| | | } |
| | | |
| | | locationInfos.Add(locationInfo); |
| | | } |
| | | } |
| | | } |
| | | |
| | | BaseDal.AddData(locationInfos); |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_BasicService |
| | | { |
| | | public partial class MaterielInfoService : ServiceBase<Dt_MaterielInfo, IMaterielInfoRepository>, IMaterielInfoService |
| | | { |
| | | public MaterielInfoService(IMaterielInfoRepository BaseDal) : base(BaseDal) |
| | | { |
| | | } |
| | | |
| | | public IMaterielInfoRepository Repository => BaseDal; |
| | | |
| | | public override WebResponseContent AddData(SaveModel saveModel) |
| | | { |
| | | return base.AddData(saveModel); |
| | | } |
| | | |
| | | public override WebResponseContent UpdateData(SaveModel saveModel) |
| | | { |
| | | return base.UpdateData(saveModel); |
| | | } |
| | | |
| | | public override WebResponseContent DeleteData(object[] keys) |
| | | { |
| | | return base.DeleteData(keys); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_Core.Helper; |
| | | |
| | | namespace WIDESEA_BasicService |
| | | { |
| | | public partial class RoadwayInfoService : ServiceBase<Dt_RoadwayInfo, IRoadwayInfoRepository>, IRoadwayInfoService |
| | | { |
| | | public RoadwayInfoService(IRoadwayInfoRepository BaseDal) : base(BaseDal) |
| | | { |
| | | } |
| | | |
| | | public IRoadwayInfoRepository Repository => BaseDal; |
| | | |
| | | public override WebResponseContent AddData(SaveModel saveModel) |
| | | { |
| | | Dt_RoadwayInfo roadwayInfo = saveModel.MainData.DicToModel<Dt_RoadwayInfo>(); |
| | | return base.AddData(roadwayInfo); |
| | | } |
| | | |
| | | public override WebResponseContent UpdateData(SaveModel saveModel) |
| | | { |
| | | return base.UpdateData(saveModel); |
| | | } |
| | | |
| | | public override WebResponseContent DeleteData(object[] keys) |
| | | { |
| | | return base.DeleteData(keys); |
| | | } |
| | | |
| | | public WebResponseContent RoadwayEnableStatus(int[] keys) |
| | | { |
| | | List<Dt_RoadwayInfo> roadwayInfos = Repository.QueryData(x => keys.Contains(x.Id)); |
| | | roadwayInfos.ForEach(x => |
| | | { |
| | | x.EnableStatus = EnableEnum.Enable.ObjToInt(); |
| | | }); |
| | | Repository.UpdateData(roadwayInfos); |
| | | |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | |
| | | public WebResponseContent RoadwayDisableStatus(int[] keys) |
| | | { |
| | | List<Dt_RoadwayInfo> roadwayInfos = Repository.QueryData(x => keys.Contains(x.Id)); |
| | | roadwayInfos.ForEach(x => |
| | | { |
| | | x.EnableStatus = EnableEnum.Disable.ObjToInt(); |
| | | }); |
| | | Repository.UpdateData(roadwayInfos); |
| | | |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | |
| | | public WebResponseContent RoadwayEnableStatus(int key) |
| | | { |
| | | return RoadwayEnableStatus(new int[] { key }); |
| | | } |
| | | |
| | | public WebResponseContent RoadwayDisableStatus(int key) |
| | | { |
| | | return RoadwayDisableStatus(new int[] { key }); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_Core.Helper; |
| | | |
| | | namespace WIDESEA_BasicService |
| | | { |
| | | public partial class WarehouseService : ServiceBase<Dt_Warehouse, IWarehouseRepository>, IWarehouseService |
| | | { |
| | | public WarehouseService(IWarehouseRepository BaseDal) : base(BaseDal) |
| | | { |
| | | } |
| | | |
| | | public IWarehouseRepository Repository => BaseDal; |
| | | |
| | | public override WebResponseContent AddData(SaveModel saveModel) |
| | | { |
| | | Dt_Warehouse warehouse = saveModel.MainData.DicToModel<Dt_Warehouse>(); |
| | | return base.AddData(warehouse); |
| | | } |
| | | |
| | | public override WebResponseContent UpdateData(SaveModel saveModel) |
| | | { |
| | | return base.UpdateData(saveModel); |
| | | } |
| | | |
| | | public override WebResponseContent DeleteData(object[] keys) |
| | | { |
| | | return base.DeleteData(keys); |
| | | } |
| | | |
| | | public WebResponseContent WarehouseEnableStatus(int[] keys) |
| | | { |
| | | List<Dt_Warehouse> warehouses = Repository.QueryData(x => keys.Contains(x.Id)); |
| | | warehouses.ForEach(x => |
| | | { |
| | | x.WarehouseStatus = EnableEnum.Enable.ObjToInt(); |
| | | }); |
| | | Repository.UpdateData(warehouses); |
| | | |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | |
| | | public WebResponseContent WarehouseDisableStatus(int[] keys) |
| | | { |
| | | List<Dt_Warehouse> warehouses = Repository.QueryData(x => keys.Contains(x.Id)); |
| | | warehouses.ForEach(x => |
| | | { |
| | | x.WarehouseStatus = EnableEnum.Disable.ObjToInt(); |
| | | }); |
| | | Repository.UpdateData(warehouses); |
| | | |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | |
| | | public WebResponseContent WarehouseEnableStatus(int key) |
| | | { |
| | | return WarehouseEnableStatus(new int[] { key }); |
| | | } |
| | | |
| | | public WebResponseContent WarehouseDisableStatus(int key) |
| | | { |
| | | return WarehouseDisableStatus(new int[] { key }); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | #region AreaInfo |
| | | public WebResponseContent AreaEnableStatus(int[] keys) |
| | | { |
| | | List<Dt_AreaInfo> areaInfos = AreaInfoService.Repository.QueryData(x => keys.Contains(x.Id)); |
| | | areaInfos.ForEach(x => |
| | | { |
| | | x.AreaStatus = EnableEnum.Enable.ObjToInt(); |
| | | }); |
| | | AreaInfoService.Repository.UpdateData(areaInfos); |
| | | |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | |
| | | public WebResponseContent AreaDisableStatus(int[] keys) |
| | | { |
| | | List<Dt_AreaInfo> areaInfos = AreaInfoService.Repository.QueryData(x => keys.Contains(x.Id)); |
| | | areaInfos.ForEach(x => |
| | | { |
| | | x.AreaStatus = EnableEnum.Disable.ObjToInt(); |
| | | }); |
| | | AreaInfoService.Repository.UpdateData(areaInfos); |
| | | |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | |
| | | public WebResponseContent AreaEnableStatus(int key) |
| | | { |
| | | return AreaEnableStatus(new int[] { key }); |
| | | } |
| | | |
| | | public WebResponseContent AreaDisableStatus(int key) |
| | | { |
| | | return AreaDisableStatus(new int[] { key }); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region CachePoint |
| | | public WebResponseContent CachePointEnableStatus(int[] keys) |
| | | { |
| | | List<Dt_CachePoint> cachePoints = CachePointService.Repository.QueryData(x => keys.Contains(x.Id)); |
| | | cachePoints.ForEach(x => |
| | | { |
| | | x.EnableStatus = EnableEnum.Enable.ObjToInt(); |
| | | }); |
| | | CachePointService.Repository.UpdateData(cachePoints); |
| | | |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | |
| | | public WebResponseContent CachePointDisableStatus(int[] keys) |
| | | { |
| | | List<Dt_CachePoint> cachePoints = CachePointService.Repository.QueryData(x => keys.Contains(x.Id)); |
| | | cachePoints.ForEach(x => |
| | | { |
| | | x.EnableStatus = EnableEnum.Disable.ObjToInt(); |
| | | }); |
| | | CachePointService.Repository.UpdateData(cachePoints); |
| | | |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | |
| | | public WebResponseContent CachePointEnableStatus(int key) |
| | | { |
| | | return CachePointEnableStatus(new int[] { key }); |
| | | } |
| | | |
| | | public WebResponseContent CachePointDisableStatus(int key) |
| | | { |
| | | return CachePointDisableStatus(new int[] { key }); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region LocationInfo |
| | | public WebResponseContent LocationEnableStatus(int[] keys) |
| | | { |
| | | List<Dt_LocationInfo> locationInfos = LocationInfoService.Repository.QueryData(x => keys.Contains(x.Id)); |
| | | locationInfos.ForEach(x => |
| | | { |
| | | x.EnableStatus = EnableEnum.Enable.ObjToInt(); |
| | | }); |
| | | LocationInfoService.Repository.UpdateData(locationInfos); |
| | | |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | |
| | | public WebResponseContent LocationDisableStatus(int[] keys) |
| | | { |
| | | List<Dt_LocationInfo> locationInfos = LocationInfoService.Repository.QueryData(x => keys.Contains(x.Id)); |
| | | locationInfos.ForEach(x => |
| | | { |
| | | x.EnableStatus = EnableEnum.Disable.ObjToInt(); |
| | | }); |
| | | LocationInfoService.Repository.UpdateData(locationInfos); |
| | | |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | |
| | | public WebResponseContent LocationEnableStatus(int key) |
| | | { |
| | | return LocationEnableStatus(new int[] { key }); |
| | | } |
| | | |
| | | public WebResponseContent LocationDisableStatus(int key) |
| | | { |
| | | return LocationDisableStatus(new int[] { key }); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region RoadwayInfo |
| | | public WebResponseContent RoadwayEnableStatus(int[] keys) |
| | | { |
| | | List<Dt_RoadwayInfo> roadwayInfos = RoadwayInfoService.Repository.QueryData(x => keys.Contains(x.Id)); |
| | | roadwayInfos.ForEach(x => |
| | | { |
| | | x.EnableStatus = EnableEnum.Enable.ObjToInt(); |
| | | }); |
| | | RoadwayInfoService.Repository.UpdateData(roadwayInfos); |
| | | |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | |
| | | public WebResponseContent RoadwayDisableStatus(int[] keys) |
| | | { |
| | | List<Dt_RoadwayInfo> roadwayInfos = RoadwayInfoService.Repository.QueryData(x => keys.Contains(x.Id)); |
| | | roadwayInfos.ForEach(x => |
| | | { |
| | | x.EnableStatus = EnableEnum.Disable.ObjToInt(); |
| | | }); |
| | | RoadwayInfoService.Repository.UpdateData(roadwayInfos); |
| | | |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | |
| | | public WebResponseContent RoadwayEnableStatus(int key) |
| | | { |
| | | return RoadwayEnableStatus(new int[] { key }); |
| | | } |
| | | |
| | | public WebResponseContent RoadwayDisableStatus(int key) |
| | | { |
| | | return RoadwayDisableStatus(new int[] { key }); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region Warehouse |
| | | public WebResponseContent WarehouseEnableStatus(int[] keys) |
| | | { |
| | | List<Dt_Warehouse> warehouses = WarehouseService.Repository.QueryData(x => keys.Contains(x.Id)); |
| | | warehouses.ForEach(x => |
| | | { |
| | | x.WarehouseStatus = EnableEnum.Enable.ObjToInt(); |
| | | }); |
| | | WarehouseService.Repository.UpdateData(warehouses); |
| | | |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | |
| | | public WebResponseContent WarehouseDisableStatus(int[] keys) |
| | | { |
| | | List<Dt_Warehouse> warehouses = WarehouseService.Repository.QueryData(x => keys.Contains(x.Id)); |
| | | warehouses.ForEach(x => |
| | | { |
| | | x.WarehouseStatus = EnableEnum.Disable.ObjToInt(); |
| | | }); |
| | | WarehouseService.Repository.UpdateData(warehouses); |
| | | |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | |
| | | public WebResponseContent WarehouseEnableStatus(int key) |
| | | { |
| | | return WarehouseEnableStatus(new int[] { key }); |
| | | } |
| | | |
| | | public WebResponseContent WarehouseDisableStatus(int key) |
| | | { |
| | | return WarehouseDisableStatus(new int[] { key }); |
| | | } |
| | | |
| | | #endregion |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_BasicService |
| | | { |
| | | public partial class AreaInfoService : ServiceBase<Dt_AreaInfo, IAreaInfoRepository>, IAreaInfoService |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_BasicService |
| | | { |
| | | public partial class AreaRouterService : ServiceBase<Dt_AreaRouter, IAreaRouterRepository>, IAreaRouterService |
| | | { |
| | | } |
| | | } |
ÎļþÃû´Ó ´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/CachePointService.cs ÐÞ¸Ä |
| | |
| | | |
| | | namespace WIDESEA_BasicService |
| | | { |
| | | public class CachePointService : ServiceBase<Dt_CachePoint, ICachePointRepository>, ICachePointService |
| | | public partial class CachePointService : ServiceBase<Dt_CachePoint, ICachePointRepository>, ICachePointService |
| | | { |
| | | public CachePointService(ICachePointRepository BaseDal) : base(BaseDal) |
| | | { |
| | | } |
| | | |
| | | public ICachePointRepository Repository => BaseDal; |
| | | |
| | | private readonly Dictionary<string, OrderByType> _emptyAssignOrderBy = new() |
| | | { |
| | |
| | | List<CachePointGroupDTO> cachePointGroups = Repository.GetCachePointGroups(areaId, LocationStatusEnum.InStock, LocationStatusEnum.Free); |
| | | if (cachePointGroups != null && cachePointGroups.Count > 0) |
| | | { |
| | | CachePointGroupDTO? pointGroupDTO = cachePointGroups.FirstOrDefault(x => x.EnableStatusB == LocationEnalbeStatusEnum.OnlyIn.ObjToInt() || x.EnableStatusB == LocationEnalbeStatusEnum.Normal.ObjToInt()); |
| | | CachePointGroupDTO? pointGroupDTO = cachePointGroups.FirstOrDefault(x => x.EnableStatusB == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatusB == EnableStatusEnum.Normal.ObjToInt()); |
| | | int id = pointGroupDTO?.IdB ?? 0; |
| | | return BaseDal.QueryFirst(x => x.Id == id); |
| | | } |
| | | cachePointGroups = Repository.GetCachePointGroups(areaId, LocationStatusEnum.Free, LocationStatusEnum.Free); |
| | | if (cachePointGroups != null && cachePointGroups.Count > 0) |
| | | { |
| | | CachePointGroupDTO? pointGroupDTO = cachePointGroups.FirstOrDefault(x => x.EnableStatusA == LocationEnalbeStatusEnum.OnlyIn.ObjToInt() || x.EnableStatusA == LocationEnalbeStatusEnum.Normal.ObjToInt()); |
| | | CachePointGroupDTO? pointGroupDTO = cachePointGroups.FirstOrDefault(x => x.EnableStatusA == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatusA == EnableStatusEnum.Normal.ObjToInt()); |
| | | int id = pointGroupDTO?.IdA ?? 0; |
| | | return BaseDal.QueryFirst(x => x.Id == id); |
| | | } |
| | | |
| | | return BaseDal.QueryFirst(x => x.PointStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == LocationEnalbeStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == LocationEnalbeStatusEnum.Normal.ObjToInt() && x.AreaId == areaId), _emptyAssignOrderBy); |
| | | return BaseDal.QueryFirst(x => x.PointStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.AreaId == areaId), _emptyAssignOrderBy); |
| | | } |
| | | |
| | | public Dt_CachePoint? GetIbStockCachePoint(int areaId) |
| | |
| | | List<CachePointGroupDTO> cachePointGroups = Repository.GetCachePointGroups(areaId, LocationStatusEnum.InStock, LocationStatusEnum.Free); |
| | | if (cachePointGroups != null && cachePointGroups.Count > 0) |
| | | { |
| | | CachePointGroupDTO? pointGroupDTO = cachePointGroups.FirstOrDefault(x => x.EnableStatusA == LocationEnalbeStatusEnum.OnlyOut.ObjToInt() || x.EnableStatusA == LocationEnalbeStatusEnum.Normal.ObjToInt()); |
| | | CachePointGroupDTO? pointGroupDTO = cachePointGroups.FirstOrDefault(x => x.EnableStatusA == EnableStatusEnum.OnlyOut.ObjToInt() || x.EnableStatusA == EnableStatusEnum.Normal.ObjToInt()); |
| | | int id = pointGroupDTO?.IdA ?? 0; |
| | | return BaseDal.QueryFirst(x => x.Id == id); |
| | | } |
| | | cachePointGroups = Repository.GetCachePointGroups(areaId, LocationStatusEnum.InStock, LocationStatusEnum.InStock); |
| | | if (cachePointGroups != null && cachePointGroups.Count > 0) |
| | | { |
| | | CachePointGroupDTO? pointGroupDTO = cachePointGroups.FirstOrDefault(x => x.EnableStatusB == LocationEnalbeStatusEnum.OnlyOut.ObjToInt() || x.EnableStatusB == LocationEnalbeStatusEnum.Normal.ObjToInt()); |
| | | CachePointGroupDTO? pointGroupDTO = cachePointGroups.FirstOrDefault(x => x.EnableStatusB == EnableStatusEnum.OnlyOut.ObjToInt() || x.EnableStatusB == EnableStatusEnum.Normal.ObjToInt()); |
| | | int id = pointGroupDTO?.IdB ?? 0; |
| | | return BaseDal.QueryFirst(x => x.Id == id); |
| | | } |
| | | |
| | | return BaseDal.QueryFirst(x => x.PointStatus == LocationStatusEnum.InStock.ObjToInt() && (x.EnableStatus == LocationEnalbeStatusEnum.OnlyOut.ObjToInt() || x.EnableStatus == LocationEnalbeStatusEnum.Normal.ObjToInt() && x.AreaId == areaId), _emptyAssignOrderBy); |
| | | return BaseDal.QueryFirst(x => x.PointStatus == LocationStatusEnum.InStock.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyOut.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.AreaId == areaId), _emptyAssignOrderBy); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_Core.Utilities; |
| | | using WIDESEA_DTO.Basic; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_BasicService |
| | | { |
| | | public partial class LocationInfoService : ServiceBase<Dt_LocationInfo, ILocationInfoRepository>, ILocationInfoService |
| | | { |
| | | |
| | | private Dictionary<string, OrderByType> _emptyAssignOrderBy = new Dictionary<string, OrderByType>() |
| | | { |
| | | { nameof(Dt_LocationInfo.Depth), OrderByType.Desc }, |
| | | { nameof(Dt_LocationInfo.Layer), OrderByType.Asc }, |
| | | { nameof(Dt_LocationInfo.Column), OrderByType.Asc }, |
| | | { nameof(Dt_LocationInfo.Row), OrderByType.Asc }, |
| | | }; |
| | | |
| | | public virtual Dt_LocationInfo? AssignLocation(string stationCode, int inboundType) |
| | | { |
| | | try |
| | | { |
| | | Dt_RoadwayInfo roadwayInfo = _basicRepository.RoadwayInfoRepository.QueryFirst(x => x.InStationCode == stationCode) ?? throw new Exception("æªæ¾å°è¯¥ç«å°å¯¹åºçå··éï¼è¯·æ£æ¥åºç¡é
置信æ¯"); |
| | | if (roadwayInfo.EnableStatus != EnableStatusEnum.Normal.ObjToInt() && roadwayInfo.EnableStatus != EnableStatusEnum.OnlyIn.ObjToInt()) |
| | | { |
| | | throw new Exception("该巷éä¸å¯å
¥åºï¼è¯·æ£æ¥å··éç¦ç¨ä¿¡æ¯"); |
| | | } |
| | | if (roadwayInfo.AreaId > 0) |
| | | { |
| | | Dt_AreaInfo areaInfo = _basicRepository.AreaInfoRepository.QueryFirst(x => x.Id == roadwayInfo.AreaId); |
| | | if (areaInfo != null && areaInfo.AreaStatus == EnableEnum.Disable.ObjToInt()) |
| | | { |
| | | throw new Exception("åºå被ç¦ç¨ï¼ä¸å¯å
¥åº"); |
| | | } |
| | | } |
| | | if (inboundType == TaskTypeEnum.PalletInbound.ObjToInt())//空çå
¥åºåé
é»è¾ |
| | | { |
| | | return EmptyAssignLocation(roadwayInfo.RoadwayNo); |
| | | } |
| | | else if (inboundType == TaskTypeEnum.Inbound.ObjToInt()) |
| | | { |
| | | return StoredAssignLocation(roadwayInfo.RoadwayNo); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | |
| | | private Dt_LocationInfo EmptyAssignLocation(string roadway) |
| | | { |
| | | List<LocationGroupDTO> locationGroups = BaseDal.GetLocationGroups(roadway, LocationStatusEnum.Free, LocationStatusEnum.Pallet); |
| | | if (locationGroups != null && locationGroups.Count > 0) |
| | | { |
| | | LocationGroupDTO? locationGroup = locationGroups.FirstOrDefault(x => x.EnableStatusA == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatusA == EnableStatusEnum.Normal.ObjToInt()); |
| | | int id = locationGroup?.IdA ?? 0; |
| | | return BaseDal.QueryFirst(x => x.Id == id); |
| | | } |
| | | locationGroups = BaseDal.GetLocationGroups(roadway, LocationStatusEnum.Free, LocationStatusEnum.Free); |
| | | if (locationGroups != null && locationGroups.Count > 0) |
| | | { |
| | | LocationGroupDTO? locationGroup = locationGroups.FirstOrDefault(x => x.EnableStatusB == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatusB == EnableStatusEnum.Normal.ObjToInt()); |
| | | int id = locationGroup?.IdB ?? 0; |
| | | return BaseDal.QueryFirst(x => x.Id == id); |
| | | } |
| | | |
| | | return BaseDal.QueryFirst(x => x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.RoadwayNo == roadway), _emptyAssignOrderBy); |
| | | } |
| | | |
| | | private Dt_LocationInfo StoredAssignLocation(string roadway) |
| | | { |
| | | List<LocationGroupDTO> locationGroups = BaseDal.GetLocationGroups(roadway, LocationStatusEnum.Free, LocationStatusEnum.InStock); |
| | | if (locationGroups != null) |
| | | { |
| | | LocationGroupDTO? locationGroup = locationGroups.FirstOrDefault(x => x.EnableStatusA == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatusA == EnableStatusEnum.Normal.ObjToInt()); |
| | | int id = locationGroup?.IdA ?? 0; |
| | | return BaseDal.QueryFirst(x => x.Id == id); |
| | | } |
| | | locationGroups = BaseDal.GetLocationGroups(roadway, LocationStatusEnum.Free, LocationStatusEnum.Free); |
| | | if (locationGroups != null && locationGroups.Count > 0) |
| | | { |
| | | LocationGroupDTO? locationGroup = locationGroups.FirstOrDefault(x => x.EnableStatusB == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatusB == EnableStatusEnum.Normal.ObjToInt()); |
| | | int id = locationGroup?.IdB ?? 0; |
| | | return BaseDal.QueryFirst(x => x.Id == id); |
| | | } |
| | | |
| | | return BaseDal.QueryFirst(x => x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.RoadwayNo == roadway), _emptyAssignOrderBy); |
| | | } |
| | | |
| | | public Dt_LocationInfo AdjacentDepthLocation(string locationCode) |
| | | { |
| | | Dt_LocationInfo locationInfo = BaseDal.QueryFirst(x => x.LocationCode == locationCode); |
| | | return AdjacentDepthLocation(locationInfo); |
| | | } |
| | | |
| | | public Dt_LocationInfo AdjacentDepthLocation(Dt_LocationInfo locationInfo) |
| | | { |
| | | return BaseDal.QueryFirst(x => x.RoadwayNo == locationInfo.RoadwayNo && x.Column == locationInfo.Column && x.Layer == locationInfo.Layer && x.Depth != locationInfo.Depth && x.Row != locationInfo.Row && (SqlFunc.Abs(x.Row - locationInfo.Row) == 1)); |
| | | } |
| | | } |
| | | } |
ÎļþÃû´Ó ´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/MaterielInfoService.cs ÐÞ¸Ä |
| | |
| | | |
| | | namespace WIDESEA_BasicService |
| | | { |
| | | public class MaterielInfoService : ServiceBase<Dt_MaterielInfo, IMaterielInfoRepository>, IMaterielInfoService |
| | | public partial class MaterielInfoService : ServiceBase<Dt_MaterielInfo, IMaterielInfoRepository>, IMaterielInfoService |
| | | { |
| | | public MaterielInfoService(IMaterielInfoRepository BaseDal) : base(BaseDal) |
| | | { |
| | | } |
| | | |
| | | public IMaterielInfoRepository Repository => BaseDal; |
| | | |
| | | public bool ExsitMateriel(string materielCode) |
| | | { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_BasicService |
| | | { |
| | | public partial class RoadwayInfoService : ServiceBase<Dt_RoadwayInfo, IRoadwayInfoRepository>, IRoadwayInfoService |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_BasicService |
| | | { |
| | | public partial class WarehouseService : ServiceBase<Dt_Warehouse, IWarehouseRepository>, IWarehouseService |
| | | { |
| | | } |
| | | } |
| | |
| | | using WIDESEA_Core.Const; |
| | | using WIDESEA_Core.DB; |
| | | using WIDESEA_Core.DB.Models; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_Core.Seed; |
| | | using WIDESEA_Core.Tenants; |
| | |
| | | ruleConfig.ModifyDate = DateTime.Now; |
| | | |
| | | code = ruleConfig.Format; |
| | | code = code.Replace("[YYYY]", now.Year.ToString().PadLeft(4, '0')); |
| | | code = code.Replace("[YY]", now.Year.ToString().Substring(2, 2)); |
| | | code = code.Replace("[MM]", now.Month.ToString().PadLeft(2, '0')); |
| | | code = code.Replace("[DD]", now.Day.ToString().PadLeft(2, '0')); |
| | | code = code.Replace("[ST]", ruleConfig.StartStr.ToString()); |
| | | code = code.Replace("[NUM]", ruleConfig.CurrentVal.ToString().PadLeft(ruleConfig.Length ?? 0, '0')); |
| | | code = code.Replace($"[{CodeFormat.YYYY}]", now.Year.ToString().PadLeft(4, '0')); |
| | | code = code.Replace($"[{CodeFormat.MM}]", now.Month.ToString().PadLeft(2, '0')); |
| | | code = code.Replace($"[{CodeFormat.DD}]", now.Day.ToString().PadLeft(2, '0')); |
| | | code = code.Replace($"[{CodeFormat.ST}]", ruleConfig.StartStr.ToString()); |
| | | code = code.Replace($"[{CodeFormat.NUM}]", ruleConfig.CurrentVal.ToString().PadLeft(ruleConfig.Length ?? 0, '0')); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | [AttributeUsage(AttributeTargets.Property)] |
| | | public class AnalysisItemRuleAttribute : Attribute |
| | | { |
| | | public AnalysisFormaType AnalysisFormaType { get; set; } |
| | | public AnalysisFormatType AnalysisFormaType { get; set; } |
| | | |
| | | public int Length { get; set; } |
| | | |
| | | public AnalysisItemRuleAttribute(AnalysisFormaType analysisFormaType) |
| | | public AnalysisItemRuleAttribute(AnalysisFormatType analysisFormaType) |
| | | { |
| | | AnalysisFormaType = analysisFormaType; |
| | | } |
| | |
| | | |
| | | public string Get(string key) |
| | | { |
| | | return _cache.Get(key)?.ToString(); |
| | | try |
| | | { |
| | | return _cache.Get(key)?.ToString(); |
| | | } |
| | | catch |
| | | { |
| | | return string.Empty; |
| | | } |
| | | } |
| | | |
| | | public bool Remove(string key) |
| | |
| | | OutterCode |
| | | } |
| | | |
| | | public enum AnalysisFormaType |
| | | public enum AnalysisFormatType |
| | | { |
| | | /// <summary> |
| | | /// ç©æç¼å· |
| | |
| | | [Description("åºåºåå·ç¼ç è§åç¼å·")] |
| | | OutboundOrderRule |
| | | } |
| | | |
| | | public enum CodeFormat |
| | | { |
| | | /// <summary> |
| | | /// èµ·å§å符串 |
| | | /// </summary> |
| | | [Description("èµ·å§å符串")] |
| | | ST, |
| | | |
| | | /// <summary> |
| | | /// 4使°å¹´ |
| | | /// </summary> |
| | | [Description("4使°å¹´")] |
| | | YYYY, |
| | | |
| | | /// <summary> |
| | | /// 2使°æ |
| | | /// </summary> |
| | | [Description("2使°æ")] |
| | | MM, |
| | | |
| | | /// <summary> |
| | | /// 2使°æ¥ |
| | | /// </summary> |
| | | [Description("2使°æ¥")] |
| | | DD, |
| | | |
| | | /// <summary> |
| | | /// æµæ°´å· |
| | | /// </summary> |
| | | [Description("æµæ°´å·")] |
| | | NUM, |
| | | |
| | | /// <summary> |
| | | /// ç»æå符串 |
| | | /// </summary> |
| | | [Description("ç»æå符串")] |
| | | ED |
| | | } |
| | | } |
| | |
| | | Pallet = 99 |
| | | } |
| | | |
| | | public enum LocationEnalbeStatusEnum |
| | | public enum EnableStatusEnum |
| | | { |
| | | /// <summary> |
| | | /// æ£å¸¸ |
| | |
| | | /// <summary> |
| | | /// ç«åº |
| | | /// </summary> |
| | | [Description("ç«åº")] |
| | | [Description("ç«åºè´§ä½")] |
| | | Cube = 1, |
| | | |
| | | /// <summary> |
| | | /// å¹³åº |
| | | /// </summary> |
| | | [Description("å¹³åº")] |
| | | [Description("å¹³åºè´§ä½")] |
| | | Flat = 2 |
| | | } |
| | | |
| | |
| | | public enum EnableEnum |
| | | { |
| | | /// <summary> |
| | | /// å
¨é¨ |
| | | /// </summary> |
| | | [Description("å
¨é¨")] |
| | | All = -1, |
| | | |
| | | /// <summary> |
| | | /// ç¦ç¨ |
| | | /// </summary> |
| | | [Description("ç¦ç¨")] |
| | |
| | | /// ç产éæå |
| | | /// </summary> |
| | | [Description("ç产éæå")] |
| | | Return = 200, |
| | | Return = 105, |
| | | |
| | | /// <summary> |
| | | /// éè´å
¥åºå |
| | | /// </summary> |
| | | [Description("éè´å
¥åºå")] |
| | | Purchase = 300, |
| | | Purchase = 110, |
| | | |
| | | /// <summary> |
| | | /// è°æ¨å
¥åºå |
| | | /// </summary> |
| | | [Description("è°æ¨å
¥åºå")] |
| | | Allocat = 400, |
| | | Allocat = 115, |
| | | |
| | | /// <summary> |
| | | /// éå®éè´§å |
| | | /// </summary> |
| | | [Description("éå®éè´§å")] |
| | | SaleReturn = 500, |
| | | SaleReturn = 120, |
| | | |
| | | /// <summary> |
| | | /// 空çå
¥åºå |
| | | /// </summary> |
| | | [Description("空çå
¥åºå")] |
| | | EmptyDisk = 600, |
| | | EmptyDisk = 125, |
| | | |
| | | /// <summary> |
| | | /// å
¶ä»å
¥åºå |
| | | /// </summary> |
| | | [Description("å
¶ä»å
¥åºå")] |
| | | Other = 700 |
| | | Other = 130 |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// ç产è¿å·¥å |
| | | /// </summary> |
| | | [Description("ç产è¿å·¥å")] |
| | | Rework = 100, |
| | | Rework = 200, |
| | | |
| | | /// <summary> |
| | | /// ç产åæå |
| | | /// </summary> |
| | | [Description("ç产åæå")] |
| | | Issue = 200, |
| | | Issue = 205, |
| | | |
| | | /// <summary> |
| | | /// éè´éè´§å |
| | | /// </summary> |
| | | [Description("éè´éè´§å")] |
| | | ProcureReturn = 300, |
| | | ProcureReturn = 210, |
| | | |
| | | /// <summary> |
| | | /// è°æ¨åºåºå |
| | | /// </summary> |
| | | [Description("è°æ¨åºåºå")] |
| | | Allocate = 400, |
| | | Allocate = 215, |
| | | |
| | | /// <summary> |
| | | /// éå®åºåºå |
| | | /// </summary> |
| | | [Description("éå®åºåºå")] |
| | | SaleOut = 500, |
| | | SaleOut = 220, |
| | | |
| | | /// <summary> |
| | | /// 空çåºåºå |
| | | /// </summary> |
| | | [Description("空çåºåºå")] |
| | | EmptyDisk = 600, |
| | | EmptyDisk = 225, |
| | | |
| | | /// <summary> |
| | | /// è´¨æ£åºåºå |
| | | /// </summary> |
| | | [Description("è´¨æ£åºåºå")] |
| | | Quality = 700, |
| | | Quality = 230, |
| | | |
| | | /// <summary> |
| | | /// å
¶ä»åºåºå |
| | | /// </summary> |
| | | [Description("å
¶ä»åºåºå")] |
| | | Other = 800 |
| | | Other = 235 |
| | | } |
| | | |
| | | public enum OrderDetailStatusEnum |
| | |
| | | [Description("ç»çå
¥åº")] |
| | | GroupAndInbound = 10, |
| | | |
| | | [Description("åºåºé¨ååé
宿")] |
| | | AssignOverPartial = 60, |
| | | |
| | | [Description("åºåºåé
宿")] |
| | | AssignOver = 70, |
| | | |
| | | [Description("åºåºä¸")] |
| | | Outbound = 80, |
| | | /// <summary> |
| | | /// 宿 |
| | |
| | | /// <summary> |
| | | /// å
¥åºåæ®ç¶æ 0ï¼æªå¼å§ 1ï¼å
¥åºä¸ 2ï¼å
¥åºå®æ |
| | | /// </summary> |
| | | public enum InboundStatusEmun |
| | | public enum InboundStatusEnum |
| | | { |
| | | /// <summary> |
| | | /// æªå¼å§ |
| | |
| | | #region |
| | | public enum OutboundStatusEnum |
| | | { |
| | | /// <summary> |
| | | /// æªå¼å§ |
| | | /// </summary> |
| | | [Description("æªå¼å§")] |
| | | æªå¼å§ = 0, |
| | | |
| | | /// <summary> |
| | | /// åºåºä¸ |
| | | /// </summary> |
| | | [Description("åºåºä¸")] |
| | | å
¥åºä¸ = 1, |
| | | |
| | | /// <summary> |
| | | /// åºåºå®æ |
| | | /// </summary> |
| | | [Description("åºåºå®æ")] |
| | | å
¥åºå®æ = 2, |
| | | |
| | | /// <summary> |
| | | /// å
³é |
| | | /// </summary> |
| | | [Description("å
³é")] |
| | | å
³é = 99, |
| | | |
| | | /// <summary> |
| | | /// åæ¶ |
| | | /// </summary> |
| | | [Description("åæ¶")] |
| | | åæ¶ = 98 |
| | | } |
| | | #endregion |
| | | |
| | |
| | | |
| | | namespace WIDESEA_Core.Enums |
| | | { |
| | | public enum RoadwayStatusEnum |
| | | { |
| | | [Description("æ£å¸¸")] |
| | | Normal, |
| | | |
| | | [Description("åªå
¥")] |
| | | OnlyIn, |
| | | |
| | | [Description("åªåº")] |
| | | OnlyOut, |
| | | |
| | | [Description("ç¦ç¨")] |
| | | Disable |
| | | } |
| | | } |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | |
| | | /// <summary> |
| | | /// ç»ç |
| | | /// </summary> |
| | | [Description("")] |
| | | MaterielGroup, |
| | | |
| | | /// <summary> |
| | | /// å
¥åº |
| | | /// </summary> |
| | | [Description("")] |
| | | Inbound, |
| | | |
| | | /// <summary> |
| | | /// åºåº |
| | | /// </summary> |
| | | [Description("")] |
| | | Outbound, |
| | | |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | public enum StockStatusEmun |
| | | { |
| | | [Description("ç»çæå")] |
| | | ç»çæå = 1, |
| | | |
| | | [Description("ç»çæ¤é")] |
| | | ç»çæ¤é = 2, |
| | | |
| | | [Description("å
¥åºç¡®è®¤")] |
| | | å
¥åºç¡®è®¤ = 3, |
| | | |
| | | [Description("å
¥åºæ¤é")] |
| | | å
¥åºæ¤é = 4, |
| | | |
| | | [Description("å·²å
¥åº")] |
| | | å·²å
¥åº = 5, |
| | | |
| | | [Description("å
¥åºå®æ")] |
| | | å
¥åºå®æ = 6, |
| | | |
| | | [Description("åºåºéå®")] |
| | | åºåºéå® = 7, |
| | | |
| | | [Description("åºåºå®æ")] |
| | | åºåºå®æ = 8, |
| | | } |
| | | |
| | | public enum OutStockStatus |
| | | { |
| | | [Description("å·²åé
")] |
| | | å·²åé
= 0, |
| | | |
| | | [Description("åºåºä¸")] |
| | | åºåºä¸ = 1, |
| | | |
| | | [Description("åºåºå®æ")] |
| | | åºåºå®æ = 2, |
| | | |
| | | [Description("æ¤é")] |
| | | æ¤é = 99 |
| | | } |
| | | } |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | |
| | | /// <summary> |
| | | /// åºåº =100 |
| | | /// </summary> |
| | | [Description("åºåº")] |
| | | Outbound = 100, |
| | | |
| | | /// <summary> |
| | | /// çç¹åºåº |
| | | /// </summary> |
| | | [Description("çç¹åºåº")] |
| | | OutInventory = 101, |
| | | |
| | | /// <summary> |
| | | /// 忣åºåº |
| | | /// </summary> |
| | | [Description("忣åºåº")] |
| | | OutPick = 102, |
| | | |
| | | /// <summary> |
| | | /// è´¨æ£åºåº |
| | | /// </summary> |
| | | [Description("è´¨æ£åºåº")] |
| | | OutQuality = 103, |
| | | |
| | | /// <summary> |
| | | /// åºç©º |
| | | /// </summary> |
| | | [Description("åºç©º")] |
| | | PalletOutbound = 104, |
| | | |
| | | /// <summary> |
| | | /// 补空 |
| | | /// </summary> |
| | | [Description("补空")] |
| | | PalletFillOutbound = 105, |
| | | |
| | | /// <summary> |
| | | /// å
¥åº |
| | | /// </summary> |
| | | [Description("å
¥åº")] |
| | | Inbound = 200, |
| | | |
| | | /// <summary> |
| | | /// çç¹å
¥åº |
| | | /// </summary> |
| | | [Description("çç¹å
¥åº")] |
| | | InInventory = 201, |
| | | |
| | | /// <summary> |
| | | /// 忣å
¥åº |
| | | /// </summary> |
| | | [Description("忣å
¥åº")] |
| | | InPick = 202, |
| | | |
| | | /// <summary> |
| | | /// è´¨æ£å
¥åº |
| | | /// </summary> |
| | | [Description("è´¨æ£å
¥åº")] |
| | | InQuality = 203, |
| | | |
| | | /// <summary> |
| | | /// å
¥ç©º |
| | | /// </summary> |
| | | [Description("å
¥ç©º")] |
| | | PalletInbound = 204, |
| | | |
| | | /// <summary> |
| | | /// å空 |
| | | /// </summary> |
| | | [Description("å空")] |
| | | PalletReturnInbound = 205, |
| | | |
| | | /// <summary> |
| | | /// ç§»åº |
| | | /// </summary> |
| | | [Description("ç§»åº")] |
| | | Relocation = 300, |
| | | |
| | | /// <summary> |
| | | /// åºå
ç§»åº |
| | | /// </summary> |
| | | [Description("åºå
ç§»åº")] |
| | | RelocationIn = 301, |
| | | |
| | | /// <summary> |
| | | /// åºå¤ç§»åº |
| | | /// </summary> |
| | | [Description("åºå¤ç§»åº")] |
| | | RelocationOut = 302, |
| | | |
| | | [Description("AGVæ¬è¿")] |
| | | AGVCarry = 500, |
| | | } |
| | | |
| | |
| | | /// <summary> |
| | | /// æ°å»ºå
¥åºä»»å¡ |
| | | /// </summary> |
| | | [Description("æ°å»º")] |
| | | InNew = 200, |
| | | |
| | | /// <summary> |
| | | /// å åæºå
¥åºæ§è¡ä¸ |
| | | /// </summary> |
| | | [Description("å åæºå
¥åºæ§è¡ä¸")] |
| | | SC_InExecuting = 230, |
| | | |
| | | /// <summary> |
| | | /// å åæºå
¥åºå®æ |
| | | /// </summary> |
| | | [Description("å åæºå
¥åºå®æ")] |
| | | SC_InFinish = 235, |
| | | |
| | | /// <summary> |
| | | /// å
¥åºä»»å¡å®æ |
| | | /// </summary> |
| | | [Description("å
¥åºä»»å¡å®æ")] |
| | | InFinish = 290, |
| | | |
| | | /// <summary> |
| | | /// å
¥åºä»»å¡åæ¶ |
| | | /// </summary> |
| | | [Description("å
¥åºä»»å¡åæ¶")] |
| | | InCancel = 298, |
| | | |
| | | /// <summary> |
| | | /// å
¥åºä»»å¡å¼å¸¸ |
| | | /// </summary> |
| | | [Description("å
¥åºä»»å¡å¼å¸¸")] |
| | | InException = 299, |
| | | |
| | | /// <summary> |
| | | /// æ°å»ºç§»åºåºä»»å¡ |
| | | /// </summary> |
| | | [Description("æ°å»ºç§»åºåºä»»å¡")] |
| | | RelocationNew = 300 |
| | | } |
| | | |
| | |
| | | /// <summary> |
| | | /// æ°å»ºä»»å¡ |
| | | /// </summary> |
| | | [Description("æ°å»º")] |
| | | OutNew = 100, |
| | | |
| | | /// <summary> |
| | | /// å åæºåºåºæ§è¡ä¸ |
| | | /// </summary> |
| | | [Description("å åæºåºåºæ§è¡ä¸")] |
| | | SC_OutExecuting = 130, |
| | | |
| | | /// <summary> |
| | | /// å åæºåºåºå®æ |
| | | /// </summary> |
| | | [Description("å åæºåºåºå®æ")] |
| | | SC_OutFinish = 135, |
| | | |
| | | /// <summary> |
| | | /// ç§»åºä»»å¡æ§è¡ä¸ |
| | | /// </summary> |
| | | [Description("ç§»åºä»»å¡æ§è¡ä¸")] |
| | | SC_RelocationExecuting = 140, |
| | | |
| | | /// <summary> |
| | | /// ç§»åºä»»å¡æ§è¡ä¸ |
| | | /// </summary> |
| | | [Description("ç§»åºä»»å¡æ§è¡ä¸")] |
| | | SC_RelocationFinish = 145, |
| | | |
| | | /// <summary> |
| | | /// åºåºä»»å¡å®æ |
| | | /// </summary> |
| | | [Description("åºåºä»»å¡å®æ")] |
| | | OutFinish = 190, |
| | | |
| | | /// <summary> |
| | | /// åºåºä»»å¡åæ¶ |
| | | /// </summary> |
| | | [Description("åºåºä»»å¡åæ¶")] |
| | | OutCancel = 198, |
| | | |
| | | /// <summary> |
| | | /// åºåºä»»å¡å¼å¸¸ |
| | | /// </summary> |
| | | [Description("åºåºä»»å¡å¼å¸¸")] |
| | | OutException = 199 |
| | | } |
| | | |
| | | public enum AGVTaskStatusEnum |
| | | { |
| | | [Description("æ°å»º")] |
| | | AGV_New = 500, |
| | | |
| | | [Description("æ§è¡ä¸")] |
| | | AGV_Executing = 510, |
| | | |
| | | [Description("宿")] |
| | | AGV_Finish = 520 |
| | | } |
| | | } |
| | |
| | | public static T CodeAnalysis<T>(AnalysisCode analysisCode, string code) |
| | | { |
| | | Type type = typeof(T); |
| | | T result = (T)Activator.CreateInstance(type); |
| | | object? obj = Activator.CreateInstance(type); |
| | | if (obj == null) |
| | | throw new Exception("å®ä¾å对象é误"); |
| | | T result = (T)obj; |
| | | try |
| | | { |
| | | AnalysisRuleAttribute? analysisRule = type.GetCustomAttribute<AnalysisRuleAttribute>(); |
| | |
| | | AnalysisItemRuleAttribute? analysisItemRule = propertyInfo.GetCustomAttribute<AnalysisItemRuleAttribute>(); |
| | | if (analysisItemRule != null) |
| | | { |
| | | if(analysisItemRule.AnalysisFormaType == AnalysisFormaType.BD) |
| | | if(analysisItemRule.AnalysisFormaType == AnalysisFormatType.BD) |
| | | { |
| | | propertyInfo.SetValue(result, code.ChangeType(propertyInfo.PropertyType)); |
| | | } |
| | |
| | | [AnalysisRule, ModelValidate] |
| | | public class MatSerialNumberDTO |
| | | { |
| | | [AnalysisItemRule(WIDESEA_Core.Enums.AnalysisFormaType.MTC), PropertyValidate("ç©æç¼å·", NotNullAndEmpty = true)] |
| | | [AnalysisItemRule(WIDESEA_Core.Enums.AnalysisFormatType.MTC), PropertyValidate("ç©æç¼å·", NotNullAndEmpty = true)] |
| | | public string MaterielCode { get; set; } |
| | | |
| | | [AnalysisItemRule(WIDESEA_Core.Enums.AnalysisFormaType.MTPT), PropertyValidate("çäº§æ¥æ", NotNullAndEmpty = true)] |
| | | [AnalysisItemRule(WIDESEA_Core.Enums.AnalysisFormatType.MTPT), PropertyValidate("çäº§æ¥æ", NotNullAndEmpty = true)] |
| | | public string ProductionDate { get; set; } |
| | | |
| | | [AnalysisItemRule(WIDESEA_Core.Enums.AnalysisFormaType.BHN), PropertyValidate("æ¹æ¬¡å·", NotNullAndEmpty = true)] |
| | | [AnalysisItemRule(WIDESEA_Core.Enums.AnalysisFormatType.BHN), PropertyValidate("æ¹æ¬¡å·", NotNullAndEmpty = true)] |
| | | public string BatchNo { get; set; } |
| | | |
| | | [AnalysisItemRule(WIDESEA_Core.Enums.AnalysisFormaType.MTQ), PropertyValidate("æ°é", NotNullAndEmpty = true)] |
| | | [AnalysisItemRule(WIDESEA_Core.Enums.AnalysisFormatType.MTQ), PropertyValidate("æ°é", NotNullAndEmpty = true)] |
| | | public decimal MaterielQuantity { get; set; } |
| | | |
| | | [AnalysisItemRule(WIDESEA_Core.Enums.AnalysisFormaType.ODN), PropertyValidate("订åç¼å·", NotNullAndEmpty = true)] |
| | | [AnalysisItemRule(WIDESEA_Core.Enums.AnalysisFormatType.ODN), PropertyValidate("订åç¼å·", NotNullAndEmpty = true)] |
| | | public string OrderNo { get; set; } |
| | | |
| | | [AnalysisItemRule(WIDESEA_Core.Enums.AnalysisFormaType.BD), PropertyValidate("åºåå·", NotNullAndEmpty = true)] |
| | | [AnalysisItemRule(WIDESEA_Core.Enums.AnalysisFormatType.BD), PropertyValidate("åºåå·", NotNullAndEmpty = true)] |
| | | public string SerialNumber { get; set; } |
| | | } |
| | | } |
| | |
| | | public interface IAreaInfoService : IService<Dt_AreaInfo> |
| | | { |
| | | IAreaInfoRepository Repository { get; } |
| | | |
| | | WebResponseContent AreaEnableStatus(int[] keys); |
| | | |
| | | WebResponseContent AreaDisableStatus(int[] keys); |
| | | |
| | | WebResponseContent AreaEnableStatus(int key); |
| | | |
| | | WebResponseContent AreaDisableStatus(int key); |
| | | } |
| | | } |
| | |
| | | IAreaRouterService AreaRouterService { get; } |
| | | |
| | | ICachePointService CachePointService { get; } |
| | | |
| | | |
| | | WebResponseContent AreaEnableStatus(int[] keys); |
| | | |
| | | WebResponseContent AreaDisableStatus(int[] keys); |
| | | |
| | | WebResponseContent AreaEnableStatus(int key); |
| | | |
| | | WebResponseContent AreaDisableStatus(int key); |
| | | |
| | | |
| | | WebResponseContent CachePointEnableStatus(int[] keys); |
| | | |
| | | WebResponseContent CachePointDisableStatus(int[] keys); |
| | | |
| | | WebResponseContent CachePointEnableStatus(int key); |
| | | |
| | | WebResponseContent CachePointDisableStatus(int key); |
| | | |
| | | |
| | | WebResponseContent LocationEnableStatus(int[] keys); |
| | | |
| | | WebResponseContent LocationDisableStatus(int[] keys); |
| | | |
| | | WebResponseContent LocationEnableStatus(int key); |
| | | |
| | | WebResponseContent LocationDisableStatus(int key); |
| | | |
| | | |
| | | WebResponseContent RoadwayEnableStatus(int[] keys); |
| | | |
| | | WebResponseContent RoadwayDisableStatus(int[] keys); |
| | | |
| | | WebResponseContent RoadwayEnableStatus(int key); |
| | | |
| | | WebResponseContent RoadwayDisableStatus(int key); |
| | | |
| | | |
| | | WebResponseContent WarehouseEnableStatus(int[] keys); |
| | | |
| | | WebResponseContent WarehouseDisableStatus(int[] keys); |
| | | |
| | | WebResponseContent WarehouseEnableStatus(int key); |
| | | |
| | | WebResponseContent WarehouseDisableStatus(int key); |
| | | } |
| | | } |
| | |
| | | |
| | | Dt_CachePoint? GetIbStockCachePoint(int areaId); |
| | | |
| | | |
| | | WebResponseContent CachePointEnableStatus(int[] keys); |
| | | |
| | | WebResponseContent CachePointDisableStatus(int[] keys); |
| | | |
| | | WebResponseContent CachePointEnableStatus(int key); |
| | | |
| | | WebResponseContent CachePointDisableStatus(int key); |
| | | } |
| | | } |
| | |
| | | |
| | | Dt_LocationInfo? AssignLocation(string stationCode, int inboundType); |
| | | |
| | | WebResponseContent LocationEnableStatus(int[] keys); |
| | | |
| | | WebResponseContent LocationDisableStatus(int[] keys); |
| | | |
| | | WebResponseContent LocationEnableStatus(int key); |
| | | |
| | | WebResponseContent LocationDisableStatus(int key); |
| | | } |
| | | } |
| | |
| | | { |
| | | IRoadwayInfoRepository Repository { get; } |
| | | |
| | | |
| | | WebResponseContent RoadwayEnableStatus(int[] keys); |
| | | |
| | | WebResponseContent RoadwayDisableStatus(int[] keys); |
| | | |
| | | WebResponseContent RoadwayEnableStatus(int key); |
| | | |
| | | WebResponseContent RoadwayDisableStatus(int key); |
| | | } |
| | | } |
| | |
| | | { |
| | | IWarehouseRepository Repository { get; } |
| | | |
| | | WebResponseContent WarehouseEnableStatus(int[] keys); |
| | | |
| | | WebResponseContent WarehouseDisableStatus(int[] keys); |
| | | |
| | | WebResponseContent WarehouseEnableStatus(int key); |
| | | |
| | | WebResponseContent WarehouseDisableStatus(int key); |
| | | } |
| | | } |
| | |
| | | |
| | | object GetCurrentMenuActionList(); |
| | | |
| | | object GetMenuActionList(int roleId); |
| | | |
| | | List<MenuDTO> GetUserMenuList(int roleId); |
| | | |
| | | List<ActionDTO> GetActions(int menuId, List<ActionDTO> menuActions, List<Permissions> permissions, int roleId); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_IInboundRepository; |
| | | using WIDESEA_IInboundService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_InboundService |
| | | { |
| | | public partial class InboundOrderDetailService : ServiceBase<Dt_InboundOrderDetail, IInboundOrderDetailRepository>, IInboundOrderDetailService |
| | | { |
| | | public IInboundOrderDetailRepository Repository => BaseDal; |
| | | |
| | | public InboundOrderDetailService(IInboundOrderDetailRepository BaseDal) : base(BaseDal) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using AutoMapper; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Reflection.Metadata; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_Core.Utilities; |
| | | using WIDESEA_DTO; |
| | | using WIDESEA_DTO.Inbound; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_IInboundRepository; |
| | | using WIDESEA_IInboundService; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_ITaskInfoRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_InboundService |
| | | { |
| | | public partial class InboundOrderService : ServiceBase<Dt_InboundOrder, IInboundOrderRepository>, IInboundOrderService |
| | | { |
| | | private readonly IMapper _mapper; |
| | | private readonly IUnitOfWorkManage _unitOfWorkManage; |
| | | private readonly ITaskRepository _taskRepository; |
| | | |
| | | private IBasicService _basicService; |
| | | private IStockService _stockService; |
| | | private IInboundOrderDetailService _inboundOrderDetailService; |
| | | |
| | | public IInboundOrderRepository Repository => BaseDal; |
| | | |
| | | public InboundOrderService(IInboundOrderRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, ITaskRepository taskRepository, IBasicService basicService, IStockService stockService, IInboundOrderDetailService inboundOrderDetailService) : base(BaseDal) |
| | | { |
| | | _mapper = mapper; |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | | _taskRepository = taskRepository; |
| | | _basicService = basicService; |
| | | _stockService = stockService; |
| | | _inboundOrderDetailService = inboundOrderDetailService; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ·»å åæ® |
| | | /// </summary> |
| | | /// <param name="saveModel"></param> |
| | | /// <returns></returns> |
| | | public override WebResponseContent AddData(SaveModel saveModel) |
| | | { |
| | | InboundOrderAddDTO orderAddDTO = saveModel.MainData.DicToModel<InboundOrderAddDTO>(); |
| | | orderAddDTO.Details = saveModel.DetailData.DicToIEnumerable<InboundOrderDetailAddDTO>(); |
| | | return AddInboundOrder(orderAddDTO); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ·»å åæ® |
| | | /// </summary> |
| | | /// <param name="orderAddDTO">åæ®æ·»å DTO</param> |
| | | /// <returns></returns> |
| | | public WebResponseContent AddInboundOrder(InboundOrderAddDTO orderAddDTO) |
| | | { |
| | | WebResponseContent content = new(); |
| | | try |
| | | { |
| | | #region éªè¯æ°æ® |
| | | (bool, string, object?) result = CheckInboundOrderAddData(orderAddDTO); |
| | | if (!result.Item1) return content = WebResponseContent.Instance.Error(result.Item2); |
| | | #endregion |
| | | |
| | | Dt_InboundOrder inboundOrder = _mapper.Map<Dt_InboundOrder>(orderAddDTO); |
| | | inboundOrder.OrderStatus = InboundStatusEnum.æªå¼å§.ObjToInt(); |
| | | bool a = BaseDal.Db.InsertNav(inboundOrder).Include(x => x.Details).ExecuteCommand(); |
| | | content = WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content = WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | finally |
| | | { |
| | | |
| | | } |
| | | return content; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// éªè¯åæ®æ·»å DTO对象 |
| | | /// </summary> |
| | | /// <param name="inboundOrderAddDTO">åæ®æ·»å DTO</param> |
| | | /// <returns></returns> |
| | | private (bool, string, object?) CheckInboundOrderAddData(InboundOrderAddDTO inboundOrderAddDTO) |
| | | { |
| | | (bool, string, object?) result1 = ModelValidate.ValidateModelData(inboundOrderAddDTO); |
| | | if (!result1.Item1) return result1; |
| | | |
| | | (bool, string, object?) result2 = ModelValidate.ValidateModelData(inboundOrderAddDTO.Details); |
| | | if (!result2.Item1) return result2; |
| | | |
| | | IEnumerable<int> inOrderTypes = Enum.GetValues<InOrderTypeEnum>().Cast<int>(); |
| | | if (!inOrderTypes.Contains(inboundOrderAddDTO.OrderType)) |
| | | { |
| | | return (false, "æªæ¾å°è¯¥åæ®ç±»å", inboundOrderAddDTO); |
| | | } |
| | | |
| | | List<string> materielCodes = inboundOrderAddDTO.Details.Select(x => x.MaterielCode).ToList(); |
| | | if (!_basicService.MaterielInfoService.ExsitMateriels(materielCodes)) |
| | | { |
| | | return (false, "æç©æä¿¡æ¯æªå½å
¥ï¼è¯·å½å
¥ç©æä¿¡æ¯", inboundOrderAddDTO); |
| | | } |
| | | |
| | | if (BaseDal.QueryFirst(x => x.UpperOrderNo == inboundOrderAddDTO.UpperOrderNo && !string.IsNullOrEmpty(x.UpperOrderNo)) != null) |
| | | { |
| | | return (false, "忮已åå¨", inboundOrderAddDTO); |
| | | } |
| | | return (true, "æå", inboundOrderAddDTO); |
| | | } |
| | | } |
| | | } |
ÎļþÃû´Ó ´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderDetailService.cs ÐÞ¸Ä |
| | |
| | | |
| | | namespace WIDESEA_InboundService |
| | | { |
| | | public class InboundOrderDetailService : ServiceBase<Dt_InboundOrderDetail, IInboundOrderDetailRepository>, IInboundOrderDetailService |
| | | public partial class InboundOrderDetailService : ServiceBase<Dt_InboundOrderDetail, IInboundOrderDetailRepository>, IInboundOrderDetailService |
| | | { |
| | | public IInboundOrderDetailRepository Repository => BaseDal; |
| | | |
| | | public InboundOrderDetailService(IInboundOrderDetailRepository BaseDal) : base(BaseDal) |
| | | { |
| | | } |
| | | |
| | | public List<Dt_InboundOrderDetail> UpdateReceiptQuantity(List<Dt_InboundOrderDetail> inboundOrderDetails, decimal receiptQuantity) |
| | | { |
| | |
| | | } |
| | | return (updateOrderDetails); |
| | | } |
| | | |
| | | |
| | | |
| | | public void UpdateOverInQuantity(List<Dt_InboundOrderDetail> inboundOrderDetails, decimal overInQuantity) |
| | | { |
ÎļþÃû´Ó ´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs ÐÞ¸Ä |
| | |
| | | |
| | | namespace WIDESEA_InboundService |
| | | { |
| | | public class InboundOrderService : ServiceBase<Dt_InboundOrder, IInboundOrderRepository>, IInboundOrderService |
| | | public partial class InboundOrderService : ServiceBase<Dt_InboundOrder, IInboundOrderRepository>, IInboundOrderService |
| | | { |
| | | private readonly IMapper _mapper; |
| | | private readonly IUnitOfWorkManage _unitOfWorkManage; |
| | | private readonly ITaskRepository _taskRepository; |
| | | |
| | | private IBasicService _basicService; |
| | | private IStockService _stockService; |
| | | private IInboundOrderDetailService _inboundOrderDetailService; |
| | | |
| | | public IInboundOrderRepository Repository => BaseDal; |
| | | |
| | | public InboundOrderService(IInboundOrderRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, ITaskRepository taskRepository, IBasicService basicService, IStockService stockService, IInboundOrderDetailService inboundOrderDetailService) : base(BaseDal) |
| | | { |
| | | _mapper = mapper; |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | | _taskRepository = taskRepository; |
| | | _basicService = basicService; |
| | | _stockService = stockService; |
| | | _inboundOrderDetailService = inboundOrderDetailService; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ·»å åæ® |
| | | /// </summary> |
| | | /// <param name="saveModel"></param> |
| | | /// <returns></returns> |
| | | public override WebResponseContent AddData(SaveModel saveModel) |
| | | { |
| | | InboundOrderAddDTO orderAddDTO = saveModel.MainData.DicToModel<InboundOrderAddDTO>(); |
| | | orderAddDTO.Details = saveModel.DetailData.DicToIEnumerable<InboundOrderDetailAddDTO>(); |
| | | return AddInboundOrder(orderAddDTO); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ·»å åæ® |
| | | /// </summary> |
| | | /// <param name="orderAddDTO">åæ®æ·»å DTO</param> |
| | | /// <returns></returns> |
| | | public WebResponseContent AddInboundOrder(InboundOrderAddDTO orderAddDTO) |
| | | { |
| | | WebResponseContent content = new(); |
| | | try |
| | | { |
| | | #region éªè¯æ°æ® |
| | | (bool, string, object?) result = CheckInboundOrderAddData(orderAddDTO); |
| | | if (!result.Item1) return content = WebResponseContent.Instance.Error(result.Item2); |
| | | #endregion |
| | | |
| | | Dt_InboundOrder inboundOrder = _mapper.Map<Dt_InboundOrder>(orderAddDTO); |
| | | inboundOrder.OrderStatus = InboundStatusEmun.æªå¼å§.ObjToInt(); |
| | | bool a = BaseDal.Db.InsertNav(inboundOrder).Include(x => x.Details).ExecuteCommand(); |
| | | content = WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content = WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | finally |
| | | { |
| | | |
| | | } |
| | | return content; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// éªè¯åæ®æ·»å DTO对象 |
| | | /// </summary> |
| | | /// <param name="inboundOrderAddDTO">åæ®æ·»å DTO</param> |
| | | /// <returns></returns> |
| | | private (bool, string, object?) CheckInboundOrderAddData(InboundOrderAddDTO inboundOrderAddDTO) |
| | | { |
| | | (bool, string, object?) result1 = ModelValidate.ValidateModelData(inboundOrderAddDTO); |
| | | if (!result1.Item1) return result1; |
| | | |
| | | (bool, string, object?) result2 = ModelValidate.ValidateModelData(inboundOrderAddDTO.Details); |
| | | if (!result2.Item1) return result2; |
| | | |
| | | IEnumerable<int> inOrderTypes = Enum.GetValues<InOrderTypeEnum>().Cast<int>(); |
| | | if (!inOrderTypes.Contains(inboundOrderAddDTO.OrderType)) |
| | | { |
| | | return (false, "æªæ¾å°è¯¥åæ®ç±»å", inboundOrderAddDTO); |
| | | } |
| | | |
| | | List<string> materielCodes = inboundOrderAddDTO.Details.Select(x => x.MaterielCode).ToList(); |
| | | if (!_basicService.MaterielInfoService.ExsitMateriels(materielCodes)) |
| | | { |
| | | return (false, "æç©æä¿¡æ¯æªå½å
¥ï¼è¯·å½å
¥ç©æä¿¡æ¯", inboundOrderAddDTO); |
| | | } |
| | | |
| | | if (BaseDal.QueryFirst(x => x.UpperOrderNo == inboundOrderAddDTO.UpperOrderNo && !string.IsNullOrEmpty(x.UpperOrderNo)) != null) |
| | | { |
| | | return (false, "忮已åå¨", inboundOrderAddDTO); |
| | | } |
| | | return (true, "æå", inboundOrderAddDTO); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®å
¥åºåå·è·åå
¥åºå(嫿ç») |
| | |
| | | List<int> updateDetailIds = inboundOrderDetails.Select(x => x.Id).ToList(); |
| | | if (inboundOrderDetails.FirstOrDefault(x => x.OrderDetailStatus != OrderDetailStatusEnum.Over.ObjToInt()) == null && inboundOrder.Details.FirstOrDefault(x => !updateDetailIds.Contains(x.Id) && x.OrderDetailStatus != OrderDetailStatusEnum.Over.ObjToInt()) == null) |
| | | { |
| | | inboundOrder.OrderStatus = InboundStatusEmun.å
¥åºå®æ.ObjToInt(); |
| | | inboundOrder.OrderStatus = InboundStatusEnum.å
¥åºå®æ.ObjToInt(); |
| | | } |
| | | else if (inboundOrder.OrderStatus == InboundStatusEmun.æªå¼å§.ObjToInt()) |
| | | else if (inboundOrder.OrderStatus == InboundStatusEnum.æªå¼å§.ObjToInt()) |
| | | { |
| | | inboundOrder.OrderStatus = InboundStatusEmun.å
¥åºä¸.ObjToInt(); |
| | | inboundOrder.OrderStatus = InboundStatusEnum.å
¥åºä¸.ObjToInt(); |
| | | } |
| | | |
| | | content = MaterielGroupUpdateData(inboundOrder, inboundOrderDetails, stockInfo); |
| | |
| | | return (false, "æ åæ®æç»ä¿¡æ¯", materielGroupDTO); |
| | | } |
| | | |
| | | if (inboundOrder.OrderStatus != InboundStatusEmun.æªå¼å§.ObjToInt() && inboundOrder.OrderStatus != InboundStatusEmun.å
¥åºä¸.ObjToInt()) |
| | | if (inboundOrder.OrderStatus != InboundStatusEnum.æªå¼å§.ObjToInt() && inboundOrder.OrderStatus != InboundStatusEnum.å
¥åºä¸.ObjToInt()) |
| | | { |
| | | return (false, "è¯¥åæ®ä¸å¯åç»ç", materielGroupDTO); |
| | | } |
| | |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.DB.Models; |
| | | using WIDESEA_Core.Enums; |
| | | |
| | | namespace WIDESEA_Model.Models |
| | | { |
| | |
| | | [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "åºååç§°")] |
| | | public string AreaName { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åºåç±»å")] |
| | | [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "åºåç±»å")] |
| | | public int AreaType { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åºåç¶æ")] |
| | | [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "åºåç¶æ")] |
| | | public int AreaStatus { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "åºåæè¿°")] |
| | |
| | | [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "ç¼åç¹ç¼å·")] |
| | | public string PointCode { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ç¼åç¹ç¶æ")] |
| | | [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "ç¼åç¹ç¶æ")] |
| | | public int PointStatus { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ç¼åç¹å¯ç¨ç¶æ")] |
| | | [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "ç¼åç¹å¯ç¨ç¶æ")] |
| | | public int EnableStatus { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "è´§ä½è¡")] |
| | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "è´§ä½ç±»å")] |
| | | public int LocationType { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "è´§ä½ç¶æ")] |
| | | [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "è´§ä½ç¶æ")] |
| | | public int LocationStatus { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ç¦ç¨ç¶æ")] |
| | | [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "ç¦ç¨ç¶æ")] |
| | | public int EnableStatus { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "夿³¨")] |
| | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ä»åºä¸»é®")] |
| | | public int AreaId { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ç¦ç¨ç¶æ")] |
| | | [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "ç¦ç¨ç¶æ")] |
| | | public int EnableStatus { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "设å¤ç¼å·")] |
| | |
| | | [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "ä»åºç±»å")] |
| | | public string WarehouseType { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ä»åºç¶æ")] |
| | | [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "ä»åºç¶æ")] |
| | | public int WarehouseStatus { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "ä»åºæè¿°")] |
| | |
| | | public string Config { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ°æ®åºæå¡ |
| | | /// </summary> |
| | | [ExporterHeader(DisplayName = "æ°æ®åºæå¡")] |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "æ°æ®åºæå¡")] |
| | | public string DBServer { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Sqlè¯å¥ |
| | | /// </summary> |
| | | [ExporterHeader(DisplayName = "Sqlè¯å¥")] |
| | | [SugarColumn(IsNullable = true, Length = 500, ColumnDescription = "Sqlè¯å¥")] |
| | | public string DBSql { get; set; } |
| | | public string Sql { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åå
¸åç§° |
| | |
| | | [ExporterHeader(DisplayName = "夿³¨")] |
| | | [SugarColumn(IsNullable = true, Length = 2000, ColumnDescription = "夿³¨")] |
| | | public string Remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç³»ç»ç±»å |
| | | /// </summary> |
| | | [ExporterHeader(DisplayName = "ç³»ç»ç±»å")] |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ç³»ç»ç±»å")] |
| | | public int SystemType { get; set; } |
| | | |
| | | [ExporterHeader(IsIgnore = true)] |
| | | [Navigate(NavigateType.OneToMany, nameof(DicId),nameof(DicId)), SugarColumn(IsIgnore = true, IsNullable = true)] |
ÎļþÃû´Ó ´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs ÐÞ¸Ä |
| | |
| | | |
| | | namespace WIDESEA_IOutboundService |
| | | { |
| | | public class OutStockLockInfoService : ServiceBase<Dt_OutStockLockInfo, IOutStockLockInfoRepository>, IOutStockLockInfoService |
| | | public partial class OutStockLockInfoService : ServiceBase<Dt_OutStockLockInfo, IOutStockLockInfoRepository>, IOutStockLockInfoService |
| | | { |
| | | public IOutStockLockInfoRepository Repository => BaseDal; |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Reflection; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_DTO.Stock; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_IOutboundRepository; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_IRecordService; |
| | | using WIDESEA_IStockRepository; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_StockRepository; |
| | | |
| | | namespace WIDESEA_OutboundService |
| | | { |
| | | public partial class OutboundOrderDetailService : ServiceBase<Dt_OutboundOrderDetail, IOutboundOrderDetailRepository>, IOutboundOrderDetailService |
| | | { |
| | | private readonly IUnitOfWorkManage _unitOfWorkManage; |
| | | |
| | | private readonly IStockService _stockService; |
| | | private readonly IBasicService _basicService; |
| | | private readonly IRecordService _recordService; |
| | | private readonly IOutboundRepository _outboundRepository; |
| | | private readonly IOutStockLockInfoService _outStockLockInfoService; |
| | | |
| | | public IOutboundOrderDetailRepository Repository => BaseDal; |
| | | |
| | | public OutboundOrderDetailService(IOutboundOrderDetailRepository BaseDal, IUnitOfWorkManage unitOfWorkManage, IStockService stockService, IBasicService basicService, IRecordService recordService, IOutboundRepository outboundRepository, IOutStockLockInfoService outStockLockInfoService) : base(BaseDal) |
| | | { |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | | _stockService = stockService; |
| | | _basicService = basicService; |
| | | _recordService = recordService; |
| | | _outboundRepository = outboundRepository; |
| | | _outStockLockInfoService = outStockLockInfoService; |
| | | } |
| | | } |
| | | } |
ÎļþÃû´Ó ´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs ÐÞ¸Ä |
| | |
| | | |
| | | namespace WIDESEA_OutboundService |
| | | { |
| | | public class OutboundOrderService : ServiceBase<Dt_OutboundOrder, IOutboundOrderRepository>, IOutboundOrderService |
| | | public partial class OutboundOrderService : ServiceBase<Dt_OutboundOrder, IOutboundOrderRepository>, IOutboundOrderService |
| | | { |
| | | private readonly IMapper _mapper; |
| | | private readonly IMaterielInfoService _materielInfoService; |
| | |
| | | #endregion |
| | | |
| | | Dt_OutboundOrder outboundOrder = _mapper.Map<Dt_OutboundOrder>(orderAddDTO); |
| | | outboundOrder.OrderStatus = InboundStatusEmun.æªå¼å§.ObjToInt(); |
| | | outboundOrder.OrderStatus = InboundStatusEnum.æªå¼å§.ObjToInt(); |
| | | bool a = BaseDal.Db.InsertNav(outboundOrder).Include(x => x.Details).ExecuteCommand(); |
| | | content = WebResponseContent.Instance.OK(); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_IOutboundRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IOutboundService |
| | | { |
| | | public partial class OutStockLockInfoService : ServiceBase<Dt_OutStockLockInfo, IOutStockLockInfoRepository>, IOutStockLockInfoService |
| | | { |
| | | |
| | | } |
| | | } |
ÎļþÃû´Ó ´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderDetailService.cs ÐÞ¸Ä |
| | |
| | | |
| | | namespace WIDESEA_OutboundService |
| | | { |
| | | public class OutboundOrderDetailService : ServiceBase<Dt_OutboundOrderDetail, IOutboundOrderDetailRepository>, IOutboundOrderDetailService |
| | | public partial class OutboundOrderDetailService : ServiceBase<Dt_OutboundOrderDetail, IOutboundOrderDetailRepository>, IOutboundOrderDetailService |
| | | { |
| | | private readonly IUnitOfWorkManage _unitOfWorkManage; |
| | | |
| | | private readonly IStockService _stockService; |
| | | private readonly IBasicService _basicService; |
| | | private readonly IRecordService _recordService; |
| | | private readonly IOutboundRepository _outboundRepository; |
| | | private readonly IOutStockLockInfoService _outStockLockInfoService; |
| | | |
| | | public IOutboundOrderDetailRepository Repository => BaseDal; |
| | | |
| | | public OutboundOrderDetailService(IOutboundOrderDetailRepository BaseDal, IUnitOfWorkManage unitOfWorkManage, IStockService stockService, IBasicService basicService, IRecordService recordService, IOutboundRepository outboundRepository, IOutStockLockInfoService outStockLockInfoService) : base(BaseDal) |
| | | { |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | | _stockService = stockService; |
| | | _basicService = basicService; |
| | | _recordService = recordService; |
| | | _outboundRepository = outboundRepository; |
| | | _outStockLockInfoService = outStockLockInfoService; |
| | | } |
| | | // |
| | | public WebResponseContent LockOutboundStock(int orderDetailId) |
| | | { |
| | | Dt_OutboundOrderDetail outboundOrderDetail = BaseDal.QueryFirst(x => x.Id == orderDetailId); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using AutoMapper; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Serialization; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_Core.Utilities; |
| | | using WIDESEA_DTO.Inbound; |
| | | using WIDESEA_DTO.Outbound; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_IOutboundRepository; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_OutboundService |
| | | { |
| | | public partial class OutboundOrderService : ServiceBase<Dt_OutboundOrder, IOutboundOrderRepository>, IOutboundOrderService |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.DB; |
| | | using WIDESEA_Core.Seed; |
| | | using WIDESEA_IRecordRepository; |
| | | using WIDESEA_IRecordService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_RecordService |
| | | { |
| | | public partial class LocationStatusChangeRecordSetvice : ServiceBase<Dt_LocationStatusChangeRecord, ILocationStatusChangeRecordRepository>, ILocationStatusChangeRecordSetvice |
| | | { |
| | | public LocationStatusChangeRecordSetvice(ILocationStatusChangeRecordRepository BaseDal) : base(BaseDal) |
| | | { |
| | | } |
| | | |
| | | public ILocationStatusChangeRecordRepository Repository => BaseDal; |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using AutoMapper; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_IRecordRepository; |
| | | using WIDESEA_IRecordService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_RecordService |
| | | { |
| | | public partial class StockQuantityChangeRecordService : ServiceBase<Dt_StockQuantityChangeRecord, IStockQuantityChangeRecordRepository>, IStockQuantityChangeRecordService |
| | | { |
| | | private readonly IMapper _mapper; |
| | | public StockQuantityChangeRecordService(IStockQuantityChangeRecordRepository BaseDal, IMapper mapper) : base(BaseDal) |
| | | { |
| | | _mapper = mapper; |
| | | } |
| | | |
| | | public IStockQuantityChangeRecordRepository Repository => BaseDal; |
| | | |
| | | } |
| | | } |
ÎļþÃû´Ó ´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/LocationStatusChangeRecordSetvice.cs ÐÞ¸Ä |
| | |
| | | |
| | | namespace WIDESEA_RecordService |
| | | { |
| | | public class LocationStatusChangeRecordSetvice : ServiceBase<Dt_LocationStatusChangeRecord, ILocationStatusChangeRecordRepository>, ILocationStatusChangeRecordSetvice |
| | | public partial class LocationStatusChangeRecordSetvice : ServiceBase<Dt_LocationStatusChangeRecord, ILocationStatusChangeRecordRepository>, ILocationStatusChangeRecordSetvice |
| | | { |
| | | public LocationStatusChangeRecordSetvice(ILocationStatusChangeRecordRepository BaseDal) : base(BaseDal) |
| | | { |
| | | } |
| | | |
| | | public ILocationStatusChangeRecordRepository Repository => BaseDal; |
| | | |
| | | public void AddLocationStatusChangeRecord(Dt_LocationInfo locationInfo, int lastStatus, int changeType, string? orderNo, int? taskNum) |
| | | { |
| | | Dt_LocationStatusChangeRecord locationStatusChangeRecord = new Dt_LocationStatusChangeRecord() |
ÎļþÃû´Ó ´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/StockQuantityChangeRecordService.cs ÐÞ¸Ä |
| | |
| | | |
| | | namespace WIDESEA_RecordService |
| | | { |
| | | public class StockQuantityChangeRecordService : ServiceBase<Dt_StockQuantityChangeRecord, IStockQuantityChangeRecordRepository>, IStockQuantityChangeRecordService |
| | | public partial class StockQuantityChangeRecordService : ServiceBase<Dt_StockQuantityChangeRecord, IStockQuantityChangeRecordRepository>, IStockQuantityChangeRecordService |
| | | { |
| | | private readonly IMapper _mapper; |
| | | public StockQuantityChangeRecordService(IStockQuantityChangeRecordRepository BaseDal, IMapper mapper) : base(BaseDal) |
| | | { |
| | | _mapper = mapper; |
| | | } |
| | | |
| | | public IStockQuantityChangeRecordRepository Repository => BaseDal; |
| | | |
| | | public void AddStockChangeRecord(Dt_StockInfo stockInfo, List<Dt_StockInfoDetail> stockInfoDetails, decimal beforeQuantity, decimal totalQuantity, StockChangeType changeType) |
| | | { |
| | | List<Dt_StockQuantityChangeRecord> stockQuantityChangeRecords = new List<Dt_StockQuantityChangeRecord>(); |
| | |
| | | { |
| | | //ISugarQueryable<string> locationCodes = Db.Queryable<Dt_LocationInfo>().Where(x => x.RoadwayNo == roadwayNo && x.LocationStatus == LocationStatusEnum.Pallet.ObjToInt() && (x.EnalbeStatus == LocationEnalbeStatusEnum.OnlyOut.ObjToInt() || LocationEnalbeStatusEnum.Normal.ObjToInt() == x.EnalbeStatus)).Select(x => x.LocationCode); |
| | | |
| | | return Db.Queryable<Dt_StockInfo>().Where(x => x.StockStatus == StockStatusEmun.å·²å
¥åº.ObjToInt() && SqlFunc.Subqueryable<Dt_LocationInfo>().Where(v => v.LocationCode == x.LocationCode && v.RoadwayNo == roadwayNo && v.LocationStatus == LocationStatusEnum.Pallet.ObjToInt() && (v.EnableStatus == LocationEnalbeStatusEnum.OnlyOut.ObjToInt() || LocationEnalbeStatusEnum.Normal.ObjToInt() == v.EnableStatus)).Any()).OrderBy(x => x.ModifyDate).First(); |
| | | return Db.Queryable<Dt_StockInfo>().Where(x => x.StockStatus == StockStatusEmun.å·²å
¥åº.ObjToInt() && SqlFunc.Subqueryable<Dt_LocationInfo>().Where(v => v.LocationCode == x.LocationCode && v.RoadwayNo == roadwayNo && v.LocationStatus == LocationStatusEnum.Pallet.ObjToInt() && (v.EnableStatus == EnableStatusEnum.OnlyOut.ObjToInt() || EnableStatusEnum.Normal.ObjToInt() == v.EnableStatus)).Any()).OrderBy(x => x.ModifyDate).First(); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_IStockRepository; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_StockService |
| | | { |
| | | public partial class StockInfoDetailService : ServiceBase<Dt_StockInfoDetail, IStockInfoDetailRepository>, IStockInfoDetailService |
| | | { |
| | | public StockInfoDetailService(IStockInfoDetailRepository BaseDal) : base(BaseDal) |
| | | { |
| | | } |
| | | |
| | | public IStockInfoDetailRepository Repository => BaseDal; |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using AutoMapper; |
| | | using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_DTO.Stock; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IRecordRepository; |
| | | using WIDESEA_IRecordService; |
| | | using WIDESEA_IStockRepository; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_StockService |
| | | { |
| | | public partial class StockInfoService : ServiceBase<Dt_StockInfo, IStockInfoRepository>, IStockInfoService |
| | | { |
| | | private readonly IMapper _mapper; |
| | | |
| | | private readonly IBasicRepository _basicRepository; |
| | | private readonly IStockRepository _stockRepository; |
| | | private readonly IRecordService _recordService; |
| | | |
| | | public IStockInfoRepository Repository => BaseDal; |
| | | |
| | | public StockInfoService(IStockInfoRepository BaseDal, IMapper mapper, IBasicRepository basicRepository, IStockRepository stockRepository,IRecordService recordService) : base(BaseDal) |
| | | { |
| | | _mapper = mapper; |
| | | _basicRepository = basicRepository; |
| | | _stockRepository = stockRepository; |
| | | _recordService = recordService; |
| | | } |
| | | |
| | | } |
| | | } |
ÎļþÃû´Ó ´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs ÐÞ¸Ä |
| | |
| | | |
| | | namespace WIDESEA_StockService |
| | | { |
| | | public class StockViewService : IStockViewService |
| | | public partial class StockViewService : IStockViewService |
| | | { |
| | | private readonly IUnitOfWorkManage _unitOfWorkManage; |
| | | private readonly SqlSugarClient _dbBase; |
ÎļþÃû´Ó ´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoDetailService.cs ÐÞ¸Ä |
| | |
| | | |
| | | namespace WIDESEA_StockService |
| | | { |
| | | public class StockInfoDetailService : ServiceBase<Dt_StockInfoDetail, IStockInfoDetailRepository>, IStockInfoDetailService |
| | | public partial class StockInfoDetailService : ServiceBase<Dt_StockInfoDetail, IStockInfoDetailRepository>, IStockInfoDetailService |
| | | { |
| | | public StockInfoDetailService(IStockInfoDetailRepository BaseDal) : base(BaseDal) |
| | | { |
| | | } |
| | | |
| | | public IStockInfoDetailRepository Repository => BaseDal; |
| | | |
| | | public bool ExistSerialNumber(string SerialNumber) |
| | | { |
| | | return BaseDal.QueryFirst(x => x.SerialNumber == SerialNumber) != null; |
ÎļþÃû´Ó ´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs ÐÞ¸Ä |
| | |
| | | |
| | | namespace WIDESEA_StockService |
| | | { |
| | | public class StockInfoService : ServiceBase<Dt_StockInfo, IStockInfoRepository>, IStockInfoService |
| | | public partial class StockInfoService : ServiceBase<Dt_StockInfo, IStockInfoRepository>, IStockInfoService |
| | | { |
| | | private readonly IMapper _mapper; |
| | | |
| | | private readonly IBasicRepository _basicRepository; |
| | | private readonly IStockRepository _stockRepository; |
| | | private readonly IRecordService _recordService; |
| | | |
| | | public IStockInfoRepository Repository => BaseDal; |
| | | |
| | | public StockInfoService(IStockInfoRepository BaseDal, IMapper mapper, IBasicRepository basicRepository, IStockRepository stockRepository,IRecordService recordService) : base(BaseDal) |
| | | { |
| | | _mapper = mapper; |
| | | _basicRepository = basicRepository; |
| | | _stockRepository = stockRepository; |
| | | _recordService = recordService; |
| | | } |
| | | |
| | | public Dt_StockInfo? GetStockByPalletCode(string palletCode) |
| | | { |
| | | Dt_StockInfo stockInfo = BaseDal.QueryFirst(x => x.PalletCode == palletCode); |
¶Ô±ÈÐÂÎļþ |
| | |
| | |  |
| | | using Microsoft.AspNetCore.Http; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Drawing.Printing; |
| | | using System.Dynamic; |
| | | using System.Linq; |
| | | using System.Reflection; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_Core.Utilities; |
| | | using WIDESEA_DTO.Stock; |
| | | using WIDESEA_IStockRepository; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_StockService |
| | | { |
| | | public partial class StockViewService : IStockViewService |
| | | { |
| | | } |
| | | } |
| | |
| | | { |
| | | public class Sys_DictionaryRepository : RepositoryBase<Sys_Dictionary>, ISys_DictionaryRepository |
| | | { |
| | | |
| | | |
| | | public Sys_DictionaryRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <returns></returns> |
| | | public IEnumerable<Sys_Dictionary> GetDictionaries(IEnumerable<string> dicNos, bool executeSql = true) |
| | | { |
| | | List<Sys_Dictionary> Dictionaries = GetAllDictionary(); |
| | | List<Sys_Dictionary> Dictionaries = GetDictionaries(dicNos.ToList()); |
| | | |
| | | foreach (var item in Dictionaries.Where(x => dicNos.Contains(x.DicNo))) |
| | | foreach (var item in Dictionaries) |
| | | { |
| | | if (executeSql) |
| | | { |
| | | // 2020.05.01å¢å æ ¹æ®ç¨æ·ä¿¡æ¯å è½½åå
¸æ°æ®æºsql |
| | | string sql = item.DBSql; |
| | | string sql = item.Sql; |
| | | if (!string.IsNullOrEmpty(sql)) |
| | | { |
| | | item.DicList = Query(sql); |
| | |
| | | { |
| | | return base.QueryDynamicDataBySql(sql, null).Select(s => new Sys_DictionaryList() |
| | | { |
| | | DicName = s.Value, |
| | | DicValue = s.Key.ToString() |
| | | DicName = s.value, |
| | | DicValue = s.key.ToString() |
| | | }).ToList(); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | } |
| | | } |
| | | |
| | | private List<Sys_Dictionary> GetDictionaries(List<string> dicNos) |
| | | { |
| | | //base.QueryData().ToList(); |
| | | List<Sys_Dictionary> _dictionaries = Db.Queryable<Sys_Dictionary>().Where(x => x.Enable == 1 && dicNos.Contains(x.DicNo)).Includes(x => x.DicList).ToList(); |
| | | return _dictionaries; |
| | | } |
| | | |
| | | private List<Sys_Dictionary> GetAllDictionary() |
| | | { |
| | | //base.QueryData().ToList(); |
| | |
| | | using Newtonsoft.Json; |
| | | using OfficeOpenXml.FormulaParsing.Excel.Functions.Information; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | |
| | | using System.Reflection; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.Caches; |
| | | using WIDESEA_Core.DB; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_Core.Helper; |
| | |
| | | public class Sys_DictionaryService : ServiceBase<Sys_Dictionary, ISys_DictionaryRepository>, ISys_DictionaryService |
| | | { |
| | | private readonly IUnitOfWorkManage _unitOfWorkManage; |
| | | public Sys_DictionaryService(ISys_DictionaryRepository BaseDal, IUnitOfWorkManage unitOfWorkManage) : base(BaseDal) |
| | | private readonly ICacheService _cacheService; |
| | | |
| | | public Sys_DictionaryService(ISys_DictionaryRepository BaseDal, IUnitOfWorkManage unitOfWorkManage, ICacheService cacheService) : base(BaseDal) |
| | | { |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | | _cacheService = cacheService; |
| | | } |
| | | |
| | | public ISys_DictionaryRepository Repository => BaseDal; |
| | | |
| | | public override WebResponseContent AddData(SaveModel saveModel) |
| | | { |
| | | Sys_Dictionary dictionary = saveModel.MainData.DicToModel<Sys_Dictionary>(); |
| | | _cacheService.Remove(dictionary.DicNo); |
| | | return base.AddData(saveModel); |
| | | } |
| | | |
| | | public override WebResponseContent UpdateData(SaveModel saveModel) |
| | | { |
| | | Sys_Dictionary dictionary = saveModel.MainData.DicToModel<Sys_Dictionary>(); |
| | | _cacheService.Remove(dictionary.DicNo); |
| | | return base.UpdateData(saveModel); |
| | | } |
| | | |
| | | public List<VueDictionaryDTO> GetVueDictionary(string[] dicNos) |
| | | { |
| | | if (dicNos == null || dicNos.Count() == 0) return new List<VueDictionaryDTO>(); |
| | | List<VueDictionaryDTO> vueDictionaryDTOs = new List<VueDictionaryDTO>(); |
| | | |
| | | var dicConfig = BaseDal.GetDictionaries(dicNos, false).Select(s => new |
| | | List<string> cacheDicNos = new List<string>(); |
| | | foreach (string n in dicNos) |
| | | { |
| | | dicNo = s.DicNo, |
| | | config = s.Config, |
| | | dbSql = s.DBSql, |
| | | list = s.DicList.OrderByDescending(o => o.OrderNo).Select(list => new { key = list.DicValue, value = list.DicName }) |
| | | }).ToList(); |
| | | |
| | | object GetSourceData(string dicNo, string dbSql, object data) |
| | | { |
| | | if (string.IsNullOrEmpty(dbSql)) |
| | | string str = _cacheService.Get(n); |
| | | if (!string.IsNullOrEmpty(str)) |
| | | { |
| | | return data; |
| | | VueDictionaryDTO? vueDictionary = JsonConvert.DeserializeObject<VueDictionaryDTO>(str); |
| | | |
| | | if (vueDictionary != null) |
| | | { |
| | | vueDictionaryDTOs.Add(vueDictionary); |
| | | cacheDicNos.Add(n); |
| | | } |
| | | } |
| | | return BaseDal.QueryObjectDataBySql(dbSql, null); |
| | | } |
| | | List<VueDictionaryDTO> vueDictionaryDTOs = dicConfig.Select(item => new VueDictionaryDTO |
| | | if (dicNos.Where(x => !cacheDicNos.Contains(x)).Count() > 0) |
| | | { |
| | | DicNo = item.dicNo, |
| | | Config = item.config, |
| | | Data = GetSourceData(item.dicNo, item.dbSql, item.list) |
| | | }).ToList(); |
| | | List<VueDictionaryDTO> selectDics = BaseDal.GetDictionaries(dicNos.Where(x => !cacheDicNos.Contains(x))).Select(s => new VueDictionaryDTO |
| | | { |
| | | DicNo = s.DicNo, |
| | | Config = s.Config, |
| | | //dbSql = s.Sql, |
| | | Data = s.DicList.OrderByDescending(o => o.OrderNo).Select(list => new { key = list.DicValue, value = list.DicName }) |
| | | }).ToList(); |
| | | |
| | | foreach (var item in selectDics) |
| | | { |
| | | if (!_cacheService.Exists(item.DicNo)) |
| | | { |
| | | _cacheService.Add(item.DicNo, item.Serialize()); |
| | | } |
| | | } |
| | | vueDictionaryDTOs.AddRange(selectDics); |
| | | } |
| | | |
| | | //object GetSourceData(string dicNo, string dbSql, object data) |
| | | //{ |
| | | // if (string.IsNullOrEmpty(dbSql)) |
| | | // { |
| | | // return data; |
| | | // } |
| | | // return BaseDal.QueryObjectDataBySql(dbSql, null); |
| | | //} |
| | | //List<VueDictionaryDTO> vueDictionaryDTOs = dicConfig.Select(item => new VueDictionaryDTO |
| | | //{ |
| | | // DicNo = item.dicNo, |
| | | // Config = item.config, |
| | | // Data = GetSourceData(item.dicNo, item.dbSql, item.list) |
| | | //}).ToList(); |
| | | |
| | | try |
| | | { |
| | | List<string> dicList = dicNos.ToList(); |
| | | |
| | | string str = AppSettings.Configuration["dics"]; |
| | | if (!string.IsNullOrEmpty(str)) |
| | | if (dicNos.Where(x => !cacheDicNos.Contains(x)).Count() > 0) |
| | | { |
| | | List<string> cusDics = new List<string>(); |
| | | |
| | | List<string> dics = str.Split(",").ToList(); |
| | | |
| | | foreach (var item in dics) |
| | | string str = AppSettings.Configuration["dics"]; |
| | | if (!string.IsNullOrEmpty(str)) |
| | | { |
| | | dicList.Remove(item); |
| | | cusDics.Add(item); |
| | | } |
| | | List<string> cusDics = new List<string>(); |
| | | |
| | | foreach (var item in cusDics) |
| | | { |
| | | VueDictionaryDTO vueDictionaryDTO = GetVueDictionary(item.Trim()); |
| | | if (vueDictionaryDTO != null) |
| | | List<string> dics = str.Split(",").ToList(); |
| | | |
| | | foreach (var item in dics) |
| | | { |
| | | vueDictionaryDTOs.Add(vueDictionaryDTO); |
| | | dicList.Remove(item); |
| | | cusDics.Add(item); |
| | | } |
| | | |
| | | foreach (var item in cusDics) |
| | | { |
| | | VueDictionaryDTO vueDictionaryDTO = GetVueDictionary(item.Trim()); |
| | | if (vueDictionaryDTO != null) |
| | | { |
| | | vueDictionaryDTOs.Add(vueDictionaryDTO); |
| | | if (!_cacheService.Exists(item)) |
| | | { |
| | | _cacheService.Add(item, vueDictionaryDTO.Serialize()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | case "inboundState": |
| | | { |
| | | List<object> data = new List<object>(); |
| | | Type type = typeof(InboundStatusEmun); |
| | | List<int> enums = Enum.GetValues(typeof(InboundStatusEmun)).Cast<int>().ToList(); |
| | | Type type = typeof(InboundStatusEnum); |
| | | List<int> enums = Enum.GetValues(typeof(InboundStatusEnum)).Cast<int>().ToList(); |
| | | int index = 0; |
| | | foreach (var item in enums) |
| | | { |
| | | FieldInfo? fieldInfo = typeof(InboundStatusEmun).GetField(((InboundStatusEmun)item).ToString()); |
| | | FieldInfo? fieldInfo = typeof(InboundStatusEnum).GetField(((InboundStatusEnum)item).ToString()); |
| | | DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>(); |
| | | if (description != null) |
| | | { |
| | | data.Add(new { key = item.ToString(), value = description.Description }); |
| | | } |
| | | else |
| | | { |
| | | data.Add(new { key = item.ToString(), value = item.ToString() }); |
| | | } |
| | | index++; |
| | | } |
| | | |
| | | result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; |
| | | } |
| | | break; |
| | | case "outboundStatusEnum": |
| | | { |
| | | List<object> data = new List<object>(); |
| | | Type type = typeof(OutboundStatusEnum); |
| | | List<int> enums = Enum.GetValues(typeof(OutboundStatusEnum)).Cast<int>().ToList(); |
| | | int index = 0; |
| | | foreach (var item in enums) |
| | | { |
| | | FieldInfo? fieldInfo = typeof(OutboundStatusEnum).GetField(((OutboundStatusEnum)item).ToString()); |
| | | DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>(); |
| | | if (description != null) |
| | | { |
| | |
| | | result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; |
| | | } |
| | | break; |
| | | case "orderDetailStatusEnum": |
| | | { |
| | | List<object> data = new List<object>(); |
| | | |
| | | { |
| | | Type type = typeof(OrderDetailStatusEnum); |
| | | List<int> enums = Enum.GetValues(typeof(OrderDetailStatusEnum)).Cast<int>().ToList(); |
| | | int index = 0; |
| | | foreach (var item in enums) |
| | | { |
| | | FieldInfo? fieldInfo = typeof(OrderDetailStatusEnum).GetField(((OrderDetailStatusEnum)item).ToString()); |
| | | DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>(); |
| | | if (description != null) |
| | | { |
| | | data.Add(new { key = item.ToString(), value = description.Description }); |
| | | } |
| | | else |
| | | { |
| | | data.Add(new { key = item.ToString(), value = item.ToString() }); |
| | | } |
| | | index++; |
| | | } |
| | | } |
| | | |
| | | result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; |
| | | } |
| | | break; |
| | | case "createType": |
| | | { |
| | | List<object> data = new List<object>(); |
| | |
| | | result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; |
| | | } |
| | | break; |
| | | case "enableEnum": |
| | | { |
| | | List<object> data = new List<object>(); |
| | | |
| | | { |
| | | Type type = typeof(EnableEnum); |
| | | List<int> enums = Enum.GetValues(typeof(EnableEnum)).Cast<int>().ToList(); |
| | | int index = 0; |
| | | foreach (var item in enums) |
| | | { |
| | | FieldInfo? fieldInfo = typeof(EnableEnum).GetField(((EnableEnum)item).ToString()); |
| | | DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>(); |
| | | if (description != null) |
| | | { |
| | | data.Add(new { key = item.ToString(), value = description.Description }); |
| | | } |
| | | else |
| | | { |
| | | data.Add(new { key = item.ToString(), value = item.ToString() }); |
| | | } |
| | | index++; |
| | | } |
| | | } |
| | | |
| | | result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; |
| | | } |
| | | break; |
| | | case "enableStatusEnum": |
| | | { |
| | | List<object> data = new List<object>(); |
| | | |
| | | { |
| | | Type type = typeof(EnableStatusEnum); |
| | | List<int> enums = Enum.GetValues(typeof(EnableStatusEnum)).Cast<int>().ToList(); |
| | | int index = 0; |
| | | foreach (var item in enums) |
| | | { |
| | | FieldInfo? fieldInfo = typeof(EnableStatusEnum).GetField(((EnableStatusEnum)item).ToString()); |
| | | DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>(); |
| | | if (description != null) |
| | | { |
| | | data.Add(new { key = item.ToString(), value = description.Description }); |
| | | } |
| | | else |
| | | { |
| | | data.Add(new { key = item.ToString(), value = item.ToString() }); |
| | | } |
| | | index++; |
| | | } |
| | | } |
| | | |
| | | result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; |
| | | } |
| | | break; |
| | | case "locationStatusEnum": |
| | | { |
| | | List<object> data = new List<object>(); |
| | | |
| | | { |
| | | Type type = typeof(LocationStatusEnum); |
| | | List<int> enums = Enum.GetValues(typeof(LocationStatusEnum)).Cast<int>().ToList(); |
| | | int index = 0; |
| | | foreach (var item in enums) |
| | | { |
| | | FieldInfo? fieldInfo = typeof(LocationStatusEnum).GetField(((LocationStatusEnum)item).ToString()); |
| | | DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>(); |
| | | if (description != null) |
| | | { |
| | | data.Add(new { key = item.ToString(), value = description.Description }); |
| | | } |
| | | else |
| | | { |
| | | data.Add(new { key = item.ToString(), value = item.ToString() }); |
| | | } |
| | | index++; |
| | | } |
| | | } |
| | | |
| | | result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; |
| | | } |
| | | break; |
| | | case "locationTypeEnum": |
| | | { |
| | | List<object> data = new List<object>(); |
| | | |
| | | { |
| | | Type type = typeof(LocationTypeEnum); |
| | | List<int> enums = Enum.GetValues(typeof(LocationTypeEnum)).Cast<int>().ToList(); |
| | | int index = 0; |
| | | foreach (var item in enums) |
| | | { |
| | | FieldInfo? fieldInfo = typeof(LocationTypeEnum).GetField(((LocationTypeEnum)item).ToString()); |
| | | DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>(); |
| | | if (description != null) |
| | | { |
| | | data.Add(new { key = item.ToString(), value = description.Description }); |
| | | } |
| | | else |
| | | { |
| | | data.Add(new { key = item.ToString(), value = item.ToString() }); |
| | | } |
| | | index++; |
| | | } |
| | | } |
| | | |
| | | result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; |
| | | } |
| | | break; |
| | | case "taskTypeEnum": |
| | | { |
| | | List<object> data = new List<object>(); |
| | | |
| | | { |
| | | Type type = typeof(TaskTypeEnum); |
| | | List<int> enums = Enum.GetValues(typeof(TaskTypeEnum)).Cast<int>().ToList(); |
| | | int index = 0; |
| | | foreach (var item in enums) |
| | | { |
| | | FieldInfo? fieldInfo = typeof(TaskTypeEnum).GetField(((TaskTypeEnum)item).ToString()); |
| | | DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>(); |
| | | if (description != null) |
| | | { |
| | | data.Add(new { key = item.ToString(), value = description.Description }); |
| | | } |
| | | else |
| | | { |
| | | data.Add(new { key = item.ToString(), value = item.ToString() }); |
| | | } |
| | | index++; |
| | | } |
| | | } |
| | | |
| | | result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; |
| | | } |
| | | break; |
| | | case "taskStatusEnum": |
| | | { |
| | | List<object> data = new List<object>(); |
| | | |
| | | { |
| | | Type type = typeof(InTaskStatusEnum); |
| | | List<int> enums = Enum.GetValues(typeof(InTaskStatusEnum)).Cast<int>().ToList(); |
| | | int index = 0; |
| | | foreach (var item in enums) |
| | | { |
| | | FieldInfo? fieldInfo = typeof(InTaskStatusEnum).GetField(((InTaskStatusEnum)item).ToString()); |
| | | DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>(); |
| | | if (description != null) |
| | | { |
| | | data.Add(new { key = item.ToString(), value = description.Description }); |
| | | } |
| | | else |
| | | { |
| | | data.Add(new { key = item.ToString(), value = item.ToString() }); |
| | | } |
| | | index++; |
| | | } |
| | | } |
| | | |
| | | { |
| | | Type type = typeof(OutTaskStatusEnum); |
| | | List<int> enums = Enum.GetValues(typeof(OutTaskStatusEnum)).Cast<int>().ToList(); |
| | | int index = 0; |
| | | foreach (var item in enums) |
| | | { |
| | | FieldInfo? fieldInfo = typeof(OutTaskStatusEnum).GetField(((OutTaskStatusEnum)item).ToString()); |
| | | DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>(); |
| | | if (description != null) |
| | | { |
| | | data.Add(new { key = item.ToString(), value = description.Description }); |
| | | } |
| | | else |
| | | { |
| | | data.Add(new { key = item.ToString(), value = item.ToString() }); |
| | | } |
| | | index++; |
| | | } |
| | | } |
| | | |
| | | { |
| | | Type type = typeof(AGVTaskStatusEnum); |
| | | List<int> enums = Enum.GetValues(typeof(AGVTaskStatusEnum)).Cast<int>().ToList(); |
| | | int index = 0; |
| | | foreach (var item in enums) |
| | | { |
| | | FieldInfo? fieldInfo = typeof(AGVTaskStatusEnum).GetField(((AGVTaskStatusEnum)item).ToString()); |
| | | DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>(); |
| | | if (description != null) |
| | | { |
| | | data.Add(new { key = item.ToString(), value = description.Description }); |
| | | } |
| | | else |
| | | { |
| | | data.Add(new { key = item.ToString(), value = item.ToString() }); |
| | | } |
| | | index++; |
| | | } |
| | | } |
| | | |
| | | result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; |
| | | } |
| | | break; |
| | | case "stockStatusEmun": |
| | | { |
| | | List<object> data = new List<object>(); |
| | | Type type = typeof(StockStatusEmun); |
| | | List<int> enums = Enum.GetValues(typeof(StockStatusEmun)).Cast<int>().ToList(); |
| | | int index = 0; |
| | | foreach (var item in enums) |
| | | { |
| | | FieldInfo? fieldInfo = typeof(StockStatusEmun).GetField(((StockStatusEmun)item).ToString()); |
| | | DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>(); |
| | | if (description != null) |
| | | { |
| | | data.Add(new { key = item.ToString(), value = description.Description }); |
| | | } |
| | | else |
| | | { |
| | | data.Add(new { key = item.ToString(), value = item.ToString() }); |
| | | } |
| | | index++; |
| | | } |
| | | |
| | | result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; |
| | | } |
| | | break; |
| | | } |
| | | return result; |
| | | } |
| | |
| | | { |
| | | private readonly IUnitOfWorkManage _unitOfWorkManage; |
| | | private readonly ICacheService _cacheService; |
| | | private readonly ISys_MenuService _menuService; |
| | | |
| | | public ISys_UserRepository Repository => BaseDal; |
| | | |
| | | public Sys_UserService(ISys_UserRepository repository, IUnitOfWorkManage unitOfWorkManage, ICacheService cacheService) : base(repository) |
| | | public Sys_UserService(ISys_UserRepository repository, IUnitOfWorkManage unitOfWorkManage, ICacheService cacheService, ISys_MenuService menuService) : base(repository) |
| | | { |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | | _cacheService = cacheService; |
| | | _menuService = menuService; |
| | | } |
| | | |
| | | public WebResponseContent Login(LoginInfo loginInfo) |
| | |
| | | UserInfo user = BaseDal.GetUserInfo(loginInfo.UserName, loginInfo.Password); |
| | | if (user != null) |
| | | { |
| | | object obj = _menuService.GetMenuActionList(user.RoleId); |
| | | if (obj is not IEnumerable<object> list) |
| | | { |
| | | return WebResponseContent.Instance.Error("æ ç»å½æé"); |
| | | } |
| | | if (!list.Any()) |
| | | { |
| | | return WebResponseContent.Instance.Error("æ ç»å½æé"); |
| | | } |
| | | |
| | | string token = JwtHelper.IssueJwt(new TokenModelJwt() |
| | | { |
| | | UserId = user.UserId, |
| | |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using Swashbuckle.AspNetCore.Annotations; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Core.Helper; |
| | |
| | | [ApiController] |
| | | public class AreaInfoController : ApiBaseController<IAreaInfoService, Dt_AreaInfo> |
| | | { |
| | | private readonly IBasicService _basicService; |
| | | public AreaInfoController(IAreaInfoService service,IBasicService basicService) : base(service) |
| | | public AreaInfoController(IAreaInfoService service) : base(service) |
| | | { |
| | | _basicService = basicService; |
| | | } |
| | | |
| | | [HttpPost, Route("GetAllLocationGroups"), AllowAnonymous] |
| | | |
| | | public List<LocationGroupDTO> GetAllLocationGroups(string roadway) |
| | | [HttpPost, Route("AreaEnableStatus")] |
| | | public WebResponseContent AreaEnableStatus([FromBody] int[] keys) |
| | | { |
| | | List<LocationGroupDTO> locations = _basicService.LocationInfoService.Repository.GetAllLocationGroups(roadway); |
| | | return locations; |
| | | return Service.AreaEnableStatus(keys); |
| | | } |
| | | |
| | | [HttpPost, Route("AreaDisableStatus")] |
| | | public WebResponseContent AreaDisableStatus([FromBody] int[] keys) |
| | | { |
| | | return Service.AreaDisableStatus(keys); |
| | | } |
| | | |
| | | [HttpGet(), Route("AreaEnableStatus")] |
| | | public WebResponseContent AreaEnableStatus(int key) |
| | | { |
| | | return Service.AreaEnableStatus(key); |
| | | } |
| | | |
| | | [HttpGet, Route("AreaDisableStatus")] |
| | | public WebResponseContent AreaDisableStatus(int key) |
| | | { |
| | | return Service.AreaDisableStatus(key); |
| | | } |
| | | } |
| | | } |
| | |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_DTO.Inbound; |
| | | using WIDESEA_IInboundService; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_ITaskInfoService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers |
| | | { |
| | | [Route("api/PDA")] |
| | | [ApiController] |
| | | public class PDAController : ApiBaseController<ITaskService, Dt_Task> |
| | | [Authorize, ApiController] |
| | | public class PDAController : Controller |
| | | { |
| | | private readonly IInboundService _inboundService; |
| | | public PDAController(ITaskService service, IInboundService inboundService) : base(service) |
| | | private readonly IOutboundService _outboundService; |
| | | private readonly ITaskService _taskService; |
| | | |
| | | public PDAController(ITaskService taskService, IInboundService inboundService,IOutboundService outboundService) |
| | | { |
| | | _inboundService = inboundService; |
| | | _outboundService = outboundService; |
| | | _taskService = taskService; |
| | | } |
| | | |
| | | [HttpPost, Route("CallMateriel")] |
| | | public WebResponseContent CallMateriel(string endPoint) |
| | | { |
| | | return Service.CallMateriel(endPoint); |
| | | return _taskService.CallMateriel(endPoint); |
| | | } |
| | | |
| | | [HttpPost, Route("MaterielCarry")] |
| | | public WebResponseContent MaterielCarry(string startPoint) |
| | | { |
| | | return Service.MaterielCarry(startPoint); |
| | | return _taskService.MaterielCarry(startPoint); |
| | | } |
| | | |
| | | [HttpPost, Route("MaterielGroup")] |
| | |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using Microsoft.Extensions.Options; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_DTO.Stock; |
| | | using WIDESEA_IStockService; |
| | |
| | | namespace WIDESEA_WMSServer.Controllers.Stock |
| | | { |
| | | [Route("api/StockView")] |
| | | [ApiController] |
| | | public class StockViewController : ApiBaseController<IStockViewService, StockViewDTO> |
| | | [Authorize, ApiController] |
| | | public class StockViewController : Controller |
| | | { |
| | | public StockViewController(IStockViewService service) : base(service) |
| | | private readonly IStockViewService _stockViewService; |
| | | public StockViewController(IStockViewService stockViewService) |
| | | { |
| | | _stockViewService = stockViewService; |
| | | } |
| | | |
| | | |
| | | [HttpPost, Route("GetPageData")] |
| | | public PageGridData<StockViewDTO> GetPageData([FromBody] PageDataOptions options) |
| | | { |
| | | return _stockViewService.GetPageData(options); |
| | | } |
| | | |
| | | [HttpPost, Route("GetDetailPage")] |
| | | public object GetDetailPage([FromBody] PageDataOptions pageData) |
| | | { |
| | | return _stockViewService.GetDetailPage(pageData); |
| | | } |
| | | } |
| | | } |
| | |
| | | builder.Services.AddAllOptionRegister();//读åé
ç½®æä»¶ |
| | | builder.Services.AddMemoryCacheSetup();//ç¼å |
| | | builder.Services.AddSqlsugarSetup();//SqlSugar å¯å¨æå¡ |
| | | builder.Services.AddInitializationHostServiceSetup();//åºç¨åå§åæå¡æ³¨å
¥ |
| | | //builder.Services.AddInitializationHostServiceSetup();//åºç¨åå§åæå¡æ³¨å
¥ |
| | | builder.Services.AddDbSetup();//Db å¯å¨æå¡ |
| | | |
| | | builder.Services.AddAutoMapperSetup(); |
| | |
| | | "Microsoft.AspNetCore": "Warning" |
| | | } |
| | | }, |
| | | "dics": "inOrderType,outOrderType,inboundState,createType", |
| | | "dics": "inOrderType,outOrderType,inboundState,createType,enableEnum,enableStatusEnum,locationStatusEnum,locationTypeEnum,taskTypeEnum,taskStatusEnum,outboundStatusEnum,orderDetailStatusEnum,stockStatusEmun", |
| | | "AllowedHosts": "*", |
| | | "ConnectionStringsEncryption": false, |
| | | "MainDB": "DB_WIDESEA", //å½å项ç®ç主åºï¼æå¯¹åºçè¿æ¥å符串çEnabledå¿
须为true |