diff --git a/business/src/main/java/com/fizz/business/controller/PdiSetupController.java b/business/src/main/java/com/fizz/business/controller/PdiSetupController.java index ab1203a..cf1a008 100644 --- a/business/src/main/java/com/fizz/business/controller/PdiSetupController.java +++ b/business/src/main/java/com/fizz/business/controller/PdiSetupController.java @@ -6,14 +6,7 @@ import javax.servlet.http.HttpServletResponse; import com.fizz.business.service.IPdiSetupService; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; @@ -39,8 +32,8 @@ public class PdiSetupController extends BaseController /** * 查询生产计划的参数详情列表 */ - @GetMapping("/list") - public TableDataInfo list(PdiSetups pdiSetup) + @PostMapping("/list") + public TableDataInfo list(@RequestBody PdiSetups pdiSetup) { startPage(); List list = pdiSetupService.selectPdiSetupList(pdiSetup); diff --git a/business/src/main/java/com/fizz/business/controller/SetupTensionController.java b/business/src/main/java/com/fizz/business/controller/SetupTensionController.java index 1e49f26..0010a8b 100644 --- a/business/src/main/java/com/fizz/business/controller/SetupTensionController.java +++ b/business/src/main/java/com/fizz/business/controller/SetupTensionController.java @@ -2,6 +2,8 @@ package com.fizz.business.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; + +import com.fizz.business.form.TensionDeleteForm; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -83,9 +85,11 @@ public class SetupTensionController extends BaseController * 删除全线张力 */ @Log(title = "全线张力", businessType = BusinessType.DELETE) - @DeleteMapping() - public AjaxResult remove(@RequestParam Long[] thicks,@RequestParam Long[] yieldStrens) - { - return toAjax(setupTensionService.deleteSetupTensionByThicks(thicks, yieldStrens)); + @DeleteMapping("/tension") // 建议添加路径区分不同删除接口 + public AjaxResult removeTension(@RequestBody TensionDeleteForm form) { + return toAjax(setupTensionService.deleteSetupTensionByThicks( + form.getThicks(), + form.getYieldStrens() + )); } } diff --git a/business/src/main/java/com/fizz/business/controller/SetupTlController.java b/business/src/main/java/com/fizz/business/controller/SetupTlController.java index c6b4d23..711ea5f 100644 --- a/business/src/main/java/com/fizz/business/controller/SetupTlController.java +++ b/business/src/main/java/com/fizz/business/controller/SetupTlController.java @@ -2,6 +2,8 @@ package com.fizz.business.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; + +import com.fizz.business.form.TlDeleteForm; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -81,15 +83,14 @@ public class SetupTlController extends BaseController return toAjax(setupTlService.updateSetupTl(setupTl)); } - /** - * 删除拉矫机参数 - */ + // 拉矫机参数删除接口 @Log(title = "拉矫机参数", businessType = BusinessType.DELETE) - @DeleteMapping() - public AjaxResult remove(@RequestParam String[] steelGrades, - @RequestParam Long[] yieldStrens, - @RequestParam Long[] thicks) - { - return toAjax(setupTlService.deleteSetupTlBySteelGrades(steelGrades, yieldStrens, thicks)); + @DeleteMapping("/tl") // 不同路径区分 + public AjaxResult removeTl(@RequestBody TlDeleteForm form) { + return toAjax(setupTlService.deleteSetupTlBySteelGrades( + form.getSteelGrades(), + form.getYieldStrens(), + form.getThicks() + )); } } diff --git a/business/src/main/java/com/fizz/business/controller/SetupTmBendforceController.java b/business/src/main/java/com/fizz/business/controller/SetupTmBendforceController.java index bae77c4..d3b4905 100644 --- a/business/src/main/java/com/fizz/business/controller/SetupTmBendforceController.java +++ b/business/src/main/java/com/fizz/business/controller/SetupTmBendforceController.java @@ -2,6 +2,8 @@ package com.fizz.business.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; + +import com.fizz.business.form.TmBendforceDeleteForm; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -84,10 +86,11 @@ public class SetupTmBendforceController extends BaseController * 删除光整机弯辊力 */ @Log(title = "光整机弯辊力", businessType = BusinessType.DELETE) - @DeleteMapping() - public AjaxResult remove(@RequestParam Long[] widths, - @RequestParam Long[] rollForces) - { - return toAjax(setupTmBendforceService.deleteSetupTmBendforceByWidths(widths,rollForces)); + @DeleteMapping("/tm/bendforce") + public AjaxResult removeTmBendforce(@RequestBody TmBendforceDeleteForm form) { + return toAjax(setupTmBendforceService.deleteSetupTmBendforceByWidths( + form.getWidths(), + form.getRollForces() + )); } } diff --git a/business/src/main/java/com/fizz/business/controller/SetupTmMeshController.java b/business/src/main/java/com/fizz/business/controller/SetupTmMeshController.java index 76983f9..c9c942e 100644 --- a/business/src/main/java/com/fizz/business/controller/SetupTmMeshController.java +++ b/business/src/main/java/com/fizz/business/controller/SetupTmMeshController.java @@ -2,6 +2,8 @@ package com.fizz.business.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; + +import com.fizz.business.form.TmMeshDeleteForm; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -85,11 +87,12 @@ public class SetupTmMeshController extends BaseController * 删除光整机插入量 */ @Log(title = "光整机插入量", businessType = BusinessType.DELETE) - @DeleteMapping() - public AjaxResult remove( @RequestParam String[] steelGrades, - @RequestParam Long[] yieldStrens, - @RequestParam Long[] thicks) - { - return toAjax(setupTmMeshService.deleteSetupTmMeshBySteelGrades(steelGrades, yieldStrens, thicks)); + @DeleteMapping("/tm/mesh") + public AjaxResult removeTmMesh(@RequestBody TmMeshDeleteForm form) { + return toAjax(setupTmMeshService.deleteSetupTmMeshBySteelGrades( + form.getSteelGrades(), + form.getYieldStrens(), + form.getThicks() + )); } } diff --git a/business/src/main/java/com/fizz/business/controller/SetupTmRollforceController.java b/business/src/main/java/com/fizz/business/controller/SetupTmRollforceController.java index 318d93c..5ea5c48 100644 --- a/business/src/main/java/com/fizz/business/controller/SetupTmRollforceController.java +++ b/business/src/main/java/com/fizz/business/controller/SetupTmRollforceController.java @@ -2,6 +2,8 @@ package com.fizz.business.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; + +import com.fizz.business.form.TmRollforceDeleteForm; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -86,12 +88,13 @@ public class SetupTmRollforceController extends BaseController * 删除光整机轧制力 */ @Log(title = "光整机轧制力", businessType = BusinessType.DELETE) - @DeleteMapping() - public AjaxResult remove(@RequestParam String[] steelGrades, - @RequestParam Long[] thicks, - @RequestParam Long[] yieldStrens, - @RequestParam Long[] elongs) - { - return toAjax(setupTmRollforceService.deleteSetupTmRollforceBySteelGrades(steelGrades, thicks, yieldStrens, elongs)); + @DeleteMapping("/tm/rollforce") + public AjaxResult removeTmRollforce(@RequestBody TmRollforceDeleteForm form) { + return toAjax(setupTmRollforceService.deleteSetupTmRollforceBySteelGrades( + form.getSteelGrades(), + form.getThicks(), + form.getYieldStrens(), + form.getElongs() + )); } } diff --git a/business/src/main/java/com/fizz/business/domain/PdiSetups.java b/business/src/main/java/com/fizz/business/domain/PdiSetups.java index cc43376..d209a83 100644 --- a/business/src/main/java/com/fizz/business/domain/PdiSetups.java +++ b/business/src/main/java/com/fizz/business/domain/PdiSetups.java @@ -10,6 +10,8 @@ import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.core.domain.BaseEntity; +import java.io.Serializable; + /** * 生产计划的参数详情对象 pdi_setup * @@ -18,7 +20,7 @@ import com.ruoyi.common.core.domain.BaseEntity; */ @Data @TableName("pdi_setup") -public class PdiSetups extends BaseEntity +public class PdiSetups implements Serializable { private static final long serialVersionUID = 1L; diff --git a/business/src/main/java/com/fizz/business/form/TensionDeleteForm.java b/business/src/main/java/com/fizz/business/form/TensionDeleteForm.java new file mode 100644 index 0000000..cf45605 --- /dev/null +++ b/business/src/main/java/com/fizz/business/form/TensionDeleteForm.java @@ -0,0 +1,12 @@ +package com.fizz.business.form; + +import lombok.Data; + +/** + * 全线张力删除参数封装类 + */ +@Data +public class TensionDeleteForm { + private Long[] thicks; + private Long[] yieldStrens; +} \ No newline at end of file diff --git a/business/src/main/java/com/fizz/business/form/TlDeleteForm.java b/business/src/main/java/com/fizz/business/form/TlDeleteForm.java new file mode 100644 index 0000000..bdf1ebc --- /dev/null +++ b/business/src/main/java/com/fizz/business/form/TlDeleteForm.java @@ -0,0 +1,13 @@ +package com.fizz.business.form; + +import lombok.Data; + +/** + * 拉矫机参数删除参数封装类 + */ +@Data +public class TlDeleteForm { + private String[] steelGrades; + private Long[] yieldStrens; + private Long[] thicks; +} diff --git a/business/src/main/java/com/fizz/business/form/TmBendforceDeleteForm.java b/business/src/main/java/com/fizz/business/form/TmBendforceDeleteForm.java new file mode 100644 index 0000000..b4d579d --- /dev/null +++ b/business/src/main/java/com/fizz/business/form/TmBendforceDeleteForm.java @@ -0,0 +1,12 @@ +package com.fizz.business.form; + +import lombok.Data; + +/** + * 光整机弯辊力删除参数封装类 + */ +@Data +public class TmBendforceDeleteForm { + private Long[] widths; + private Long[] rollForces; +} \ No newline at end of file diff --git a/business/src/main/java/com/fizz/business/form/TmMeshDeleteForm.java b/business/src/main/java/com/fizz/business/form/TmMeshDeleteForm.java new file mode 100644 index 0000000..9a5c0dd --- /dev/null +++ b/business/src/main/java/com/fizz/business/form/TmMeshDeleteForm.java @@ -0,0 +1,13 @@ +package com.fizz.business.form; + +import lombok.Data; + +/** + * 光整机插入量删除参数封装类 + */ +@Data +public class TmMeshDeleteForm { + private String[] steelGrades; + private Long[] yieldStrens; + private Long[] thicks; +} diff --git a/business/src/main/java/com/fizz/business/form/TmRollforceDeleteForm.java b/business/src/main/java/com/fizz/business/form/TmRollforceDeleteForm.java new file mode 100644 index 0000000..b028131 --- /dev/null +++ b/business/src/main/java/com/fizz/business/form/TmRollforceDeleteForm.java @@ -0,0 +1,14 @@ +package com.fizz.business.form; + +import lombok.Data; + +/** + * 光整机轧制力删除参数封装类 + */ +@Data +public class TmRollforceDeleteForm { + private String[] steelGrades; + private Long[] thicks; + private Long[] yieldStrens; + private Long[] elongs; +} \ No newline at end of file diff --git a/business/src/main/java/com/fizz/business/service/impl/PdiSetupServiceImpl.java b/business/src/main/java/com/fizz/business/service/impl/PdiSetupServiceImpl.java index 6d70157..bbf02a2 100644 --- a/business/src/main/java/com/fizz/business/service/impl/PdiSetupServiceImpl.java +++ b/business/src/main/java/com/fizz/business/service/impl/PdiSetupServiceImpl.java @@ -56,7 +56,6 @@ public class PdiSetupServiceImpl extends ServiceImpl @Override public Boolean insertPdiSetup(PdiSetups pdiSetup) { - pdiSetup.setCreateTime(DateUtils.getNowDate()); return this.save(pdiSetup); } @@ -69,7 +68,6 @@ public class PdiSetupServiceImpl extends ServiceImpl @Override public Boolean updatePdiSetup(PdiSetups pdiSetup) { - pdiSetup.setUpdateTime(DateUtils.getNowDate()); return this.updateById(pdiSetup); } diff --git a/business/src/main/resources/mapper/SetupTensionMapper.xml b/business/src/main/resources/mapper/SetupTensionMapper.xml index 4d14b72..e354acb 100644 --- a/business/src/main/resources/mapper/SetupTensionMapper.xml +++ b/business/src/main/resources/mapper/SetupTensionMapper.xml @@ -110,7 +110,6 @@ update setup_tension - yield_stren = #{yieldStren}, value1 = #{value1}, value2 = #{value2}, value3 = #{value3}, @@ -129,7 +128,7 @@ create_time = #{createTime}, update_time = #{updateTime}, - where thick = #{thick} + where thick = #{thick} and yield_stren = #{yieldStren} @@ -141,7 +140,7 @@ where thick = #{thicks[${index}]} - AND yield_stren = #{yieldStren[${index}]} + AND yield_stren = #{yieldStrens[${index}]} \ No newline at end of file diff --git a/business/src/main/resources/mapper/SetupTlMapper.xml b/business/src/main/resources/mapper/SetupTlMapper.xml index 2c9eb4a..33854de 100644 --- a/business/src/main/resources/mapper/SetupTlMapper.xml +++ b/business/src/main/resources/mapper/SetupTlMapper.xml @@ -95,8 +95,6 @@ update setup_tl - yield_stren = #{yieldStren}, - thick = #{thick}, value1 = #{value1}, value2 = #{value2}, value3 = #{value3}, @@ -110,7 +108,7 @@ update_time = #{updateTime}, create_time = #{createTime}, - where steel_grade = #{steelGrade} + where steel_grade = #{steelGrade} and yield_stren = #{yieldStren} and thick = #{thick} diff --git a/business/src/main/resources/mapper/SetupTmBendforceMapper.xml b/business/src/main/resources/mapper/SetupTmBendforceMapper.xml index 50ba98f..cf6dba8 100644 --- a/business/src/main/resources/mapper/SetupTmBendforceMapper.xml +++ b/business/src/main/resources/mapper/SetupTmBendforceMapper.xml @@ -64,7 +64,6 @@ update setup_tm_bendforce - roll_force = #{rollForce}, value1 = #{value1}, value2 = #{value2}, value3 = #{value3}, @@ -72,7 +71,7 @@ update_time = #{updateTime}, create_time = #{createTime}, - where width = #{width} + where width = #{width} and roll_force = #{rollForce} diff --git a/business/src/main/resources/mapper/SetupTmMeshMapper.xml b/business/src/main/resources/mapper/SetupTmMeshMapper.xml index 9bb1383..3e86e79 100644 --- a/business/src/main/resources/mapper/SetupTmMeshMapper.xml +++ b/business/src/main/resources/mapper/SetupTmMeshMapper.xml @@ -92,8 +92,6 @@ update setup_tm_mesh - yield_stren = #{yieldStren}, - thick = #{thick}, value1 = #{value1}, value2 = #{value2}, value3 = #{value3}, @@ -107,7 +105,7 @@ update_time = #{updateTime}, create_time = #{createTime}, - where steel_grade = #{steelGrade} + where steel_grade = #{steelGrade} and yield_stren = #{yieldStren} and thick = #{thick} diff --git a/business/src/main/resources/mapper/SetupTmRollforceMapper.xml b/business/src/main/resources/mapper/SetupTmRollforceMapper.xml index 25f3334..6784683 100644 --- a/business/src/main/resources/mapper/SetupTmRollforceMapper.xml +++ b/business/src/main/resources/mapper/SetupTmRollforceMapper.xml @@ -95,9 +95,6 @@ update setup_tm_rollforce - thick = #{thick}, - yield_stren = #{yieldStren}, - elong = #{elong}, value1 = #{value1}, value2 = #{value2}, value3 = #{value3}, @@ -111,7 +108,7 @@ update_time = #{updateTime}, create_time = #{createTime}, - where steel_grade = #{steelGrade} + where steel_grade = #{steelGrade} and thick = #{thick} and yield_stren = #{yieldStren} and elong = #{elong}