feat: 企标计划-删除
This commit is contained in:
+25
-5
@@ -11,14 +11,12 @@ import com.jero.modules.laws.enterprise.service.EnterpriseStandardPlanService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 企标计划
|
||||
* @Author: jero-boot
|
||||
@@ -48,4 +46,26 @@ public class EnterpriseStandardPlanController extends JeroController<EnterpriseS
|
||||
IPage<EnterpriseStandardPlanVo> pageList= esPlanService.queryPageList(esPlanQueryDTO, pageNo, pageSize);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "企标计划-通过id删除")
|
||||
@ApiOperation(value = "企标计划-通过id删除", notes = "企标计划-通过id删除")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<T> deleteEN(String id) {
|
||||
if (StringUtils.isBlank(id)) {
|
||||
return Result.error("参数不识别!");
|
||||
}
|
||||
EnterpriseStandardPlan esPlan = esPlanService.getById(id);
|
||||
if (esPlan == null) {
|
||||
return Result.error("未找到对应实体");
|
||||
} else {
|
||||
esPlanService.deleteById(id);
|
||||
}
|
||||
return Result.OK();
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -125,7 +125,7 @@
|
||||
FROM
|
||||
laws_enterprise_standard_plan_cooperate_unit AS cu
|
||||
LEFT JOIN sys_depart AS d ON d.id = cu.dept_id) AS cu ON cu.id = p.id
|
||||
WHERE 1 = 1
|
||||
WHERE p.del_flag = 0
|
||||
<!--原企标编号判断-->
|
||||
<if test="param.originEnStandardNo != null and param.originEnStandardNo != ''">
|
||||
AND p.origin_en_standard_no LIKE CONCAT('%',#{param.originEnStandardNo},'%')
|
||||
|
||||
+2
@@ -14,4 +14,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
public interface EnterpriseStandardPlanService extends IService<EnterpriseStandardPlan> {
|
||||
|
||||
IPage<EnterpriseStandardPlanVo> queryPageList(ESPlanQueryDTO esPlan, Integer pageNo, Integer pageSize);
|
||||
|
||||
void deleteById(String id);
|
||||
}
|
||||
|
||||
+10
@@ -1,5 +1,6 @@
|
||||
package com.jero.modules.laws.enterprise.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@@ -11,6 +12,7 @@ import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.modules.laws.enterprise.entity.EnterpriseStandardPlan;
|
||||
import com.jero.modules.laws.enterprise.service.EnterpriseStandardPlanService;
|
||||
import com.jero.modules.laws.enterprise.mapper.EnterpriseStandardPlanMapper;
|
||||
import com.jero.modules.projectLibrary.entity.LawsProjectLibrary;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -46,6 +48,14 @@ public class EnterpriseStandardPlanServiceImpl extends ServiceImpl<EnterpriseSta
|
||||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
LambdaUpdateWrapper<EnterpriseStandardPlan> wrapper = new LambdaUpdateWrapper<>();
|
||||
wrapper.in(EnterpriseStandardPlan::getId, id);
|
||||
wrapper.set(EnterpriseStandardPlan::getDelFlag, 1);
|
||||
update(wrapper);
|
||||
}
|
||||
|
||||
// 转换列表中的状态值为中文
|
||||
private void transESPlanVo(List<EnterpriseStandardPlanVo> list) {
|
||||
if (list.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user