Commit ae035ce7 by 李小惠

修改人员模块

parent 79d33d7c
...@@ -169,7 +169,7 @@ public class BusFormDto { ...@@ -169,7 +169,7 @@ public class BusFormDto {
* 报废类型(1销毁出库,2移入报废区) * 报废类型(1销毁出库,2移入报废区)
*/ */
private Integer type; private Integer type;
/** /**
* 单据使用次数(forbidden禁止使用,outgoing 仅出库使用,incoming仅入库使用,bothuseing出入库都可以使用一次) * 单据使用次数(forbidden禁止使用,outgoing 仅出库使用,incoming仅入库使用,bothuseing出入库都可以使用一次)
*/ */
......
...@@ -27,10 +27,8 @@ public class PolicemanDto { ...@@ -27,10 +27,8 @@ public class PolicemanDto {
private String tel; private String tel;
private String phone; private String phone;
//单警柜编号 //单警柜
private String cabinetNum; private CabinetDto cabinetInfo;
//单警柜主柜名
private String cabinetName;
//组织机构名称 //组织机构名称
private String orgName; private String orgName;
//组织机构id //组织机构id
...@@ -49,10 +47,12 @@ public class PolicemanDto { ...@@ -49,10 +47,12 @@ public class PolicemanDto {
//用户名 //用户名
private String account; private String account;
/** // /**
* 角色id列表 // * 角色id列表
*/ // */
private List<Long> rolesList; private List<Long> rolesList;
private String rolesName;
// private List<SysUserRoleDto> rolesList;
/** /**
* 0警员,1辅警 * 0警员,1辅警
*/ */
...@@ -66,4 +66,9 @@ public class PolicemanDto { ...@@ -66,4 +66,9 @@ public class PolicemanDto {
* 指纹照片list * 指纹照片list
*/ */
private List<String> fingerList; private List<String> fingerList;
/**
* 海康人脸机
*/
private Integer hkFaceDevice;
} }
\ No newline at end of file
package com.junmp.jyzb.api.bean.dto;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
@Data
public class SysUserRoleDto {
private Long userId;
private Long roleId;
private String roleName;
private String roleCode;
private Integer roleSort;
private Integer dataScopeType;
private Integer statusFlag;
private String remark;
private Integer delFlag;
private Integer roleSysFlag;
private String roleTypeCode;
}
...@@ -21,7 +21,7 @@ public class PolicemanReq extends BaseRequest { ...@@ -21,7 +21,7 @@ public class PolicemanReq extends BaseRequest {
@NotBlank(message = "箱门id不能为空", groups = {edit.class, delete.class}) @NotBlank(message = "箱门id不能为空", groups = {edit.class, delete.class})
private String cabinetBoxId; private String cabinetBoxId;
@NotNull(message = "组织机构id不能为空",groups = {add.class}) @NotNull(message = "组织机构id不能为空",groups = {add.class,page.class})
private Long orgId; private Long orgId;
private Long departmentId; private Long departmentId;
......
...@@ -80,5 +80,6 @@ public class UpdatePolicemanReq extends BaseRequest { ...@@ -80,5 +80,6 @@ public class UpdatePolicemanReq extends BaseRequest {
* 指纹照片list * 指纹照片list
*/ */
private List<String> fingerList; private List<String> fingerList;
private Long userId;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }
\ No newline at end of file
...@@ -105,7 +105,7 @@ public class PoliceController { ...@@ -105,7 +105,7 @@ public class PoliceController {
//根据组条件查询,只查询本级,不包含下级(page)--可以根据组织机构查询 //根据组条件查询,只查询本级,不包含下级(page)--可以根据组织机构查询
@PostMapping("/ShowPolicePage") @PostMapping("/ShowPolicePage")
@ApiOperation("根据条件查询所有警员信息(page)") @ApiOperation("根据条件查询所有警员信息(page)")
public ApiRes<PageResult<PolicemanDto>> GetAllPolicemanPage(@RequestBody PolicemanReq req){ public ApiRes<PageResult<PolicemanDto>> GetAllPolicemanPage(@RequestBody @Validated(ValidationApi.page.class) PolicemanReq req){
PageResult<PolicemanDto> policemanDtoPageResult = policemanService.GetAllPolicemanPage(req); PageResult<PolicemanDto> policemanDtoPageResult = policemanService.GetAllPolicemanPage(req);
return ApiRes.success(policemanDtoPageResult); return ApiRes.success(policemanDtoPageResult);
} }
......
...@@ -84,5 +84,11 @@ public class Policeman implements Serializable { ...@@ -84,5 +84,11 @@ public class Policeman implements Serializable {
@TableField(value = "identity") @TableField(value = "identity")
private Integer identity; private Integer identity;
/**
* 海康人脸机
*/
@TableField(value = "hk_face_device")
private Integer hkFaceDevice;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }
\ No newline at end of file
...@@ -3,6 +3,8 @@ package com.junmp.jyzb.mapper; ...@@ -3,6 +3,8 @@ package com.junmp.jyzb.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.junmp.jyzb.api.bean.dto.PolicemanDto;
import com.junmp.jyzb.api.bean.dto.SysUserRoleDto;
import com.junmp.jyzb.api.bean.dto.UserRoleDto; import com.junmp.jyzb.api.bean.dto.UserRoleDto;
import com.junmp.jyzb.entity.CabinetBox; import com.junmp.jyzb.entity.CabinetBox;
import com.junmp.jyzb.entity.InventorySummary; import com.junmp.jyzb.entity.InventorySummary;
...@@ -38,4 +40,9 @@ public interface PolicemanMapper extends BaseMapper<Policeman> { ...@@ -38,4 +40,9 @@ public interface PolicemanMapper extends BaseMapper<Policeman> {
void updateBatchUserIdByAccountList(@Param("userIdList") List<Long> userIdList, @Param("accountList") List<String> accountList); void updateBatchUserIdByAccountList(@Param("userIdList") List<Long> userIdList, @Param("accountList") List<String> accountList);
List<UserRoleDto> ShowUserRole(@Param("req") SysUserReq req,@Param("numRoles") Integer numRoles); List<UserRoleDto> ShowUserRole(@Param("req") SysUserReq req,@Param("numRoles") Integer numRoles);
List<SysUserRoleDto> selectUserRoleInfo(@Param("userId") Long userId);
List<PolicemanDto> selectUserBypoliceIds(Long orgId, String account, String name, String policeCode, String phone, long l, Long pageSize);
} }
\ No newline at end of file
...@@ -13,10 +13,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; ...@@ -13,10 +13,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import com.junmp.junmpProcess.dto.StartProcessInstanceDTO; import com.junmp.junmpProcess.dto.StartProcessInstanceDTO;
import com.junmp.junmpProcess.exception.WorkFlowException; import com.junmp.junmpProcess.exception.WorkFlowException;
import com.junmp.junmpProcess.service.IFlowInstanceService; import com.junmp.junmpProcess.service.IFlowInstanceService;
import com.junmp.jyzb.api.bean.dto.PoliceFingerDto; import com.junmp.jyzb.api.bean.dto.*;
import com.junmp.jyzb.api.bean.dto.PolicemanDto;
import com.junmp.jyzb.api.bean.dto.ReassignmentDto;
import com.junmp.jyzb.api.bean.dto.UserRoleDto;
import com.junmp.jyzb.api.bean.query.CabinetReq; import com.junmp.jyzb.api.bean.query.CabinetReq;
import com.junmp.jyzb.api.bean.query.PolicemanReq; import com.junmp.jyzb.api.bean.query.PolicemanReq;
import com.junmp.jyzb.api.bean.query.QueryReassignmentReq; import com.junmp.jyzb.api.bean.query.QueryReassignmentReq;
...@@ -55,6 +52,7 @@ import liquibase.pro.packaged.O; ...@@ -55,6 +52,7 @@ import liquibase.pro.packaged.O;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.catalina.User; import org.apache.catalina.User;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
...@@ -237,7 +235,15 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman ...@@ -237,7 +235,15 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
@Override @Override
public PolicemanDto GetOnePolice(PolicemanReq req) { public PolicemanDto GetOnePolice(PolicemanReq req) {
Policeman one = PoliceExist(req.getId()); Policeman one = PoliceExist(req.getId());
PubOrg pubOrg = pubOrgService.PubOrgExist(one.getOrgId());
PolicemanDto policemanDto = new PolicemanDto(); PolicemanDto policemanDto = new PolicemanDto();
if (ObjectUtil.isNotNull(one.getCabinetBoxId())){
String cabinetId = cabinetBoxService.getById(one.getCabinetBoxId()).getCabinetId();
Cabinet cabinet = cabinetService.getById(cabinetId);
CabinetDto cabinetDto = new CabinetDto();
BeanPlusUtil.copyProperties(cabinet,cabinetDto);
policemanDto.setCabinetInfo(cabinetDto);
}
BeanPlusUtil.copyProperties(one, policemanDto); BeanPlusUtil.copyProperties(one, policemanDto);
//将警员的指纹信息查询出来 //将警员的指纹信息查询出来
List<PoliceFinger> list1 = policeFingerService.list(new LambdaQueryWrapper<PoliceFinger>() List<PoliceFinger> list1 = policeFingerService.list(new LambdaQueryWrapper<PoliceFinger>()
...@@ -252,13 +258,19 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman ...@@ -252,13 +258,19 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
//将账号名称返回 //将账号名称返回
policemanDto.setAccount(sysUserService.getById(policemanDto.getUserId()).getAccount()); policemanDto.setAccount(sysUserService.getById(policemanDto.getUserId()).getAccount());
//通过警员信息将该警员的角色id返回 //通过警员信息将该警员的角色id返回
List<SysUserRole> list = sysUserRoleService.list(new LambdaQueryWrapper<SysUserRole>() List<SysUserRoleDto> sysUserRoleDtos = policemanMapper.selectUserRoleInfo(policemanDto.getUserId());
.eq(SysUserRole::getUserId, policemanDto.getUserId())); List<Long> roleIds=new ArrayList<>();
List<Long> collect = list.stream().map(sysUserRole -> { String roleNames="";
Long roleId = sysUserRole.getRoleId(); for (SysUserRoleDto sysUserRoleDto:sysUserRoleDtos) {
return roleId; roleIds.add(sysUserRoleDto.getRoleId());
}).collect(Collectors.toList()); roleNames+=sysUserRoleDto.getRoleName()+",";
policemanDto.setRolesList(collect); }
// 删除最后一个逗号
if (!roleNames.isEmpty()) {
roleNames = roleNames.substring(0, roleNames.length() - 1);
}
policemanDto.setRolesList(roleIds);
policemanDto.setRolesName(roleNames);
List<PoliceFace> paceList = policeFaceService.list(new LambdaQueryWrapper<PoliceFace>() List<PoliceFace> paceList = policeFaceService.list(new LambdaQueryWrapper<PoliceFace>()
.eq(PoliceFace::getPoliceId, req.getId())); .eq(PoliceFace::getPoliceId, req.getId()));
List<String> faceList=new ArrayList<>(); List<String> faceList=new ArrayList<>();
...@@ -266,11 +278,13 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman ...@@ -266,11 +278,13 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
faceList.add(policeFace.getFaceInfo()); faceList.add(policeFace.getFaceInfo());
} }
policemanDto.setFaceInfoList(faceList); policemanDto.setFaceInfoList(faceList);
policemanDto.setOrgName(pubOrg.getOrgName());
return policemanDto; return policemanDto;
} }
/** /**
* 删除警员信息 * 删除警员信息
* *
...@@ -304,6 +318,7 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman ...@@ -304,6 +318,7 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
* @return * @return
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class)
public boolean UpdatePolice(UpdatePolicemanReq req) { public boolean UpdatePolice(UpdatePolicemanReq req) {
Policeman policeman = new Policeman(); Policeman policeman = new Policeman();
...@@ -326,7 +341,16 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman ...@@ -326,7 +341,16 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
cabinetBoxService.CabinetBoxExist(req.getCabinetBoxId()); cabinetBoxService.CabinetBoxExist(req.getCabinetBoxId());
} }
policeman.setUpdateTime(DateTimeUtil.getCurrentDateTime()); policeman.setUpdateTime(DateTimeUtil.getCurrentDateTime());
//修改角色
sysUserRoleService.removeBatchByIds(req.getRolesList());
List<SysUserRole> collect = req.getRolesList().stream().map(s -> {
SysUserRole sysUserRole = new SysUserRole();
sysUserRole.setUserId(req.getUserId());
sysUserRole.setRoleId(s);
sysUserRole.setCreateTime(DateTimeUtil.getCurrentDateTime());
return sysUserRole;
}).collect(Collectors.toList());
sysUserRoleService.saveBatch(collect);
return updateById(policeman); return updateById(policeman);
} }
...@@ -420,19 +444,11 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman ...@@ -420,19 +444,11 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
//查询传入的组织机构id是否存在 //查询传入的组织机构id是否存在
PubOrg pubOrg = pubOrgService.PubOrgExist(req.getOrgId()); PubOrg pubOrg = pubOrgService.PubOrgExist(req.getOrgId());
//查询出组织机构下的所有警员信息 //查询出组织机构下的所有警员信息
LambdaQueryWrapper<Policeman> eq = new LambdaQueryWrapper<Policeman>() Long pageNo = req.getPageNo();
.eq(ObjectUtil.isNotEmpty(req.getOrgId()), Policeman::getOrgId, req.getOrgId()) Long pageSize = req.getPageSize();
.like(ObjectUtil.isNotEmpty(req.getName()), Policeman::getName, req.getName()) List<PolicemanDto> policemanDtos = policemanMapper.selectUserBypoliceIds(req.getOrgId(),req.getAccount(),req.getName(),req.getPoliceCode(),req.getPhone(),(pageNo-1),pageSize);
.like(ObjectUtil.isNotEmpty(req.getPoliceCode()), Policeman::getPoliceCode, req.getPoliceCode()) // 查询出警员信息下的指纹列表信息
.eq(ObjectUtil.isNotEmpty(req.getState()), Policeman::getState, req.getState()); for (PolicemanDto p : policemanDtos) {
long size = list(eq).size();
Page<Policeman> page = page(PageFactory.getDefaultPage(req.getPageNo(), req.getPageSize()), eq);
List<Policeman> records = page.getRecords();
List<PolicemanDto> policeList = new ArrayList<>();
//查询出警员信息下的指纹列表信息
for (Policeman p : records) {
PolicemanDto policemanDto = new PolicemanDto();
BeanPlusUtil.copyProperties(p, policemanDto);
List<PoliceFinger> list1 = policeFingerService.list(new LambdaQueryWrapper<PoliceFinger>() List<PoliceFinger> list1 = policeFingerService.list(new LambdaQueryWrapper<PoliceFinger>()
.eq(ObjectUtil.isNotNull(p.getId()), PoliceFinger::getPoliceId, p.getId())); .eq(ObjectUtil.isNotNull(p.getId()), PoliceFinger::getPoliceId, p.getId()));
List<PoliceFingerDto> policeFingerDtoList = new ArrayList<>(); List<PoliceFingerDto> policeFingerDtoList = new ArrayList<>();
...@@ -441,18 +457,54 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman ...@@ -441,18 +457,54 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
BeanPlusUtil.copyProperties(policeFinger, policeFingerDto); BeanPlusUtil.copyProperties(policeFinger, policeFingerDto);
policeFingerDtoList.add(policeFingerDto); policeFingerDtoList.add(policeFingerDto);
} }
policemanDto.setFingersList(policeFingerDtoList); p.setFingersList(policeFingerDtoList);
policemanDto.setOrgName(pubOrg.getOrgName()); p.setOrgName(pubOrg.getOrgName());
policeList.add(policemanDto);
} }
Page<PolicemanDto> page1 = PageFactory.getDefaultPage(req.getPageNo(), req.getPageSize()); Page<PolicemanDto> page1 = PageFactory.getDefaultPage(req.getPageNo(), req.getPageSize());
page1.setRecords(policeList); // page1.setRecords(policemanDtos);
page1.setTotal(size); // page1.setTotal(size);
return PageResultFactory.createPageResult(page1); return PageResultFactory.createPageResult(page1);
} }
public PageResult<PolicemanDto> GetAllPolicemanPage1(PolicemanReq req) {
//查询传入的组织机构id是否存在
PubOrg pubOrg = pubOrgService.PubOrgExist(req.getOrgId());
//查询出组织机构下的所有警员信息
LambdaQueryWrapper<Policeman> eq = new LambdaQueryWrapper<Policeman>()
.eq(ObjectUtil.isNotEmpty(req.getOrgId()), Policeman::getOrgId, req.getOrgId())
.like(ObjectUtil.isNotEmpty(req.getName()), Policeman::getName, req.getName())
.like(ObjectUtil.isNotEmpty(req.getPoliceCode()), Policeman::getPoliceCode, req.getPoliceCode())
.like(ObjectUtil.isNotEmpty(req.getPhone()),Policeman::getPhone,req.getPhone())
.eq(ObjectUtil.isNotEmpty(req.getState()), Policeman::getState, req.getState());
long size = list(eq).size();
Page<Policeman> page = page(PageFactory.getDefaultPage(req.getPageNo(), req.getPageSize()), eq);
List<Policeman> records = page.getRecords();
List<Long> collect = records.stream().map(Policeman::getUserId).collect(Collectors.toList());
// List<PolicemanDto> policemanDtos = policemanMapper.selectUserBypoliceIds(collect);
//// 查询出警员信息下的指纹列表信息
// for (PolicemanDto p : policemanDtos) {
// List<PoliceFinger> list1 = policeFingerService.list(new LambdaQueryWrapper<PoliceFinger>()
// .eq(ObjectUtil.isNotNull(p.getId()), PoliceFinger::getPoliceId, p.getId()));
// List<PoliceFingerDto> policeFingerDtoList = new ArrayList<>();
// for (PoliceFinger policeFinger : list1) {
// PoliceFingerDto policeFingerDto = new PoliceFingerDto();
// BeanPlusUtil.copyProperties(policeFinger, policeFingerDto);
// policeFingerDtoList.add(policeFingerDto);
// }
// p.setFingersList(policeFingerDtoList);
// p.setOrgName(pubOrg.getOrgName());
//
// }
Page<PolicemanDto> page1 = PageFactory.getDefaultPage(req.getPageNo(), req.getPageSize());
// page1.setRecords(policemanDtos);
page1.setTotal(size);
return PageResultFactory.createPageResult(page1);
}
//根据单警柜id查询警员信息(list) //根据单警柜id查询警员信息(list)
@Override @Override
public List<PolicemanDto> GetPoliceData(CabinetReq req) { public List<PolicemanDto> GetPoliceData(CabinetReq req) {
...@@ -476,8 +528,6 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman ...@@ -476,8 +528,6 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
fingerDtoList.add(policeFingerDto); fingerDtoList.add(policeFingerDto);
} }
policemanDto.setFingersList(fingerDtoList); policemanDto.setFingersList(fingerDtoList);
policemanDto.setCabinetNum(cabinet.getCabinetNum());
policemanDto.setCabinetName(cabinet.getName());
policemanDto.setOrgName(pubOrg.getOrgName()); policemanDto.setOrgName(pubOrg.getOrgName());
list.add(policemanDto); list.add(policemanDto);
} }
...@@ -497,6 +547,8 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman ...@@ -497,6 +547,8 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
long size = policemanMapper.SearchPoliceSize(req.getId()); long size = policemanMapper.SearchPoliceSize(req.getId());
IPage<Policeman> policemenList = policemanMapper.SearchPolicePage(page,req.getId()); IPage<Policeman> policemenList = policemanMapper.SearchPolicePage(page,req.getId());
List<PolicemanDto> list = new ArrayList<>(); List<PolicemanDto> list = new ArrayList<>();
CabinetDto cabinetDto = new CabinetDto();
BeanPlusUtil.copyProperties(cabinet,cabinetDto);
for (Policeman policeman : policemenList.getRecords()) { for (Policeman policeman : policemenList.getRecords()) {
PolicemanDto policemanDto = new PolicemanDto(); PolicemanDto policemanDto = new PolicemanDto();
BeanPlusUtil.copyProperties(policeman, policemanDto); BeanPlusUtil.copyProperties(policeman, policemanDto);
...@@ -510,8 +562,7 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman ...@@ -510,8 +562,7 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
fingerDtoList.add(policeFingerDto); fingerDtoList.add(policeFingerDto);
} }
policemanDto.setFingersList(fingerDtoList); policemanDto.setFingersList(fingerDtoList);
policemanDto.setCabinetNum(cabinet.getCabinetNum()); policemanDto.setCabinetInfo(cabinetDto);
policemanDto.setCabinetName(cabinet.getName());
policemanDto.setOrgName(pubOrg.getOrgName()); policemanDto.setOrgName(pubOrg.getOrgName());
list.add(policemanDto); list.add(policemanDto);
} }
...@@ -867,6 +918,8 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman ...@@ -867,6 +918,8 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
delFaceInfoList.add(face); delFaceInfoList.add(face);
} }
} }
}else {
delFaceInfoList.addAll(faceList);
} }
}else { }else {
if (faceInfoList.size()>0){ if (faceInfoList.size()>0){
...@@ -888,6 +941,7 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman ...@@ -888,6 +941,7 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
b=policeFaceService.removeByIds(delFaceInfoList); b=policeFaceService.removeByIds(delFaceInfoList);
} }
//指纹
List<PoliceFinger> addFingerList=new ArrayList<>(); List<PoliceFinger> addFingerList=new ArrayList<>();
List<PoliceFinger> delFingerList=new ArrayList<>(); List<PoliceFinger> delFingerList=new ArrayList<>();
//库中存储的指纹信息 //库中存储的指纹信息
...@@ -914,6 +968,8 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman ...@@ -914,6 +968,8 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
delFingerList.add(finger); delFingerList.add(finger);
} }
} }
}else {
delFingerList.addAll(fingerList);
} }
}else { }else {
if (fingerInfoList.size()>0){ if (fingerInfoList.size()>0){
......
...@@ -242,5 +242,13 @@ WHERE o.org_id IN ...@@ -242,5 +242,13 @@ WHERE o.org_id IN
order by s1.create_time desc order by s1.create_time desc
</where> </where>
</select> </select>
<select id="selectUserRoleInfo" resultType="com.junmp.jyzb.api.bean.dto.SysUserRoleDto">
select su.user_id as user_id,sr.* FROM sys_user su
join sys_user_role sur on sur.user_id=su.user_id
join sys_role sr on sur.role_id=sr.role_id
WHERE su.user_id=#{userId}
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -4,6 +4,7 @@ import com.junmp.junmpProcess.dto.StartProcessInstanceDTO; ...@@ -4,6 +4,7 @@ import com.junmp.junmpProcess.dto.StartProcessInstanceDTO;
import com.junmp.v2.common.bean.response.ApiRes; import com.junmp.v2.common.bean.response.ApiRes;
import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.history.HistoricProcessInstance;
import java.util.List;
import java.util.Map; import java.util.Map;
public interface IFlowInstanceService { public interface IFlowInstanceService {
......
...@@ -207,6 +207,10 @@ public class FlowInstanceServiceImpl extends FlowServiceFactory implements IFlow ...@@ -207,6 +207,10 @@ public class FlowInstanceServiceImpl extends FlowServiceFactory implements IFlow
//手动完成第一个任务 //手动完成第一个任务
} }
// 递归获取异常信息的方法 // 递归获取异常信息的方法
private String getFullErrorMessage(Throwable throwable) { private String getFullErrorMessage(Throwable throwable) {
StringBuilder errorMessage = new StringBuilder(); StringBuilder errorMessage = new StringBuilder();
......
...@@ -204,7 +204,7 @@ public class BpmnConvert { ...@@ -204,7 +204,7 @@ public class BpmnConvert {
multiInstanceLoopCharacteristics.setElementVariable("assigneeName"); multiInstanceLoopCharacteristics.setElementVariable("assigneeName");
// 串行 // 串行
multiInstanceLoopCharacteristics.setSequential(false); multiInstanceLoopCharacteristics.setSequential(false);
multiInstanceLoopCharacteristics.setCompletionCondition("${nrOfCompletedInstances/nrOfInstances > 0}"); multiInstanceLoopCharacteristics.setCompletionCondition("${nrOfCompletedInstances/nrOfInstances >=1}");
userTask.setAssignee("${assigneeName}"); userTask.setAssignee("${assigneeName}");
// 设置多实例属性 // 设置多实例属性
userTask.setLoopCharacteristics(multiInstanceLoopCharacteristics); userTask.setLoopCharacteristics(multiInstanceLoopCharacteristics);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论