浏览代码

feat:排产计划删除功能

hmc 1 年之前
父节点
当前提交
6f95bcae5e

+ 11 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/controller/DetailsOfTheRefuelingPlanController.java

@@ -104,4 +104,15 @@ public class DetailsOfTheRefuelingPlanController extends BaseController {
     public AjaxResult remove(@PathVariable Long[] ids) {
         return toAjax(detailsOfTheRefuelingPlanService.deleteDetailsOfTheRefuelingPlanByIds(ids));
     }
+
+    /**
+     * 删除加弹计划详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:plan:remove')")
+    @Log(title = "加弹计划详细信息", businessType = BusinessType.DELETE)
+    @DeleteMapping("/remove/{id}")
+    @ApiOperation(value = "删除加弹计划详细信息")
+    public AjaxResult remove(@PathVariable("id")String id) {
+        return toAjax(detailsOfTheRefuelingPlanService.deleteDetailsOfTheRefuelingPlanById(Long.valueOf(id)));
+    }
 }

+ 9 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/controller/DetailsOfTheRefuelingPlanSpinningController.java

@@ -139,4 +139,13 @@ public class DetailsOfTheRefuelingPlanSpinningController extends BaseController
     public AjaxResult remove(@PathVariable Long[] ids) {
         return toAjax(detailsOfTheRefuelingPlanSpinningService.deleteDetailsOfTheRefuelingPlanSpinningByIds(ids));
     }
+
+
+    @PreAuthorize("@ss.hasPermi('system:spinning:remove')")
+    @Log(title = "纺丝计划详细信息", businessType = BusinessType.DELETE)
+    @DeleteMapping("/remove/{id}")
+    @ApiOperation(value = "删除纺丝计划详细信息")
+    public AjaxResult remove(@PathVariable("id") String id) {
+        return toAjax(detailsOfTheRefuelingPlanSpinningService.deleteDetailsOfTheRefuelingPlanSpinningById(Long.valueOf(id)));
+    }
 }

+ 5 - 4
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/AmmunitionPlanInformationIntermediateTableServiceImpl.java

@@ -132,6 +132,7 @@ public class AmmunitionPlanInformationIntermediateTableServiceImpl implements IA
             detailsOfTheRefuelingPlan3.setPlanStatus("0");
             detailsOfTheRefuelingPlan3.setProductType("B面");
             List<DetailsOfTheRefuelingPlan> detailsOfTheRefuelingPlans3 = detailsOfTheRefuelingPlanMapper.selectDetailsOfTheRefuelingPlanList(detailsOfTheRefuelingPlan3);
+
             //查询产线A面上机的
             DetailsOfTheRefuelingPlan Asj=new DetailsOfTheRefuelingPlan();
             Asj.setMachineId(item.getProductionLineNo());//产线号
@@ -167,10 +168,10 @@ public class AmmunitionPlanInformationIntermediateTableServiceImpl implements IA
                         rs1.setMachineId(item.getProductionLineNo());//产线号
                         rs1.setProductType("A面");
                         BeanUtils.copyProperties(item1,rs1);
-                        rs1.setStartTime("停机");
+                        rs1.setPlannedEndTime(rs1.getPlannedEndTime()+"停机");
                         rs1.setCurrentLotNumber(item1.getCurrentLotNumber().toString());
-                        //当前产线b面待生产
-                        String collect = detailsOfTheRefuelingPlans3.stream().map(plan -> plan.getCurrentColorCode() + "-(" + plan.getCurrentLotNumber() + ")").collect(Collectors.joining(","));
+                        //当前产线A面待生产
+                        String collect = detailsOfTheRefuelingPlans2.stream().map(plan -> plan.getCurrentColorCode() + "-(" + plan.getCurrentLotNumber() + ")").collect(Collectors.joining(","));
                         rs1.setListOfPendingProduction(collect);
                         list.add(rs1);
                     });
@@ -224,7 +225,7 @@ public class AmmunitionPlanInformationIntermediateTableServiceImpl implements IA
                             AmmunitionPlanInformationIntermediateTableRVo rs1=new AmmunitionPlanInformationIntermediateTableRVo();
                             rs1.setMachineId(item.getProductionLineNo());//产线号
                             rs1.setProductType("B面");
-                            rs1.setStartTime("停机");
+                            rs1.setPlannedEndTime(rs1.getPlannedEndTime()+"停机");
                             rs1.setCurrentLotNumber(item1.getCurrentLotNumber().toString());
                             //当前产线b面待生产
                             String collect = detailsOfTheRefuelingPlans3.stream().map(plan -> plan.getCurrentColorCode() + "-(" + plan.getCurrentLotNumber() + ")").collect(Collectors.joining(","));

+ 22 - 0
zkqy-ui/src/api/plan/paln.js

@@ -122,3 +122,25 @@ export function updateSpinningInfoPlanOne(data) {
     baseURL: process.env.VUE_APP_BASE_API1
   })
 }
+
+/**
+ * 删除加弹计划
+ */
+export function removeBombLoadingPlan(id) {
+  return request({
+    url: '/system/plan/remove/'+id,
+    method: 'Delete',
+    baseURL: process.env.VUE_APP_BASE_API1
+  })
+}
+
+/**
+ * 纺丝翻框,和络筒删除计划都是用这个
+ */
+export function spinningFrameWinding(id) {
+  return request({
+    url: '/system/spinning/remove/'+id,
+    method: 'Delete',
+    baseURL: process.env.VUE_APP_BASE_API1
+  })
+}

+ 1 - 1
zkqy-ui/src/views/bussiness/processMange_line.vue

@@ -33,7 +33,7 @@
     <!-- </el-card> -->
     <div class="main-area">
       <div class="show-header">
-        <h3 class="header">管道列表</h3>
+        <h3 class="header">流程列表</h3>
         <div class="search-list">
           <div class="select">
             <span class="label">产线 :</span>

+ 24 - 3
zkqy-ui/src/views/orderMange/planTable/fangsi.vue

@@ -223,13 +223,18 @@
                 </el-select>
               </template>
             </el-table-column>
-            <el-table-column label="操作" align="center">
+            <el-table-column label="操作" align="center" width="200px">
               <template v-slot:default="scope">
                 <el-button
                   size="mini"
                   type="danger"
-                  @click.stop.prevent="updateStatus(scope.$index, scope.row,scope.row.planStatus)">更新状态{{scope.row.planStatus}}</el-button>
+                  @click.stop.prevent="updateStatus(scope.$index, scope.row,scope.row.planStatus)">更新状态</el-button>
+                <el-button
+                  size="mini"
+                  type="danger"
+                  @click.stop.prevent="deletePlan(scope.$index, scope.row)">删除</el-button>
               </template>
+
             </el-table-column>
           </el-table>
           <!--按钮信息-->
@@ -245,10 +250,11 @@ import {
   getProductsInfo,
   getMaterielInfo,
   getSalesman,
+  spinningFrameWinding,
   getSpinningPlanList,
   addSpinningPlanList,
   getPlanSpinningInfo,
-  updateSpinningInfoPlanOne
+  updateSpinningInfoPlanOne, removeBombLoadingPlan
 } from "@/api/plan/paln.js";
 export default {
   data() {
@@ -312,6 +318,21 @@ export default {
 
   },
   methods: {
+    deletePlan($index,row){
+      console.log(row)
+      spinningFrameWinding(row.id).then(res=>{
+        if(res.code==200){
+          this.$message({
+            message: '删除成功',
+            type: 'success'
+          });
+        }else{
+          this.$message({message:"删除失败",type: 'error'})
+        }
+        this.onSubmit();
+        this.getSpinningPlanList();
+      })
+    },
     //五个显示为一排
     splitList(list, chunkSize) {
       const chunks = [];

+ 22 - 3
zkqy-ui/src/views/orderMange/planTable/fankuang.vue

@@ -231,12 +231,16 @@
                 </el-select>
               </template>
             </el-table-column>
-            <el-table-column label="操作" align="center">
+            <el-table-column label="操作" align="center" width="200px">
               <template v-slot:default="scope">
                 <el-button
                   size="mini"
                   type="danger"
-                  @click.stop.prevent="updateStatus(scope.$index, scope.row,scope.row.planStatus)">更新状态{{scope.row.planStatus}}</el-button>
+                  @click.stop.prevent="updateStatus(scope.$index, scope.row,scope.row.planStatus)">更新状态</el-button>
+                <el-button
+                  size="mini"
+                  type="danger"
+                  @click.stop.prevent="deletePlan(scope.$index, scope.row)">删除</el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -255,7 +259,7 @@ import {
   getSpinningPlanList,
   addSpinningPlanList,
   getPlanSpinningInfo,
-  updateSpinningInfoPlanOne
+  updateSpinningInfoPlanOne, spinningFrameWinding
 } from "@/api/plan/paln.js";
 export default {
   data() {
@@ -317,6 +321,21 @@ export default {
     this.getProductsInfo();
   },
   methods: {
+    deletePlan($index,row){
+      console.log(row)
+      spinningFrameWinding(row.id).then(res=>{
+        if(res.code==200){
+          this.$message({
+            message: '删除成功',
+            type: 'success'
+          });
+        }else{
+          this.$message({message:"删除失败",type: 'error'})
+        }
+        this.onSubmit();
+        this.getSpinningPlanList();
+      })
+    },
     //五个显示为一排
     splitList(list, chunkSize) {
       const chunks = [];

+ 22 - 3
zkqy-ui/src/views/orderMange/planTable/luotong.vue

@@ -231,12 +231,16 @@
                 </el-select>
               </template>
             </el-table-column>
-            <el-table-column label="操作" align="center">
+            <el-table-column label="操作" align="center" width="200px">
               <template v-slot:default="scope">
                 <el-button
                   size="mini"
                   type="danger"
-                  @click.stop.prevent="updateStatus(scope.$index, scope.row,scope.row.planStatus)">更新状态{{scope.row.planStatus}}</el-button>
+                  @click.stop.prevent="updateStatus(scope.$index, scope.row,scope.row.planStatus)">更新状态</el-button>
+                <el-button
+                  size="mini"
+                  type="danger"
+                  @click.stop.prevent="deletePlan(scope.$index, scope.row)">删除</el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -255,7 +259,7 @@ import {
   getSpinningPlanList,
   addSpinningPlanList,
   getPlanSpinningInfo,
-  updateSpinningInfoPlanOne
+  updateSpinningInfoPlanOne, spinningFrameWinding
 } from "@/api/plan/paln.js";
 export default {
   data() {
@@ -318,6 +322,21 @@ export default {
     this.getProductsInfo();
   },
   methods: {
+    deletePlan($index,row){
+      console.log(row)
+      spinningFrameWinding(row.id).then(res=>{
+        if(res.code==200){
+          this.$message({
+            message: '删除成功',
+            type: 'success'
+          });
+        }else{
+          this.$message({message:"删除失败",type: 'error'})
+        }
+        this.onSubmit();
+        this.getSpinningPlanList();
+      })
+    },
     //五个显示为一排
     splitList(list, chunkSize) {
       const chunks = [];