Commit 350b4745 by 李小惠

单警柜接口

parent d500e7e9
...@@ -9,9 +9,11 @@ ...@@ -9,9 +9,11 @@
<outputRelativeToContentRoot value="true" /> <outputRelativeToContentRoot value="true" />
<module name="jyzb-common" /> <module name="jyzb-common" />
<module name="jyzb-process" /> <module name="jyzb-process" />
<module name="jyzb-api" /> <module name="jyzb-mq-consumer" />
<module name="jyzb-biz" /> <module name="jyzb-biz" />
<module name="jyzb-boot" /> <module name="jyzb-boot" />
<module name="jyzb-mq-producer" />
<module name="jyzb-api" />
</profile> </profile>
</annotationProcessing> </annotationProcessing>
<bytecodeTargetLevel target="9" /> <bytecodeTargetLevel target="9" />
...@@ -23,6 +25,9 @@ ...@@ -23,6 +25,9 @@
<module name="jyzb-biz" options="-parameters" /> <module name="jyzb-biz" options="-parameters" />
<module name="jyzb-boot" options="-parameters" /> <module name="jyzb-boot" options="-parameters" />
<module name="jyzb-common" options="-parameters" /> <module name="jyzb-common" options="-parameters" />
<module name="jyzb-mq" options="-parameters" />
<module name="jyzb-mq-consumer" options="-parameters" />
<module name="jyzb-mq-producer" options="-parameters" />
<module name="jyzb-process" options="-parameters" /> <module name="jyzb-process" options="-parameters" />
</option> </option>
</component> </component>
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="Encoding"> <component name="Encoding">
<file url="file://$APPLICATION_HOME_DIR$/jbr/bin/src/main/java" charset="UTF-8" />
<file url="file://$APPLICATION_HOME_DIR$/jbr/bin/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/jyzb-api/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/jyzb-api/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/jyzb-api/src/main/resources" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/jyzb-api/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/jyzb-biz/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/jyzb-biz/src/main/java" charset="UTF-8" />
...@@ -9,6 +11,12 @@ ...@@ -9,6 +11,12 @@
<file url="file://$PROJECT_DIR$/jyzb-boot/src/main/resources" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/jyzb-boot/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/jyzb-common/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/jyzb-common/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/jyzb-common/src/main/resources" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/jyzb-common/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/jyzb-mq/jyzb-mq-consumer/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/jyzb-mq/jyzb-mq-consumer/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/jyzb-mq/jyzb-mq-producer/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/jyzb-mq/jyzb-mq-producer/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/jyzb-mq/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/jyzb-mq/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/jyzb-process/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/jyzb-process/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/jyzb-process/src/main/resources" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/jyzb-process/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
......
...@@ -9,9 +9,19 @@ ...@@ -9,9 +9,19 @@
<remote-repository> <remote-repository>
<option name="id" value="central" /> <option name="id" value="central" />
<option name="name" value="Central Repository" /> <option name="name" value="Central Repository" />
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://repo.maven.apache.org/maven2" /> <option name="url" value="https://repo.maven.apache.org/maven2" />
</remote-repository> </remote-repository>
<remote-repository> <remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="http://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="junmp-public" /> <option name="id" value="junmp-public" />
<option name="name" value="junmp-public" /> <option name="name" value="junmp-public" />
<option name="url" value="http://maven.sothing.top/repository/junmp-public/" /> <option name="url" value="http://maven.sothing.top/repository/junmp-public/" />
......
...@@ -72,4 +72,11 @@ public class CabinetController { ...@@ -72,4 +72,11 @@ public class CabinetController {
ResponseResult returnMsg = cabinetService.getCabinetDetail(msg); ResponseResult returnMsg = cabinetService.getCabinetDetail(msg);
return returnMsg; return returnMsg;
} }
// @PostMapping()
// @ApiOperation("获取副柜列表")
//
// @PostMapping()
// @ApiOperation("获取箱门列表")
} }
\ No newline at end of file
...@@ -40,6 +40,27 @@ public class PoliceController { ...@@ -40,6 +40,27 @@ public class PoliceController {
return returnMsg; return returnMsg;
} }
@PostMapping("/updateFingerInfo")
@ApiOperation("修改指纹信息")
public ResponseResult updateFingerInfo(@RequestBody Map<String,Object> msg) {
ResponseResult returnMsg = policemanService.updateFingerInfo(msg);
return returnMsg;
}
@PostMapping("/searchFingerInfo")
@ApiOperation("查找指纹信息")
public ResponseResult searchFingerInfo(@RequestBody Map<String,Object> msg) {
ResponseResult returnMsg = policemanService.searchFingerInfo(msg);
return returnMsg;
}
@PostMapping("/DeleteFingerInfo")
@ApiOperation("删除警员指纹信息")
public ResponseResult deletePoliceFinger(@RequestBody Map<String,Object> msg) {
ResponseResult returnMsg= policemanService.deleteFinger(msg);
return returnMsg;
}
@PostMapping("/AddFaceInfo") @PostMapping("/AddFaceInfo")
@ApiOperation("添加警员面部信息") @ApiOperation("添加警员面部信息")
public ResponseResult addFaceInfo(@RequestBody Map<String,Object> msg) { public ResponseResult addFaceInfo(@RequestBody Map<String,Object> msg) {
...@@ -47,6 +68,21 @@ public class PoliceController { ...@@ -47,6 +68,21 @@ public class PoliceController {
return returnMsg; return returnMsg;
} }
@PostMapping("/updatefaceInfo")
@ApiOperation("修改、删除人脸信息")
public ResponseResult updateFaceInfo(@RequestBody Map<String,Object> msg) {
ResponseResult returnMsg = policemanService.updateFaceInfo(msg);
return returnMsg;
}
@PostMapping("/searchFaceInfo")
@ApiOperation("查找人脸信息")
public ResponseResult searchFaceInfo(@RequestBody Map<String,Object> msg) {
ResponseResult returnMsg = policemanService.searchFaceInfo(msg);
return returnMsg;
}
@PostMapping("/DeletePolice") @PostMapping("/DeletePolice")
@ApiOperation("删除警员信息") @ApiOperation("删除警员信息")
public ResponseResult deletePolice(@RequestBody Map<String,Object> msg) { public ResponseResult deletePolice(@RequestBody Map<String,Object> msg) {
...@@ -82,12 +118,7 @@ public class PoliceController { ...@@ -82,12 +118,7 @@ public class PoliceController {
return returnMsg; return returnMsg;
} }
@PostMapping("/DeleteFingerInfo")
@ApiOperation("删除警员指纹信息")
public ResponseResult deletePoliceFinger(@RequestBody Map<String,Object> msg) {
ResponseResult returnMsg= policemanService.deleteFinger(msg);
return returnMsg;
}
//todo 更新查询所有 //todo 更新查询所有
@PostMapping("/GetPoliceData") @PostMapping("/GetPoliceData")
......
package com.junmp.jyzb.domain; package com.junmp.jyzb.domain;
import com.alibaba.druid.sql.dialect.oracle.ast.stmt.OracleCreateTableStatement; import com.alibaba.druid.sql.dialect.oracle.ast.stmt.OracleCreateTableStatement;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable; import java.io.Serializable;
......
package com.junmp.jyzb.mapper; package com.junmp.jyzb.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.junmp.jyzb.domain.PoliceFinger; import com.junmp.jyzb.domain.PoliceFinger;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
...@@ -8,7 +9,7 @@ import java.util.List; ...@@ -8,7 +9,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
@Mapper @Mapper
public interface PoliceFingerMapper { public interface PoliceFingerMapper extends BaseMapper<PoliceFinger> {
List<Map<String, Object>> getFingersByUserId(String userId); List<Map<String, Object>> getFingersByUserId(String userId);
......
...@@ -23,6 +23,10 @@ public interface PolicemanService{ ...@@ -23,6 +23,10 @@ public interface PolicemanService{
List<String> getAllPoliceIdByCabinet(Map<String, Object> cabinetId); List<String> getAllPoliceIdByCabinet(Map<String, Object> cabinetId);
ResponseResult addFingerInfo(Map<String, Object> msg); ResponseResult addFingerInfo(Map<String, Object> msg);
//修改指纹信息
ResponseResult updateFingerInfo(Map<String, Object> msg);
//查询指纹信息
ResponseResult searchFingerInfo(Map<String, Object> msg);
ResponseResult addFaceInfo(Map<String, Object> msg); ResponseResult addFaceInfo(Map<String, Object> msg);
...@@ -33,4 +37,9 @@ public interface PolicemanService{ ...@@ -33,4 +37,9 @@ public interface PolicemanService{
ResponseResult getAllPoliceman(Map<String, Object> orgId); ResponseResult getAllPoliceman(Map<String, Object> orgId);
ResponseResult getPoliceData(Map<String, Object> cabinetId); ResponseResult getPoliceData(Map<String, Object> cabinetId);
ResponseResult updateFaceInfo(Map<String, Object> msg);
ResponseResult searchFaceInfo(Map<String, Object> msg);
} }
package com.junmp.jyzb.service.impl; package com.junmp.jyzb.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.junmp.jyzb.domain.PoliceFinger; import com.junmp.jyzb.domain.PoliceFinger;
import com.junmp.jyzb.domain.PubOrg; import com.junmp.jyzb.domain.PubOrg;
import com.junmp.jyzb.mapper.*; import com.junmp.jyzb.mapper.*;
...@@ -430,6 +431,54 @@ public class PolicemanServiceImpl implements PolicemanService { ...@@ -430,6 +431,54 @@ public class PolicemanServiceImpl implements PolicemanService {
return new ResponseResult(HttpStatus.SUCCESS,"操作成功"); return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
} }
/**
* @author lxh
* @description 更新警员的指纹信息
* @since 2023/7/18 14:21
* @param msg (fingerId)
* @return
**/
@Override
public ResponseResult updateFingerInfo(Map<String, Object> msg) {
//警员id,name,指纹信息不能为空
try {
checkNotBlank(msg.get("policeId"), "policeId不能为空");
checkNotBlank(msg.get("name"), "name不能为空");
checkNotBlank(msg.get("fingerInfo"), "fingerInfo不能为空");
} catch (IllegalArgumentException e) {
return new ResponseResult(HttpStatus.ERROR, ReturnMsg.ERROR,e.getMessage());
}
PoliceFinger policeFinger = new PoliceFinger();
policeFinger.setId((Integer) msg.get("id"));
policeFinger.setPoliceId((String) msg.get("policeId"));
policeFinger.setUpdateTime(DateTimeUtil.getCurrentDateTime());
policeFinger.setFingerInfo((String) msg.get("fingerInfo"));
policeFinger.setName((String) msg.get("name"));
policeFingerMapper.update(policeFinger, new LambdaQueryWrapper<PoliceFinger>()
.eq(PoliceFinger::getId, msg.get("id")));
return new ResponseResult(HttpStatus.SUCCESS,"操作成功");
}
/**
* @author lxh
* @description 查询警员的指纹信息
* @since 2023/7/18 14:21
* @param msg (fingerId)
* @return
**/
@Override
public ResponseResult searchFingerInfo(Map<String, Object> msg) {
//警员id不能为空
try {
checkNotBlank(msg.get("policeId"), "policeId不能为空");
} catch (IllegalArgumentException e) {
return new ResponseResult(HttpStatus.ERROR, ReturnMsg.ERROR,e.getMessage());
}
List<PoliceFinger> fingerList = policeFingerMapper.selectList(new LambdaQueryWrapper<PoliceFinger>()
.eq(PoliceFinger::getPoliceId, msg.get("policeId")));
return new ResponseResult(HttpStatus.SUCCESS,"操作成功",fingerList);
}
@Override @Override
public ResponseResult addFaceInfo(Map<String, Object> msg) { public ResponseResult addFaceInfo(Map<String, Object> msg) {
try { try {
...@@ -438,7 +487,6 @@ public class PolicemanServiceImpl implements PolicemanService { ...@@ -438,7 +487,6 @@ public class PolicemanServiceImpl implements PolicemanService {
} catch (IllegalArgumentException e) { } catch (IllegalArgumentException e) {
return new ResponseResult(HttpStatus.ERROR, ReturnMsg.ERROR,e.getMessage()); return new ResponseResult(HttpStatus.ERROR, ReturnMsg.ERROR,e.getMessage());
} }
Date currentDate = DateTimeUtil.getCurrentDateTime(); Date currentDate = DateTimeUtil.getCurrentDateTime();
Policeman police =new Policeman(); Policeman police =new Policeman();
police.setId(msg.get("policeId").toString()); police.setId(msg.get("policeId").toString());
...@@ -635,4 +683,49 @@ public class PolicemanServiceImpl implements PolicemanService { ...@@ -635,4 +683,49 @@ public class PolicemanServiceImpl implements PolicemanService {
redisUtils.set(redisKey, allMsg); redisUtils.set(redisKey, allMsg);
return new ResponseResult(HttpStatus.SUCCESS,ReturnMsg.PASS,allMsg); return new ResponseResult(HttpStatus.SUCCESS,ReturnMsg.PASS,allMsg);
} }
/**
* @author lxh
* @description 更新人脸信息\删除人脸信息
* @since 2023/7/18 15:02
* @param
* @return
**/
@Override
public ResponseResult updateFaceInfo(Map<String, Object> msg) {
try{
checkNotBlank(msg.get("policeId"),"policeId不能为空");
}catch (IllegalArgumentException e){
return new ResponseResult(HttpStatus.ERROR,ReturnMsg.ERROR,e.getMessage());
}
Policeman police =new Policeman();
police.setId(msg.get("policeId").toString());
police.setFaceInfo(msg.get("faceInfo").toString());
police.setUpdateTime(DateTimeUtil.getCurrentDateTime());
policemanMapper.updatePolice(police);
return new ResponseResult(HttpStatus.SUCCESS,ReturnMsg.PASS);
}
/**
* @author lxh
* @description 查询人脸信息
* @since 2023/7/18 15:02
* @param
* @return
**/
@Override
public ResponseResult searchFaceInfo(Map<String, Object> msg) {
//警员id不能为空
try {
checkNotBlank(msg.get("policeId"), "policeId不能为空");
} catch (IllegalArgumentException e) {
return new ResponseResult(HttpStatus.ERROR, ReturnMsg.ERROR,e.getMessage());
}
Policeman policeman = policemanMapper.selectOne(new LambdaQueryWrapper<Policeman>()
.eq(Policeman::getId, msg.get("policeId")));
return new ResponseResult(HttpStatus.SUCCESS,"操作成功",policeman);
}
} }
...@@ -119,7 +119,7 @@ public class PubOrgServiceImpl implements PubOrgService{ ...@@ -119,7 +119,7 @@ public class PubOrgServiceImpl implements PubOrgService{
//topList = setParentMsg(topList); //topList = setParentMsg(topList);
// 遍历并添加父类的相关信息到children的第一个位置 // 遍历并添加父类的相关信息到children的第一个位置
traverseList(topList); //traverseList(topList);
// 返回结果 // 返回结果
return new ResponseResult(HttpStatus.SUCCESS, "操作成功", topList); return new ResponseResult(HttpStatus.SUCCESS, "操作成功", topList);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论