From 161e94603d4e1279c7ac26c209d37093820a8e4a Mon Sep 17 00:00:00 2001 From: xusd Date: Thu, 5 Sep 2024 09:12:57 +0800 Subject: [PATCH] =?UTF-8?q?dnc=E7=A8=8B=E5=BA=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dnc/DncProgramInfoController.java | 8 ++++++ .../controller/dnc/vo/UpdateStatusVO.java | 19 +++++++++++++ .../service/dnc/DncProgramInfoService.java | 10 +++++++ .../dnc/DncProgramInfoServiceImpl.java | 10 +++++++ imt-ui/src/api/system/dnc/dncProgramInfo.js | 9 +++++++ .../dnc/dncProgramInfo/DncProgramInfoForm.vue | 12 +++------ .../views/system/dnc/dncProgramInfo/index.vue | 27 ++++++++++++++++++- 7 files changed, 85 insertions(+), 10 deletions(-) create mode 100644 imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/controller/dnc/vo/UpdateStatusVO.java diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/controller/dnc/DncProgramInfoController.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/controller/dnc/DncProgramInfoController.java index 35f504b..1febc39 100644 --- a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/controller/dnc/DncProgramInfoController.java +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/controller/dnc/DncProgramInfoController.java @@ -5,6 +5,7 @@ import com.inspur.framework.common.pojo.PageResult; import com.inspur.module.system.controller.dnc.vo.DncProgramInfoPageReqVO; import com.inspur.module.system.controller.dnc.vo.DncProgramInfoRespVO; import com.inspur.module.system.controller.dnc.vo.DncProgramInfoSaveReqVO; +import com.inspur.module.system.controller.dnc.vo.UpdateStatusVO; import com.inspur.module.system.controller.equip.vo.EquipSelectionVO; import com.inspur.module.system.dal.dataobject.dnc.DncProgramInfoDO; import com.inspur.module.system.service.dnc.DncProgramInfoService; @@ -121,4 +122,11 @@ public class DncProgramInfoController { ExcelUtils.write(response, "DNC程序信息.xls", "数据", DncProgramInfoRespVO.class, voList); } + @PostMapping("/updateStatus") + @Operation(summary = "修改DNC程序信息状态") + @PreAuthorize("@ss.hasPermission('imt:dnc-program-info:update')") + public Boolean updateStatus(@RequestBody UpdateStatusVO vo){ + return dncProgramInfoService.updateStatus(vo); + } + } \ No newline at end of file diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/controller/dnc/vo/UpdateStatusVO.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/controller/dnc/vo/UpdateStatusVO.java new file mode 100644 index 0000000..d2f97a1 --- /dev/null +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/controller/dnc/vo/UpdateStatusVO.java @@ -0,0 +1,19 @@ +package com.inspur.module.system.controller.dnc.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +/** + * @Author xusd + * @Date 2024/9/4 17:13 + **/ +@Data +public class UpdateStatusVO { + + @Schema(description = "dnc程序id") + private String dncProgramId; + + @Schema(description = "状态") + private Integer status; + +} diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/dnc/DncProgramInfoService.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/dnc/DncProgramInfoService.java index 12ebc31..da6c4fb 100644 --- a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/dnc/DncProgramInfoService.java +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/dnc/DncProgramInfoService.java @@ -3,6 +3,7 @@ package com.inspur.module.system.service.dnc; import com.inspur.framework.common.pojo.PageResult; import com.inspur.module.system.controller.dnc.vo.DncProgramInfoPageReqVO; import com.inspur.module.system.controller.dnc.vo.DncProgramInfoSaveReqVO; +import com.inspur.module.system.controller.dnc.vo.UpdateStatusVO; import com.inspur.module.system.dal.dataobject.dnc.DncProgramInfoDO; import javax.validation.*; @@ -52,4 +53,13 @@ public interface DncProgramInfoService { */ PageResult getDncProgramInfoPage(DncProgramInfoPageReqVO pageReqVO); + /** + * 修改DNC程序信息状态 + * + * @Author xusd + * @Date 17:31 2024/9/4 + * @param vo + * @return java.lang.Boolean + */ + Boolean updateStatus(UpdateStatusVO vo); } \ No newline at end of file diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/dnc/DncProgramInfoServiceImpl.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/dnc/DncProgramInfoServiceImpl.java index 4a9030d..0d40dd1 100644 --- a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/dnc/DncProgramInfoServiceImpl.java +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/dnc/DncProgramInfoServiceImpl.java @@ -1,8 +1,10 @@ package com.inspur.module.system.service.dnc; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.inspur.framework.common.pojo.PageResult; import com.inspur.module.system.controller.dnc.vo.DncProgramInfoPageReqVO; import com.inspur.module.system.controller.dnc.vo.DncProgramInfoSaveReqVO; +import com.inspur.module.system.controller.dnc.vo.UpdateStatusVO; import com.inspur.module.system.dal.dataobject.dnc.DncProgramInfoDO; import com.inspur.module.system.dal.mysql.dnc.DncProgramInfoMapper; import org.springframework.stereotype.Service; @@ -29,6 +31,7 @@ public class DncProgramInfoServiceImpl implements DncProgramInfoService { public String createDncProgramInfo(DncProgramInfoSaveReqVO createReqVO) { // 插入 DncProgramInfoDO dncProgramInfo = BeanUtils.toBean(createReqVO, DncProgramInfoDO.class); + dncProgramInfo.setStatus(1); dncProgramInfoMapper.insert(dncProgramInfo); // 返回 return dncProgramInfo.getDncProgramId(); @@ -67,4 +70,11 @@ public class DncProgramInfoServiceImpl implements DncProgramInfoService { return dncProgramInfoMapper.selectPage(pageReqVO); } + @Override + public Boolean updateStatus(UpdateStatusVO vo) { + LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper<>(); + updateWrapper.set(DncProgramInfoDO::getStatus, vo.getStatus()); + updateWrapper.eq(DncProgramInfoDO::getDncProgramId, vo.getDncProgramId()); + return dncProgramInfoMapper.update(updateWrapper) > 0; + } } \ No newline at end of file diff --git a/imt-ui/src/api/system/dnc/dncProgramInfo.js b/imt-ui/src/api/system/dnc/dncProgramInfo.js index 8f43ca5..a3f9392 100644 --- a/imt-ui/src/api/system/dnc/dncProgramInfo.js +++ b/imt-ui/src/api/system/dnc/dncProgramInfo.js @@ -51,3 +51,12 @@ export function exportDncProgramInfoExcel(params) { responseType: 'blob' }) } + +// 修改DNC程序信息状态 +export function updateStatus(data) { + return request({ + url: '/dnc/dncProgramInfo/updateStatus', + method: 'post', + data: data + }) +} diff --git a/imt-ui/src/views/system/dnc/dncProgramInfo/DncProgramInfoForm.vue b/imt-ui/src/views/system/dnc/dncProgramInfo/DncProgramInfoForm.vue index 8760080..ae59812 100644 --- a/imt-ui/src/views/system/dnc/dncProgramInfo/DncProgramInfoForm.vue +++ b/imt-ui/src/views/system/dnc/dncProgramInfo/DncProgramInfoForm.vue @@ -17,17 +17,11 @@ - - - - - - +