From 0f318d523c3ca7887df9fe7efaefac0beb234a3c Mon Sep 17 00:00:00 2001 From: bobol Date: Fri, 5 Jan 2024 17:51:25 +0800 Subject: [PATCH] =?UTF-8?q?1=E4=B8=B6=E5=AF=BC=E5=87=BA=E9=99=88=E5=93=A5?= =?UTF-8?q?=E8=A6=81=E7=9A=84=E8=A1=A8=E6=A0=BC=202=E4=B8=B6=E6=9C=88?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application-test.yml | 2 + .../DcBusiDayPlanBillMasterService.java | 45 ++---- .../DcBusiMonthPlanBillMasterService.java | 1 + ...DcBusiTargetAdjustDayMasterController.java | 2 +- ...BusiTargetAdjustMonthMasterController.java | 131 ++++++++++++++++ .../draft/controller/ReportController.java | 28 ++-- .../domain/DcBusiTargetAdjustMonthMaster.java | 105 +++++++++++++ .../domain/DcBusiTargetAdjustMonthSub.java | 86 ++++++++++ .../DcBusiTargetAdjustMonthMasterMapper.java | 63 ++++++++ .../DcBusiTargetAdjustMonthSubMapper.java | 63 ++++++++ .../DcBusiTargetAdjustMonthMasterService.java | 91 +++++++++++ .../DcBusiTargetAdjustMonthSubService.java | 91 +++++++++++ .../task/service/WorkParamReadService.java | 115 +++++++++----- .../DcBusiTargetAdjustDayMasterMapper.xml | 0 .../DcBusiTargetAdjustDaySubMapper.xml | 0 .../DcBusiTargetAdjustMonthMasterMapper.xml | 148 ++++++++++++++++++ .../DcBusiTargetAdjustMonthSubMapper.xml | 128 +++++++++++++++ 17 files changed, 1012 insertions(+), 87 deletions(-) create mode 100644 lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetAdjustMonthMasterController.java create mode 100644 lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustMonthMaster.java create mode 100644 lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustMonthSub.java create mode 100644 lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetAdjustMonthMasterMapper.java create mode 100644 lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetAdjustMonthSubMapper.java create mode 100644 lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustMonthMasterService.java create mode 100644 lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustMonthSubService.java rename lzbi-module/src/main/resources/mapper/{asset => draft}/DcBusiTargetAdjustDayMasterMapper.xml (100%) rename lzbi-module/src/main/resources/mapper/{asset => draft}/DcBusiTargetAdjustDaySubMapper.xml (100%) create mode 100644 lzbi-module/src/main/resources/mapper/draft/DcBusiTargetAdjustMonthMasterMapper.xml create mode 100644 lzbi-module/src/main/resources/mapper/draft/DcBusiTargetAdjustMonthSubMapper.xml diff --git a/lzbi-admin/src/main/resources/application-test.yml b/lzbi-admin/src/main/resources/application-test.yml index 38b7627..059b2e5 100644 --- a/lzbi-admin/src/main/resources/application-test.yml +++ b/lzbi-admin/src/main/resources/application-test.yml @@ -99,6 +99,8 @@ spring: password: 123456 primary: master luenmeilz: + # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath) + profile: /data/luenmeilz_bi_backend/upload #视频设备监控地址 vedio-server: url: http://10.10.10.40:18000 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 80ee452..70779b7 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 @@ -15,13 +15,18 @@ import com.lzbi.system.service.impl.SysDeptServiceImpl; import com.lzbi.targetFolder.domain.DcBaseAssetTarget; import com.lzbi.targetFolder.mapper.DcBaseAssetTargetMapper; import org.apache.commons.lang3.ObjectUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import javax.annotation.Resource; +import java.util.ArrayList; import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; /** * 计划单据主Service业务层处理 @@ -58,11 +63,11 @@ public class DcBusiDayPlanBillMasterService extends ServiceImpl dcBusiDayPlanBillSubs = dcBusiDayPlanBillSubMapper.selectDcBusiPlanBillSubList(params); - if (!CollectionUtils.isEmpty(dcBusiDayPlanBillSubs)) { - dcBusiDayPlanBillMaster.setDcBusiDayPlanBillSubList(dcBusiDayPlanBillSubs); - dcBusiDayPlanBillMaster.setFieldCode(dcBusiDayPlanBillSubs.get(0).getFieldCode()); - dcBusiDayPlanBillMaster.setFieldName(dcBusiDayPlanBillSubs.get(0).getFieldName()); + List subList = dcBusiDayPlanBillSubMapper.selectDcBusiPlanBillSubList(params); + if (!CollectionUtils.isEmpty(subList)) { + dcBusiDayPlanBillMaster.setDcBusiDayPlanBillSubList(subList); + dcBusiDayPlanBillMaster.setFieldCode(subList.get(0).getFieldCode()); + dcBusiDayPlanBillMaster.setFieldName(subList.get(0).getFieldName()); } return dcBusiDayPlanBillMaster; } @@ -158,7 +163,7 @@ public class DcBusiDayPlanBillMasterService extends ServiceImpl dcBusiTargetDraftDaynews = dcBusiTargetDraftDaynewMapper.selectDcBusiTargetDraftDaynewList(dcBusiTargetDraftDaynew); // 如果底稿表数据为空,则新增底稿数据,否则,加上计划值修改 if (CollectionUtils.isEmpty(dcBusiTargetDraftDaynews)) { @@ -175,7 +180,7 @@ public class DcBusiDayPlanBillMasterService extends ServiceImpl subList = dcBusiDayPlanBillSubMapper.selectDcBusiPlanBillSubList(subParams); - DcBusiTargetDraftDaynew dcBusiTargetDraftDaynew; - for (int i = 0, len = subList.size(); i < len; i++) { - dcBusiTargetDraftDaynew = new DcBusiTargetDraftDaynew(); - dcBusiTargetDraftDaynew.setCompanyId(master.getCompanyId()); - dcBusiTargetDraftDaynew.setOrganizeId(master.getOragnizeId()); - dcBusiTargetDraftDaynew.setFieldCode(subList.get(i).getFieldCode()); - dcBusiTargetDraftDaynew.setAssetCode(subList.get(i).getAssetCode()); - dcBusiTargetDraftDaynew.setTargetCode(subList.get(i).getTargetCode()); - dcBusiTargetDraftDaynew.setDateYear(subList.get(i).getDateYear()); - dcBusiTargetDraftDaynew.setDateMonth(subList.get(i).getDateMonth()); - dcBusiTargetDraftDaynew.setDateDay(subList.get(i).getDateDay()); - List dcBusiTargetDraftDaynews = dcBusiTargetDraftDaynewMapper.selectDcBusiTargetDraftDaynewList(dcBusiTargetDraftDaynew); - // 如果底稿表数据不为空,则减去计划值 - if (!CollectionUtils.isEmpty(dcBusiTargetDraftDaynews)) { - dcBusiTargetDraftDaynew = dcBusiTargetDraftDaynews.get(0); - dcBusiTargetDraftDaynew.setValuePlan(dcBusiTargetDraftDaynew.getValuePlan().subtract(subList.get(i).getPlanValue())); - dcBusiTargetDraftDaynewMapper.updateDcBusiTargetDraftDaynew(dcBusiTargetDraftDaynew); - } - } - } master.setUpdatedBy(SecurityUtils.getUsername()); master.setCreatedTime(DateUtils.getNowDate()); master.setBillNo(billNo); 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 d31588d..8c6ce22 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 @@ -91,6 +91,7 @@ public class DcBusiMonthPlanBillMasterService extends ServiceImpl dcBusiMonthPlanBillMasters = baseMapper.selectDcBusiMonthPlanBillMasterList(params); if (!CollectionUtils.isEmpty(dcBusiMonthPlanBillMasters)) { throw new RuntimeException("单据号已存在,请重新获取"); 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 dc874cb..033a979 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 @@ -26,7 +26,7 @@ import java.util.List; * @author lienbo * @date 2023-12-05 */ -@Api(value = "资产指标调整单",tags = "资产指标调整单") +@Api(value = "资产指标日调整单",tags = "资产指标日调整单") @RestController @RequestMapping("/asset/targetDayAdjustBill") public class DcBusiTargetAdjustDayMasterController extends BaseController diff --git a/lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetAdjustMonthMasterController.java b/lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetAdjustMonthMasterController.java new file mode 100644 index 0000000..9ddfcd3 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetAdjustMonthMasterController.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. DcBusiTargetAdjustMonthMaster; +import com.lzbi.draft.service.DcBusiTargetAdjustMonthMasterService; +import com.lzbi.common.utils.poi.ExcelUtil; +import com.lzbi.common.core.page.TableDataInfo; + +/** + * 指标月调整单Controller + * + * @author lienbo + * @date 2024-01-03 + */ +@RestController +@RequestMapping("/asset/targetMonthAdjustBill") +public class DcBusiTargetAdjustMonthMasterController extends BaseController +{ + @Autowired + private DcBusiTargetAdjustMonthMasterService dcBusiTargetAdjustMonthMasterService; + + /** + * 查询指标月调整单列表 + */ + @ApiOperation("查询指标月调整单列表") + @ApiImplicitParams({ + @ApiImplicitParam(name = "DcBusiTargetAdjustMonthMaster", value = "", dataType = "DcBusiTargetAdjustMonthMaster", dataTypeClass = DcBusiTargetAdjustMonthMaster.class), + }) + @PreAuthorize("@ss.hasPermi('draft:targetMonthAdjustBill:list')") + @GetMapping("/list") + public TableDataInfo list(DcBusiTargetAdjustMonthMaster DcBusiTargetAdjustMonthMaster) + { + startPage(); + List< DcBusiTargetAdjustMonthMaster> list = dcBusiTargetAdjustMonthMasterService.selectDcBusiTargetAdjustMonthMasterList(DcBusiTargetAdjustMonthMaster); + return getDataTable(list); + } + + /** + * 导出指标月调整单列表 + */ + @ApiOperation("导出指标月调整单列表") + @ApiImplicitParams({ + @ApiImplicitParam(name = "DcBusiTargetAdjustMonthMaster", value = "", dataType = "DcBusiTargetAdjustMonthMaster", dataTypeClass = DcBusiTargetAdjustMonthMaster.class), + }) + @PreAuthorize("@ss.hasPermi('draft:targetMonthAdjustBill:export')") + @Log(title = "指标月调整单", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response,DcBusiTargetAdjustMonthMaster DcBusiTargetAdjustMonthMaster) + { + List list = dcBusiTargetAdjustMonthMasterService.selectDcBusiTargetAdjustMonthMasterList(DcBusiTargetAdjustMonthMaster); + ExcelUtil util = new ExcelUtil(DcBusiTargetAdjustMonthMaster.class); + util.exportExcel(response, list, "指标月调整单数据"); + } + + /** + * 获取指标月调整单详细信息 + */ + @ApiOperation("获取指标月调整单详细信息") + @ApiImplicitParams({ + @ApiImplicitParam(name = "id", value = "", dataType = "Long", dataTypeClass = Long.class), + }) + @PreAuthorize("@ss.hasPermi('draft:targetMonthAdjustBill:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(dcBusiTargetAdjustMonthMasterService.selectDcBusiTargetAdjustMonthMasterById(id)); + } + + /** + * 新增指标月调整单 + */ + @ApiOperation("新增指标月调整单") + @ApiImplicitParams({ + @ApiImplicitParam(name = "DcBusiTargetAdjustMonthMaster", value = "", dataType = "DcBusiTargetAdjustMonthMaster", dataTypeClass = DcBusiTargetAdjustMonthMaster.class), + }) + @PreAuthorize("@ss.hasPermi('draft:targetMonthAdjustBill:add')") + @Log(title = "指标月调整单", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody DcBusiTargetAdjustMonthMaster DcBusiTargetAdjustMonthMaster) + { + return toAjax(dcBusiTargetAdjustMonthMasterService.insertDcBusiTargetAdjustMonthMaster(DcBusiTargetAdjustMonthMaster)); + } + + /** + * 修改指标月调整单 + */ + + @ApiOperation("修改指标月调整单") + @ApiImplicitParams({ + @ApiImplicitParam(name = "DcBusiTargetAdjustMonthMaster", value = "", dataType = "DcBusiTargetAdjustMonthMaster", dataTypeClass = DcBusiTargetAdjustMonthMaster.class), + }) + @PreAuthorize("@ss.hasPermi('draft:targetMonthAdjustBill:edit')") + @Log(title = "指标月调整单", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody DcBusiTargetAdjustMonthMaster DcBusiTargetAdjustMonthMaster) + { + return toAjax(dcBusiTargetAdjustMonthMasterService.updateDcBusiTargetAdjustMonthMaster(DcBusiTargetAdjustMonthMaster)); + } + + /** + * 删除指标月调整单 + */ + @ApiOperation("删除指标月调整单") + @ApiImplicitParams({ + @ApiImplicitParam(name = "ids", value = "", dataType = "Long", dataTypeClass =Long.class), + }) + @PreAuthorize("@ss.hasPermi('draft:targetMonthAdjustBill:remove')") + @Log(title = "指标月调整单", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(dcBusiTargetAdjustMonthMasterService.deleteDcBusiTargetAdjustMonthMasterByIds(ids)); + } +} diff --git a/lzbi-module/src/main/java/com/lzbi/draft/controller/ReportController.java b/lzbi-module/src/main/java/com/lzbi/draft/controller/ReportController.java index fd4a938..0028614 100644 --- a/lzbi-module/src/main/java/com/lzbi/draft/controller/ReportController.java +++ b/lzbi-module/src/main/java/com/lzbi/draft/controller/ReportController.java @@ -12,6 +12,7 @@ import com.lzbi.draft.service.ReportService; import com.lzbi.task.domain.*; import com.lzbi.task.service.WorkParamReadService; import lombok.extern.slf4j.Slf4j; +import org.apache.ibatis.session.SqlSession; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import org.springframework.validation.annotation.Validated; @@ -87,8 +88,8 @@ public class ReportController extends BaseController { } catch (InterruptedException e) { log.error("门闩异常", e); } - String fileName = "/数据报表_" + System.currentTimeMillis() + ".xlsx"; - String filePath = ruoYiConfig.getProfile() + fileName; + String fileName = "数据报表_" + readQueryReq.getBeginTime() + "~" + readQueryReq.getEndTime() + "_" + System.currentTimeMillis() + ".xlsx"; + String filePath = ruoYiConfig.getProfile() + "/" + fileName; log.info("文件路径:{}", filePath); // 导出文件 File file = new File(filePath); @@ -97,7 +98,7 @@ public class ReportController extends BaseController { } catch (IOException e) { log.error("IO异常", e); } - try(ExcelWriter excelWriter = EasyExcel.write(file).build()) { + try (ExcelWriter excelWriter = EasyExcel.write(file).build()) { WriteSheet writeSheet; // 构建sheet对象 writeSheet = EasyExcel.writerSheet(map.get("s1").getSheetName()).head(map.get("s1").getHeadClass()).build(); @@ -123,20 +124,20 @@ public class ReportController extends BaseController { //设置response的Header try { //header仍是乱码??? - response.setHeader("Content-Disposition","attachment;filename=" + URLEncoder.encode(fileName,"UTF8")); + response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF8")); } catch (UnsupportedEncodingException e) { log.error("设置header异常", e); } - response.addHeader("Cache-Control","no-cache"); - InputStream inputStream=null; - ByteArrayOutputStream bos=null; + response.addHeader("Cache-Control", "no-cache"); + InputStream inputStream = null; + ByteArrayOutputStream bos = null; try { inputStream = new FileInputStream(file); bos = new ByteArrayOutputStream(1024); - int len = -1; + int len; byte[] b = new byte[1024]; - while((len = inputStream.read(b)) != -1){ - bos.write(b,0,len); + while ((len = inputStream.read(b)) != -1) { + bos.write(b, 0, len); } response.getOutputStream().write(bos.toByteArray()); //刷新 @@ -148,10 +149,10 @@ public class ReportController extends BaseController { } finally { //关闭流 try { - if(inputStream != null) { + if (inputStream != null) { inputStream.close(); } - if(bos != null) { + if (bos != null) { bos.close(); } } catch (IOException e) { @@ -164,6 +165,7 @@ public class ReportController extends BaseController { /** * 获取数据 + * * @param readQueryReq * @return */ @@ -174,6 +176,7 @@ public class ReportController extends BaseController { /** * 获取数据 + * * @param readQueryReq * @return */ @@ -184,6 +187,7 @@ public class ReportController extends BaseController { /** * 获取小时天气 + * * @param readQueryReq * @return */ diff --git a/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustMonthMaster.java b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustMonthMaster.java new file mode 100644 index 0000000..5b545a8 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustMonthMaster.java @@ -0,0 +1,105 @@ +package com.lzbi.draft.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import lombok.Data; +import io.swagger.annotations.ApiModelProperty; +import lombok.experimental.Accessors; +import com.lzbi.common.annotation.Excel; +import com.lzbi.module.base.BaseModuleEntity; + +/** + * 指标月调整单对象 dc_busi_target_adjust_month_master + * + * @author lienbo + * @date 2024-01-03 + */ +@Data +@Accessors(chain = true) +public class DcBusiTargetAdjustMonthMaster extends BaseModuleEntity +{ + private static final long serialVersionUID = 1L; + + /** 单据号 */ + @Excel(name = "单据号") + @ApiModelProperty(name = "单据号",notes = "billSerial") + private String billSerial; + + /** 单据类别 */ + @Excel(name = "单据类别") + @ApiModelProperty(name = "单据类别",notes = "biilType") + private String biilType; + + /** 公司ID */ + @Excel(name = "公司ID") + @ApiModelProperty(name = "公司ID",notes = "companyId") + private Long companyId; + + /** 公司名称 */ + @Excel(name = "公司名称") + @ApiModelProperty(name = "公司名称",notes = "companyName") + private String companyName; + + /** 组织机构名称 */ + @Excel(name = "组织机构名称") + @ApiModelProperty(name = "组织机构名称",notes = "organizeName") + private String organizeName; + + /** 组织机构ID */ + @Excel(name = "组织机构ID") + @ApiModelProperty(name = "组织机构ID",notes = "oragnizeId") + private Long oragnizeId; + + /** 统计单元编码 */ + @Excel(name = "统计单元编码") + @ApiModelProperty(name = "统计单元编码",notes = "assetCode") + private String assetCode; + + /** 统计单元名称 */ + @Excel(name = "统计单元名称") + @ApiModelProperty(name = "统计单元名称",notes = "assetName") + private String assetName; + + /** 统计专业代码 */ + @Excel(name = "统计专业代码") + @ApiModelProperty(name = "统计专业代码",notes = "fieldCode") + private String fieldCode; + + /** 统计专业名称 */ + @Excel(name = "统计专业名称") + @ApiModelProperty(name = "统计专业名称",notes = "fieldName") + private String fieldName; + + /** 主键 */ + private Long id; + + /** 调整目标日期 */ + @Excel(name = "调整目标日期") + @ApiModelProperty(name = "调整目标日期",notes = "dateAdjust") + private String dateAdjust; + + /** 创建人 */ + private String createdBy; + + /** 创建时间 */ + private Date createdTime; + + /** 更新人 */ + private String updatedBy; + + /** 更新时间 */ + private Date updatedTime; + + /** 审核状态;0待审核 1 已经审核 2已处理 */ + @Excel(name = "审核状态;0待审核 1 已经审核 2已处理") + @ApiModelProperty(name = "审核状态;0待审核 1 已经审核 2已处理",notes = "checkStatus") + private String checkStatus; + + /** 审核类型;1人工2自动 */ + @Excel(name = "审核类型;1人工2自动") + @ApiModelProperty(name = "审核类型;1人工2自动",notes = "checkType") + private String checkType; + +} diff --git a/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustMonthSub.java b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustMonthSub.java new file mode 100644 index 0000000..b428483 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustMonthSub.java @@ -0,0 +1,86 @@ +package com.lzbi.draft.domain; + +import java.math.BigDecimal; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import lombok.Data; +import io.swagger.annotations.ApiModelProperty; +import lombok.experimental.Accessors; +import com.lzbi.common.annotation.Excel; +import com.lzbi.module.base.BaseModuleEntity; + +/** + * 统计单元指标调整单子(月)对象 dc_busi_target_adjust_month_sub + * + * @author lienbo + * @date 2024-01-03 + */ +@Data +@Accessors(chain = true) +public class DcBusiTargetAdjustMonthSub extends BaseModuleEntity +{ + private static final long serialVersionUID = 1L; + + /** 创建人 */ + private String createdBy; + + /** 创建时间 */ + private Date createdTime; + + /** 更新人 */ + private String updatedBy; + + /** 更新时间 */ + private Date updatedTime; + + /** 主键 */ + private Long id; + + /** 主单据编号 */ + @Excel(name = "主单据编号") + @ApiModelProperty(name = "主单据编号",notes = "billNoMaster") + private String billNoMaster; + + /** 指标编码 */ + @Excel(name = "指标编码") + @ApiModelProperty(name = "指标编码",notes = "targetCode") + private String targetCode; + + /** 指标名称 */ + @Excel(name = "指标名称") + @ApiModelProperty(name = "指标名称",notes = "targetName") + private String targetName; + + /** 指标单位 */ + @Excel(name = "指标单位") + @ApiModelProperty(name = "指标单位",notes = "tagetUnit") + private String tagetUnit; + + /** 日期调整日期 */ + @Excel(name = "日期调整日期") + @ApiModelProperty(name = "日期调整日期",notes = "adjustDate") + private String adjustDate; + + /** 调整时间 */ + @Excel(name = "调整时间") + @ApiModelProperty(name = "调整时间",notes = "adjstTime") + private Long adjstTime; + + /** 原值 */ + @Excel(name = "原值") + @ApiModelProperty(name = "原值",notes = "valOrigin") + private BigDecimal valOrigin; + + /** 调整值 */ + @Excel(name = "调整值") + @ApiModelProperty(name = "调整值",notes = "valAdjust") + private BigDecimal valAdjust; + + /** 结果值 */ + @Excel(name = "结果值") + @ApiModelProperty(name = "结果值",notes = "valResult") + private BigDecimal valResult; + +} diff --git a/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetAdjustMonthMasterMapper.java b/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetAdjustMonthMasterMapper.java new file mode 100644 index 0000000..fbbfe42 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetAdjustMonthMasterMapper.java @@ -0,0 +1,63 @@ +package com.lzbi.draft.mapper; + +import java.util.List; +import com.lzbi.draft.domain.DcBusiTargetAdjustMonthMaster; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * 指标月调整单Mapper接口 + * + * @author lienbo + * @date 2024-01-03 + */ + +public interface DcBusiTargetAdjustMonthMasterMapper extends BaseMapper +{ + /** + * 查询指标月调整单 + * + * @param id 指标月调整单主键 + * @return 指标月调整单 + */ + public DcBusiTargetAdjustMonthMaster selectDcBusiTargetAdjustMonthMasterById(Long id); + + /** + * 查询指标月调整单列表 + * + * @param dcBusiTargetAdjustMonthMaster 指标月调整单 + * @return 指标月调整单集合 + */ + public List selectDcBusiTargetAdjustMonthMasterList(DcBusiTargetAdjustMonthMaster dcBusiTargetAdjustMonthMaster); + + /** + * 新增指标月调整单 + * + * @param dcBusiTargetAdjustMonthMaster 指标月调整单 + * @return 结果 + */ + public int insertDcBusiTargetAdjustMonthMaster(DcBusiTargetAdjustMonthMaster dcBusiTargetAdjustMonthMaster); + + /** + * 修改指标月调整单 + * + * @param dcBusiTargetAdjustMonthMaster 指标月调整单 + * @return 结果 + */ + public int updateDcBusiTargetAdjustMonthMaster(DcBusiTargetAdjustMonthMaster dcBusiTargetAdjustMonthMaster); + + /** + * 删除指标月调整单 + * + * @param id 指标月调整单主键 + * @return 结果 + */ + public int deleteDcBusiTargetAdjustMonthMasterById(Long id); + + /** + * 批量删除指标月调整单 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteDcBusiTargetAdjustMonthMasterByIds(Long[] ids); +} diff --git a/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetAdjustMonthSubMapper.java b/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetAdjustMonthSubMapper.java new file mode 100644 index 0000000..a710283 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetAdjustMonthSubMapper.java @@ -0,0 +1,63 @@ +package com.lzbi.draft.mapper; + +import java.util.List; +import com.lzbi.draft.domain.DcBusiTargetAdjustMonthSub; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * 统计单元指标调整单子(月)Mapper接口 + * + * @author lienbo + * @date 2024-01-03 + */ + +public interface DcBusiTargetAdjustMonthSubMapper extends BaseMapper +{ + /** + * 查询统计单元指标调整单子(月) + * + * @param id 统计单元指标调整单子(月)主键 + * @return 统计单元指标调整单子(月) + */ + public DcBusiTargetAdjustMonthSub selectDcBusiTargetAdjustMonthSubById(Long id); + + /** + * 查询统计单元指标调整单子(月)列表 + * + * @param dcBusiTargetAdjustMonthSub 统计单元指标调整单子(月) + * @return 统计单元指标调整单子(月)集合 + */ + public List selectDcBusiTargetAdjustMonthSubList(DcBusiTargetAdjustMonthSub dcBusiTargetAdjustMonthSub); + + /** + * 新增统计单元指标调整单子(月) + * + * @param dcBusiTargetAdjustMonthSub 统计单元指标调整单子(月) + * @return 结果 + */ + public int insertDcBusiTargetAdjustMonthSub(DcBusiTargetAdjustMonthSub dcBusiTargetAdjustMonthSub); + + /** + * 修改统计单元指标调整单子(月) + * + * @param dcBusiTargetAdjustMonthSub 统计单元指标调整单子(月) + * @return 结果 + */ + public int updateDcBusiTargetAdjustMonthSub(DcBusiTargetAdjustMonthSub dcBusiTargetAdjustMonthSub); + + /** + * 删除统计单元指标调整单子(月) + * + * @param id 统计单元指标调整单子(月)主键 + * @return 结果 + */ + public int deleteDcBusiTargetAdjustMonthSubById(Long id); + + /** + * 批量删除统计单元指标调整单子(月) + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteDcBusiTargetAdjustMonthSubByIds(Long[] ids); +} diff --git a/lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustMonthMasterService.java b/lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustMonthMasterService.java new file mode 100644 index 0000000..82d5689 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustMonthMasterService.java @@ -0,0 +1,91 @@ +package com.lzbi.draft.service; + +import java.util.List; +import com.lzbi.common.utils.DateUtils; +import org.springframework.stereotype.Service; +import com.lzbi.draft.domain.DcBusiTargetAdjustMonthMaster; +import com.lzbi.draft.mapper.DcBusiTargetAdjustMonthMasterMapper; +import com.baomidou.mybatisplus.extension.service.IService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +/** + * 指标月调整单Service业务层处理 + * + * @author lienbo + * @date 2024-01-03 + */ +@Service +public class DcBusiTargetAdjustMonthMasterService extends ServiceImpl implements IService +{ + + /** + * 查询指标月调整单 + * + * @param id 指标月调整单主键 + * @return 指标月调整单 + */ + public DcBusiTargetAdjustMonthMaster selectDcBusiTargetAdjustMonthMasterById(Long id) + { + return baseMapper.selectDcBusiTargetAdjustMonthMasterById(id); + } + + /** + * 查询指标月调整单列表 + * + * @param dcBusiTargetAdjustMonthMaster 指标月调整单 + * @return 指标月调整单 + */ + public List selectDcBusiTargetAdjustMonthMasterList(DcBusiTargetAdjustMonthMaster dcBusiTargetAdjustMonthMaster) + { + return baseMapper.selectDcBusiTargetAdjustMonthMasterList(dcBusiTargetAdjustMonthMaster); + } + + /** + * 新增指标月调整单 + * + * @param dcBusiTargetAdjustMonthMaster 指标月调整单 + * @return 结果 + */ + + public int insertDcBusiTargetAdjustMonthMaster(DcBusiTargetAdjustMonthMaster dcBusiTargetAdjustMonthMaster) + { + dcBusiTargetAdjustMonthMaster.setCreatedTime(DateUtils.getNowDate()); + return baseMapper.insertDcBusiTargetAdjustMonthMaster(dcBusiTargetAdjustMonthMaster); + } + + /** + * 修改指标月调整单 + * + * @param dcBusiTargetAdjustMonthMaster 指标月调整单 + * @return 结果 + */ + + public int updateDcBusiTargetAdjustMonthMaster(DcBusiTargetAdjustMonthMaster dcBusiTargetAdjustMonthMaster) + { + dcBusiTargetAdjustMonthMaster.setUpdatedTime(DateUtils.getNowDate()); + return baseMapper.updateDcBusiTargetAdjustMonthMaster(dcBusiTargetAdjustMonthMaster); + } + + /** + * 批量删除指标月调整单 + * + * @param ids 需要删除的指标月调整单主键 + * @return 结果 + */ + + public int deleteDcBusiTargetAdjustMonthMasterByIds(Long[] ids) + { + return baseMapper.deleteDcBusiTargetAdjustMonthMasterByIds(ids); + } + + /** + * 删除指标月调整单信息 + * + * @param id 指标月调整单主键 + * @return 结果 + */ + + public int deleteDcBusiTargetAdjustMonthMasterById(Long id) + { + return baseMapper.deleteDcBusiTargetAdjustMonthMasterById(id); + } +} diff --git a/lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustMonthSubService.java b/lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustMonthSubService.java new file mode 100644 index 0000000..8ef07a6 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustMonthSubService.java @@ -0,0 +1,91 @@ +package com.lzbi.draft.service; + +import java.util.List; +import com.lzbi.common.utils.DateUtils; +import org.springframework.stereotype.Service; +import com.lzbi.draft.domain.DcBusiTargetAdjustMonthSub; +import com.lzbi.draft.mapper.DcBusiTargetAdjustMonthSubMapper; +import com.baomidou.mybatisplus.extension.service.IService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +/** + * 统计单元指标调整单子(月)Service业务层处理 + * + * @author lienbo + * @date 2024-01-03 + */ +@Service +public class DcBusiTargetAdjustMonthSubService extends ServiceImpl implements IService +{ + + /** + * 查询统计单元指标调整单子(月) + * + * @param id 统计单元指标调整单子(月)主键 + * @return 统计单元指标调整单子(月) + */ + public DcBusiTargetAdjustMonthSub selectDcBusiTargetAdjustMonthSubById(Long id) + { + return baseMapper.selectDcBusiTargetAdjustMonthSubById(id); + } + + /** + * 查询统计单元指标调整单子(月)列表 + * + * @param dcBusiTargetAdjustMonthSub 统计单元指标调整单子(月) + * @return 统计单元指标调整单子(月) + */ + public List selectDcBusiTargetAdjustMonthSubList(DcBusiTargetAdjustMonthSub dcBusiTargetAdjustMonthSub) + { + return baseMapper.selectDcBusiTargetAdjustMonthSubList(dcBusiTargetAdjustMonthSub); + } + + /** + * 新增统计单元指标调整单子(月) + * + * @param dcBusiTargetAdjustMonthSub 统计单元指标调整单子(月) + * @return 结果 + */ + + public int insertDcBusiTargetAdjustMonthSub(DcBusiTargetAdjustMonthSub dcBusiTargetAdjustMonthSub) + { + dcBusiTargetAdjustMonthSub.setCreatedTime(DateUtils.getNowDate()); + return baseMapper.insertDcBusiTargetAdjustMonthSub(dcBusiTargetAdjustMonthSub); + } + + /** + * 修改统计单元指标调整单子(月) + * + * @param dcBusiTargetAdjustMonthSub 统计单元指标调整单子(月) + * @return 结果 + */ + + public int updateDcBusiTargetAdjustMonthSub(DcBusiTargetAdjustMonthSub dcBusiTargetAdjustMonthSub) + { + dcBusiTargetAdjustMonthSub.setUpdatedTime(DateUtils.getNowDate()); + return baseMapper.updateDcBusiTargetAdjustMonthSub(dcBusiTargetAdjustMonthSub); + } + + /** + * 批量删除统计单元指标调整单子(月) + * + * @param ids 需要删除的统计单元指标调整单子(月)主键 + * @return 结果 + */ + + public int deleteDcBusiTargetAdjustMonthSubByIds(Long[] ids) + { + return baseMapper.deleteDcBusiTargetAdjustMonthSubByIds(ids); + } + + /** + * 删除统计单元指标调整单子(月)信息 + * + * @param id 统计单元指标调整单子(月)主键 + * @return 结果 + */ + + public int deleteDcBusiTargetAdjustMonthSubById(Long id) + { + return baseMapper.deleteDcBusiTargetAdjustMonthSubById(id); + } +} diff --git a/lzbi-module/src/main/java/com/lzbi/task/service/WorkParamReadService.java b/lzbi-module/src/main/java/com/lzbi/task/service/WorkParamReadService.java index 5e211f9..e6c419e 100644 --- a/lzbi-module/src/main/java/com/lzbi/task/service/WorkParamReadService.java +++ b/lzbi-module/src/main/java/com/lzbi/task/service/WorkParamReadService.java @@ -63,13 +63,13 @@ public class WorkParamReadService extends ServiceImpl splitByDay(String startDateStr, String endDateStr) { - DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH"); - LocalDateTime startDate = LocalDateTime.parse(startDateStr, dateTimeFormatter); - LocalDateTime endDate = LocalDateTime.parse(endDateStr, dateTimeFormatter); + DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + LocalDate startDate = LocalDate.parse(startDateStr, dateTimeFormatter); + LocalDate endDate = LocalDate.parse(endDateStr, dateTimeFormatter); List dateRange = new ArrayList<>(); while (!startDate.isAfter(endDate)) { dateRange.add(dateTimeFormatter.format(startDate)); - startDate = startDate.plusDays(7); + startDate = startDate.plusDays(2); } dateRange.add(endDateStr); return dateRange; @@ -81,43 +81,62 @@ public class WorkParamReadService extends ServiceImpl workDataDTOS = new Vector(); - int size = DEVICE_CODE_ARR.length; - int SIGN = 10; - CountDownLatch countDownLatch = new CountDownLatch(SIGN); - AtomicInteger index = new AtomicInteger(0); - log.info("查询起始时间:{}", System.currentTimeMillis()); - for (int i = 0, sign = SIGN; i < sign && i < size; i++) { - CountDownLatch finalCountDownLatch = countDownLatch; - threadPoolTaskExecutor.execute(() -> { - int ii = index.getAndAdd(1); - log.info("ii = {}", ii); - ReadQueryReq req = new ReadQueryReq(); - req.setBeginTime(readQueryReq.getBeginTime()); - req.setEndTime(readQueryReq.getEndTime()); - req.setParamCodes(Arrays.asList(PARAM_CODE_ARR)); - req.setDeviceCodes(Arrays.asList(DEVICE_CODE_ARR[ii])); - log.info("{} {} sql执行起始时间 {}", ii, DEVICE_CODE_ARR[ii], System.currentTimeMillis()); - workDataDTOS.addAll(multipDeviceReadService.getMultipleDeviceData(req)); - log.info("{} {} sql执行结束时间 {}", ii, DEVICE_CODE_ARR[ii], System.currentTimeMillis()); - req = null; - finalCountDownLatch.countDown(); - }); - if (i == sign - 1 || i == size - 1) { - try { - countDownLatch.await(); - int j = size - 1 - i; - if (j < SIGN) { - SIGN = j; - } - sign += SIGN; - countDownLatch = new CountDownLatch(SIGN); - } catch (InterruptedException e) { - log.error("门闩异常", e); - } - } - } - log.info("查询结束时间:{}", System.currentTimeMillis()); + long beginTime = System.currentTimeMillis(); + + readQueryReq.setParamCodes(Arrays.asList(PARAM_CODE_ARR)); + readQueryReq.setDeviceCodes(Arrays.asList(DEVICE_CODE_ARR)); + List workDataDTOS = multipDeviceReadService.getMultipleDeviceData(readQueryReq); + +// int size = DEVICE_CODE_ARR.length; +// ReadQueryReq req; +// for (int i = 0; i < size; i++) { +// for (int j = 0, len = dateList.size(); j < len - 1; j++) { +// req = new ReadQueryReq(); +// req.setBeginTime(dateList.get(j)); +// req.setEndTime(dateList.get(j + 1)); +// req.setParamCodes(Arrays.asList(PARAM_CODE_ARR)); +// req.setDeviceCodes(Arrays.asList(DEVICE_CODE_ARR[i])); +// workDataDTOS.addAll(multipDeviceReadService.getMultipleDeviceData(req)); +// req = null; +// } +// } + +// Vector workDataDTOS = new Vector<>(); +// int size = DEVICE_CODE_ARR.length; +// int SIGN = 5; +// CountDownLatch countDownLatch = new CountDownLatch(SIGN); +// AtomicInteger index = new AtomicInteger(0); +// for (int i = 0, sign = SIGN; i < sign && i < size; i++) { +// CountDownLatch finalCountDownLatch = countDownLatch; +// threadPoolTaskExecutor.execute(() -> { +// int ii = index.getAndAdd(1); +// ReadQueryReq req = new ReadQueryReq(); +// req.setBeginTime(readQueryReq.getBeginTime()); +// req.setEndTime(readQueryReq.getEndTime()); +// req.setParamCodes(Arrays.asList(PARAM_CODE_ARR)); +// req.setDeviceCodes(Arrays.asList(DEVICE_CODE_ARR[ii])); +// long startTime = System.currentTimeMillis(); +// workDataDTOS.addAll(multipDeviceReadService.getMultipleDeviceData(req)); +// log.info("{} {} sql执行时间 {}", ii, DEVICE_CODE_ARR[ii], System.currentTimeMillis() - startTime); +// req = null; +// finalCountDownLatch.countDown(); +// }); +// if (i == sign - 1 || i == size - 1) { +// try { +// countDownLatch.await(); +// int j = size - 1 - i; +// if (j < SIGN) { +// SIGN = j; +// } +// sign += SIGN; +// countDownLatch = new CountDownLatch(SIGN); +// } catch (InterruptedException e) { +// log.error("门闩异常", e); +// } +// } +// } + + log.info("查询时间:{}", System.currentTimeMillis() - beginTime); if (!CollectionUtils.isEmpty(workDataDTOS)) { Map> timeMap = workDataDTOS.stream().collect(Collectors.groupingBy(WorkDataDTO::getThour)); Set keySet = timeMap.keySet(); @@ -180,6 +199,20 @@ public class WorkParamReadService extends ServiceImpl clazz = DaTangGuanJingDataVO.class; Field[] fields = clazz.getDeclaredFields(); + +// List dateList = this.splitByDay(readQueryReq.getBeginTime(), readQueryReq.getEndTime()); +// List workDataDTOS = new ArrayList<>(); +// ReadQueryReq req; +// for (int j = 0, len = dateList.size(); j < len - 1; j++) { +// req = new ReadQueryReq(); +// req.setBeginTime(dateList.get(j)); +// req.setEndTime(dateList.get(j + 1)); +// req.setParamCodes(Arrays.asList(PARAM_CODE_ARR)); +// req.setDeviceCodes(Arrays.asList(DEVICE_CODE_ARR)); +// workDataDTOS.addAll(multipDeviceReadService.getMultipleDeviceData(req)); +// req = null; +// } + Vector list = new Vector<>(); List workDataDTOS = baseMapper.readWorkData2(readQueryReq); if (!CollectionUtils.isEmpty(workDataDTOS)) { diff --git a/lzbi-module/src/main/resources/mapper/asset/DcBusiTargetAdjustDayMasterMapper.xml b/lzbi-module/src/main/resources/mapper/draft/DcBusiTargetAdjustDayMasterMapper.xml similarity index 100% rename from lzbi-module/src/main/resources/mapper/asset/DcBusiTargetAdjustDayMasterMapper.xml rename to lzbi-module/src/main/resources/mapper/draft/DcBusiTargetAdjustDayMasterMapper.xml diff --git a/lzbi-module/src/main/resources/mapper/asset/DcBusiTargetAdjustDaySubMapper.xml b/lzbi-module/src/main/resources/mapper/draft/DcBusiTargetAdjustDaySubMapper.xml similarity index 100% rename from lzbi-module/src/main/resources/mapper/asset/DcBusiTargetAdjustDaySubMapper.xml rename to lzbi-module/src/main/resources/mapper/draft/DcBusiTargetAdjustDaySubMapper.xml diff --git a/lzbi-module/src/main/resources/mapper/draft/DcBusiTargetAdjustMonthMasterMapper.xml b/lzbi-module/src/main/resources/mapper/draft/DcBusiTargetAdjustMonthMasterMapper.xml new file mode 100644 index 0000000..6f56abd --- /dev/null +++ b/lzbi-module/src/main/resources/mapper/draft/DcBusiTargetAdjustMonthMasterMapper.xml @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select bill_serial, biil_type, company_id, company_name, organize_name, oragnize_id, asset_code, asset_name, field_code, field_name, id, date_adjust, tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time, check_status, check_type from dc_busi_target_adjust_month_master + + + + + + + + insert into dc_busi_target_adjust_month_master + + bill_serial, + biil_type, + company_id, + company_name, + organize_name, + oragnize_id, + asset_code, + asset_name, + field_code, + field_name, + date_adjust, + tenant_id, + revision, + created_by, + created_time, + updated_by, + updated_time, + delete_by, + delete_time, + check_status, + check_type, + + + #{billSerial}, + #{biilType}, + #{companyId}, + #{companyName}, + #{organizeName}, + #{oragnizeId}, + #{assetCode}, + #{assetName}, + #{fieldCode}, + #{fieldName}, + #{dateAdjust}, + #{tenantId}, + #{revision}, + #{createdBy}, + #{createdTime}, + #{updatedBy}, + #{updatedTime}, + #{deleteBy}, + #{deleteTime}, + #{checkStatus}, + #{checkType}, + + + + + update dc_busi_target_adjust_month_master + + bill_serial = #{billSerial}, + biil_type = #{biilType}, + company_id = #{companyId}, + company_name = #{companyName}, + organize_name = #{organizeName}, + oragnize_id = #{oragnizeId}, + asset_code = #{assetCode}, + asset_name = #{assetName}, + field_code = #{fieldCode}, + field_name = #{fieldName}, + date_adjust = #{dateAdjust}, + tenant_id = #{tenantId}, + revision = #{revision}, + created_by = #{createdBy}, + created_time = #{createdTime}, + updated_by = #{updatedBy}, + updated_time = #{updatedTime}, + delete_by = #{deleteBy}, + delete_time = #{deleteTime}, + check_status = #{checkStatus}, + check_type = #{checkType}, + + where id = #{id} + + + + delete from dc_busi_target_adjust_month_master where id = #{id} + + + + delete from dc_busi_target_adjust_month_master where id in + + #{id} + + + \ No newline at end of file diff --git a/lzbi-module/src/main/resources/mapper/draft/DcBusiTargetAdjustMonthSubMapper.xml b/lzbi-module/src/main/resources/mapper/draft/DcBusiTargetAdjustMonthSubMapper.xml new file mode 100644 index 0000000..b1737ec --- /dev/null +++ b/lzbi-module/src/main/resources/mapper/draft/DcBusiTargetAdjustMonthSubMapper.xml @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + select tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time, id, bill_no_master, target_code, target_name, taget_unit, adjust_date, adjst_time, val_origin, val_adjust, val_result from dc_busi_target_adjust_month_sub + + + + + + + + insert into dc_busi_target_adjust_month_sub + + tenant_id, + revision, + created_by, + created_time, + updated_by, + updated_time, + delete_by, + delete_time, + bill_no_master, + target_code, + target_name, + taget_unit, + adjust_date, + adjst_time, + val_origin, + val_adjust, + val_result, + + + #{tenantId}, + #{revision}, + #{createdBy}, + #{createdTime}, + #{updatedBy}, + #{updatedTime}, + #{deleteBy}, + #{deleteTime}, + #{billNoMaster}, + #{targetCode}, + #{targetName}, + #{tagetUnit}, + #{adjustDate}, + #{adjstTime}, + #{valOrigin}, + #{valAdjust}, + #{valResult}, + + + + + update dc_busi_target_adjust_month_sub + + tenant_id = #{tenantId}, + revision = #{revision}, + created_by = #{createdBy}, + created_time = #{createdTime}, + updated_by = #{updatedBy}, + updated_time = #{updatedTime}, + delete_by = #{deleteBy}, + delete_time = #{deleteTime}, + bill_no_master = #{billNoMaster}, + target_code = #{targetCode}, + target_name = #{targetName}, + taget_unit = #{tagetUnit}, + adjust_date = #{adjustDate}, + adjst_time = #{adjstTime}, + val_origin = #{valOrigin}, + val_adjust = #{valAdjust}, + val_result = #{valResult}, + + where id = #{id} + + + + delete from dc_busi_target_adjust_month_sub where id = #{id} + + + + delete from dc_busi_target_adjust_month_sub where id in + + #{id} + + + \ No newline at end of file