Merge branch 'master' of http://42.193.1.25:9521/r/sccg_server
| | |
| | | }else { |
| | | loginLog.setUserAgent("Web端"); |
| | | } |
| | | loginLog.setOperationType(annotation.operationType()); |
| | | if (annotation.operationType().equals("")){ |
| | | loginLog.setOperationType("其他操作"); |
| | | }else { |
| | | loginLog.setOperationType(annotation.operationType()); |
| | | } |
| | | loginLog.setContain(annotation.contain()); |
| | | umsAdminLoginLogMapper.insert(loginLog); |
| | | } |
| | |
| | | .eq(StringUtils.isNotBlank(logQueryParams.getPortEquipment()), UmsAdminLoginLog::getUserAgent, logQueryParams.getPortEquipment()) |
| | | .eq(logQueryParams.getId() != null, UmsAdminLoginLog::getAdminId, logQueryParams.getId()) |
| | | .between(logQueryParams.getStartTime() != null && logQueryParams.getEndTime() != null, UmsAdminLoginLog::getCreateTime, logQueryParams.getStartTime(), logQueryParams.getEndTime()) |
| | | .orderBy(logQueryParams.getSort() == 0, true, UmsAdminLoginLog::getCreateTime) |
| | | .orderBy(logQueryParams.getSort() == 1, false, UmsAdminLoginLog::getCreateTime)); |
| | | .orderBy(logQueryParams.getSort()!=null&&logQueryParams.getSort() == 0, true, UmsAdminLoginLog::getCreateTime) |
| | | .orderBy(logQueryParams.getSort()!=null&&logQueryParams.getSort() == 1, false, UmsAdminLoginLog::getCreateTime)); |
| | | List<UmsAdminLogVO> umsAdminLogVOList = page.getRecords().stream() |
| | | .map(item -> { |
| | | UmsAdminLogVO umsAdminlogVO = new UmsAdminLogVO(); |
| | |
| | | .like(StringUtils.isNotBlank(logQueryParams.getContent()), UmsAdminLoginLog::getContain, logQueryParams.getContent()) |
| | | .eq(StringUtils.isNotBlank(logQueryParams.getOperationType()), UmsAdminLoginLog::getOperationType, logQueryParams.getOperationType()) |
| | | .between(logQueryParams.getStartTime() != null && logQueryParams.getEndTime() != null, UmsAdminLoginLog::getCreateTime, logQueryParams.getStartTime(), logQueryParams.getEndTime()) |
| | | .orderBy(logQueryParams.getSort() == 0, true, UmsAdminLoginLog::getCreateTime) |
| | | .orderBy(logQueryParams.getSort() == 1, false, UmsAdminLoginLog::getCreateTime)) |
| | | .orderBy(logQueryParams.getSort()!=null&&logQueryParams.getSort() == 0, true, UmsAdminLoginLog::getCreateTime) |
| | | .orderBy(logQueryParams.getSort()!=null&&logQueryParams.getSort() == 1, false, UmsAdminLoginLog::getCreateTime)) |
| | | .getRecords() |
| | | .stream() |
| | | .map(item -> { |
New file |
| | |
| | | package com.ycl.common.constant; |
| | | |
| | | /** |
| | | * <p> |
| | | * 审核结果 |
| | | * </p> |
| | | * |
| | | * @author mg |
| | | * @since 2022-10-17 |
| | | */ |
| | | public enum CheckResult { |
| | | |
| | | PASS("01", "通过"), |
| | | REJECT("02", "驳回"); |
| | | |
| | | |
| | | private String code; |
| | | private String name; |
| | | |
| | | CheckResult(String code, String name) { |
| | | this.code = code; |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | } |
| | |
| | | package com.ycl.controller.epuipment; |
| | | |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ycl.annotation.LogSave; |
| | | import com.ycl.api.CommonResult; |
| | | import com.ycl.controller.BaseController; |
| | | import com.ycl.entity.video.VideoPoint; |
| | | import com.ycl.entity.dict.DataDictionary; |
| | | import com.ycl.entity.equipment.EquipmentBayonet; |
| | | import com.ycl.service.dict.IDataDictionaryService; |
| | | import com.ycl.service.equipment.IEquipmentBayonetService; |
| | | import com.ycl.vo.equipment.EquipmentBayonetVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.SneakyThrows; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDateTime; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/equipment_bayonet") |
| | | @Api(tags = "卡口管理") |
| | | public class EquipmentBayonetController extends BaseController { |
| | | |
| | | @Autowired |
| | | IEquipmentBayonetService iEquipmentBayonetService; |
| | | @Autowired |
| | | IDataDictionaryService iDataDictionaryService; |
| | | |
| | | @GetMapping("/query") |
| | | @ApiOperation("查询") |
| | | @LogSave |
| | | public CommonResult search(@RequestParam(required = false) Integer size, |
| | | @RequestParam(required = false) Integer current, |
| | | @RequestParam(required = false) String bayonetName) { |
| | | Page<EquipmentBayonet> equipmentBayonetPage = new Page<>(); |
| | | equipmentBayonetPage.setCurrent(current); |
| | | equipmentBayonetPage.setSize(size); |
| | | return CommonResult.success(iEquipmentBayonetService |
| | | .page(equipmentBayonetPage, new LambdaQueryWrapper<EquipmentBayonet>() |
| | | .like(StringUtils.isNotBlank(bayonetName), EquipmentBayonet::getBayonetName, bayonetName)) |
| | | .getRecords() |
| | | .stream() |
| | | .map(item -> { |
| | | EquipmentBayonetVO equipmentBayonetVO = new EquipmentBayonetVO(); |
| | | BeanUtils.copyProperties(item, equipmentBayonetVO); |
| | | equipmentBayonetVO.setFrontEndType(iDataDictionaryService.getOne(new LambdaQueryWrapper<DataDictionary>().eq(DataDictionary::getId, item.getFrontEndType())).getName()); |
| | | equipmentBayonetVO.setInOutCityType(iDataDictionaryService.getOne(new LambdaQueryWrapper<DataDictionary>().eq(DataDictionary::getId, item.getInOutCityType())).getName()); |
| | | return equipmentBayonetVO; |
| | | }).collect(Collectors.toList())); |
| | | } |
| | | |
| | | @PostMapping("/addition") |
| | | @ApiOperation("添加") |
| | | @LogSave(operationType = "卡口管理",contain = "添加卡口") |
| | | public CommonResult add(@RequestBody EquipmentBayonet equipmentBayonet) { |
| | | return CommonResult.success(iEquipmentBayonetService.save(equipmentBayonet)); |
| | | } |
| | | |
| | | @PutMapping("/modification") |
| | | @ApiOperation("修改") |
| | | @LogSave(operationType = "卡口管理",contain = "修改卡口") |
| | | public CommonResult modify(@RequestBody EquipmentBayonet equipmentBayonet) { |
| | | return CommonResult.success(iEquipmentBayonetService.updateById(equipmentBayonet)); |
| | | } |
| | | |
| | | @GetMapping("/export") |
| | | @ApiOperation("导出") |
| | | @SneakyThrows |
| | | @LogSave(operationType = "卡口管理",contain = "删除卡口") |
| | | public void export(HttpServletResponse response, |
| | | @RequestParam(required = false) Integer size, |
| | | @RequestParam(required = false) Integer current, |
| | | @RequestParam(required = false) String bayonetName) { |
| | | 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("卡口数据"); |
| | | 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"); |
| | | EasyExcel.write(response.getOutputStream(), EquipmentBayonetVO.class) |
| | | .sheet("数据") |
| | | .doWrite(iEquipmentBayonetService |
| | | .page(equipmentBayonetPage, new LambdaQueryWrapper<EquipmentBayonet>() |
| | | .like(StringUtils.isNotBlank(bayonetName), EquipmentBayonet::getBayonetName, bayonetName)) |
| | | .getRecords() |
| | | .stream() |
| | | .map(item -> { |
| | | EquipmentBayonetVO equipmentBayonetVO = new EquipmentBayonetVO(); |
| | | BeanUtils.copyProperties(item, equipmentBayonetVO); |
| | | equipmentBayonetVO.setFrontEndType(iDataDictionaryService.getOne(new LambdaQueryWrapper<DataDictionary>().eq(DataDictionary::getId, item.getFrontEndType())).getName()); |
| | | equipmentBayonetVO.setInOutCityType(iDataDictionaryService.getOne(new LambdaQueryWrapper<DataDictionary>().eq(DataDictionary::getId, item.getInOutCityType())).getName()); |
| | | return equipmentBayonetVO; |
| | | }).collect(Collectors.toList())); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.ycl.controller.region; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ycl.api.CommonResult; |
| | | import com.ycl.controller.BaseController; |
| | | import com.ycl.entity.region.SccgRegion; |
| | | import com.ycl.service.region.ISccgRegionService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | |
| | | List<SccgRegion> treeList = iSccgRegionService.getTree(); |
| | | return CommonResult.success(treeList); |
| | | } |
| | | |
| | | @ApiOperation(value = "添加行政区域") |
| | | @RequestMapping(value = "/addRegion", method = RequestMethod.POST) |
| | | @ResponseBody |
| | | public CommonResult addRegion(@Validated @RequestBody SccgRegion sccgRegion) { |
| | | return CommonResult.success(iSccgRegionService.save(sccgRegion)); |
| | | } |
| | | @ApiOperation(value = "获取行政区域分页查询") |
| | | @RequestMapping(value = "/list", method = RequestMethod.POST) |
| | | @ResponseBody |
| | | public CommonResult<IPage<SccgRegion>> list(@Validated @RequestBody SccgRegion sccgRegion) { |
| | | return CommonResult.success(iSccgRegionService.list(sccgRegion)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("获取指定行政区域") |
| | | @RequestMapping(value = "/getRegion/{id}", method = RequestMethod.GET) |
| | | @ResponseBody |
| | | public CommonResult<SccgRegion> getMessage(@PathVariable Long id) { |
| | | SccgRegion sccgRegion = iSccgRegionService.getById(id); |
| | | return CommonResult.success(sccgRegion); |
| | | } |
| | | |
| | | @ApiOperation("修改指定行政区域") |
| | | @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) |
| | | @ResponseBody |
| | | public CommonResult update(@PathVariable Long id, @RequestBody SccgRegion sccgRegion) { |
| | | sccgRegion.setId(id); |
| | | boolean success = iSccgRegionService.updateById(sccgRegion); |
| | | if (success) { |
| | | return CommonResult.success(null); |
| | | } |
| | | return CommonResult.failed(); |
| | | } |
| | | |
| | | @ApiOperation("批量删除行政区域") |
| | | @RequestMapping(value = "/delete", method = RequestMethod.POST) |
| | | @ResponseBody |
| | | public CommonResult delete(@RequestParam("ids") List<Long> ids) { |
| | | boolean success = iSccgRegionService.removeBatchByIds(ids); |
| | | if (success) { |
| | | return CommonResult.success(null); |
| | | } |
| | | return CommonResult.failed(); |
| | | } |
| | | } |
| | |
| | | */ |
| | | @ApiModelProperty(value = "创建人") |
| | | private Long createUser; |
| | | /** |
| | | * 是否扫描0-未扫描1-已扫描 |
| | | */ |
| | | @ApiModelProperty(value = "是否扫描0-未扫描1-已扫描") |
| | | private Integer isScan; |
| | | } |
| | |
| | | package com.ycl.entity.equipment; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | |
| | | * 卡口名称 |
| | | */ |
| | | @TableField("bayonet_name") |
| | | @ExcelProperty(index = 1, value = "卡口名称") |
| | | private String bayonetName; |
| | | |
| | | /** |
| | | * 卡口经度 |
| | | */ |
| | | @TableField("longitude") |
| | | @ExcelProperty(index = 1, value = "卡口名称") |
| | | private BigDecimal longitude; |
| | | |
| | | /** |
| | | * 卡口纬度 |
| | | */ |
| | | @TableField("latitude") |
| | | @ExcelProperty(index = 1, value = "卡口名称") |
| | | private BigDecimal latitude; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @TableField("description") |
| | | private String description; |
| | | |
| | | /** |
| | | * 前端类型 |
| | | */ |
| | | @TableField("front_end_type") |
| | | private Integer frontEndType; |
| | | |
| | | /** |
| | | * 出入城类型 |
| | | */ |
| | | @TableField("in_out_city_type") |
| | | private Integer inOutCityType; |
| | | } |
| | |
| | | @ApiModelProperty(value = "状态0-未发布1-已发布") |
| | | private Integer status; |
| | | /** |
| | | * 是否扫描0-未扫描1-已扫描 |
| | | */ |
| | | @TableField("is_scan") |
| | | @ApiModelProperty(value = "是否扫描0-未扫描1-已扫描") |
| | | private Integer isScan; |
| | | |
| | | /** |
| | | * 是否查看0-未查看1-已查看 |
| | | */ |
| | | @TableField("is_view") |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | |
| | | * 地域名 |
| | | */ |
| | | @TableField("region_name") |
| | | @ApiModelProperty(value = "地域名") |
| | | private String regionName; |
| | | |
| | | /** |
| | | * 默认0 |
| | | */ |
| | | @TableField("parent_id") |
| | | @ApiModelProperty(value = "默认0") |
| | | private Long parentId; |
| | | |
| | | /** |
| | | * 类型1-街道2-社区3-乡4-镇 |
| | | */ |
| | | @TableField("type") |
| | | @ApiModelProperty(value = "类型0-市1-县2-街道3-社区4-乡5-镇") |
| | | private Integer type; |
| | | |
| | | @TableField(exist = false) |
| | | private List<SccgRegion> children; |
| | | } |
New file |
| | |
| | | package com.ycl.scheduling; |
| | | |
| | | import com.ycl.service.message.MessageScheduleService; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.scheduling.annotation.EnableScheduling; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | |
| | | @Configuration |
| | | @EnableScheduling |
| | | public class SchedulingConfiguration { |
| | | |
| | | private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | |
| | | // |
| | | //其中每个元素可以是一个值(如6),一个连续区间(9-12),一个间隔时间(8-18/4)(/表示每隔4小时),一个列表(1,3,5),通配符。由于"月份中的日期"和"星期中的日期"这两个元素互斥的,必须要对其中一个设置?. |
| | | //0 0 10,14,16 * * ? 每天上午10点,下午2点,4点 |
| | | //0 0/30 9-17 * * ? 朝九晚五工作时间内每半小时 |
| | | //0 0 12 ? * WED 表示每个星期三中午12点 |
| | | //"0 0 12 * * ?" 每天中午12点触发 |
| | | //"0 15 10 ? * *" 每天上午10:15触发 |
| | | //"0 15 10 * * ?" 每天上午10:15触发 |
| | | //"0 15 10 * * ? *" 每天上午10:15触发 |
| | | //"0 15 10 * * ? 2005" 2005年的每天上午10:15触发 |
| | | //"0 * 14 * * ?" 在每天下午2点到下午2:59期间的每1分钟触发 |
| | | //"0 0/5 14 * * ?" 在每天下午2点到下午2:55期间的每5分钟触发 |
| | | //"0 0/5 14,18 * * ?" 在每天下午2点到2:55期间和下午6点到6:55期间的每5分钟触发 |
| | | //"0 0-5 14 * * ?" 在每天下午2点到下午2:05期间的每1分钟触发 |
| | | //"0 10,44 14 ? 3 WED" 每年三月的星期三的下午2:10和2:44触发 |
| | | //"0 15 10 ? * MON-FRI" 周一至周五的上午10:15触发 |
| | | //"0 15 10 15 * ?" 每月15日上午10:15触发 |
| | | //"0 15 10 L * ?" 每月最后一日的上午10:15触发 |
| | | //"0 15 10 ? * 6L" 每月的最后一个星期五上午10:15触发 |
| | | //"0 15 10 ? * 6L 2002-2005" 2002年至2005年的每月的最后一个星期五上午10:15触发 |
| | | //"0 15 10 ? * 6#3" 每月的第三个星期五上午10:15触发 |
| | | //有些子表达式能包含一些范围或列表 |
| | | //例如:子表达式(天(星期))可以为 “MON-FRI”,“MON,WED,FRI”,“MON-WED,SAT” |
| | | //“*”字符代表所有可能的值 |
| | | //因此,“*”在子表达式(月)里表示每个月的含义,“*”在子表达式(天(星期))表示星期的每一天 |
| | | // |
| | | //“/”字符用来指定数值的增量 |
| | | //例如:在子表达式(分钟)里的“0/15”表示从第0分钟开始,每15分钟 |
| | | // 在子表达式(分钟)里的“3/20”表示从第3分钟开始,每20分钟(它和“3,23,43”)的含义一样 |
| | | // |
| | | //“?”字符仅被用于天(月)和天(星期)两个子表达式,表示不指定值 |
| | | //当2个子表达式其中之一被指定了值以后,为了避免冲突,需要将另一个子表达式的值设为“?” |
| | | // |
| | | //“L” 字符仅被用于天(月)和天(星期)两个子表达式,它是单词“last”的缩写 |
| | | //但是它在两个子表达式里的含义是不同的。 |
| | | //在天(月)子表达式中,“L”表示一个月的最后一天 |
| | | //在天(星期)自表达式中,“L”表示一个星期的最后一天,也就是SAT |
| | | //如果在“L”前有具体的内容,它就具有其他的含义了 |
| | | //例如:“6L”表示这个月的倒数第6天,“FRIL”表示这个月的最一个星期五 |
| | | //注意:在使用“L”参数时,不要指定列表或范围,因为这会导致问题 |
| | | // |
| | | // |
| | | //字段 允许值 允许的特殊字符 |
| | | //秒 0-59 , - * / |
| | | //分 0-59 , - * / |
| | | //小时 0-23 , - * / |
| | | //日期 1-31 , - * ? / L W C |
| | | //月份 1-12 或者 JAN-DEC , - * / |
| | | //星期 1-7 或者 SUN-SAT , - * ? / L C # |
| | | //年(可选) 留空, 1970-2099 , - |
| | | |
| | | //按顺序依次为 |
| | | //秒(0~59) |
| | | //分钟(0~59) |
| | | //小时(0~23) |
| | | //天(月)(0~31,但是你需要考虑你月的天数) |
| | | //月(0~11) |
| | | //天(星期)(1~7 1=SUN 或 SUN,MON,TUE,WED,THU,FRI,SAT) |
| | | //7.年份(1970-2099) |
| | | @Autowired |
| | | private MessageScheduleService messageScheduleService; |
| | | |
| | | @Scheduled(cron = "0/50 * * * * ?") // 每50秒执行一次 |
| | | public void scheduler() { |
| | | //定时扫描发送短信 |
| | | messageScheduleService.sendSmsSchedule(); |
| | | } |
| | | } |
| | | |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.common.constant.BaseCaseStatus; |
| | | import com.ycl.common.constant.CheckResult; |
| | | import com.ycl.common.constant.StepName; |
| | | import com.ycl.dto.caseHandler.ChechParam; |
| | | import com.ycl.entity.caseHandler.BaseCase; |
| | |
| | | |
| | | @Override |
| | | public Boolean check(ChechParam chechParam) { |
| | | //修改案件状态为审核 |
| | | BaseCase baseCase = new BaseCase(); |
| | | baseCase.setId(chechParam.getBaseCaseId()); |
| | | baseCase.setState(BaseCaseStatus.CHECK); |
| | | baseCase.setAuditOpinion(chechParam.getCheckOpinion()); |
| | | baseCaseMapper.updateById(baseCase); |
| | | |
| | | |
| | | QueryWrapper<WorkflowConfigStep> stepQurey = new QueryWrapper<>(); |
| | | stepQurey.eq("name", StepName.CHECK.getName()); |
| | | WorkflowConfigStep workflowConfigStep = workflowConfigStepMapper.selectOne(stepQurey); |
| | | //修改案件状态为审核 |
| | | BaseCase baseCase = new BaseCase(); |
| | | baseCase.setId(chechParam.getBaseCaseId()); |
| | | baseCase.setAuditOpinion(chechParam.getCheckOpinion()); |
| | | //修改核查记录 |
| | | DisposeRecord disposeRecord = new DisposeRecord(); |
| | | //驳回处理 |
| | | if (CheckResult.REJECT.getName().equals(chechParam.getResult())) { |
| | | QueryWrapper<WorkflowConfigStep> lastNextqurey = new QueryWrapper<>(); |
| | | lastNextqurey.eq("workflow_config_id", workflowConfigStep.getWorkflowConfigId()); |
| | | lastNextqurey.eq("seq", workflowConfigStep.getSeq()-1); |
| | | WorkflowConfigStep lastStep = workflowConfigStepMapper.selectOne(lastNextqurey); |
| | | //删除上一步数据 |
| | | UpdateWrapper<DisposeRecord> deleteWrapper = new UpdateWrapper<>(); |
| | | deleteWrapper.eq("base_case_id", chechParam.getBaseCaseId()).eq("workflow_config_step_id",lastStep.getId()); |
| | | disposeRecordMapper.delete(deleteWrapper); |
| | | //修改状态为上上一步状态 |
| | | QueryWrapper<WorkflowConfigStep> lastLastNextqurey = new QueryWrapper<>(); |
| | | lastLastNextqurey.eq("workflow_config_id", workflowConfigStep.getWorkflowConfigId()); |
| | | lastLastNextqurey.eq("seq", workflowConfigStep.getSeq()-2); |
| | | WorkflowConfigStep lastLastStep = workflowConfigStepMapper.selectOne(lastLastNextqurey); |
| | | |
| | | UpdateWrapper<DisposeRecord> updateWrapper = new UpdateWrapper<>(); |
| | | updateWrapper.eq("base_case_id", chechParam.getBaseCaseId()).eq("workflow_config_step_id",lastLastStep.getId()); |
| | | |
| | | disposeRecord.setHandlerId(chechParam.getCurrentUser()); |
| | | //核查已结束 |
| | | disposeRecord.setState(0); |
| | | disposeRecord.setEndTime(LocalDateTime.now()); |
| | | disposeRecordMapper.update(disposeRecord, updateWrapper); |
| | | //调度 |
| | | baseCase.setState(BaseCaseStatus.DISPATCH); |
| | | baseCaseMapper.updateById(baseCase); |
| | | return true; |
| | | } |
| | | //核查 |
| | | baseCase.setState(BaseCaseStatus.CHECK); |
| | | baseCaseMapper.updateById(baseCase); |
| | | |
| | | |
| | | if (workflowConfigStep == null) { |
| | | throw new ApiException("未查询到该流程环节"); |
| | |
| | | UpdateWrapper<DisposeRecord> updateWrapper = new UpdateWrapper<>(); |
| | | updateWrapper.eq("base_case_id", baseCase.getId()).eq("workflow_config_step_id",workflowConfigStep.getId()); |
| | | |
| | | //修改核查记录 |
| | | DisposeRecord disposeRecord = new DisposeRecord(); |
| | | disposeRecord.setHandlerId(chechParam.getCurrentUser()); |
| | | //核查已结束 |
| | | disposeRecord.setState(1); |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ycl.entity.equipment.EquipmentBayonet; |
| | | import com.ycl.vo.equipment.EquipmentBayonetVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2022-10-14 |
| | | */ |
| | | public interface IEquipmentBayonetService extends IService<EquipmentBayonet> { |
| | | |
| | | } |
| | |
| | | package com.ycl.service.equipment.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.entity.dict.DataDictionary; |
| | | import com.ycl.entity.equipment.EquipmentBayonet; |
| | | import com.ycl.mapper.equipment.EquipmentBayonetMapper; |
| | | import com.ycl.service.equipment.IEquipmentBayonetService; |
| | | import com.ycl.vo.equipment.EquipmentBayonetVO; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Service |
| | | public class EquipmentBayonetServiceImpl extends ServiceImpl<EquipmentBayonetMapper, EquipmentBayonet> implements IEquipmentBayonetService { |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.service.message; |
| | | |
| | | /** |
| | | * <p> |
| | | * 类说明 |
| | | * </p> |
| | | * |
| | | * @author mg |
| | | * @since 2022-10-17 |
| | | */ |
| | | public interface MessageScheduleService { |
| | | void sendSmsSchedule(); |
| | | } |
| | |
| | | //生成8位随机数消息编码 |
| | | messageAdd.setMessageNumber(messageNumber); |
| | | //发送时间 |
| | | messageAdd.setSendTime(new Date()); |
| | | if (messageAdd.getSendTime() == null) { |
| | | messageAdd.setSendTime(new Date()); |
| | | } |
| | | //生成默认参数 |
| | | messageAdd.setCreateTime(new Date()); |
| | | messageAdd.setUpdateTime(new Date()); |
| | |
| | | messageAdd.setUpdateUser(messageParam.getCreateUser()); |
| | | messageAdd.setIsView(0); |
| | | messageAdd.setVersion(0); |
| | | messageAdd.setIsScan(1); |
| | | messages.add(messageAdd); |
| | | } |
| | | BeanUtils.copyProperties(messageParam, message); |
New file |
| | |
| | | package com.ycl.service.message.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.ycl.entity.message.Message; |
| | | import com.ycl.mapper.message.MessageMapper; |
| | | import com.ycl.service.message.MessageScheduleService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 类说明 |
| | | * </p> |
| | | * |
| | | * @author mg |
| | | * @since 2022-10-17 |
| | | */ |
| | | @Service |
| | | public class MessageScheduleServiceImpl implements MessageScheduleService { |
| | | |
| | | |
| | | @Resource |
| | | MessageMapper messageMapper; |
| | | |
| | | @Override |
| | | public void sendSmsSchedule() { |
| | | QueryWrapper<Message> wrapper = new QueryWrapper<>(); |
| | | wrapper.lambda().eq(Message::getIsScan, 0).le(Message::getSendTime,new Date()); |
| | | List<Message> messages = messageMapper.selectList(wrapper); |
| | | System.out.println("--------------------开始扫描短信信息-------------------大小为"+messages.size()); |
| | | } |
| | | } |
| | |
| | | package com.ycl.service.region; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ycl.entity.region.SccgRegion; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | List<SccgRegion> getTree(); |
| | | IPage<SccgRegion> list(SccgRegion sccgRegion); |
| | | } |
| | |
| | | package com.ycl.service.region.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.entity.depart.UmsDepart; |
| | | import com.ycl.entity.region.SccgRegion; |
| | | import com.ycl.mapper.region.SccgRegionMapper; |
| | | import com.ycl.service.region.ISccgRegionService; |
| | | import com.ycl.service.redis.RedisService; |
| | | import com.ycl.service.region.ISccgRegionService; |
| | | import com.ycl.utils.common.LiveTimeMillisecond; |
| | | import com.ycl.utils.redis.RedisKey; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | } |
| | | return e; |
| | | } |
| | | |
| | | @Override |
| | | public IPage<SccgRegion> list(SccgRegion sccgRegion) { |
| | | return null; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ycl.vo.equipment; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnore; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * <p> |
| | | * 卡口管理 |
| | | * </p> |
| | | * |
| | | * @author zhanghua |
| | | * @since 2022-10-14 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "卡口管理VO") |
| | | public class EquipmentBayonetVO { |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @ExcelIgnore |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 卡口名称 |
| | | */ |
| | | @ApiModelProperty(value = "卡口名称") |
| | | @ExcelProperty(index = 0, value = "卡口名称") |
| | | private String bayonetName; |
| | | |
| | | /** |
| | | * 卡口经度 |
| | | */ |
| | | @ApiModelProperty(value = "卡口经度") |
| | | @ExcelProperty(index = 1, value = "卡口经度") |
| | | private BigDecimal longitude; |
| | | |
| | | /** |
| | | * 卡口纬度 |
| | | */ |
| | | @ApiModelProperty(value = "卡口纬度") |
| | | @ExcelProperty(index = 2, value = "卡口纬度") |
| | | private BigDecimal latitude; |
| | | |
| | | /** |
| | | * ip地址 |
| | | */ |
| | | @ApiModelProperty(value = "ip地址") |
| | | @ExcelProperty(index = 3, value = "ip地址") |
| | | private String ipAddress; |
| | | |
| | | /** |
| | | * 端口号 |
| | | */ |
| | | @ApiModelProperty(value = "端口号") |
| | | @ExcelProperty(index = 4, value = "端口号") |
| | | private String port; |
| | | |
| | | /** |
| | | * 描述 |
| | | */ |
| | | @ApiModelProperty(value = "描述") |
| | | @ExcelProperty(index = 7, value = "描述") |
| | | private String description; |
| | | |
| | | /** |
| | | * 前端类型 |
| | | */ |
| | | @ApiModelProperty(value = "前端类型") |
| | | @ExcelProperty(index = 5, value = "前端类型") |
| | | private String frontEndType; |
| | | |
| | | /** |
| | | * 出入城类型 |
| | | */ |
| | | @ApiModelProperty(value = "出入城类型") |
| | | @ExcelProperty(index = 6, value = "出入城类型") |
| | | private String inOutCityType; |
| | | } |