diff --git a/lzbi-admin/src/main/resources/application-dev.yml b/lzbi-admin/src/main/resources/application-dev.yml index 512041d..370f5a0 100644 --- a/lzbi-admin/src/main/resources/application-dev.yml +++ b/lzbi-admin/src/main/resources/application-dev.yml @@ -76,12 +76,12 @@ spring: datasource: # 主库数据源 master: - #url: jdbc:mysql://10.10.10.56:13306/lzdc_bi_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&rewriteBatchedStatements=true - #username: luenmei - #password: 123456 - url: jdbc:mysql://localhost:3306/lmlz_dcdb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&rewriteBatchedStatements=true - username: root - password: root123456 + url: jdbc:mysql://10.10.10.56:13306/lzdc_bi_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&rewriteBatchedStatements=true + username: luenmei + password: 123456 +# url: jdbc:mysql://localhost:3306/lmlz_dcdb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&rewriteBatchedStatements=true +# username: root +# password: root123456 # # 计费数据库 # charge: # driverClassName: oracle.jdbc.OracleDriver @@ -103,8 +103,12 @@ spring: primary: master luenmeilz: #视频设备监控地址 - vedioServer: - url: 10.10.10.40:18000 + vedio-server: + url: http://10.10.10.40:18000 + login: /api/v1/login?username={username}&password={password} + deviceList: /api/v1/devicesconfig?device={device}&start={start}&limit={limit} + channelList: /api/v1/channelsconfig?device={device}&start={start}&limit={limit} + channelStream: /api/v1/devices/channelstream?device={device}&channel={channel}&protocol={protocol}&Token={Token}&type={type} # 日志配置 logging: file: diff --git a/lzbi-common/src/main/java/com/lzbi/common/config/RestTemplateConfig.java b/lzbi-common/src/main/java/com/lzbi/common/config/RestTemplateConfig.java new file mode 100644 index 0000000..24e5e33 --- /dev/null +++ b/lzbi-common/src/main/java/com/lzbi/common/config/RestTemplateConfig.java @@ -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(); + } +} diff --git a/lzbi-common/src/main/java/com/lzbi/common/config/VideoConfig.java b/lzbi-common/src/main/java/com/lzbi/common/config/VideoConfig.java new file mode 100644 index 0000000..fa9a2cb --- /dev/null +++ b/lzbi-common/src/main/java/com/lzbi/common/config/VideoConfig.java @@ -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; + } +} diff --git a/lzbi-common/src/main/java/com/lzbi/common/utils/MD5Utils.java b/lzbi-common/src/main/java/com/lzbi/common/utils/MD5Utils.java new file mode 100644 index 0000000..e98cfae --- /dev/null +++ b/lzbi-common/src/main/java/com/lzbi/common/utils/MD5Utils.java @@ -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")); + } +} \ No newline at end of file diff --git a/lzbi-module/src/main/java/com/lzbi/bi/controller/DCVedioScreenControler.java b/lzbi-module/src/main/java/com/lzbi/bi/controller/DCVedioScreenControler.java index aa46c79..9cfe4d7 100644 --- a/lzbi-module/src/main/java/com/lzbi/bi/controller/DCVedioScreenControler.java +++ b/lzbi-module/src/main/java/com/lzbi/bi/controller/DCVedioScreenControler.java @@ -1,86 +1,192 @@ 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.lzbi.common.config.VideoConfig; import com.lzbi.common.core.controller.BaseController; 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.StringUtils; -import com.lzbi.common.utils.sign.Md5Utils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.ResponseEntity; 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 * @date 2023/12/27 * DCVedioScreenControler */ +@Slf4j @Api("视频监控大屏接口") @RestController -@RequestMapping("/vedio") +@RequestMapping("/api/v1") public class DCVedioScreenControler extends BaseController { + + @Autowired + private RedisCache redisCache; + @Autowired - RedisTemplate redisTemplate; - @Value("${luenmeilz.vedioServer.url}") - String vedio_server_url; + private RestTemplate restTemplate; + + @Autowired + private VideoConfig videoConfig; + //String md532Upper=md532Lower.toUpperCase(); //16位,小写 //String md516Lower =md532Lower.substring(8, 24); //16位,大写 //String md516Upper=md532Lower.substring(8, 24).toUpperCase(); @ApiOperation("根据用户对照信息并获取视频的用户登录token") - @GetMapping("/getToken") - public AjaxResult getToken2(){ + @GetMapping("/login") + public AjaxResult getToken2() { return AjaxResult.success(getToken()); } - private String getToken(){ - String userName=SecurityUtils.getUsername(); - String token= redisTemplate.opsForValue().get("vedio:" + userName); - if(StringUtils.isNull(token)){//没有tokean需要重新获取 - String vedio_userName="easycvr" ;//SecurityUtils.getUsername(); - String vedio_password="lmlz@2019"; // + + private String getToken() { + String userName = SecurityUtils.getUsername(); + String token = redisCache.getCacheObject("video:" + userName); + //没有tokean需要重新获取 + if (StringUtils.isEmpty(token)) { + String vedio_userName = "easycvr"; + String vedio_password = "lmLz@2019"; // //根据平台用户名查询 对应的监控用户名和密码,如果不需要则默认给出easycvr lmlz@2019 String passwordMd532 = DigestUtils.md5DigestAsHex(vedio_password.getBytes()); - HttpRequest get = HttpUtil.createGet(StrUtil.format("{}/api/v1/login?username={}&password={}", vedio_server_url, userName, passwordMd532)); - HttpResponse execute = get.execute(); - if(execute.getStatus()==200){ - //解析token - token= Optional.ofNullable(JSONObject.parseObject(execute.body()).getString("token")).orElse(""); - redisTemplate.opsForValue().set("vedio:" + userName,token); + Map query = new HashMap<>(); + query.put("username", vedio_userName); + query.put("password", passwordMd532); + JSONObject resp = restTemplate.getForObject(videoConfig.getLogin(), JSONObject.class, query); + log.info("登录请求结果:{}", resp); + 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; } - @ApiOperation("获取设备列表") - @GetMapping("/getDevcieList") - public AjaxResult getDeviceList(){ - String token=getToken(); - HttpRequest get = HttpUtil.createGet(StrUtil.format("{}/api/v1/devices?device={}&start={}&limit={}&token={}", vedio_server_url,0,0,100,token)); - return AjaxResult.success(get.execute().body()); + @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(); + HttpHeaders headers = new HttpHeaders(); + headers.set("Token", token); + HttpEntity entity = new HttpEntity<>(headers); + Map 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("获取通道列表") @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") - public AjaxResult getChanelList(){ - String token=""; - return AjaxResult.success(token); + @GetMapping("/channelsconfig") + public AjaxResult getChanelList(@RequestParam(value = "device", required = false) Integer device, + @RequestParam(value = "start") Integer start, + @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 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 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; } } diff --git a/lzbi-module/src/main/java/com/lzbi/bi/controller/DcBusiDataScreenMainController.java b/lzbi-module/src/main/java/com/lzbi/bi/controller/DcBusiDataScreenMainController.java index dd6b8f3..27aab52 100644 --- a/lzbi-module/src/main/java/com/lzbi/bi/controller/DcBusiDataScreenMainController.java +++ b/lzbi-module/src/main/java/com/lzbi/bi/controller/DcBusiDataScreenMainController.java @@ -10,10 +10,14 @@ import com.lzbi.bi.service.DcBusiDataScreenMainService; import com.lzbi.common.core.controller.BaseController; import com.lzbi.common.core.domain.AjaxResult; +import com.lzbi.common.core.domain.TreeSelect; +import com.lzbi.common.core.domain.entity.SysDept; import com.lzbi.common.utils.StringUtils; +import com.lzbi.system.service.impl.SysDeptServiceImpl; import io.swagger.annotations.Api; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; +import org.springframework.lang.Nullable; import org.springframework.web.bind.annotation.*; import java.util.HashMap; @@ -45,6 +49,9 @@ public class DcBusiDataScreenMainController extends BaseController{ @Autowired private DcBusiDataScreenMainService dcBusiDataScreenMainService; + @Autowired + private SysDeptServiceImpl sysDeptService; + /** * 大屏数据煤耗 * @return @@ -296,6 +303,16 @@ public class DcBusiDataScreenMainController extends BaseController{ //ret.put("unit",unit.get()); return AjaxResult.success(ret); } + + @GetMapping("/company/tree/{depId}") + public AjaxResult getCompanyTreeList(@Nullable @PathVariable Long depId){ + if(depId==0){ + depId=null; + } + List lsysDept = sysDeptService.selectCompany(depId); + List treeSelects = sysDeptService.buildDeptTreeSelect(lsysDept); + return AjaxResult.success( treeSelects) ; + } } /** * { diff --git a/lzbi-module/src/main/java/com/lzbi/bi/domain/VideoResp.java b/lzbi-module/src/main/java/com/lzbi/bi/domain/VideoResp.java new file mode 100644 index 0000000..7368cc2 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/bi/domain/VideoResp.java @@ -0,0 +1,6 @@ +package com.lzbi.bi.domain; + +public class VideoResp { + + +} diff --git a/lzbi-module/src/main/java/com/lzbi/bill/service/DcBusiDayPlanBillMasterService.java b/lzbi-module/src/main/java/com/lzbi/bill/service/DcBusiDayPlanBillMasterService.java index 4600c1e..80ee452 100644 --- a/lzbi-module/src/main/java/com/lzbi/bill/service/DcBusiDayPlanBillMasterService.java +++ b/lzbi-module/src/main/java/com/lzbi/bill/service/DcBusiDayPlanBillMasterService.java @@ -2,8 +2,8 @@ package com.lzbi.bill.service; import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.lzbi.bi.domain.DcBusiTargetDraftDaynew; -import com.lzbi.bi.mapper.DcBusiTargetDraftDaynewMapper; +import com.lzbi.draft.domain.DcBusiTargetDraftDaynew; +import com.lzbi.draft.mapper.DcBusiTargetDraftDaynewMapper; import com.lzbi.bill.domain.DcBusiDayPlanBillMaster; import com.lzbi.bill.domain.DcBusiDayPlanBillSub; import com.lzbi.bill.mapper.DcBusiDayPlanBillMasterMapper; @@ -11,7 +11,6 @@ import com.lzbi.bill.mapper.DcBusiDayPlanBillSubMapper; import com.lzbi.common.core.domain.entity.SysDept; import com.lzbi.common.utils.DateUtils; import com.lzbi.common.utils.SecurityUtils; -import com.lzbi.common.utils.StringUtils; import com.lzbi.system.service.impl.SysDeptServiceImpl; import com.lzbi.targetFolder.domain.DcBaseAssetTarget; import com.lzbi.targetFolder.mapper.DcBaseAssetTargetMapper; @@ -184,7 +183,6 @@ public class DcBusiDayPlanBillMasterService extends ServiceImpl subList = dcBusiDayPlanBillSubMapper.selectDcBusiPlanBillSubList(subParams); + DcBusiTargetDraftDaynew dcBusiTargetDraftDaynew; for (int i = 0, len = subList.size(); i < len; i++) { - DcBusiTargetDraftDaynew dcBusiTargetDraftDaynew = new DcBusiTargetDraftDaynew(); + dcBusiTargetDraftDaynew = new DcBusiTargetDraftDaynew(); dcBusiTargetDraftDaynew.setCompanyId(master.getCompanyId()); dcBusiTargetDraftDaynew.setOrganizeId(master.getOragnizeId()); dcBusiTargetDraftDaynew.setFieldCode(subList.get(i).getFieldCode()); diff --git a/lzbi-module/src/main/java/com/lzbi/bill/service/DcBusiMonthPlanBillMasterService.java b/lzbi-module/src/main/java/com/lzbi/bill/service/DcBusiMonthPlanBillMasterService.java index ea6a2d2..d31588d 100644 --- a/lzbi-module/src/main/java/com/lzbi/bill/service/DcBusiMonthPlanBillMasterService.java +++ b/lzbi-module/src/main/java/com/lzbi/bill/service/DcBusiMonthPlanBillMasterService.java @@ -2,9 +2,6 @@ package com.lzbi.bill.service; import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.lzbi.bi.domain.DcBusiTargetDraftDaynew; -import com.lzbi.bill.domain.DcBusiDayPlanBillMaster; -import com.lzbi.bill.domain.DcBusiDayPlanBillSub; import com.lzbi.bill.domain.DcBusiMonthPlanBillMaster; import com.lzbi.bill.domain.DcBusiMonthPlanBillSub; import com.lzbi.bill.mapper.DcBusiMonthPlanBillMasterMapper; diff --git a/lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetAdjustDayMasterController.java b/lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetAdjustDayMasterController.java index faf2ab2..a06c36d 100644 --- a/lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetAdjustDayMasterController.java +++ b/lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetAdjustDayMasterController.java @@ -11,6 +11,7 @@ import com.lzbi.draft.domain.DcBusiTargetAdjustDaySubDao; import com.lzbi.draft.service.DcBusiTargetAdjustDayMasterService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; @@ -27,7 +28,7 @@ import java.util.List; */ @Api(value = "资产指标调整单",tags = "资产指标调整单") @RestController -@RequestMapping("/asset/target/adjust") +@RequestMapping("/asset/targetDayAdjustBill") public class DcBusiTargetAdjustDayMasterController extends BaseController { @Autowired @@ -36,7 +37,7 @@ public class DcBusiTargetAdjustDayMasterController extends BaseController /** * 查询资产指标调整单主(日)列表 */ - @PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:list')") + @PreAuthorize("@ss.hasPermi('asset:targetDayAdjustBill:list')") @GetMapping("/list") public TableDataInfo list(DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao) { @@ -48,7 +49,7 @@ public class DcBusiTargetAdjustDayMasterController extends BaseController /** * 导出资产指标调整单主(日)列表 */ - @PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:export')") + @PreAuthorize("@ss.hasPermi('asset:targetDayAdjustBill:export')") @Log(title = "资产指标调整单主(日)", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao) @@ -61,18 +62,28 @@ public class DcBusiTargetAdjustDayMasterController extends BaseController /** * 获取资产指标调整单主(日)详细信息 */ - @PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:query')") + @PreAuthorize("@ss.hasPermi('asset:targetDayAdjustBill:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { return success(dcBusiTargetAdjustDayMasterService.selectDcBusiTargetAdjustDayMasterDaoById(id)); } + /** + * 获取资产指标调整单主(日)详细信息 + */ + @PreAuthorize("@ss.hasPermi('asset:targetDayAdjustBill:query')") + @GetMapping(value = "/billNo/{billNo}") + public AjaxResult getInfo(@PathVariable("billNo") String billNo) + { + return success(dcBusiTargetAdjustDayMasterService.selectDcBusiTargetAdjustDayMasterDaoByBillNo(billNo)); + } + /** * 新增资产指标调整单主(日) */ @ApiOperation("新增资产指标调整单") - @PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:add')") + @PreAuthorize("@ss.hasPermi('asset:targetDayAdjustBill:add')") @Log(title = "资产指标调整单主(日)", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao) @@ -83,7 +94,7 @@ public class DcBusiTargetAdjustDayMasterController extends BaseController /** * 修改资产指标调整单主(日) */ - @PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:edit')") + @PreAuthorize("@ss.hasPermi('asset:targetDayAdjustBill:edit')") @Log(title = "资产指标调整单主(日)", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao) @@ -94,7 +105,7 @@ public class DcBusiTargetAdjustDayMasterController extends BaseController /** * 删除资产指标调整单主(日) */ - @PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:remove')") + @PreAuthorize("@ss.hasPermi('asset:targetDayAdjustBill:remove')") @Log(title = "资产指标调整单主(日)", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) @@ -107,7 +118,7 @@ public class DcBusiTargetAdjustDayMasterController extends BaseController */ @ApiOperation("审核资产指标调整单") @ApiImplicitParam(name = "id", value = "id", dataType = "Long", dataTypeClass = Long.class, paramType = "path", required = true) - @PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:audit')") + @PreAuthorize("@ss.hasPermi('asset:targetDayAdjustBill:audit')") @Log(title = "资产指标调整单主(日)", businessType = BusinessType.OTHER) @PostMapping("/audit/{id}") public AjaxResult audit(@PathVariable("id") Long id) @@ -120,7 +131,7 @@ public class DcBusiTargetAdjustDayMasterController extends BaseController */ @ApiOperation("处理资产指标调整单") @ApiImplicitParam(name = "id", value = "id", dataType = "Long", dataTypeClass = Long.class, paramType = "path", required = true) - @PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:dispose')") + @PreAuthorize("@ss.hasPermi('asset:targetDayAdjustBill:dispose')") @Log(title = "资产指标调整单主(日)", businessType = BusinessType.OTHER) @PostMapping("/dispose/{id}") public AjaxResult dispose(@PathVariable("id") Long id) @@ -132,4 +143,35 @@ public class DcBusiTargetAdjustDayMasterController extends BaseController } } + @ApiOperation("驳回") + @PreAuthorize("@ss.hasPermi('bill:dayPlanBill:check')") + @ApiImplicitParams({ + @ApiImplicitParam(name = "billNo", value = "", dataType = "String", dataTypeClass = String.class), + }) + @PostMapping("/checkBack/{billNo}") + public AjaxResult checkBack(@PathVariable String billNo){ + return AjaxResult.success(dcBusiTargetAdjustDayMasterService.checkBack(billNo)); + } + + @ApiOperation("审核") + @PreAuthorize("@ss.hasPermi('bill:dayPlanBill:check')") + @ApiImplicitParams({ + @ApiImplicitParam(name = "billNo", value = "", dataType = "String", dataTypeClass = String.class), + }) + @PostMapping("/checkPass/{billNo}") + public AjaxResult checkPass(@PathVariable String billNo){ + + return AjaxResult.success(dcBusiTargetAdjustDayMasterService.checkPass(billNo)); + } + + @ApiOperation("反审核") + @PreAuthorize("@ss.hasPermi('bill:dayPlanBill:check')") + @ApiImplicitParams({ + @ApiImplicitParam(name = "billNo", value = "", dataType = "String", dataTypeClass = String.class), + }) + @PostMapping("/checkRevert/{billNo}") + public AjaxResult checkRevert(@PathVariable String billNo){ + return AjaxResult.success(dcBusiTargetAdjustDayMasterService.checkRevert(billNo)); + } + } diff --git a/lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetDraftDaynewController.java b/lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetDraftDaynewController.java new file mode 100644 index 0000000..6cde257 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetDraftDaynewController.java @@ -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 list = dcBusiTargetDraftDaynewService.selectDcBusiTargetDraftDaynewList(DcBusiTargetDraftDaynew); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustDayMasterDao.java b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustDayMasterDao.java index 7d24c9a..7ccbd6d 100644 --- a/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustDayMasterDao.java +++ b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustDayMasterDao.java @@ -24,22 +24,6 @@ import springfox.documentation.annotations.ApiIgnore; @Data @Accessors(chain = true) public class DcBusiTargetAdjustDayMasterDao extends BaseModuleEntity { - /** - * 待审核状态 - */ - public static final String CHECK_STATUS_PENDING_CHECK = "0"; - /** - * 已审核状态 - */ - public static final String CHECK_STATUS_CHECKED = "1"; - /** - * 已审核状态 - */ - public static final String CHECK_STATUS_PROCESSED = "2"; - /** - * 人工 - */ - public static final String CHECK_TYPE_ARTIFICIAL = "1"; private static final long serialVersionUID = 1L; @@ -154,7 +138,7 @@ public class DcBusiTargetAdjustDayMasterDao extends BaseModuleEntity { */ @ApiModelProperty(hidden = true) @Excel(name = "审核状态;0待审核 1 已经审核 2已处理") - private String checkStauts; + private String checkStatus; /** * 审核类型;1人工2自动 diff --git a/lzbi-module/src/main/java/com/lzbi/bi/domain/DcBusiTargetDraftDaynew.java b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetDraftDaynew.java similarity index 99% rename from lzbi-module/src/main/java/com/lzbi/bi/domain/DcBusiTargetDraftDaynew.java rename to lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetDraftDaynew.java index dc552b8..98685c6 100644 --- a/lzbi-module/src/main/java/com/lzbi/bi/domain/DcBusiTargetDraftDaynew.java +++ b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetDraftDaynew.java @@ -1,4 +1,4 @@ -package com.lzbi.bi.domain; +package com.lzbi.draft.domain; import java.math.BigDecimal; import java.util.Date; diff --git a/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetAdjustDayMasterMapper.java b/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetAdjustDayMasterMapper.java index e8ae001..284a041 100644 --- a/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetAdjustDayMasterMapper.java +++ b/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetAdjustDayMasterMapper.java @@ -21,6 +21,8 @@ public interface DcBusiTargetAdjustDayMasterMapper extends BaseMapper dcBusiTargetAdjustDaySubDaos = dcBusiTargetAdjustDaySubMapper.selectDcBusiTargetAdjustDaySubDaoList(dcBusiTargetAdjustDaySubDao); + dcBusiTargetAdjustDayMasterDao.setChildren(dcBusiTargetAdjustDaySubDaos); + return dcBusiTargetAdjustDayMasterDao; + } + /** * 查询资产指标调整单主(日)列表 * @@ -112,10 +126,9 @@ public class DcBusiTargetAdjustDayMasterService extends ServiceImpl children = dcBusiTargetAdjustDayMasterDao.getChildren(); for (DcBusiTargetAdjustDaySubDao dcBusiTargetAdjustDaySubDao : children) { @@ -163,6 +176,7 @@ public class DcBusiTargetAdjustDayMasterService extends ServiceImpl dcBusiTargetAdjustDaySubDaoList = dcBusiTargetAdjustDaySubMapper.selectDcBusiTargetAdjustDaySubDaoList(params); + DcBusiTargetDraftMonth dcBusiTargetDraftMonth; + // 遍历子表集合,向指标数据底稿表(日)中同步数据 + for (DcBusiTargetAdjustDaySubDao dcBusiTargetAdjustDaySubDao : dcBusiTargetAdjustDaySubDaoList) { + dcBusiTargetDraftMonth = new DcBusiTargetDraftMonth(); + dcBusiTargetDraftMonth.setCompanyId(dcBusiTargetAdjustDayMasterDao.getCompanyId()); + dcBusiTargetDraftMonth.setOrgId(dcBusiTargetAdjustDayMasterDao.getOragnizeId()); + dcBusiTargetDraftMonth.setAssetCode(dcBusiTargetAdjustDayMasterDao.getAssetCode()); + dcBusiTargetDraftMonth.setFieldCode(dcBusiTargetAdjustDayMasterDao.getFieldCode()); + dcBusiTargetDraftMonth.setTargetCode(dcBusiTargetAdjustDaySubDao.getTargetCode()); + List dcBusiTargetDraftMonthList = dcBusiTargetDraftMonthMapper.selectDcBusiTargetDraftMonthList(dcBusiTargetDraftMonth); + // 如果未查询出来指标数据底稿数据,就新增,否则修改 + if (CollectionUtils.isEmpty(dcBusiTargetDraftMonthList)) { + dcBusiTargetDraftMonth.setCompanyName(dcBusiTargetAdjustDayMasterDao.getCompanyName()); + dcBusiTargetDraftMonth.setOrgName(dcBusiTargetAdjustDayMasterDao.getOrganizeName()); + dcBusiTargetDraftMonth.setAssetName(dcBusiTargetAdjustDayMasterDao.getAssetName()); + dcBusiTargetDraftMonth.setFieldName(dcBusiTargetAdjustDayMasterDao.getFieldName()); + dcBusiTargetDraftMonth.setTargetName(dcBusiTargetAdjustDaySubDao.getTargetName()); + dcBusiTargetDraftMonth.setTargetUint(dcBusiTargetAdjustDaySubDao.getTagetUnit()); + dcBusiTargetDraftMonth.setCountDate(dcBusiTargetAdjustDayMasterDao.getDateAdjust()); + dcBusiTargetDraftMonth.setValOriginal(dcBusiTargetAdjustDaySubDao.getValOrigin()); + dcBusiTargetDraftMonth.setValAdjust(dcBusiTargetAdjustDaySubDao.getValAdjust()); + dcBusiTargetDraftMonth.setValResult(dcBusiTargetAdjustDaySubDao.getValResult()); + dcBusiTargetDraftMonthMapper.insertDcBusiTargetDraftMonth(dcBusiTargetDraftMonth); + } else { + dcBusiTargetDraftMonth = dcBusiTargetDraftMonthList.get(0); + BigDecimal valResult = dcBusiTargetDraftMonth.getValResult().add(new BigDecimal(0)); + dcBusiTargetDraftMonth.setValOriginal(valResult); + dcBusiTargetDraftMonth.setValAdjust(dcBusiTargetAdjustDaySubDao.getValAdjust()); + dcBusiTargetDraftMonth.setValResult(valResult.add(dcBusiTargetAdjustDaySubDao.getValAdjust())); + dcBusiTargetDraftMonthMapper.updateDcBusiTargetDraftMonth(dcBusiTargetDraftMonth); + } + } + // 修改审核状态为已处理 + dcBusiTargetAdjustDayMasterDao.setCheckStatus("2"); + dcBusiTargetAdjustDayMasterDao.setUpdatedBy(SecurityUtils.getUsername()); + dcBusiTargetAdjustDayMasterDao.setCreatedTime(DateUtils.getNowDate()); + return baseMapper.updateDcBusiTargetAdjustDayMasterDao(dcBusiTargetAdjustDayMasterDao); + } catch (RuntimeException e) { + log.error("处理异常", e); + throw e; + } finally { + lock.unlock(); + } + } + + @Transactional(rollbackFor = Exception.class) + public int checkRevert(String billNo) { + lock.lock(); + try { + // 查询审核资产指标调整单主表数据 + DcBusiTargetAdjustDayMasterDao master = baseMapper.selectDcBusiTargetAdjustDayMasterDaoByBillNo(billNo); + if ("0".equals(master.getCheckStatus())) { + throw new RuntimeException("反审核失败,单据未提交"); + } + if ("1".equals(master.getCheckStatus())) { + throw new RuntimeException("反审核失败,单据未审核通过"); + } + // 如果单据状态为已审核状态,需要把底稿表数据恢复 + if ("2".equals(master.getCheckStatus())) { +// String dateAdjust = master.getDateAdjust(); +// String[] dataStrArr = dateAdjust.split("-"); +// String year = null; +// String month = null; +// String day = null; +// if (dataStrArr.length == 3) { +// year = dataStrArr[0]; +// month = dataStrArr[1]; +// day = dataStrArr[2]; +// } else { +// throw new RuntimeException("调整目标日期有误"); +// } + // 查询审核资产指标调整单子表集合 +// DcBusiTargetAdjustDaySubDao params = new DcBusiTargetAdjustDaySubDao(); +// params.setBillNoMaster(billNo); +// List subList = dcBusiTargetAdjustDaySubMapper.selectDcBusiTargetAdjustDaySubDaoList(params); +// DcBusiTargetDraftDaynew dcBusiTargetDraftDaynew; +// if (CollectionUtils.isEmpty(subList)) { +// for (DcBusiTargetAdjustDaySubDao sub : subList) { +// dcBusiTargetDraftDaynew = new DcBusiTargetDraftDaynew(); +// dcBusiTargetDraftDaynew.setCompanyId(master.getCompanyId()); +// dcBusiTargetDraftDaynew.setOrganizeId(master.getOragnizeId()); +// dcBusiTargetDraftDaynew.setFieldCode(master.getFieldCode()); +// dcBusiTargetDraftDaynew.setAssetCode(master.getAssetCode()); +// dcBusiTargetDraftDaynew.setTargetCode(sub.getTargetCode()); +// dcBusiTargetDraftDaynew.setDateYear(year); +// dcBusiTargetDraftDaynew.setDateMonth(month); +// dcBusiTargetDraftDaynew.setDateDay(day); +// List dcBusiTargetDraftDaynews = dcBusiTargetDraftDaynewMapper.selectDcBusiTargetDraftDaynewList(dcBusiTargetDraftDaynew); +// // 如果底稿表数据不为空,则减去计划值 +// if (!CollectionUtils.isEmpty(dcBusiTargetDraftDaynews)) { +// dcBusiTargetDraftDaynew = dcBusiTargetDraftDaynews.get(0); +// dcBusiTargetDraftDaynewMapper.updateDcBusiTargetDraftDaynew(dcBusiTargetDraftDaynew); +// } +// } +// } + } + master.setUpdatedBy(SecurityUtils.getUsername()); + master.setCreatedTime(DateUtils.getNowDate()); + master.setCheckStatus("0"); + return baseMapper.updateDcBusiTargetAdjustDayMasterDao(master); + } catch (RuntimeException e) { + log.error("处理异常", e); + throw e; + } finally { lock.unlock(); } } diff --git a/lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustDaySubService.java b/lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustDaySubService.java index 0c32554..e80f66a 100644 --- a/lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustDaySubService.java +++ b/lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustDaySubService.java @@ -2,6 +2,7 @@ package com.lzbi.draft.service; import java.util.List; import com.lzbi.common.utils.DateUtils; +import com.lzbi.common.utils.SecurityUtils; import com.lzbi.draft.domain.DcBusiTargetAdjustDaySubDao; import com.lzbi.draft.mapper.DcBusiTargetAdjustDaySubMapper; import com.lzbi.targetFolder.domain.DcBaseAssetTarget; @@ -64,6 +65,7 @@ public class DcBusiTargetAdjustDaySubService extends ServiceImpl - + @@ -50,7 +50,7 @@ updated_time, delete_by, delete_time, - check_stauts, + check_status, check_type from dc_busi_target_adjust_day_master @@ -74,7 +74,7 @@ and field_code = #{fieldCode} and field_name like concat('%', #{fieldName}, '%') and date_adjust = #{dateAdjust} - and check_stauts = #{checkStauts} + and check_status = #{checkStatus} and check_type = #{checkType} order by created_time desc @@ -85,6 +85,11 @@ where id = #{id} + @@ -109,7 +114,7 @@ updated_time, delete_by, delete_time, - check_stauts, + check_status, check_type, @@ -132,7 +137,7 @@ #{updatedTime}, #{deleteBy}, #{deleteTime}, - #{checkStauts}, + #{checkStatus}, #{checkType}, @@ -159,7 +164,7 @@ updated_time = #{updatedTime}, delete_by = #{deleteBy}, delete_time = #{deleteTime}, - check_stauts = #{checkStauts}, + check_status = #{checkStatus}, check_type = #{checkType}, where id = #{id} diff --git a/lzbi-module/src/main/resources/mapper/asset/DcBusiTargetDraftDaynewMapper.xml b/lzbi-module/src/main/resources/mapper/asset/DcBusiTargetDraftDaynewMapper.xml index 2d9c8e4..8050dfa 100644 --- a/lzbi-module/src/main/resources/mapper/asset/DcBusiTargetDraftDaynewMapper.xml +++ b/lzbi-module/src/main/resources/mapper/asset/DcBusiTargetDraftDaynewMapper.xml @@ -2,9 +2,9 @@ - + - +