¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | //æ¤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) |
| | | } |
| | | } |
| | | }; |
| | | export default extension; |
| | | |
| | |
| | | <template> |
| | | <div> |
| | | <vol-box v-model="showDetialBox" :lazy="true" width="60%" :padding="15" title="æå®åºå"> |
| | | <vol-box |
| | | v-model="showDetialBox" |
| | | :lazy="true" |
| | | width="60%" |
| | | :padding="15" |
| | | title="æå®åºå" |
| | | > |
| | | <div class="box-head"> |
| | | <el-alert :closable="false" style="width: 100%"> |
| | | <el-row> |
| | |
| | | <el-divider direction="vertical"></el-divider> |
| | | <span class="less-style">ç©æç¼å·ï¼ {{ row.materielCode }} </span> |
| | | <el-divider direction="vertical"></el-divider> |
| | | <span class="less-style">éæ±æ°éï¼ {{ row.orderQuantity }} |
| | | <span class="less-style" |
| | | >éæ±æ°éï¼ {{ row.orderQuantity }} |
| | | </span> |
| | | <el-divider direction="vertical"></el-divider> |
| | | <span :class="selectionClass">已鿰éï¼ {{ selectionSum }} |
| | | <span :class="selectionClass" |
| | | >已鿰éï¼ {{ selectionSum }} |
| | | </span> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <el-link type="primary" size="small" style="float: right; height: 20px" |
| | | @click="getData">å·æ°</el-link></el-col> |
| | | <el-link |
| | | type="primary" |
| | | size="small" |
| | | style="float: right; height: 20px" |
| | | @click="getData" |
| | | >å·æ°</el-link |
| | | ></el-col |
| | | > |
| | | <el-col :span="2"> |
| | | <el-link type="primary" size="small" style="float: right; height: 20px" |
| | | @click="revokeAssign">æ¤éåé
</el-link></el-col> |
| | | <el-link |
| | | type="primary" |
| | | size="small" |
| | | style="float: right; height: 20px" |
| | | @click="revokeAssign" |
| | | >æ¤éåé
</el-link |
| | | ></el-col |
| | | > |
| | | </el-row> |
| | | </el-alert> |
| | | </div> |
| | | <div class="box-table" style="margin-top: 1%"> |
| | | <el-table ref="singleTable" :data="tableData" style="width: 100%; height: 100%" highlight-current-row |
| | | @row-click="handleRowClick" height="500px" @selection-change="handleSelectionChange"> |
| | | <el-table |
| | | ref="singleTable" |
| | | :data="tableData" |
| | | style="width: 100%; height: 100%" |
| | | highlight-current-row |
| | | @row-click="handleRowClick" |
| | | height="500px" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | > |
| | | <el-table-column type="selection" width="55"> </el-table-column> |
| | | <el-table-column label="åºå·" type="index" fixed="left" width="55" align="center"></el-table-column> |
| | | <el-table-column v-for="(item, index) in tableColumns.filter((x) => !x.hidden)" :key="index" :prop="item.prop" |
| | | :label="item.title" :width="item.width" align="center"> |
| | | <el-table-column |
| | | label="åºå·" |
| | | type="index" |
| | | fixed="left" |
| | | width="55" |
| | | align="center" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | v-for="(item, index) in tableColumns.filter((x) => !x.hidden)" |
| | | :key="index" |
| | | :prop="item.prop" |
| | | :label="item.title" |
| | | :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-button type="text" |
| | | @click="tableButtonClick(scoped.row, item)"><i :class="item.icon" |
| | | style="font-size: 22px"></i></el-button></el-tooltip> |
| | | <el-tooltip |
| | | class="item" |
| | | effect="dark" |
| | | :content="item.title" |
| | | placement="bottom" |
| | | ><el-button |
| | | type="text" |
| | | @click="tableButtonClick(scoped.row, item)" |
| | | ><i :class="item.icon" style="font-size: 22px"></i></el-button |
| | | ></el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <template #footer> |
| | | <el-button type="primary" size="small" @click="outbound">ç´æ¥åºåº</el-button> |
| | | <el-button type="primary" size="small" @click="lockStock">éå®åºå</el-button> |
| | | <el-button type="danger" size="small" @click="showDetialBox = false">å
³é</el-button> |
| | | <el-button type="primary" size="small" @click="outbound" |
| | | >ç´æ¥åºåº</el-button |
| | | > |
| | | <el-button type="primary" size="small" @click="lockStock" |
| | | >éå®åºå</el-button |
| | | > |
| | | <el-button type="danger" size="small" @click="showDetialBox = false" |
| | | >å
³é</el-button |
| | | > |
| | | </template> |
| | | </vol-box> |
| | | </div> |
| | |
| | | }, |
| | | methods: { |
| | | open(row) { |
| | | console.log(row); |
| | | this.row = row; |
| | | this.showDetialBox = true; |
| | | this.originalQuantity = this.row.lockQuantity; |
| | |
| | | this.http |
| | | .post( |
| | | "api/StockInfo/GetStockSelectViews?materielCode=" + |
| | | this.row.materielCode, |
| | | this.row.materielCode + |
| | | "&orderId=" + |
| | | this.row.orderId, |
| | | null, |
| | | "æ¥è¯¢ä¸" |
| | | ) |
| | |
| | | background: oldlace; |
| | | } |
| | | |
| | | .box-table .el-table tbody tr:hover>td { |
| | | .box-table .el-table tbody tr:hover > td { |
| | | background-color: #d8e0d4 !important; |
| | | /* color: #ffffff; */ |
| | | } |
| | | |
| | | .box-table .el-table tbody tr.current-row>td { |
| | | .box-table .el-table tbody tr.current-row > td { |
| | | background-color: #f0f9eb !important; |
| | | /* color: #ffffff; */ |
| | | } |
| | |
| | | path: '/receiveOrder', |
| | | name: 'receiveOrder', |
| | | component: () => import('@/views/inbound/receiveOrder.vue') |
| | | },{ |
| | | path: '/purchaseOrder', |
| | | name: 'purchaseOrder', |
| | | component: () => import('@/views/inbound/purchaseOrder.vue') |
| | | }] |
| | | |
| | | export default viewgird |
| | |
| | | }); |
| | | const editFormFields = ref({ |
| | | orderType: "", |
| | | orderNo:"", |
| | | inboundOrderNo: "", |
| | | upperOrderNo: "", |
| | | remark: "", |
| | | }); |
| | |
| | | data: [], |
| | | }, |
| | | { |
| | | field: "orderNo", |
| | | title: "åæ®ç¼å·", |
| | | type: "string", |
| | | }, |
| | | field: "inboundOrderNo", |
| | | title: "åæ®ç¼å·", |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "䏿¸¸åæ®ç¼å·", |
| | | field: "upperOrderNo", |
| | |
| | | ], |
| | | ]); |
| | | const searchFormFields = ref({ |
| | | orderNo: "", |
| | | inboundOrderNo: "", |
| | | upperOrderNo: "", |
| | | orderType: "", |
| | | orderStatus: "", |
| | |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "åæ®ç¼å·", field: "orderNo", type: "like" }, |
| | | { title: "åæ®ç¼å·", field: "inboundOrderNo", type: "like" }, |
| | | { title: "䏿¸¸åæ®ç¼å·", field: "upperOrderNo", type: "like" }, |
| | | { |
| | | title: "åæ®ç±»å", |
| | |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "orderNo", |
| | | field: "inboundOrderNo", |
| | | title: "åæ®ç¼å·", |
| | | type: "string", |
| | | width: 120, |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | <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/inbound/purchaseOrder.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | | setup() { |
| | | const table = ref({ |
| | | key: "id", |
| | | footer: "Foots", |
| | | cnName: "å
¥åºå", |
| | | name: "purchaseOrder", |
| | | url: "/PurchaseOrder/", |
| | | sortName: "CreateDate", |
| | | }); |
| | | const editFormFields = ref({ |
| | | // orderType: "", |
| | | // inboundOrderNo: "", |
| | | // upperOrderNo: "", |
| | | // remark: "", |
| | | }); |
| | | const editFormOptions = ref([ |
| | | // [ |
| | | // { |
| | | // title: "åæ®ç±»å", |
| | | // required: true, |
| | | // field: "orderType", |
| | | // type: "select", |
| | | // dataKey: "inOrderType", |
| | | // data: [], |
| | | // }, |
| | | // { |
| | | // field: "inboundOrderNo", |
| | | // title: "åæ®ç¼å·", |
| | | // type: "string", |
| | | // }, |
| | | // { |
| | | // title: "䏿¸¸åæ®ç¼å·", |
| | | // field: "upperOrderNo", |
| | | // type: "string", |
| | | // }, |
| | | // { |
| | | // title: "夿³¨", |
| | | // field: "remark", |
| | | // type: "textarea", |
| | | // }, |
| | | // ], |
| | | ]); |
| | | const searchFormFields = ref({ |
| | | inboundOrderNo: "", |
| | | upperOrderNo: "", |
| | | orderType: "", |
| | | orderStatus: "", |
| | | createType: "", |
| | | creater: "", |
| | | createDate: "", |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "åæ®ç¼å·", field: "inboundOrderNo", type: "like" }, |
| | | { title: "䏿¸¸åæ®ç¼å·", field: "upperOrderNo", type: "like" }, |
| | | { |
| | | title: "åæ®ç±»å", |
| | | field: "orderType", |
| | | type: "select", |
| | | dataKey: "inOrderType", |
| | | data: [], |
| | | }, |
| | | { |
| | | title: "åæ®ç¶æ", |
| | | field: "orderStatus", |
| | | type: "select", |
| | | dataKey: "inboundState", |
| | | data: [], |
| | | }, |
| | | ], |
| | | [ |
| | | { |
| | | title: "å建æ¹å¼", |
| | | field: "createType", |
| | | type: "select", |
| | | dataKey: "createType", |
| | | data: [], |
| | | }, |
| | | { title: "å建è
", field: "creater", type: "like" }, |
| | | { title: "å建æ¶é´", field: "createDate", type: "datetime" }, |
| | | ], |
| | | ]); |
| | | const columns = ref([ |
| | | { |
| | | field: "id", |
| | | title: "Id", |
| | | type: "int", |
| | | width: 90, |
| | | hidden: true, |
| | | readonly: true, |
| | | require: true, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "purchaseOrderNo", |
| | | title: "éè´åå·", |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | link: true, |
| | | }, |
| | | { |
| | | field: "purchaseOrderType", |
| | | title: "åæ®ç±»å", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "supplierCode", |
| | | title: "ä¾åºåç¼å·", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "orderQuantity", |
| | | title: "éè´æ°é", |
| | | type: "decimal", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "purchaseOrderStatus", |
| | | title: "éè´åç¶æ", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "orderDate", |
| | | title: "ä¸åæ¥æ", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "creater", |
| | | title: "å建人", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "createDate", |
| | | title: "å建æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | 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", |
| | | }, |
| | | ]); |
| | | const detail = ref({ |
| | | cnName: "å
¥åºåæç»", |
| | | table: "InboundOrderDetail", |
| | | columns: [ |
| | | { |
| | | field: "id", |
| | | title: "Id", |
| | | type: "int", |
| | | width: 90, |
| | | hidden: true, |
| | | readonly: true, |
| | | require: true, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "purchaseOrderId", |
| | | title: "éè´å主é®", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | hidden: true, |
| | | }, |
| | | { |
| | | field: "rowNo", |
| | | title: "è¡å·", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "materielCode", |
| | | title: "ç©æç¼å·", |
| | | type: "select", |
| | | width: 150, |
| | | align: "left", |
| | | edit: { type: "" }, |
| | | required: true, |
| | | }, |
| | | { |
| | | field: "materielName", |
| | | title: "ç©æåç§°", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | edit: { type: "" }, |
| | | }, |
| | | // { |
| | | // field: "batchNo", |
| | | // title: "æ¹æ¬¡å·", |
| | | // type: "decimal", |
| | | // width: 90, |
| | | // align: "left", |
| | | // edit: { type: "" }, |
| | | // required: true, |
| | | // }, |
| | | { |
| | | field: "purchaseDetailQuantity", |
| | | title: "åæ®æ°é", |
| | | type: "decimal", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "unit", |
| | | title: "åä½", |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "warehouseId", |
| | | title: "ä»åºç¼å·", |
| | | type: "string", |
| | | width: 200, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "purchaseDetailStatus", |
| | | title: "订åæç»ç¶æ", |
| | | type: "string", |
| | | width: 180, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "creater", |
| | | title: "å建人", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "createDate", |
| | | title: "å建æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | 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", |
| | | }, |
| | | ], |
| | | sortName: "id", |
| | | key: "id", |
| | | }); |
| | | return { |
| | | table, |
| | | extend, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | columns, |
| | | detail, |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | | |
| | |
| | | { |
| | | public class BasicRepository : IBasicRepository |
| | | { |
| | | /// <summary> |
| | | /// è´§ä½ä»å¨å± |
| | | /// </summary> |
| | | public ILocationInfoRepository LocationInfoRepository { get; } |
| | | |
| | | /// <summary> |
| | | /// ç©æä»å¨å± |
| | | /// </summary> |
| | | public IMaterielInfoRepository MaterielInfoRepository { get; } |
| | | |
| | | /// <summary> |
| | | /// ä»åºä»å¨å± |
| | | /// </summary> |
| | | public IWarehouseRepository WarehouseRepository { get; } |
| | | |
| | | public IStockInfoDetailRepository StockInfoDetailServiceRepository { get; } |
| | | |
| | | public BasicRepository(ILocationInfoRepository locationInfoRepository, IMaterielInfoRepository materielInfoRepository, IWarehouseRepository warehouseRepository, IStockInfoDetailRepository stockInfoDetailServiceRepository) |
| | | public BasicRepository(ILocationInfoRepository locationInfoRepository, IMaterielInfoRepository materielInfoRepository, IWarehouseRepository warehouseRepository) |
| | | { |
| | | LocationInfoRepository = locationInfoRepository; |
| | | MaterielInfoRepository = materielInfoRepository; |
| | | WarehouseRepository = warehouseRepository; |
| | | StockInfoDetailServiceRepository = stockInfoDetailServiceRepository; |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | namespace WIDESEA_BasicRepository |
| | | { |
| | | /// <summary> |
| | | /// è´§ä½ä»å¨å®ç°å± |
| | | /// </summary> |
| | | public class LocationInfoRepository : RepositoryBase<Dt_LocationInfo>, ILocationInfoRepository |
| | | { |
| | | public LocationInfoRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·ååç»ææè´§ä½ |
| | | /// </summary> |
| | | /// <param name="roadway"></param> |
| | | /// <returns></returns> |
| | | public List<LocationGroupDTO> GetAllLocationGroups(string roadway) |
| | | { |
| | | return QueryTabs<Dt_LocationInfo, Dt_LocationInfo, LocationGroupDTO>((a, b) => a.Column == b.Column && a.Layer == b.Layer && a.Row != b.Row && SqlFunc.Abs(a.Row - b.Row) == 1, (a, b) => new LocationGroupDTO { DepthA = a.Depth, DepthB = b.Depth, EnableStatusA = a.EnableStatus, EnableStatusB = b.EnableStatus, IdA = a.Id, IdB = b.Id, LocationCodeA = a.LocationCode, LocationCodeB = b.LocationCode, LocationStatusA = a.LocationStatus, LocationStatusB = b.LocationStatus, LocationTypeA = a.LocationType, LocationTypeB = b.LocationType }, a => a.Depth == 1 && a.RoadwayNo == roadway, b => b.Depth == 2 && b.RoadwayNo == roadway, x => true); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®ç¶æè·ååç»è´§ä½ |
| | | /// </summary> |
| | | /// <param name="roadway"></param> |
| | | /// <param name="locationAStatus"></param> |
| | | /// <param name="locationBStatus"></param> |
| | | /// <returns></returns> |
| | | public List<LocationGroupDTO> GetLocationGroups(string roadway, LocationStatusEnum locationAStatus, LocationStatusEnum locationBStatus) |
| | | { |
| | | return QueryTabs<Dt_LocationInfo, Dt_LocationInfo, LocationGroupDTO>( |
| | |
| | | x => true); |
| | | } |
| | | |
| | | public override bool UpdateData(Dt_LocationInfo entity) |
| | | { |
| | | return base.UpdateData(entity); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®è´§ä½ç¼å·éåè·åè´§ä½ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="locationCodes"></param> |
| | | /// <returns></returns> |
| | | public List<Dt_LocationInfo> GetLocationInfos(List<string> locationCodes) |
| | | { |
| | | return QueryData(x => locationCodes.Contains(x.LocationCode)); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¹éä¿®æ¹è´§ä½ç¶æ |
| | | /// </summary> |
| | | /// <param name="locationInfos"></param> |
| | | /// <param name="locationStatus"></param> |
| | | public void UpdateLocationStatus(List<Dt_LocationInfo> locationInfos, LocationStatusEnum locationStatus) |
| | | { |
| | | locationInfos.ForEach(x => |
| | |
| | | UpdateData(locationInfos); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åå¯åºåºè´§ä½ç¼å· |
| | | /// </summary> |
| | | /// <param name="warehouseId"></param> |
| | | /// <returns></returns> |
| | | public List<string> GetCanOutLocationCodes(int warehouseId) |
| | | { |
| | | return QueryData(x => x.LocationCode, x => x.WarehouseId == warehouseId && x.LocationStatus == LocationStatusEnum.InStock.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyOut.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt())).Distinct().ToList(); |
| | |
| | | |
| | | namespace WIDESEA_BasicRepository |
| | | { |
| | | /// <summary> |
| | | /// ç©æä¿¡æ¯ä»å¨å®ç°å± |
| | | /// </summary> |
| | | public class MaterielInfoRepository : RepositoryBase<Dt_MaterielInfo>, IMaterielInfoRepository |
| | | { |
| | | public MaterielInfoRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | |
| | | |
| | | namespace WIDESEA_BasicRepository |
| | | { |
| | | /// <summary> |
| | | /// ä¾åºåä¿¡æ¯ä»å¨å®ç°å± |
| | | /// </summary> |
| | | public class SupplierInfoRepository : RepositoryBase<Dt_SupplierInfo>, ISupplierInfoRepository |
| | | { |
| | | public SupplierInfoRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | |
| | | |
| | | namespace WIDESEA_BasicRepository |
| | | { |
| | | /// <summary> |
| | | /// ä»åºä¿¡æ¯å®ç°å± |
| | | /// </summary> |
| | | public class WarehouseRepository : RepositoryBase<Dt_Warehouse>, IWarehouseRepository |
| | | { |
| | | public WarehouseRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | |
| | | |
| | | namespace WIDESEA_CheckRepository |
| | | { |
| | | /// <summary> |
| | | /// è´¨æ£åä»å¨å®ç°å± |
| | | /// </summary> |
| | | public class CheckOrderRepository : RepositoryBase<Dt_CheckOrder>, ICheckOrderRepository |
| | | { |
| | | public CheckOrderRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | |
| | | |
| | | namespace WIDESEA_CheckRepository |
| | | { |
| | | /// <summary> |
| | | /// è´¨æ£ç»æä»å¨å®ç°å± |
| | | /// </summary> |
| | | public class CheckOrderResultRepository : RepositoryBase<Dt_CheckOrderResult>, ICheckOrderResultRepository |
| | | { |
| | | public CheckOrderResultRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | |
| | | } |
| | | else |
| | | { |
| | | return ""; |
| | | return "1 = 1"; |
| | | } |
| | | |
| | | //UserRole? userRole = PermissionDataHostService.UserRoles.FirstOrDefault(x => x.UserId == App.User.UserId); |
| | |
| | | |
| | | namespace WIDESEA_IBasicRepository |
| | | { |
| | | /// <summary> |
| | | /// è´§ä½ä¿¡æ¯ä»å¨æ¥å£å± |
| | | /// </summary> |
| | | public interface ILocationInfoRepository : IRepository<Dt_LocationInfo> |
| | | { |
| | | /// <summary> |
| | |
| | | /// <param name="locationStatus">è´§ä½ç¶æ</param> |
| | | void UpdateLocationStatus(List<Dt_LocationInfo> locationInfos, LocationStatusEnum locationStatus); |
| | | |
| | | /// <summary> |
| | | /// è·åå¯åºåºè´§ä½ç¼å· |
| | | /// </summary> |
| | | /// <param name="warehouseId"></param> |
| | | /// <returns></returns> |
| | | List<string> GetCanOutLocationCodes(int warehouseId); |
| | | } |
| | | } |
| | |
| | | |
| | | namespace WIDESEA_IBasicRepository |
| | | { |
| | | /// <summary> |
| | | /// ç©æä¿¡æ¯ä»å¨æ¥å£å± |
| | | /// </summary> |
| | | public interface IMaterielInfoRepository : IRepository<Dt_MaterielInfo> |
| | | { |
| | | } |
| | |
| | | |
| | | namespace WIDESEA_IBasicRepository |
| | | { |
| | | /// <summary> |
| | | /// ä¾åºåä¿¡æ¯ä»å¨æ¥å£å± |
| | | /// </summary> |
| | | public interface ISupplierInfoRepository : IRepository<Dt_SupplierInfo> |
| | | { |
| | | } |
| | |
| | | |
| | | namespace WIDESEA_IBasicRepository |
| | | { |
| | | /// <summary> |
| | | /// ä»åºä¿¡æ¯ä»å¨æ¥å£å± |
| | | /// </summary> |
| | | public interface IWarehouseRepository : IRepository<Dt_Warehouse> |
| | | { |
| | | /// <summary> |
| | |
| | | |
| | | namespace WIDESEA_ICheckRepository |
| | | { |
| | | /// <summary> |
| | | /// è´¨æ£åä»å¨æ¥å£å± |
| | | /// </summary> |
| | | public interface ICheckOrderRepository : IRepository<Dt_CheckOrder> |
| | | { |
| | | } |
| | |
| | | |
| | | namespace WIDESEA_ICheckRepository |
| | | { |
| | | /// <summary> |
| | | /// è´¨æ£ç»æä»å¨æ¥å£å± |
| | | /// </summary> |
| | | public interface ICheckOrderResultRepository : IRepository<Dt_CheckOrderResult> |
| | | { |
| | | } |
| | |
| | | |
| | | namespace WIDESEA_IInboundRepository |
| | | { |
| | | /// <summary> |
| | | /// å
¥åºåæç»ä»å¨æ¥å£å± |
| | | /// </summary> |
| | | public interface IInboundOrderDetailRepository : IRepository<Dt_InboundOrderDetail> |
| | | { |
| | | } |
| | |
| | | |
| | | namespace WIDESEA_IInboundRepository |
| | | { |
| | | /// <summary> |
| | | /// å
¥åºåæç»åå²ä»å¨æ¥å£å± |
| | | /// </summary> |
| | | public interface IInboundOrderDetail_HtyRepository : IRepository<Dt_InboundOrderDetail_Hty> |
| | | { |
| | | } |
| | |
| | | |
| | | namespace WIDESEA_IInboundRepository |
| | | { |
| | | /// <summary> |
| | | /// å
¥åºåä»å¨æ¥å£å± |
| | | /// </summary> |
| | | public interface IInboundOrderRepository : IRepository<Dt_InboundOrder> |
| | | { |
| | | } |
| | |
| | | |
| | | namespace WIDESEA_IInboundRepository |
| | | { |
| | | /// <summary> |
| | | /// å
¥åºååå²ä»å¨æ¥å£å± |
| | | /// </summary> |
| | | public interface IInboundOrder_HtyRepository : IRepository<Dt_InboundOrder_Hty> |
| | | { |
| | | } |
| | |
| | | |
| | | namespace WIDESEA_IInboundRepository |
| | | { |
| | | /// <summary> |
| | | /// éè´åæç»ä»å¨æ¥å£å± |
| | | /// </summary> |
| | | public interface IPurchaseOrderDetailRepository : IRepository<Dt_PurchaseOrderDetail> |
| | | { |
| | | } |
| | |
| | | |
| | | namespace WIDESEA_IInboundRepository |
| | | { |
| | | /// <summary> |
| | | /// éè´åä»å¨æ¥å£å± |
| | | /// </summary> |
| | | public interface IPurchaseOrderRepository : IRepository<Dt_PurchaseOrder> |
| | | { |
| | | } |
| | |
| | | |
| | | namespace WIDESEA_IInboundRepository |
| | | { |
| | | /// <summary> |
| | | /// æ¶è´§åæç»ä»å¨æ¥å£å± |
| | | /// </summary> |
| | | public interface IReceiveOrderDetailRepository : IRepository<Dt_ReceiveOrderDetail> |
| | | { |
| | | } |
| | |
| | | |
| | | namespace WIDESEA_IInboundRepository |
| | | { |
| | | /// <summary> |
| | | /// æ¶è´§åä»å¨æ¥å£å± |
| | | /// </summary> |
| | | public interface IReceiveOrderRepository : IRepository<Dt_ReceiveOrder> |
| | | { |
| | | } |
| | |
| | | |
| | | namespace WIDESEA_IOutboundRepository |
| | | { |
| | | /// <summary> |
| | | /// åºåºè¯¦æ
ä¿¡æ¯ä»å¨æ¥å£å± |
| | | /// </summary> |
| | | public interface IOutStockLockInfoRepository : IRepository<Dt_OutStockLockInfo> |
| | | { |
| | | } |
| | |
| | | |
| | | namespace WIDESEA_IOutboundRepository |
| | | { |
| | | /// <summary> |
| | | /// å
¥åºåæç»ä»å¨æ¥å£å± |
| | | /// </summary> |
| | | public interface IOutboundOrderDetailRepository : IRepository<Dt_OutboundOrderDetail> |
| | | { |
| | | } |
| | |
| | | |
| | | namespace WIDESEA_IOutboundRepository |
| | | { |
| | | /// <summary> |
| | | /// åºåºåæç»åå²ä»å¨æ¥å£å± |
| | | /// </summary> |
| | | public interface IOutboundOrderDetail_HtyRepository : IRepository<Dt_OutboundOrderDetail_Hty> |
| | | { |
| | | } |
| | |
| | | |
| | | namespace WIDESEA_IOutboundRepository |
| | | { |
| | | /// <summary> |
| | | /// å
¥åºåä»å¨æ¥å£å± |
| | | /// </summary> |
| | | public interface IOutboundOrderRepository : IRepository<Dt_OutboundOrder> |
| | | { |
| | | } |
| | |
| | | |
| | | namespace WIDESEA_IOutboundRepository |
| | | { |
| | | /// <summary> |
| | | /// åºåºååå²ä»å¨æ¥å£å± |
| | | /// </summary> |
| | | public interface IOutboundOrder_HtyRepository : IRepository<Dt_OutboundOrder_Hty> |
| | | { |
| | | } |
| | |
| | | |
| | | List<Dt_StockInfo> GetStockInfos(string materielCode); |
| | | |
| | | List<Dt_StockInfo> GetStockInfos(string materielCode, List<string> locationCodes); |
| | | List<Dt_StockInfo> GetStockInfos(string materielCode, string lotNo, List<string> locationCodes); |
| | | |
| | | List<Dt_StockInfo> GetStockInfosByIds(List<int> ids); |
| | | |
| | |
| | | { |
| | | IStockInfoRepository Repository { get; } |
| | | |
| | | List<StockSelectViewDTO> GetStockSelectViews(int orderId, string materielCode); |
| | | |
| | | List<Dt_StockInfo> GetOutboundStocks(List<Dt_StockInfo> stockInfos, string materielCode, float needQuantity, out float residueQuantity); |
| | | |
| | | List<Dt_StockInfo> GetUseableStocks(string materielCode, int warehoseId); |
| | | List<Dt_StockInfo> GetUseableStocks(string materielCode, string batchNo, int warehoseId); |
| | | } |
| | | } |
| | |
| | | |
| | | namespace WIDESEA_InboundRepository |
| | | { |
| | | /// <summary> |
| | | /// å
¥åºåæç»ä»å¨å®ç°å± |
| | | /// </summary> |
| | | public class InboundOrderDetailRepository : RepositoryBase<Dt_InboundOrderDetail>, IInboundOrderDetailRepository |
| | | { |
| | | public InboundOrderDetailRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | |
| | | |
| | | namespace WIDESEA_InboundRepository |
| | | { |
| | | /// <summary> |
| | | /// å
¥åºåæç»åå²ä»å¨å®ç°å± |
| | | /// </summary> |
| | | public class InboundOrderDetail_HtyRepository : RepositoryBase<Dt_InboundOrderDetail_Hty>, IInboundOrderDetail_HtyRepository |
| | | { |
| | | public InboundOrderDetail_HtyRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | |
| | | |
| | | namespace WIDESEA_InboundRepository |
| | | { |
| | | /// <summary> |
| | | /// å
¥åºåä»å¨å®ç°å± |
| | | /// </summary> |
| | | public class InboundOrderRepository : RepositoryBase<Dt_InboundOrder>, IInboundOrderRepository |
| | | { |
| | | private readonly IUnitOfWorkManage _unitOfWorkManage; |
| | |
| | | |
| | | namespace WIDESEA_InboundRepository |
| | | { |
| | | /// <summary> |
| | | /// å
¥åºååå²ä»å¨å®ç°å± |
| | | /// </summary> |
| | | public class InboundOrder_HtyRepository : RepositoryBase<Dt_InboundOrder_Hty>, IInboundOrder_HtyRepository |
| | | { |
| | | private readonly IUnitOfWorkManage _unitOfWorkManage; |
| | |
| | | |
| | | namespace WIDESEA_InboundRepository |
| | | { |
| | | /// <summary> |
| | | /// éè´åæç»ä»å¨å®ç°å± |
| | | /// </summary> |
| | | public class PurchaseOrderDetailRepository : RepositoryBase<Dt_PurchaseOrderDetail>, IPurchaseOrderDetailRepository |
| | | { |
| | | public PurchaseOrderDetailRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | |
| | | |
| | | namespace WIDESEA_InboundRepository |
| | | { |
| | | /// <summary> |
| | | /// éè´åä»å¨å®ç°å± |
| | | /// </summary> |
| | | public class PurchaseOrderRepository : RepositoryBase<Dt_PurchaseOrder>, IPurchaseOrderRepository |
| | | { |
| | | public PurchaseOrderRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | |
| | | |
| | | namespace WIDESEA_InboundRepository |
| | | { |
| | | /// <summary> |
| | | /// æ¶è´§åæç»ä»å¨å®ç°å± |
| | | /// </summary> |
| | | public class ReceiveOrderDetailRepository : RepositoryBase<Dt_ReceiveOrderDetail>, IReceiveOrderDetailRepository |
| | | { |
| | | public ReceiveOrderDetailRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | |
| | | |
| | | namespace WIDESEA_InboundRepository |
| | | { |
| | | /// <summary> |
| | | /// æ¶è´§åä»å¨å®ç°å± |
| | | /// </summary> |
| | | public class ReceiveOrderRepository : RepositoryBase<Dt_ReceiveOrder>, IReceiveOrderRepository |
| | | { |
| | | public ReceiveOrderRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | |
| | | OverInQuantity = 0, |
| | | ReceiptQuantity = 0, |
| | | RowNo = item.RowNo, |
| | | Unit = item.Unit |
| | | Unit = item.Unit, |
| | | BatchNo = item.LotNo |
| | | }; |
| | | inboundOrder.Details.Add(detail); |
| | | } |
| | |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "ç©æç¼å·")] |
| | | public string MaterielCode { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "æ¹æ¬¡å·")] |
| | | public string BatchNo { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åæ®æ°é")] |
| | | public float OrderQuantity { get; set; } |
| | | |
| | |
| | | |
| | | namespace WIDESEA_IOutboundRepository |
| | | { |
| | | /// <summary> |
| | | /// åºåºè¯¦æ
ä¿¡æ¯ä»å¨å®ç°å± |
| | | /// </summary> |
| | | public class OutStockLockInfoRepository : RepositoryBase<Dt_OutStockLockInfo>, IOutStockLockInfoRepository |
| | | { |
| | | public OutStockLockInfoRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | |
| | | |
| | | namespace WIDESEA_OutboundRepository |
| | | { |
| | | /// <summary> |
| | | /// åºåºåæç»ä»å¨å®ç°å± |
| | | /// </summary> |
| | | public class OutboundOrderDetailRepository : RepositoryBase<Dt_OutboundOrderDetail>, IOutboundOrderDetailRepository |
| | | { |
| | | public OutboundOrderDetailRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | |
| | | |
| | | namespace WIDESEA_OutboundRepository |
| | | { |
| | | /// <summary> |
| | | /// åºåºåæç»åå²ä»å¨å®ç°å± |
| | | /// </summary> |
| | | public class OutboundOrderDetail_HtyRepository : RepositoryBase<Dt_OutboundOrderDetail_Hty>, IOutboundOrderDetail_HtyRepository |
| | | { |
| | | public OutboundOrderDetail_HtyRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | |
| | | |
| | | namespace WIDESEA_OutboundRepository |
| | | { |
| | | /// <summary> |
| | | /// åºåºåä»å¨å®ç°å± |
| | | /// </summary> |
| | | public class OutboundOrderRepository : RepositoryBase<Dt_OutboundOrder>, IOutboundOrderRepository |
| | | { |
| | | public OutboundOrderRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | |
| | | |
| | | namespace WIDESEA_OutboundRepository |
| | | { |
| | | /// <summary> |
| | | /// åºåºååå²ä»å¨å®ç°å± |
| | | /// </summary> |
| | | public class OutboundOrder_HtyRepository : RepositoryBase<Dt_OutboundOrder_Hty>, IOutboundOrder_HtyRepository |
| | | { |
| | | public OutboundOrder_HtyRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | |
| | | |
| | | List<Dt_StockInfo> outStock = new List<Dt_StockInfo>(); |
| | | |
| | | List<Dt_StockInfo> stockInfos = _stockService.StockInfoService.GetUseableStocks(outboundOrderDetail.MaterielCode, outboundOrder.WarehouseId); |
| | | List<Dt_StockInfo> stockInfos = _stockService.StockInfoService.GetUseableStocks(outboundOrderDetail.MaterielCode, outboundOrderDetail.BatchNo, outboundOrder.WarehouseId); |
| | | float stockTotalQuantity = stockInfos.Select(x => x.Details.Sum(v => v.StockQuantity - v.OutboundQuantity)).Sum(x => x); |
| | | if (stockTotalQuantity >= needQuantity)//åºåå¤ |
| | | { |
| | |
| | | needQuantity -= assignQuantity; |
| | | if (outboundOrderDetail.OrderQuantity > outboundOrderDetail.LockQuantity) |
| | | { |
| | | List<Dt_StockInfo> stockInfos = _stockService.StockInfoService.GetUseableStocks(outboundOrderDetail.MaterielCode, outboundOrder.WarehouseId); |
| | | List<Dt_StockInfo> stockInfos = _stockService.StockInfoService.GetUseableStocks(outboundOrderDetail.MaterielCode, outboundOrderDetail.BatchNo, outboundOrder.WarehouseId); |
| | | stockInfos = stockInfos.Where(x => !stockSelectViews.Select(v => v.PalletCode).Contains(x.PalletCode)).ToList(); |
| | | List<Dt_StockInfo> autoAssignStocks = _stockService.StockInfoService.GetOutboundStocks(stockInfos, outboundOrderDetail.MaterielCode, needQuantity, out float residueQuantity); |
| | | outboundOrderDetail.LockQuantity += needQuantity - residueQuantity; |
| | |
| | | //return sugarQueryable.InnerJoin(sugarQueryable1, (a, b) => a.LocationCode == b.LocationCode).Select((a, b) => b).Includes(x => x.Details).ToList(); |
| | | } |
| | | |
| | | public List<Dt_StockInfo> GetStockInfos(string materielCode, List<string> locationCodes) |
| | | public List<Dt_StockInfo> GetStockInfos(string materielCode, string lotNo, List<string> locationCodes) |
| | | { |
| | | return Db.Queryable<Dt_StockInfo>().Where(x => locationCodes.Contains(x.LocationCode)).Includes(x => x.Details).Where(x => x.Details.Any(v => v.MaterielCode == materielCode)).ToList(); |
| | | return Db.Queryable<Dt_StockInfo>().Where(x => locationCodes.Contains(x.LocationCode)).Includes(x => x.Details).Where(x => x.Details.Any(v => v.MaterielCode == materielCode && v.BatchNo == lotNo)).ToList(); |
| | | |
| | | |
| | | //ISugarQueryable<Dt_LocationInfo> sugarQueryable = Db.Queryable<Dt_LocationInfo>().Where(x => locationCodes.Contains(x.LocationCode)); |
| | |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_DTO.Stock; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IOutboundRepository; |
| | | using WIDESEA_IRecordRepository; |
| | | using WIDESEA_IRecordService; |
| | | using WIDESEA_IStockRepository; |
| | |
| | | { |
| | | private readonly IMapper _mapper; |
| | | private readonly IBasicRepository _basicRepository; |
| | | private readonly IOutboundRepository _outboundRepository; |
| | | |
| | | public IStockInfoRepository Repository => BaseDal; |
| | | |
| | | public StockInfoService(IStockInfoRepository BaseDal, IMapper mapper, IBasicRepository basicRepository) : base(BaseDal) |
| | | public StockInfoService(IStockInfoRepository BaseDal, IMapper mapper, IBasicRepository basicRepository, IOutboundRepository outboundRepository) : base(BaseDal) |
| | | { |
| | | _mapper = mapper; |
| | | _basicRepository = basicRepository; |
| | | _outboundRepository = outboundRepository; |
| | | } |
| | | |
| | | public List<StockSelectViewDTO> GetStockSelectViews(int orderId, string materielCode) |
| | | { |
| | | try |
| | | { |
| | | Dt_OutboundOrder outboundOrder = _outboundRepository.OutboundOrderRepository.QueryFirst(x => x.Id == orderId); |
| | | if (outboundOrder == null) |
| | | { |
| | | throw new Exception($"æªæ¾å°åºåºåä¿¡æ¯"); |
| | | } |
| | | |
| | | List<string> locationCodes = _basicRepository.LocationInfoRepository.GetCanOutLocationCodes(outboundOrder.WarehouseId); |
| | | |
| | | return BaseDal.QueryTabs<Dt_StockInfo, Dt_StockInfoDetail, StockSelectViewDTO>((a, b) => a.Id == b.StockId, (a, b) => new StockSelectViewDTO |
| | | { |
| | | LocationCode = a.LocationCode, |
| | | MaterielCode = b.MaterielCode, |
| | | MaterielName = b.MaterielName, |
| | | PalletCode = a.PalletCode, |
| | | UseableQuantity = b.StockQuantity - b.OutboundQuantity |
| | | }, a => locationCodes.Contains(a.LocationCode), b => b.StockQuantity > b.OutboundQuantity && b.MaterielCode == materielCode, x => true).GroupBy(x => x.PalletCode).Select(x => new StockSelectViewDTO |
| | | { |
| | | LocationCode = x.FirstOrDefault()?.LocationCode ?? "", |
| | | MaterielCode = x.FirstOrDefault()?.MaterielCode ?? "", |
| | | MaterielName = x.FirstOrDefault()?.MaterielName ?? "", |
| | | PalletCode = x.Key, |
| | | UseableQuantity = x.Sum(x => x.UseableQuantity) |
| | | }).ToList(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | } |
| | | |
| | | public List<Dt_StockInfo> GetOutboundStocks(List<Dt_StockInfo> stockInfos, string materielCode, float needQuantity, out float residueQuantity) |
| | |
| | | return outStocks; |
| | | } |
| | | |
| | | public List<Dt_StockInfo> GetUseableStocks(string materielCode, int warehoseId) |
| | | public List<Dt_StockInfo> GetUseableStocks(string materielCode, string batchNo, int warehoseId) |
| | | { |
| | | List<string> locationCodes = _basicRepository.LocationInfoRepository.GetCanOutLocationCodes(warehoseId); |
| | | |
| | | return BaseDal.GetStockInfos(materielCode, locationCodes); |
| | | return BaseDal.GetStockInfos(materielCode, batchNo, locationCodes); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\WIDESEA_IBasicRepository\WIDESEA_IBasicRepository.csproj" /> |
| | | <ProjectReference Include="..\WIDESEA_IOutboundRepository\WIDESEA_IOutboundRepository.csproj" /> |
| | | <ProjectReference Include="..\WIDESEA_IRecordRepository\WIDESEA_IRecordRepository.csproj" /> |
| | | <ProjectReference Include="..\WIDESEA_IRecordService\WIDESEA_IRecordService.csproj" /> |
| | | <ProjectReference Include="..\WIDESEA_IStockService\WIDESEA_IStockService.csproj" /> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_IInboundService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.Inbound |
| | | { |
| | | [Route("api/PurchaseOrder")] |
| | | [ApiController] |
| | | public class PurchaseOrderController : ApiBaseController<IPurchaseOrderService, Dt_PurchaseOrder> |
| | | { |
| | | public PurchaseOrderController(IPurchaseOrderService service) : base(service) |
| | | { |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | } |
| | | |
| | | [HttpPost, HttpGet, Route("GetStockSelectViews")] |
| | | public List<StockSelectViewDTO> GetStockSelectViews(int orderId, string materielCode) |
| | | { |
| | | return Service.GetStockSelectViews(orderId, materielCode); |
| | | } |
| | | } |
| | | } |
| | |
| | | builder.Services.AddWebSocketSetup(); |
| | | builder.Services.AddSqlsugarSetup();//SqlSugar å¯å¨æå¡ |
| | | builder.Services.AddDbSetup();//Db å¯å¨æå¡ |
| | | builder.Services.AddInitializationHostServiceSetup();//åºç¨åå§åæå¡æ³¨å
¥ |
| | | //builder.Services.AddInitializationHostServiceSetup();//åºç¨åå§åæå¡æ³¨å
¥ |
| | | builder.Services.AddHostedService<PermissionDataHostService>();//åºç¨åå§åæå¡æ³¨å
¥ |
| | | builder.Services.AddAutoMapperSetup(); |
| | | |