Merge remote-tracking branch 'origin/master' into master
| | |
| | | |
| | | 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.ycl.annotation.LogSave; |
| | | import com.ycl.api.BasePageDTO; |
| | | import com.ycl.api.BasePageVO; |
| | |
| | | |
| | | @ApiOperation("查询全部部门") |
| | | @GetMapping(value = "/page") |
| | | public CommonResult<IPage<UmsDepartVO>> page(DepartVO.PageDepartVO params) { |
| | | IPage<UmsDepartVO> page = departService.pageDepart(params); |
| | | public CommonResult<IPage<UmsDepartVO>> page(@RequestParam("currentPage") Integer currentPage, @RequestParam("pageSize") Integer pageSize, |
| | | @RequestParam(value = "departName", required = false) String departName) { |
| | | IPage<UmsDepartVO> page = new Page<>(currentPage, pageSize); |
| | | departService.pageDepart(departName, page); |
| | | return CommonResult.success(page); |
| | | } |
| | | |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ycl.entity.depart.UmsDepart; |
| | | import com.ycl.vo.depart.UmsDepartVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | |
| | | List<UmsDepart> selectDepartList(); |
| | | |
| | | List<UmsDepartVO> selectPageByName(@Param("departName") String departName, @Param("offset") Long offset, @Param("size") Long size); |
| | | } |
| | |
| | | package com.ycl.service.depart; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ycl.entity.depart.UmsDepart; |
| | | import com.ycl.vo.depart.DepartVO; |
| | | import com.ycl.vo.depart.UmsDepartVO; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param id |
| | | */ |
| | | void delete(long id); |
| | | |
| | | /** |
| | | * 树形 |
| | | * |
| | | * @return |
| | | */ |
| | | List<UmsDepart> tree(); |
| | | |
| | | /** |
| | | * 分页 |
| | | * @param params |
| | | * |
| | | * @param page |
| | | * @return |
| | | */ |
| | | IPage<UmsDepartVO> pageDepart(DepartVO.PageDepartVO params); |
| | | IPage<UmsDepartVO> pageDepart(String departName, IPage<UmsDepartVO> page); |
| | | |
| | | /** |
| | | * 修改状态 |
| | | * |
| | | * @param params |
| | | */ |
| | | void updateStatus(DepartVO.StatusDepartVO params); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public IPage<UmsDepartVO> pageDepart(DepartVO.PageDepartVO params) { |
| | | Page<UmsDepart> page = new Page<>(params.getCurrent(), params.getPageSize()); |
| | | LambdaQueryWrapper<UmsDepart> query = new LambdaQueryWrapper<>(); |
| | | if (StringUtils.isNotBlank(params.getDepartName())) { |
| | | query.like(UmsDepart::getDepartName, params.getDepartName()); |
| | | } |
| | | if (PojoUtils.Vo.isUsefulSearchParam(params.getDepartType())) { |
| | | query.like(UmsDepart::getDepartType, params.getDepartType()); |
| | | } |
| | | query.orderByDesc(UmsDepart::getCreateTime); |
| | | Page<UmsDepart> departPage = sccgDepartMapper.selectPage(page, query); |
| | | Page<UmsDepartVO> umsDepartVOPage = new Page<>(); |
| | | BeanUtils.copyProperties(departPage, umsDepartVOPage); |
| | | List<UmsDepartVO> umsDepartVOList = new ArrayList<>(); |
| | | //负责人 |
| | | if (CollUtil.isNotEmpty(departPage.getRecords())) { |
| | | for (UmsDepart record : departPage.getRecords()) { |
| | | UmsDepartVO umsDepartVO = new UmsDepartVO(); |
| | | BeanUtils.copyProperties(record, umsDepartVO); |
| | | umsDepartVO.setDepartType(dataDictionaryMapper |
| | | .selectOne(new LambdaQueryWrapper<DataDictionary>() |
| | | .eq(DataDictionary::getId, record.getDepartType())) |
| | | .getName()); |
| | | umsDepartVOList.add(umsDepartVO); |
| | | List<UmsDepartManage> umsAdminDeparts = umsAdminDepartService.queryByDepartId(record.getId()); |
| | | if (CollUtil.isNotEmpty(umsAdminDeparts)) { |
| | | List<AdminDepartDTO.UserInfoDTO> userInfoDTOS = umsAdminDeparts.stream().map(a -> { |
| | | AdminDepartDTO.UserInfoDTO userInfoDTO = new AdminDepartDTO.UserInfoDTO(); |
| | | userInfoDTO.setUserId(a.getUserId()); |
| | | // userInfoDTO.setUsername(umsAdminService.getById(a.getUserId()).getUsername()); |
| | | return userInfoDTO; |
| | | }).collect(Collectors.toList()); |
| | | record.setUserInfoDTOS(userInfoDTOS); |
| | | } |
| | | } |
| | | } |
| | | umsDepartVOPage.setRecords(umsDepartVOList); |
| | | return umsDepartVOPage; |
| | | public IPage<UmsDepartVO> pageDepart(String departName, IPage<UmsDepartVO> page) { |
| | | |
| | | List<UmsDepartVO> ls = sccgDepartMapper.selectPageByName(departName, page.offset(), page.getSize()); |
| | | LambdaQueryWrapper<UmsDepart> queryWrapper = new LambdaQueryWrapper<UmsDepart>() |
| | | .like(StringUtils.isNotEmpty(departName), UmsDepart::getDepartName, departName); |
| | | long total = this.count(queryWrapper); |
| | | |
| | | page.setRecords(ls); |
| | | page.setTotal(total); |
| | | return page; |
| | | } |
| | | |
| | | @Override |
| | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.ycl.api.BaseEntity; |
| | | import com.ycl.dto.user.AdminDepartDTO; |
| | | import com.ycl.entity.depart.UmsDepart; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | |
| | | @Getter |
| | | @Setter |
| | | @ApiModel(value = "umsDepartVO", description = "部门表") |
| | | public class UmsDepartVO { |
| | | |
| | | @ApiModelProperty("主键") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("部门名称") |
| | | private String departName; |
| | | |
| | | @ApiModelProperty("部门描述") |
| | | private String departDes; |
| | | public class UmsDepartVO extends UmsDepart { |
| | | |
| | | @ApiModelProperty("部门类型") |
| | | private String departType; |
| | | private String departTypeName; |
| | | |
| | | @ApiModelProperty("父级id,默认0") |
| | | private Long parentId; |
| | | |
| | | @ApiModelProperty("停用状态,0->false,1->true,默认停用") |
| | | private Short status; |
| | | |
| | | /** |
| | | * 逻辑删除 0:false 1:true 默认0 |
| | | */ |
| | | @ApiModelProperty(value = "是否删除", hidden = true) |
| | | @TableField(select = false) |
| | | @TableLogic() |
| | | private byte isDeleted; |
| | | } |
| | |
| | | </collection> |
| | | </resultMap> |
| | | |
| | | <resultMap id="DepartVOMap" type="com.ycl.vo.depart.UmsDepartVO" extends="BaseResultMap"> |
| | | <result column="depart_type_name" property="departTypeName" jdbcType="VARCHAR"></result> |
| | | <collection property="userInfoDTOS" javaType="ArrayList" ofType="com.ycl.dto.user.DepartUserDTO"> |
| | | <id column="user_id" property="userId"/> |
| | | <result column="username" property="username"/> |
| | | </collection> |
| | | </resultMap> |
| | | |
| | | <select id="selectDepartList" resultMap="UserDepartResultMap"> |
| | | SELECT |
| | | ud.*,ua.id user_id,ua.username |
| | | FROM |
| | | ums_depart ud |
| | | SELECT ud.*, |
| | | ua.id user_id, |
| | | ua.username |
| | | FROM ums_depart ud |
| | | LEFT JOIN ums_depart_manager udm ON ud.id = udm.depart_id |
| | | LEFT JOIN ums_admin ua ON udm.user_id = ua.id |
| | | </select> |
| | | <select id="selectPageByName" resultMap="DepartVOMap"> |
| | | SELECT t_0.*, |
| | | ua.id user_id, |
| | | ua.username, |
| | | dd.`name` as depart_type_name |
| | | FROM ( |
| | | SELECT ud.* |
| | | FROM ums_depart ud |
| | | WHERE is_deleted = 0 |
| | | <if test="departName!=null and departName!=''"> |
| | | and ud.name like CONCAT('%',#{departName},'%') |
| | | </if> |
| | | ORDER BY create_time desc |
| | | LIMIT #{offset}, #{size} |
| | | ) t_0 |
| | | LEFT JOIN ums_depart_manager udm ON t_0.id = udm.depart_id |
| | | LEFT JOIN ums_admin ua ON udm.user_id = ua.id |
| | | left join ums_data_dictionary as dd on t_0.depart_type = dd.id |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
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.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; |
| | | } |
| | |
| | | @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); |
New file |
| | |
| | | package com.ycl.service.message; |
| | | |
| | | /** |
| | | * <p> |
| | | * 类说明 |
| | | * </p> |
| | | * |
| | | * @author mg |
| | | * @since 2022-10-17 |
| | | */ |
| | | public interface MessageScheduleService { |
| | | void sendSmsSchedule(); |
| | | } |
| | |
| | | //生成8位随机数消息编码 |
| | | messageAdd.setMessageNumber(messageNumber); |
| | | //发送时间 |
| | | 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; |
| | | } |
| | | } |