| | |
| | | { |
| | | taskDTO.GroupId=task.GroupId; |
| | | } |
| | | if (task.TaskType==TaskTypeEnum.OutMesRworkProduct.ObjToInt()) |
| | | { |
| | | taskDTO.Priority = "127"; |
| | | } |
| | | //åéAGVä»»å¡ |
| | | WebResponseContent content = _taskService.AgvSendTask(taskDTO, APIEnum.Agv_CPSendTask); |
| | | if (!content.Status) |
| | |
| | | |
| | | //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | import gridBody from './extend/ScrapSheet.vue' |
| | | import gridHeader from './extend/AddErpProScrapSheet.vue' |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: '', |
| | | gridHeader: gridHeader, |
| | | gridBody: gridBody, |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | let addBtn = this.buttons.find(x => x.value == 'Add'); |
| | | if (addBtn) { |
| | | addBtn.onClick = function () { |
| | | this.$refs.gridHeader.open(); |
| | | } |
| | | }; |
| | | |
| | | this.columns.push({ |
| | | field: 'æä½', |
| | | title: 'æä½', |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <vol-box |
| | | v-model="showDetialBox" |
| | | :lazy="true" |
| | | width="1300px" |
| | | height="700px" |
| | | :padding="20" |
| | | title="æ·»å æåè¶
ææ¥åºæç»" |
| | | > |
| | | <div style="max-height: 700px; overflow-y: auto;"> |
| | | <el-form ref="form" :model="form" label-width="130px"> |
| | | <!-- ä»åºéæ© --> |
| | | <el-form-item required label="æå±ä»åºï¼"> |
| | | <el-select |
| | | v-model="form.warehouseId" |
| | | filterable |
| | | placeholder="è¯·éæ©ä»åº" |
| | | @change="handleWarehouseChange" |
| | | style="width: 100%;" |
| | | > |
| | | <el-option |
| | | v-for="item in warehouses" |
| | | :key="item.key" |
| | | :label="item.value" |
| | | :value="item.key" |
| | | > |
| | | <span style="float: left">{{ item.value }}</span> |
| | | <span style="float: right; color: #8492a6; font-size: 13px">{{ item.key }}</span> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <!-- åæ®ç¼å·ï¼åªè¯»ï¼ --> |
| | | <el-form-item required label="åæ®ç¼å·ï¼"> |
| | | <el-input |
| | | v-model="form.proScrapSheetOrderNo" |
| | | placeholder="ç³»ç»å°èªå¨çæ" |
| | | readonly |
| | | style="width: 100%;" |
| | | ></el-input> |
| | | </el-form-item> |
| | | |
| | | <!-- æç»å表 --> |
| | | <el-form-item label="æ¥åºæç»ï¼"> |
| | | <div v-for="(detail, index) in detailList" :key="index" class="detail-item"> |
| | | <div class="detail-header"> |
| | | <span>æç» {{ index + 1 }}</span> |
| | | <el-button |
| | | type="text" |
| | | size="mini" |
| | | color="#f56c6c" |
| | | @click="removeDetail(index)" |
| | | :disabled="detailList.length <= 1" |
| | | > |
| | | å é¤ |
| | | </el-button> |
| | | </div> |
| | | |
| | | <el-row :gutter="20" class="detail-row"> |
| | | <el-col :span="6"> |
| | | <el-form-item |
| | | required |
| | | :prop="'detailList.' + index + '.scrapProCode'" |
| | | :rules="{ required: true, message: 'è¯·éæ©äº§åç¼ç ', trigger: 'blur' }" |
| | | > |
| | | <el-select |
| | | v-model="detail.scrapProCode" |
| | | filterable |
| | | placeholder="产åç¼ç " |
| | | @change="handleProCodeChange(detail, index)" |
| | | clearable |
| | | style="width: 100%;" |
| | | > |
| | | <el-option |
| | | v-for="(code, index) in proCodeOptions" |
| | | :key="index" |
| | | :label="code" |
| | | :value="code" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :span="5"> |
| | | <el-form-item |
| | | required |
| | | :prop="'detailList.' + index + '.scrapProVersion'" |
| | | :rules="{ required: true, message: 'è¯·éæ©çæ¬', trigger: 'blur' }" |
| | | > |
| | | <el-select |
| | | v-model="detail.scrapProVersion" |
| | | filterable |
| | | placeholder="çæ¬" |
| | | clearable |
| | | style="width: 100%;" |
| | | > |
| | | <el-option |
| | | v-for="item in detail.versionOptions" |
| | | :key="item" |
| | | :label="item" |
| | | :value="item" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :span="5"> |
| | | <el-form-item |
| | | required |
| | | :prop="'detailList.' + index + '.scrapProLotNo'" |
| | | :rules="{ required: true, message: 'è¯·éæ©æ¹æ¬¡å·', trigger: 'blur' }" |
| | | > |
| | | <el-select |
| | | v-model="detail.scrapProLotNo" |
| | | filterable |
| | | placeholder="æ¹æ¬¡å·" |
| | | clearable |
| | | style="width: 100%;" |
| | | > |
| | | <el-option |
| | | v-for="item in detail.lotNoOptions" |
| | | :key="item" |
| | | :label="item" |
| | | :value="item" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :span="4"> |
| | | <el-form-item |
| | | required |
| | | :prop="'detailList.' + index + '.scrapPcsQty'" |
| | | :rules="{ |
| | | required: true, |
| | | message: '请è¾å
¥PCSæ°é', |
| | | trigger: 'blur', |
| | | validator: validateNumber // èªå®ä¹æ°åæ ¡éª |
| | | }" |
| | | > |
| | | <el-input |
| | | v-model="detail.scrapPcsQty" |
| | | placeholder="PCSæ°é" |
| | | style="width: 100%;" |
| | | @blur="formatNumber(detail, 'scrapPcsQty')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20" class="detail-row"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="夿³¨ï¼"> |
| | | <el-input |
| | | v-model="detail.remark" |
| | | placeholder="请è¾å
¥å¤æ³¨ä¿¡æ¯" |
| | | type="textarea" |
| | | rows="2" |
| | | style="width: 100%;" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | |
| | | <!-- æ·»å æç»æé® --> |
| | | <el-button |
| | | type="dashed" |
| | | size="small" |
| | | class="add-detail-btn" |
| | | @click="addDetail" |
| | | :disabled="detailList.length >= 10" |
| | | style="width: 100%; margin-top: 15px;" |
| | | > |
| | | <i class="el-icon-plus"></i> æ·»å æç» |
| | | </el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | |
| | | <!-- åºé¨æé® --> |
| | | <template #footer> |
| | | <el-button type="primary" size="mini" @click="submitForm" style="padding: 8px 20px;">确认æäº¤</el-button> |
| | | <el-button type="danger" size="mini" @click="close" style="padding: 8px 20px; margin-left: 10px;">å
³é</el-button> |
| | | </template> |
| | | </vol-box> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import VolBox from "@/components/basic/VolBox.vue"; |
| | | export default { |
| | | components: { VolBox }, |
| | | data() { |
| | | const validateNumber = (rule, value, callback) => { |
| | | if (!value) { |
| | | return callback(new Error('请è¾å
¥æ°é')); |
| | | } |
| | | const numberRegex = /^\d+(\.\d+)?$/; |
| | | if (!numberRegex.test(value)) { |
| | | return callback(new Error('请è¾å
¥ææçæ°å')); |
| | | } |
| | | if (parseFloat(value) <= 0) { |
| | | return callback(new Error('æ°éå¿
须大äº0')); |
| | | } |
| | | callback(); |
| | | }; |
| | | |
| | | return { |
| | | showDetialBox: false, |
| | | warehouses: [], |
| | | proCodeOptions: [], |
| | | form: { |
| | | warehouseId: "", |
| | | proScrapSheetOrderNo: "" |
| | | }, |
| | | |
| | | detailList: [ |
| | | { |
| | | scrapProCode: "", |
| | | scrapProVersion: "", |
| | | scrapProLotNo: "", |
| | | scrapPcsQty: "", |
| | | remark: "", |
| | | versionOptions: [], |
| | | lotNoOptions: [] |
| | | } |
| | | ], |
| | | validateNumber |
| | | }; |
| | | }, |
| | | methods: { |
| | | // æå¼å¼¹çª |
| | | open() { |
| | | this.initForm(); |
| | | this.showDetialBox = true; |
| | | }, |
| | | |
| | | // åå§å表å |
| | | initForm() { |
| | | this.form = { |
| | | warehouseId: "", |
| | | proScrapSheetOrderNo: "" |
| | | }; |
| | | this.detailList = [this.createEmptyDetail()]; |
| | | |
| | | // å è½½ä»åºå表 |
| | | if (this.warehouses.length === 0) { |
| | | this.getWarehouseList(); |
| | | } |
| | | }, |
| | | |
| | | // å建空æç» |
| | | createEmptyDetail() { |
| | | return { |
| | | scrapProCode: "", |
| | | scrapProVersion: "", |
| | | scrapProLotNo: "", |
| | | scrapPcsQty: "", |
| | | remark: "", |
| | | versionOptions: [], |
| | | lotNoOptions: [] |
| | | }; |
| | | }, |
| | | |
| | | // è·åä»åºå表 |
| | | getWarehouseList() { |
| | | this.http |
| | | .post("api/Warehouse/GetWarehouseDicByUser", null, "å è½½ä»åºæ°æ®ä¸") |
| | | .then((res) => { |
| | | if (!res.status) return this.$message.error(res.message); |
| | | this.warehouses = res.data || []; |
| | | // è¥åªæä¸ä¸ªä»åºï¼èªå¨éä¸ |
| | | if (this.warehouses.length === 1) { |
| | | this.form.warehouseId = this.warehouses[0].key; |
| | | this.handleWarehouseChange(this.warehouses[0].key); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // ä»åºåæ´äºä»¶ |
| | | handleWarehouseChange(warehouseId) { |
| | | if (!warehouseId) return; |
| | | // æ ¹æ®ä»åºIDå 载产åç¼ç å表 |
| | | this.http |
| | | .post(`api/ProStockInfo/GetProCodeByWarehouse?warehouseId=${this.form.warehouseId}`,null, "å è½½äº§åæ°æ®ä¸") |
| | | .then((res) => { |
| | | if (res.status) { |
| | | this.proCodeOptions = [...new Set(res.data)]; |
| | | } else { |
| | | this.$message.error(res.message); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // 产åç¼ç åæ´äºä»¶ |
| | | handleProCodeChange(detail, index) { |
| | | if (!detail.scrapProCode) { |
| | | detail.versionOptions = []; |
| | | detail.lotNoOptions = []; |
| | | return; |
| | | } |
| | | |
| | | // æ ¹æ®äº§åç¼ç å è½½çæ¬å表 |
| | | this.http |
| | | .post( |
| | | `api/ProStockInfo/GetProVersionByCode?scrapProCode=${detail.scrapProCode}&warehouseId=${this.form.warehouseId}`,null, "å è½½çæ¬æ°æ®ä¸") |
| | | .then((res) => { |
| | | if (res.status) { |
| | | detail.versionOptions = [...new Set(res.data)]; |
| | | } |
| | | }); |
| | | |
| | | // æ ¹æ®äº§åç¼ç å è½½æ¹æ¬¡å·å表 |
| | | this.http |
| | | .post(`api/ProStockInfo/GetProLotNoByCode?scrapProCode=${detail.scrapProCode}&warehouseId=${this.form.warehouseId}`,null, "å è½½æ¹æ¬¡æ°æ®ä¸") |
| | | .then((res) => { |
| | | if (res.status) { |
| | | detail.lotNoOptions = [...new Set(res.data)]; |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | formatNumber(detail, field) { |
| | | if (!detail[field]) return; |
| | | |
| | | let value = detail[field].replace(/[^0-9.]/g, ''); |
| | | |
| | | const decimalIndex = value.indexOf('.'); |
| | | if (decimalIndex !== -1) { |
| | | value = value.substring(0, decimalIndex + 1) + value.substring(decimalIndex + 1).replace(/\./g, ''); |
| | | } |
| | | |
| | | const parts = value.split('.'); |
| | | if (parts.length > 1 && parts[1].length > 2) { |
| | | parts[1] = parts[1].substring(0, 2); |
| | | value = parts.join('.'); |
| | | } |
| | | |
| | | detail[field] = value; |
| | | }, |
| | | |
| | | // æ·»å æç» |
| | | addDetail() { |
| | | this.detailList.push(this.createEmptyDetail()); |
| | | }, |
| | | |
| | | // å é¤æç» |
| | | removeDetail(index) { |
| | | this.detailList.splice(index, 1); |
| | | }, |
| | | |
| | | // æäº¤è¡¨å |
| | | submitForm() { |
| | | if (!this.form.warehouseId) { |
| | | return this.$message.error("è¯·éæ©æå±ä»åº"); |
| | | } |
| | | |
| | | const invalidDetail = this.detailList.find(item => |
| | | !item.scrapProCode || !item.scrapProVersion || !item.scrapProLotNo || !item.scrapPcsQty || isNaN(parseFloat(item.scrapPcsQty))|| parseFloat(item.scrapPcsQty) <= 0 |
| | | ); |
| | | |
| | | if (invalidDetail) { |
| | | return this.$message.error("è¯·ä¸ºæææç»è¾å
¥ææçæ°éå¼ï¼å¤§äº0çæ°åï¼"); |
| | | } |
| | | |
| | | const submitData = { |
| | | warehouseId: this.form.warehouseId, |
| | | details: this.detailList.map(item => ({ |
| | | scrapProCode: item.scrapProCode, |
| | | scrapProVersion: item.scrapProVersion, |
| | | scrapProLotNo: item.scrapProLotNo, |
| | | scrapPcsQty: parseFloat(item.scrapPcsQty), |
| | | remark: item.remark |
| | | })) |
| | | }; |
| | | |
| | | this.http |
| | | .post("api/ErpProScrapSheet/Save", submitData, "æäº¤ä¸") |
| | | .then((res) => { |
| | | if (!res.status) return this.$message.error(res.message); |
| | | this.$message.success("æä½æå"); |
| | | this.close(); |
| | | this.$emit("parentCall", ($vue) => { |
| | | $vue.refresh(); |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | // å
³éå¼¹çª |
| | | close() { |
| | | this.showDetialBox = false; |
| | | } |
| | | }, |
| | | created() { |
| | | // åå§åæ¶é¢å è½½ä»åºæ°æ® |
| | | if (this.warehouses.length === 0) { |
| | | this.getWarehouseList(); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .detail-item { |
| | | border: 1px solid #e4e7ed; |
| | | border-radius: 6px; |
| | | padding: 15px; |
| | | margin-bottom: 20px; |
| | | box-shadow: 0 2px 4px rgba(0,0,0,0.05); |
| | | } |
| | | |
| | | .detail-header { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | margin-bottom: 15px; |
| | | padding-bottom: 10px; |
| | | border-bottom: 1px dashed #e4e7ed; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .detail-row { |
| | | margin-bottom: 15px; |
| | | } |
| | | |
| | | .add-detail-btn { |
| | | height: 40px; |
| | | line-height: 38px; |
| | | } |
| | | |
| | | ::-webkit-scrollbar { |
| | | width: 8px; |
| | | height: 8px; |
| | | } |
| | | ::-webkit-scrollbar-thumb { |
| | | background-color: #ddd; |
| | | border-radius: 4px; |
| | | } |
| | | ::-webkit-scrollbar-track { |
| | | background-color: #f5f5f5; |
| | | } |
| | | </style> |
| | |
| | | prop: "overScrapSETQty", |
| | | title: "å·²æ¥åºSETæ°", |
| | | type: "int", |
| | | width: 180, |
| | | width: 120, |
| | | }, |
| | | { |
| | | prop: "overScrapPcsQty", |
| | | title: "å·²æ¥åºPCSæ°", |
| | | type: "string", |
| | | width: 180, |
| | | width: 120, |
| | | }, |
| | | { |
| | | prop: "scrapProDetailStatus", |
| | | title: "订åæç»ç¶æ", |
| | | type: "string", |
| | | width: 180, |
| | | } |
| | | }, |
| | | { |
| | | prop: "remark", |
| | | title: "夿³¨", |
| | | type: "string", |
| | | width: 180, |
| | | } |
| | | ], |
| | | }; |
| | | }, |
| | |
| | | const editFormFields = ref({}); |
| | | const editFormOptions = ref([ |
| | | [ |
| | | { |
| | | title: "ä»åº", |
| | | field: "warehouseId", |
| | | type: "select", |
| | | dataKey: "warehouses", |
| | | data: [], |
| | | required: true, |
| | | }, |
| | | { |
| | | title: "æ°é", |
| | | field: "count", |
| | | type: "int", |
| | | required: true, |
| | | }, |
| | | |
| | | ], |
| | | ]); |
| | | const searchFormFields = ref({ |
| | |
| | | [PropertyValidate("卿", NotNullAndEmpty = true)] |
| | | public string DateCode { get; set; } |
| | | /// <summary> |
| | | /// éæ±æ°é |
| | | /// éæ±PCSæ°é |
| | | /// </summary> |
| | | [PropertyValidate("éæ±æ°é", NotNullAndEmpty = true)] |
| | | public float RequiredQuantity { get; set; } |
| | | /// <summary> |
| | | /// éæ±SETæ°é |
| | | /// </summary> |
| | | public float RequiredSetCount { get; set; } |
| | | /// <summary> |
| | | /// ä»åº |
| | | /// </summary> |
| | | public string WarehouseCode { get; set; } |
| | | /// <summary> |
| | | /// å·¥å |
| | | /// </summary> |
| | | public string FactoryCode { get; set; } |
| | | public string FactoryCode { get; set; } = "HA02"; |
| | | /// <summary> |
| | | /// æ¥æ¶ |
| | | /// </summary> |
| | | public int ReceiveDown { get; set; } |
| | | /// <summary> |
| | | /// éå®è®¢å |
| | | /// </summary> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.Attributes; |
| | | |
| | | namespace WIDESEA_DTO.Outbound |
| | | { |
| | | /// <summary> |
| | | /// æåæ¥åºåæ°å¢ |
| | | /// </summary> |
| | | [ModelValidate] |
| | | public class ErpProScrapSheetModel |
| | | { |
| | | // <summary> |
| | | /// ä»åºId |
| | | /// </summary> |
| | | [PropertyValidate("ä»åºId", NotNullAndEmpty = true)] |
| | | public int WarehouseId { get; set; } |
| | | /// <summary> |
| | | /// åæ®ç¼å· |
| | | /// </summary> |
| | | [PropertyValidate("åæ®ç¼å·", NotNullAndEmpty = true)] |
| | | public string ProScrapSheetOrderNo { get; set; } |
| | | /// <summary> |
| | | /// æ¥åºæç» |
| | | /// </summary> |
| | | [PropertyValidate("æ¥åºæç»", NotNullAndEmpty = true)] |
| | | public List<ErpProScrapSheetDetailDTO> Details { get; set; } |
| | | } |
| | | |
| | | [ModelValidate] |
| | | public class ErpProScrapSheetDetailDTO |
| | | { |
| | | /// <summary> |
| | | /// 产åç¼ç |
| | | /// </summary> |
| | | [PropertyValidate("产åç¼ç ", NotNullAndEmpty = true)] |
| | | public string ScrapProCode { get; set; } |
| | | /// <summary> |
| | | /// æ¥åºçæ¬ |
| | | /// </summary> |
| | | [PropertyValidate("æ¥åºçæ¬", NotNullAndEmpty = true)] |
| | | public string ScrapProVersion { get; set; } |
| | | /// <summary> |
| | | /// æ¹æ¬¡å· |
| | | /// </summary> |
| | | [PropertyValidate("æ¹æ¬¡å·", NotNullAndEmpty = true)] |
| | | public string ScrapProLotNo { get; set; } |
| | | /// <summary> |
| | | /// æ¥åºSETæ°é |
| | | /// </summary> |
| | | [PropertyValidate("æ¥åºSETæ°é", NotNullAndEmpty = true)] |
| | | public int ScrapSETQty { get; set; } |
| | | /// <summary> |
| | | /// æ¥åºPCSæ° |
| | | /// </summary> |
| | | [PropertyValidate("æ¥åºPCSæ°", NotNullAndEmpty = true)] |
| | | public int ScrapPcsQty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | [PropertyValidate("夿³¨", NotNullAndEmpty = false)] |
| | | public string Remark { get; set; } |
| | | } |
| | | |
| | | } |
| | |
| | | using WIDESEA_Core; |
| | | using WIDESEA_IOutboundRepository; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_DTO.Outbound; |
| | | |
| | | namespace WIDESEA_IOutboundService |
| | | { |
| | | public interface IErpProScrapSheetService : IService<Dt_ErpProScrapSheet> |
| | | { |
| | | IErpProScrapSheetRepository Repository { get; } |
| | | public WebResponseContent Save(ErpProScrapSheetModel addProScrapSheet); |
| | | } |
| | | } |
| | |
| | | /// è·åæåæ¥åºçåºå |
| | | /// </summary> |
| | | List<Dt_ProStockInfo> GetOutboundStocks(List<Dt_ProStockInfo> stockInfos, Dt_ErpProScrapSheetDetail outOrderDetail, float needQuantity, out float residueQuantity); |
| | | /// <summary> |
| | | /// æ¥åºååºå产åç¼å·æ¥è¯¢ |
| | | /// </summary> |
| | | /// <param name="warehouseId"></param> |
| | | /// <returns></returns> |
| | | public WebResponseContent GetProCodeByWarehouse(int warehouseId); |
| | | /// <summary> |
| | | /// æ¥åºååºåçæ¬æ¥è¯¢ |
| | | /// </summary> |
| | | /// <param name="scrapProCode"></param> |
| | | /// <returns></returns> |
| | | public WebResponseContent GetProVersionByCode(string scrapProCode,int warehouseId); |
| | | /// <summary> |
| | | /// æ¥åºååºåæ¹æ¬¡å·æ¥è¯¢ |
| | | /// </summary> |
| | | /// <param name="scrapProCode"></param> |
| | | /// <returns></returns> |
| | | public WebResponseContent GetProLotNoByCode(string scrapProCode, int warehouseId); |
| | | } |
| | | } |
| | |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "卿")] |
| | | public string DateCode { get; set; } |
| | | /// <summary> |
| | | /// éæ±æ°é |
| | | /// éæ±PCSæ°é |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "éæ±æ°é", DefaultValue = "0")] |
| | | public float RequiredQuantity { get; set; } |
| | | /// <summary> |
| | | /// éæ±SETæ°é |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "éæ±æ°é", DefaultValue = "0")] |
| | | public float RequiredSetCount { get; set; } |
| | | /// <summary> |
| | | /// å·¥å |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "å·¥å")] |
| | |
| | | using System; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.CodeConfigEnum; |
| | | using WIDESEA_Core.DB; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_Core.Seed; |
| | | using WIDESEA_DTO.Outbound; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_IOutboundRepository; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_Model.Models; |
| | |
| | | public partial class ErpProScrapSheetService : ServiceBase<Dt_ErpProScrapSheet, IErpProScrapSheetRepository>, IErpProScrapSheetService |
| | | { |
| | | private readonly IUnitOfWorkManage _unitOfWorkManage; |
| | | private readonly IWarehouseService _warehouseService; |
| | | |
| | | public IErpProScrapSheetRepository Repository => BaseDal; |
| | | |
| | | public ErpProScrapSheetService(IErpProScrapSheetRepository BaseDal, IUnitOfWorkManage unitOfWorkManage) : base(BaseDal) |
| | | public ErpProScrapSheetService(IErpProScrapSheetRepository BaseDal, IUnitOfWorkManage unitOfWorkManage,IWarehouseService warehouseService) : base(BaseDal) |
| | | { |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | | _warehouseService = warehouseService; |
| | | } |
| | | public override WebResponseContent AddData(SaveModel saveModel) |
| | | { |
| | |
| | | } |
| | | return base.AddData(saveModel); |
| | | } |
| | | public WebResponseContent Save(ErpProScrapSheetModel addProScrapSheet) { |
| | | try |
| | | { |
| | | List<Dt_ErpProScrapSheetDetail> erpProScrapSheetDetails = new List<Dt_ErpProScrapSheetDetail>(); |
| | | if (addProScrapSheet.Details != null) |
| | | { |
| | | foreach (var model in addProScrapSheet.Details) |
| | | { |
| | | Dt_ErpProScrapSheetDetail erpProScrapSheetDetail = new Dt_ErpProScrapSheetDetail() |
| | | { |
| | | ScrapProCode = model.ScrapProCode, |
| | | ScrapProVersion = model.ScrapProVersion, |
| | | ScrapProLotNo = model.ScrapProLotNo, |
| | | ScrapPcsQty = model.ScrapPcsQty, |
| | | ScrapSETQty = 0, |
| | | }; |
| | | erpProScrapSheetDetails.Add(erpProScrapSheetDetail); |
| | | } |
| | | } |
| | | Dt_ErpProScrapSheet erpProScrapSheet = new Dt_ErpProScrapSheet() |
| | | { |
| | | WarehouseId = addProScrapSheet.WarehouseId, |
| | | ProScrapSheetOrderNo = CreateCodeByRule(nameof(RuleCodeEnum.ProScrapSheetRule)), |
| | | ProScrapStatus = ProScrapSheetStatusEnum.TOChecked.ObjToInt(), |
| | | Details = erpProScrapSheetDetails |
| | | }; |
| | | _unitOfWorkManage.BeginTran(); |
| | | Db.InsertNav(erpProScrapSheet).Include(x => x.Details).ExecuteCommand(); |
| | | _unitOfWorkManage.CommitTran(); |
| | | return WebResponseContent.Instance.OK(); |
| | | |
| | | } |
| | | catch(Exception ex) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | |
| | | } |
| | | static object lock_code = new object(); |
| | | public string CreateCodeByRule(string ruleCode) |
| | | { |
| | | lock (lock_code) |
| | | { |
| | | |
| | | string code = string.Empty; |
| | | DateTime dateTime = DateTime.Now; |
| | | DateTime now = DateTime.Now; |
| | | try |
| | | { |
| | | if (string.IsNullOrEmpty(ruleCode)) |
| | | throw new ArgumentNullException(nameof(ruleCode)); |
| | | SqlSugarClient sugarClient = new SqlSugarClient(new ConnectionConfig |
| | | { |
| | | IsAutoCloseConnection = true, |
| | | DbType = DbType.SqlServer, |
| | | ConnectionString = DBContext.ConnectionString |
| | | }); |
| | | Dt_CodeRuleConfig codeRuleConfig = sugarClient.Queryable<Dt_CodeRuleConfig>().Where(x => x.RuleCode == ruleCode).First(); |
| | | if (codeRuleConfig == null) |
| | | throw new ArgumentNullException(nameof(codeRuleConfig)); |
| | | if (codeRuleConfig.ModifyDate != null) |
| | | { |
| | | dateTime = Convert.ToDateTime(codeRuleConfig.ModifyDate); |
| | | } |
| | | else |
| | | { |
| | | dateTime = Convert.ToDateTime(codeRuleConfig.CreateDate); |
| | | } |
| | | |
| | | if (now.Year == dateTime.Year && now.Month == dateTime.Month && now.Day == dateTime.Day) |
| | | { |
| | | now = dateTime; |
| | | codeRuleConfig.CurrentVal = Convert.ToInt32(codeRuleConfig.CurrentVal) + 1; |
| | | } |
| | | else |
| | | { |
| | | codeRuleConfig.CurrentVal = 1; |
| | | } |
| | | codeRuleConfig.ModifyDate = DateTime.Now; |
| | | code = codeRuleConfig.Format; |
| | | code = code.Replace($"[{CodeFormatTypeEnum.YYYY}]", now.Year.ToString().PadLeft(4, '0')); |
| | | code = code.Replace($"[{CodeFormatTypeEnum.MM}]", now.Month.ToString().PadLeft(2, '0')); |
| | | code = code.Replace($"[{CodeFormatTypeEnum.DD}]", now.Day.ToString().PadLeft(2, '0')); |
| | | code = code.Replace($"[{CodeFormatTypeEnum.ST}]", codeRuleConfig.StartStr?.ToString() ?? ""); |
| | | code = code.Replace($"[{CodeFormatTypeEnum.NUM}]", codeRuleConfig.CurrentVal.ToString().PadLeft(codeRuleConfig.Length, '0')); |
| | | Dictionary<string, object> keyValuePairs = new Dictionary<string, object>() { { nameof(codeRuleConfig.CurrentVal), codeRuleConfig.CurrentVal }, { nameof(codeRuleConfig.Id), codeRuleConfig.Id }, { nameof(codeRuleConfig.ModifyDate), DateTime.Now } }; |
| | | sugarClient.Updateable(keyValuePairs).AS(MainDb.CodeRuleConfig).WhereColumns(nameof(codeRuleConfig.Id)).ExecuteCommand(); |
| | | sugarClient.Updateable(codeRuleConfig); |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | |
| | | } |
| | | return code; |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | proStockInfos = Db.Queryable<Dt_ProStockInfo>().Where(x => locationInfos.Contains(x.LocationCode)) |
| | | .Includes(x => x.proStockInfoDetails) |
| | | .Where(x => x.proStockInfoDetails |
| | | .Any(v => v.SaleOrder == mesRworkOutboundOrder.SaleOrder |
| | | && v.ProductCode == mesRworkOutboundOrder.ProductCode |
| | | .Any(v => v.ProductCode == mesRworkOutboundOrder.ProductCode |
| | | && v.ProductVersion == mesRworkOutboundOrder.ProductVersion |
| | | && (isCanDate ? isCanDate : v.DateCode == mesRworkOutboundOrder.DateCode) |
| | | )) |
| | |
| | | public List<Dt_ProStockInfo> GetUseableStocks(Dt_MesRworkOutboundOrder mesRworkOutboundOrder) |
| | | { |
| | | //è½¬æ¢æ æåä»ä»åºä¿¡æ¯è·åå°¾æ°å±æ§çè´§ä½ |
| | | Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x=>x.WarehouseCode==WarehouseEnum.HA71.ToString()); |
| | | Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x=>x.WarehouseId== mesRworkOutboundOrder.WarehouseId); |
| | | List<string> locationCodes = _basicRepository.LocationInfoRepository.GetCanOutLocationCodes(warehouse.WarehouseId); |
| | | return BaseDal.GetProStocks(mesRworkOutboundOrder, locationCodes); |
| | | } |
| | |
| | | public List<Dt_ProStockInfo> GetOutboundStocks(List<Dt_ProStockInfo> stockInfos, Dt_ProOutOrderDetail outOrderDetail, float needQuantity, out float residueQuantity) |
| | | { |
| | | List<Dt_ProStockInfo> assignOutStocks =new List<Dt_ProStockInfo>(); |
| | | float stockTotalQuantity = stockInfos.Select(x => x.proStockInfoDetails.Sum(v => v.StockPcsQty - v.OutboundQuantity)).Sum(x => x); |
| | | //stockInfos = stockInfos.OrderBy(x => x.Id).ToList(); |
| | | bool isCanLot = string.IsNullOrEmpty(outOrderDetail.PLot); |
| | | bool isCanDate = string.IsNullOrEmpty(outOrderDetail.DateCode); |
| | | float stockTotalQuantity = stockInfos.Select(x => x.proStockInfoDetails.Where(x => x.ProductCode == outOrderDetail.PCode && x.ProductVersion.StartsWith(outOrderDetail.PVer.Substring(0, 1)) |
| | | && (isCanLot ? isCanLot : x.BagNo == outOrderDetail.PLot) |
| | | && (isCanDate ? isCanDate : x.DateCode == outOrderDetail.DateCode)) |
| | | .Sum(v => v.StockPcsQty - v.OutboundQuantity)).Sum(x => x); |
| | | //stockInfos = stockInfos.OrderBy(x => x.Id).ToList(); |
| | | |
| | | if (stockTotalQuantity >= needQuantity)//åºåå¤ |
| | | { |
| | | int index = 0; |
| | |
| | | public List<Dt_ProStockInfo> GetOutboundStocks(List<Dt_ProStockInfo> stockInfos, Dt_ErpProScrapSheetDetail outOrderDetail, float needQuantity, out float residueQuantity) |
| | | { |
| | | List<Dt_ProStockInfo> assignOutStocks = new List<Dt_ProStockInfo>(); |
| | | float stockTotalQuantity = stockInfos.Select(x => x.proStockInfoDetails.Sum(v => v.StockPcsQty - v.OutboundQuantity)).Sum(x => x); |
| | | float stockTotalQuantity = stockInfos.Select(x => x.proStockInfoDetails.Where(x => |
| | | x.ProductCode == outOrderDetail.ScrapProCode |
| | | && x.ProductVersion == outOrderDetail.ScrapProVersion |
| | | && x.LotNumber == outOrderDetail.ScrapProLotNo).Sum(v => v.StockPcsQty - v.OutboundQuantity)).Sum(x => x); |
| | | //stockInfos = stockInfos.OrderBy(x => x.Id).ToList(); |
| | | if (stockTotalQuantity >= needQuantity)//åºåå¤ |
| | | { |
| | |
| | | public List<Dt_ProStockInfo> GetOutboundStocks(List<Dt_ProStockInfo> stockInfos, Dt_MesRworkOutboundOrder mesRworkOutboundOrder, float needQuantity, out float residueQuantity) |
| | | { |
| | | List<Dt_ProStockInfo> assignOutStocks = new List<Dt_ProStockInfo>(); |
| | | float stockTotalQuantity = stockInfos.Select(x => x.proStockInfoDetails.Sum(v => v.StockPcsQty - v.OutboundQuantity)).Sum(x => x); |
| | | //stockInfos = stockInfos.OrderBy(x => x.Id).ToList(); |
| | | bool isCanDate = string.IsNullOrEmpty(mesRworkOutboundOrder.DateCode); |
| | | float stockTotalQuantity = stockInfos.Select(x => x.proStockInfoDetails.Where(x => x.ProductCode == mesRworkOutboundOrder.ProductCode |
| | | && x.ProductVersion == mesRworkOutboundOrder.ProductVersion |
| | | && (isCanDate ? isCanDate : x.DateCode == mesRworkOutboundOrder.DateCode)) |
| | | .Sum(v => v.StockPcsQty - v.OutboundQuantity)).Sum(x => x); |
| | | //stockInfos = stockInfos.OrderBy(x => x.Id).ToList(); |
| | | if (stockTotalQuantity >= needQuantity)//åºåå¤ |
| | | { |
| | | int index = 0; |
| | |
| | | { |
| | | Dt_ProStockInfo stockInfo = stockInfos[index]; |
| | | float useableStockQuantity = stockInfo.proStockInfoDetails |
| | | .Where(x => x.SaleOrder == mesRworkOutboundOrder.SaleOrder |
| | | && x.ProductCode == mesRworkOutboundOrder.ProductCode |
| | | .Where(x => x.ProductCode == mesRworkOutboundOrder.ProductCode |
| | | && x.ProductVersion == mesRworkOutboundOrder.ProductVersion |
| | | && (isCanDate? isCanDate: x.DateCode == mesRworkOutboundOrder.DateCode)) |
| | | .Sum(x => x.StockPcsQty - x.OutboundQuantity); |
| | |
| | | { |
| | | stockInfo.proStockInfoDetails.ForEach(x => |
| | | { |
| | | if ((x.StockPcsQty > x.OutboundQuantity) && x.SaleOrder == mesRworkOutboundOrder.SaleOrder |
| | | if ((x.StockPcsQty > x.OutboundQuantity) |
| | | && x.ProductCode == mesRworkOutboundOrder.ProductCode |
| | | && x.ProductVersion == mesRworkOutboundOrder.ProductVersion |
| | | && (isCanDate ? isCanDate : x.DateCode == mesRworkOutboundOrder.DateCode)) |
| | |
| | | // } |
| | | // return (deleteStockDetails, updateStockDetails); |
| | | //} |
| | | public WebResponseContent GetProCodeByWarehouse(int warehouseId) |
| | | { |
| | | try |
| | | { |
| | | List<Dt_ProStockInfo> proStockInfo = BaseDal.QueryData(x => x.WarehouseId == warehouseId); |
| | | List<int> proStockId = proStockInfo.Select(x => x.Id).ToList(); |
| | | List<Dt_ProStockInfoDetail> proStockInfoDetails = BaseDal.Db.Queryable<Dt_ProStockInfoDetail>().Where(x => proStockId.Contains(x.OutDetailId)).ToList(); |
| | | List<string> proCode = proStockInfoDetails.Select(x => x.ProductCode).ToList(); |
| | | return WebResponseContent.Instance.OK(data: proCode); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | |
| | | public WebResponseContent GetProVersionByCode(string scrapProCode, int warehouseId) |
| | | { |
| | | try |
| | | { |
| | | List<Dt_ProStockInfo> proStockInfo = BaseDal.QueryData(x => x.WarehouseId == warehouseId); |
| | | List<int> proStockId = proStockInfo.Select(x => x.Id).ToList(); |
| | | List<Dt_ProStockInfoDetail> proStockInfoDetails = BaseDal.Db.Queryable<Dt_ProStockInfoDetail>().Where(x => scrapProCode.Contains(x.ProductCode) && proStockId.Contains(x.OutDetailId)).ToList(); |
| | | List<string> productVersion = proStockInfoDetails.Select(x => x.ProductVersion).ToList(); |
| | | return WebResponseContent.Instance.OK(data: productVersion); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | |
| | | public WebResponseContent GetProLotNoByCode(string scrapProCode, int warehouseId) |
| | | { |
| | | try |
| | | { |
| | | List<Dt_ProStockInfo> proStockInfo = BaseDal.QueryData(x => x.WarehouseId == warehouseId); |
| | | List<int> proStockId = proStockInfo.Select(x => x.Id).ToList(); |
| | | List<Dt_ProStockInfoDetail> proStockInfoDetails = BaseDal.Db.Queryable<Dt_ProStockInfoDetail>().Where(x => scrapProCode.Contains(x.ProductCode) && proStockId.Contains(x.OutDetailId)).ToList(); |
| | | List<string> lotNumber = proStockInfoDetails.Select(x => x.LotNumber).ToList(); |
| | | return WebResponseContent.Instance.OK(data: lotNumber); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | MesResponseContent content = new MesResponseContent(); |
| | | try |
| | | { |
| | | Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA72.ToString()); |
| | | Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == model.WarehouseCode); |
| | | if (warehouse == null) |
| | | { |
| | | return content.Error($"å°¾æ°ä»ä¿¡æ¯æªé
ç½®"); |
| | |
| | | { |
| | | WarehouseId = warehouse.WarehouseId, |
| | | TaskNo = model.TaskNo, |
| | | OrderStatus = OutOrderStatusEnum.æªå¼å§.ObjToInt(), |
| | | OrderStatus = OutOrderStatusEnum.åºåºä¸.ObjToInt(), |
| | | CreateType = OrderCreateTypeEnum.UpperSystemPush.ObjToInt(), |
| | | ProductCode = model.ProductCode, |
| | | ProductName = model.ProductName, |
| | | ProductName = model.ProductCode, |
| | | ProductVersion = model.ProductVersion, |
| | | DateCode = model.DateCode, |
| | | RequiredQuantity = model.RequiredQuantity, |
| | | RequiredSetCount=model.RequiredSetCount, |
| | | FactoryCode = model.FactoryCode, |
| | | SaleOrder = model.SaleOrder, |
| | | SaleOrder = model.SaleOrder ?? "", |
| | | OrderType = model.InventoryType |
| | | }; |
| | | if (model.DateCode.IndexOf("å¹³åº")>0 || warehouse.WarehouseCode==WarehouseEnum.HA101.ToString()) |
| | | { |
| | | Dt_Warehouse warehousePing = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA101.ToString()); |
| | | mesRworkOutboundOrder.WarehouseId = warehousePing.WarehouseId; |
| | | mesRworkOutboundOrder.OrderStatus = OutOrderStatusEnum.åºåºå®æ.ObjToInt(); |
| | | _unitOfWorkManage.BeginTran(); |
| | | _outboundService.RworkOutboundOrderService.Repository.AddData(mesRworkOutboundOrder); |
| | | MesInventoryInfo mesInventoryInfo = new MesInventoryInfo() |
| | | { |
| | | Warhouseno = warehousePing.WarehouseCode, |
| | | InternalPackageNumber = model.ProductCode, |
| | | SetCount = (int)model.RequiredSetCount, |
| | | EligiblePcsCount = (int)model.RequiredQuantity |
| | | }; |
| | | |
| | | MesProductOutBound mesProductOutBound = new MesProductOutBound() |
| | | { |
| | | TaskNo = mesRworkOutboundOrder.TaskNo, |
| | | ProductCode = mesRworkOutboundOrder.ProductCode, |
| | | ProductVersion = mesRworkOutboundOrder.ProductVersion, |
| | | DateCode = mesRworkOutboundOrder.DateCode, |
| | | SaleOrder = mesRworkOutboundOrder.SaleOrder, |
| | | InventoryInfo = new List<MesInventoryInfo> { mesInventoryInfo } |
| | | }; |
| | | if (model.ReceiveDown==EnableEnum.Enable.ObjToInt()) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | } |
| | | else |
| | | { |
| | | //MESæååºåæ¿åºåºåæ¥ |
| | | WebResponseContent responseContentPing = _outboundService.RworkOutboundOrderService.ProductOutBoundSync(mesProductOutBound); |
| | | if (!responseContentPing.Status) |
| | | { |
| | | throw new Exception("忥MESåºåæ¿åºåºå¤±è´¥,é误:" + responseContentPing.Message); |
| | | } |
| | | _unitOfWorkManage.CommitTran(); |
| | | } |
| | | return content.OK($"æä¾è¿åºåæ¥æ¶æå,ReceiveDown:{model.ReceiveDown}"); |
| | | } |
| | | List<Dt_Task> tasks = new List<Dt_Task>(); |
| | | List<Dt_ProStockInfo>? proStockInfos = null; |
| | | List<Dt_OutProStockInfo>? outProStockInfos = null; |
| | |
| | | |
| | | if (!updateContent.Status) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | return content.Error(updateContent.Message); |
| | | throw new Exception(updateContent.Message); |
| | | } |
| | | } |
| | | _outboundService.RworkOutboundOrderService.Repository.AddData(mesRworkOutboundOrder); |
| | | //MESæååºåæ¿åºåºåæ¥ |
| | | WebResponseContent responseContent = _outboundService.RworkOutboundOrderService.ProductOutBoundSync(_outboundService.RworkOutboundOrderService.MesProOutBound(mesRworkOutboundOrder, proStockInfoDetails)); |
| | | if (!responseContent.Status) |
| | | if (model.ReceiveDown == EnableEnum.Enable.ObjToInt()) |
| | | { |
| | | throw new Exception("忥MESåºåæ¿åºåºå¤±è´¥,é误:" + responseContent.Message); |
| | | _unitOfWorkManage.RollbackTran(); |
| | | } |
| | | _unitOfWorkManage.CommitTran(); |
| | | return content.OK("æä¾è¿åºåæ¥æ¶æå"); |
| | | else |
| | | { |
| | | //MESæååºåæ¿åºåºåæ¥ |
| | | WebResponseContent responseContent = _outboundService.RworkOutboundOrderService.ProductOutBoundSync(_outboundService.RworkOutboundOrderService.MesProOutBound(mesRworkOutboundOrder, proStockInfoDetails)); |
| | | if (!responseContent.Status) |
| | | { |
| | | throw new Exception("忥MESåºåæ¿åºåºå¤±è´¥,é误:" + responseContent.Message); |
| | | } |
| | | _unitOfWorkManage.CommitTran(); |
| | | } |
| | | return content.OK($"æä¾è¿åºåæ¥æ¶æå,ReceiveDown:{model.ReceiveDown}"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | using WIDESEA_Core; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_DTO.Outbound; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.Outbound |
| | | { |
| | |
| | | public ErpProScrapSheetController(IErpProScrapSheetService service) : base(service) |
| | | { |
| | | } |
| | | [HttpGet,HttpPost,Route("Save"),AllowAnonymous] |
| | | public WebResponseContent Save([FromBody] ErpProScrapSheetModel addProScrapSheet) |
| | | { |
| | | return Service.Save(addProScrapSheet); |
| | | } |
| | | } |
| | | } |
| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models; |
| | |
| | | public ProStockInfoController(IProStockInfoService service) : base(service) |
| | | { |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¥åºååºå产åç¼å·æ¥è¯¢ |
| | | /// </summary> |
| | | /// <param name="warehouseId"></param> |
| | | /// <returns></returns> |
| | | [HttpPost,HttpGet,Route("GetProCodeByWarehouse"),AllowAnonymous] |
| | | public WebResponseContent GetProCodeByWarehouse(int warehouseId) |
| | | { |
| | | return Service.GetProCodeByWarehouse(warehouseId); |
| | | } |
| | | /// <summary> |
| | | /// æ¥åºååºåçæ¬æ¥è¯¢ |
| | | /// </summary> |
| | | /// <param name="warehouseId"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("GetProVersionByCode"), AllowAnonymous] |
| | | public WebResponseContent GetProVersionByCode(string scrapProCode,int warehouseId) |
| | | { |
| | | return Service.GetProVersionByCode(scrapProCode,warehouseId); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¥åºååºåçæ¬æ¥è¯¢ |
| | | /// </summary> |
| | | /// <param name="warehouseId"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("GetProLotNoByCode"), AllowAnonymous] |
| | | public WebResponseContent GetProLotNoByCode(string scrapProCode, int warehouseId) |
| | | { |
| | | return Service.GetProLotNoByCode(scrapProCode, warehouseId); |
| | | } |
| | | } |
| | | } |