wangyuzhe 9 ヶ月 前
コミット
18b4ec1f3c
43 ファイル変更2078 行追加16 行削除
  1. 4 0
      pom.xml
  2. 0 1
      src/main/java/org/springblade/modules/system/controller/DeptController.java
  3. 0 1
      src/main/java/org/springblade/modules/system/controller/UserController.java
  4. 0 1
      src/main/java/org/springblade/modules/system/mapper/DeptMapper.java
  5. 0 1
      src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml
  6. 5 0
      src/main/java/org/springblade/modules/system/mapper/DictBizMapper.java
  7. 11 0
      src/main/java/org/springblade/modules/system/mapper/DictBizMapper.xml
  8. 0 1
      src/main/java/org/springblade/modules/system/service/IDeptService.java
  9. 5 0
      src/main/java/org/springblade/modules/system/service/IDictBizService.java
  10. 15 0
      src/main/java/org/springblade/modules/system/service/impl/DictBizServiceImpl.java
  11. 349 0
      src/main/java/org/springblade/modules/zbTable/controller/ZbTableController.java
  12. 34 0
      src/main/java/org/springblade/modules/zbTable/dto/ZbTableDTO.java
  13. 150 0
      src/main/java/org/springblade/modules/zbTable/entity/ZbTableEntity.java
  14. 59 0
      src/main/java/org/springblade/modules/zbTable/mapper/ZbTableMapper.java
  15. 177 0
      src/main/java/org/springblade/modules/zbTable/mapper/ZbTableMapper.xml
  16. 59 0
      src/main/java/org/springblade/modules/zbTable/service/IZbTableService.java
  17. 84 0
      src/main/java/org/springblade/modules/zbTable/service/impl/ZbTableServiceImpl.java
  18. 34 0
      src/main/java/org/springblade/modules/zbTable/vo/ZbTableVO.java
  19. 50 0
      src/main/java/org/springblade/modules/zbTable/wrapper/ZbTableWrapper.java
  20. 126 0
      src/main/java/org/springblade/modules/zbdsTable/controller/ZbdsTableController.java
  21. 34 0
      src/main/java/org/springblade/modules/zbdsTable/dto/ZbdsTableDTO.java
  22. 56 0
      src/main/java/org/springblade/modules/zbdsTable/entity/ZbdsTableEntity.java
  23. 43 0
      src/main/java/org/springblade/modules/zbdsTable/mapper/ZbdsTableMapper.java
  24. 26 0
      src/main/java/org/springblade/modules/zbdsTable/mapper/ZbdsTableMapper.xml
  25. 42 0
      src/main/java/org/springblade/modules/zbdsTable/service/IZbdsTableService.java
  26. 42 0
      src/main/java/org/springblade/modules/zbdsTable/service/impl/ZbdsTableServiceImpl.java
  27. 35 0
      src/main/java/org/springblade/modules/zbdsTable/vo/ZbdsTableVO.java
  28. 50 0
      src/main/java/org/springblade/modules/zbdsTable/wrapper/ZbdsTableWrapper.java
  29. 126 0
      src/main/java/org/springblade/modules/zblsTable/controller/ZblsTableController.java
  30. 34 0
      src/main/java/org/springblade/modules/zblsTable/dto/ZblsTableDTO.java
  31. 135 0
      src/main/java/org/springblade/modules/zblsTable/entity/ZblsTableEntity.java
  32. 43 0
      src/main/java/org/springblade/modules/zblsTable/mapper/ZblsTableMapper.java
  33. 40 0
      src/main/java/org/springblade/modules/zblsTable/mapper/ZblsTableMapper.xml
  34. 42 0
      src/main/java/org/springblade/modules/zblsTable/service/IZblsTableService.java
  35. 42 0
      src/main/java/org/springblade/modules/zblsTable/service/impl/ZblsTableServiceImpl.java
  36. 35 0
      src/main/java/org/springblade/modules/zblsTable/vo/ZblsTableVO.java
  37. 50 0
      src/main/java/org/springblade/modules/zblsTable/wrapper/ZblsTableWrapper.java
  38. 10 0
      src/main/java/sql/table.menu.sql
  39. 10 0
      src/main/java/sql/zbdstable.menu.sql
  40. 10 0
      src/main/java/sql/zblstable.menu.sql
  41. 6 6
      src/main/resources/application-dev.yml
  42. 3 3
      src/main/resources/application-test.yml
  43. 2 2
      src/main/resources/application.yml

+ 4 - 0
pom.xml

@@ -186,6 +186,10 @@
             <artifactId>lombok</artifactId>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>org.postgresql</groupId>
+            <artifactId>postgresql</artifactId>
+        </dependency>
     </dependencies>
 
     <build>

+ 0 - 1
src/main/java/org/springblade/modules/system/controller/DeptController.java

@@ -61,7 +61,6 @@ import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE;
 @AllArgsConstructor
 @RequestMapping(AppConstant.APPLICATION_SYSTEM_NAME + "/dept")
 @Api(value = "部门", tags = "部门")
-@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
 public class DeptController extends BladeController {
 
 	private final IDeptService deptService;

+ 0 - 1
src/main/java/org/springblade/modules/system/controller/UserController.java

@@ -127,7 +127,6 @@ public class UserController {
 	})
 	@ApiOperationSupport(order = 3)
 	@ApiOperation(value = "列表", notes = "传入account和realName")
-	@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
 	public R<IPage<UserVO>> page(@ApiIgnore User user, Query query, Long deptId, BladeUser bladeUser) {
 		IPage<User> pages = userService.selectUserPage(Condition.getPage(query), user, deptId, (bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID) ? StringPool.EMPTY : bladeUser.getTenantId()));
 		return R.data(UserWrapper.build().pageVO(pages));

+ 0 - 1
src/main/java/org/springblade/modules/system/mapper/DeptMapper.java

@@ -64,5 +64,4 @@ public interface DeptMapper extends BaseMapper<Dept> {
 	 * @return
 	 */
 	List<String> getDeptNames(Long[] ids);
-
 }

+ 0 - 1
src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml

@@ -111,5 +111,4 @@
         </foreach>
         and is_deleted = 0
     </select>
-
 </mapper>

+ 5 - 0
src/main/java/org/springblade/modules/system/mapper/DictBizMapper.java

@@ -60,4 +60,9 @@ public interface DictBizMapper extends BaseMapper<DictBiz> {
 	 */
 	List<DictBizVO> parentTree();
 
+	List<DictBiz> getZbytZd();
+
+    String getCode(String code, String key);
+
+	List<DictBiz> getZblxZd();
 }

+ 11 - 0
src/main/java/org/springblade/modules/system/mapper/DictBizMapper.xml

@@ -48,4 +48,15 @@
         select id, parent_id, dict_value as title, id as "value", id as "key" from blade_dict_biz where is_deleted = 0 and parent_id = 0
     </select>
 
+    <select id="getZbytZd" resultMap="dictResultMap">
+        select * from blade_dict_biz where is_deleted = 0 and code = 'zbyt' and dict_key != '-1'
+    </select>
+
+    <select id="getCode" resultType="java.lang.String">
+        select dict_value from blade_dict_biz where is_deleted = 0 and code = #{code} and dict_key = #{key}
+    </select>
+
+    <select id="getZblxZd" resultMap="dictResultMap">
+        select * from blade_dict_biz where is_deleted = 0 and code = 'zblx' and dict_key != '-1'
+    </select>
 </mapper>

+ 0 - 1
src/main/java/org/springblade/modules/system/service/IDeptService.java

@@ -115,5 +115,4 @@ public interface IDeptService extends IService<Dept> {
 	 * @return
 	 */
 	List<DeptVO> search(String deptName, Long parentId);
-
 }

+ 5 - 0
src/main/java/org/springblade/modules/system/service/IDictBizService.java

@@ -97,4 +97,9 @@ public interface IDictBizService extends IService<DictBiz> {
 	 */
 	List<DictBizVO> childList(Map<String, Object> dict, Long parentId);
 
+	List<DictBiz> getZbytZd();
+
+    String getCode(String code, String key);
+
+	List<DictBiz> getZblxZd();
 }

+ 15 - 0
src/main/java/org/springblade/modules/system/service/impl/DictBizServiceImpl.java

@@ -116,4 +116,19 @@ public class DictBizServiceImpl extends ServiceImpl<DictBizMapper, DictBiz> impl
 		List<DictBiz> list = this.list(Condition.getQueryWrapper(dict, DictBiz.class).lambda().ne(DictBiz::getId, parentId).eq(DictBiz::getCode, parentDict.getCode()).orderByAsc(DictBiz::getSort));
 		return DictBizWrapper.build().listNodeVO(list);
 	}
+
+	@Override
+	public List<DictBiz> getZbytZd() {
+		return baseMapper.getZbytZd();
+	}
+
+	@Override
+	public String getCode(String code, String key) {
+		return baseMapper.getCode(code, key);
+	}
+
+	@Override
+	public List<DictBiz> getZblxZd() {
+		return baseMapper.getZblxZd();
+	}
 }

+ 349 - 0
src/main/java/org/springblade/modules/zbTable/controller/ZbTableController.java

@@ -0,0 +1,349 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.zbTable.controller;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import liquibase.pro.packaged.S;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.system.entity.Dept;
+import org.springblade.modules.system.service.IDeptService;
+import org.springblade.modules.system.service.IDictBizService;
+import org.springblade.modules.zbdsTable.entity.ZbdsTableEntity;
+import org.springblade.modules.zbdsTable.service.IZbdsTableService;
+import org.springblade.modules.zblsTable.entity.ZblsTableEntity;
+import org.springblade.modules.zblsTable.service.IZblsTableService;
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.zbTable.entity.ZbTableEntity;
+import org.springblade.modules.zbTable.vo.ZbTableVO;
+import org.springblade.modules.zbTable.wrapper.ZbTableWrapper;
+import org.springblade.modules.zbTable.service.IZbTableService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 装备列表 控制器
+ *
+ * @author BladeX
+ * @since 2024-06-04
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("blade-table/table")
+@Api(value = "装备列表", tags = "装备列表接口")
+public class ZbTableController extends BladeController {
+
+	private final IZbTableService zbTableService;
+
+	private final IZblsTableService zblsTableService;
+
+	private final IDictBizService dictBizService;
+
+	private final IDeptService deptService;
+
+	private final IZbdsTableService zbdsTableService;
+
+	/**
+	 * 装备列表 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入table")
+	public R<ZbTableVO> detail(ZbTableEntity table) {
+		ZbTableEntity detail = zbTableService.getOne(Condition.getQueryWrapper(table));
+		return R.data(ZbTableWrapper.build().entityVO(detail));
+	}
+
+	/**
+	 * 装备列表 分页
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入table")
+	public R<IPage<ZbTableVO>> list(ZbTableEntity table, Query query) {
+		IPage<ZbTableEntity> pages = zbTableService.page(Condition.getPage(query), Condition.getQueryWrapper(table));
+		return R.data(ZbTableWrapper.build().pageVO(pages));
+	}
+
+	/**
+	 * 装备列表 自定义分页
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入table")
+	public R<IPage<ZbTableEntity>> page(ZbTableEntity table, Query query) {
+		IPage<ZbTableEntity> pages = zbTableService.selectTablePage(Condition.getPage(query), table);
+		/*for (ZbTableEntity zbTableVO:pages.getRecords()) {
+			String codeyt = "zbyt";
+			String codezt = "zbzt";
+			String zbyt = dictBizService.getCode(codeyt, zbTableVO.getZbyt());
+			String zbzt = dictBizService.getCode(codezt, zbTableVO.getZbzt());
+			zbTableVO.setZbyt(zbyt);
+			zbTableVO.setZbzt(zbzt);
+		}*/
+		return R.data(pages);
+	}
+
+	/**
+	 * 装备下发
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入table")
+	public R save(@Valid @RequestBody ZbTableEntity table) {
+		ZbTableEntity zb = zbTableService.selectZbByZbbh(table.getZbbh());
+		if (zb != null) {
+			if (zb.getZbzt().equals("01") || zb.getZbzt().equals("02")) {
+				return R.data("该装备正在使用中");
+			}
+			if (zb.getZbzt().equals("05")) {
+				return R.data("该装备已丢失");
+			}
+		}
+		table.setZbzt("01");
+		ZblsTableEntity zblsTable = new ZblsTableEntity();
+		zblsTable.setZblx(table.getZblx());
+		zblsTable.setZbbh(table.getZbbh());
+		zblsTable.setZbyt(table.getZbyt());
+		zblsTable.setZbzt(table.getZbzt());
+		zblsTable.setLqrxm(table.getLqrxm());
+		zblsTable.setXb(table.getXb());
+		zblsTable.setSfzh(table.getSfzh());
+		zblsTable.setJh(table.getJh());
+		zblsTable.setLxdh(table.getLxdh());
+		zblsTable.setLqsj(table.getLqsj());
+		zblsTable.setGhsj(table.getGhsj());
+		zblsTableService.save(zblsTable);
+		return R.data("操作成功");
+	}
+
+	/**
+	 * 装备新增
+	 */
+	@PostMapping("saveZb")
+	public R saveZb(@RequestBody ZbTableEntity table) {
+		ZbTableEntity zb = zbTableService.selectZbbh(table.getZbbh());
+		if (zb != null) {
+			return R.fail("装备编号已经存在,请重新输入");
+		}
+		Dept dept = deptService.getById(Long.valueOf(table.getDeptId()));
+		if (dept.getDeptCategory() == 2) {
+			table.setSssjBm(Long.valueOf(table.getDeptId()));
+			table.setSssjMc(dept.getDeptName());
+		}
+		if (dept.getDeptCategory() == 3) {
+			Dept sj = deptService.getById(dept.getParentId());
+			table.setSsfjBm(Long.valueOf(table.getDeptId()));
+			table.setSsfjMc(dept.getDeptName());
+			table.setSssjBm(sj.getId());
+			table.setSssjMc(sj.getDeptName());
+		}
+		if (dept.getDeptCategory() == 4) {
+			Dept fj = deptService.getById(dept.getParentId());
+			Dept sj = deptService.getById(fj.getParentId());
+			table.setSspcsBm(Long.valueOf(table.getDeptId()));
+			table.setSspcsMc(dept.getDeptName());
+			table.setSsfjBm(fj.getId());
+			table.setSsfjMc(fj.getDeptName());
+			table.setSssjBm(sj.getId());
+			table.setSssjMc(sj.getDeptName());
+		}
+		return R.data(zbTableService.save(table));
+	}
+
+	/**
+	 * 装备列表 修改
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入table")
+	public R update(@Valid @RequestBody ZbTableEntity table) {
+		if (table.getZbzt().equals("03") || table.getZbzt().equals("04")) {
+			table.setGhsj(new Date());
+		}
+		/*ZbTableEntity zb = zbTableService.selectZbByZbbh(table.getZbbh());
+		if (zb != null && !table.getZbzt().equals("04")) {
+			if (zb.getZbzt().equals("01") || zb.getZbzt().equals("02")) {
+				return R.data("该装备正在使用中");
+			}
+		}*/
+		if (table.getDeptId() != null && !table.getDeptId().equals("")) {
+			Dept dept = deptService.getById(Long.valueOf(table.getDeptId()));
+			if (dept.getDeptCategory() == 2) {
+				table.setSssjBm(Long.valueOf(table.getDeptId()));
+				table.setSssjMc(dept.getDeptName());
+			}
+			if (dept.getDeptCategory() == 3) {
+				Dept sj = deptService.getById(dept.getParentId());
+				table.setSsfjBm(Long.valueOf(table.getDeptId()));
+				table.setSsfjMc(dept.getDeptName());
+				table.setSssjBm(sj.getId());
+				table.setSssjMc(sj.getDeptName());
+			}
+			if (dept.getDeptCategory() == 4) {
+				Dept fj = deptService.getById(dept.getParentId());
+				Dept sj = deptService.getById(fj.getParentId());
+				table.setSspcsBm(Long.valueOf(table.getDeptId()));
+				table.setSspcsMc(dept.getDeptName());
+				table.setSsfjBm(fj.getId());
+				table.setSsfjMc(fj.getDeptName());
+				table.setSssjBm(sj.getId());
+				table.setSssjMc(sj.getDeptName());
+			}
+		}
+		zbTableService.updateById(table);
+		if (!table.getZbzt().equals("") && !table.getZbzt().equals(null)) {
+			ZblsTableEntity zblsTable = new ZblsTableEntity();
+			zblsTable.setZblx(table.getZblx());
+			zblsTable.setZbbh(table.getZbbh());
+			zblsTable.setZbyt(table.getZbyt());
+			zblsTable.setZbzt(table.getZbzt());
+			zblsTable.setLqrxm(table.getLqrxm());
+			zblsTable.setXb(table.getXb());
+			zblsTable.setSfzh(table.getSfzh());
+			zblsTable.setJh(table.getJh());
+			zblsTable.setLxdh(table.getLxdh());
+			zblsTable.setLqsj(table.getLqsj());
+			zblsTable.setGhsj(table.getGhsj());
+			zblsTableService.save(zblsTable);
+		}
+		return R.data("操作成功");
+	}
+
+	/**
+	 * 装备列表 新增或修改
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入table")
+	public R submit(@Valid @RequestBody ZbTableEntity table) {
+		return R.status(zbTableService.saveOrUpdate(table));
+	}
+
+	/**
+	 * 装备列表 删除
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(zbTableService.deleteLogic(Func.toLongList(ids)));
+	}
+
+	/**
+	 * 查看历史记录
+	 */
+	@GetMapping("selectLsjl")
+	public R selectLsjl(String zbbh) {
+		List<ZblsTableEntity> list = zbTableService.selectLsjl(zbbh);
+		ZblsTableEntity lsjl = zbTableService.getLsjlByLqsj(zbbh);
+		String json = JSONArray.toJSONString(list);
+		if (lsjl != null) {
+			if (!json.contains(lsjl.getId().toString())) {
+				list.add(lsjl);
+			}
+		}
+		return R.data(list);
+	}
+
+	/**
+	 * 获取装备用途字典
+	 */
+	@GetMapping("getZbytZd")
+	public R getZbytZd() {
+		return R.data(dictBizService.getZbytZd());
+	}
+
+	/**
+	 * 获取装备类型字典
+	 */
+	@GetMapping("getZblxZd")
+	public R getZblxZd() {
+		return R.data(dictBizService.getZblxZd());
+	}
+
+	/**
+	 * 地图返回
+	 */
+	@GetMapping("selectDt")
+	public R selectDt(ZbTableEntity zbTable) {
+		return R.data(zbTableService.selectDt(zbTable));
+	}
+
+	/**
+	 * 点击地图点位获取当前点位的所有枪支信息
+	 */
+	@GetMapping("getZbByDw")
+	public R getZbByDw(String[] id) {
+		return R.data(zbTableService.getZbByDw(id));
+	}
+
+	/**
+	 * 装备归还
+	 */
+	@PostMapping("getZbgh")
+	public R getZbgh(ZblsTableEntity zbTable) {
+		zbTable.setZbzt("04");
+		zbTable.setGhsj(new Date());
+		return R.data(zblsTableService.save(zbTable));
+	}
+
+	/**
+	 * 获取当前装备的最新点位
+	 */
+	@GetMapping("getZbzxdw")
+	public R getZbzxdw(String zbbh) {
+		return R.data(zbTableService.getZbzxdw(zbbh));
+	}
+
+	/**
+	 * 装备丢失
+	 */
+	@PostMapping("getZbds")
+	public R getZbds(ZblsTableEntity zbTable) {
+		ZbdsTableEntity zbdsTable = new ZbdsTableEntity();
+		zbdsTable.setZbbh(zbTable.getZbbh());
+		zbdsTable.setZhdw(zbTable.getZhdw());
+		zbdsTable.setDsdd(zbTable.getDsdd());
+		zbdsTableService.save(zbdsTable);
+		zbTable.setZbzt("05");
+		zblsTableService.save(zbTable);
+		return R.data("操作成功");
+	}
+
+	/**
+	 * 装备下发获取当前派出所的所有装备
+	 */
+	@GetMapping("selectZbByPcs")
+	public R selectZbByPcs(ZbTableEntity zbTable) {
+		return R.data(zbTableService.selectZbByPcs(zbTable));
+	}
+}

+ 34 - 0
src/main/java/org/springblade/modules/zbTable/dto/ZbTableDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.zbTable.dto;
+
+import org.springblade.modules.zbTable.entity.ZbTableEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 装备列表 数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2024-06-04
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ZbTableDTO extends ZbTableEntity {
+	private static final long serialVersionUID = 1L;
+
+}

+ 150 - 0
src/main/java/org/springblade/modules/zbTable/entity/ZbTableEntity.java

@@ -0,0 +1,150 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.zbTable.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.Date;
+import java.util.List;
+
+import lombok.EqualsAndHashCode;
+import org.springblade.core.mp.base.BaseEntity;
+import org.springblade.core.tenant.mp.TenantEntity;
+
+/**
+ * 装备列表 实体类
+ *
+ * @author BladeX
+ * @since 2024-06-04
+ */
+@Data
+@TableName("zb_table")
+@ApiModel(value = "Table对象", description = "装备列表")
+@EqualsAndHashCode(callSuper = true)
+public class ZbTableEntity extends BaseEntity {
+
+	/**
+	 * 装备类型
+	 */
+	@ApiModelProperty(value = "装备类型")
+	private String zblx;
+	/**
+	 * 装备编号
+	 */
+	@ApiModelProperty(value = "装备编号")
+	private String zbbh;
+	/**
+	 * 装备用途
+	 */
+	@ApiModelProperty(value = "装备用途")
+	private String zbyt;
+	/**
+	 * 装备状态
+	 */
+	@TableField(exist = false)
+	@ApiModelProperty(value = "装备状态")
+	private String zbzt;
+	/**
+	 * 领取人姓名
+	 */
+	@TableField(exist = false)
+	@ApiModelProperty(value = "领取人姓名")
+	private String lqrxm;
+	/**
+	 * 性别
+	 */
+	@TableField(exist = false)
+	@ApiModelProperty(value = "性别")
+	private String xb;
+	/**
+	 * 身份证号
+	 */
+	@TableField(exist = false)
+	@ApiModelProperty(value = "身份证号")
+	private String sfzh;
+	/**
+	 * 警号
+	 */
+	@TableField(exist = false)
+	@ApiModelProperty(value = "警号")
+	private String jh;
+	/**
+	 * 联系电话
+	 */
+	@TableField(exist = false)
+	@ApiModelProperty(value = "联系电话")
+	private String lxdh;
+	/**
+	 * 领取时间
+	 */
+	@TableField(exist = false)
+	@ApiModelProperty(value = "领取时间")
+	private Date lqsj;
+	/**
+	 * 归还时间
+	 */
+	@TableField(exist = false)
+	@ApiModelProperty(value = "归还时间")
+	private Date ghsj;
+	/**
+	 * 所属市局编码
+	 */
+	@ApiModelProperty(value = "所属市局编码")
+	private Long sssjBm;
+	/**
+	 * 所属市局名称
+	 */
+	@ApiModelProperty(value = "所属市局名称")
+	private String sssjMc;
+	/**
+	 * 所属分局编码
+	 */
+	@ApiModelProperty(value = "所属分局编码")
+	private Long ssfjBm;
+	/**
+	 * 所属分局名称
+	 */
+	@ApiModelProperty(value = "所属分局名称")
+	private String ssfjMc;
+	/**
+	 * 所属派出所编码
+	 */
+	@ApiModelProperty(value = "所属派出所编码")
+	private Long sspcsBm;
+	/**
+	 * 所属派出所名称
+	 */
+	@ApiModelProperty(value = "所属派出所名称")
+	private String sspcsMc;
+	@TableField(exist = false)
+	private String jd;
+	@TableField(exist = false)
+	private String wd;
+	@TableField(exist = false)
+	private String type;
+	@TableField(exist = false)
+	private String zhdw;
+	@TableField(exist = false)
+	private String dsdd;
+	@TableField(exist = false)
+	private String deptId;
+	@TableField(exist = false)
+	private List<Long> deptList;
+}

+ 59 - 0
src/main/java/org/springblade/modules/zbTable/mapper/ZbTableMapper.java

@@ -0,0 +1,59 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.zbTable.mapper;
+
+import org.springblade.modules.zbTable.entity.ZbTableEntity;
+import org.springblade.modules.zbTable.vo.ZbTableVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.zblsTable.entity.ZblsTableEntity;
+
+import java.util.List;
+
+/**
+ * 装备列表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2024-06-04
+ */
+public interface ZbTableMapper extends BaseMapper<ZbTableEntity> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param table
+	 * @return
+	 */
+	List<ZbTableEntity> selectTablePage(IPage page, ZbTableEntity table);
+
+	List<ZblsTableEntity> selectLsjl(String zbbh);
+
+	ZbTableEntity selectZbByZbbh(String zbbh);
+
+	ZblsTableEntity getLsjlByLqsj(String zbbh);
+
+	List<ZbTableEntity> selectDt(ZbTableEntity zbTable);
+
+	List<ZbTableEntity> getZbByDw(String[] id);
+
+	ZbTableEntity getZbzxdw(String zbbh);
+
+	List<ZbTableEntity> selectZbByPcs(ZbTableEntity zbTable);
+
+	ZbTableEntity selectZbbh(String zbbh);
+}

+ 177 - 0
src/main/java/org/springblade/modules/zbTable/mapper/ZbTableMapper.xml

@@ -0,0 +1,177 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.modules.zbTable.mapper.ZbTableMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="tableResultMap" type="org.springblade.modules.zbTable.entity.ZbTableEntity">
+        <result column="id" property="id"/>
+        <result column="zblx" property="zblx"/>
+        <result column="zbbh" property="zbbh"/>
+        <result column="sssj_bm" property="sssjBm"/>
+        <result column="sssj_mc" property="sssjMc"/>
+        <result column="ssfj_bm" property="ssfjBm"/>
+        <result column="ssfj_mc" property="ssfjMc"/>
+        <result column="sspcs_bm" property="sspcsBm"/>
+        <result column="sspcs_mc" property="sspcsMc"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+    </resultMap>
+
+
+    <select id="selectTablePage" resultMap="tableResultMap">
+        select
+            zt.id,
+            zt.zblx,
+            zt.zbbh,
+            zt.zbyt,
+            zt.sspcs_bm,
+            zbjwd.jd,
+            zbjwd.wd,
+            zbls.lqrxm,
+            zbls.xb,
+            zbls.sfzh,
+            zbls.jh,
+            zbls.lxdh,
+            zbls.lqsj,
+            zbls.ghsj,
+            zbls.zbzt
+        from zb_table zt
+        left join (
+            select
+                zbbh,
+                jd,
+                wd
+            from zbjwd_table
+            where (zbbh,create_time) in (select zbbh, MAX(create_time) from zbjwd_table group by zbbh ) ) zbjwd on zt.zbbh = zbjwd.zbbh
+        left join (
+            select
+                zbbh,
+                lqrxm,
+                xb,
+                sfzh,
+                jh,
+                lxdh,
+                lqsj,
+                ghsj,
+                zbyt,
+                zbzt
+            from zbls_table
+            where (zbbh,create_time) in (select zbbh, MAX(create_time) from zbls_table group by zbbh ) ) zbls on zt.zbbh = zbls.zbbh
+        where zt.is_deleted = 0
+        <if test="table.type == 1">
+            and (zt.zbzt != '已归还' or zt.zbzt != '延期归还')
+        </if>
+        <if test="table.type == 2">
+            and (zt.zbzt = '已归还' or zt.zbzt = '延期归还')
+        </if>
+        <if test="table.deptList != null and table.deptList.size > 0">
+            and (zt.sssj_bm in
+                <foreach collection="table.deptList" index="index" item="item" open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+                 or zt.ssfj_bm in
+                <foreach collection="table.deptList" index="index" item="item" open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+                 or zt.sspcs_bm in
+                <foreach collection="table.deptList" index="index" item="item" open="(" separator="," close=")">
+                    #{item}
+                </foreach> )
+        </if>
+        <if test="table.zbzt == '01'">
+            and zbls.zbzt = '01'
+        </if>
+        <if test="table.zbzt == '02'">
+            and zbls.zbzt = '02'
+        </if>
+        <if test="table.zbzt == '03'">
+            and zbls.zbzt = '03'
+        </if>
+        <if test="table.zbzt == '04'">
+            and zbls.zbzt = '04'
+        </if>
+        <if test="table.zbzt == '05'">
+            and zbls.zbzt = '05'
+        </if>
+        <if test="table.zbbh != '' and table.zbbh != null">
+            and zt.zbbh = #{table.zbbh}
+        </if>
+        <if test="table.zbzt == '01,02'">
+            and (zbls.zbzt = '01' or zbls.zbzt = '02')
+        </if>
+        <if test="table.zbzt == '03,04'">
+            and (zbls.zbzt = '03' or zbls.zbzt = '04')
+        </if>
+    </select>
+
+    <select id="selectLsjl" resultType="org.springblade.modules.zblsTable.entity.ZblsTableEntity">
+        select * from zbls_table where is_deleted = 0 and zbbh = #{zbbh} and ghsj is not null order by lqsj desc
+    </select>
+
+    <select id="selectZbByZbbh" resultMap="tableResultMap">
+        select
+            zbls.zbzt
+        from zb_table zt
+        left join zbls_table zbls on zt.zbbh = zbls.zbbh
+        where zt.is_deleted = 0 and zt.zbbh = #{zbbh}
+        order by zbls.create_time desc
+        limit 1
+    </select>
+
+    <select id="getLsjlByLqsj" resultType="org.springblade.modules.zblsTable.entity.ZblsTableEntity">
+        select * from zbls_table where is_deleted = 0 and zbbh = #{zbbh} order by lqsj desc limit 1
+    </select>
+
+    <select id="selectDt" resultMap="tableResultMap">
+        select
+            zt.id,
+            zbjwd.zbbh,
+            zbjwd.jd,
+            zbjwd.wd
+        from zb_table zt
+        left join zbjwd_table zbjwd on zt.zbbh = zbjwd.zbbh
+        left join (
+            select
+                zbbh,
+                lqrxm,
+                xb,
+                jh,
+                lxdh,
+                lqsj,
+                ghsj,
+                zbyt,
+                zbzt
+            from zbls_table
+            where (zbbh,create_time) in (select zbbh, MAX(create_time) from zbls_table group by zbbh ) ) zbls on zt.zbbh = zbls.zbbh
+        where zt.is_deleted = 0 and (zbls.zbzt = '01' or zbls.zbzt = '02')
+    </select>
+
+    <select id="getZbByDw" resultMap="tableResultMap">
+        select
+            *
+        from zb_table zt
+        left join zbls_table zbls on zt.zbbh = zbls.zbbh
+        where zt.is_deleted = 0 and (zbls.zbzt = '01' or zbls.zbzt = '02')
+        and zt.id in
+        <foreach collection="id" index="index" item="id" open="(" separator="," close=")">
+            #{id} :: int8
+        </foreach>
+    </select>
+
+    <select id="getZbzxdw" resultMap="tableResultMap">
+        select jd,wd from zbjwd_table where zbbh = #{zbbh} order by create_time desc
+    </select>
+
+    <select id="selectZbByPcs" resultMap="tableResultMap">
+        select * from zb_table where is_deleted = 0 and (sssj_bm = #{deptId} :: int8 or ssfj_bm = #{deptId} :: int8 or sspcs_bm = #{deptId} :: int8)
+    </select>
+
+    <select id="selectZbbh" resultMap="tableResultMap">
+        select * from zb_table where is_deleted = 0 and zbbh = #{zbbh}
+    </select>
+</mapper>

+ 59 - 0
src/main/java/org/springblade/modules/zbTable/service/IZbTableService.java

@@ -0,0 +1,59 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.zbTable.service;
+
+import org.springblade.modules.zbTable.entity.ZbTableEntity;
+import org.springblade.modules.zbTable.vo.ZbTableVO;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.zblsTable.entity.ZblsTableEntity;
+
+import java.util.List;
+
+/**
+ * 装备列表 服务类
+ *
+ * @author BladeX
+ * @since 2024-06-04
+ */
+public interface IZbTableService extends BaseService<ZbTableEntity> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param table
+	 * @return
+	 */
+	IPage<ZbTableEntity> selectTablePage(IPage<ZbTableEntity> page, ZbTableEntity table);
+
+	List<ZblsTableEntity> selectLsjl(String zbbh);
+
+	ZbTableEntity selectZbByZbbh(String zbbh);
+
+	ZblsTableEntity getLsjlByLqsj(String zbbh);
+
+	List<ZbTableEntity> selectDt(ZbTableEntity zbTable);
+
+	List<ZbTableEntity> getZbByDw(String[] id);
+
+	ZbTableEntity getZbzxdw(String zbbh);
+
+	List<ZbTableEntity> selectZbByPcs(ZbTableEntity zbTable);
+
+	ZbTableEntity selectZbbh(String zbbh);
+}

+ 84 - 0
src/main/java/org/springblade/modules/zbTable/service/impl/ZbTableServiceImpl.java

@@ -0,0 +1,84 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.zbTable.service.impl;
+
+import org.springblade.modules.zbTable.entity.ZbTableEntity;
+import org.springblade.modules.zbTable.vo.ZbTableVO;
+import org.springblade.modules.zbTable.mapper.ZbTableMapper;
+import org.springblade.modules.zbTable.service.IZbTableService;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.modules.zblsTable.entity.ZblsTableEntity;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.List;
+
+/**
+ * 装备列表 服务实现类
+ *
+ * @author BladeX
+ * @since 2024-06-04
+ */
+@Service
+public class ZbTableServiceImpl extends BaseServiceImpl<ZbTableMapper, ZbTableEntity> implements IZbTableService {
+
+	@Override
+	public IPage<ZbTableEntity> selectTablePage(IPage<ZbTableEntity> page, ZbTableEntity table) {
+		return page.setRecords(baseMapper.selectTablePage(page, table));
+	}
+
+	@Override
+	public List<ZblsTableEntity> selectLsjl(String zbbh) {
+		return baseMapper.selectLsjl(zbbh);
+	}
+
+	@Override
+	public ZbTableEntity selectZbByZbbh(String zbbh) {
+		return baseMapper.selectZbByZbbh(zbbh);
+	}
+
+	@Override
+	public ZblsTableEntity getLsjlByLqsj(String zbbh) {
+		return baseMapper.getLsjlByLqsj(zbbh);
+	}
+
+	@Override
+	public List<ZbTableEntity> selectDt(ZbTableEntity zbTable) {
+		return baseMapper.selectDt(zbTable);
+	}
+
+	@Override
+	public List<ZbTableEntity> getZbByDw(String[] id) {
+		return baseMapper.getZbByDw(id);
+	}
+
+	@Override
+	public ZbTableEntity getZbzxdw(String zbbh) {
+		return baseMapper.getZbzxdw(zbbh);
+	}
+
+	@Override
+	public List<ZbTableEntity> selectZbByPcs(ZbTableEntity zbTable) {
+		return baseMapper.selectZbByPcs(zbTable);
+	}
+
+	@Override
+	public ZbTableEntity selectZbbh(String zbbh) {
+		return baseMapper.selectZbbh(zbbh);
+	}
+
+}

+ 34 - 0
src/main/java/org/springblade/modules/zbTable/vo/ZbTableVO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.zbTable.vo;
+
+import org.springblade.modules.zbTable.entity.ZbTableEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 装备列表 视图实体类
+ *
+ * @author BladeX
+ * @since 2024-06-04
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ZbTableVO extends ZbTableEntity {
+	private static final long serialVersionUID = 1L;
+	private String type;
+}

+ 50 - 0
src/main/java/org/springblade/modules/zbTable/wrapper/ZbTableWrapper.java

@@ -0,0 +1,50 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.zbTable.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.modules.zbTable.entity.ZbTableEntity;
+import org.springblade.modules.zbTable.vo.ZbTableVO;
+import java.util.Objects;
+
+/**
+ * 装备列表 包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2024-06-04
+ */
+public class ZbTableWrapper extends BaseEntityWrapper<ZbTableEntity, ZbTableVO>  {
+
+	public static ZbTableWrapper build() {
+		return new ZbTableWrapper();
+ 	}
+
+	@Override
+	public ZbTableVO entityVO(ZbTableEntity table) {
+		ZbTableVO tableVO = Objects.requireNonNull(BeanUtil.copy(table, ZbTableVO.class));
+
+		//User createUser = UserCache.getUser(table.getCreateUser());
+		//User updateUser = UserCache.getUser(table.getUpdateUser());
+		//tableVO.setCreateUserName(createUser.getName());
+		//tableVO.setUpdateUserName(updateUser.getName());
+
+		return tableVO;
+	}
+
+
+}

+ 126 - 0
src/main/java/org/springblade/modules/zbdsTable/controller/ZbdsTableController.java

@@ -0,0 +1,126 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.zbdsTable.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.core.secure.BladeUser;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.zbdsTable.entity.ZbdsTableEntity;
+import org.springblade.modules.zbdsTable.vo.ZbdsTableVO;
+import org.springblade.modules.zbdsTable.wrapper.ZbdsTableWrapper;
+import org.springblade.modules.zbdsTable.service.IZbdsTableService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 装备丢失表 控制器
+ *
+ * @author BladeX
+ * @since 2024-06-06
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("blade-zbdsTable/zbdsTable")
+@Api(value = "装备丢失表", tags = "装备丢失表接口")
+public class ZbdsTableController extends BladeController {
+
+	private final IZbdsTableService zbdsTableService;
+
+	/**
+	 * 装备丢失表 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入zbdsTable")
+	public R<ZbdsTableVO> detail(ZbdsTableEntity zbdsTable) {
+		ZbdsTableEntity detail = zbdsTableService.getOne(Condition.getQueryWrapper(zbdsTable));
+		return R.data(ZbdsTableWrapper.build().entityVO(detail));
+	}
+	/**
+	 * 装备丢失表 分页
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入zbdsTable")
+	public R<IPage<ZbdsTableVO>> list(ZbdsTableEntity zbdsTable, Query query) {
+		IPage<ZbdsTableEntity> pages = zbdsTableService.page(Condition.getPage(query), Condition.getQueryWrapper(zbdsTable));
+		return R.data(ZbdsTableWrapper.build().pageVO(pages));
+	}
+
+	/**
+	 * 装备丢失表 自定义分页
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入zbdsTable")
+	public R<IPage<ZbdsTableVO>> page(ZbdsTableVO zbdsTable, Query query) {
+		IPage<ZbdsTableVO> pages = zbdsTableService.selectZbdsTablePage(Condition.getPage(query), zbdsTable);
+		return R.data(pages);
+	}
+
+	/**
+	 * 装备丢失表 新增
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入zbdsTable")
+	public R save(@Valid @RequestBody ZbdsTableEntity zbdsTable) {
+		return R.status(zbdsTableService.save(zbdsTable));
+	}
+
+	/**
+	 * 装备丢失表 修改
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入zbdsTable")
+	public R update(@Valid @RequestBody ZbdsTableEntity zbdsTable) {
+		return R.status(zbdsTableService.updateById(zbdsTable));
+	}
+
+	/**
+	 * 装备丢失表 新增或修改
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入zbdsTable")
+	public R submit(@Valid @RequestBody ZbdsTableEntity zbdsTable) {
+		return R.status(zbdsTableService.saveOrUpdate(zbdsTable));
+	}
+
+	/**
+	 * 装备丢失表 删除
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(zbdsTableService.deleteLogic(Func.toLongList(ids)));
+	}
+
+
+}

+ 34 - 0
src/main/java/org/springblade/modules/zbdsTable/dto/ZbdsTableDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.zbdsTable.dto;
+
+import org.springblade.modules.zbdsTable.entity.ZbdsTableEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 装备丢失表 数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2024-06-06
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ZbdsTableDTO extends ZbdsTableEntity {
+	private static final long serialVersionUID = 1L;
+
+}

+ 56 - 0
src/main/java/org/springblade/modules/zbdsTable/entity/ZbdsTableEntity.java

@@ -0,0 +1,56 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.zbdsTable.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.Date;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.mp.base.BaseEntity;
+import org.springblade.core.tenant.mp.TenantEntity;
+
+/**
+ * 装备丢失表 实体类
+ *
+ * @author BladeX
+ * @since 2024-06-06
+ */
+@Data
+@TableName("zbds_table")
+@ApiModel(value = "ZbdsTable对象", description = "装备丢失表")
+@EqualsAndHashCode(callSuper = true)
+public class ZbdsTableEntity extends BaseEntity {
+
+	/**
+	 * 装备编号
+	 */
+	@ApiModelProperty(value = "装备编号")
+	private String zbbh;
+	/**
+	 * 最后定位
+	 */
+	@ApiModelProperty(value = "最后定位")
+	private String zhdw;
+	/**
+	 * 丢失地点
+	 */
+	@ApiModelProperty(value = "丢失地点")
+	private String dsdd;
+
+}

+ 43 - 0
src/main/java/org/springblade/modules/zbdsTable/mapper/ZbdsTableMapper.java

@@ -0,0 +1,43 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.zbdsTable.mapper;
+
+import org.springblade.modules.zbdsTable.entity.ZbdsTableEntity;
+import org.springblade.modules.zbdsTable.vo.ZbdsTableVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 装备丢失表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2024-06-06
+ */
+public interface ZbdsTableMapper extends BaseMapper<ZbdsTableEntity> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param zbdsTable
+	 * @return
+	 */
+	List<ZbdsTableVO> selectZbdsTablePage(IPage page, ZbdsTableVO zbdsTable);
+
+
+}

+ 26 - 0
src/main/java/org/springblade/modules/zbdsTable/mapper/ZbdsTableMapper.xml

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.modules.zbdsTable.mapper.ZbdsTableMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="zbdsTableResultMap" type="org.springblade.modules.zbdsTable.entity.ZbdsTableEntity">
+        <result column="id" property="id"/>
+        <result column="zbbh" property="zbbh"/>
+        <result column="zhdw" property="zhdw"/>
+        <result column="dsdd" property="dsdd"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+    </resultMap>
+
+
+    <select id="selectZbdsTablePage" resultMap="zbdsTableResultMap">
+        select * from zbds_table where is_deleted = 0
+    </select>
+
+
+</mapper>

+ 42 - 0
src/main/java/org/springblade/modules/zbdsTable/service/IZbdsTableService.java

@@ -0,0 +1,42 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.zbdsTable.service;
+
+import org.springblade.modules.zbdsTable.entity.ZbdsTableEntity;
+import org.springblade.modules.zbdsTable.vo.ZbdsTableVO;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 装备丢失表 服务类
+ *
+ * @author BladeX
+ * @since 2024-06-06
+ */
+public interface IZbdsTableService extends BaseService<ZbdsTableEntity> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param zbdsTable
+	 * @return
+	 */
+	IPage<ZbdsTableVO> selectZbdsTablePage(IPage<ZbdsTableVO> page, ZbdsTableVO zbdsTable);
+
+
+}

+ 42 - 0
src/main/java/org/springblade/modules/zbdsTable/service/impl/ZbdsTableServiceImpl.java

@@ -0,0 +1,42 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.zbdsTable.service.impl;
+
+import org.springblade.modules.zbdsTable.entity.ZbdsTableEntity;
+import org.springblade.modules.zbdsTable.vo.ZbdsTableVO;
+import org.springblade.modules.zbdsTable.mapper.ZbdsTableMapper;
+import org.springblade.modules.zbdsTable.service.IZbdsTableService;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 装备丢失表 服务实现类
+ *
+ * @author BladeX
+ * @since 2024-06-06
+ */
+@Service
+public class ZbdsTableServiceImpl extends BaseServiceImpl<ZbdsTableMapper, ZbdsTableEntity> implements IZbdsTableService {
+
+	@Override
+	public IPage<ZbdsTableVO> selectZbdsTablePage(IPage<ZbdsTableVO> page, ZbdsTableVO zbdsTable) {
+		return page.setRecords(baseMapper.selectZbdsTablePage(page, zbdsTable));
+	}
+
+
+}

+ 35 - 0
src/main/java/org/springblade/modules/zbdsTable/vo/ZbdsTableVO.java

@@ -0,0 +1,35 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.zbdsTable.vo;
+
+import org.springblade.modules.zbdsTable.entity.ZbdsTableEntity;
+import org.springblade.core.tool.node.INode;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 装备丢失表 视图实体类
+ *
+ * @author BladeX
+ * @since 2024-06-06
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ZbdsTableVO extends ZbdsTableEntity {
+	private static final long serialVersionUID = 1L;
+
+}

+ 50 - 0
src/main/java/org/springblade/modules/zbdsTable/wrapper/ZbdsTableWrapper.java

@@ -0,0 +1,50 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.zbdsTable.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.modules.zbdsTable.entity.ZbdsTableEntity;
+import org.springblade.modules.zbdsTable.vo.ZbdsTableVO;
+import java.util.Objects;
+
+/**
+ * 装备丢失表 包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2024-06-06
+ */
+public class ZbdsTableWrapper extends BaseEntityWrapper<ZbdsTableEntity, ZbdsTableVO>  {
+
+	public static ZbdsTableWrapper build() {
+		return new ZbdsTableWrapper();
+ 	}
+
+	@Override
+	public ZbdsTableVO entityVO(ZbdsTableEntity zbdsTable) {
+		ZbdsTableVO zbdsTableVO = Objects.requireNonNull(BeanUtil.copy(zbdsTable, ZbdsTableVO.class));
+
+		//User createUser = UserCache.getUser(zbdsTable.getCreateUser());
+		//User updateUser = UserCache.getUser(zbdsTable.getUpdateUser());
+		//zbdsTableVO.setCreateUserName(createUser.getName());
+		//zbdsTableVO.setUpdateUserName(updateUser.getName());
+
+		return zbdsTableVO;
+	}
+
+
+}

+ 126 - 0
src/main/java/org/springblade/modules/zblsTable/controller/ZblsTableController.java

@@ -0,0 +1,126 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.zblsTable.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.core.secure.BladeUser;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.zblsTable.entity.ZblsTableEntity;
+import org.springblade.modules.zblsTable.vo.ZblsTableVO;
+import org.springblade.modules.zblsTable.wrapper.ZblsTableWrapper;
+import org.springblade.modules.zblsTable.service.IZblsTableService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 装备历史列表 控制器
+ *
+ * @author BladeX
+ * @since 2024-06-04
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("blade-zblsTable/zblsTable")
+@Api(value = "装备历史列表", tags = "装备历史列表接口")
+public class ZblsTableController extends BladeController {
+
+	private final IZblsTableService zblsTableService;
+
+	/**
+	 * 装备历史列表 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入zblsTable")
+	public R<ZblsTableVO> detail(ZblsTableEntity zblsTable) {
+		ZblsTableEntity detail = zblsTableService.getOne(Condition.getQueryWrapper(zblsTable));
+		return R.data(ZblsTableWrapper.build().entityVO(detail));
+	}
+	/**
+	 * 装备历史列表 分页
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入zblsTable")
+	public R<IPage<ZblsTableVO>> list(ZblsTableEntity zblsTable, Query query) {
+		IPage<ZblsTableEntity> pages = zblsTableService.page(Condition.getPage(query), Condition.getQueryWrapper(zblsTable));
+		return R.data(ZblsTableWrapper.build().pageVO(pages));
+	}
+
+	/**
+	 * 装备历史列表 自定义分页
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入zblsTable")
+	public R<IPage<ZblsTableVO>> page(ZblsTableVO zblsTable, Query query) {
+		IPage<ZblsTableVO> pages = zblsTableService.selectZblsTablePage(Condition.getPage(query), zblsTable);
+		return R.data(pages);
+	}
+
+	/**
+	 * 装备历史列表 新增
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入zblsTable")
+	public R save(@Valid @RequestBody ZblsTableEntity zblsTable) {
+		return R.status(zblsTableService.save(zblsTable));
+	}
+
+	/**
+	 * 装备历史列表 修改
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入zblsTable")
+	public R update(@Valid @RequestBody ZblsTableEntity zblsTable) {
+		return R.status(zblsTableService.updateById(zblsTable));
+	}
+
+	/**
+	 * 装备历史列表 新增或修改
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入zblsTable")
+	public R submit(@Valid @RequestBody ZblsTableEntity zblsTable) {
+		return R.status(zblsTableService.saveOrUpdate(zblsTable));
+	}
+
+	/**
+	 * 装备历史列表 删除
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(zblsTableService.deleteLogic(Func.toLongList(ids)));
+	}
+
+
+}

+ 34 - 0
src/main/java/org/springblade/modules/zblsTable/dto/ZblsTableDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.zblsTable.dto;
+
+import org.springblade.modules.zblsTable.entity.ZblsTableEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 装备历史列表 数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2024-06-04
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ZblsTableDTO extends ZblsTableEntity {
+	private static final long serialVersionUID = 1L;
+
+}

+ 135 - 0
src/main/java/org/springblade/modules/zblsTable/entity/ZblsTableEntity.java

@@ -0,0 +1,135 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.zblsTable.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.Date;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.mp.base.BaseEntity;
+import org.springblade.core.tenant.mp.TenantEntity;
+
+/**
+ * 装备历史列表 实体类
+ *
+ * @author BladeX
+ * @since 2024-06-04
+ */
+@Data
+@TableName("zbls_table")
+@ApiModel(value = "ZblsTable对象", description = "装备历史列表")
+@EqualsAndHashCode(callSuper = true)
+public class ZblsTableEntity extends BaseEntity {
+
+	/**
+	 * 装备类型
+	 */
+	@ApiModelProperty(value = "装备类型")
+	private String zblx;
+	/**
+	 * 装备编号
+	 */
+	@ApiModelProperty(value = "装备编号")
+	private String zbbh;
+	/**
+	 * 装备用途
+	 */
+	@ApiModelProperty(value = "装备用途")
+	private String zbyt;
+	/**
+	 * 装备状态
+	 */
+	@ApiModelProperty(value = "装备状态")
+	private String zbzt;
+	/**
+	 * 领取人姓名
+	 */
+	@ApiModelProperty(value = "领取人姓名")
+	private String lqrxm;
+	/**
+	 * 性别
+	 */
+	@ApiModelProperty(value = "性别")
+	private String xb;
+	/**
+	 * 身份证号
+	 */
+	@ApiModelProperty(value = "身份证号")
+	private String sfzh;
+	/**
+	 * 警号
+	 */
+	@ApiModelProperty(value = "警号")
+	private String jh;
+	/**
+	 * 联系电话
+	 */
+	@ApiModelProperty(value = "联系电话")
+	private String lxdh;
+	/**
+	 * 领取时间
+	 */
+	@ApiModelProperty(value = "领取时间")
+	private Date lqsj;
+	/**
+	 * 归还时间
+	 */
+	@ApiModelProperty(value = "归还时间")
+	private Date ghsj;
+	/**
+	 * 所属市局编码
+	 */
+	@TableField(exist = false)
+	private Long sssjBm;
+	/**
+	 * 所属市局名称
+	 */
+	@TableField(exist = false)
+	private String sssjMc;
+	/**
+	 * 所属分局编码
+	 */
+	@TableField(exist = false)
+	private Long ssfjBm;
+	/**
+	 * 所属分局名称
+	 */
+	@TableField(exist = false)
+	private String ssfjMc;
+	/**
+	 * 所属派出所编码
+	 */
+	@TableField(exist = false)
+	private Long sspcsBm;
+	/**
+	 * 所属派出所名称
+	 */
+	@TableField(exist = false)
+	private String sspcsMc;
+	/**
+	 * 操作
+	 */
+	@ApiModelProperty(value = "操作")
+	private String cz;
+	@TableField(exist = false)
+	private String zhdw;
+	@TableField(exist = false)
+	private String dsdd;
+}

+ 43 - 0
src/main/java/org/springblade/modules/zblsTable/mapper/ZblsTableMapper.java

@@ -0,0 +1,43 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.zblsTable.mapper;
+
+import org.springblade.modules.zblsTable.entity.ZblsTableEntity;
+import org.springblade.modules.zblsTable.vo.ZblsTableVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 装备历史列表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2024-06-04
+ */
+public interface ZblsTableMapper extends BaseMapper<ZblsTableEntity> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param zblsTable
+	 * @return
+	 */
+	List<ZblsTableVO> selectZblsTablePage(IPage page, ZblsTableVO zblsTable);
+
+
+}

+ 40 - 0
src/main/java/org/springblade/modules/zblsTable/mapper/ZblsTableMapper.xml

@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.modules.zblsTable.mapper.ZblsTableMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="zblsTableResultMap" type="org.springblade.modules.zblsTable.entity.ZblsTableEntity">
+        <result column="id" property="id"/>
+        <result column="zblx" property="zblx"/>
+        <result column="zbbh" property="zbbh"/>
+        <result column="zbyt" property="zbyt"/>
+        <result column="zbzt" property="zbzt"/>
+        <result column="lqrxm" property="lqrxm"/>
+        <result column="xb" property="xb"/>
+        <result column="sfzh" property="sfzh"/>
+        <result column="jh" property="jh"/>
+        <result column="lxdh" property="lxdh"/>
+        <result column="lqsj" property="lqsj"/>
+        <result column="ghsj" property="ghsj"/>
+        <result column="sssj_bm" property="sssjBm"/>
+        <result column="sssj_mc" property="sssjMc"/>
+        <result column="ssfj_bm" property="ssfjBm"/>
+        <result column="ssfj_mc" property="ssfjMc"/>
+        <result column="sspcs_bm" property="sspcsBm"/>
+        <result column="sspcs_mc" property="sspcsMc"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+    </resultMap>
+
+
+    <select id="selectZblsTablePage" resultMap="zblsTableResultMap">
+        select * from zbls_table where is_deleted = 0
+    </select>
+
+
+</mapper>

+ 42 - 0
src/main/java/org/springblade/modules/zblsTable/service/IZblsTableService.java

@@ -0,0 +1,42 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.zblsTable.service;
+
+import org.springblade.modules.zblsTable.entity.ZblsTableEntity;
+import org.springblade.modules.zblsTable.vo.ZblsTableVO;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 装备历史列表 服务类
+ *
+ * @author BladeX
+ * @since 2024-06-04
+ */
+public interface IZblsTableService extends BaseService<ZblsTableEntity> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param zblsTable
+	 * @return
+	 */
+	IPage<ZblsTableVO> selectZblsTablePage(IPage<ZblsTableVO> page, ZblsTableVO zblsTable);
+
+
+}

+ 42 - 0
src/main/java/org/springblade/modules/zblsTable/service/impl/ZblsTableServiceImpl.java

@@ -0,0 +1,42 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.zblsTable.service.impl;
+
+import org.springblade.modules.zblsTable.entity.ZblsTableEntity;
+import org.springblade.modules.zblsTable.vo.ZblsTableVO;
+import org.springblade.modules.zblsTable.mapper.ZblsTableMapper;
+import org.springblade.modules.zblsTable.service.IZblsTableService;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 装备历史列表 服务实现类
+ *
+ * @author BladeX
+ * @since 2024-06-04
+ */
+@Service
+public class ZblsTableServiceImpl extends BaseServiceImpl<ZblsTableMapper, ZblsTableEntity> implements IZblsTableService {
+
+	@Override
+	public IPage<ZblsTableVO> selectZblsTablePage(IPage<ZblsTableVO> page, ZblsTableVO zblsTable) {
+		return page.setRecords(baseMapper.selectZblsTablePage(page, zblsTable));
+	}
+
+
+}

+ 35 - 0
src/main/java/org/springblade/modules/zblsTable/vo/ZblsTableVO.java

@@ -0,0 +1,35 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.zblsTable.vo;
+
+import org.springblade.modules.zblsTable.entity.ZblsTableEntity;
+import org.springblade.core.tool.node.INode;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 装备历史列表 视图实体类
+ *
+ * @author BladeX
+ * @since 2024-06-04
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ZblsTableVO extends ZblsTableEntity {
+	private static final long serialVersionUID = 1L;
+
+}

+ 50 - 0
src/main/java/org/springblade/modules/zblsTable/wrapper/ZblsTableWrapper.java

@@ -0,0 +1,50 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.zblsTable.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.modules.zblsTable.entity.ZblsTableEntity;
+import org.springblade.modules.zblsTable.vo.ZblsTableVO;
+import java.util.Objects;
+
+/**
+ * 装备历史列表 包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2024-06-04
+ */
+public class ZblsTableWrapper extends BaseEntityWrapper<ZblsTableEntity, ZblsTableVO>  {
+
+	public static ZblsTableWrapper build() {
+		return new ZblsTableWrapper();
+ 	}
+
+	@Override
+	public ZblsTableVO entityVO(ZblsTableEntity zblsTable) {
+		ZblsTableVO zblsTableVO = Objects.requireNonNull(BeanUtil.copy(zblsTable, ZblsTableVO.class));
+
+		//User createUser = UserCache.getUser(zblsTable.getCreateUser());
+		//User updateUser = UserCache.getUser(zblsTable.getUpdateUser());
+		//zblsTableVO.setCreateUserName(createUser.getName());
+		//zblsTableVO.setUpdateUserName(updateUser.getName());
+
+		return zblsTableVO;
+	}
+
+
+}

+ 10 - 0
src/main/java/sql/table.menu.sql

@@ -0,0 +1,10 @@
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1797911205471584257', 1123598815738675201, 'table', '装备列表', 'menu', '/zbTable/table', NULL, 1, 1, 0, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1797911205471584258', '1797911205471584257', 'table_add', '新增', 'add', '/zbTable/table/add', 'plus', 1, 2, 1, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1797911205471584259', '1797911205471584257', 'table_edit', '修改', 'edit', '/zbTable/table/edit', 'form', 2, 2, 2, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1797911205471584260', '1797911205471584257', 'table_delete', '删除', 'delete', '/api/blade-table/table/remove', 'delete', 3, 2, 3, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1797911205471584261', '1797911205471584257', 'table_view', '查看', 'view', '/zbTable/table/view', 'file-text', 4, 2, 2, 1, NULL, 0);

+ 10 - 0
src/main/java/sql/zbdstable.menu.sql

@@ -0,0 +1,10 @@
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1798519201868296193', 1123598815738675201, 'zbdsTable', '装备丢失表', 'menu', '/zbdsTable/zbdsTable', NULL, 1, 1, 0, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1798519201868296194', '1798519201868296193', 'zbdsTable_add', '新增', 'add', '/zbdsTable/zbdsTable/add', 'plus', 1, 2, 1, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1798519201868296195', '1798519201868296193', 'zbdsTable_edit', '修改', 'edit', '/zbdsTable/zbdsTable/edit', 'form', 2, 2, 2, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1798519201868296196', '1798519201868296193', 'zbdsTable_delete', '删除', 'delete', '/api/blade-zbdsTable/zbdsTable/remove', 'delete', 3, 2, 3, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1798519201868296197', '1798519201868296193', 'zbdsTable_view', '查看', 'view', '/zbdsTable/zbdsTable/view', 'file-text', 4, 2, 2, 1, NULL, 0);

+ 10 - 0
src/main/java/sql/zblstable.menu.sql

@@ -0,0 +1,10 @@
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1797912195692232706', 1123598815738675201, 'zblsTable', '装备历史列表', 'menu', '/zblsTable/zblsTable', NULL, 1, 1, 0, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1797912195692232707', '1797912195692232706', 'zblsTable_add', '新增', 'add', '/zblsTable/zblsTable/add', 'plus', 1, 2, 1, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1797912195692232708', '1797912195692232706', 'zblsTable_edit', '修改', 'edit', '/zblsTable/zblsTable/edit', 'form', 2, 2, 2, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1797912195692232709', '1797912195692232706', 'zblsTable_delete', '删除', 'delete', '/api/blade-zblsTable/zblsTable/remove', 'delete', 3, 2, 3, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1797912195692232710', '1797912195692232706', 'zblsTable_view', '查看', 'view', '/zblsTable/zblsTable/view', 'file-text', 4, 2, 2, 1, NULL, 0);

+ 6 - 6
src/main/resources/application-dev.yml

@@ -13,13 +13,13 @@ spring:
     #  commandTimeout: 5000
   datasource:
     # MySql
-    url: jdbc:mysql://localhost:3306/bladex_boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
-    username: root
-    password: root
+    #url: jdbc:mysql://localhost:3306/bladex_boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
+    #username: root
+    #password: root
     # PostgreSQL
-    #url: jdbc:postgresql://127.0.0.1:5432/bladex_boot
-    #username: postgres
-    #password: 123456
+    url: jdbc:postgresql://118.195.196.59:5432/xwkjdb?currentSchema=zdzb
+    username: xwkj
+    password: xwkj2022@
     # Oracle
     #url: jdbc:oracle:thin:@127.0.0.1:1521:orcl
     #username: BLADEX_BOOT

+ 3 - 3
src/main/resources/application-test.yml

@@ -14,9 +14,9 @@ spring:
     #  nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003
     #  commandTimeout: 5000
   datasource:
-    url: jdbc:mysql://localhost:3306/bladex_boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
-    username: root
-    password: root
+    url: jdbc:postgresql://localhost:5432/postgres?currentSchema=jdrh
+    username: postgres
+    password: admin
 
 #第三方登陆
 social:

+ 2 - 2
src/main/resources/application.yml

@@ -14,8 +14,8 @@ server:
 
 spring:
   datasource:
-    driver-class-name: com.mysql.cj.jdbc.Driver
-    #driver-class-name: org.postgresql.Driver
+    #driver-class-name: com.mysql.cj.jdbc.Driver
+    driver-class-name: org.postgresql.Driver
     #driver-class-name: oracle.jdbc.OracleDriver
     #driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
     #driver-class-name: dm.jdbc.driver.DmDriver