| | |
| | | import com.ycl.api.BasePageVO; |
| | | import com.ycl.api.CommonResult; |
| | | import com.ycl.controller.BaseController; |
| | | import com.ycl.entity.depart.DepartManager; |
| | | import com.ycl.entity.depart.UmsDepart; |
| | | import com.ycl.entity.user.UmsDepartManage; |
| | | import com.ycl.service.depart.UmsDepartService; |
| | | import com.ycl.service.user.UmsDepartManageService; |
| | | import com.ycl.utils.auth.UserAuthUtil; |
| | |
| | | @ApiOperation("查询全部部门") |
| | | @GetMapping(value = "/page") |
| | | public CommonResult<IPage<UmsDepartVO>> page(@RequestParam("currentPage") Integer currentPage, @RequestParam("pageSize") Integer pageSize, |
| | | @RequestParam(value = "departName", required = false) String departName) { |
| | | @RequestParam(value = "departName", required = false) String departName) { |
| | | IPage<UmsDepartVO> page = new Page<>(currentPage, pageSize); |
| | | departService.pageDepart(departName, page); |
| | | return CommonResult.success(page); |
| | |
| | | return CommonResult.success(basePageDTO); |
| | | } |
| | | |
| | | @ApiOperation("用户修改角色") |
| | | @PutMapping(value = "/user_update_Role") |
| | | public CommonResult userUpdateRole(@RequestParam Long id, |
| | | @RequestParam List<Long> roles) { |
| | | umsAdminDepartService.userUpdateRoles(id, roles); |
| | | return CommonResult.success("update success"); |
| | | } |
| | | |
| | | @ApiOperation("用户修改部门") |
| | | @PutMapping(value = "/user_update_depart") |
| | | public CommonResult userUpdateDepart(@RequestParam Long id, |
| | | @RequestParam List<UmsDepartManage> departmentIds) { |
| | | umsAdminDepartService.userUpdateDepart(id, departmentIds); |
| | | return CommonResult.success("update success"); |
| | | } |
| | | |
| | | @ApiOperation("查询顶级部门") |
| | | @GetMapping(value = "/query_father") |
| | | public CommonResult search() { |
| | |
| | | @ApiOperation(value = "用户注册") |
| | | @RequestMapping(value = "/register", method = RequestMethod.POST) |
| | | @ResponseBody |
| | | @LogSave(operationType = "用户管理",contain = "添加用户") |
| | | @LogSave(operationType = "用户管理", contain = "添加用户") |
| | | public CommonResult<UmsAdmin> register(@Validated @RequestBody UmsAdminParam umsAdminParam) { |
| | | UmsAdmin umsAdmin = adminService.register(umsAdminParam); |
| | | if (umsAdmin == null) { |
| | |
| | | @ApiOperation("修改指定用户信息") |
| | | @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) |
| | | @ResponseBody |
| | | @LogSave(operationType = "用户管理",contain = "修改用户") |
| | | @LogSave(operationType = "用户管理", contain = "修改用户") |
| | | public CommonResult update(@PathVariable Long id, @RequestBody UmsAdmin admin) { |
| | | boolean success = adminService.update(id, admin); |
| | | if (success) { |
| | |
| | | @ApiOperation("修改指定用户密码") |
| | | @RequestMapping(value = "/updatePassword", method = RequestMethod.POST) |
| | | @ResponseBody |
| | | @LogSave(operationType = "用户管理",contain = "修改用户密码") |
| | | @LogSave(operationType = "用户管理", contain = "修改用户密码") |
| | | public CommonResult updatePassword(@Validated @RequestBody UpdateAdminPasswordParam updatePasswordParam) { |
| | | int status = adminService.updatePassword(updatePasswordParam); |
| | | if (status > 0) { |
| | |
| | | @ApiOperation("删除指定用户信息") |
| | | @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST) |
| | | @ResponseBody |
| | | @LogSave(operationType = "用户管理",contain = "删除用户") |
| | | @LogSave(operationType = "用户管理", contain = "删除用户") |
| | | public CommonResult delete(@PathVariable Long id) { |
| | | boolean success = adminService.delete(id); |
| | | if (success) { |
| | |
| | | @ApiOperation("修改帐号状态") |
| | | @RequestMapping(value = "/updateStatus/{id}", method = RequestMethod.POST) |
| | | @ResponseBody |
| | | @LogSave(operationType = "用户管理",contain = "用户账号启用/禁用") |
| | | @LogSave(operationType = "用户管理", contain = "用户账号启用/禁用") |
| | | public CommonResult updateStatus(@PathVariable Long id, @RequestParam(value = "status") Integer status) { |
| | | UmsAdmin umsAdmin = new UmsAdmin(); |
| | | umsAdmin.setStatus(status); |
| | |
| | | @ApiOperation("批量删除用户") |
| | | @RequestMapping(value = "/deleteBatch", method = RequestMethod.POST) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "ids", value = "用户Ids",required = true, dataType = "Array") |
| | | @ApiImplicitParam(name = "ids", value = "用户Ids", required = true, dataType = "Array") |
| | | }) |
| | | @ResponseBody |
| | | @LogSave(operationType = "用户管理",contain = "批量删除用户") |
| | | @LogSave(operationType = "用户管理", contain = "批量删除用户") |
| | | public CommonResult deleteBatch(@RequestParam("ids") List<Long> ids) { |
| | | boolean success = adminService.deleteBatch(ids); |
| | | if (success) { |
| | |
| | | @ApiOperation("批量修改用户状态") |
| | | @RequestMapping(value = "/updateStatusBatch", method = RequestMethod.POST) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "ids", value = "用户Ids",required = true, dataType = "Array"), |
| | | @ApiImplicitParam(name = "status", value = "状态0->禁用;1->启用",required = true, dataType = "Integer") |
| | | @ApiImplicitParam(name = "ids", value = "用户Ids", required = true, dataType = "Array"), |
| | | @ApiImplicitParam(name = "status", value = "状态0->禁用;1->启用", required = true, dataType = "Integer") |
| | | }) |
| | | @ResponseBody |
| | | @LogSave(operationType = "用户管理",contain = "用户账号批量启用/禁用") |
| | | @LogSave(operationType = "用户管理", contain = "用户账号批量启用/禁用") |
| | | public CommonResult updateStatusBatch(@RequestParam("ids") List<Long> ids, @RequestParam(value = "status") Integer status) { |
| | | boolean success = adminService.updateStatusBatch(ids, status); |
| | | if (success) { |
| | |
| | | return CommonResult.failed(); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("获取部门人员") |
| | | @RequestMapping(value = "/getDepartUser/{departId}", method = RequestMethod.GET) |
| | | @ResponseBody |
| | | public CommonResult<List<UmsAdmin>> getDepartUser(@PathVariable Long departId) { |
| | | return CommonResult.success(adminService.getDepartUser(departId)); |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | Page<UmsAdminLoginLog> umsAdminLoginLogPage = new Page<>(); |
| | | umsAdminLoginLogPage.setCurrent(logQueryParams.getCurrent()); |
| | | umsAdminLoginLogPage.setSize(logQueryParams.getSize()); |
| | | StringBuilder fileName = new StringBuilder(); |
| | | fileName.append(LocalDateTime.now().getYear()) |
| | | .append("-") |
| | | .append(LocalDateTime.now().getMonthValue()) |
| | | .append("-") |
| | | .append(LocalDateTime.now().getDayOfMonth()) |
| | | .append("日志数据"); |
| | | String fileName ="日志数据"; |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding("utf-8"); |
| | | String file = URLEncoder.encode(fileName.toString(), "UTF-8").replaceAll("\\+", "%20"); |
| | | response.setHeader("Content-disposition", "attachment;filename=" + file + ".xlsx"); |
| | | response.setHeader("Content-disposition", "attachment;filename=" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + URLEncoder.encode(fileName + ".xlsx", "utf-8")); |
| | | EasyExcel |
| | | .write(response.getOutputStream(), UmsAdminLogVO.class) |
| | | .sheet("数据") |
| | |
| | | import com.ycl.api.BaseEntity; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | |
| | | * @author lyq |
| | | * @since 2022-09-09 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @Data |
| | | @TableName("ums_depart_manager") |
| | | @ApiModel(value = "UmsDepartManager对象", description = "") |
| | | @ApiModel(value = "UmsDepartManager对象") |
| | | public class UmsDepartManage extends BaseEntity implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | |
| | | FILE_NOT_FOUND(2006, "文件不存在"), |
| | | FILE_TYPE_FAIL(2007, "文件格式错误"), |
| | | |
| | | CAR_NUMBER_REPETITION(2008, "车牌号重复"), |
| | | NOT_LOGGED(2015, "未登录,请登录后操作"), |
| | | |
| | | LOGIN_TIMEOUT(2016, "登录超时,请重新登录"), |
| | |
| | | package com.ycl.service.depart.impl; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.dto.user.AdminDepartDTO; |
| | | import com.ycl.entity.depart.UmsDepart; |
| | | import com.ycl.entity.dict.DataDictionary; |
| | | import com.ycl.entity.user.UmsDepartManage; |
| | | import com.ycl.enums.common.ResultCode; |
| | | import com.ycl.exception.ApiException; |
| | | import com.ycl.mapper.depart.UmsDepartMapper; |
| | |
| | | import com.ycl.service.depart.UmsDepartService; |
| | | import com.ycl.service.user.UmsAdminService; |
| | | import com.ycl.service.user.UmsDepartManageService; |
| | | import com.ycl.utils.common.PojoUtils; |
| | | import com.ycl.vo.depart.DepartVO; |
| | | import com.ycl.vo.depart.UmsDepartVO; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.time.LocalDateTime; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | umsDepartService.updateById(depart); |
| | | if (updateDepartVO.getDepartManagerList().size() > 0) { |
| | | iDepartManagerService.deleteByDepartId(depart.getId()); |
| | | |
| | | updateDepartVO.getDepartManagerList() |
| | | .forEach(item -> { |
| | | item.setCreateTime(LocalDateTime.now()); |
| | |
| | | UmsDepart sccgDepart = this.sccgDepartMapper.selectOne(queryWrapper); |
| | | return sccgDepart; |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | void deletedByDepartId(long departId); |
| | | |
| | | BasePageDTO belongDepart(long userId, int current, int pageSize); |
| | | |
| | | void userUpdateRoles(Long id, List<Long> roles); |
| | | |
| | | void userUpdateDepart(Long id, List<UmsDepartManage> roles); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.api.BasePageDTO; |
| | | import com.ycl.entity.depart.UmsDepart; |
| | | import com.ycl.entity.user.UmsAdmin; |
| | | import com.ycl.entity.user.UmsDepartManage; |
| | | import com.ycl.entity.user.*; |
| | | import com.ycl.mapper.user.AdminMenuRelationMapper; |
| | | import com.ycl.mapper.user.UmsAdminRoleRelationMapper; |
| | | import com.ycl.mapper.user.UmsDepartManageMapper; |
| | | import com.ycl.mapper.user.UmsRoleMenuRelationMapper; |
| | | import com.ycl.service.depart.UmsDepartService; |
| | | import com.ycl.service.user.UmsDepartManageService; |
| | | import com.ycl.service.user.UmsAdminService; |
| | | import com.ycl.service.user.UmsDepartManageService; |
| | | import com.ycl.vo.depart.DepartVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | private UmsDepartService sccgDepartService; |
| | | @Resource |
| | | private UmsAdminService umsAdminService; |
| | | @Resource |
| | | UmsAdminRoleRelationMapper umsAdminRoleRelationMapper; |
| | | @Resource |
| | | AdminMenuRelationMapper adminMenuRelationMapper; |
| | | @Resource |
| | | UmsRoleMenuRelationMapper roleMenuRelationMapper; |
| | | |
| | | @Override |
| | | public List<UmsDepartManage> queryByDepartId(Long departId) { |
| | |
| | | return basePageDTO; |
| | | } |
| | | |
| | | } |
| | | @Override |
| | | public void userUpdateRoles(Long id, List<Long> roles) { |
| | | //解除用户角色绑定 |
| | | umsAdminRoleRelationMapper.delete(new LambdaQueryWrapper<UmsAdminRoleRelation>().eq(UmsAdminRoleRelation::getAdminId, id)); |
| | | //解除用户绑定角色绑定菜单 |
| | | adminMenuRelationMapper.delete(new LambdaQueryWrapper<AdminMenuRelation>().eq(AdminMenuRelation::getAdminId, id)); |
| | | //绑定角色于用户 |
| | | if (!roles.isEmpty()) { |
| | | for (Long role : roles) { |
| | | UmsAdminRoleRelation urr = new UmsAdminRoleRelation(); |
| | | urr.setAdminId(id); |
| | | urr.setRoleId(role); |
| | | umsAdminRoleRelationMapper.insert(urr); |
| | | } |
| | | } |
| | | //绑定菜单于用户 |
| | | ArrayList<UmsRoleMenuRelation> umsRoleMenuRelations = new ArrayList<>(); |
| | | for (Long role : roles) { |
| | | umsRoleMenuRelations.addAll(roleMenuRelationMapper |
| | | .selectList(new LambdaQueryWrapper<UmsRoleMenuRelation>() |
| | | .eq(UmsRoleMenuRelation::getRoleId, role))); |
| | | } |
| | | umsRoleMenuRelations |
| | | .stream() |
| | | .map(item->item.getMenuId()) |
| | | .collect(Collectors.toList()) |
| | | .stream() |
| | | .distinct() |
| | | .collect(Collectors.toList()) |
| | | .stream() |
| | | .forEach(item -> { |
| | | AdminMenuRelation adminMenuRelation = new AdminMenuRelation(); |
| | | adminMenuRelation.setAdminId(id); |
| | | adminMenuRelation.setMenuId(item); |
| | | adminMenuRelationMapper.insert(adminMenuRelation); |
| | | }); |
| | | } |
| | | |
| | | @Override |
| | | public void userUpdateDepart(Long id, List<UmsDepartManage> departIds) { |
| | | umsDepartManageMapper.delete(new LambdaQueryWrapper<UmsDepartManage>().eq(UmsDepartManage::getUserId,id)); |
| | | departIds |
| | | .stream() |
| | | .forEach(item->{ |
| | | UmsDepartManage umsDepartManage = new UmsDepartManage(); |
| | | umsDepartManage.setDepartId(item.getDepartId()); |
| | | umsDepartManage.setUserId(id); |
| | | umsDepartManage.setIsLeader(item.getIsLeader()); |
| | | umsDepartManage.setCreateTime(new Date()); |
| | | umsDepartManageMapper.insert(umsDepartManage); |
| | | }); |
| | | } |
| | | } |
| | |
| | | import com.ycl.controller.BaseController; |
| | | import com.ycl.entity.carManage.CarEnforcecar; |
| | | import com.ycl.entity.carManage.CarSlagcar; |
| | | import com.ycl.enums.common.ResultCode; |
| | | import com.ycl.exception.ApiException; |
| | | import com.ycl.service.carManage.ICarEnforcecarService; |
| | | import com.ycl.service.carManage.ICarSlagcarService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | |
| | | @ApiOperation("添加执法车") |
| | | @PostMapping("/addition_enforce") |
| | | @LogSave(operationType = "车俩管理",contain = "添加执法车") |
| | | @LogSave(operationType = "车俩管理", contain = "添加执法车") |
| | | public CommonResult addEnforceCar(@RequestBody CarEnforcecar carEnforcecar) { |
| | | CarEnforcecar enforceCar = iCarEnforcecarService |
| | | .getOne(new LambdaQueryWrapper<CarEnforcecar>() |
| | | .eq(CarEnforcecar::getCarNumber, carEnforcecar.getCarNumber())); |
| | | if (StringUtils.isNotBlank(enforceCar.getCarNumber())) { |
| | | throw new ApiException(ResultCode.CAR_NUMBER_REPETITION.getMessage()); |
| | | } |
| | | return CommonResult.success(iCarEnforcecarService.save(carEnforcecar)); |
| | | } |
| | | |
| | | @ApiOperation("添加渣土车") |
| | | @PostMapping("/addition_slag") |
| | | @LogSave(operationType = "车俩管理",contain = "添加渣土车") |
| | | @LogSave(operationType = "车俩管理", contain = "添加渣土车") |
| | | public CommonResult addSlagCar(@RequestBody CarSlagcar carSlagcar) { |
| | | CarSlagcar slagCar = iCarSlagcarService |
| | | .getOne(new LambdaQueryWrapper<CarSlagcar>() |
| | | .eq(CarSlagcar::getCarNumber, carSlagcar.getCarNumber())); |
| | | if (StringUtils.isNotBlank(slagCar.getCarNumber())) { |
| | | throw new ApiException(ResultCode.CAR_NUMBER_REPETITION.getMessage()); |
| | | } |
| | | return CommonResult.success(iCarSlagcarService.save(carSlagcar)); |
| | | } |
| | | |
| | | @ApiOperation("删除执法车") |
| | | @DeleteMapping("/deletion_enforce") |
| | | @LogSave(operationType = "车俩管理",contain = "删除执法车") |
| | | @LogSave(operationType = "车俩管理", contain = "删除执法车") |
| | | public CommonResult deleteEnforceCar(@RequestParam Integer id) { |
| | | return CommonResult.success(iCarEnforcecarService.removeById(id)); |
| | | } |
| | | |
| | | @ApiOperation("删除渣土车") |
| | | @DeleteMapping("/deletion_slag") |
| | | @LogSave(operationType = "车俩管理",contain = "删除渣土车") |
| | | @LogSave(operationType = "车俩管理", contain = "删除渣土车") |
| | | public CommonResult deleteSlagCar(@RequestParam Integer id) { |
| | | return CommonResult.success(iCarSlagcarService.removeById(id)); |
| | | } |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | Page<EquipmentBayonet> equipmentBayonetPage = new Page<>(); |
| | | equipmentBayonetPage.setCurrent(current); |
| | | equipmentBayonetPage.setSize(size); |
| | | StringBuilder fileName = new StringBuilder(); |
| | | fileName.append(LocalDateTime.now().getYear()) |
| | | .append("-") |
| | | .append(LocalDateTime.now().getMonthValue()) |
| | | .append("-") |
| | | .append(LocalDateTime.now().getDayOfMonth()) |
| | | .append("卡口数据"); |
| | | String fileName ="卡口数据"; |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding("utf-8"); |
| | | String file = URLEncoder.encode(fileName.toString(), "UTF-8").replaceAll("\\+", "%20"); |
| | | response.setHeader("Content-disposition", "attachment;filename=" + file + ".xlsx"); |
| | | response.setHeader("Content-disposition", "attachment;filename=" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + URLEncoder.encode(fileName + ".xlsx", "utf-8")); |
| | | EasyExcel.write(response.getOutputStream(), EquipmentBayonetVO.class) |
| | | .sheet("数据") |
| | | .doWrite(iEquipmentBayonetService |
| | |
| | | private String constructionOrg; |
| | | |
| | | |
| | | } |
| | | /** |
| | | * 电话 |
| | | */ |
| | | @TableField("phone") |
| | | private String phone; |
| | | |
| | | |
| | | /** |
| | | * 车主姓名 |
| | | */ |
| | | @TableField("car_owner") |
| | | private String carOwner; |
| | | |
| | | /** |
| | | * 车俩使用人员 |
| | | */ |
| | | @TableField("car_user") |
| | | private String carUser; |
| | | } |
| | |
| | | package com.ycl.mapper.caseHandler; |
| | | |
| | | import com.ycl.entity.caseHandler.DisposeRecord; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ycl.entity.caseHandler.DisposeRecord; |
| | | import com.ycl.vo.MyBacklogVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface DisposeRecordMapper extends BaseMapper<DisposeRecord> { |
| | | |
| | | List<MyBacklogVO> selectMyBackList(@Param("id") Long id, @Param("code") String code); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public List<MyBacklogVO> listMyTask(String num, Long userId) { |
| | | ArrayList<MyBacklogVO> myBacklogVOS = new ArrayList<>(); |
| | | umsAdminRoleRelationMapper |
| | | .selectList(new LambdaQueryWrapper<UmsAdminRoleRelation>() |
| | | .eq(UmsAdminRoleRelation::getAdminId, userId)) |
| | | .forEach(item1 -> |
| | | myBacklogVOS.addAll(disposeRecordMapper.selectList( |
| | | new LambdaQueryWrapper<DisposeRecord>() |
| | | .eq(DisposeRecord::getHandlerRoleId, item1.getRoleId()) |
| | | .isNull(DisposeRecord::getEndTime)) |
| | | .stream() |
| | | .filter(item -> { |
| | | if (StringUtils.isBlank(num)) { |
| | | return true; |
| | | } else { |
| | | BaseCase baseCase = baseCaseMapper.selectById(item.getBaseCaseId()); |
| | | if (baseCase.getCode().contains(num)) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | } |
| | | }) |
| | | .map(item -> { |
| | | MyBacklogVO myBacklogVO = new MyBacklogVO(); |
| | | BeanUtils.copyProperties(item, myBacklogVO); |
| | | BaseCase baseCase = baseCaseMapper.selectById(item.getBaseCaseId()); |
| | | myBacklogVO.setCategory(baseCase.getCategory()); |
| | | myBacklogVO.setEventSource(baseCase.getEventSource()); |
| | | myBacklogVO.setCode(baseCase.getCode()); |
| | | return myBacklogVO; |
| | | }).collect(Collectors.toList())) |
| | | ); |
| | | return myBacklogVOS; |
| | | return disposeRecordMapper.selectMyBackList(userId,num); |
| | | } |
| | | |
| | | @Override |
| | |
| | | <sql id="Base_Column_List"> |
| | | id, base_case_id, step_name, start_time, handler_role_id, end_time, state, handler_id, create_user, create_time |
| | | </sql> |
| | | |
| | | <select id="selectMyBackList" resultType="com.ycl.vo.MyBacklogVO"> |
| | | SELECT |
| | | t3.event_source, |
| | | t3.category, |
| | | t2.step_name, |
| | | t3.`code`, |
| | | t2.create_time |
| | | FROM |
| | | ums_admin_role_relation t1 |
| | | JOIN ums_dispose_record t2 ON t1.role_id = t2.handler_role_id |
| | | JOIN ums_base_case t3 ON t2.base_case_id=t3.id |
| | | <where> |
| | | t1.admin_id = #{id} |
| | | AND ISNULL( t2.end_time ) |
| | | <if test="code!='' and code!=null"> |
| | | and t3.`code` LIKE CONCAT('%',#{code},'%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.Map; |
| | | |
| | | @SpringBootTest |
| | |
| | | |
| | | @Test |
| | | void createCode() { |
| | | System.out.println(utilNumber.createShopCode()); |
| | | System.out.println(utilNumber.createCaseCode()); |
| | | // LocalDateTime parse = LocalDateTime.parse("2017-02-02 08:59:12", DateTimeFormatter.ofPattern("yyyy-MM-dd hh:mm:ss")); |
| | | LocalDateTime ldt = LocalDateTime.parse("2017-02-02 08:44:12", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
| | | System.out.println(ldt); |
| | | |
| | | } |
| | | |
| | | @Test |