From 2a4b9c1c3cc8571874b2843df311432c5301f8ad Mon Sep 17 00:00:00 2001 From: bobol Date: Tue, 26 Dec 2023 17:23:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=88=E6=8C=87=E6=A0=87=E8=AE=A1=E5=88=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application-test.yml | 14 + .../DcBusiMonthPlanBillMasterController.java | 176 +++++++++++ .../domain/DcBusiMonthPlanBillMaster.java | 96 ++++++ .../bill/domain/DcBusiMonthPlanBillSub.java | 91 ++++++ .../DcBusiMonthPlanBillMasterMapper.java | 77 +++++ .../mapper/DcBusiMonthPlanBillSubMapper.java | 65 ++++ .../DcBusiDayPlanBillMasterService.java | 15 +- .../DcBusiMonthPlanBillMasterService.java | 280 ++++++++++++++++++ .../DcBusiMonthPlanBillSubService.java | 91 ++++++ .../draft/domain/DcBusiTargetDraftDay.java | 2 +- .../draft/domain/DcBusiTargetDraftMonth.java | 2 +- .../asset/DcBusiMonthPlanBillMasterMapper.xml | 155 ++++++++++ .../asset/DcBusiMonthPlanBillSubMapper.xml | 136 +++++++++ .../asset/DcBusiTargetDraftMonthMapper.xml | 19 +- 14 files changed, 1204 insertions(+), 15 deletions(-) create mode 100644 lzbi-module/src/main/java/com/lzbi/bill/controller/DcBusiMonthPlanBillMasterController.java create mode 100644 lzbi-module/src/main/java/com/lzbi/bill/domain/DcBusiMonthPlanBillMaster.java create mode 100644 lzbi-module/src/main/java/com/lzbi/bill/domain/DcBusiMonthPlanBillSub.java create mode 100644 lzbi-module/src/main/java/com/lzbi/bill/mapper/DcBusiMonthPlanBillMasterMapper.java create mode 100644 lzbi-module/src/main/java/com/lzbi/bill/mapper/DcBusiMonthPlanBillSubMapper.java create mode 100644 lzbi-module/src/main/java/com/lzbi/bill/service/DcBusiMonthPlanBillMasterService.java create mode 100644 lzbi-module/src/main/java/com/lzbi/bill/service/DcBusiMonthPlanBillSubService.java create mode 100644 lzbi-module/src/main/resources/mapper/asset/DcBusiMonthPlanBillMasterMapper.xml create mode 100644 lzbi-module/src/main/resources/mapper/asset/DcBusiMonthPlanBillSubMapper.xml diff --git a/lzbi-admin/src/main/resources/application-test.yml b/lzbi-admin/src/main/resources/application-test.yml index dfe8333..ebaed55 100644 --- a/lzbi-admin/src/main/resources/application-test.yml +++ b/lzbi-admin/src/main/resources/application-test.yml @@ -106,3 +106,17 @@ logging: level: com.lzbi: debug org.springframework: warn + +# 指标模板 +target-model: + user: TM000YH # 用户 + boiler: TM000GL # 锅炉 + electricityConsumes: TM000DH #电耗 + waterConsumes: TM000SH # 水耗 + coalConsumes: TM000MH # 煤耗 + calorific: TM000FRL # 发热量 + heatSupplied: TM000GRL # 供热量 + acreage: MJ01 # 面积 + outputOfPlant: TM000FDL # 发电量 + provideWaterAverageTemperature: TM000GSJW # 供水均温 + answerWaterAverageTemperature: TM000HSJW # 回水均温 diff --git a/lzbi-module/src/main/java/com/lzbi/bill/controller/DcBusiMonthPlanBillMasterController.java b/lzbi-module/src/main/java/com/lzbi/bill/controller/DcBusiMonthPlanBillMasterController.java new file mode 100644 index 0000000..5daef0e --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/bill/controller/DcBusiMonthPlanBillMasterController.java @@ -0,0 +1,176 @@ +package com.lzbi.bill.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.bill.domain. DcBusiMonthPlanBillMaster; +import com.lzbi.bill.service.DcBusiMonthPlanBillMasterService; +import com.lzbi.common.utils.poi.ExcelUtil; +import com.lzbi.common.core.page.TableDataInfo; + +/** + * 月计划单据Controller + * + * @author lienbo + * @date 2023-12-26 + */ +@RestController +@RequestMapping("/bill/monthPlanBill") +public class DcBusiMonthPlanBillMasterController extends BaseController +{ + @Autowired + private DcBusiMonthPlanBillMasterService dcBusiMonthPlanBillMasterService; + + /** + * 查询月计划单据列表 + */ + @ApiOperation("查询月计划单据列表") + @ApiImplicitParams({ + @ApiImplicitParam(name = "DcBusiMonthPlanBillMaster", value = "", dataType = "DcBusiMonthPlanBillMaster", dataTypeClass = DcBusiMonthPlanBillMaster.class), + }) + @PreAuthorize("@ss.hasPermi('bill:monthPlanBill:list')") + @GetMapping("/list") + public TableDataInfo list(DcBusiMonthPlanBillMaster DcBusiMonthPlanBillMaster) + { + startPage(); + List< DcBusiMonthPlanBillMaster> list = dcBusiMonthPlanBillMasterService.selectDcBusiMonthPlanBillMasterList(DcBusiMonthPlanBillMaster); + return getDataTable(list); + } + + /** + * 导出月计划单据列表 + */ + @ApiOperation("导出月计划单据列表") + @ApiImplicitParams({ + @ApiImplicitParam(name = "DcBusiMonthPlanBillMaster", value = "", dataType = "DcBusiMonthPlanBillMaster", dataTypeClass = DcBusiMonthPlanBillMaster.class), + }) + @PreAuthorize("@ss.hasPermi('bill:monthPlanBill:export')") + @Log(title = "月计划单据", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response,DcBusiMonthPlanBillMaster DcBusiMonthPlanBillMaster) + { + List list = dcBusiMonthPlanBillMasterService.selectDcBusiMonthPlanBillMasterList(DcBusiMonthPlanBillMaster); + ExcelUtil util = new ExcelUtil(DcBusiMonthPlanBillMaster.class); + util.exportExcel(response, list, "月计划单据数据"); + } + + /** + * 获取月计划单据详细信息 + */ + @ApiOperation("获取月计划单据详细信息") + @ApiImplicitParams({ + @ApiImplicitParam(name = "id", value = "", dataType = "Long", dataTypeClass = Long.class), + }) + @PreAuthorize("@ss.hasPermi('bill:monthPlanBill:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(dcBusiMonthPlanBillMasterService.selectDcBusiMonthPlanBillMasterById(id)); + } + + /** + * 获取月计划单据详细信息 + */ + @ApiOperation("获取月计划单据详细信息") + @ApiImplicitParams({ + @ApiImplicitParam(name = "billNo", value = "单据号", dataType = "String", dataTypeClass = String.class), + }) + @PreAuthorize("@ss.hasPermi('bill:monthPlanBill:query')") + @GetMapping(value = "/billNo/{billNo}") + public AjaxResult getInfo(@PathVariable("billNo") String billNo) + { + return success(dcBusiMonthPlanBillMasterService.selectDcBusiMonthPlanBillMasterByBillNo(billNo)); + } + + /** + * 新增月计划单据 + */ + @ApiOperation("新增月计划单据") + @ApiImplicitParams({ + @ApiImplicitParam(name = "DcBusiMonthPlanBillMaster", value = "", dataType = "DcBusiMonthPlanBillMaster", dataTypeClass = DcBusiMonthPlanBillMaster.class), + }) + @PreAuthorize("@ss.hasPermi('bill:monthPlanBill:add')") + @Log(title = "月计划单据", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody DcBusiMonthPlanBillMaster DcBusiMonthPlanBillMaster) + { + return toAjax(dcBusiMonthPlanBillMasterService.insertDcBusiMonthPlanBillMaster(DcBusiMonthPlanBillMaster)); + } + + /** + * 修改月计划单据 + */ + + @ApiOperation("修改月计划单据") + @ApiImplicitParams({ + @ApiImplicitParam(name = "DcBusiMonthPlanBillMaster", value = "", dataType = "DcBusiMonthPlanBillMaster", dataTypeClass = DcBusiMonthPlanBillMaster.class), + }) + @PreAuthorize("@ss.hasPermi('bill:monthPlanBill:edit')") + @Log(title = "月计划单据", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody DcBusiMonthPlanBillMaster DcBusiMonthPlanBillMaster) + { + return toAjax(dcBusiMonthPlanBillMasterService.updateDcBusiMonthPlanBillMaster(DcBusiMonthPlanBillMaster)); + } + + /** + * 删除月计划单据 + */ + @ApiOperation("删除月计划单据") + @ApiImplicitParams({ + @ApiImplicitParam(name = "ids", value = "", dataType = "Long", dataTypeClass =Long.class), + }) + @PreAuthorize("@ss.hasPermi('bill:monthPlanBill:remove')") + @Log(title = "月计划单据", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(dcBusiMonthPlanBillMasterService.deleteDcBusiMonthPlanBillMasterByIds(ids)); + } + + @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(dcBusiMonthPlanBillMasterService.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(dcBusiMonthPlanBillMasterService.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(dcBusiMonthPlanBillMasterService.checkRevert(billNo)); + } +} diff --git a/lzbi-module/src/main/java/com/lzbi/bill/domain/DcBusiMonthPlanBillMaster.java b/lzbi-module/src/main/java/com/lzbi/bill/domain/DcBusiMonthPlanBillMaster.java new file mode 100644 index 0000000..297a579 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/bill/domain/DcBusiMonthPlanBillMaster.java @@ -0,0 +1,96 @@ +package com.lzbi.bill.domain; + +import java.util.Date; +import java.util.List; + +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_month_plan_bill_master + * + * @author lienbo + * @date 2023-12-26 + */ +@Data +@Accessors(chain = true) +public class DcBusiMonthPlanBillMaster extends BaseModuleEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 单据编号 */ + @Excel(name = "单据编号") + @ApiModelProperty(name = "单据编号",notes = "billNo") + private String billNo; + + /** 采集时间 */ + @Excel(name = "采集时间") + @ApiModelProperty(name = "采集时间",notes = "billIncomeDate") + private String billIncomeDate; + + /** 单据类型 */ + @Excel(name = "单据类型") + @ApiModelProperty(name = "单据类型",notes = "billType") + private String billType; + + /** 审核类型 */ + @Excel(name = "审核类型") + @ApiModelProperty(name = "审核类型",notes = "checkType") + private String checkType; + + /** 审核状态 */ + @Excel(name = "审核状态") + @ApiModelProperty(name = "审核状态",notes = "checkStatus") + private String checkStatus; + + /** 创建人 */ + private String createdBy; + + /** 创建时间 */ + private Date createdTime; + + /** 更新人 */ + private String updatedBy; + + /** 更新时间 */ + private Date updatedTime; + + /** 公司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; + + /** 所属专业 */ + private String fieldCode; + + /** 所属专业名称 */ + private String fieldName; + + /** 计划单据明细信息 */ + private List subList; + +} diff --git a/lzbi-module/src/main/java/com/lzbi/bill/domain/DcBusiMonthPlanBillSub.java b/lzbi-module/src/main/java/com/lzbi/bill/domain/DcBusiMonthPlanBillSub.java new file mode 100644 index 0000000..066d13a --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/bill/domain/DcBusiMonthPlanBillSub.java @@ -0,0 +1,91 @@ +package com.lzbi.bill.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_month_plan_bill_sub + * + * @author lienbo + * @date 2023-12-26 + */ +@Data +@Accessors(chain = true) +public class DcBusiMonthPlanBillSub extends BaseModuleEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 单据编码 */ + @Excel(name = "单据编码") + @ApiModelProperty(name = "单据编码",notes = "billNo") + private String billNo; + + /** 所属专业 */ + @Excel(name = "所属专业") + @ApiModelProperty(name = "所属专业",notes = "fieldCode") + private String fieldCode; + + /** 所属专业名称 */ + @Excel(name = "所属专业名称") + @ApiModelProperty(name = "所属专业名称",notes = "fieldName") + private String fieldName; + + /** 统计单元编码 */ + @Excel(name = "统计单元编码") + @ApiModelProperty(name = "统计单元编码",notes = "assetCode") + private String assetCode; + + /** 统计单元名称 */ + @Excel(name = "统计单元名称") + @ApiModelProperty(name = "统计单元名称",notes = "assetName") + private String assetName; + + /** 指标编码 */ + @Excel(name = "指标编码") + @ApiModelProperty(name = "指标编码",notes = "targetCode") + private String targetCode; + + /** 指标名称 */ + @Excel(name = "指标名称") + @ApiModelProperty(name = "指标名称",notes = "targetName") + private String targetName; + + /** 参数值 */ + @Excel(name = "参数值") + @ApiModelProperty(name = "参数值",notes = "planValue") + private BigDecimal planValue; + + /** 年 */ + @Excel(name = "年") + @ApiModelProperty(name = "年",notes = "dateYear") + private String dateYear; + + /** 月 */ + @Excel(name = "月") + @ApiModelProperty(name = "月",notes = "dateMonth") + private String dateMonth; + + /** 创建人 */ + private String createdBy; + + /** 创建时间 */ + private Date createdTime; + + /** 更新人 */ + private String updatedBy; + + /** 更新时间 */ + private Date updatedTime; + +} diff --git a/lzbi-module/src/main/java/com/lzbi/bill/mapper/DcBusiMonthPlanBillMasterMapper.java b/lzbi-module/src/main/java/com/lzbi/bill/mapper/DcBusiMonthPlanBillMasterMapper.java new file mode 100644 index 0000000..66e8adf --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/bill/mapper/DcBusiMonthPlanBillMasterMapper.java @@ -0,0 +1,77 @@ +package com.lzbi.bill.mapper; + +import java.util.List; +import com.lzbi.bill.domain.DcBusiMonthPlanBillMaster; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * 月计划单据Mapper接口 + * + * @author lienbo + * @date 2023-12-26 + */ + +public interface DcBusiMonthPlanBillMasterMapper extends BaseMapper +{ + /** + * 查询月计划单据 + * + * @param id 月计划单据主键 + * @return 月计划单据 + */ + public DcBusiMonthPlanBillMaster selectDcBusiMonthPlanBillMasterById(Long id); + + /** + * 根据单据号查询 + * @param billNo + * @return + */ + DcBusiMonthPlanBillMaster selectDcBusiMonthPlanBillMasterByBillNo(String billNo); + + /** + * 查询月计划单据列表 + * + * @param dcBusiMonthPlanBillMaster 月计划单据 + * @return 月计划单据集合 + */ + public List selectDcBusiMonthPlanBillMasterList(DcBusiMonthPlanBillMaster dcBusiMonthPlanBillMaster); + + /** + * 新增月计划单据 + * + * @param dcBusiMonthPlanBillMaster 月计划单据 + * @return 结果 + */ + public int insertDcBusiMonthPlanBillMaster(DcBusiMonthPlanBillMaster dcBusiMonthPlanBillMaster); + + /** + * 修改月计划单据 + * + * @param dcBusiMonthPlanBillMaster 月计划单据 + * @return 结果 + */ + public int updateDcBusiMonthPlanBillMaster(DcBusiMonthPlanBillMaster dcBusiMonthPlanBillMaster); + + /** + * 根据单据号修改 + * @param master + * @return + */ + int updateDcBusiMonthPlanBillMasterByBillNo(DcBusiMonthPlanBillMaster master); + + /** + * 删除月计划单据 + * + * @param id 月计划单据主键 + * @return 结果 + */ + public int deleteDcBusiMonthPlanBillMasterById(Long id); + + /** + * 批量删除月计划单据 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteDcBusiMonthPlanBillMasterByIds(Long[] ids); +} diff --git a/lzbi-module/src/main/java/com/lzbi/bill/mapper/DcBusiMonthPlanBillSubMapper.java b/lzbi-module/src/main/java/com/lzbi/bill/mapper/DcBusiMonthPlanBillSubMapper.java new file mode 100644 index 0000000..74cb6e1 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/bill/mapper/DcBusiMonthPlanBillSubMapper.java @@ -0,0 +1,65 @@ +package com.lzbi.bill.mapper; + +import java.util.List; +import com.lzbi.bill.domain.DcBusiMonthPlanBillSub; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * 月计划单据明细Mapper接口 + * + * @author lienbo + * @date 2023-12-26 + */ + +public interface DcBusiMonthPlanBillSubMapper extends BaseMapper +{ + /** + * 查询月计划单据明细 + * + * @param id 月计划单据明细主键 + * @return 月计划单据明细 + */ + public DcBusiMonthPlanBillSub selectDcBusiMonthPlanBillSubById(Long id); + + /** + * 查询月计划单据明细列表 + * + * @param dcBusiMonthPlanBillSub 月计划单据明细 + * @return 月计划单据明细集合 + */ + public List selectDcBusiMonthPlanBillSubList(DcBusiMonthPlanBillSub dcBusiMonthPlanBillSub); + + /** + * 新增月计划单据明细 + * + * @param dcBusiMonthPlanBillSub 月计划单据明细 + * @return 结果 + */ + public int insertDcBusiMonthPlanBillSub(DcBusiMonthPlanBillSub dcBusiMonthPlanBillSub); + + /** + * 修改月计划单据明细 + * + * @param dcBusiMonthPlanBillSub 月计划单据明细 + * @return 结果 + */ + public int updateDcBusiMonthPlanBillSub(DcBusiMonthPlanBillSub dcBusiMonthPlanBillSub); + + /** + * 删除月计划单据明细 + * + * @param id 月计划单据明细主键 + * @return 结果 + */ + public int deleteDcBusiMonthPlanBillSubById(Long id); + + /** + * 批量删除月计划单据明细 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteDcBusiMonthPlanBillSubByIds(Long[] ids); + + int deleteDcBusiMonthPlanBillSubByBillNo(String billNo); +} 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 4592fb4..4600c1e 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 @@ -84,14 +84,14 @@ public class DcBusiDayPlanBillMasterService extends ServiceImpl dcBusiDayPlanBillMasters = this.selectDcBusiPlanBillMasterList(params); // 如果单据号重复了 if (!CollectionUtils.isEmpty(dcBusiDayPlanBillMasters)) { - throw new RuntimeException("单据号已存在,不可重复录入"); + throw new RuntimeException("单据号已存在,请重新获取"); } // 查询公司 SysDept company = sysDeptService.selectDeptById(dcBusiDayPlanBillMaster.getCompanyId()); @@ -117,7 +117,6 @@ public class DcBusiDayPlanBillMasterService extends ServiceImpl dcBusiDayPlanBillSubDaoList = dcBusiDayPlanBillMaster.getDcBusiDayPlanBillSubList(); - if (StringUtils.isNotNull(dcBusiDayPlanBillSubDaoList)) { + if (!CollectionUtils.isEmpty(dcBusiDayPlanBillSubDaoList)) { for (DcBusiDayPlanBillSub dcBusiDayPlanBillSubDao : dcBusiDayPlanBillSubDaoList) { dcBusiDayPlanBillSubDao.setBillNo(dcBusiDayPlanBillMaster.getBillNo()); dcBusiDayPlanBillSubMapper.insertDcBusiPlanBillSub(dcBusiDayPlanBillSubDao); 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 new file mode 100644 index 0000000..ea6a2d2 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/bill/service/DcBusiMonthPlanBillMasterService.java @@ -0,0 +1,280 @@ +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; +import com.lzbi.bill.mapper.DcBusiMonthPlanBillSubMapper; +import com.lzbi.common.core.domain.entity.SysDept; +import com.lzbi.common.utils.DateUtils; +import com.lzbi.common.utils.SecurityUtils; +import com.lzbi.draft.domain.DcBusiTargetDraftMonth; +import com.lzbi.draft.mapper.DcBusiTargetDraftMonthMapper; +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.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.List; + +/** + * 月计划单据Service业务层处理 + * + * @author lienbo + * @date 2023-12-26 + */ +@Service +public class DcBusiMonthPlanBillMasterService extends ServiceImpl implements IService +{ + + @Autowired + private SysDeptServiceImpl sysDeptService; + + @Resource + private DcBusiMonthPlanBillSubMapper dcBusiMonthPlanBillSubMapper; + + @Resource + private DcBusiTargetDraftMonthMapper dcBusiTargetDraftMonthMapper; + + @Resource + private DcBaseAssetTargetMapper dcBaseAssetTargetMapper; + + /** + * 查询月计划单据 + * + * @param id 月计划单据主键 + * @return 月计划单据 + */ + public DcBusiMonthPlanBillMaster selectDcBusiMonthPlanBillMasterById(Long id) + { + return baseMapper.selectDcBusiMonthPlanBillMasterById(id); + } + + public DcBusiMonthPlanBillMaster selectDcBusiMonthPlanBillMasterByBillNo(String billNo) { + DcBusiMonthPlanBillMaster dcBusiMonthPlanBillMaster = baseMapper.selectDcBusiMonthPlanBillMasterByBillNo(billNo); + DcBusiMonthPlanBillSub params = new DcBusiMonthPlanBillSub(); + params.setBillNo(billNo); + List dcBusiMonthPlanBillSubs = dcBusiMonthPlanBillSubMapper.selectDcBusiMonthPlanBillSubList(params); + if (!CollectionUtils.isEmpty(dcBusiMonthPlanBillSubs)) { + dcBusiMonthPlanBillMaster.setSubList(dcBusiMonthPlanBillSubs); + dcBusiMonthPlanBillMaster.setFieldCode(dcBusiMonthPlanBillSubs.get(0).getFieldCode()); + dcBusiMonthPlanBillMaster.setFieldName(dcBusiMonthPlanBillSubs.get(0).getFieldName()); + } + return dcBusiMonthPlanBillMaster; + } + + /** + * 查询月计划单据列表 + * + * @param dcBusiMonthPlanBillMaster 月计划单据 + * @return 月计划单据 + */ + public List selectDcBusiMonthPlanBillMasterList(DcBusiMonthPlanBillMaster dcBusiMonthPlanBillMaster) + { + return baseMapper.selectDcBusiMonthPlanBillMasterList(dcBusiMonthPlanBillMaster); + } + + /** + * 新增月计划单据 + * + * @param dcBusiMonthPlanBillMaster 月计划单据 + * @return 结果 + */ + + @Transactional(rollbackFor = Exception.class) + public int insertDcBusiMonthPlanBillMaster(DcBusiMonthPlanBillMaster dcBusiMonthPlanBillMaster) + { + DcBusiMonthPlanBillMaster params = new DcBusiMonthPlanBillMaster(); + List dcBusiMonthPlanBillMasters = baseMapper.selectDcBusiMonthPlanBillMasterList(params); + if (!CollectionUtils.isEmpty(dcBusiMonthPlanBillMasters)) { + throw new RuntimeException("单据号已存在,请重新获取"); + } + // 查询公司 + SysDept company = sysDeptService.selectDeptById(dcBusiMonthPlanBillMaster.getCompanyId()); + if (ObjectUtils.isNotEmpty(company)) { + dcBusiMonthPlanBillMaster.setCompanyName(company.getDeptName()); + } + // 查询组织 + SysDept organize = sysDeptService.selectDeptById(dcBusiMonthPlanBillMaster.getOragnizeId()); + if (ObjectUtils.isNotEmpty(organize)) { + dcBusiMonthPlanBillMaster.setOrganizeName(organize.getDeptName()); + } + this.insertSub(dcBusiMonthPlanBillMaster); + dcBusiMonthPlanBillMaster.setCreatedTime(DateUtils.getNowDate()); + dcBusiMonthPlanBillMaster.setCreatedBy(SecurityUtils.getLoginUser().getUsername()); + return baseMapper.insertDcBusiMonthPlanBillMaster(dcBusiMonthPlanBillMaster); + } + + private void insertSub(DcBusiMonthPlanBillMaster dcBusiMonthPlanBillMaster) { + List subList = dcBusiMonthPlanBillMaster.getSubList(); + if (!CollectionUtils.isEmpty(subList)) { + subList.forEach(item -> { + item.setBillNo(dcBusiMonthPlanBillMaster.getBillNo()); + dcBusiMonthPlanBillSubMapper.insertDcBusiMonthPlanBillSub(item); + }); + } + } + + /** + * 修改月计划单据 + * + * @param dcBusiMonthPlanBillMaster 月计划单据 + * @return 结果 + */ + + @Transactional(rollbackFor = Exception.class) + public int updateDcBusiMonthPlanBillMaster(DcBusiMonthPlanBillMaster dcBusiMonthPlanBillMaster) + { + dcBusiMonthPlanBillSubMapper.deleteDcBusiMonthPlanBillSubByBillNo(dcBusiMonthPlanBillMaster.getBillNo()); + this.insertSub(dcBusiMonthPlanBillMaster); + dcBusiMonthPlanBillMaster.setUpdatedTime(DateUtils.getNowDate()); + dcBusiMonthPlanBillMaster.setUpdatedBy(SecurityUtils.getLoginUser().getUsername()); + return baseMapper.updateDcBusiMonthPlanBillMaster(dcBusiMonthPlanBillMaster); + } + + /** + * 批量删除月计划单据 + * + * @param ids 需要删除的月计划单据主键 + * @return 结果 + */ + + public int deleteDcBusiMonthPlanBillMasterByIds(Long[] ids) + { + int count = 0; + for (int i = 0, len = ids.length; i < len; i++) { + count += this.deleteDcBusiMonthPlanBillMasterById(ids[i]); + } + return count; + } + + /** + * 删除月计划单据信息 + * + * @param id 月计划单据主键 + * @return 结果 + */ + @Transactional(rollbackFor = Exception.class) + public int deleteDcBusiMonthPlanBillMasterById(Long id) + { + DcBusiMonthPlanBillMaster dcBusiMonthPlanBillMaster = baseMapper.selectDcBusiMonthPlanBillMasterById(id); + dcBusiMonthPlanBillSubMapper.deleteDcBusiMonthPlanBillSubByBillNo(dcBusiMonthPlanBillMaster.getBillNo()); + return baseMapper.deleteDcBusiMonthPlanBillMasterById(id); + } + + public int checkBack(String billNo) { + DcBusiMonthPlanBillMaster master = new DcBusiMonthPlanBillMaster(); + master.setBillNo(billNo); + master.setUpdatedBy(SecurityUtils.getUsername()); + master.setCreatedTime(DateUtils.getNowDate()); + master.setCheckStatus("0"); + return baseMapper.updateDcBusiMonthPlanBillMasterByBillNo(master); + } + + public int checkPass(String billNo) { + // 查询主表数据 + DcBusiMonthPlanBillMaster master = baseMapper.selectDcBusiMonthPlanBillMasterByBillNo(billNo); + if ("0".equals(master.getCheckStatus())) { + throw new RuntimeException("审核失败,单据未提交"); + } + if ("2".equals(master.getCheckStatus())) { + throw new RuntimeException("审核失败,单据已审核"); + } + // 查询子表数据 + DcBusiMonthPlanBillSub subParams = new DcBusiMonthPlanBillSub(); + subParams.setBillNo(billNo); + List subList = dcBusiMonthPlanBillSubMapper.selectDcBusiMonthPlanBillSubList(subParams); + DcBusiTargetDraftMonth dcBusiTargetDraftMonth; + if (!CollectionUtils.isEmpty(subList)) { + // 循环修改底稿表数据 + for (int i = 0, len = subList.size(); i < len; i++) { + dcBusiTargetDraftMonth = new DcBusiTargetDraftMonth(); + dcBusiTargetDraftMonth.setCompanyId(master.getCompanyId()); + dcBusiTargetDraftMonth.setOrgId(master.getOragnizeId()); + dcBusiTargetDraftMonth.setFieldCode(subList.get(i).getFieldCode()); + dcBusiTargetDraftMonth.setAssetCode(subList.get(i).getAssetCode()); + dcBusiTargetDraftMonth.setTargetCode(subList.get(i).getTargetCode()); + dcBusiTargetDraftMonth.setCountYear(subList.get(i).getDateYear()); + dcBusiTargetDraftMonth.setCountMonth(subList.get(i).getDateMonth()); + List dcBusiTargetDraftDaynews = dcBusiTargetDraftMonthMapper.selectDcBusiTargetDraftMonthList(dcBusiTargetDraftMonth); + // 如果底稿表数据为空,则新增底稿数据,否则,加上计划值修改 + if (CollectionUtils.isEmpty(dcBusiTargetDraftDaynews)) { + dcBusiTargetDraftMonth.setCompanyName(master.getCompanyName()); + dcBusiTargetDraftMonth.setOrgName(master.getOrganizeName()); + dcBusiTargetDraftMonth.setFieldName(subList.get(i).getFieldName()); + dcBusiTargetDraftMonth.setAssetName(subList.get(i).getAssetName()); + dcBusiTargetDraftMonth.setTargetName(subList.get(i).getTargetName()); + DcBaseAssetTarget dcBaseAssetTarget = dcBaseAssetTargetMapper.selectDcBaseAssetTargetByTargetCodeAndAssetCode(subList.get(i).getTargetCode(), subList.get(i).getAssetCode()); + if (ObjectUtils.isNotEmpty(dcBaseAssetTarget)) { + dcBusiTargetDraftMonth.setTargetModelCode(dcBaseAssetTarget.getTargetModelCode()); + dcBusiTargetDraftMonth.setTargetUint(dcBaseAssetTarget.getFieldUnit()); + dcBusiTargetDraftMonth.setTargetNameAlias(dcBaseAssetTarget.getTargetNameAlias()); + } + dcBusiTargetDraftMonth.setCountDate(subList.get(i).getDateYear() + "-" + subList.get(i).getDateMonth()); + dcBusiTargetDraftMonth.setValPlan(subList.get(i).getPlanValue()); + dcBusiTargetDraftMonthMapper.insertDcBusiTargetDraftMonth(dcBusiTargetDraftMonth); + } else { + dcBusiTargetDraftMonth = dcBusiTargetDraftDaynews.get(0); + dcBusiTargetDraftMonth.setValPlan(dcBusiTargetDraftMonth.getValPlan().add(subList.get(i).getPlanValue())); + dcBusiTargetDraftMonthMapper.updateDcBusiTargetDraftMonth(dcBusiTargetDraftMonth); + } + } + } + // 修改计划单状态为2 + master.setUpdatedBy(SecurityUtils.getUsername()); + master.setCreatedTime(DateUtils.getNowDate()); + master.setBillNo(billNo); + master.setCheckStatus("2"); + return baseMapper.updateDcBusiMonthPlanBillMaster(master); + } + + public int checkRevert(String billNo) { + // 查询主表 + DcBusiMonthPlanBillMaster master = baseMapper.selectDcBusiMonthPlanBillMasterByBillNo(billNo); + if ("0".equals(master.getCheckStatus())) { + throw new RuntimeException("反审核失败,单据未提交"); + } + if ("1".equals(master.getCheckStatus())) { + throw new RuntimeException("反审核失败,单据未审核通过"); + } + // 如果单据状态为已审核状态,需要把底稿表数据恢复 + if ("2".equals(master.getCheckStatus())) { + // 查询子表数据 + DcBusiMonthPlanBillSub subParams = new DcBusiMonthPlanBillSub(); + subParams.setBillNo(billNo); + List subList = dcBusiMonthPlanBillSubMapper.selectDcBusiMonthPlanBillSubList(subParams); + DcBusiTargetDraftMonth dcBusiTargetDraftMonth; + for (int i = 0, len = subList.size(); i < len; i++) { + dcBusiTargetDraftMonth = new DcBusiTargetDraftMonth(); + dcBusiTargetDraftMonth.setCompanyId(master.getCompanyId()); + dcBusiTargetDraftMonth.setOrgId(master.getOragnizeId()); + dcBusiTargetDraftMonth.setFieldCode(subList.get(i).getFieldCode()); + dcBusiTargetDraftMonth.setAssetCode(subList.get(i).getAssetCode()); + dcBusiTargetDraftMonth.setTargetCode(subList.get(i).getTargetCode()); + dcBusiTargetDraftMonth.setCountYear(subList.get(i).getDateYear()); + dcBusiTargetDraftMonth.setCountMonth(subList.get(i).getDateMonth()); + List dcBusiTargetDraftMonthList = dcBusiTargetDraftMonthMapper.selectDcBusiTargetDraftMonthList(dcBusiTargetDraftMonth); + // 如果底稿表数据不为空,则减去计划值 + if (!CollectionUtils.isEmpty(dcBusiTargetDraftMonthList)) { + dcBusiTargetDraftMonth = dcBusiTargetDraftMonthList.get(0); + dcBusiTargetDraftMonth.setValPlan(dcBusiTargetDraftMonth.getValPlan().subtract(subList.get(i).getPlanValue())); + dcBusiTargetDraftMonthMapper.updateDcBusiTargetDraftMonth(dcBusiTargetDraftMonth); + } + } + } + master.setUpdatedBy(SecurityUtils.getUsername()); + master.setCreatedTime(DateUtils.getNowDate()); + master.setBillNo(billNo); + master.setCheckStatus("0"); + return baseMapper.updateDcBusiMonthPlanBillMaster(master); + } +} diff --git a/lzbi-module/src/main/java/com/lzbi/bill/service/DcBusiMonthPlanBillSubService.java b/lzbi-module/src/main/java/com/lzbi/bill/service/DcBusiMonthPlanBillSubService.java new file mode 100644 index 0000000..d79ee36 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/bill/service/DcBusiMonthPlanBillSubService.java @@ -0,0 +1,91 @@ +package com.lzbi.bill.service; + +import java.util.List; +import com.lzbi.common.utils.DateUtils; +import org.springframework.stereotype.Service; +import com.lzbi.bill.domain.DcBusiMonthPlanBillSub; +import com.lzbi.bill.mapper.DcBusiMonthPlanBillSubMapper; +import com.baomidou.mybatisplus.extension.service.IService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +/** + * 月计划单据明细Service业务层处理 + * + * @author lienbo + * @date 2023-12-26 + */ +@Service +public class DcBusiMonthPlanBillSubService extends ServiceImpl implements IService +{ + + /** + * 查询月计划单据明细 + * + * @param id 月计划单据明细主键 + * @return 月计划单据明细 + */ + public DcBusiMonthPlanBillSub selectDcBusiMonthPlanBillSubById(Long id) + { + return baseMapper.selectDcBusiMonthPlanBillSubById(id); + } + + /** + * 查询月计划单据明细列表 + * + * @param dcBusiMonthPlanBillSub 月计划单据明细 + * @return 月计划单据明细 + */ + public List selectDcBusiMonthPlanBillSubList(DcBusiMonthPlanBillSub dcBusiMonthPlanBillSub) + { + return baseMapper.selectDcBusiMonthPlanBillSubList(dcBusiMonthPlanBillSub); + } + + /** + * 新增月计划单据明细 + * + * @param dcBusiMonthPlanBillSub 月计划单据明细 + * @return 结果 + */ + + public int insertDcBusiMonthPlanBillSub(DcBusiMonthPlanBillSub dcBusiMonthPlanBillSub) + { + dcBusiMonthPlanBillSub.setCreatedTime(DateUtils.getNowDate()); + return baseMapper.insertDcBusiMonthPlanBillSub(dcBusiMonthPlanBillSub); + } + + /** + * 修改月计划单据明细 + * + * @param dcBusiMonthPlanBillSub 月计划单据明细 + * @return 结果 + */ + + public int updateDcBusiMonthPlanBillSub(DcBusiMonthPlanBillSub dcBusiMonthPlanBillSub) + { + dcBusiMonthPlanBillSub.setUpdatedTime(DateUtils.getNowDate()); + return baseMapper.updateDcBusiMonthPlanBillSub(dcBusiMonthPlanBillSub); + } + + /** + * 批量删除月计划单据明细 + * + * @param ids 需要删除的月计划单据明细主键 + * @return 结果 + */ + + public int deleteDcBusiMonthPlanBillSubByIds(Long[] ids) + { + return baseMapper.deleteDcBusiMonthPlanBillSubByIds(ids); + } + + /** + * 删除月计划单据明细信息 + * + * @param id 月计划单据明细主键 + * @return 结果 + */ + + public int deleteDcBusiMonthPlanBillSubById(Long id) + { + return baseMapper.deleteDcBusiMonthPlanBillSubById(id); + } +} diff --git a/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetDraftDay.java b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetDraftDay.java index 51f0371..ca70d8e 100644 --- a/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetDraftDay.java +++ b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetDraftDay.java @@ -9,7 +9,7 @@ import com.lzbi.module.base.BaseModuleEntity; import lombok.experimental.Accessors; /** - * 指标数据底稿(月)对象 dc_busi_target_draft_month + * 指标数据底稿(月)对象 dc_busi_target_draft_day * * @author zhousq * @date 2023-12-06 diff --git a/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetDraftMonth.java b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetDraftMonth.java index cf4e3ce..7065a48 100644 --- a/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetDraftMonth.java +++ b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetDraftMonth.java @@ -93,7 +93,7 @@ public class DcBusiTargetDraftMonth extends BaseModuleEntity /** 计划值 */ @Excel(name = "计划值") - private String valPlan; + private BigDecimal valPlan; private String targetModelCode; diff --git a/lzbi-module/src/main/resources/mapper/asset/DcBusiMonthPlanBillMasterMapper.xml b/lzbi-module/src/main/resources/mapper/asset/DcBusiMonthPlanBillMasterMapper.xml new file mode 100644 index 0000000..774e19d --- /dev/null +++ b/lzbi-module/src/main/resources/mapper/asset/DcBusiMonthPlanBillMasterMapper.xml @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, bill_no, bill_income_date, bill_type, check_type, check_status, tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time, company_id, company_name, organize_name, oragnize_id from dc_busi_month_plan_bill_master + + + + + + + + + insert into dc_busi_month_plan_bill_master + + bill_no, + bill_income_date, + bill_type, + check_type, + check_status, + tenant_id, + revision, + created_by, + created_time, + updated_by, + updated_time, + delete_by, + delete_time, + company_id, + company_name, + organize_name, + oragnize_id, + + + #{billNo}, + #{billIncomeDate}, + #{billType}, + #{checkType}, + #{checkStatus}, + #{tenantId}, + #{revision}, + #{createdBy}, + #{createdTime}, + #{updatedBy}, + #{updatedTime}, + #{deleteBy}, + #{deleteTime}, + #{companyId}, + #{companyName}, + #{organizeName}, + #{oragnizeId}, + + + + + update dc_busi_month_plan_bill_master + + bill_no = #{billNo}, + bill_income_date = #{billIncomeDate}, + bill_type = #{billType}, + check_type = #{checkType}, + check_status = #{checkStatus}, + tenant_id = #{tenantId}, + revision = #{revision}, + created_by = #{createdBy}, + created_time = #{createdTime}, + updated_by = #{updatedBy}, + updated_time = #{updatedTime}, + delete_by = #{deleteBy}, + delete_time = #{deleteTime}, + company_id = #{companyId}, + company_name = #{companyName}, + organize_name = #{organizeName}, + oragnize_id = #{oragnizeId}, + + where id = #{id} + + + update dc_busi_month_plan_bill_master + + bill_income_date = #{billIncomeDate}, + bill_type = #{billType}, + check_type = #{checkType}, + check_status = #{checkStatus}, + tenant_id = #{tenantId}, + revision = #{revision}, + created_by = #{createdBy}, + created_time = #{createdTime}, + updated_by = #{updatedBy}, + updated_time = #{updatedTime}, + delete_by = #{deleteBy}, + delete_time = #{deleteTime}, + company_id = #{companyId}, + company_name = #{companyName}, + organize_name = #{organizeName}, + oragnize_id = #{oragnizeId}, + + where bill_no = #{billNo} + + + + delete from dc_busi_month_plan_bill_master where id = #{id} + + + + delete from dc_busi_month_plan_bill_master where id in + + #{id} + + + \ No newline at end of file diff --git a/lzbi-module/src/main/resources/mapper/asset/DcBusiMonthPlanBillSubMapper.xml b/lzbi-module/src/main/resources/mapper/asset/DcBusiMonthPlanBillSubMapper.xml new file mode 100644 index 0000000..a25833e --- /dev/null +++ b/lzbi-module/src/main/resources/mapper/asset/DcBusiMonthPlanBillSubMapper.xml @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, bill_no, field_code, field_name, asset_code, asset_name, target_code, target_name, plan_value, date_year, date_month, tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time from dc_busi_month_plan_bill_sub + + + + + + + + insert into dc_busi_month_plan_bill_sub + + bill_no, + field_code, + field_name, + asset_code, + asset_name, + target_code, + target_name, + plan_value, + date_year, + date_month, + tenant_id, + revision, + created_by, + created_time, + updated_by, + updated_time, + delete_by, + delete_time, + + + #{billNo}, + #{fieldCode}, + #{fieldName}, + #{assetCode}, + #{assetName}, + #{targetCode}, + #{targetName}, + #{planValue}, + #{dateYear}, + #{dateMonth}, + #{tenantId}, + #{revision}, + #{createdBy}, + #{createdTime}, + #{updatedBy}, + #{updatedTime}, + #{deleteBy}, + #{deleteTime}, + + + + + update dc_busi_month_plan_bill_sub + + bill_no = #{billNo}, + field_code = #{fieldCode}, + field_name = #{fieldName}, + asset_code = #{assetCode}, + asset_name = #{assetName}, + target_code = #{targetCode}, + target_name = #{targetName}, + plan_value = #{planValue}, + date_year = #{dateYear}, + date_month = #{dateMonth}, + tenant_id = #{tenantId}, + revision = #{revision}, + created_by = #{createdBy}, + created_time = #{createdTime}, + updated_by = #{updatedBy}, + updated_time = #{updatedTime}, + delete_by = #{deleteBy}, + delete_time = #{deleteTime}, + + where id = #{id} + + + + delete from dc_busi_month_plan_bill_sub where id = #{id} + + + + delete from dc_busi_month_plan_bill_sub where id in + + #{id} + + + + delete from dc_busi_month_plan_bill_sub where bill_no = #{billNo} + + \ No newline at end of file diff --git a/lzbi-module/src/main/resources/mapper/asset/DcBusiTargetDraftMonthMapper.xml b/lzbi-module/src/main/resources/mapper/asset/DcBusiTargetDraftMonthMapper.xml index d05f167..411bb82 100644 --- a/lzbi-module/src/main/resources/mapper/asset/DcBusiTargetDraftMonthMapper.xml +++ b/lzbi-module/src/main/resources/mapper/asset/DcBusiTargetDraftMonthMapper.xml @@ -35,11 +35,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select id, company_name, company_id, org_id, org_name, asset_code, asset_name, field_code, field_name, target_name_alias, target_name, target_code, target_uint, count_date, count_year, count_month val_original, val_adjust, val_result, tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time from dc_busi_target_draft_month + select id, company_name, company_id, org_id, org_name, asset_code, asset_name, field_code, field_name, target_name_alias, target_name, target_code, target_uint, count_date, count_year, count_month, val_original, val_adjust, val_result, val_plan, tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time from dc_busi_target_draft_month - + insert into dc_busi_target_draft_month @@ -78,9 +78,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" target_code, target_uint, count_date, + count_year, + count_month, val_original, val_adjust, val_result, + val_plan, tenant_id, revision, created_by, @@ -89,7 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" updated_time, delete_by, delete_time, - + #{companyName}, #{companyId}, @@ -104,9 +107,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{targetCode}, #{targetUint}, #{countDate}, + #{countYear}, + #{countMonth}, #{valOriginal}, #{valAdjust}, #{valResult}, + #{valPlan}, #{tenantId}, #{revision}, #{createdBy}, @@ -115,7 +121,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{updatedTime}, #{deleteBy}, #{deleteTime}, - + @@ -134,9 +140,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" target_code = #{targetCode}, target_uint = #{targetUint}, count_date = #{countDate}, + count_year = #{countYear}, + count_month = #{countMonth}, val_original = #{valOriginal}, val_adjust = #{valAdjust}, val_result = #{valResult}, + val_plan = #{valPlan}, tenant_id = #{tenantId}, revision = #{revision}, created_by = #{createdBy},