|
@@ -1,13 +1,16 @@
|
|
|
|
|
|
|
|
package org.sky.scientific.controller;
|
|
package org.sky.scientific.controller;
|
|
|
|
|
|
|
|
-import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
|
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
import io.swagger.v3.oas.annotations.Parameter;
|
|
import io.swagger.v3.oas.annotations.Parameter;
|
|
|
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
|
|
|
-import lombok.AllArgsConstructor;
|
|
|
|
|
|
|
+import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
|
|
+import jakarta.servlet.http.HttpServletResponse;
|
|
|
import jakarta.validation.Valid;
|
|
import jakarta.validation.Valid;
|
|
|
-
|
|
|
|
|
|
|
+import lombok.AllArgsConstructor;
|
|
|
|
|
+import org.sky.core.boot.ctrl.KdController;
|
|
|
import org.sky.core.excel.util.ExcelUtil;
|
|
import org.sky.core.excel.util.ExcelUtil;
|
|
|
import org.sky.core.mp.support.Condition;
|
|
import org.sky.core.mp.support.Condition;
|
|
|
import org.sky.core.mp.support.Query;
|
|
import org.sky.core.mp.support.Query;
|
|
@@ -16,18 +19,15 @@ import org.sky.core.secure.annotation.IsAdmin;
|
|
|
import org.sky.core.tool.api.R;
|
|
import org.sky.core.tool.api.R;
|
|
|
import org.sky.core.tool.utils.DateUtil;
|
|
import org.sky.core.tool.utils.DateUtil;
|
|
|
import org.sky.core.tool.utils.Func;
|
|
import org.sky.core.tool.utils.Func;
|
|
|
-import org.springframework.web.bind.annotation.*;
|
|
|
|
|
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
-import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
|
|
|
+import org.sky.scientific.excel.XmWwxmExcel;
|
|
|
import org.sky.scientific.pojo.entity.XmWwxmEntity;
|
|
import org.sky.scientific.pojo.entity.XmWwxmEntity;
|
|
|
import org.sky.scientific.pojo.vo.XmWwxmVO;
|
|
import org.sky.scientific.pojo.vo.XmWwxmVO;
|
|
|
-import org.sky.scientific.excel.XmWwxmExcel;
|
|
|
|
|
-import org.sky.scientific.wrapper.XmWwxmWrapper;
|
|
|
|
|
import org.sky.scientific.service.IXmWwxmService;
|
|
import org.sky.scientific.service.IXmWwxmService;
|
|
|
-import org.sky.core.boot.ctrl.KdController;
|
|
|
|
|
-import java.util.Map;
|
|
|
|
|
|
|
+import org.sky.scientific.wrapper.XmWwxmWrapper;
|
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
+
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
-import jakarta.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
+import java.util.Map;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 项目-委外项目 控制器
|
|
* 项目-委外项目 控制器
|
|
@@ -43,9 +43,6 @@ public class XmWwxmController extends KdController {
|
|
|
|
|
|
|
|
private final IXmWwxmService xmWwxmService;
|
|
private final IXmWwxmService xmWwxmService;
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
- * 项目-委外项目 详情
|
|
|
|
|
- */
|
|
|
|
|
@GetMapping("/detail")
|
|
@GetMapping("/detail")
|
|
|
@ApiOperationSupport(order = 1)
|
|
@ApiOperationSupport(order = 1)
|
|
|
@Operation(summary = "详情", description = "传入xmWwxm")
|
|
@Operation(summary = "详情", description = "传入xmWwxm")
|
|
@@ -53,9 +50,7 @@ public class XmWwxmController extends KdController {
|
|
|
XmWwxmEntity detail = xmWwxmService.getOne(Condition.getQueryWrapper(xmWwxm));
|
|
XmWwxmEntity detail = xmWwxmService.getOne(Condition.getQueryWrapper(xmWwxm));
|
|
|
return R.data(XmWwxmWrapper.build().entityVO(detail));
|
|
return R.data(XmWwxmWrapper.build().entityVO(detail));
|
|
|
}
|
|
}
|
|
|
- /**
|
|
|
|
|
- * 项目-委外项目 分页
|
|
|
|
|
- */
|
|
|
|
|
|
|
+
|
|
|
@GetMapping("/list")
|
|
@GetMapping("/list")
|
|
|
@ApiOperationSupport(order = 2)
|
|
@ApiOperationSupport(order = 2)
|
|
|
@Operation(summary = "分页", description = "传入xmWwxm")
|
|
@Operation(summary = "分页", description = "传入xmWwxm")
|
|
@@ -64,9 +59,6 @@ public class XmWwxmController extends KdController {
|
|
|
return R.data(XmWwxmWrapper.build().pageVO(pages));
|
|
return R.data(XmWwxmWrapper.build().pageVO(pages));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
- * 项目-委外项目 自定义分页
|
|
|
|
|
- */
|
|
|
|
|
@GetMapping("/page")
|
|
@GetMapping("/page")
|
|
|
@ApiOperationSupport(order = 3)
|
|
@ApiOperationSupport(order = 3)
|
|
|
@Operation(summary = "分页", description = "传入xmWwxm")
|
|
@Operation(summary = "分页", description = "传入xmWwxm")
|
|
@@ -75,9 +67,6 @@ public class XmWwxmController extends KdController {
|
|
|
return R.data(pages);
|
|
return R.data(pages);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
- * 项目-委外项目 新增
|
|
|
|
|
- */
|
|
|
|
|
@PostMapping("/save")
|
|
@PostMapping("/save")
|
|
|
@ApiOperationSupport(order = 4)
|
|
@ApiOperationSupport(order = 4)
|
|
|
@Operation(summary = "新增", description = "传入xmWwxm")
|
|
@Operation(summary = "新增", description = "传入xmWwxm")
|
|
@@ -85,9 +74,6 @@ public class XmWwxmController extends KdController {
|
|
|
return R.status(xmWwxmService.save(xmWwxm));
|
|
return R.status(xmWwxmService.save(xmWwxm));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
- * 项目-委外项目 修改
|
|
|
|
|
- */
|
|
|
|
|
@PostMapping("/update")
|
|
@PostMapping("/update")
|
|
|
@ApiOperationSupport(order = 5)
|
|
@ApiOperationSupport(order = 5)
|
|
|
@Operation(summary = "修改", description = "传入xmWwxm")
|
|
@Operation(summary = "修改", description = "传入xmWwxm")
|
|
@@ -95,9 +81,6 @@ public class XmWwxmController extends KdController {
|
|
|
return R.status(xmWwxmService.updateById(xmWwxm));
|
|
return R.status(xmWwxmService.updateById(xmWwxm));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
- * 项目-委外项目 新增或修改
|
|
|
|
|
- */
|
|
|
|
|
@PostMapping("/submit")
|
|
@PostMapping("/submit")
|
|
|
@ApiOperationSupport(order = 6)
|
|
@ApiOperationSupport(order = 6)
|
|
|
@Operation(summary = "新增或修改", description = "传入xmWwxm")
|
|
@Operation(summary = "新增或修改", description = "传入xmWwxm")
|
|
@@ -105,9 +88,6 @@ public class XmWwxmController extends KdController {
|
|
|
return R.status(xmWwxmService.saveOrUpdate(xmWwxm));
|
|
return R.status(xmWwxmService.saveOrUpdate(xmWwxm));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
- * 项目-委外项目 删除
|
|
|
|
|
- */
|
|
|
|
|
@PostMapping("/remove")
|
|
@PostMapping("/remove")
|
|
|
@ApiOperationSupport(order = 7)
|
|
@ApiOperationSupport(order = 7)
|
|
|
@Operation(summary = "逻辑删除", description = "传入ids")
|
|
@Operation(summary = "逻辑删除", description = "传入ids")
|
|
@@ -115,20 +95,12 @@ public class XmWwxmController extends KdController {
|
|
|
return R.status(xmWwxmService.deleteLogic(Func.toLongList(ids)));
|
|
return R.status(xmWwxmService.deleteLogic(Func.toLongList(ids)));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- /**
|
|
|
|
|
- * 导出数据
|
|
|
|
|
- */
|
|
|
|
|
@IsAdmin
|
|
@IsAdmin
|
|
|
@GetMapping("/export-xmWwxm")
|
|
@GetMapping("/export-xmWwxm")
|
|
|
@ApiOperationSupport(order = 9)
|
|
@ApiOperationSupport(order = 9)
|
|
|
@Operation(summary = "导出数据", description = "传入xmWwxm")
|
|
@Operation(summary = "导出数据", description = "传入xmWwxm")
|
|
|
public void exportXmWwxm(@Parameter(hidden = true) @RequestParam Map<String, Object> xmWwxm, KdUser kdUser, HttpServletResponse response) {
|
|
public void exportXmWwxm(@Parameter(hidden = true) @RequestParam Map<String, Object> xmWwxm, KdUser kdUser, HttpServletResponse response) {
|
|
|
QueryWrapper<XmWwxmEntity> queryWrapper = Condition.getQueryWrapper(xmWwxm, XmWwxmEntity.class);
|
|
QueryWrapper<XmWwxmEntity> queryWrapper = Condition.getQueryWrapper(xmWwxm, XmWwxmEntity.class);
|
|
|
- //if (!AuthUtil.isAdministrator()) {
|
|
|
|
|
- // queryWrapper.lambda().eq(XmWwxm::getTenantId, kdUser.getTenantId());
|
|
|
|
|
- //}
|
|
|
|
|
- //queryWrapper.lambda().eq(XmWwxmEntity::getIsDeleted, KdConstant.DB_NOT_DELETED);
|
|
|
|
|
List<XmWwxmExcel> list = xmWwxmService.exportXmWwxm(queryWrapper);
|
|
List<XmWwxmExcel> list = xmWwxmService.exportXmWwxm(queryWrapper);
|
|
|
ExcelUtil.export(response, "项目-委外项目数据" + DateUtil.time(), "项目-委外项目数据表", list, XmWwxmExcel.class);
|
|
ExcelUtil.export(response, "项目-委外项目数据" + DateUtil.time(), "项目-委外项目数据表", list, XmWwxmExcel.class);
|
|
|
}
|
|
}
|