Commit 72fe1d4d by 赵剑炜

Merge branch 'develop' into develop-zhaojw

parents cad61c5f 3c5c6720
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<option name="myName" value="Project Default" /> <option name="myName" value="Project Default" />
<inspection_tool class="DuplicatedCode" enabled="true" level="WEAK WARNING" enabled_by_default="true"> <inspection_tool class="DuplicatedCode" enabled="true" level="WEAK WARNING" enabled_by_default="true">
<Languages> <Languages>
<language minSize="203" name="Java" /> <language minSize="196" name="Java" />
</Languages> </Languages>
</inspection_tool> </inspection_tool>
</profile> </profile>
......
artifactId=jyzb-api
groupId=com.junmp.jyzb
version=1.0.0
com\junmp\jyzb\api\exception\enums\ProductExceptionEnum.class
com\junmp\jyzb\api\bean\req\ProductReq.class
com\junmp\jyzb\api\bean\req\ProductSkuReq.class
com\junmp\jyzb\api\bean\req\CompanyReq.class
com\junmp\jyzb\api\util\GenCodeUtil.class
com\junmp\jyzb\api\bean\req\DbAccessReq.class
com\junmp\jyzb\api\bean\vo\NDefContentVo.class
com\junmp\jyzb\api\constant\JYZBConstant.class
com\junmp\jyzb\api\bean\dto\ProductProcessDto.class
com\junmp\jyzb\api\exception\enums\CompanyExceptionEnum.class
com\junmp\jyzb\api\bean\req\ProductBatchReq.class
com\junmp\jyzb\api\bean\req\ProductTagReq.class
com\junmp\jyzb\api\bean\vo\ProductSkuVo.class
com\junmp\jyzb\api\bean\dto\ProductTagDto.class
com\junmp\jyzb\api\bean\vo\TagInfoVo.class
com\junmp\jyzb\api\bean\dto\SimpleTagDto.class
com\junmp\jyzb\api\bean\vo\AuthAccessVo.class
com\junmp\jyzb\api\bean\dto\ProductBatchDto.class
com\junmp\jyzb\api\bean\vo\TagInfoVo$TagInfoVoBuilder.class
com\junmp\jyzb\api\exception\JYZBAppException.class
D:\java-project\jyzb\jyzb-platform\jyzb-api\src\main\java\com\junmp\jyzb\api\bean\req\ProductBatchReq.java
D:\java-project\jyzb\jyzb-platform\jyzb-api\src\main\java\com\junmp\jyzb\api\bean\dto\SimpleTagDto.java
D:\java-project\jyzb\jyzb-platform\jyzb-api\src\main\java\com\junmp\jyzb\api\bean\req\ProductTagReq.java
D:\java-project\jyzb\jyzb-platform\jyzb-api\src\main\java\com\junmp\jyzb\api\exception\enums\package-info.java
D:\java-project\jyzb\jyzb-platform\jyzb-api\src\main\java\com\junmp\jyzb\api\bean\req\DbAccessReq.java
D:\java-project\jyzb\jyzb-platform\jyzb-api\src\main\java\com\junmp\jyzb\api\bean\vo\AuthAccessVo.java
D:\java-project\jyzb\jyzb-platform\jyzb-api\src\main\java\com\junmp\jyzb\api\util\GenCodeUtil.java
D:\java-project\jyzb\jyzb-platform\jyzb-api\src\main\java\com\junmp\jyzb\api\bean\req\ProductSkuReq.java
D:\java-project\jyzb\jyzb-platform\jyzb-api\src\main\java\com\junmp\jyzb\api\bean\vo\TagInfoVo.java
D:\java-project\jyzb\jyzb-platform\jyzb-api\src\main\java\com\junmp\jyzb\api\exception\JYZBAppException.java
D:\java-project\jyzb\jyzb-platform\jyzb-api\src\main\java\com\junmp\jyzb\api\bean\dto\ProductBatchDto.java
D:\java-project\jyzb\jyzb-platform\jyzb-api\src\main\java\com\junmp\jyzb\api\bean\dto\ProductProcessDto.java
D:\java-project\jyzb\jyzb-platform\jyzb-api\src\main\java\com\junmp\jyzb\api\bean\dto\ProductTagDto.java
D:\java-project\jyzb\jyzb-platform\jyzb-api\src\main\java\com\junmp\jyzb\api\bean\req\CompanyReq.java
D:\java-project\jyzb\jyzb-platform\jyzb-api\src\main\java\com\junmp\jyzb\api\bean\vo\NDefContentVo.java
D:\java-project\jyzb\jyzb-platform\jyzb-api\src\main\java\com\junmp\jyzb\api\bean\vo\ProductSkuVo.java
D:\java-project\jyzb\jyzb-platform\jyzb-api\src\main\java\com\junmp\jyzb\api\bean\req\ProductReq.java
D:\java-project\jyzb\jyzb-platform\jyzb-api\src\main\java\com\junmp\jyzb\api\exception\enums\CompanyExceptionEnum.java
D:\java-project\jyzb\jyzb-platform\jyzb-api\src\main\java\com\junmp\jyzb\api\exception\enums\ProductExceptionEnum.java
D:\java-project\jyzb\jyzb-platform\jyzb-api\src\main\java\com\junmp\jyzb\api\constant\JYZBConstant.java
package com.junmp.jyzb.config;
import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class MybatisPlusConfig {
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
// 添加分页插件
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
return interceptor;
}
}
\ No newline at end of file
package com.junmp.jyzb.controller;
import com.junmp.jyzb.service.CabinetService;
import com.junmp.jyzb.utils.HttpStatus;
import com.junmp.jyzb.utils.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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 javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@RestController
@Slf4j
@RequestMapping("/Cabinet")
@Api(tags = "单警柜基础信息模块")
public class CabinetController {
@Resource
public CabinetService cabinetService;
@PostMapping("/AddCabinet")
@ApiOperation("添加单警柜")
public ResponseResult addCabinet(@RequestBody Map<String,Object> msg) {
cabinetService.addCabinet(msg);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
@PostMapping("/DeleteCabinet")
@ApiOperation("删除单警柜信息")
public ResponseResult deleteCabinet(@RequestBody Map<String,Object> msg) {
cabinetService.deleteCabinet(msg);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
@PostMapping("/GetAllCabinet")
@ApiOperation("查询单警柜列表")
public ResponseResult getAllWarehouse(@RequestBody Map<String, Object> orgId){
//获取该组织机构下所有警员的id
List<Map<String, Object>> allCabinet=new ArrayList<>();
List<String> allCabinetId =cabinetService.getAllCabinetId(orgId);
for (String cabinetId : allCabinetId){
Map<String, Object> warehouseMsg = cabinetService.getOneCabinet(cabinetId);
allCabinet.add(warehouseMsg);
}
return new ResponseResult(HttpStatus.SUCCESS,"操作成功",allCabinet);
}
@PostMapping("/UpdateCabinet")
@ApiOperation("修改单警柜信息")
public ResponseResult updateCabinet(@RequestBody Map<String,Object> msg) {
cabinetService.updateCabinet(msg);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
@PostMapping("/ChangeCabinetState")
@ApiOperation("单警柜状态变更")
public ResponseResult changeCabinetState(@RequestBody Map<String,Object> msg) {
//cabinetService.changeCabinetState(msg);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
}
\ No newline at end of file
package com.junmp.jyzb.controller;
import com.junmp.jyzb.service.EquipmentSizeService;
import com.junmp.jyzb.service.WarehouseService;
import com.junmp.jyzb.utils.HttpStatus;
import com.junmp.jyzb.utils.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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 javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@RestController
@Slf4j
@RequestMapping("/Size")
@Api(tags = "号型基础信息模块")
public class EquipmentSizeController {
@Resource
public EquipmentSizeService equipmentSizeService;
@PostMapping("/AddSize")
@ApiOperation("添加号型信息")
public ResponseResult addSize(@RequestBody Map<String,Object> msg) {
equipmentSizeService.addSize(msg);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
@PostMapping("/DeleteSize")
@ApiOperation("删除号型信息")
public ResponseResult deleteSize(@RequestBody Map<String,Object> msg) {
equipmentSizeService.deleteSize(msg);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
@PostMapping("/GetOneSize")
@ApiOperation("查询单个号型信息")
public ResponseResult getOneSize(@RequestBody Map<String, Object> msg) {
String sizeId = msg.get("id").toString();
Map<String, Object> sizeMsg = equipmentSizeService.getOneSize(sizeId);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功",sizeMsg);
}
@PostMapping("/ShowSize")
@ApiOperation("查询号型列表") //根据组织机构id查询
public ResponseResult getAllSize(@RequestBody Map<String, Object> typeId){
//获取该组织机构下所有警员的id
List<Map<String, Object>> allSize=new ArrayList<>();
List<String> allSizeId =equipmentSizeService.getAllSizeId(typeId);
for (String sizeId :allSizeId){
Map<String, Object> sizeMsg = equipmentSizeService.getOneSize(sizeId);
allSize.add(sizeMsg);
}
return new ResponseResult(HttpStatus.SUCCESS,"操作成功",allSize);
}
@PostMapping("/UpdateSize")
@ApiOperation("修改号型信息")
public ResponseResult updateSize(@RequestBody Map<String,Object> msg) {
equipmentSizeService.updateSize(msg);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
}
package com.junmp.jyzb.controller;
import com.junmp.jyzb.service.EquipmentTypeService;
import com.junmp.jyzb.service.WarehouseService;
import com.junmp.jyzb.utils.HttpStatus;
import com.junmp.jyzb.utils.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@RestController
@Slf4j
@RequestMapping("/Equipment")
@Api(tags = "物资基础信息模块")
public class EquipmentTypeController {
@Resource
public EquipmentTypeService equipmentTypeService;
@PostMapping("/ShowEquipmentList")
@ApiOperation("查询物资列表")
public ResponseResult getMenuList() {
List<Map<String, Object>> equipmentList = equipmentTypeService.getEquipmentList();
return new ResponseResult(HttpStatus.SUCCESS,"操作成功",equipmentList);
}
@PostMapping("/AddEquipment")
@ApiOperation("添加物资")
public ResponseResult addEquipment(@RequestBody Map<String,Object> msg) {
equipmentTypeService.addEquipment(msg);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
// @PostMapping("/ChangeEquipmentState")
// @ApiOperation("改变物资状态")
// public ResponseResult deleteWarehouse(@RequestBody Map<String,Object> msg) {
// //TODO
// return new ResponseResult(10000,"操作成功");
// }
}
...@@ -3,7 +3,9 @@ package com.junmp.jyzb.controller; ...@@ -3,7 +3,9 @@ package com.junmp.jyzb.controller;
import com.junmp.jyzb.domain.Policeman; import com.junmp.jyzb.domain.Policeman;
import com.junmp.jyzb.service.PoliceFingerService; import com.junmp.jyzb.service.PoliceFingerService;
import com.junmp.jyzb.service.PolicemanService; import com.junmp.jyzb.service.PolicemanService;
import com.junmp.jyzb.utils.HttpStatus;
import com.junmp.jyzb.utils.ResponseResult; import com.junmp.jyzb.utils.ResponseResult;
import com.sun.net.httpserver.Authenticator;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -27,59 +29,93 @@ public class PoliceController { ...@@ -27,59 +29,93 @@ public class PoliceController {
@Resource @Resource
private PoliceFingerService fingerService; private PoliceFingerService fingerService;
@PostMapping("/GetAllPolice") @PostMapping("/AddPoliceman")
@ApiOperation("查询警员列表") @ApiOperation("添加警员信息")
public ResponseResult addPoliceman(@RequestBody Map<String,Object> msg) {
policemanService.addPoliceman(msg);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
@PostMapping("/AddFingerInfo")
@ApiOperation("添加指纹信息")
public ResponseResult addFingerInfo(@RequestBody Map<String,Object> msg) {
policemanService.addFingerInfo(msg);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
@PostMapping("/AddFaceInfo")
@ApiOperation("添加警员面部信息")
public ResponseResult addFaceInfo(@RequestBody Map<String,Object> msg) {
policemanService.addFaceInfo(msg);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
@PostMapping("/DeletePolice")
@ApiOperation("删除警员信息")
public ResponseResult deletePolice(@RequestBody Map<String,Object> msg) {
policemanService.deletePolice(msg);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
@PostMapping("/ChangePoliceState")
@ApiOperation("修改警员状态")
public ResponseResult ChangePoliceState(@RequestBody Map<String,Object> msg) {
policemanService.changePoliceState(msg);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
@PostMapping("/ShowPolice")
@ApiOperation("查询警员列表") //根据组织机构id查询
public ResponseResult getAllPoliceman(@RequestBody Map<String, Object> orgId){ public ResponseResult getAllPoliceman(@RequestBody Map<String, Object> orgId){
//获取该组织机构下所有警员的id //获取该组织机构下所有警员的id
List<Map<String, Object>> allPoliceman=new ArrayList<>(); List<Map<String, Object>> allPoliceman=new ArrayList<>();
List<String> allPoliceId =policemanService.getAllPoliceId(orgId); List<String> allPoliceId =policemanService.getAllPoliceId(orgId);
for (String policeId :allPoliceId){ for (String policeId :allPoliceId){
Map<String, Object> policeMsg = policemanService.getOnePolice(policeId); Map<String, Object> policeMsg = policemanService.getOnePolice(policeId);
List<Map<String, Object>> fingerprints= fingerService.getFingersByUserId(policeId); List<Map<String, Object>> fingerprints= fingerService.getFingersByUserId(policeId);
policeMsg.put("fingerMsg",fingerprints); policeMsg.put("fingerMsg",fingerprints);
allPoliceman.add(policeMsg); allPoliceman.add(policeMsg);
} }
return new ResponseResult(HttpStatus.SUCCESS,"操作成功",allPoliceman);
return new ResponseResult(10000,"操作成功",allPoliceman);
} }
@PostMapping("/GetOnePolice") @PostMapping("/GetPoliceDetail")
@ApiOperation("查询单个警员信息") @ApiOperation("查询单个警员信息")
public ResponseResult getOnePolice(@RequestBody Map<String, Object> msg) { public ResponseResult getOnePolice(@RequestBody Map<String, Object> msg) {
String userId = msg.get("policeId").toString(); String userId = msg.get("policeId").toString();
Map<String, Object> policeMsg = policemanService.getOnePolice(userId); Map<String, Object> policeMsg = policemanService.getOnePolice(userId);
// List<Map<String, Object>> fingerprints = fingerService.getFingersByUserId(userId);
List<Map<String, Object>> fingerprints = fingerService.getFingersByUserId(userId); // policeMsg.put("fingerMsg",fingerprints);
policeMsg.put("fingerMsg",fingerprints); return new ResponseResult(HttpStatus.SUCCESS,"操作成功",policeMsg);
return new ResponseResult(10000,"操作成功",policeMsg);
}
@PostMapping("/AddPoliceman")
@ApiOperation("添加警员信息")
public ResponseResult addPoliceman(@RequestBody Map<String,Object> msg) {
policemanService.addPoliceman(msg);
return new ResponseResult(10000,"操作成功");
}
@PostMapping("/DeletePolice")
@ApiOperation("删除警员信息")
public ResponseResult deletePolice(@RequestBody Map<String,Object> msg) {
policemanService.deletePolice(msg);
return new ResponseResult(10000,"操作成功");
} }
@PostMapping("/UpdatePolice") @PostMapping("/UpdatePolice")
@ApiOperation("修改警员信息") @ApiOperation("修改警员信息")
public ResponseResult updatePolice(@RequestBody Map<String,Object> msg) { public ResponseResult updatePolice(@RequestBody Map<String,Object> msg) {
policemanService.updatePolice(msg); policemanService.updatePolice(msg);
return new ResponseResult(10000,"操作成功"); return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
} }
@PostMapping("/DeletePoliceFinger") @PostMapping("/DeleteFingerInfo")
@ApiOperation("删除警员指纹信息") @ApiOperation("删除警员指纹信息")
public ResponseResult deletePoliceFinger(@RequestBody Map<String,Object> msg) { public ResponseResult deletePoliceFinger(@RequestBody Map<String,Object> msg) {
policemanService.deleteFinger(msg); policemanService.deleteFinger(msg);
return new ResponseResult(10000,"操作成功"); return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
@PostMapping("/GetAllPoliceByCabinet")
@ApiOperation("查询与单警柜绑定的警员信息") //根据单警柜id查询
public ResponseResult getAllPoliceByCabinet(@RequestBody Map<String, Object> cabinetId){
//获取该组织机构下所有警员的id
List<Map<String, Object>> allPoliceman=new ArrayList<>();
List<String> allPoliceId =policemanService.getAllPoliceIdByCabinet(cabinetId);
for (String policeId :allPoliceId){
Map<String, Object> policeMsg = policemanService.getOnePolice(policeId);
List<Map<String, Object>> fingerprints= fingerService.getFingersByUserId(policeId);
policeMsg.put("fingerMsg",fingerprints);
allPoliceman.add(policeMsg);
}
return new ResponseResult(HttpStatus.SUCCESS,"操作成功",allPoliceman);
} }
} }
package com.junmp.jyzb.controller;
import com.junmp.jyzb.service.SupplierService;
import com.junmp.jyzb.service.WarehouseService;
import com.junmp.jyzb.utils.HttpStatus;
import com.junmp.jyzb.utils.RequestParam;
import com.junmp.jyzb.utils.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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 javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@RestController
@Slf4j
@RequestMapping("/Supplier")
@Api(tags = "供应商基础信息模块")
public class SupplierController {
@Resource
public SupplierService supplierService;
@PostMapping("/AddSupplier")
@ApiOperation("添加供应商")
public ResponseResult addSupplier(@RequestBody Map<String,Object> msg) {
supplierService.addSupplier(msg);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
@PostMapping("/DeleteSupplier")
@ApiOperation("删除供应商信息")
public ResponseResult deleteSupplier(@RequestBody Map<String,Object> msg) {
supplierService.deleteSupplier(msg);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
@PostMapping("/ShowSupplier")
@ApiOperation("查询供应商列表")
public ResponseResult getAllSupplier(@RequestBody Map<String,Object> msg){
List<Map<String, Object>> allSupplier=new ArrayList<>();
List<String> allSupplierId =supplierService.getAllSupplierId();
for (String supplierId :allSupplierId){
Map<String, Object> supplierMsg = supplierService.getOneSupplier(supplierId);
allSupplier.add(supplierMsg);
}
return new ResponseResult(HttpStatus.SUCCESS,"操作成功",allSupplier);
}
@PostMapping("/GetOneSupplier")
@ApiOperation("查询单个供应商信息")
public ResponseResult getOneSupplier(@RequestBody Map<String, Object> msg) {
String supplierId = msg.get("supplierId").toString();
Map<String, Object> supplierMsg = supplierService.getOneSupplier(supplierId);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功",supplierMsg);
}
@PostMapping("/UpdateSupplier")
@ApiOperation("修改供应商信息")
public ResponseResult updateSupplier(@RequestBody Map<String,Object> msg) {
supplierService.updateSupplier(msg);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
}
package com.junmp.jyzb.controller; package com.junmp.jyzb.controller;
import com.junmp.jyzb.service.PoliceFingerService;
import com.junmp.jyzb.service.PolicemanService;
import com.junmp.jyzb.service.WarehouseService;
import com.junmp.jyzb.utils.HttpStatus;
import com.junmp.jyzb.utils.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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 javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@RestController
@Slf4j
@RequestMapping("/Warehouse")
@Api(tags = "仓库基础信息模块")
public class WarehouseController { public class WarehouseController {
@Resource
public WarehouseService warehouseService;
@PostMapping("/AddWarehouse")
@ApiOperation("添加仓库")
public ResponseResult addWarehouse(@RequestBody Map<String,Object> msg) {
warehouseService.addWarehouse(msg);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
@PostMapping("/DeleteWarehouse")
@ApiOperation("删除仓库信息")
public ResponseResult deleteWarehouse(@RequestBody Map<String,Object> msg) {
warehouseService.deleteWarehouse(msg);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
@PostMapping("/ChangeWarehouseState")
@ApiOperation("禁用仓库")
public ResponseResult changeWarehouseState(@RequestBody Map<String,Object> msg) {
warehouseService.changeWarehouseState(msg);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
@PostMapping("/ShowWarehouse")
@ApiOperation("查询仓库列表")
public ResponseResult getAllWarehouse(@RequestBody Map<String, Object> orgId){
//获取该组织机构下所有警员的id
List<Map<String, Object>> allWarehouse=new ArrayList<>();
List<String> allWarehouseId =warehouseService.getAllWarehouseId(orgId);
for (String warehouseId :allWarehouseId){
Map<String, Object> warehouseMsg = warehouseService.getOneWarehouse(warehouseId);
allWarehouse.add(warehouseMsg);
}
return new ResponseResult(HttpStatus.SUCCESS,"操作成功",allWarehouse);
}
@PostMapping("/GetOneWarehouse")
@ApiOperation("查询单个仓库信息")
public ResponseResult getOneWarehouse(@RequestBody Map<String, Object> msg) {
String warehouseId = msg.get("warehouseId").toString();
Map<String, Object> warehouseMsg = warehouseService.getOneWarehouse(warehouseId);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功",warehouseMsg);
}
@PostMapping("/UpdateWarehouse")
@ApiOperation("修改仓库信息")
public ResponseResult updateWarehouse(@RequestBody Map<String,Object> msg) {
warehouseService.updateWarehouse(msg);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
} }
...@@ -62,12 +62,6 @@ public class Cabinet implements Serializable { ...@@ -62,12 +62,6 @@ public class Cabinet implements Serializable {
private Date updateTime; private Date updateTime;
/** /**
* 创建人员
*/
@ApiModelProperty(value = "创建人员")
private Date createUser;
/**
* 更新人员 * 更新人员
*/ */
@ApiModelProperty(value = "更新人员") @ApiModelProperty(value = "更新人员")
......
...@@ -62,6 +62,18 @@ public class EquipmentSize implements Serializable { ...@@ -62,6 +62,18 @@ public class EquipmentSize implements Serializable {
private String note; private String note;
/** /**
* 价格
*/
@ApiModelProperty(value = "价格")
private Float price;
/**
* 当前状态:0关闭/1启用
*/
@ApiModelProperty(value = "当前状态:0关闭/1启用")
private Integer state;
/**
* EPC类型 * EPC类型
*/ */
@ApiModelProperty(value = "EPC类型") @ApiModelProperty(value = "EPC类型")
......
...@@ -26,6 +26,18 @@ public class EquipmentType implements Serializable { ...@@ -26,6 +26,18 @@ public class EquipmentType implements Serializable {
private String name; private String name;
/** /**
* 单位
*/
@ApiModelProperty(value = "单位")
private String unit;
/**
* 单位类型
*/
@ApiModelProperty(value = "单位类型")
private String unitType;
/**
* 装备Code码 * 装备Code码
*/ */
@ApiModelProperty(value = "装备Code码") @ApiModelProperty(value = "装备Code码")
...@@ -38,6 +50,12 @@ public class EquipmentType implements Serializable { ...@@ -38,6 +50,12 @@ public class EquipmentType implements Serializable {
private String parentId; private String parentId;
/** /**
* 上级ids
*/
@ApiModelProperty(value = "上级id")
private String parentIds;
/**
* 创建时间 * 创建时间
*/ */
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
......
...@@ -52,6 +52,30 @@ public class Policeman implements Serializable { ...@@ -52,6 +52,30 @@ public class Policeman implements Serializable {
private String sex; private String sex;
/** /**
* 人脸信息
*/
@ApiModelProperty(value="人脸信息")
private String faceInfo;
/**
* 是否已生成对应账号,1表生成,0表未生成
*/
@ApiModelProperty(value="是否已生成对应账号,1表生成,0表未生成")
private Integer isCreatedAccount;
/**
* 门禁编码
*/
@ApiModelProperty(value="门禁编码")
private String doorCode;
/**
* 密码
*/
@ApiModelProperty(value="密码")
private String password;
/**
* 警员照片 * 警员照片
*/ */
@ApiModelProperty(value="警员照片") @ApiModelProperty(value="警员照片")
...@@ -76,22 +100,22 @@ public class Policeman implements Serializable { ...@@ -76,22 +100,22 @@ public class Policeman implements Serializable {
private Date updateTime; private Date updateTime;
/** /**
* 身份证信息
*/
@ApiModelProperty(value="身份证信息")
private String idCard;
/**
* 更新人员 * 更新人员
*/ */
@ApiModelProperty(value="更新人员") @ApiModelProperty(value="更新人员")
private String updateUser; private String updateUser;
/** /**
* 软删除,0表存在,1表已删除 * 警员状态
*/ */
@ApiModelProperty(value="软删除,0表存在,1表已删除") @ApiModelProperty(value="警员状态")
private Integer existType; private Integer state;
/**
* 人脸信息
*/
@ApiModelProperty(value="人脸信息")
private String faceInfo;
/** /**
* 指纹信息 * 指纹信息
......
...@@ -35,7 +35,7 @@ public class Supplier implements Serializable { ...@@ -35,7 +35,7 @@ public class Supplier implements Serializable {
* 供应商短码 * 供应商短码
*/ */
@ApiModelProperty(value = "供应商短码") @ApiModelProperty(value = "供应商短码")
private String supplierCode; private String code;
/** /**
* 简称 * 简称
...@@ -73,5 +73,11 @@ public class Supplier implements Serializable { ...@@ -73,5 +73,11 @@ public class Supplier implements Serializable {
@ApiModelProperty(value = "更新人ID") @ApiModelProperty(value = "更新人ID")
private String updateUser; private String updateUser;
/**
* 联系方式
*/
@ApiModelProperty(value = "联系方式")
private String phone;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }
\ No newline at end of file
...@@ -62,6 +62,18 @@ public class Warehouse implements Serializable { ...@@ -62,6 +62,18 @@ public class Warehouse implements Serializable {
private String orgId; private String orgId;
/** /**
* 视屏地址
*/
@ApiModelProperty(value = "视屏地址")
private String video;
/**
* 1表启用,0表禁用
*/
@ApiModelProperty(value = "状态")
private Integer state;
/**
* 当前仓库下装备总数 * 当前仓库下装备总数
*/ */
@ApiModelProperty(value = "当前仓库下装备总数") @ApiModelProperty(value = "当前仓库下装备总数")
......
package com.junmp.jyzb.mapper; package com.junmp.jyzb.mapper;
import com.junmp.jyzb.domain.Cabinet;
import com.junmp.jyzb.domain.Policeman;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
@Mapper @Mapper
public interface CabinetMapper { public interface CabinetMapper {
public int addCabinet(Cabinet cabinet);
public List<Map<String, Object>> getAllCabinet(String orgId);
Map<String, Object> getOneCabinet(String id);
void deleteCabinet(String id);
void updateCabinet(Cabinet cabinet);
List<String> getAllCabinetId(String orgId);
} }
\ No newline at end of file
package com.junmp.jyzb.mapper; package com.junmp.jyzb.mapper;
import com.junmp.jyzb.domain.EquipmentSize;
import com.junmp.jyzb.domain.Warehouse;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
@Mapper @Mapper
public interface EquipmentSizeMapper { public interface EquipmentSizeMapper {
public int addSize(EquipmentSize size);
Map<String, Object> getOneSize(String id);
void deleteSize(String id);
void updateSize(EquipmentSize size);
List<String> getAllSizeId(String orgId);
} }
\ No newline at end of file
package com.junmp.jyzb.mapper; package com.junmp.jyzb.mapper;
import com.junmp.jyzb.domain.EquipmentType;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper @Mapper
public interface EquipmentTypeMapper { public interface EquipmentTypeMapper {
List<EquipmentType> selectAllEquipment();
void addEquipment(EquipmentType equipmentType);
} }
\ No newline at end of file
...@@ -12,7 +12,7 @@ public interface PolicemanMapper extends BaseMapper<Policeman> { ...@@ -12,7 +12,7 @@ public interface PolicemanMapper extends BaseMapper<Policeman> {
/** /**
* 新增警员信息 * 新增警员信息
*/ */
public int addPoliceman(Policeman policeman); void addPoliceman(Policeman policeman);
/** /**
* 查询警员列表 * 查询警员列表
...@@ -31,4 +31,10 @@ public interface PolicemanMapper extends BaseMapper<Policeman> { ...@@ -31,4 +31,10 @@ public interface PolicemanMapper extends BaseMapper<Policeman> {
List<String> getAllPoliceId(String orgId); List<String> getAllPoliceId(String orgId);
void deleteFinger(String fingerId); void deleteFinger(String fingerId);
List<String> getAllPoliceIdByCabinet(String cabinetId);
void addFaceInfo(Policeman police);
void changePoliceState(Policeman police);
} }
\ No newline at end of file
package com.junmp.jyzb.mapper; package com.junmp.jyzb.mapper;
import com.junmp.jyzb.domain.Supplier;
import com.junmp.jyzb.domain.Warehouse;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
@Mapper @Mapper
public interface SupplierMapper { public interface SupplierMapper {
public int addSupplier(Supplier supplier);
Map<String, Object> getOneSupplier(String id);
void deleteSupplier(String id);
void updateSupplier(Supplier supplier);
List<String> getAllSupplierId();
} }
\ No newline at end of file
package com.junmp.jyzb.mapper; package com.junmp.jyzb.mapper;
import com.junmp.jyzb.domain.Policeman;
import com.junmp.jyzb.domain.Warehouse;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
@Mapper @Mapper
public interface WarehouseMapper { public interface WarehouseMapper {
public int addWarehouse(Warehouse warehouse);
Map<String, Object> getOneWarehouse(String id);
void deleteWarehouse(String id);
void updateWarehouse(Warehouse warehouse);
List<String> getAllWarehouseId(String orgId);
void changeWarehouseState(Warehouse warehouse);
} }
\ No newline at end of file
package com.junmp.jyzb.service; package com.junmp.jyzb.service;
import java.util.List;
import java.util.Map;
public interface CabinetService{ public interface CabinetService{
void addCabinet(Map<String, Object> msg);
void deleteCabinet(Map<String, Object> msg);
List<String> getAllCabinetId(Map<String, Object> orgId);
Map<String, Object> getOneCabinet(String cabinetId);
void updateCabinet(Map<String, Object> msg);
} }
package com.junmp.jyzb.service; package com.junmp.jyzb.service;
import java.util.List;
import java.util.Map;
public interface EquipmentSizeService{ public interface EquipmentSizeService{
void addSize(Map<String, Object> msg);
Map<String,Object> getOneSize(String id);
void deleteSize(Map<String, Object> msg);
void updateSize(Map<String, Object> msg);
List<String> getAllSizeId(Map<String, Object> orgId);
} }
package com.junmp.jyzb.service; package com.junmp.jyzb.service;
import java.util.List;
import java.util.Map;
public interface EquipmentTypeService{ public interface EquipmentTypeService{
List<Map<String, Object>> getEquipmentList();
void addEquipment(Map<String, Object> msg);
} }
...@@ -9,9 +9,6 @@ import java.util.Map; ...@@ -9,9 +9,6 @@ import java.util.Map;
public interface PolicemanService{ public interface PolicemanService{
void addPoliceman(Map<String, Object> msg); void addPoliceman(Map<String, Object> msg);
/**
* 获取单个警员信息
* */
Map<String,Object> getOnePolice(String id); Map<String,Object> getOnePolice(String id);
void deletePolice(Map<String, Object> msg); void deletePolice(Map<String, Object> msg);
...@@ -21,4 +18,12 @@ public interface PolicemanService{ ...@@ -21,4 +18,12 @@ public interface PolicemanService{
List<String> getAllPoliceId(Map<String, Object> orgId); List<String> getAllPoliceId(Map<String, Object> orgId);
void deleteFinger(Map<String, Object> msg); void deleteFinger(Map<String, Object> msg);
List<String> getAllPoliceIdByCabinet(Map<String, Object> cabinetId);
void addFingerInfo(Map<String, Object> msg);
void addFaceInfo(Map<String, Object> msg);
void changePoliceState(Map<String, Object> msg);
} }
package com.junmp.jyzb.service; package com.junmp.jyzb.service;
import java.util.List;
import java.util.Map;
public interface SupplierService{ public interface SupplierService{
void addSupplier(Map<String, Object> msg);
Map<String,Object> getOneSupplier(String id);
void deleteSupplier(Map<String, Object> msg);
void updateSupplier(Map<String, Object> msg);
List<String> getAllSupplierId();
} }
package com.junmp.jyzb.service; package com.junmp.jyzb.service;
import java.util.List;
import java.util.Map;
public interface WarehouseService{ public interface WarehouseService{
void addWarehouse(Map<String, Object> msg);
Map<String,Object> getOneWarehouse(String id);
void deleteWarehouse(Map<String, Object> msg);
void updateWarehouse(Map<String, Object> msg);
List<String> getAllWarehouseId(Map<String, Object> orgId);
void changeWarehouseState(Map<String, Object> msg);
} }
package com.junmp.jyzb.service.impl; package com.junmp.jyzb.service.impl;
import com.junmp.jyzb.domain.Cabinet;
import com.junmp.jyzb.domain.PoliceFinger;
import com.junmp.jyzb.domain.Policeman;
import com.junmp.jyzb.service.CabinetService; import com.junmp.jyzb.service.CabinetService;
import com.junmp.jyzb.utils.DateTimeUtil;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import com.junmp.jyzb.mapper.CabinetMapper; import com.junmp.jyzb.mapper.CabinetMapper;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.UUID;
@Service @Service
public class CabinetServiceImpl implements CabinetService { public class CabinetServiceImpl implements CabinetService {
@Resource @Resource
private CabinetMapper cabinetMapper; private CabinetMapper cabinetMapper;
@Override
public void addCabinet(Map<String, Object> msg) {
Cabinet cabinet =new Cabinet();
//将警员相关信息添加到警员表
//生成一个uuid
String uuid = UUID.randomUUID().toString().replaceAll("-", "");
//生成当前时间
Date currentDate = DateTimeUtil.getCurrentDateTime();
cabinet.setId(uuid);
cabinet.setCreateTime(currentDate);
cabinet.setOrgId((String) msg.get("orgId"));
cabinet.setName((String) msg.get("name"));
cabinet.setUpdateUser((String) msg.get("updateUser"));
cabinet.setLocation((String) msg.get("location"));
cabinet.setErrorState((Integer) msg.get("errorState"));
cabinet.setCabinetNum((String) msg.get("cabinetNum"));
cabinetMapper.addCabinet(cabinet);
}
@Override
public Map<String,Object> getOneCabinet(String id) {
return cabinetMapper.getOneCabinet(id);
}
@Override
public void deleteCabinet(Map<String, Object> msg) {
List<Object> cabinetList = (List<Object>) msg.get("cabinetList");
for (Object cabinetId:cabinetList){
cabinetMapper.deleteCabinet(cabinetId.toString());
}
}
@Override
public List<String> getAllCabinetId(Map<String, Object> orgId) {
List<String> msg = cabinetMapper.getAllCabinetId(orgId.get("orgId").toString());
return msg;
}
@Override
public void updateCabinet(Map<String, Object> msg) {
Cabinet cabinet =new Cabinet();
//生成当前时间
Date currentDate = DateTimeUtil.getCurrentDateTime();
cabinet.setUpdateTime(currentDate);
cabinet.setId((String) msg.get("id"));
cabinet.setOrgId((String) msg.get("orgId"));
cabinet.setName((String) msg.get("name"));
cabinet.setUpdateUser((String) msg.get("updateUser"));
cabinet.setLocation((String) msg.get("location"));
cabinet.setCabinetNum((String) msg.get("cabinetNum"));
cabinet.setErrorState((Integer) msg.get("errorState"));
cabinetMapper.updateCabinet(cabinet);
}
} }
package com.junmp.jyzb.service.impl; package com.junmp.jyzb.service.impl;
import com.junmp.jyzb.domain.EquipmentSize;
import com.junmp.jyzb.domain.Warehouse;
import com.junmp.jyzb.service.EquipmentSizeService; import com.junmp.jyzb.service.EquipmentSizeService;
import com.junmp.jyzb.utils.DateTimeUtil;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import com.junmp.jyzb.mapper.EquipmentSizeMapper; import com.junmp.jyzb.mapper.EquipmentSizeMapper;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.UUID;
@Service @Service
public class EquipmentSizeServiceImpl implements EquipmentSizeService { public class EquipmentSizeServiceImpl implements EquipmentSizeService {
@Resource @Resource
private EquipmentSizeMapper equipmentSizeMapper; private EquipmentSizeMapper equipmentSizeMapper;
@Override
public void addSize(Map<String, Object> msg) {
EquipmentSize size =new EquipmentSize();
//将警员相关信息添加到警员表
//生成一个uuid
String uuid = UUID.randomUUID().toString().replaceAll("-", "");
//生成当前时间
Date currentDate = DateTimeUtil.getCurrentDateTime();
size.setId(uuid);
size.setCreateTime(currentDate);
size.setTypeId((String) msg.get("typeId"));
size.setCode((Integer) msg.get("code"));
size.setName((String) msg.get("name"));
size.setNote((String) msg.get("note"));
size.setPrice((Float) msg.get("price"));
size.setEpcType((Integer) msg.get("epcType"));
equipmentSizeMapper.addSize(size);
}
@Override
public Map<String,Object> getOneSize(String msg) {
return equipmentSizeMapper.getOneSize(msg);
}
@Override
public void deleteSize(Map<String, Object> msg) {
List<Object> sizeList = (List<Object>) msg.get("sizeList");
for (Object sizeId:sizeList){
equipmentSizeMapper.deleteSize(sizeId.toString());
}
}
@Override
public void updateSize(Map<String, Object> msg) {
EquipmentSize size =new EquipmentSize();
Date currentDate = DateTimeUtil.getCurrentDateTime();
//police.setId(uuid);
size.setId((String) msg.get("id"));
size.setTypeId((String) msg.get("typeId"));
size.setCode((Integer) msg.get("code"));
size.setName((String) msg.get("name"));
size.setNote((String) msg.get("note"));
size.setUpdateTime(currentDate);
size.setPrice((Float) msg.get("price"));
size.setState((Integer) msg.get("state"));
size.setEpcType((Integer) msg.get("epcType"));
equipmentSizeMapper.updateSize(size);
}
@Override
public List<String> getAllSizeId(Map<String, Object> typeId) {
List<String> msg = equipmentSizeMapper.getAllSizeId(typeId.get("typeId").toString());
return msg;
}
} }
package com.junmp.jyzb.service.impl; package com.junmp.jyzb.service.impl;
import com.junmp.jyzb.domain.EquipmentType;
import com.junmp.jyzb.domain.Warehouse;
import com.junmp.jyzb.service.EquipmentTypeService; import com.junmp.jyzb.service.EquipmentTypeService;
import com.junmp.jyzb.utils.DateTimeUtil;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import com.junmp.jyzb.mapper.EquipmentTypeMapper; import com.junmp.jyzb.mapper.EquipmentTypeMapper;
import java.util.*;
@Service @Service
public class EquipmentTypeServiceImpl implements EquipmentTypeService { public class EquipmentTypeServiceImpl implements EquipmentTypeService {
@Resource @Resource
private EquipmentTypeMapper equipmentTypeMapper; private EquipmentTypeMapper equipmentTypeMapper;
@Override
public List<Map<String, Object>> getEquipmentList() {
List<EquipmentType> menuList = equipmentTypeMapper.selectAllEquipment();
List<Map<String, Object>> resultList = new ArrayList<>();
for (EquipmentType menu : menuList) {
//System.out.println(menu.getId()+" "+menu.getName()+" "+menu.getParentId());
if (!menu.getName().equals("超级根") && menu.getParentId().equals("00000000-0000-0000-0000-000000000000")) {
Map<String, Object> map = new HashMap<>();
map.put("id", menu.getId());
map.put("name", menu.getName());
map.put("unit", menu.getUnit());
map.put("unitType", menu.getUnitType());
map.put("code", menu.getCode());
map.put("parentId", menu.getParentId());
map.put("state", menu.getState());
map.put("note", menu.getNote());
map.put("children", getChildMenus(menu.getId(), menuList));
resultList.add(map);
}
}
return resultList;
}
private List<Map<String, Object>> getChildMenus(String parentId, List<EquipmentType> menuList) {
List<Map<String, Object>> childList = new ArrayList<>();
for (EquipmentType menu : menuList) {
//if (menu.getParentId() != null && menu.getParentId().equals(parentId)) {
if (menu.getParentId().equals(parentId)) {
Map<String, Object> map = new HashMap<>();
map.put("id", menu.getId());
map.put("name", menu.getName());
map.put("unit", menu.getUnit());
map.put("unitType", menu.getUnitType());
map.put("code", menu.getCode());
map.put("parentId", menu.getParentId());
map.put("state", menu.getState());
map.put("note", menu.getNote());
map.put("children", getChildMenus(menu.getId(), menuList));
childList.add(map);
}
}
return childList;
}
@Override
public void addEquipment(Map<String, Object> msg) {
EquipmentType equipmentType =new EquipmentType();
String uuid = UUID.randomUUID().toString().replaceAll("-", "");
Date currentDate = DateTimeUtil.getCurrentDateTime();
equipmentType.setId(uuid);
equipmentType.setName((String) msg.get("name"));
equipmentType.setUnit((String) msg.get("unit"));
equipmentType.setUnitType((String) msg.get("unitType"));
equipmentType.setCode((String) msg.get("code"));
equipmentType.setParentId((String) msg.get("parentId"));
equipmentType.setNote((String) msg.get("note"));
equipmentType.setCreateTime(currentDate);
equipmentTypeMapper.addEquipment(equipmentType);
}
} }
...@@ -33,31 +33,32 @@ public class PolicemanServiceImpl implements PolicemanService { ...@@ -33,31 +33,32 @@ public class PolicemanServiceImpl implements PolicemanService {
String uuid = UUID.randomUUID().toString().replaceAll("-", ""); String uuid = UUID.randomUUID().toString().replaceAll("-", "");
//生成当前时间 //生成当前时间
Date currentDate = DateTimeUtil.getCurrentDateTime(); Date currentDate = DateTimeUtil.getCurrentDateTime();
police.setId(uuid); police.setId(uuid);
police.setCreateTime(currentDate);
police.setOrgId((String) policeman.get("orgId")); police.setOrgId((String) policeman.get("orgId"));
police.setName((String) policeman.get("name")); police.setName((String) policeman.get("name"));
police.setUpdateUser((String) policeman.get("updateUser")); police.setPoliceCode((String) policeman.get("policeCode"));
police.setCabinetId((String) policeman.get("cabinetId"));
police.setSex((String) policeman.get("sex")); police.setSex((String) policeman.get("sex"));
police.setIsCreatedAccount((Integer) policeman.get("IsCreatedAccount"));
police.setCabinetId((String) policeman.get("cabinetId"));
police.setPhone((String) policeman.get("phone")); police.setPhone((String) policeman.get("phone"));
police.setPoliceCode((String) policeman.get("policeCode")); police.setIdCard((String) policeman.get("idCard"));
police.setFaceInfo((String) policeman.get("faceInfo"));
police.setPhoto((String) policeman.get("photo")); police.setPhoto((String) policeman.get("photo"));
police.setUpdateUser((String) policeman.get("updateUser"));
police.setCreateTime(currentDate);
policemanMapper.addPoliceman(police); policemanMapper.addPoliceman(police);
//一个警员可能有多个指纹信息,用list接收 // //一个警员可能有多个指纹信息,用list接收
List<Map<String, Object>> fingerMsgList = (List<Map<String, Object>>) policeman.get("fingerMsg"); // List<Map<String, Object>> fingerMsgList = (List<Map<String, Object>>) policeman.get("fingerMsg");
//遍历指纹信息,将指纹信息添加到指纹表 // //遍历指纹信息,将指纹信息添加到指纹表
for (Map<String, Object> fingerMsg : fingerMsgList) { // for (Map<String, Object> fingerMsg : fingerMsgList) {
PoliceFinger finger =new PoliceFinger(); // PoliceFinger finger =new PoliceFinger();
finger.setPoliceId(uuid); // finger.setPoliceId(uuid);
finger.setName(fingerMsg.get("name").toString()); // finger.setName(fingerMsg.get("name").toString());
finger.setFingerInfo(fingerMsg.get("fingerInfo").toString()); // finger.setFingerInfo(fingerMsg.get("fingerInfo").toString());
finger.setCreateTime(currentDate); // finger.setCreateTime(currentDate);
policeFingerMapper.addFingers(finger); // policeFingerMapper.addFingers(finger);
} // }
} }
@Override @Override
...@@ -82,27 +83,28 @@ public class PolicemanServiceImpl implements PolicemanService { ...@@ -82,27 +83,28 @@ public class PolicemanServiceImpl implements PolicemanService {
Date currentDate = DateTimeUtil.getCurrentDateTime(); Date currentDate = DateTimeUtil.getCurrentDateTime();
//police.setId(uuid); //police.setId(uuid);
police.setId((String) policeman.get("id")); police.setId((String) policeman.get("id"));
police.setUpdateTime(currentDate);
police.setOrgId((String) policeman.get("orgId")); police.setOrgId((String) policeman.get("orgId"));
police.setName((String) policeman.get("name")); police.setName((String) policeman.get("name"));
police.setUpdateUser((String) policeman.get("updateUser")); police.setPoliceCode((String) policeman.get("policeCode"));
police.setCabinetId((String) policeman.get("cabinetId"));
police.setSex((String) policeman.get("sex")); police.setSex((String) policeman.get("sex"));
police.setIsCreatedAccount((Integer) policeman.get("isCreatedAccount"));
police.setCabinetId((String) policeman.get("cabinetId"));
police.setPhone((String) policeman.get("phone")); police.setPhone((String) policeman.get("phone"));
police.setPoliceCode((String) policeman.get("policeCode")); police.setIdCard((String) policeman.get("idCard"));
police.setFaceInfo((String) policeman.get("faceInfo"));
police.setPhoto((String) policeman.get("photo")); police.setPhoto((String) policeman.get("photo"));
police.setUpdateUser((String) policeman.get("updateUser"));
police.setUpdateTime(currentDate);
policemanMapper.updatePolice(police); policemanMapper.updatePolice(police);
List<Map<String, Object>> fingerMsgList = (List<Map<String, Object>>) policeman.get("fingerMsg"); // List<Map<String, Object>> fingerMsgList = (List<Map<String, Object>>) policeman.get("fingerMsg");
//修改指纹相关信息 // //修改指纹相关信息
for (Map<String, Object> fingerMsg : fingerMsgList) { // for (Map<String, Object> fingerMsg : fingerMsgList) {
PoliceFinger finger =new PoliceFinger(); // PoliceFinger finger =new PoliceFinger();
finger.setName(fingerMsg.get("name").toString()); // finger.setName(fingerMsg.get("name").toString());
finger.setFingerInfo(fingerMsg.get("fingerInfo").toString()); // finger.setFingerInfo(fingerMsg.get("fingerInfo").toString());
finger.setUpdateTime(currentDate); // finger.setUpdateTime(currentDate);
policeFingerMapper.updateFingers(finger); // policeFingerMapper.updateFingers(finger);
} // }
} }
@Override @Override
...@@ -113,10 +115,43 @@ public class PolicemanServiceImpl implements PolicemanService { ...@@ -113,10 +115,43 @@ public class PolicemanServiceImpl implements PolicemanService {
@Override @Override
public void deleteFinger(Map<String, Object> msg) { public void deleteFinger(Map<String, Object> msg) {
//遍历要删除的警员id String fingerId = msg.get("fingerId").toString();
List<Object> fingerList = (List<Object>) msg.get("fingerList"); policemanMapper.deleteFinger(fingerId);
for (Object finger:fingerList){ }
policemanMapper.deleteFinger(finger.toString());
} @Override
public List<String> getAllPoliceIdByCabinet(Map<String, Object> cabinetId) {
List<String> msg = policemanMapper.getAllPoliceIdByCabinet(cabinetId.get("cabinetId").toString());
return msg;
}
@Override
public void addFingerInfo(Map<String, Object> msg) {
//指纹id是自增
Date currentDate = DateTimeUtil.getCurrentDateTime();
PoliceFinger finger =new PoliceFinger();
finger.setPoliceId(msg.get("policeId").toString());
finger.setName(msg.get("name").toString());
finger.setFingerInfo(msg.get("fingerInfo").toString());
finger.setCreateTime(currentDate);
policeFingerMapper.addFingers(finger);
}
@Override
public void addFaceInfo(Map<String, Object> msg) {
Date currentDate = DateTimeUtil.getCurrentDateTime();
Policeman police =new Policeman();
police.setId(msg.get("id").toString());
police.setFaceInfo(msg.get("faceInfo").toString());
police.setUpdateTime(currentDate);
policemanMapper.addFaceInfo(police);
}
@Override
public void changePoliceState(Map<String, Object> msg) {
Policeman police =new Policeman();
police.setId(msg.get("id").toString());
police.setState((Integer) msg.get("state"));
policemanMapper.changePoliceState(police);
} }
} }
package com.junmp.jyzb.service.impl; package com.junmp.jyzb.service.impl;
import com.junmp.jyzb.domain.Supplier;
import com.junmp.jyzb.domain.Warehouse;
import com.junmp.jyzb.service.SupplierService; import com.junmp.jyzb.service.SupplierService;
import com.junmp.jyzb.utils.DateTimeUtil;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import com.junmp.jyzb.mapper.SupplierMapper; import com.junmp.jyzb.mapper.SupplierMapper;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.UUID;
@Service @Service
public class SupplierServiceImpl implements SupplierService { public class SupplierServiceImpl implements SupplierService {
@Resource @Resource
private SupplierMapper supplierMapper; private SupplierMapper supplierMapper;
@Override
public void addSupplier(Map<String, Object> msg) {
Supplier supplier =new Supplier();
//将警员相关信息添加到警员表
//生成一个uuid
String uuid = UUID.randomUUID().toString().replaceAll("-", "");
//生成当前时间
Date currentDate = DateTimeUtil.getCurrentDateTime();
supplier.setId(uuid);
supplier.setCreateTime(currentDate);
supplier.setName((String) msg.get("name"));
supplier.setShortName((String) msg.get("shortName"));
supplier.setCode((String) msg.get("code"));
supplier.setContacts((String) msg.get("contacts"));
supplier.setPhone((String) msg.get("phone"));
supplier.setCreateUser((String) msg.get("createUser"));
supplierMapper.addSupplier(supplier);
}
@Override
public Map<String,Object> getOneSupplier(String id) {
return supplierMapper.getOneSupplier(id);
}
@Override
public void deleteSupplier(Map<String, Object> msg) {
List<Object> supplierList = (List<Object>) msg.get("supplierList");
for (Object supplierId:supplierList){
supplierMapper.deleteSupplier(supplierId.toString());
}
}
@Override
public void updateSupplier(Map<String, Object> msg) {
Supplier supplier =new Supplier();
Date currentDate = DateTimeUtil.getCurrentDateTime();
supplier.setUpdateTime(currentDate);
supplier.setId((String) msg.get("id"));
supplier.setName((String) msg.get("name"));
supplier.setShortName((String) msg.get("shortName"));
supplier.setCode((String) msg.get("code"));
supplier.setContacts((String) msg.get("contacts"));
supplier.setPhone((String) msg.get("phone"));
supplier.setUpdateUser((String) msg.get("updateUser"));
supplierMapper.updateSupplier(supplier);
}
@Override
public List<String> getAllSupplierId() {
List<String> msg = supplierMapper.getAllSupplierId();
return msg;
}
} }
package com.junmp.jyzb.service.impl; package com.junmp.jyzb.service.impl;
import com.junmp.jyzb.domain.PoliceFinger;
import com.junmp.jyzb.domain.Policeman;
import com.junmp.jyzb.domain.Warehouse;
import com.junmp.jyzb.service.WarehouseService; import com.junmp.jyzb.service.WarehouseService;
import com.junmp.jyzb.utils.DateTimeUtil;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import com.junmp.jyzb.mapper.WarehouseMapper; import com.junmp.jyzb.mapper.WarehouseMapper;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.UUID;
@Service @Service
public class WarehouseServiceImpl implements WarehouseService { public class WarehouseServiceImpl implements WarehouseService {
@Resource @Resource
private WarehouseMapper warehouseMapper; private WarehouseMapper warehouseMapper;
@Override
public void addWarehouse(Map<String, Object> msg) {
Warehouse warehouse =new Warehouse();
//将警员相关信息添加到警员表
//生成一个uuid
String uuid = UUID.randomUUID().toString().replaceAll("-", "");
//生成当前时间
Date currentDate = DateTimeUtil.getCurrentDateTime();
warehouse.setId(uuid);
warehouse.setCreateTime(currentDate);
warehouse.setName((String) msg.get("name"));
warehouse.setUpdateUser((String) msg.get("updateUser"));
warehouse.setLocation((String) msg.get("location"));
warehouse.setPhone((String) msg.get("phone"));
warehouse.setOrgId((String) msg.get("orgId"));
warehouse.setVideo((String) msg.get("video"));
warehouseMapper.addWarehouse(warehouse);
}
@Override
public Map<String,Object> getOneWarehouse(String id) {
return warehouseMapper.getOneWarehouse(id);
}
@Override
public void deleteWarehouse(Map<String, Object> msg) {
List<Object> warehouseList = (List<Object>) msg.get("warehouseList");
for (Object warehouseId:warehouseList){
warehouseMapper.deleteWarehouse(warehouseId.toString());
}
}
@Override
public void updateWarehouse(Map<String, Object> msg) {
Warehouse warehouse =new Warehouse();
//修改警员相关信息
//生成当前时间
Date currentDate = DateTimeUtil.getCurrentDateTime();
//police.setId(uuid);
warehouse.setId((String) msg.get("warehouseId"));
warehouse.setName((String) msg.get("name"));
warehouse.setUpdateUser((String) msg.get("updateUser"));
warehouse.setLocation((String) msg.get("location"));
warehouse.setPhone((String) msg.get("phone"));
warehouse.setUpdateTime(currentDate);
warehouse.setOrgId((String) msg.get("orgId"));
warehouseMapper.updateWarehouse(warehouse);
}
@Override
public List<String> getAllWarehouseId(Map<String, Object> orgId) {
List<String> msg = warehouseMapper.getAllWarehouseId(orgId.get("orgId").toString());
return msg;
}
@Override
public void changeWarehouseState(Map<String, Object> msg) {
Warehouse warehouse =new Warehouse();
warehouse.setId(msg.get("warehouseId").toString());
warehouse.setState((Integer) msg.get("state"));
warehouseMapper.changeWarehouseState(warehouse);
}
} }
...@@ -12,7 +12,7 @@ public class HttpStatus ...@@ -12,7 +12,7 @@ public class HttpStatus
/** /**
* 操作成功 * 操作成功
*/ */
public static final int SUCCESS = 10000; public static final int SUCCESS = 99200;
/** /**
* 没有操作权限 * 没有操作权限
......
package com.junmp.jyzb.utils;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 分页
* */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class RequestParam {
public Integer page; //页码
public Integer size; //每一页的大小
public String keyword; //模糊查询
}
\ No newline at end of file
...@@ -2,6 +2,10 @@ package com.junmp.jyzb.utils; ...@@ -2,6 +2,10 @@ package com.junmp.jyzb.utils;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
/**
* 定义统一的返回类
* */
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonInclude(JsonInclude.Include.NON_NULL)
public class ResponseResult<T> { public class ResponseResult<T> {
......
...@@ -20,4 +20,43 @@ ...@@ -20,4 +20,43 @@
id, cabinet_num, `name`, org_id, `location`, error_state, create_time, update_time, id, cabinet_num, `name`, org_id, `location`, error_state, create_time, update_time,
create_user, update_user create_user, update_user
</sql> </sql>
<insert id="addCabinet" parameterType="com.junmp.jyzb.domain.Warehouse">
insert into base_cabinet
(id,cabinet_num,name,org_id,location,error_state,create_time,update_user,delete_flag)
values
(#{id},#{cabinetNum},#{name},#{orgId},#{location},#{errorState},#{createTime},#{updateUser},0)
</insert>
<select id="getOneCabinet" resultType="Map">
select id,cabinet_num,name,org_id,location,error_state from base_cabinet p
where p.id=#{id} and delete_flag=0
</select>
<delete id="deleteCabinet">
delete from base_cabinet w
where w.id =#{id}
</delete>
<update id="updateCabinet">
update base_cabinet p
set cabinet_num = #{cabinetNum},name=#{name},org_id=#{orgId},location=#{location},error_state=#{errorState},update_time=#{updateTime},update_user=#{updateUser}
where p.id =#{id} and delete_flag=0
</update>
<select id="getAllCabinet" resultType="Map">
select p.id,p.name as police_name,cabinet_id,org_id,police_code,sex,face_info,photo ,f.name as finger_name,finger_info
from base_policeman p,base_police_finger f
where p.id=f.police_id
and p.org_id=#{orgId}
and delete_flag=0
</select>
<select id="getAllCabinetId" resultType="String">
select id
from base_cabinet w
where org_id=#{orgId} and delete_flag=0;
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -18,4 +18,34 @@ ...@@ -18,4 +18,34 @@
<!--@mbg.generated--> <!--@mbg.generated-->
id, type_id, detail_id, code, `name`, create_time, update_time, note, epc_type id, type_id, detail_id, code, `name`, create_time, update_time, note, epc_type
</sql> </sql>
<insert id="addSize" parameterType="com.junmp.jyzb.domain.EquipmentSize">
insert into base_equipment_size
(id,type_id as typeId,code,name,create_time as createTime,note,price,state,epcType)
values
(#{id},#{typeId},#{code},#{name},#{createTime},#{note},#{price},#{state},#{epcType})
</insert>
<select id="getOneSize" resultType="Map">
select id,code,name,note,price,state,epc_type as epcType from base_equipment_size p
where p.id=#{id}
</select>
<update id="deleteSize">
update base_equipment_size w
set state = #{state}
where w.id =#{id}
</update>
<update id="updateSize">
update base_equipment_size p
set type_id = #{typeId},code=#{code},name=#{name},update_time=#{updateTime},note=#{note},price=#{price},state=#{state},epc_type=#{epcType}
where p.id =#{id}
</update>
<select id="getAllSizeId" resultType="String">
select id
from base_equipment_size w
where type_id=#{typeId}
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -17,4 +17,24 @@ ...@@ -17,4 +17,24 @@
<!--@mbg.generated--> <!--@mbg.generated-->
id, `name`, code, parent_id, create_time, update_time, `state`, note id, `name`, code, parent_id, create_time, update_time, `state`, note
</sql> </sql>
<select id="selectAllEquipment" resultMap="BaseResultMap">
SELECT id,name,unit,unit_type,code,parent_id,state,note,code
FROM base_equipment_type
</select>
<!--SELECT id,name,unit,unit_type,code,parent_id,state,note,-->
<!-- CASE-->
<!-- WHEN update_time IS NULL THEN create_time-->
<!-- ELSE update_time-->
<!-- END AS update_time-->
<!-- FROM base_equipment_type-->
<insert id="addEquipment" parameterType="com.junmp.jyzb.domain.EquipmentType">
insert into base_warehouse
(id,name,unit,unit_type,code,parent_id,create_time,state,note)
values
(#{id},#{name},#{unit},#{unitType},#{code},#{parentId},#{createTime},1,#{note})
</insert>
</mapper> </mapper>
\ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
</sql> </sql>
<select id="getFingersByUserId" parameterType="String" resultType="java.util.Map"> <select id="getFingersByUserId" parameterType="String" resultType="java.util.Map">
SELECT f.id as fingerId,f.name,f.finger_info SELECT f.id as fingerId,f.name,f.finger_info as fingerInfo
FROM base_police_finger f FROM base_police_finger f
WHERE f.police_id = #{userId} WHERE f.police_id = #{userId}
</select> </select>
......
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.junmp.jyzb.mapper.PolicemanMapper"> <mapper namespace="com.junmp.jyzb.mapper.PolicemanMapper">
<resultMap id="PolicemanMap" type="com.junmp.jyzb.domain.Policeman">
<result column="id" property="id"/>
<result column="name" property="name"/>
<result column="cabinet_id" property="cabinetId"/>
<result column="org_id" property="orgId"/>
<result column="police_code" property="policeCode"/>
<result column="sex" property="sex"/>
<result column="face_info" property="faceInfo"/>
<result column="isCreatedAccount" property="isCreatedAccount"/>
<result column="door_code" property="doorCode"/>
<result column="password" property="password"/>
<result column="photo" property="photo"/>
<result column="phone" property="phone"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
<result column="id_card" property="idCard"/>
<result column="update_user" property="updateUser"/>
<result column="state" property="state"/>
</resultMap>
<insert id="addPoliceman" parameterType="com.junmp.jyzb.domain.Policeman"> <insert id="addPoliceman" parameterType="com.junmp.jyzb.domain.Policeman">
insert into base_policeman insert into base_policeman
(id,name,cabinet_id,org_id,police_code,sex,face_info,photo,phone,create_time,update_user,exist_type) (id,org_id,name,police_code,sex,isCreatedAccount,
cabinet_id,phone,id_card,photo,update_user,create_time)
values values
(#{id},#{name},#{cabinetId},#{orgId},#{policeCode},#{sex},#{faceInfo},#{photo},#{phone},#{createTime},#{updateUser},0) (#{id},#{orgId},#{name},#{policeCode},#{sex},#{isCreatedAccount},
#{cabinetId},#{phone},#{idCard},#{photo},#{updateUser},#{createTime})
</insert> </insert>
<!-- <select id="" resultType="com.junmp.jyzb.domain.Policeman">-->
<!-- select * from base_policeman p,base_police_finger f-->
<!-- where p.id=f.police_id and exist_type=0;-->
<!-- </select>-->
<select id="getOnePolice" resultType="Map"> <select id="getOnePolice" resultType="Map">
select id,name,cabinet_id,org_id,police_code,sex,face_info,photo from base_policeman p SELECT
where p.id=#{id} and exist_type=0 p.id AS id,
o.org_id AS orgId,
o.area_name AS orgName,
p.name AS name,
p.sex,
p.phone,
p.photo,
p.police_code AS policeCode,
c.id AS cabinetId,
c.name AS cabinetName,
p.update_time AS updateTime
FROM base_policeman p
LEFT JOIN pub_org o ON p.org_id = o.org_id
LEFT JOIN base_cabinet c ON p.cabinet_id = c.id
WHERE p.id = #{id};
</select> </select>
<update id="deletePolice"> <delete id="deletePolice">
update base_policeman p DELETE FROM base_policeman p WHERE p.id =#{id};
set exist_type = 1 </delete>
where p.id =#{id}
</update>
<update id="updatePolice"> <update id="updatePolice">
update base_policeman p update base_policeman p
set name = #{name},cabinet_id=#{cabinetId},org_id=#{orgId},police_code=#{policeCode},sex=#{sex},face_info=#{faceInfo},photo=#{photo},update_time=#{updateTime} set
org_id=#{orgId},
name = #{name},
police_code=#{policeCode},
sex=#{sex},
isCreatedAccount=#{isCreatedAccount},
cabinet_id=#{cabinetId},
phone=#{phone},
id_card=#{idCard},
update_user=#{updateUser},
photo=#{photo},
update_time=#{updateTime}
where p.id =#{id} where p.id =#{id}
</update> </update>
...@@ -35,17 +76,35 @@ ...@@ -35,17 +76,35 @@
from base_policeman p,base_police_finger f from base_policeman p,base_police_finger f
where p.id=f.police_id where p.id=f.police_id
and p.org_id=#{orgId} and p.org_id=#{orgId}
and exist_type=0 and delete_flag=0
</select> </select>
<select id="getAllPoliceId" resultType="String"> <select id="getAllPoliceId" resultType="String">
select id select id
from base_policeman p from base_policeman p
where org_id=#{orgId} and exist_type=0; where org_id=#{orgId}
</select> </select>
<delete id="deleteFinger"> <delete id="deleteFinger">
delete from base_police_finger delete from base_police_finger
where id =#{fingerId} where id =#{fingerId}
</delete> </delete>
<select id="getAllPoliceIdByCabinet" resultType="String">
select id
from base_policeman p
where cabinet_id=#{cabinetId} and delete_flag=0;
</select>
<update id="addFaceInfo" parameterType="com.junmp.jyzb.domain.Policeman">
update base_policeman p
set face_info=#{faceInfo},update_time=#{updateTime}
where p.id=#{id}
</update>
<update id="changePoliceState">
update base_policeman p
set state = #{state}
where p.id =#{id}
</update>
</mapper> </mapper>
\ No newline at end of file
...@@ -20,4 +20,39 @@ ...@@ -20,4 +20,39 @@
id, equipment_id, `name`, supplier_code, short_name, contacts, create_time, create_user, id, equipment_id, `name`, supplier_code, short_name, contacts, create_time, create_user,
update_time, update_user update_time, update_user
</sql> </sql>
<insert id="addSupplier" parameterType="com.junmp.jyzb.domain.Supplier">
insert into base_supplier
(id,name,code,short_name,contacts,phone,create_time,create_user)
values
(#{id},#{name},#{code},#{shortName},#{contacts},#{phone},#{createTime},#{createUser})
</insert>
<select id="getOneSupplier" resultType="Map">
SELECT id, name, code, short_name AS shortName, contacts, phone, update_user,
CASE
WHEN update_time IS NULL THEN create_time
ELSE update_time
END AS updateTime
FROM base_supplier
WHERE id = #{id};
</select>
<update id="deleteSupplier">
update base_supplier w
set delete_flag = 1
where w.id =#{id}
</update>
<update id="updateSupplier">
update base_supplier p
set name=#{name},code=#{code},short_name=#{shortName},contacts=#{contacts},phone=#{phone},
update_time=#{updateTime},update_user=#{updateUser}
where p.id =#{id}
</update>
<select id="getAllSupplierId" resultType="String">
select id
from base_supplier w
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -18,4 +18,40 @@ ...@@ -18,4 +18,40 @@
<!--@mbg.generated--> <!--@mbg.generated-->
id, `name`, `location`, phone, create_time, update_time, update_user, org_id, `sum` id, `name`, `location`, phone, create_time, update_time, update_user, org_id, `sum`
</sql> </sql>
<insert id="addWarehouse" parameterType="com.junmp.jyzb.domain.Warehouse">
insert into base_warehouse
(id,name,location,phone,create_time,update_user,org_id,videp,state)
values
(#{id},#{name},#{location},#{phone},#{createTime},#{updateUser},#{orgId},#{video},1)
</insert>
<select id="getOneWarehouse" resultType="Map">
select w.id as warehouseId,o.name as orgName,w.name as name,w.state,location,phone,update_time as updateTime
from base_warehouse w,base_organization o
where w.org_id=o.id and p.id=#{id}
</select>
<update id="changeWarehouseState">
update base_warehouse w
set state = #{state}
where w.id =#{id}
</update>
<delete id="deleteWarehouse">
delete from base_warehouse w
where id =#{id}
</delete>
<update id="updateWarehouse">
update base_warehouse p
set name = #{name},location=#{location},phone=#{phone},update_time=#{updateTime},update_user=#{updateUser},org_id=#{orgId}
where p.id =#{id}
</update>
<select id="getAllWarehouseId" resultType="String">
select id
from base_warehouse w
where org_id=#{orgId}
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -20,4 +20,43 @@ ...@@ -20,4 +20,43 @@
id, cabinet_num, `name`, org_id, `location`, error_state, create_time, update_time, id, cabinet_num, `name`, org_id, `location`, error_state, create_time, update_time,
create_user, update_user create_user, update_user
</sql> </sql>
<insert id="addCabinet" parameterType="com.junmp.jyzb.domain.Warehouse">
insert into base_cabinet
(id,cabinet_num,name,org_id,location,error_state,create_time,update_user,delete_flag)
values
(#{id},#{cabinetNum},#{name},#{orgId},#{location},#{errorState},#{createTime},#{updateUser},0)
</insert>
<select id="getOneCabinet" resultType="Map">
select id,cabinet_num,name,org_id,location,error_state from base_cabinet p
where p.id=#{id} and delete_flag=0
</select>
<delete id="deleteCabinet">
delete from base_cabinet w
where w.id =#{id}
</delete>
<update id="updateCabinet">
update base_cabinet p
set cabinet_num = #{cabinetNum},name=#{name},org_id=#{orgId},location=#{location},error_state=#{errorState},update_time=#{updateTime},update_user=#{updateUser}
where p.id =#{id} and delete_flag=0
</update>
<select id="getAllCabinet" resultType="Map">
select p.id,p.name as police_name,cabinet_id,org_id,police_code,sex,face_info,photo ,f.name as finger_name,finger_info
from base_policeman p,base_police_finger f
where p.id=f.police_id
and p.org_id=#{orgId}
and delete_flag=0
</select>
<select id="getAllCabinetId" resultType="String">
select id
from base_cabinet w
where org_id=#{orgId} and delete_flag=0;
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -18,4 +18,34 @@ ...@@ -18,4 +18,34 @@
<!--@mbg.generated--> <!--@mbg.generated-->
id, type_id, detail_id, code, `name`, create_time, update_time, note, epc_type id, type_id, detail_id, code, `name`, create_time, update_time, note, epc_type
</sql> </sql>
<insert id="addSize" parameterType="com.junmp.jyzb.domain.EquipmentSize">
insert into base_equipment_size
(id,type_id as typeId,code,name,create_time as createTime,note,price,state,epcType)
values
(#{id},#{typeId},#{code},#{name},#{createTime},#{note},#{price},#{state},#{epcType})
</insert>
<select id="getOneSize" resultType="Map">
select id,code,name,note,price,state,epc_type as epcType from base_equipment_size p
where p.id=#{id}
</select>
<update id="deleteSize">
update base_equipment_size w
set state = #{state}
where w.id =#{id}
</update>
<update id="updateSize">
update base_equipment_size p
set type_id = #{typeId},code=#{code},name=#{name},update_time=#{updateTime},note=#{note},price=#{price},state=#{state},epc_type=#{epcType}
where p.id =#{id}
</update>
<select id="getAllSizeId" resultType="String">
select id
from base_equipment_size w
where type_id=#{typeId}
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -17,4 +17,24 @@ ...@@ -17,4 +17,24 @@
<!--@mbg.generated--> <!--@mbg.generated-->
id, `name`, code, parent_id, create_time, update_time, `state`, note id, `name`, code, parent_id, create_time, update_time, `state`, note
</sql> </sql>
<select id="selectAllEquipment" resultMap="BaseResultMap">
SELECT id,name,unit,unit_type,code,parent_id,state,note,code
FROM base_equipment_type
</select>
<!--SELECT id,name,unit,unit_type,code,parent_id,state,note,-->
<!-- CASE-->
<!-- WHEN update_time IS NULL THEN create_time-->
<!-- ELSE update_time-->
<!-- END AS update_time-->
<!-- FROM base_equipment_type-->
<insert id="addEquipment" parameterType="com.junmp.jyzb.domain.EquipmentType">
insert into base_warehouse
(id,name,unit,unit_type,code,parent_id,create_time,state,note)
values
(#{id},#{name},#{unit},#{unitType},#{code},#{parentId},#{createTime},1,#{note})
</insert>
</mapper> </mapper>
\ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
</sql> </sql>
<select id="getFingersByUserId" parameterType="String" resultType="java.util.Map"> <select id="getFingersByUserId" parameterType="String" resultType="java.util.Map">
SELECT f.id as fingerId,f.name,f.finger_info SELECT f.id as fingerId,f.name,f.finger_info as fingerInfo
FROM base_police_finger f FROM base_police_finger f
WHERE f.police_id = #{userId} WHERE f.police_id = #{userId}
</select> </select>
......
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.junmp.jyzb.mapper.PolicemanMapper"> <mapper namespace="com.junmp.jyzb.mapper.PolicemanMapper">
<resultMap id="PolicemanMap" type="com.junmp.jyzb.domain.Policeman">
<result column="id" property="id"/>
<result column="name" property="name"/>
<result column="cabinet_id" property="cabinetId"/>
<result column="org_id" property="orgId"/>
<result column="police_code" property="policeCode"/>
<result column="sex" property="sex"/>
<result column="face_info" property="faceInfo"/>
<result column="isCreatedAccount" property="isCreatedAccount"/>
<result column="door_code" property="doorCode"/>
<result column="password" property="password"/>
<result column="photo" property="photo"/>
<result column="phone" property="phone"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
<result column="id_card" property="idCard"/>
<result column="update_user" property="updateUser"/>
<result column="state" property="state"/>
</resultMap>
<insert id="addPoliceman" parameterType="com.junmp.jyzb.domain.Policeman"> <insert id="addPoliceman" parameterType="com.junmp.jyzb.domain.Policeman">
insert into base_policeman insert into base_policeman
(id,name,cabinet_id,org_id,police_code,sex,face_info,photo,phone,create_time,update_user,exist_type) (id,org_id,name,police_code,sex,isCreatedAccount,
cabinet_id,phone,id_card,photo,update_user,create_time)
values values
(#{id},#{name},#{cabinetId},#{orgId},#{policeCode},#{sex},#{faceInfo},#{photo},#{phone},#{createTime},#{updateUser},0) (#{id},#{orgId},#{name},#{policeCode},#{sex},#{isCreatedAccount},
#{cabinetId},#{phone},#{idCard},#{photo},#{updateUser},#{createTime})
</insert> </insert>
<!-- <select id="" resultType="com.junmp.jyzb.domain.Policeman">-->
<!-- select * from base_policeman p,base_police_finger f-->
<!-- where p.id=f.police_id and exist_type=0;-->
<!-- </select>-->
<select id="getOnePolice" resultType="Map"> <select id="getOnePolice" resultType="Map">
select id,name,cabinet_id,org_id,police_code,sex,face_info,photo from base_policeman p SELECT
where p.id=#{id} and exist_type=0 p.id AS id,
o.org_id AS orgId,
o.area_name AS orgName,
p.name AS name,
p.sex,
p.phone,
p.photo,
p.police_code AS policeCode,
c.id AS cabinetId,
c.name AS cabinetName,
p.update_time AS updateTime
FROM base_policeman p
LEFT JOIN pub_org o ON p.org_id = o.org_id
LEFT JOIN base_cabinet c ON p.cabinet_id = c.id
WHERE p.id = #{id};
</select> </select>
<update id="deletePolice"> <delete id="deletePolice">
update base_policeman p DELETE FROM base_policeman p WHERE p.id =#{id};
set exist_type = 1 </delete>
where p.id =#{id}
</update>
<update id="updatePolice"> <update id="updatePolice">
update base_policeman p update base_policeman p
set name = #{name},cabinet_id=#{cabinetId},org_id=#{orgId},police_code=#{policeCode},sex=#{sex},face_info=#{faceInfo},photo=#{photo},update_time=#{updateTime} set
org_id=#{orgId},
name = #{name},
police_code=#{policeCode},
sex=#{sex},
isCreatedAccount=#{isCreatedAccount},
cabinet_id=#{cabinetId},
phone=#{phone},
id_card=#{idCard},
update_user=#{updateUser},
photo=#{photo},
update_time=#{updateTime}
where p.id =#{id} where p.id =#{id}
</update> </update>
...@@ -35,17 +76,35 @@ ...@@ -35,17 +76,35 @@
from base_policeman p,base_police_finger f from base_policeman p,base_police_finger f
where p.id=f.police_id where p.id=f.police_id
and p.org_id=#{orgId} and p.org_id=#{orgId}
and exist_type=0 and delete_flag=0
</select> </select>
<select id="getAllPoliceId" resultType="String"> <select id="getAllPoliceId" resultType="String">
select id select id
from base_policeman p from base_policeman p
where org_id=#{orgId} and exist_type=0; where org_id=#{orgId}
</select> </select>
<delete id="deleteFinger"> <delete id="deleteFinger">
delete from base_police_finger delete from base_police_finger
where id =#{fingerId} where id =#{fingerId}
</delete> </delete>
<select id="getAllPoliceIdByCabinet" resultType="String">
select id
from base_policeman p
where cabinet_id=#{cabinetId} and delete_flag=0;
</select>
<update id="addFaceInfo" parameterType="com.junmp.jyzb.domain.Policeman">
update base_policeman p
set face_info=#{faceInfo},update_time=#{updateTime}
where p.id=#{id}
</update>
<update id="changePoliceState">
update base_policeman p
set state = #{state}
where p.id =#{id}
</update>
</mapper> </mapper>
\ No newline at end of file
...@@ -20,4 +20,39 @@ ...@@ -20,4 +20,39 @@
id, equipment_id, `name`, supplier_code, short_name, contacts, create_time, create_user, id, equipment_id, `name`, supplier_code, short_name, contacts, create_time, create_user,
update_time, update_user update_time, update_user
</sql> </sql>
<insert id="addSupplier" parameterType="com.junmp.jyzb.domain.Supplier">
insert into base_supplier
(id,name,code,short_name,contacts,phone,create_time,create_user)
values
(#{id},#{name},#{code},#{shortName},#{contacts},#{phone},#{createTime},#{createUser})
</insert>
<select id="getOneSupplier" resultType="Map">
SELECT id, name, code, short_name AS shortName, contacts, phone, update_user,
CASE
WHEN update_time IS NULL THEN create_time
ELSE update_time
END AS updateTime
FROM base_supplier
WHERE id = #{id};
</select>
<update id="deleteSupplier">
update base_supplier w
set delete_flag = 1
where w.id =#{id}
</update>
<update id="updateSupplier">
update base_supplier p
set name=#{name},code=#{code},short_name=#{shortName},contacts=#{contacts},phone=#{phone},
update_time=#{updateTime},update_user=#{updateUser}
where p.id =#{id}
</update>
<select id="getAllSupplierId" resultType="String">
select id
from base_supplier w
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -18,4 +18,40 @@ ...@@ -18,4 +18,40 @@
<!--@mbg.generated--> <!--@mbg.generated-->
id, `name`, `location`, phone, create_time, update_time, update_user, org_id, `sum` id, `name`, `location`, phone, create_time, update_time, update_user, org_id, `sum`
</sql> </sql>
<insert id="addWarehouse" parameterType="com.junmp.jyzb.domain.Warehouse">
insert into base_warehouse
(id,name,location,phone,create_time,update_user,org_id,videp,state)
values
(#{id},#{name},#{location},#{phone},#{createTime},#{updateUser},#{orgId},#{video},1)
</insert>
<select id="getOneWarehouse" resultType="Map">
select w.id as warehouseId,o.name as orgName,w.name as name,w.state,location,phone,update_time as updateTime
from base_warehouse w,base_organization o
where w.org_id=o.id and p.id=#{id}
</select>
<update id="changeWarehouseState">
update base_warehouse w
set state = #{state}
where w.id =#{id}
</update>
<delete id="deleteWarehouse">
delete from base_warehouse w
where id =#{id}
</delete>
<update id="updateWarehouse">
update base_warehouse p
set name = #{name},location=#{location},phone=#{phone},update_time=#{updateTime},update_user=#{updateUser},org_id=#{orgId}
where p.id =#{id}
</update>
<select id="getAllWarehouseId" resultType="String">
select id
from base_warehouse w
where org_id=#{orgId}
</select>
</mapper> </mapper>
\ No newline at end of file
artifactId=jyzb-biz
groupId=com.junmp.jyzb
version=1.0.0
com\junmp\jyzb\service\InventorySummaryService.class
com\junmp\jyzb\service\impl\PoliceFingerServiceImpl.class
com\junmp\jyzb\service\ProductBatchService.class
com\junmp\jyzb\service\impl\ProductTagServiceImpl.class
com\junmp\jyzb\service\WarehouseService.class
com\junmp\jyzb\mapper\YearReportMapper.class
com\junmp\jyzb\utils\HttpStatus.class
com\junmp\jyzb\utils\ResponseResult.class
com\junmp\jyzb\service\impl\PolicemanServiceImpl.class
com\junmp\jyzb\controller\ProductTagController.class
com\junmp\jyzb\doc\ProductTagDoc.class
com\junmp\jyzb\service\PackageService.class
com\junmp\jyzb\mapper\PolicemanMapper.class
com\junmp\jyzb\domain\LogSummary.class
com\junmp\jyzb\config\MybatisPlusConfig.class
com\junmp\jyzb\controller\EquipmentTypeController.class
com\junmp\jyzb\service\impl\ProductSkuServiceImpl.class
com\junmp\jyzb\service\impl\PackageServiceImpl.class
com\junmp\jyzb\mapper\LogSummaryMapper.class
com\junmp\jyzb\domain\Inventory.class
com\junmp\jyzb\domain\LogDetail.class
com\junmp\jyzb\service\impl\InventorySummaryServiceImpl.class
com\junmp\jyzb\mapper\LogDetailMapper.class
com\junmp\jyzb\service\impl\SupplierServiceImpl.class
com\junmp\jyzb\service\impl\LogDetailServiceImpl.class
com\junmp\jyzb\domain\Cabinet.class
com\junmp\jyzb\service\EquipmentSizeService.class
com\junmp\jyzb\domain\Warehouse.class
com\junmp\jyzb\mapper\WarehouseMapper.class
com\junmp\jyzb\mapper\PackageMapper.class
com\junmp\jyzb\service\CompanyService.class
com\junmp\jyzb\service\SupplierEquipmentService.class
com\junmp\jyzb\domain\CabinetBox.class
com\junmp\jyzb\service\YearReportService.class
com\junmp\jyzb\doc\CompanyDoc.class
com\junmp\jyzb\mapper\HistoryMapper.class
com\junmp\jyzb\service\EquipmentTypeService.class
com\junmp\jyzb\entity\ProductTag.class
com\junmp\jyzb\controller\EquipmentSizeController.class
com\junmp\jyzb\service\impl\LogSummaryServiceImpl.class
com\junmp\jyzb\service\CabinetService.class
com\junmp\jyzb\service\impl\CompanyServiceImpl.class
com\junmp\jyzb\service\LogDetailService.class
com\junmp\jyzb\service\CabinetBoxService.class
com\junmp\jyzb\service\HistoryService.class
com\junmp\jyzb\service\PoliceFingerService.class
com\junmp\jyzb\mapper\CompanyMapper.class
com\junmp\jyzb\cache\GoldRedisCache.class
com\junmp\jyzb\doc\ProductBatchDoc.class
com\junmp\jyzb\entity\Company.class
com\junmp\jyzb\utils\RequestParam.class
com\junmp\jyzb\controller\ProductController.class
com\junmp\jyzb\service\PolicemanService.class
com\junmp\jyzb\service\InventoryService.class
com\junmp\jyzb\mapper\SupplierEquipmentMapper.class
com\junmp\jyzb\domain\YearReport.class
com\junmp\jyzb\entity\ProductBatch.class
com\junmp\jyzb\service\impl\WarehouseServiceImpl.class
com\junmp\jyzb\controller\PoliceController.class
com\junmp\jyzb\domain\Package.class
com\junmp\jyzb\service\LogSummaryService.class
com\junmp\jyzb\service\impl\HistoryServiceImpl.class
com\junmp\jyzb\service\ProductService.class
com\junmp\jyzb\domain\Supplier.class
com\junmp\jyzb\entity\Product.class
com\junmp\jyzb\service\impl\ProductServiceImpl.class
com\junmp\jyzb\controller\CompanyController.class
com\junmp\jyzb\domain\History.class
com\junmp\jyzb\service\impl\CabinetServiceImpl.class
com\junmp\jyzb\doc\ProductDoc.class
com\junmp\jyzb\domain\InventorySummary.class
com\junmp\jyzb\controller\SupplierController.class
com\junmp\jyzb\mapper\InventorySummaryMapper.class
com\junmp\jyzb\service\impl\CabinetBoxServiceImpl.class
com\junmp\jyzb\controller\WarehouseController.class
com\junmp\jyzb\controller\CabinetController.class
com\junmp\jyzb\mapper\EquipmentSizeMapper.class
com\junmp\jyzb\domain\SupplierEquipment.class
com\junmp\jyzb\mapper\PackageInformationMapper.class
com\junmp\jyzb\service\impl\InventoryServiceImpl.class
com\junmp\jyzb\mapper\ProductMapper.class
com\junmp\jyzb\mapper\ProductSkuMapper.class
com\junmp\jyzb\doc\LoginDoc.class
com\junmp\jyzb\mapper\CabinetMapper.class
com\junmp\jyzb\service\ProductSkuService.class
com\junmp\jyzb\doc\ProductSkuDoc.class
com\junmp\jyzb\service\impl\SupplierEquipmentServiceImpl.class
com\junmp\jyzb\controller\PublicController.class
com\junmp\jyzb\mapper\CabinetBoxMapper.class
com\junmp\jyzb\domain\EquipmentType.class
com\junmp\jyzb\mapper\InventoryMapper.class
com\junmp\jyzb\service\SupplierService.class
com\junmp\jyzb\controller\ProductBatchController.class
com\junmp\jyzb\service\ProductTagService.class
com\junmp\jyzb\domain\Organization.class
com\junmp\jyzb\mapper\ProductBatchMapper.class
com\junmp\jyzb\mapper\PoliceFingerMapper.class
com\junmp\jyzb\domain\Policeman.class
com\junmp\jyzb\mapper\ProductTagMapper.class
com\junmp\jyzb\service\PackageInformationService.class
com\junmp\jyzb\mapper\SupplierMapper.class
com\junmp\jyzb\service\impl\ProductBatchServiceImpl.class
com\junmp\jyzb\utils\DateTimeUtil.class
com\junmp\jyzb\domain\EquipmentSize.class
com\junmp\jyzb\mapper\EquipmentTypeMapper.class
com\junmp\jyzb\service\impl\YearReportServiceImpl.class
com\junmp\jyzb\service\impl\EquipmentSizeServiceImpl.class
com\junmp\jyzb\service\impl\PackageInformationServiceImpl.class
com\junmp\jyzb\service\impl\EquipmentTypeServiceImpl.class
com\junmp\jyzb\domain\PackageInformation.class
com\junmp\jyzb\controller\LoginController.class
com\junmp\jyzb\domain\PoliceFinger.class
com\junmp\jyzb\controller\ProductSkuController.class
com\junmp\jyzb\controller\TestController.class
com\junmp\jyzb\entity\ProductSku.class
...@@ -26,7 +26,9 @@ knife4j: ...@@ -26,7 +26,9 @@ knife4j:
spring: spring:
datasource: datasource:
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
#jdbc:mysql://192.168.3.128:3306/db_jyzb?
url: jdbc:mysql://192.168.3.128:3306/db_jyzb?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&nullCatalogMeansCurrent=true url: jdbc:mysql://192.168.3.128:3306/db_jyzb?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&nullCatalogMeansCurrent=true
# junmp 123456
username: junmp username: junmp
password: 123456 password: 123456
......
...@@ -9,7 +9,7 @@ spring: ...@@ -9,7 +9,7 @@ spring:
name: jyzb-app name: jyzb-app
profiles: profiles:
#@spring.active@ #@spring.active@
active: @spring.active@ active: local
servlet: servlet:
multipart: multipart:
max-request-size: 200MB max-request-size: 200MB
......
...@@ -26,7 +26,9 @@ knife4j: ...@@ -26,7 +26,9 @@ knife4j:
spring: spring:
datasource: datasource:
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
#jdbc:mysql://192.168.3.128:3306/db_jyzb?
url: jdbc:mysql://192.168.3.128:3306/db_jyzb?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&nullCatalogMeansCurrent=true url: jdbc:mysql://192.168.3.128:3306/db_jyzb?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&nullCatalogMeansCurrent=true
# junmp 123456
username: junmp username: junmp
password: 123456 password: 123456
......
artifactId=jyzb-boot
groupId=com.junmp.jyzb
version=1.0.0
com\junmp\jyzb\boot\module\JpJacksonModule.class
com\junmp\jyzb\boot\core\handle\GlobalExceptionHandler.class
com\junmp\jyzb\boot\JyzbBootApplication.class
com\junmp\jyzb\boot\config\MapperScanConfiguration.class
com\junmp\jyzb\boot\config\Swagger2Config.class
com\junmp\jyzb\boot\config\GlobalCorsConfig.class
com\junmp\jyzb\boot\config\JsonSerializerConfig.class
D:\java-project\jyzb\jyzb-platform\jyzb-boot\src\main\java\com\junmp\jyzb\boot\config\GlobalCorsConfig.java
D:\java-project\jyzb\jyzb-platform\jyzb-boot\src\main\java\com\junmp\jyzb\boot\JyzbBootApplication.java
D:\java-project\jyzb\jyzb-platform\jyzb-boot\src\main\java\com\junmp\jyzb\boot\core\handle\GlobalExceptionHandler.java
D:\java-project\jyzb\jyzb-platform\jyzb-boot\src\main\java\com\junmp\jyzb\boot\config\JsonSerializerConfig.java
D:\java-project\jyzb\jyzb-platform\jyzb-boot\src\main\java\com\junmp\jyzb\boot\module\JpJacksonModule.java
D:\java-project\jyzb\jyzb-platform\jyzb-boot\src\main\java\com\junmp\jyzb\boot\config\MapperScanConfiguration.java
D:\java-project\jyzb\jyzb-platform\jyzb-boot\src\main\java\com\junmp\jyzb\boot\config\Swagger2Config.java
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论