| | |
| | | String PATROL_TASK_PREFIX = "RW"; |
| | | //线索事件编号前缀 |
| | | String EVENT_NUM_PREFIX = "XS"; |
| | | //线索事件编号前缀 |
| | | String SJ_EVENT_NUM_PREFIX = "SJ"; |
| | | // 机构前缀 |
| | | String ORG_PREFIX = "JG"; |
| | | |
| | |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "新增或修改", notes = "传入gdClueEvent") |
| | | public R submitExternal(@Valid @RequestBody GdClueEventEntity gdClueEvent) { |
| | | return R.status(gdClueEventService.saveOrUpdate(gdClueEvent)); |
| | | return R.status(gdClueEventService.saveOrUpdateExternal(gdClueEvent)); |
| | | } |
| | | |
| | | /** |
| | |
| | | COALESCE(tr.shoot_time, ce.shoot_time) as shoot_time, |
| | | COALESCE(tr.result_url, ce.attach_url) as event_image_url, |
| | | COALESCE(tr.geojson, ce.geojson) as geojson, |
| | | COALESCE(tr.attachment_type, ce.attachment_type) as attachment_type |
| | | COALESCE(tr.attachment_type, ce.attachment_type) as attachmentType |
| | | from ja_gd_clue_event ce |
| | | left join blade_user bu on bu.id::VARCHAR = ce.dispose_user::VARCHAR and bu.is_deleted = 0 |
| | | left join blade_dept bd on bd.id::VARCHAR = ce.dispose_dept::VARCHAR and bd.is_deleted = 0 |
| | |
| | | */ |
| | | List<GdClueEventExcel> exportGdClueEvent(Wrapper<GdClueEventEntity> queryWrapper); |
| | | |
| | | /** |
| | | * 对外接口新增或修改事件 |
| | | * <p> |
| | | * 生成事件编号并保存或更新事件信息 |
| | | * </p> |
| | | * |
| | | * @param gdClueEvent 事件实体 |
| | | * @return 是否操作成功 |
| | | */ |
| | | boolean saveOrUpdateExternal(GdClueEventEntity gdClueEvent); |
| | | |
| | | } |
| | |
| | | return gdClueEventList; |
| | | } |
| | | |
| | | /** |
| | | * 对外接口新增或修改事件 |
| | | * <p> |
| | | * 步骤: |
| | | * 1. 生成事件编号(使用SJ前缀) |
| | | * 2. 设置事件编号到实体 |
| | | * 3. 保存或更新事件信息 |
| | | * </p> |
| | | * |
| | | * @param gdClueEvent 事件实体 |
| | | * @return 是否操作成功 |
| | | */ |
| | | @Override |
| | | public boolean saveOrUpdateExternal(GdClueEventEntity gdClueEvent) { |
| | | // 1. 生成事件编号 |
| | | String times = OrderNumUtils.initOrderNum(WordOrderConstant.EVENT_NUM_KEY); |
| | | String eventNum = WordOrderConstant.SJ_EVENT_NUM_PREFIX + times; |
| | | // 2. 设置事件编号 |
| | | gdClueEvent.setEventNum(eventNum); |
| | | gdClueEvent.setCreateTime(new Date()); |
| | | // 3. 保存或更新 |
| | | return saveOrUpdate(gdClueEvent); |
| | | } |
| | | |
| | | } |