删除
This commit is contained in:
@@ -18,12 +18,6 @@ import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import top.wms.admin.common.constant.CacheConstants;
|
||||
import top.wms.admin.common.util.PictureUtils;
|
||||
import top.wms.admin.peopleBranch.model.query.BranchQuery;
|
||||
import top.wms.admin.peopleBranch.service.BranchService;
|
||||
import top.wms.admin.space.model.query.PointQuery;
|
||||
import top.wms.admin.space.model.query.SpaceQuery;
|
||||
import top.wms.admin.space.service.PointService;
|
||||
import top.wms.admin.space.service.SpaceService;
|
||||
import top.wms.admin.system.enums.OptionCategoryEnum;
|
||||
import top.wms.admin.system.model.query.*;
|
||||
import top.wms.admin.system.model.resp.file.FileUploadResp;
|
||||
@@ -57,11 +51,8 @@ public class CommonController {
|
||||
private final MenuService menuService;
|
||||
private final UserService userService;
|
||||
private final RoleService roleService;
|
||||
private final BranchService branchService;
|
||||
private final DictItemService dictItemService;
|
||||
private final OptionService optionService;
|
||||
private final SpaceService spaceService;
|
||||
private final PointService pointService;
|
||||
|
||||
@Operation(summary = "上传文件", description = "上传文件")
|
||||
@PostMapping("/file")
|
||||
@@ -129,24 +120,6 @@ public class CommonController {
|
||||
return deptService.tree(query, sortQuery, true);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询部门树", description = "查询树结构的部门列表")
|
||||
@GetMapping("/tree/branch")
|
||||
public List<Tree<String>> listBranchTree(BranchQuery query) {
|
||||
return branchService.tree(query);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询空间树", description = "查询树结构的空间列表")
|
||||
@GetMapping("/tree/space")
|
||||
public List<Tree<Long>> listSpaceTree(SpaceQuery query, SortQuery sortQuery) {
|
||||
return spaceService.tree(query, sortQuery, true);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询空间点位树", description = "查询树结构的菜单列表")
|
||||
@GetMapping("/tree/point")
|
||||
public List<Tree<Long>> listPointTree(PointQuery query) {
|
||||
return pointService.tree(query);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询菜单树", description = "查询树结构的菜单列表")
|
||||
@GetMapping("/tree/menu")
|
||||
public List<Tree<Long>> listMenuTree(MenuQuery query, SortQuery sortQuery) {
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
package top.wms.admin.controller.consume;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import top.continew.starter.extension.crud.enums.Api;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import top.continew.starter.extension.crud.annotation.CrudRequestMapping;
|
||||
import top.continew.starter.web.model.R;
|
||||
import top.wms.admin.common.controller.BaseController;
|
||||
import top.wms.admin.consume.model.query.DownRecordQuery;
|
||||
import top.wms.admin.consume.model.req.DownRecordReq;
|
||||
import top.wms.admin.consume.model.resp.DownRecordResp;
|
||||
import top.wms.admin.consume.service.DownRecordService;
|
||||
|
||||
/**
|
||||
* 消费下发记录管理 API
|
||||
*
|
||||
* @author zc
|
||||
* @since 2026/02/25 11:01
|
||||
*/
|
||||
@Tag(name = "消费下发记录管理 API")
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@CrudRequestMapping(value = "/consume/downRecord", api = {Api.PAGE, Api.EXPORT})
|
||||
public class DownRecordController extends BaseController<DownRecordService, DownRecordResp, DownRecordResp, DownRecordQuery, DownRecordReq> {
|
||||
|
||||
@Operation(summary = "下发", description = "下发")
|
||||
@SaCheckPermission("consume:downRecord:down")
|
||||
@PatchMapping("/down/{equipmentId}/{peopleId}")
|
||||
public R down(@PathVariable Long equipmentId, @PathVariable Long peopleId) {
|
||||
baseService.down(equipmentId, peopleId);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
package top.wms.admin.controller.consume;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import top.continew.starter.extension.crud.annotation.CrudRequestMapping;
|
||||
import top.continew.starter.extension.crud.enums.Api;
|
||||
import top.wms.admin.common.controller.BaseController;
|
||||
import top.wms.admin.consume.model.query.GroupQuery;
|
||||
import top.wms.admin.consume.model.req.GroupReq;
|
||||
import top.wms.admin.consume.model.resp.GroupResp;
|
||||
import top.wms.admin.consume.service.GroupService;
|
||||
|
||||
/**
|
||||
* 消费组管理 API
|
||||
*
|
||||
* @author zc
|
||||
* @since 2026/01/27 13:48
|
||||
*/
|
||||
@Tag(name = "消费批量充值 API")
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@CrudRequestMapping(value = "/consume/group", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE, Api.EXPORT})
|
||||
public class GroupController extends BaseController<GroupService, GroupResp, GroupResp, GroupQuery, GroupReq> {
|
||||
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
package top.wms.admin.controller.consume;
|
||||
|
||||
import top.continew.starter.extension.crud.enums.Api;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import top.continew.starter.extension.crud.annotation.CrudRequestMapping;
|
||||
import top.wms.admin.common.controller.BaseController;
|
||||
import top.wms.admin.consume.model.query.RechargeRecordQuery;
|
||||
import top.wms.admin.consume.model.req.RechargeRecordReq;
|
||||
import top.wms.admin.consume.model.resp.RechargeRecordResp;
|
||||
import top.wms.admin.consume.service.RechargeRecordService;
|
||||
|
||||
/**
|
||||
* 充值记录管理 API
|
||||
*
|
||||
* @author zc
|
||||
* @since 2026/01/29 16:11
|
||||
*/
|
||||
@Tag(name = "充值记录管理 API")
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@CrudRequestMapping(value = "/admin/rechargeRecord", api = {Api.PAGE, Api.DELETE, Api.EXPORT})
|
||||
public class RechargeRecordController extends BaseController<RechargeRecordService, RechargeRecordResp, RechargeRecordResp, RechargeRecordQuery, RechargeRecordReq> {
|
||||
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
package top.wms.admin.controller.consume;
|
||||
|
||||
import top.continew.starter.extension.crud.enums.Api;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import top.continew.starter.extension.crud.annotation.CrudRequestMapping;
|
||||
import top.wms.admin.common.controller.BaseController;
|
||||
import top.wms.admin.consume.model.query.RecordQuery;
|
||||
import top.wms.admin.consume.model.req.RecordReq;
|
||||
import top.wms.admin.consume.model.resp.RecordResp;
|
||||
import top.wms.admin.consume.service.RecordService;
|
||||
|
||||
/**
|
||||
* 消费记录管理 API
|
||||
*
|
||||
* @author zc
|
||||
* @since 2026/01/21 17:53
|
||||
*/
|
||||
@Tag(name = "消费记录管理 API")
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@CrudRequestMapping(value = "/consume/record", api = {Api.PAGE, Api.DETAIL, Api.DELETE, Api.EXPORT})
|
||||
public class RecordController extends BaseController<RecordService, RecordResp, RecordResp, RecordQuery, RecordReq> {
|
||||
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
package top.wms.admin.controller.consume;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import top.continew.starter.extension.crud.model.query.PageQuery;
|
||||
import top.continew.starter.extension.crud.model.resp.PageResp;
|
||||
import top.continew.starter.web.model.R;
|
||||
import top.wms.admin.consume.model.query.ReportQuery;
|
||||
import top.wms.admin.consume.model.resp.report.BranchReport;
|
||||
import top.wms.admin.consume.model.resp.report.MealReport;
|
||||
import top.wms.admin.consume.model.resp.report.MerchantReport;
|
||||
import top.wms.admin.consume.model.resp.report.PeopleReport;
|
||||
import top.wms.admin.consume.service.ReportService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Tag(name = "报表管理 API")
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/consume/report")
|
||||
public class ReportController {
|
||||
|
||||
private final ReportService reportService;
|
||||
|
||||
@GetMapping("/merchant")
|
||||
public R<List<MerchantReport>> queryMerchantReport(ReportQuery query) {
|
||||
List<MerchantReport> list = reportService.queryMerchantReport(query);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
@GetMapping("/meal")
|
||||
public R<List<MealReport>> queryMealReport(ReportQuery query) {
|
||||
List<MealReport> list = reportService.queryMealReport(query);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
@GetMapping("/branch")
|
||||
public R<List<BranchReport>> queryBranchReport(ReportQuery query) {
|
||||
List<BranchReport> list = reportService.queryBranchReport(query);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
@GetMapping("/people")
|
||||
public PageResp<PeopleReport> queryPeopleReport(ReportQuery query, @Validated PageQuery pageQuery) {
|
||||
return reportService.page(query, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/exportMerchant")
|
||||
public void exportMerchant(ReportQuery query, HttpServletResponse response) {
|
||||
reportService.exportMerchant(query, response);
|
||||
}
|
||||
|
||||
@GetMapping("/exportMeal")
|
||||
public void exportMeal(ReportQuery query, HttpServletResponse response) {
|
||||
reportService.exportMeal(query, response);
|
||||
}
|
||||
|
||||
@GetMapping("/exportBranch")
|
||||
public void exportBranch(ReportQuery query, HttpServletResponse response) {
|
||||
reportService.exportBranch(query, response);
|
||||
}
|
||||
|
||||
@GetMapping("/exportPeople")
|
||||
public void exportPeople(ReportQuery query, HttpServletResponse response) {
|
||||
reportService.exportPeople(query, response);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
package top.wms.admin.controller.consume;
|
||||
|
||||
import top.continew.starter.extension.crud.enums.Api;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import top.continew.starter.extension.crud.annotation.CrudRequestMapping;
|
||||
import top.wms.admin.common.controller.BaseController;
|
||||
import top.wms.admin.consume.model.query.TenantQuery;
|
||||
import top.wms.admin.consume.model.req.TenantReq;
|
||||
import top.wms.admin.consume.model.resp.TenantResp;
|
||||
import top.wms.admin.consume.service.TenantService;
|
||||
|
||||
/**
|
||||
* 商户信息管理 API
|
||||
*
|
||||
* @author zc
|
||||
* @since 2026/01/30 14:55
|
||||
*/
|
||||
@Tag(name = "商户信息管理 API")
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@CrudRequestMapping(value = "/consume/tenant", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE,
|
||||
Api.EXPORT})
|
||||
public class TenantController extends BaseController<TenantService, TenantResp, TenantResp, TenantQuery, TenantReq> {
|
||||
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
package top.wms.admin.controller.consume;
|
||||
|
||||
import top.continew.starter.extension.crud.enums.Api;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import top.continew.starter.extension.crud.annotation.CrudRequestMapping;
|
||||
import top.wms.admin.common.controller.BaseController;
|
||||
import top.wms.admin.consume.model.query.TimeIntervalQuery;
|
||||
import top.wms.admin.consume.model.req.TimeIntervalReq;
|
||||
import top.wms.admin.consume.model.resp.TimeIntervalResp;
|
||||
import top.wms.admin.consume.service.TimeIntervalService;
|
||||
|
||||
/**
|
||||
* 消费时段管理 API
|
||||
*
|
||||
* @author zc
|
||||
* @since 2026/01/30 14:56
|
||||
*/
|
||||
@Tag(name = "消费时段管理 API")
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@CrudRequestMapping(value = "/consume/timeInterval", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE,
|
||||
Api.EXPORT})
|
||||
public class TimeIntervalController extends BaseController<TimeIntervalService, TimeIntervalResp, TimeIntervalResp, TimeIntervalQuery, TimeIntervalReq> {
|
||||
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
package top.wms.admin.controller.equipment;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import top.continew.starter.extension.crud.enums.Api;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import top.continew.starter.extension.crud.annotation.CrudRequestMapping;
|
||||
import top.continew.starter.extension.crud.model.resp.LabelValueResp;
|
||||
import top.wms.admin.common.controller.BaseController;
|
||||
import top.wms.admin.equipment.model.query.EquipmentQuery;
|
||||
import top.wms.admin.equipment.model.req.EquipmentReq;
|
||||
import top.wms.admin.equipment.model.resp.EquipmentDetailResp;
|
||||
import top.wms.admin.equipment.model.resp.EquipmentResp;
|
||||
import top.wms.admin.equipment.service.EquipmentService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备信息管理 API
|
||||
*
|
||||
* @author zc
|
||||
* @since 2025/04/09 15:20
|
||||
*/
|
||||
@Tag(name = "设备信息管理 API")
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@CrudRequestMapping(value = "/system/equipment", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE,
|
||||
Api.EXPORT})
|
||||
public class EquipmentController extends BaseController<EquipmentService, EquipmentResp, EquipmentDetailResp, EquipmentQuery, EquipmentReq> {
|
||||
|
||||
@GetMapping(value = "/getEquipmentNameList")
|
||||
public List<LabelValueResp> getEquipmentNameList(EquipmentReq equipmentReq) {
|
||||
return baseService.getEquipmentNameList(equipmentReq);
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
package top.wms.admin.controller.equipment;
|
||||
|
||||
import top.continew.starter.extension.crud.enums.Api;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import top.continew.starter.extension.crud.annotation.CrudRequestMapping;
|
||||
import top.wms.admin.common.controller.BaseController;
|
||||
import top.wms.admin.system.model.query.PeopleEquipmentQuery;
|
||||
import top.wms.admin.system.model.req.PeopleEquipmentReq;
|
||||
import top.wms.admin.system.model.resp.PeopleEquipmentResp;
|
||||
import top.wms.admin.system.service.PeopleEquipmentService;
|
||||
|
||||
/**
|
||||
* 人员设备下发信息管理 API
|
||||
*
|
||||
* @author zc
|
||||
* @since 2025/03/27 14:59
|
||||
*/
|
||||
@Tag(name = "人员设备下发信息管理 API")
|
||||
@RestController
|
||||
@CrudRequestMapping(value = "/system/peopleEquipment", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE,
|
||||
Api.EXPORT})
|
||||
public class PeopleEquipmentController extends BaseController<PeopleEquipmentService, PeopleEquipmentResp, PeopleEquipmentResp, PeopleEquipmentQuery, PeopleEquipmentReq> {}
|
||||
@@ -1,37 +0,0 @@
|
||||
package top.wms.admin.controller.equipment;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import top.continew.starter.extension.crud.annotation.CrudRequestMapping;
|
||||
import top.continew.starter.extension.crud.enums.Api;
|
||||
import top.continew.starter.extension.crud.model.resp.LabelValueResp;
|
||||
import top.wms.admin.common.controller.BaseController;
|
||||
import top.wms.admin.equipment.model.query.ProductQuery;
|
||||
import top.wms.admin.equipment.model.req.ProductReq;
|
||||
import top.wms.admin.equipment.model.resp.ProductResp;
|
||||
import top.wms.admin.equipment.service.ProductService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 产品信息管理 API
|
||||
*
|
||||
* @author zc
|
||||
* @since 2025/05/26 15:18
|
||||
*/
|
||||
@Tag(name = "产品信息管理 API")
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@CrudRequestMapping(value = "/equipment/product", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE,
|
||||
Api.EXPORT})
|
||||
public class ProductController extends BaseController<ProductService, ProductResp, ProductResp, ProductQuery, ProductReq> {
|
||||
|
||||
private final ProductService productService;
|
||||
|
||||
@GetMapping(value = "/getProductNameList")
|
||||
public List<LabelValueResp> getProductNameList() {
|
||||
return productService.getProductNameList();
|
||||
}
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
package top.wms.admin.controller.peopleBranch;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.lang.tree.Tree;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import top.continew.starter.log.annotation.Log;
|
||||
import top.wms.admin.peopleBranch.model.query.BranchQuery;
|
||||
import top.wms.admin.peopleBranch.model.req.BranchReq;
|
||||
import top.wms.admin.peopleBranch.model.resp.BranchResp;
|
||||
import top.wms.admin.peopleBranch.service.BranchService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 部门管理管理 API
|
||||
*
|
||||
* @author zc
|
||||
* @since 2025/03/19 17:46
|
||||
*/
|
||||
@Tag(name = "部门管理管理 API")
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/sysPeople/branch")
|
||||
public class BranchController {
|
||||
|
||||
private final BranchService branchService;
|
||||
|
||||
/**
|
||||
* 查询部门树形结构
|
||||
*
|
||||
* @param branchQuery
|
||||
* @return
|
||||
*/
|
||||
@Log(ignore = true)
|
||||
@SaCheckPermission("sysPeople:branch:tree")
|
||||
@GetMapping("/tree")
|
||||
public List<Tree<String>> selectBranchTree(BranchQuery branchQuery) {
|
||||
return branchService.selectBranchTree(branchQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取部门管理详细信息
|
||||
*/
|
||||
@SaCheckPermission("sysPeople:branch:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public BranchResp getInfo(@PathVariable("id") String id) {
|
||||
return branchService.selectBranchById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增部门管理
|
||||
*/
|
||||
@SaCheckPermission("sysPeople:branch:add")
|
||||
@Log(module = "新增部门")
|
||||
@PostMapping
|
||||
public String add(@RequestBody BranchReq branchReq) {
|
||||
return branchService.insertBranch(branchReq);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改部门管理
|
||||
*/
|
||||
@SaCheckPermission("sysPeople:branch:edit")
|
||||
@Log(module = "修改部门")
|
||||
@PutMapping("/{id}")
|
||||
public void edit(@PathVariable("id") String id, @RequestBody BranchReq branchReq) {
|
||||
branchService.updateBranch(branchReq, id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除部门管理
|
||||
*/
|
||||
@SaCheckPermission("sysPeople:branch:remove")
|
||||
@Log(module = "删除部门")
|
||||
@DeleteMapping("/{id}")
|
||||
public void remove(@PathVariable("id") String id) {
|
||||
branchService.deleteBranchById(id);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,194 +0,0 @@
|
||||
package top.wms.admin.controller.peopleBranch;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import top.continew.starter.core.validation.ValidationUtils;
|
||||
import top.continew.starter.extension.crud.annotation.CrudRequestMapping;
|
||||
import top.continew.starter.extension.crud.enums.Api;
|
||||
import top.continew.starter.extension.crud.model.query.PageQuery;
|
||||
import top.continew.starter.extension.crud.model.resp.LabelValueResp;
|
||||
import top.continew.starter.extension.crud.model.resp.PageResp;
|
||||
import top.continew.starter.log.annotation.Log;
|
||||
import top.continew.starter.web.model.R;
|
||||
import top.wms.admin.common.controller.BaseController;
|
||||
import top.wms.admin.consume.model.req.PeopleDepositImportReq;
|
||||
import top.wms.admin.consume.model.resp.PeopleDepositImportParseResp;
|
||||
import top.wms.admin.peopleBranch.model.query.PeopleQuery;
|
||||
import top.wms.admin.peopleBranch.model.req.PeopleImportReq;
|
||||
import top.wms.admin.peopleBranch.model.req.PeopleReq;
|
||||
import top.wms.admin.peopleBranch.model.resp.ConsumePeopleResp;
|
||||
import top.wms.admin.peopleBranch.model.resp.PeopleImportParseResp;
|
||||
import top.wms.admin.peopleBranch.model.resp.PeopleImportResp;
|
||||
import top.wms.admin.peopleBranch.model.resp.PeopleResp;
|
||||
import top.wms.admin.peopleBranch.service.PeopleService;
|
||||
import top.wms.admin.system.model.resp.user.UserImportResp;
|
||||
import top.wms.admin.system.service.ImportExcelService;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 人员管理管理 API
|
||||
*
|
||||
* @author zc
|
||||
* @since 2025/03/21 18:10
|
||||
*/
|
||||
@Tag(name = "人员管理管理 API")
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@Slf4j
|
||||
@CrudRequestMapping(value = "/sysPeople/people", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.EXPORT})
|
||||
public class PeopleController extends BaseController<PeopleService, PeopleResp, PeopleResp, PeopleQuery, PeopleReq> {
|
||||
|
||||
private final ImportExcelService importExcelService;
|
||||
|
||||
@GetMapping(value = "/getPeopleNameList")
|
||||
public List<LabelValueResp> getPeopleNameList(PeopleQuery peopleQuery) {
|
||||
return baseService.getPeopleNameList(peopleQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/down/{ids}")
|
||||
public R down(@PathVariable Long[] ids) {
|
||||
String failNames = baseService.down(ids);
|
||||
if (StrUtil.isNotBlank(failNames)) {
|
||||
return R.fail("500", "存在失败记录,人员名称:" + failNames);
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@DeleteMapping("/{ids}")
|
||||
public R del(@PathVariable Long[] ids) {
|
||||
String failNames = baseService.del(Arrays.asList(ids));
|
||||
if (StrUtil.isNotBlank(failNames)) {
|
||||
return R.fail("500", "设备删除失败,人员名称:" + failNames);
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@Log(ignore = true)
|
||||
@Operation(summary = "下载导入模板", description = "下载导入模板")
|
||||
@SaCheckPermission("sysPeople:people:import")
|
||||
@GetMapping(value = "/import/template", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
|
||||
public void downloadImportTemplate(HttpServletResponse response) throws IOException {
|
||||
importExcelService.downloadImportTemplate(response, "people.xlsx", "人员导入模板.xlsx");
|
||||
}
|
||||
|
||||
//导入相关
|
||||
@Log(ignore = true)
|
||||
@Operation(summary = "解析导入数据", description = "解析导入数据")
|
||||
@SaCheckPermission("sysPeople:people:import")
|
||||
@PostMapping("/import/parse")
|
||||
public PeopleImportParseResp parseImport(@NotNull(message = "文件不能为空") MultipartFile file) {
|
||||
ValidationUtils.throwIf(file::isEmpty, "文件不能为空");
|
||||
return baseService.parseImport(file);
|
||||
}
|
||||
|
||||
@Log(ignore = true)
|
||||
@Operation(summary = "导入数据", description = "导入数据")
|
||||
@SaCheckPermission("sysPeople:people:import")
|
||||
@PostMapping(value = "/import")
|
||||
public PeopleImportResp importUser(@Validated @RequestBody PeopleImportReq req) {
|
||||
return baseService.importPeople(req);
|
||||
}
|
||||
|
||||
//消费相关
|
||||
@Log(ignore = true)
|
||||
@Operation(summary = "分页查询人员消费列表", description = "分页查询列表")
|
||||
@GetMapping("/pageConsume")
|
||||
@SaCheckPermission("consume:PeopleDeposit:refund")
|
||||
public PageResp<ConsumePeopleResp> pageConsume(PeopleQuery query, @Validated PageQuery pageQuery) {
|
||||
return baseService.pageConsume(query, pageQuery);
|
||||
}
|
||||
|
||||
@Log(ignore = true)
|
||||
@Operation(summary = "导出人员充值列表", description = "导出人员充值列表")
|
||||
@GetMapping("/exportConsume")
|
||||
@SaCheckPermission("consume:PeopleDeposit:export")
|
||||
public void exportConsume(PeopleQuery query, HttpServletResponse response) {
|
||||
baseService.exportConsume(query, response);
|
||||
}
|
||||
|
||||
@Operation(summary = "补贴", description = "补贴")
|
||||
@PostMapping("/subsidy")
|
||||
@SaCheckPermission("consume:PeopleDeposit:subsidy")
|
||||
public R subsidy(@RequestBody PeopleReq req) {
|
||||
baseService.subsidy(req);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@Operation(summary = "充值", description = "充值")
|
||||
@PostMapping("/deposit")
|
||||
@SaCheckPermission("consume:PeopleDeposit:deposit")
|
||||
public R deposit(@RequestBody PeopleReq req) {
|
||||
baseService.deposit(req);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@Operation(summary = "退款", description = "退款")
|
||||
@PostMapping("/refund")
|
||||
@SaCheckPermission("consume:PeopleDeposit:refund")
|
||||
public R refund(@RequestBody PeopleReq req) {
|
||||
baseService.refund(req);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@Operation(summary = "消费冻结", description = "消费冻结")
|
||||
@PostMapping("/freeze")
|
||||
@SaCheckPermission("consume:PeopleDeposit:freeze")
|
||||
public R freeze(@RequestBody List<Long> ids) {
|
||||
baseService.freeze(ids);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@Operation(summary = "消费解冻", description = "消费解冻")
|
||||
@PostMapping("/unFreeze")
|
||||
@SaCheckPermission("consume:PeopleDeposit:unfreeze")
|
||||
public R unFreeze(@RequestBody List<Long> ids) {
|
||||
baseService.unFreeze(ids);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@Operation(summary = "消费一键清零", description = "消费一键清零")
|
||||
@PostMapping("/resetMoney")
|
||||
@SaCheckPermission("consume:PeopleDeposit:import")
|
||||
public R resetMoney(@RequestBody PeopleReq req) {
|
||||
baseService.resetMoney(req);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@Log(ignore = true)
|
||||
@Operation(summary = "下载人员充值导入模板", description = "下载人员充值导入模板")
|
||||
@SaCheckPermission("consume:PeopleDeposit:import")
|
||||
@GetMapping(value = "/consume/import/template", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
|
||||
public void downloadConsumeImportTemplate(HttpServletResponse response) throws IOException {
|
||||
baseService.downloadConsumeImportTemplate(response);
|
||||
}
|
||||
|
||||
@Log(ignore = true)
|
||||
@Operation(summary = "解析人员充值导入数据", description = "解析人员充值导入数据")
|
||||
@SaCheckPermission("consume:PeopleDeposit:import")
|
||||
@PostMapping("/consume/import/parse")
|
||||
public PeopleDepositImportParseResp parseConsumeImport(@NotNull(message = "文件不能为空") MultipartFile file) {
|
||||
ValidationUtils.throwIf(file::isEmpty, "文件不能为空");
|
||||
return baseService.parseConsumeImport(file);
|
||||
}
|
||||
|
||||
@Operation(summary = "导入数据", description = "导入数据")
|
||||
@SaCheckPermission("consume:PeopleDeposit:import")
|
||||
@PostMapping(value = "/consume/import")
|
||||
public UserImportResp importUser(@Validated @RequestBody PeopleDepositImportReq req) {
|
||||
return baseService.importConsumePeople(req);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package top.wms.admin.controller.peopleDownRecord;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import top.continew.starter.extension.crud.annotation.CrudRequestMapping;
|
||||
import top.continew.starter.extension.crud.enums.Api;
|
||||
import top.continew.starter.web.model.R;
|
||||
import top.wms.admin.common.controller.BaseController;
|
||||
import top.wms.admin.common.enums.OperTypeEnum;
|
||||
import top.wms.admin.peopleDownRecord.model.query.PeopleDownQuery;
|
||||
import top.wms.admin.peopleDownRecord.model.req.PeopleDownReq;
|
||||
import top.wms.admin.peopleDownRecord.model.resp.PeopleDownResp;
|
||||
import top.wms.admin.peopleDownRecord.service.PeopleDownService;
|
||||
import top.wms.admin.yfApi.service.ISysYFService;
|
||||
|
||||
@Tag(name = "下发管理 API")
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@Slf4j
|
||||
@CrudRequestMapping(value = "/sysDownRecord/record", api = {Api.PAGE, Api.DETAIL, Api.UPDATE, Api.DELETE, Api.EXPORT})
|
||||
public class PeopleDownController extends BaseController<PeopleDownService, PeopleDownResp, PeopleDownResp, PeopleDownQuery, PeopleDownReq> {
|
||||
|
||||
private final ISysYFService sysYFService;
|
||||
|
||||
@GetMapping("/down/{equipmentId}/{ruleId}/{peopleId}")
|
||||
public R down(@PathVariable Long equipmentId, @PathVariable Long ruleId, @PathVariable Long peopleId) {
|
||||
Boolean success = sysYFService.authDevice(peopleId, equipmentId, ruleId, OperTypeEnum.DOWN.getValue());
|
||||
if (!success) {
|
||||
return R.fail("500", "下发设备失败");
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
package top.wms.admin.controller.rule;
|
||||
|
||||
import top.continew.starter.extension.crud.enums.Api;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import top.continew.starter.extension.crud.annotation.CrudRequestMapping;
|
||||
import top.wms.admin.common.controller.BaseController;
|
||||
import top.wms.admin.rule.model.query.EmpowerRecordQuery;
|
||||
import top.wms.admin.rule.model.req.EmpowerRecordReq;
|
||||
import top.wms.admin.rule.model.resp.EmpowerRecordResp;
|
||||
import top.wms.admin.rule.service.EmpowerRecordService;
|
||||
|
||||
/**
|
||||
* 授权记录管理 API
|
||||
*
|
||||
* @author zc
|
||||
* @since 2025/04/08 23:08
|
||||
*/
|
||||
@Tag(name = "授权记录管理 API")
|
||||
@RestController
|
||||
@CrudRequestMapping(value = "/rule/empowerRecord", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE,
|
||||
Api.EXPORT})
|
||||
public class EmpowerRecordController extends BaseController<EmpowerRecordService, EmpowerRecordResp, EmpowerRecordResp, EmpowerRecordQuery, EmpowerRecordReq> {
|
||||
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
package top.wms.admin.controller.rule;
|
||||
|
||||
import top.continew.starter.extension.crud.enums.Api;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import top.continew.starter.extension.crud.annotation.CrudRequestMapping;
|
||||
import top.wms.admin.common.controller.BaseController;
|
||||
import top.wms.admin.rule.model.query.PeopleRecordQuery;
|
||||
import top.wms.admin.rule.model.req.PeopleRecordReq;
|
||||
import top.wms.admin.rule.model.resp.PeopleRecordResp;
|
||||
import top.wms.admin.rule.service.PeopleRecordService;
|
||||
|
||||
/**
|
||||
* 人员识别记录管理 API
|
||||
*
|
||||
* @author zc
|
||||
* @since 2025/04/08 23:06
|
||||
*/
|
||||
@Tag(name = "人员识别记录管理 API")
|
||||
@RestController
|
||||
@CrudRequestMapping(value = "/rule/peopleRecord", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE,
|
||||
Api.EXPORT})
|
||||
public class PeopleRecordController extends BaseController<PeopleRecordService, PeopleRecordResp, PeopleRecordResp, PeopleRecordQuery, PeopleRecordReq> {
|
||||
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
package top.wms.admin.controller.rule;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import top.continew.starter.extension.crud.enums.Api;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import top.continew.starter.extension.crud.annotation.CrudRequestMapping;
|
||||
import top.continew.starter.extension.crud.model.resp.LabelValueResp;
|
||||
import top.continew.starter.web.model.R;
|
||||
import top.wms.admin.common.controller.BaseController;
|
||||
import top.wms.admin.rule.model.query.RuleQuery;
|
||||
import top.wms.admin.rule.model.req.RuleReq;
|
||||
import top.wms.admin.rule.model.resp.RuleResp;
|
||||
import top.wms.admin.rule.service.RuleService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 通行规则管理 API
|
||||
*
|
||||
* @author zc
|
||||
* @since 2025/04/07 14:20
|
||||
*/
|
||||
@Tag(name = "通行规则管理 API")
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@CrudRequestMapping(value = "/rule/rule", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE, Api.EXPORT})
|
||||
public class RuleController extends BaseController<RuleService, RuleResp, RuleResp, RuleQuery, RuleReq> {
|
||||
|
||||
private final RuleService ruleService;
|
||||
|
||||
@GetMapping(value = "/getRuleNameList")
|
||||
public List<LabelValueResp> getRuleNameList(RuleReq RuleReq) {
|
||||
return ruleService.getRuleNameList(RuleReq);
|
||||
}
|
||||
|
||||
@PostMapping("/add1")
|
||||
public R addRule1(@RequestBody RuleReq ruleReq) {
|
||||
String result = baseService.addRule1(ruleReq);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
@PutMapping("/update1/{id}")
|
||||
public R updateRule1(@PathVariable("id") Long id, @RequestBody RuleReq ruleReq) {
|
||||
String result = baseService.updateRule1(ruleReq, id);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package top.wms.admin.controller.space;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import top.continew.starter.extension.crud.annotation.CrudRequestMapping;
|
||||
import top.continew.starter.extension.crud.enums.Api;
|
||||
import top.wms.admin.common.controller.BaseController;
|
||||
import top.wms.admin.space.model.query.PointQuery;
|
||||
import top.wms.admin.space.model.req.PointReq;
|
||||
import top.wms.admin.space.model.resp.PointResp;
|
||||
import top.wms.admin.space.service.PointService;
|
||||
|
||||
/**
|
||||
* 点位管理管理 API
|
||||
*
|
||||
* @author zc
|
||||
* @since 2025/04/03 15:01
|
||||
*/
|
||||
@Tag(name = "点位管理管理 API")
|
||||
@RestController
|
||||
@CrudRequestMapping(value = "/space/point", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE, Api.EXPORT})
|
||||
public class PointController extends BaseController<PointService, PointResp, PointResp, PointQuery, PointReq> {
|
||||
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
package top.wms.admin.controller.space;
|
||||
|
||||
import top.continew.starter.extension.crud.enums.Api;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import top.continew.starter.extension.crud.annotation.CrudRequestMapping;
|
||||
import top.wms.admin.common.controller.BaseController;
|
||||
import top.wms.admin.space.model.query.SpaceQuery;
|
||||
import top.wms.admin.space.model.req.SpaceReq;
|
||||
import top.wms.admin.space.model.resp.SpaceResp;
|
||||
import top.wms.admin.space.model.resp.SpaceResp;
|
||||
import top.wms.admin.space.service.SpaceService;
|
||||
|
||||
/**
|
||||
* 空间管理管理 API
|
||||
*
|
||||
* @author zc
|
||||
* @since 2025/04/03 10:47
|
||||
*/
|
||||
@Tag(name = "空间管理管理 API")
|
||||
@RestController
|
||||
@CrudRequestMapping(value = "/space/space", api = {Api.TREE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE, Api.EXPORT})
|
||||
public class SpaceController extends BaseController<SpaceService, SpaceResp, SpaceResp, SpaceQuery, SpaceReq> {
|
||||
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
package top.wms.admin.controller.yfApi;
|
||||
|
||||
import cn.hutool.core.thread.ThreadUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.feiniaojin.gracefulresponse.api.ExcludeFromGracefulResponse;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import top.continew.starter.log.annotation.Log;
|
||||
import top.wms.admin.yfApi.domain.BackInfo;
|
||||
import top.wms.admin.yfApi.domain.BackResult;
|
||||
import top.wms.admin.yfApi.domain.HeartInfo;
|
||||
import top.wms.admin.yfApi.service.IYFListenService;
|
||||
|
||||
/**
|
||||
* 宇泛人脸设备回调
|
||||
*
|
||||
* @author zc
|
||||
* @since 2025/03/21 18:10
|
||||
*/
|
||||
@Tag(name = "宇泛人脸设备回调 API")
|
||||
@RestController
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/sdk")
|
||||
public class YFListenController {
|
||||
|
||||
private final IYFListenService iyfListenService;
|
||||
|
||||
@Log(ignore = true)
|
||||
@PostMapping("/backUrlHeart")
|
||||
public void heart(HeartInfo info) {
|
||||
iyfListenService.heart(info);
|
||||
}
|
||||
|
||||
/**
|
||||
* 宇泛人脸设备回调地址
|
||||
*
|
||||
* @return 回调信息
|
||||
*/
|
||||
@Log(ignore = true)
|
||||
@ExcludeFromGracefulResponse
|
||||
@PostMapping("/backUrl")
|
||||
public BackResult backUrl(@RequestBody BackInfo info) {
|
||||
log.info("宇泛人脸设备识别回调:{}", JSON.toJSONString(info));
|
||||
if (!StrUtil.equals(info.getPersonId(), "STRANGERBABY")) {
|
||||
//异步处理接收到的人员信息
|
||||
ThreadUtil.execAsync(() -> {
|
||||
iyfListenService.processPeopleRecord(info);
|
||||
});
|
||||
}
|
||||
return new BackResult(1, true);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user