Commit 20f77acb by shenweidong

更新文档,并更新了部分接口

parent d50ff25d
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;
......@@ -27,14 +28,14 @@ public class CabinetController {
@ApiOperation("添加单警柜")
public ResponseResult addCabinet(@RequestBody Map<String,Object> msg) {
cabinetService.addCabinet(msg);
return new ResponseResult(10000,"操作成功");
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
@PostMapping("/DeleteCabinet")
@ApiOperation("删除单警柜信息")
public ResponseResult deleteCabinet(@RequestBody Map<String,Object> msg) {
cabinetService.deleteCabinet(msg);
return new ResponseResult(10000,"操作成功");
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
@PostMapping("/GetAllCabinet")
......@@ -47,13 +48,20 @@ public class CabinetController {
Map<String, Object> warehouseMsg = cabinetService.getOneCabinet(cabinetId);
allCabinet.add(warehouseMsg);
}
return new ResponseResult(10000,"操作成功",allCabinet);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功",allCabinet);
}
@PostMapping("/UpdateCabinet")
@ApiOperation("修改单警柜信息")
public ResponseResult updateCabinet(@RequestBody Map<String,Object> msg) {
cabinetService.updateCabinet(msg);
return new ResponseResult(10000,"操作成功");
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
......@@ -2,6 +2,7 @@ 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;
......@@ -28,14 +29,14 @@ public class EquipmentSizeController {
@ApiOperation("添加号型信息")
public ResponseResult addSize(@RequestBody Map<String,Object> msg) {
equipmentSizeService.addSize(msg);
return new ResponseResult(10000,"操作成功");
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
@PostMapping("/DeleteSize")
@ApiOperation("删除号型信息")
public ResponseResult deleteSize(@RequestBody Map<String,Object> msg) {
equipmentSizeService.deleteSize(msg);
return new ResponseResult(10000,"操作成功");
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
@PostMapping("/GetOneSize")
......@@ -43,10 +44,10 @@ public class EquipmentSizeController {
public ResponseResult getOneSize(@RequestBody Map<String, Object> msg) {
String sizeId = msg.get("id").toString();
Map<String, Object> sizeMsg = equipmentSizeService.getOneSize(sizeId);
return new ResponseResult(10000,"操作成功",sizeMsg);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功",sizeMsg);
}
@PostMapping("/GetAllSize")
@PostMapping("/ShowSize")
@ApiOperation("查询号型列表") //根据组织机构id查询
public ResponseResult getAllSize(@RequestBody Map<String, Object> typeId){
//获取该组织机构下所有警员的id
......@@ -56,14 +57,14 @@ public class EquipmentSizeController {
Map<String, Object> sizeMsg = equipmentSizeService.getOneSize(sizeId);
allSize.add(sizeMsg);
}
return new ResponseResult(10000,"操作成功",allSize);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功",allSize);
}
@PostMapping("/UpdateSize")
@ApiOperation("修改号型信息")
public ResponseResult updateSize(@RequestBody Map<String,Object> msg) {
equipmentSizeService.updateSize(msg);
return new ResponseResult(10000,"操作成功");
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
}
......@@ -2,6 +2,7 @@ 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;
......@@ -22,17 +23,18 @@ public class EquipmentTypeController {
@Resource
public EquipmentTypeService equipmentTypeService;
@PostMapping("/FindEquipment")
@PostMapping("/ShowEquipmentList")
@ApiOperation("查询物资列表")
public List<Map<String, Object>> getMenuList() {
return equipmentTypeService.getEquipmentList();
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(10000,"操作成功");
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
// @PostMapping("/ChangeEquipmentState")
......
......@@ -3,7 +3,9 @@ package com.junmp.jyzb.controller;
import com.junmp.jyzb.domain.Policeman;
import com.junmp.jyzb.service.PoliceFingerService;
import com.junmp.jyzb.service.PolicemanService;
import com.junmp.jyzb.utils.HttpStatus;
import com.junmp.jyzb.utils.ResponseResult;
import com.sun.net.httpserver.Authenticator;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
......@@ -27,59 +29,79 @@ public class PoliceController {
@Resource
private PoliceFingerService fingerService;
@PostMapping("/GetAllPolice")
@PostMapping("/AddPoliceman")
@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){
//获取该组织机构下所有警员的id
List<Map<String, Object>> allPoliceman=new ArrayList<>();
List<String> allPoliceId =policemanService.getAllPoliceId(orgId);
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(10000,"操作成功",allPoliceman);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功",allPoliceman);
}
@PostMapping("/GetOnePolice")
@PostMapping("/GetPoliceDetail")
@ApiOperation("查询单个警员信息")
public ResponseResult getOnePolice(@RequestBody Map<String, Object> msg) {
String userId = msg.get("policeId").toString();
Map<String, Object> policeMsg = policemanService.getOnePolice(userId);
List<Map<String, Object>> fingerprints = fingerService.getFingersByUserId(userId);
policeMsg.put("fingerMsg",fingerprints);
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,"操作成功");
// List<Map<String, Object>> fingerprints = fingerService.getFingersByUserId(userId);
// policeMsg.put("fingerMsg",fingerprints);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功",policeMsg);
}
@PostMapping("/UpdatePolice")
@ApiOperation("修改警员信息")
public ResponseResult updatePolice(@RequestBody Map<String,Object> msg) {
policemanService.updatePolice(msg);
return new ResponseResult(10000,"操作成功");
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
@PostMapping("/DeletePoliceFinger")
@PostMapping("/DeleteFingerInfo")
@ApiOperation("删除警员指纹信息")
public ResponseResult deletePoliceFinger(@RequestBody Map<String,Object> msg) {
policemanService.deleteFinger(msg);
return new ResponseResult(10000,"操作成功");
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
@PostMapping("/GetAllPoliceByCabinet")
......@@ -94,6 +116,6 @@ public class PoliceController {
policeMsg.put("fingerMsg",fingerprints);
allPoliceman.add(policeMsg);
}
return new ResponseResult(10000,"操作成功",allPoliceman);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功",allPoliceman);
}
}
......@@ -2,6 +2,8 @@ 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;
......@@ -28,26 +30,27 @@ public class SupplierController {
@ApiOperation("添加供应商")
public ResponseResult addSupplier(@RequestBody Map<String,Object> msg) {
supplierService.addSupplier(msg);
return new ResponseResult(10000,"操作成功");
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
@PostMapping("/DeleteSupplier")
@ApiOperation("删除供应商信息")
public ResponseResult deleteSupplier(@RequestBody Map<String,Object> msg) {
supplierService.deleteSupplier(msg);
return new ResponseResult(10000,"操作成功");
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
@PostMapping("/GetAllSupplier")
@PostMapping("/ShowSupplier")
@ApiOperation("查询供应商列表")
public ResponseResult getAllSupplier(){
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(10000,"操作成功",allSupplier);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功",allSupplier);
}
@PostMapping("/GetOneSupplier")
......@@ -55,13 +58,13 @@ public class SupplierController {
public ResponseResult getOneSupplier(@RequestBody Map<String, Object> msg) {
String supplierId = msg.get("supplierId").toString();
Map<String, Object> supplierMsg = supplierService.getOneSupplier(supplierId);
return new ResponseResult(10000,"操作成功",supplierMsg);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功",supplierMsg);
}
@PostMapping("/UpdateSupplier")
@ApiOperation("修改供应商信息")
public ResponseResult updateSupplier(@RequestBody Map<String,Object> msg) {
supplierService.updateSupplier(msg);
return new ResponseResult(10000,"操作成功");
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
}
......@@ -3,6 +3,7 @@ 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;
......@@ -29,17 +30,24 @@ public class WarehouseController {
@ApiOperation("添加仓库")
public ResponseResult addWarehouse(@RequestBody Map<String,Object> msg) {
warehouseService.addWarehouse(msg);
return new ResponseResult(10000,"操作成功",null);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
@PostMapping("/DeleteWarehouse")
@ApiOperation("删除仓库信息")
public ResponseResult deleteWarehouse(@RequestBody Map<String,Object> msg) {
warehouseService.deleteWarehouse(msg);
return new ResponseResult(10000,"操作成功",null);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
@PostMapping("/GetAllWarehouse")
@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
......@@ -49,7 +57,7 @@ public class WarehouseController {
Map<String, Object> warehouseMsg = warehouseService.getOneWarehouse(warehouseId);
allWarehouse.add(warehouseMsg);
}
return new ResponseResult(10000,"操作成功",allWarehouse);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功",allWarehouse);
}
@PostMapping("/GetOneWarehouse")
......@@ -57,13 +65,13 @@ public class WarehouseController {
public ResponseResult getOneWarehouse(@RequestBody Map<String, Object> msg) {
String warehouseId = msg.get("warehouseId").toString();
Map<String, Object> warehouseMsg = warehouseService.getOneWarehouse(warehouseId);
return new ResponseResult(10000,"操作成功",warehouseMsg);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功",warehouseMsg);
}
@PostMapping("/UpdateWarehouse")
@ApiOperation("修改仓库信息")
public ResponseResult updateWarehouse(@RequestBody Map<String,Object> msg) {
warehouseService.updateWarehouse(msg);
return new ResponseResult(10000,"操作成功",null);
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
}
......@@ -52,6 +52,30 @@ public class Policeman implements Serializable {
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="警员照片")
......@@ -76,22 +100,22 @@ public class Policeman implements Serializable {
private Date updateTime;
/**
* 更新人员
* 身份证信息
*/
@ApiModelProperty(value="更新人员")
private String updateUser;
@ApiModelProperty(value="身份证信息")
private String idCard;
/**
* 软删除,0表存在,1表已删除
* 更新人员
*/
@ApiModelProperty(value="软删除,0表存在,1表已删除")
private Integer existType;
@ApiModelProperty(value="更新人员")
private String updateUser;
/**
* 人脸信息
* 警员状态
*/
@ApiModelProperty(value="人脸信息")
private String faceInfo;
@ApiModelProperty(value="警员状态")
private Integer state;
/**
* 指纹信息
......
......@@ -35,7 +35,7 @@ public class Supplier implements Serializable {
* 供应商短码
*/
@ApiModelProperty(value = "供应商短码")
private String supplierCode;
private String code;
/**
* 简称
......@@ -73,5 +73,11 @@ public class Supplier implements Serializable {
@ApiModelProperty(value = "更新人ID")
private String updateUser;
/**
* 联系方式
*/
@ApiModelProperty(value = "联系方式")
private String phone;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
......@@ -62,6 +62,18 @@ public class Warehouse implements Serializable {
private String orgId;
/**
* 视屏地址
*/
@ApiModelProperty(value = "视屏地址")
private String video;
/**
* 1表启用,0表禁用
*/
@ApiModelProperty(value = "状态")
private Integer state;
/**
* 当前仓库下装备总数
*/
@ApiModelProperty(value = "当前仓库下装备总数")
......
......@@ -12,7 +12,7 @@ public interface PolicemanMapper extends BaseMapper<Policeman> {
/**
* 新增警员信息
*/
public int addPoliceman(Policeman policeman);
void addPoliceman(Policeman policeman);
/**
* 查询警员列表
......@@ -33,4 +33,8 @@ public interface PolicemanMapper extends BaseMapper<Policeman> {
void deleteFinger(String fingerId);
List<String> getAllPoliceIdByCabinet(String cabinetId);
void addFaceInfo(Policeman police);
void changePoliceState(Policeman police);
}
\ No newline at end of file
......@@ -20,4 +20,5 @@ public interface WarehouseMapper {
List<String> getAllWarehouseId(String orgId);
void changeWarehouseState(Warehouse warehouse);
}
\ No newline at end of file
......@@ -13,5 +13,4 @@ public interface EquipmentSizeService{
void updateSize(Map<String, Object> msg);
List<String> getAllSizeId(Map<String, Object> orgId);
}
......@@ -20,4 +20,10 @@ public interface PolicemanService{
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);
}
......@@ -14,4 +14,6 @@ public interface WarehouseService{
void updateWarehouse(Map<String, Object> msg);
List<String> getAllWarehouseId(Map<String, Object> orgId);
void changeWarehouseState(Map<String, Object> msg);
}
......@@ -36,14 +36,13 @@ public class EquipmentSizeServiceImpl implements EquipmentSizeService {
size.setNote((String) msg.get("note"));
size.setPrice((Float) msg.get("price"));
size.setState((Integer) msg.get("state"));
size.setEpcType((Integer) msg.get("epcType"));
equipmentSizeMapper.addSize(size);
}
@Override
public Map<String,Object> getOneSize(String id) {
return equipmentSizeMapper.getOneSize(id);
public Map<String,Object> getOneSize(String msg) {
return equipmentSizeMapper.getOneSize(msg);
}
@Override
......
......@@ -26,10 +26,15 @@ public class EquipmentTypeServiceImpl implements EquipmentTypeService {
Map<String, Object> map = new HashMap<>();
map.put("id", menu.getId());
map.put("name", menu.getName());
map.put("child", getChildMenus(menu.getId(), menuList));
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;
}
......@@ -42,7 +47,13 @@ public class EquipmentTypeServiceImpl implements EquipmentTypeService {
Map<String, Object> map = new HashMap<>();
map.put("id", menu.getId());
map.put("name", menu.getName());
map.put("child", getChildMenus(menu.getId(), menuList));
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);
}
}
......@@ -52,21 +63,18 @@ public class EquipmentTypeServiceImpl implements EquipmentTypeService {
@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.setCreateTime(currentDate);
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.setState((Integer) msg.get("state"));
equipmentType.setNote((String) msg.get("note"));
equipmentType.setCreateTime(currentDate);
equipmentTypeMapper.addEquipment(equipmentType);
}
}
......@@ -33,31 +33,32 @@ public class PolicemanServiceImpl implements PolicemanService {
String uuid = UUID.randomUUID().toString().replaceAll("-", "");
//生成当前时间
Date currentDate = DateTimeUtil.getCurrentDateTime();
police.setId(uuid);
police.setCreateTime(currentDate);
police.setOrgId((String) policeman.get("orgId"));
police.setName((String) policeman.get("name"));
police.setUpdateUser((String) policeman.get("updateUser"));
police.setCabinetId((String) policeman.get("cabinetId"));
police.setPoliceCode((String) policeman.get("policeCode"));
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.setPoliceCode((String) policeman.get("policeCode"));
police.setFaceInfo((String) policeman.get("faceInfo"));
police.setIdCard((String) policeman.get("idCard"));
police.setPhoto((String) policeman.get("photo"));
police.setUpdateUser((String) policeman.get("updateUser"));
police.setCreateTime(currentDate);
policemanMapper.addPoliceman(police);
//一个警员可能有多个指纹信息,用list接收
List<Map<String, Object>> fingerMsgList = (List<Map<String, Object>>) policeman.get("fingerMsg");
//遍历指纹信息,将指纹信息添加到指纹表
for (Map<String, Object> fingerMsg : fingerMsgList) {
PoliceFinger finger =new PoliceFinger();
finger.setPoliceId(uuid);
finger.setName(fingerMsg.get("name").toString());
finger.setFingerInfo(fingerMsg.get("fingerInfo").toString());
finger.setCreateTime(currentDate);
policeFingerMapper.addFingers(finger);
}
// //一个警员可能有多个指纹信息,用list接收
// List<Map<String, Object>> fingerMsgList = (List<Map<String, Object>>) policeman.get("fingerMsg");
// //遍历指纹信息,将指纹信息添加到指纹表
// for (Map<String, Object> fingerMsg : fingerMsgList) {
// PoliceFinger finger =new PoliceFinger();
// finger.setPoliceId(uuid);
// finger.setName(fingerMsg.get("name").toString());
// finger.setFingerInfo(fingerMsg.get("fingerInfo").toString());
// finger.setCreateTime(currentDate);
// policeFingerMapper.addFingers(finger);
// }
}
@Override
......@@ -82,27 +83,28 @@ public class PolicemanServiceImpl implements PolicemanService {
Date currentDate = DateTimeUtil.getCurrentDateTime();
//police.setId(uuid);
police.setId((String) policeman.get("id"));
police.setUpdateTime(currentDate);
police.setOrgId((String) policeman.get("orgId"));
police.setName((String) policeman.get("name"));
police.setUpdateUser((String) policeman.get("updateUser"));
police.setCabinetId((String) policeman.get("cabinetId"));
police.setPoliceCode((String) policeman.get("policeCode"));
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.setPoliceCode((String) policeman.get("policeCode"));
police.setFaceInfo((String) policeman.get("faceInfo"));
police.setIdCard((String) policeman.get("idCard"));
police.setPhoto((String) policeman.get("photo"));
police.setUpdateUser((String) policeman.get("updateUser"));
police.setUpdateTime(currentDate);
policemanMapper.updatePolice(police);
List<Map<String, Object>> fingerMsgList = (List<Map<String, Object>>) policeman.get("fingerMsg");
//修改指纹相关信息
for (Map<String, Object> fingerMsg : fingerMsgList) {
PoliceFinger finger =new PoliceFinger();
finger.setName(fingerMsg.get("name").toString());
finger.setFingerInfo(fingerMsg.get("fingerInfo").toString());
finger.setUpdateTime(currentDate);
policeFingerMapper.updateFingers(finger);
}
// List<Map<String, Object>> fingerMsgList = (List<Map<String, Object>>) policeman.get("fingerMsg");
// //修改指纹相关信息
// for (Map<String, Object> fingerMsg : fingerMsgList) {
// PoliceFinger finger =new PoliceFinger();
// finger.setName(fingerMsg.get("name").toString());
// finger.setFingerInfo(fingerMsg.get("fingerInfo").toString());
// finger.setUpdateTime(currentDate);
// policeFingerMapper.updateFingers(finger);
// }
}
@Override
......@@ -113,11 +115,8 @@ public class PolicemanServiceImpl implements PolicemanService {
@Override
public void deleteFinger(Map<String, Object> msg) {
//遍历要删除的警员id
List<Object> fingerList = (List<Object>) msg.get("fingerList");
for (Object finger:fingerList){
policemanMapper.deleteFinger(finger.toString());
}
String fingerId = msg.get("fingerId").toString();
policemanMapper.deleteFinger(fingerId);
}
@Override
......@@ -125,4 +124,34 @@ public class PolicemanServiceImpl implements PolicemanService {
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);
}
}
......@@ -29,12 +29,11 @@ public class SupplierServiceImpl implements SupplierService {
Date currentDate = DateTimeUtil.getCurrentDateTime();
supplier.setId(uuid);
supplier.setCreateTime(currentDate);
supplier.setEquipmentId((String) msg.get("equipmentId"));
supplier.setName((String) msg.get("name"));
supplier.setSupplierCode((String) msg.get("supplierCode"));
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);
}
......@@ -59,11 +58,11 @@ public class SupplierServiceImpl implements SupplierService {
supplier.setUpdateTime(currentDate);
supplier.setId((String) msg.get("id"));
supplier.setEquipmentId((String) msg.get("equipmentId"));
supplier.setName((String) msg.get("name"));
supplier.setSupplierCode((String) msg.get("supplierCode"));
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);
}
......
......@@ -36,6 +36,7 @@ public class WarehouseServiceImpl implements WarehouseService {
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);
}
......@@ -46,7 +47,6 @@ public class WarehouseServiceImpl implements WarehouseService {
@Override
public void deleteWarehouse(Map<String, Object> msg) {
//遍历要删除的警员id
List<Object> warehouseList = (List<Object>) msg.get("warehouseList");
for (Object warehouseId:warehouseList){
warehouseMapper.deleteWarehouse(warehouseId.toString());
......@@ -60,7 +60,7 @@ public class WarehouseServiceImpl implements WarehouseService {
//生成当前时间
Date currentDate = DateTimeUtil.getCurrentDateTime();
//police.setId(uuid);
warehouse.setId((String) msg.get("id"));
warehouse.setId((String) msg.get("warehouseId"));
warehouse.setName((String) msg.get("name"));
warehouse.setUpdateUser((String) msg.get("updateUser"));
warehouse.setLocation((String) msg.get("location"));
......@@ -75,4 +75,12 @@ public class WarehouseServiceImpl implements WarehouseService {
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
/**
* 操作成功
*/
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;
import com.fasterxml.jackson.annotation.JsonInclude;
/**
* 定义统一的返回类
* */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ResponseResult<T> {
......
......@@ -33,11 +33,12 @@
where p.id=#{id} and delete_flag=0
</select>
<update id="deleteCabinet">
update base_cabinet w
set delete_flag = 1
<delete id="deleteCabinet">
delete from base_cabinet w
where w.id =#{id}
</update>
</delete>
<update id="updateCabinet">
update base_cabinet p
......
......@@ -21,13 +21,13 @@
<insert id="addSize" parameterType="com.junmp.jyzb.domain.EquipmentSize">
insert into base_equipment_size
(id,type_id,code,name,create_time,note,price,state,epc_type)
(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,type_id,code,name,note,price,state,epc_type from base_equipment_size p
select id,code,name,note,price,state,epc_type as epcType from base_equipment_size p
where p.id=#{id}
</select>
......
......@@ -19,18 +19,22 @@
</sql>
<select id="selectAllEquipment" resultMap="BaseResultMap">
SELECT id,name,parent_id FROM base_equipment_type
SELECT id,name,unit,unit_type,code,parent_id,state,note,code
FROM base_equipment_type
</select>
<insert id="addEquipment" parameterType="com.junmp.jyzb.domain.Warehouse">
<!--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},#{state},#{note})
(#{id},#{name},#{unit},#{unitType},#{code},#{parentId},#{createTime},1,#{note})
</insert>
</mapper>
\ No newline at end of file
......@@ -9,7 +9,7 @@
</sql>
<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
WHERE f.police_id = #{userId}
</select>
......
<?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="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 into base_policeman
(id,name,cabinet_id,org_id,police_code,sex,face_info,photo,phone,create_time,update_user,delete_flag)
(id,org_id,name,police_code,sex,isCreatedAccount,
cabinet_id,phone,id_card,photo,update_user,create_time)
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>
<select id="getOnePolice" resultType="Map">
select id,name,cabinet_id,org_id,police_code,sex,face_info,photo from base_policeman p
where p.id=#{id} and delete_flag=0
SELECT
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>
<update id="deletePolice">
update base_policeman p
set delete_flag = 1
where p.id =#{id}
</update>
<delete id="deletePolice">
DELETE FROM base_policeman p WHERE p.id =#{id};
</delete>
<update id="updatePolice">
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}
</update>
......@@ -36,7 +82,7 @@
<select id="getAllPoliceId" resultType="String">
select id
from base_policeman p
where org_id=#{orgId} and delete_flag=0;
where org_id=#{orgId}
</select>
<delete id="deleteFinger">
......@@ -49,4 +95,16 @@
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>
\ No newline at end of file
......@@ -23,14 +23,19 @@
<insert id="addSupplier" parameterType="com.junmp.jyzb.domain.Supplier">
insert into base_supplier
(id,equipment_id,name,supplier_code,short_name,contacts,create_time,create_user,delete_flag)
(id,name,code,short_name,contacts,phone,create_time,create_user)
values
(#{id},#{equipmentId},#{name},#{supplierCode},#{shortName},#{contacts},#{createTime},#{createUser},0)
(#{id},#{name},#{code},#{shortName},#{contacts},#{phone},#{createTime},#{createUser})
</insert>
<select id="getOneSupplier" resultType="Map">
select id,equipment_id,name,supplier_code,short_name,contacts from base_supplier p
where p.id=#{id} and delete_flag=0
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">
......@@ -41,14 +46,13 @@
<update id="updateSupplier">
update base_supplier p
set equipment_id = #{equipmentId},name=#{name},supplier_code=#{supplierCode},short_name=#{shortName},contacts=#{contacts},
set name=#{name},code=#{code},short_name=#{shortName},contacts=#{contacts},phone=#{phone},
update_time=#{updateTime},update_user=#{updateUser}
where p.id =#{id} and delete_flag=0
where p.id =#{id}
</update>
<select id="getAllSupplierId" resultType="String">
select id
from base_supplier w
where delete_flag=0;
</select>
</mapper>
\ No newline at end of file
......@@ -21,31 +21,37 @@
<insert id="addWarehouse" parameterType="com.junmp.jyzb.domain.Warehouse">
insert into base_warehouse
(id,name,location,phone,create_time,update_user,org_id,delete_flag)
(id,name,location,phone,create_time,update_user,org_id,videp,state)
values
(#{id},#{name},#{location},#{phone},#{createTime},#{updateUser},#{orgId},0)
(#{id},#{name},#{location},#{phone},#{createTime},#{updateUser},#{orgId},#{video},1)
</insert>
<select id="getOneWarehouse" resultType="Map">
select id,name,location,phone,org_id from base_warehouse p
where p.id=#{id} and delete_flag=0
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="deleteWarehouse">
<update id="changeWarehouseState">
update base_warehouse w
set delete_flag = 1
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} and delete_flag=0
where p.id =#{id}
</update>
<select id="getAllWarehouseId" resultType="String">
select id
from base_warehouse w
where org_id=#{orgId} and delete_flag=0;
where org_id=#{orgId}
</select>
</mapper>
\ No newline at end of file
......@@ -33,11 +33,12 @@
where p.id=#{id} and delete_flag=0
</select>
<update id="deleteCabinet">
update base_cabinet w
set delete_flag = 1
<delete id="deleteCabinet">
delete from base_cabinet w
where w.id =#{id}
</update>
</delete>
<update id="updateCabinet">
update base_cabinet p
......
......@@ -21,13 +21,13 @@
<insert id="addSize" parameterType="com.junmp.jyzb.domain.EquipmentSize">
insert into base_equipment_size
(id,type_id,code,name,create_time,note,price,state,epc_type)
(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,type_id,code,name,note,price,state,epc_type from base_equipment_size p
select id,code,name,note,price,state,epc_type as epcType from base_equipment_size p
where p.id=#{id}
</select>
......
......@@ -19,18 +19,22 @@
</sql>
<select id="selectAllEquipment" resultMap="BaseResultMap">
SELECT id,name,parent_id FROM base_equipment_type
SELECT id,name,unit,unit_type,code,parent_id,state,note,code
FROM base_equipment_type
</select>
<insert id="addEquipment" parameterType="com.junmp.jyzb.domain.Warehouse">
<!--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},#{state},#{note})
(#{id},#{name},#{unit},#{unitType},#{code},#{parentId},#{createTime},1,#{note})
</insert>
</mapper>
\ No newline at end of file
......@@ -9,7 +9,7 @@
</sql>
<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
WHERE f.police_id = #{userId}
</select>
......
<?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="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 into base_policeman
(id,name,cabinet_id,org_id,police_code,sex,face_info,photo,phone,create_time,update_user,delete_flag)
(id,org_id,name,police_code,sex,isCreatedAccount,
cabinet_id,phone,id_card,photo,update_user,create_time)
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>
<select id="getOnePolice" resultType="Map">
select id,name,cabinet_id,org_id,police_code,sex,face_info,photo from base_policeman p
where p.id=#{id} and delete_flag=0
SELECT
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>
<update id="deletePolice">
update base_policeman p
set delete_flag = 1
where p.id =#{id}
</update>
<delete id="deletePolice">
DELETE FROM base_policeman p WHERE p.id =#{id};
</delete>
<update id="updatePolice">
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}
</update>
......@@ -36,7 +82,7 @@
<select id="getAllPoliceId" resultType="String">
select id
from base_policeman p
where org_id=#{orgId} and delete_flag=0;
where org_id=#{orgId}
</select>
<delete id="deleteFinger">
......@@ -49,4 +95,16 @@
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>
\ No newline at end of file
......@@ -23,14 +23,19 @@
<insert id="addSupplier" parameterType="com.junmp.jyzb.domain.Supplier">
insert into base_supplier
(id,equipment_id,name,supplier_code,short_name,contacts,create_time,create_user,delete_flag)
(id,name,code,short_name,contacts,phone,create_time,create_user)
values
(#{id},#{equipmentId},#{name},#{supplierCode},#{shortName},#{contacts},#{createTime},#{createUser},0)
(#{id},#{name},#{code},#{shortName},#{contacts},#{phone},#{createTime},#{createUser})
</insert>
<select id="getOneSupplier" resultType="Map">
select id,equipment_id,name,supplier_code,short_name,contacts from base_supplier p
where p.id=#{id} and delete_flag=0
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">
......@@ -41,14 +46,13 @@
<update id="updateSupplier">
update base_supplier p
set equipment_id = #{equipmentId},name=#{name},supplier_code=#{supplierCode},short_name=#{shortName},contacts=#{contacts},
set name=#{name},code=#{code},short_name=#{shortName},contacts=#{contacts},phone=#{phone},
update_time=#{updateTime},update_user=#{updateUser}
where p.id =#{id} and delete_flag=0
where p.id =#{id}
</update>
<select id="getAllSupplierId" resultType="String">
select id
from base_supplier w
where delete_flag=0;
</select>
</mapper>
\ No newline at end of file
......@@ -21,31 +21,37 @@
<insert id="addWarehouse" parameterType="com.junmp.jyzb.domain.Warehouse">
insert into base_warehouse
(id,name,location,phone,create_time,update_user,org_id,delete_flag)
(id,name,location,phone,create_time,update_user,org_id,videp,state)
values
(#{id},#{name},#{location},#{phone},#{createTime},#{updateUser},#{orgId},0)
(#{id},#{name},#{location},#{phone},#{createTime},#{updateUser},#{orgId},#{video},1)
</insert>
<select id="getOneWarehouse" resultType="Map">
select id,name,location,phone,org_id from base_warehouse p
where p.id=#{id} and delete_flag=0
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="deleteWarehouse">
<update id="changeWarehouseState">
update base_warehouse w
set delete_flag = 1
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} and delete_flag=0
where p.id =#{id}
</update>
<select id="getAllWarehouseId" resultType="String">
select id
from base_warehouse w
where org_id=#{orgId} and delete_flag=0;
where org_id=#{orgId}
</select>
</mapper>
\ No newline at end of file
......@@ -12,6 +12,7 @@ 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
......@@ -47,6 +48,7 @@ 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
......
......@@ -7,6 +7,7 @@ D:\java-project\jyzb\jyzb-platform\jyzb-biz\src\main\java\com\junmp\jyzb\control
D:\java-project\jyzb\jyzb-platform\jyzb-biz\src\main\java\com\junmp\jyzb\doc\ProductSkuDoc.java
D:\java-project\jyzb\jyzb-platform\jyzb-biz\src\main\java\com\junmp\jyzb\domain\Package.java
D:\java-project\jyzb\jyzb-platform\jyzb-biz\src\main\java\com\junmp\jyzb\mapper\CabinetMapper.java
D:\java-project\jyzb\jyzb-platform\jyzb-biz\src\main\java\com\junmp\jyzb\config\MybatisPlusConfig.java
D:\java-project\jyzb\jyzb-platform\jyzb-biz\src\main\java\com\junmp\jyzb\domain\EquipmentSize.java
D:\java-project\jyzb\jyzb-platform\jyzb-biz\src\main\java\com\junmp\jyzb\controller\CabinetController.java
D:\java-project\jyzb\jyzb-platform\jyzb-biz\src\main\java\com\junmp\jyzb\domain\CabinetBox.java
......@@ -106,6 +107,7 @@ D:\java-project\jyzb\jyzb-platform\jyzb-biz\src\main\java\com\junmp\jyzb\service
D:\java-project\jyzb\jyzb-platform\jyzb-biz\src\main\java\com\junmp\jyzb\entity\Company.java
D:\java-project\jyzb\jyzb-platform\jyzb-biz\src\main\java\com\junmp\jyzb\service\impl\SupplierEquipmentServiceImpl.java
D:\java-project\jyzb\jyzb-platform\jyzb-biz\src\main\java\com\junmp\jyzb\service\impl\CabinetBoxServiceImpl.java
D:\java-project\jyzb\jyzb-platform\jyzb-biz\src\main\java\com\junmp\jyzb\utils\RequestParam.java
D:\java-project\jyzb\jyzb-platform\jyzb-biz\src\main\java\com\junmp\jyzb\service\LogDetailService.java
D:\java-project\jyzb\jyzb-platform\jyzb-biz\src\main\java\com\junmp\jyzb\service\impl\EquipmentTypeServiceImpl.java
D:\java-project\jyzb\jyzb-platform\jyzb-biz\src\main\java\com\junmp\jyzb\service\impl\WarehouseServiceImpl.java
......
......@@ -27,10 +27,10 @@ spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
#jdbc:mysql://192.168.3.128:3306/db_jyzb?
url: jdbc:mysql://127.0.0.1:3306/jyzb03?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: root
password: root
username: junmp
password: 123456
redis:
host: 127.0.0.1
......
......@@ -27,10 +27,10 @@ spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
#jdbc:mysql://192.168.3.128:3306/db_jyzb?
url: jdbc:mysql://127.0.0.1:3306/jyzb03?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: root
password: root
username: junmp
password: 123456
redis:
host: 127.0.0.1
......
......@@ -9,9 +9,9 @@ spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: ${MYSQL_USER:junmp} #junmp
password: ${MYSQL_PWD:123456} #123456
url: jdbc:mysql://${MYSQL_HOST:192.168.3.128}:${MYSQL_PORT:3306}/${MYSQL_DB:db_jyzb}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true&queryTimeout=2400&nullCatalogMeansCurrent=true
username: ${MYSQL_USER:root} #junmp
password: ${MYSQL_PWD:root} #123456
url: jdbc:mysql://${MYSQL_HOST:127.0.0.1}:${MYSQL_PORT:3306}/${MYSQL_DB:jyzb03}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true&queryTimeout=2400&nullCatalogMeansCurrent=true
#===================== Redis配置 =====================
redis:
database: 1 #缓存库编号
......
......@@ -9,9 +9,9 @@ spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: ${MYSQL_USER:junmp} #junmp
password: ${MYSQL_PWD:123456} #123456
url: jdbc:mysql://${MYSQL_HOST:192.168.3.128}:${MYSQL_PORT:3306}/${MYSQL_DB:db_jyzb}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true&queryTimeout=2400&nullCatalogMeansCurrent=true
username: ${MYSQL_USER:root} #junmp
password: ${MYSQL_PWD:root} #123456
url: jdbc:mysql://${MYSQL_HOST:127.0.0.1}:${MYSQL_PORT:3306}/${MYSQL_DB:jyzb03}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true&queryTimeout=2400&nullCatalogMeansCurrent=true
#===================== Redis配置 =====================
redis:
database: 1 #缓存库编号
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论