bobol
11 months ago
20 changed files with 677 additions and 110 deletions
@ -0,0 +1,18 @@ |
|||||
|
package com.lzbi.common.config; |
||||
|
|
||||
|
import org.springframework.boot.web.client.RestTemplateBuilder; |
||||
|
import org.springframework.context.annotation.Bean; |
||||
|
import org.springframework.context.annotation.Configuration; |
||||
|
import org.springframework.web.client.RestTemplate; |
||||
|
|
||||
|
import java.time.Duration; |
||||
|
|
||||
|
@Configuration |
||||
|
public class RestTemplateConfig { |
||||
|
|
||||
|
@Bean |
||||
|
public RestTemplate restTemplate(RestTemplateBuilder restTemplateBuilder) { |
||||
|
return restTemplateBuilder.setConnectTimeout(Duration.ofMillis(2000)) |
||||
|
.setReadTimeout(Duration.ofMillis(2000)).build(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,60 @@ |
|||||
|
package com.lzbi.common.config; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
import org.springframework.boot.context.properties.ConfigurationProperties; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
@Component |
||||
|
@ConfigurationProperties(prefix = "luenmeilz.vedio-server") |
||||
|
public class VideoConfig { |
||||
|
|
||||
|
private String url; |
||||
|
|
||||
|
private String login; |
||||
|
|
||||
|
private String deviceList; |
||||
|
|
||||
|
private String channelList; |
||||
|
|
||||
|
private String channelStream; |
||||
|
|
||||
|
public String getUrl() { |
||||
|
return url; |
||||
|
} |
||||
|
|
||||
|
public void setUrl(String url) { |
||||
|
this.url = url; |
||||
|
} |
||||
|
|
||||
|
public String getLogin() { |
||||
|
return url + login; |
||||
|
} |
||||
|
|
||||
|
public void setLogin(String login) { |
||||
|
this.login = login; |
||||
|
} |
||||
|
|
||||
|
public String getDeviceList() { |
||||
|
return url + deviceList; |
||||
|
} |
||||
|
|
||||
|
public void setDeviceList(String deviceList) { |
||||
|
this.deviceList = deviceList; |
||||
|
} |
||||
|
|
||||
|
public String getChannelList() { |
||||
|
return url + channelList; |
||||
|
} |
||||
|
|
||||
|
public void setChannelList(String channelList) { |
||||
|
this.channelList = channelList; |
||||
|
} |
||||
|
|
||||
|
public String getChannelStream() { |
||||
|
return url + channelStream; |
||||
|
} |
||||
|
|
||||
|
public void setChannelStream(String channelStream) { |
||||
|
this.channelStream = channelStream; |
||||
|
} |
||||
|
} |
@ -0,0 +1,46 @@ |
|||||
|
package com.lzbi.common.utils; |
||||
|
|
||||
|
import java.security.MessageDigest; |
||||
|
import java.security.NoSuchAlgorithmException; |
||||
|
/** |
||||
|
* 南宫乘风 |
||||
|
*/ |
||||
|
public class MD5Utils { |
||||
|
/** |
||||
|
* MD5加密类 |
||||
|
* @param str 要加密的字符串 |
||||
|
* @return 加密后的字符串 |
||||
|
*/ |
||||
|
public static String code(String str){ |
||||
|
try { |
||||
|
MessageDigest md = MessageDigest.getInstance("MD5"); |
||||
|
md.update(str.getBytes()); |
||||
|
byte[]byteDigest = md.digest(); |
||||
|
int i; |
||||
|
StringBuffer buf = new StringBuffer(""); |
||||
|
for (int offset = 0; offset < byteDigest.length; offset++) { |
||||
|
i = byteDigest[offset]; |
||||
|
if (i < 0) |
||||
|
i += 256; |
||||
|
if (i < 16) |
||||
|
buf.append("0"); |
||||
|
buf.append(Integer.toHexString(i)); |
||||
|
} |
||||
|
//32位加密
|
||||
|
return buf.toString(); |
||||
|
// 16位的加密
|
||||
|
//return buf.toString().substring(8, 24);
|
||||
|
} catch (NoSuchAlgorithmException e) { |
||||
|
e.printStackTrace(); |
||||
|
return null; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 测试方法 |
||||
|
* @param args |
||||
|
*/ |
||||
|
public static void main(String[] args) { |
||||
|
System.out.println(code("lmLz@2019")); |
||||
|
} |
||||
|
} |
@ -1,86 +1,192 @@ |
|||||
package com.lzbi.bi.controller; |
package com.lzbi.bi.controller; |
||||
|
|
||||
import cn.hutool.Hutool; |
|
||||
import cn.hutool.core.util.StrUtil; |
|
||||
import cn.hutool.crypto.digest.MD5; |
|
||||
import cn.hutool.http.HttpRequest; |
|
||||
import cn.hutool.http.HttpResponse; |
|
||||
import cn.hutool.http.HttpUtil; |
|
||||
import com.alibaba.fastjson2.JSONObject; |
import com.alibaba.fastjson2.JSONObject; |
||||
|
import com.lzbi.common.config.VideoConfig; |
||||
import com.lzbi.common.core.controller.BaseController; |
import com.lzbi.common.core.controller.BaseController; |
||||
import com.lzbi.common.core.domain.AjaxResult; |
import com.lzbi.common.core.domain.AjaxResult; |
||||
|
import com.lzbi.common.core.redis.RedisCache; |
||||
import com.lzbi.common.utils.SecurityUtils; |
import com.lzbi.common.utils.SecurityUtils; |
||||
import com.lzbi.common.utils.StringUtils; |
import com.lzbi.common.utils.StringUtils; |
||||
import com.lzbi.common.utils.sign.Md5Utils; |
|
||||
import io.swagger.annotations.Api; |
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiImplicitParam; |
import io.swagger.annotations.ApiImplicitParam; |
||||
import io.swagger.annotations.ApiImplicitParams; |
import io.swagger.annotations.ApiImplicitParams; |
||||
import io.swagger.annotations.ApiOperation; |
import io.swagger.annotations.ApiOperation; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.beans.factory.annotation.Value; |
import org.springframework.http.HttpEntity; |
||||
import org.springframework.data.redis.core.RedisTemplate; |
import org.springframework.http.HttpHeaders; |
||||
|
import org.springframework.http.HttpMethod; |
||||
|
import org.springframework.http.ResponseEntity; |
||||
import org.springframework.util.DigestUtils; |
import org.springframework.util.DigestUtils; |
||||
import org.springframework.web.bind.annotation.*; |
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestParam; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
import org.springframework.web.client.RestTemplate; |
||||
|
|
||||
import java.util.Optional; |
import java.util.HashMap; |
||||
|
import java.util.Map; |
||||
|
import java.util.concurrent.TimeUnit; |
||||
|
|
||||
/** |
/** |
||||
* @auth create by Administrator |
* @auth create by Administrator |
||||
* @date 2023/12/27 |
* @date 2023/12/27 |
||||
* DCVedioScreenControler |
* DCVedioScreenControler |
||||
*/ |
*/ |
||||
|
@Slf4j |
||||
@Api("视频监控大屏接口") |
@Api("视频监控大屏接口") |
||||
@RestController |
@RestController |
||||
@RequestMapping("/vedio") |
@RequestMapping("/api/v1") |
||||
public class DCVedioScreenControler extends BaseController { |
public class DCVedioScreenControler extends BaseController { |
||||
|
|
||||
|
@Autowired |
||||
|
private RedisCache redisCache; |
||||
|
|
||||
@Autowired |
@Autowired |
||||
RedisTemplate<String,String> redisTemplate; |
private RestTemplate restTemplate; |
||||
@Value("${luenmeilz.vedioServer.url}") |
|
||||
String vedio_server_url; |
@Autowired |
||||
|
private VideoConfig videoConfig; |
||||
|
|
||||
//String md532Upper=md532Lower.toUpperCase();
|
//String md532Upper=md532Lower.toUpperCase();
|
||||
//16位,小写
|
//16位,小写
|
||||
//String md516Lower =md532Lower.substring(8, 24);
|
//String md516Lower =md532Lower.substring(8, 24);
|
||||
//16位,大写
|
//16位,大写
|
||||
//String md516Upper=md532Lower.substring(8, 24).toUpperCase();
|
//String md516Upper=md532Lower.substring(8, 24).toUpperCase();
|
||||
@ApiOperation("根据用户对照信息并获取视频的用户登录token") |
@ApiOperation("根据用户对照信息并获取视频的用户登录token") |
||||
@GetMapping("/getToken") |
@GetMapping("/login") |
||||
public AjaxResult getToken2() { |
public AjaxResult getToken2() { |
||||
return AjaxResult.success(getToken()); |
return AjaxResult.success(getToken()); |
||||
} |
} |
||||
|
|
||||
private String getToken() { |
private String getToken() { |
||||
String userName = SecurityUtils.getUsername(); |
String userName = SecurityUtils.getUsername(); |
||||
String token= redisTemplate.opsForValue().get("vedio:" + userName); |
String token = redisCache.getCacheObject("video:" + userName); |
||||
if(StringUtils.isNull(token)){//没有tokean需要重新获取
|
//没有tokean需要重新获取
|
||||
String vedio_userName="easycvr" ;//SecurityUtils.getUsername();
|
if (StringUtils.isEmpty(token)) { |
||||
String vedio_password="lmlz@2019"; //
|
String vedio_userName = "easycvr"; |
||||
|
String vedio_password = "lmLz@2019"; //
|
||||
//根据平台用户名查询 对应的监控用户名和密码,如果不需要则默认给出easycvr lmlz@2019
|
//根据平台用户名查询 对应的监控用户名和密码,如果不需要则默认给出easycvr lmlz@2019
|
||||
String passwordMd532 = DigestUtils.md5DigestAsHex(vedio_password.getBytes()); |
String passwordMd532 = DigestUtils.md5DigestAsHex(vedio_password.getBytes()); |
||||
HttpRequest get = HttpUtil.createGet(StrUtil.format("{}/api/v1/login?username={}&password={}", vedio_server_url, userName, passwordMd532)); |
Map<String, Object> query = new HashMap<>(); |
||||
HttpResponse execute = get.execute(); |
query.put("username", vedio_userName); |
||||
if(execute.getStatus()==200){ |
query.put("password", passwordMd532); |
||||
//解析token
|
JSONObject resp = restTemplate.getForObject(videoConfig.getLogin(), JSONObject.class, query); |
||||
token= Optional.ofNullable(JSONObject.parseObject(execute.body()).getString("token")).orElse(""); |
log.info("登录请求结果:{}", resp); |
||||
redisTemplate.opsForValue().set("vedio:" + userName,token); |
if (null != resp) { |
||||
|
JSONObject body = this.getBody(resp); |
||||
|
if (null != body) { |
||||
|
token = body.getString("Token"); |
||||
|
redisCache.setCacheObject("video:" + userName, token, 1, TimeUnit.DAYS); |
||||
|
} |
||||
|
log.info("token:{}", token); |
||||
} |
} |
||||
|
|
||||
} |
} |
||||
return token; |
return token; |
||||
} |
} |
||||
@ApiOperation("获取设备列表") |
|
||||
@GetMapping("/getDevcieList") |
|
||||
public AjaxResult getDeviceList(){ |
|
||||
|
|
||||
|
@ApiOperation("获取设备列表") |
||||
|
@ApiImplicitParams({ |
||||
|
@ApiImplicitParam(name = "start", value = "分页开始,从零开始", dataType = "Integer", dataTypeClass = Integer.class, required = true), |
||||
|
@ApiImplicitParam(name = "limit", value = "分页大小", dataType = "Integer", dataTypeClass = Integer.class, required = true), |
||||
|
@ApiImplicitParam(name = "device", value = "设备ID", dataType = "Integer", dataTypeClass = Integer.class), |
||||
|
@ApiImplicitParam(name = "protocol_type", value = "设备类型", example = "sdk, ipc, rtmp_push", dataType = "String", dataTypeClass = String.class), |
||||
|
@ApiImplicitParam(name = "q", value = "查询参数", dataType = "String", dataTypeClass = String.class), |
||||
|
}) |
||||
|
@GetMapping("/devicesconfig") |
||||
|
public AjaxResult getDeviceList(@RequestParam(value = "device", required = false) Integer device, |
||||
|
@RequestParam(value = "start") Integer start, |
||||
|
@RequestParam(value = "limit") Integer limit, |
||||
|
@RequestParam(value = "protocol_type", required = false) String protocol_type, |
||||
|
@RequestParam(value = "q", required = false) String q) { |
||||
String token = getToken(); |
String token = getToken(); |
||||
HttpRequest get = HttpUtil.createGet(StrUtil.format("{}/api/v1/devices?device={}&start={}&limit={}&token={}", vedio_server_url,0,0,100,token)); |
HttpHeaders headers = new HttpHeaders(); |
||||
return AjaxResult.success(get.execute().body()); |
headers.set("Token", token); |
||||
|
HttpEntity entity = new HttpEntity<>(headers); |
||||
|
Map<String, Object> query = new HashMap<>(); |
||||
|
query.put("device", device); |
||||
|
query.put("start", start); |
||||
|
query.put("limit", limit); |
||||
|
query.put("protocol_type", protocol_type); |
||||
|
query.put("q", q); |
||||
|
ResponseEntity response = restTemplate.exchange(videoConfig.getDeviceList(), HttpMethod.GET, entity, JSONObject.class, query); |
||||
|
log.info("获取设备列表请求结果:{}", response); |
||||
|
JSONObject body = this.getBody((JSONObject) response.getBody()); |
||||
|
if (null != body) { |
||||
|
return AjaxResult.success(body); |
||||
} |
} |
||||
|
return AjaxResult.success(null); |
||||
|
} |
||||
|
|
||||
@ApiOperation("获取通道列表") |
@ApiOperation("获取通道列表") |
||||
@ApiImplicitParams({ |
@ApiImplicitParams({ |
||||
@ApiImplicitParam(name = "depId", value = "上级部门编码默认0", dataType = "Long", dataTypeClass = Long.class), |
@ApiImplicitParam(name = "start", value = "分页开始,从零开始", dataType = "Integer", dataTypeClass = Integer.class, required = true), |
||||
|
@ApiImplicitParam(name = "limit", value = "分页大小", dataType = "Integer", dataTypeClass = Integer.class, required = true), |
||||
|
@ApiImplicitParam(name = "device", value = "设备ID", dataType = "Integer", dataTypeClass = Integer.class), |
||||
|
@ApiImplicitParam(name = "q", value = "查询参数", dataType = "String", dataTypeClass = String.class), |
||||
}) |
}) |
||||
@GetMapping("/getChanleList") |
@GetMapping("/channelsconfig") |
||||
public AjaxResult getChanelList(){ |
public AjaxResult getChanelList(@RequestParam(value = "device", required = false) Integer device, |
||||
String token=""; |
@RequestParam(value = "start") Integer start, |
||||
return AjaxResult.success(token); |
@RequestParam(value = "limit") Integer limit, |
||||
|
@RequestParam(value = "q", required = false) String q) { |
||||
|
String token = getToken(); |
||||
|
HttpHeaders headers = new HttpHeaders(); |
||||
|
headers.set("Token", token); |
||||
|
HttpEntity entity = new HttpEntity<>(headers); |
||||
|
Map<String, Object> query = new HashMap<>(); |
||||
|
query.put("device", device); |
||||
|
query.put("start", start); |
||||
|
query.put("limit", limit); |
||||
|
query.put("q", q); |
||||
|
ResponseEntity response = restTemplate.exchange(videoConfig.getChannelList(), HttpMethod.GET, entity, JSONObject.class, query); |
||||
|
log.info("获取通道列表请求结果:{}", response); |
||||
|
JSONObject body = this.getBody((JSONObject) response.getBody()); |
||||
|
if (null != body) { |
||||
|
return AjaxResult.success(body); |
||||
|
} |
||||
|
return AjaxResult.success(null); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "获取设备通道直播链接(具有保活功能,建议按需模式25s-30s调用一次)") |
||||
|
@ApiImplicitParams({ |
||||
|
@ApiImplicitParam(name = "device", value = "设备ID", dataType = "Integer", dataTypeClass = Integer.class, required = true), |
||||
|
@ApiImplicitParam(name = "channel", value = "通道id ", dataType = "Integer", dataTypeClass = Integer.class, required = true), |
||||
|
@ApiImplicitParam(name = "protocol", value = "直播协议", example = "FLV, WS_FLV, WEBRTC, RTMP, HLS, rtsp", dataType = "Integer", dataTypeClass = Integer.class, required = true), |
||||
|
@ApiImplicitParam(name = "Token", value = "播放token", dataType = "String", dataTypeClass = String.class), |
||||
|
@ApiImplicitParam(name = "type", value = "首次播放之后保活请带上此字段", example = "keepalive", dataType = "String", dataTypeClass = String.class), |
||||
|
}) |
||||
|
@GetMapping("/devices/channelstream") |
||||
|
public AjaxResult getChannelStream(@RequestParam(value = "device") Integer device, |
||||
|
@RequestParam(value = "channel") Integer channel, |
||||
|
@RequestParam(value = "protocol") String protocol, |
||||
|
@RequestParam(value = "Token", required = false) String Token, |
||||
|
@RequestParam(value = "type", required = false) String type) { |
||||
|
String token = getToken(); |
||||
|
HttpHeaders headers = new HttpHeaders(); |
||||
|
headers.set("Token", token); |
||||
|
HttpEntity entity = new HttpEntity<>(headers); |
||||
|
Map<String, Object> query = new HashMap<>(); |
||||
|
query.put("device", device); |
||||
|
query.put("channel", channel); |
||||
|
query.put("protocol", protocol); |
||||
|
query.put("Token", Token); |
||||
|
query.put("type", type); |
||||
|
ResponseEntity response = restTemplate.exchange(videoConfig.getChannelStream(), HttpMethod.GET, entity, JSONObject.class, query); |
||||
|
log.info("获取设备通道直播链接请求结果:{}", response); |
||||
|
JSONObject body = this.getBody((JSONObject) response.getBody()); |
||||
|
if (null != body) { |
||||
|
return AjaxResult.success(body); |
||||
|
} |
||||
|
return AjaxResult.success(null); |
||||
|
} |
||||
|
|
||||
|
private JSONObject getBody(JSONObject resp) { |
||||
|
JSONObject easyDarwin = resp.getJSONObject("EasyDarwin"); |
||||
|
if (null != easyDarwin) { |
||||
|
JSONObject body = easyDarwin.getJSONObject("Body"); |
||||
|
return body; |
||||
|
} |
||||
|
return null; |
||||
} |
} |
||||
} |
} |
||||
|
@ -0,0 +1,6 @@ |
|||||
|
package com.lzbi.bi.domain; |
||||
|
|
||||
|
public class VideoResp { |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,131 @@ |
|||||
|
package com.lzbi.draft.controller; |
||||
|
import io.swagger.annotations.ApiImplicitParam; |
||||
|
import io.swagger.annotations.ApiImplicitParams; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import java.util.List; |
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import org.springframework.security.access.prepost.PreAuthorize; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.PutMapping; |
||||
|
import org.springframework.web.bind.annotation.DeleteMapping; |
||||
|
import org.springframework.web.bind.annotation.PathVariable; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
import com.lzbi.common.annotation.Log; |
||||
|
import com.lzbi.common.core.controller.BaseController; |
||||
|
import com.lzbi.common.core.domain.AjaxResult; |
||||
|
import com.lzbi.common.enums.BusinessType; |
||||
|
import com.lzbi.draft.domain.DcBusiTargetDraftDaynew; |
||||
|
import com.lzbi.draft.service.DcBusiTargetDraftDaynewService; |
||||
|
import com.lzbi.common.utils.poi.ExcelUtil; |
||||
|
import com.lzbi.common.core.page.TableDataInfo; |
||||
|
|
||||
|
/** |
||||
|
* 指标数据底稿日-新结构Controller |
||||
|
* |
||||
|
* @author 李恩博 |
||||
|
* @date 2023-12-25 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("/asset/dcBusiTargetDraftDaynew") |
||||
|
public class DcBusiTargetDraftDaynewController extends BaseController |
||||
|
{ |
||||
|
@Autowired |
||||
|
private DcBusiTargetDraftDaynewService dcBusiTargetDraftDaynewService; |
||||
|
|
||||
|
/** |
||||
|
* 查询指标数据底稿日-新结构列表 |
||||
|
*/ |
||||
|
@ApiOperation("查询指标数据底稿日-新结构列表") |
||||
|
@ApiImplicitParams({ |
||||
|
@ApiImplicitParam(name = "DcBusiTargetDraftDaynew", value = "", dataType = "DcBusiTargetDraftDaynew", dataTypeClass = DcBusiTargetDraftDaynew.class), |
||||
|
}) |
||||
|
@PreAuthorize("@ss.hasPermi('bi:dcBusiTargetDraftDaynew:list')") |
||||
|
@GetMapping("/list") |
||||
|
public TableDataInfo list(DcBusiTargetDraftDaynew DcBusiTargetDraftDaynew) |
||||
|
{ |
||||
|
startPage(); |
||||
|
List< DcBusiTargetDraftDaynew> list = dcBusiTargetDraftDaynewService.selectDcBusiTargetDraftDaynewList(DcBusiTargetDraftDaynew); |
||||
|
return getDataTable(list); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 导出指标数据底稿日-新结构列表 |
||||
|
*/ |
||||
|
@ApiOperation("导出指标数据底稿日-新结构列表") |
||||
|
@ApiImplicitParams({ |
||||
|
@ApiImplicitParam(name = "DcBusiTargetDraftDaynew", value = "", dataType = "DcBusiTargetDraftDaynew", dataTypeClass = DcBusiTargetDraftDaynew.class), |
||||
|
}) |
||||
|
@PreAuthorize("@ss.hasPermi('bi:dcBusiTargetDraftDaynew:export')") |
||||
|
@Log(title = "指标数据底稿日-新结构", businessType = BusinessType.EXPORT) |
||||
|
@PostMapping("/export") |
||||
|
public void export(HttpServletResponse response,DcBusiTargetDraftDaynew DcBusiTargetDraftDaynew) |
||||
|
{ |
||||
|
List<DcBusiTargetDraftDaynew> list = dcBusiTargetDraftDaynewService.selectDcBusiTargetDraftDaynewList(DcBusiTargetDraftDaynew); |
||||
|
ExcelUtil<DcBusiTargetDraftDaynew> util = new ExcelUtil<DcBusiTargetDraftDaynew>(DcBusiTargetDraftDaynew.class); |
||||
|
util.exportExcel(response, list, "指标数据底稿日-新结构数据"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取指标数据底稿日-新结构详细信息 |
||||
|
*/ |
||||
|
@ApiOperation("获取指标数据底稿日-新结构详细信息") |
||||
|
@ApiImplicitParams({ |
||||
|
@ApiImplicitParam(name = "id", value = "", dataType = "String", dataTypeClass = String.class), |
||||
|
}) |
||||
|
@PreAuthorize("@ss.hasPermi('bi:dcBusiTargetDraftDaynew:query')") |
||||
|
@GetMapping(value = "/{id}") |
||||
|
public AjaxResult getInfo(@PathVariable("id") String id) |
||||
|
{ |
||||
|
return success(dcBusiTargetDraftDaynewService.selectDcBusiTargetDraftDaynewById(id)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增指标数据底稿日-新结构 |
||||
|
*/ |
||||
|
@ApiOperation("新增指标数据底稿日-新结构") |
||||
|
@ApiImplicitParams({ |
||||
|
@ApiImplicitParam(name = "DcBusiTargetDraftDaynew", value = "", dataType = "DcBusiTargetDraftDaynew", dataTypeClass = DcBusiTargetDraftDaynew.class), |
||||
|
}) |
||||
|
@PreAuthorize("@ss.hasPermi('bi:dcBusiTargetDraftDaynew:add')") |
||||
|
@Log(title = "指标数据底稿日-新结构", businessType = BusinessType.INSERT) |
||||
|
@PostMapping |
||||
|
public AjaxResult add(@RequestBody DcBusiTargetDraftDaynew DcBusiTargetDraftDaynew) |
||||
|
{ |
||||
|
return toAjax(dcBusiTargetDraftDaynewService.insertDcBusiTargetDraftDaynew(DcBusiTargetDraftDaynew)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改指标数据底稿日-新结构 |
||||
|
*/ |
||||
|
|
||||
|
@ApiOperation("修改指标数据底稿日-新结构") |
||||
|
@ApiImplicitParams({ |
||||
|
@ApiImplicitParam(name = "DcBusiTargetDraftDaynew", value = "", dataType = "DcBusiTargetDraftDaynew", dataTypeClass = DcBusiTargetDraftDaynew.class), |
||||
|
}) |
||||
|
@PreAuthorize("@ss.hasPermi('bi:dcBusiTargetDraftDaynew:edit')") |
||||
|
@Log(title = "指标数据底稿日-新结构", businessType = BusinessType.UPDATE) |
||||
|
@PutMapping |
||||
|
public AjaxResult edit(@RequestBody DcBusiTargetDraftDaynew DcBusiTargetDraftDaynew) |
||||
|
{ |
||||
|
return toAjax(dcBusiTargetDraftDaynewService.updateDcBusiTargetDraftDaynew(DcBusiTargetDraftDaynew)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除指标数据底稿日-新结构 |
||||
|
*/ |
||||
|
@ApiOperation("删除指标数据底稿日-新结构") |
||||
|
@ApiImplicitParams({ |
||||
|
@ApiImplicitParam(name = "ids", value = "", dataType = "String", dataTypeClass =String.class), |
||||
|
}) |
||||
|
@PreAuthorize("@ss.hasPermi('bi:dcBusiTargetDraftDaynew:remove')") |
||||
|
@Log(title = "指标数据底稿日-新结构", businessType = BusinessType.DELETE) |
||||
|
@DeleteMapping("/{ids}") |
||||
|
public AjaxResult remove(@PathVariable String[] ids) |
||||
|
{ |
||||
|
return toAjax(dcBusiTargetDraftDaynewService.deleteDcBusiTargetDraftDaynewByIds(ids)); |
||||
|
} |
||||
|
} |
@ -1,4 +1,4 @@ |
|||||
package com.lzbi.bi.domain; |
package com.lzbi.draft.domain; |
||||
|
|
||||
import java.math.BigDecimal; |
import java.math.BigDecimal; |
||||
import java.util.Date; |
import java.util.Date; |
@ -1,8 +1,8 @@ |
|||||
package com.lzbi.bi.mapper; |
package com.lzbi.draft.mapper; |
||||
|
|
||||
import java.util.List; |
import java.util.List; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.lzbi.bi.domain.DcBusiTargetDraftDaynew; |
import com.lzbi.draft.domain.DcBusiTargetDraftDaynew; |
||||
|
|
||||
/** |
/** |
||||
* 指标数据底稿日-新结构Mapper接口 |
* 指标数据底稿日-新结构Mapper接口 |
@ -1,10 +1,10 @@ |
|||||
package com.lzbi.bi.service; |
package com.lzbi.draft.service; |
||||
|
|
||||
import java.util.List; |
import java.util.List; |
||||
import com.lzbi.common.utils.DateUtils; |
import com.lzbi.common.utils.DateUtils; |
||||
import org.springframework.stereotype.Service; |
import org.springframework.stereotype.Service; |
||||
import com.lzbi.bi.domain.DcBusiTargetDraftDaynew; |
import com.lzbi.draft.domain.DcBusiTargetDraftDaynew; |
||||
import com.lzbi.bi.mapper.DcBusiTargetDraftDaynewMapper; |
import com.lzbi.draft.mapper.DcBusiTargetDraftDaynewMapper; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
import com.baomidou.mybatisplus.extension.service.IService; |
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
/** |
/** |
Loading…
Reference in new issue