From c79ef6b5b03591f37a2d5e1d8afd7153d71916fd Mon Sep 17 00:00:00 2001 From: bobol Date: Wed, 6 Dec 2023 08:41:56 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E8=B5=84=E4=BA=A7=E6=8C=87=E6=A0=87?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=8D=95=E6=96=B0=E5=A2=9E=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../asset/mapper/DcBaseAssetInfoMapper.java | 8 + ...DcBusiTargetAdjustDayMasterController.java | 105 +++++++++++++ .../DcBusiTargetAdjustDayMasterDao.java | 91 ++++++++++++ .../domain/DcBusiTargetAdjustDaySubDao.java | 74 ++++++++++ .../DcBusiTargetAdjustDayMasterMapper.java | 63 ++++++++ .../DcBusiTargetAdjustDaySubMapper.java | 63 ++++++++ .../DcBusiTargetAdjustDayMasterService.java | 136 +++++++++++++++++ .../DcBusiTargetAdjustDaySubService.java | 96 ++++++++++++ .../mapper/asset/DcBaseAssetInfoMapper.xml | 5 + .../DcBusiTargetAdjustDayMasterMapper.xml | 138 ++++++++++++++++++ .../asset/DcBusiTargetAdjustDaySubMapper.xml | 128 ++++++++++++++++ 11 files changed, 907 insertions(+) create mode 100644 lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetAdjustDayMasterController.java create mode 100644 lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustDayMasterDao.java create mode 100644 lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustDaySubDao.java create mode 100644 lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetAdjustDayMasterMapper.java create mode 100644 lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetAdjustDaySubMapper.java create mode 100644 lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustDayMasterService.java create mode 100644 lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustDaySubService.java create mode 100644 lzbi-module/src/main/resources/mapper/asset/DcBusiTargetAdjustDayMasterMapper.xml create mode 100644 lzbi-module/src/main/resources/mapper/asset/DcBusiTargetAdjustDaySubMapper.xml diff --git a/lzbi-module/src/main/java/com/lzbi/asset/mapper/DcBaseAssetInfoMapper.java b/lzbi-module/src/main/java/com/lzbi/asset/mapper/DcBaseAssetInfoMapper.java index de06faf..9060a64 100644 --- a/lzbi-module/src/main/java/com/lzbi/asset/mapper/DcBaseAssetInfoMapper.java +++ b/lzbi-module/src/main/java/com/lzbi/asset/mapper/DcBaseAssetInfoMapper.java @@ -28,6 +28,14 @@ public interface DcBaseAssetInfoMapper { */ public List selectDcBaseAssetInfoList(DcBaseAssetInfo dcBaseAssetInfo); + /** + * 根据资产编码查询资产信息 + * + * @param assetCode 资产编码 + * @return 资产信息 + */ + DcBaseAssetInfo selectDcBaseAssetInfoByAssetCode(String assetCode); + /** * 新增资产信息 * 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 new file mode 100644 index 0000000..4420e98 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetAdjustDayMasterController.java @@ -0,0 +1,105 @@ +package com.lzbi.draft.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import com.lzbi.draft.domain.DcBusiTargetAdjustDayMasterDao; +import com.lzbi.draft.service.DcBusiTargetAdjustDayMasterService; +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.common.utils.poi.ExcelUtil; +import com.lzbi.common.core.page.TableDataInfo; + +/** + * 资产指标调整单主(日)Controller + * + * @author lienbo + * @date 2023-12-05 + */ +@RestController +@RequestMapping("/asset/target/adjust") +public class DcBusiTargetAdjustDayMasterController extends BaseController +{ + @Autowired + private DcBusiTargetAdjustDayMasterService dcBusiTargetAdjustDayMasterService; + + /** + * 查询资产指标调整单主(日)列表 + */ + @PreAuthorize("@ss.hasPermi('lzbi:master:list')") + @GetMapping("/list") + public TableDataInfo list(DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao) + { + startPage(); + List list = dcBusiTargetAdjustDayMasterService.selectDcBusiTargetAdjustDayMasterDaoList(dcBusiTargetAdjustDayMasterDao); + return getDataTable(list); + } + + /** + * 导出资产指标调整单主(日)列表 + */ + @PreAuthorize("@ss.hasPermi('lzbi:master:export')") + @Log(title = "资产指标调整单主(日)", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao) + { + List list = dcBusiTargetAdjustDayMasterService.selectDcBusiTargetAdjustDayMasterDaoList(dcBusiTargetAdjustDayMasterDao); + ExcelUtil util = new ExcelUtil(DcBusiTargetAdjustDayMasterDao.class); + util.exportExcel(response, list, "资产指标调整单主(日)数据"); + } + + /** + * 获取资产指标调整单主(日)详细信息 + */ + @PreAuthorize("@ss.hasPermi('lzbi:master:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(dcBusiTargetAdjustDayMasterService.selectDcBusiTargetAdjustDayMasterDaoById(id)); + } + + /** + * 新增资产指标调整单主(日) + */ + @PreAuthorize("@ss.hasPermi('lzbi:master:add')") + @Log(title = "资产指标调整单主(日)", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao) + { + return toAjax(dcBusiTargetAdjustDayMasterService.insertDcBusiTargetAdjustDayMasterDao(dcBusiTargetAdjustDayMasterDao)); + } + + /** + * 修改资产指标调整单主(日) + */ + @PreAuthorize("@ss.hasPermi('lzbi:master:edit')") + @Log(title = "资产指标调整单主(日)", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao) + { + return toAjax(dcBusiTargetAdjustDayMasterService.updateDcBusiTargetAdjustDayMasterDao(dcBusiTargetAdjustDayMasterDao)); + } + + /** + * 删除资产指标调整单主(日) + */ + @PreAuthorize("@ss.hasPermi('lzbi:master:remove')") + @Log(title = "资产指标调整单主(日)", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(dcBusiTargetAdjustDayMasterService.deleteDcBusiTargetAdjustDayMasterDaoByIds(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 new file mode 100644 index 0000000..f939b93 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustDayMasterDao.java @@ -0,0 +1,91 @@ +package com.lzbi.draft.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 com.lzbi.common.annotation.Excel; +import com.lzbi.module.base.BaseModuleEntity; + +/** + * 资产指标调整单主(日)对象 dc_busi_target_adjust_day_master + * + * @author win + * @date 2023-12-05 + */ + @Data +public class DcBusiTargetAdjustDayMasterDao extends BaseModuleEntity +{ + /** 待审核状态 */ + public static final String CHECK_STATUS_PENDING_CHECK = "0"; + /** 人工 */ + public static final String CHECK_TYPE_ARTIFICIAL = "0"; + + private static final long serialVersionUID = 1L; + + /** 单据号 */ + @Excel(name = "单据号") + private String billSerial; + + /** 单据类别 */ + @Excel(name = "单据类别") + private String biilType; + + /** 公司ID */ + @Excel(name = "公司ID") + private Long companyId; + + /** 公司名称 */ + @Excel(name = "公司名称") + private String companyName; + + /** 组织机构名称 */ + @Excel(name = "组织机构名称") + private String organizeName; + + /** 组织机构ID */ + @Excel(name = "组织机构ID") + private Long oragnizeId; + + /** 统计单元编码 */ + @Excel(name = "统计单元编码") + private String assetCode; + + /** 统计单元名称 */ + @Excel(name = "统计单元名称") + private String assetName; + + /** 主键 */ + private Long id; + + /** 调整目标日期 */ + @Excel(name = "调整目标日期") + private String dateAdjust; + + /** 创建人 */ + private String createdBy; + + /** 创建时间 */ + private Date createdTime; + + /** 更新人 */ + private String updatedBy; + + /** 更新时间 */ + private Date updatedTime; + + /** 审核状态;0待审核 1 已经审核 2已处理 */ + @Excel(name = "审核状态;0待审核 1 已经审核 2已处理") + private String checkStauts; + + /** 审核类型;1人工2自动 */ + @Excel(name = "审核类型;1人工2自动") + private String checkType; + + /** 统计单元指标调整单子表集合 */ + private List children; + +} diff --git a/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustDaySubDao.java b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustDaySubDao.java new file mode 100644 index 0000000..511ae70 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustDaySubDao.java @@ -0,0 +1,74 @@ +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 com.lzbi.common.annotation.Excel; +import com.lzbi.module.base.BaseModuleEntity; + +/** + * 统计单元指标调整单子(日)对象 dc_busi_target_adjust_day_sub + * + * @author win + * @date 2023-12-05 + */ + @Data +public class DcBusiTargetAdjustDaySubDao 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 = "主单据编号") + private String billNoMaster; + + /** 指标编码 */ + @Excel(name = "指标编码") + private String targetCode; + + /** 指标名称 */ + @Excel(name = "指标名称") + private String targetName; + + /** 指标单位 */ + @Excel(name = "指标单位") + private String tagetUnit; + + /** 日期调整日期 */ + @Excel(name = "日期调整日期") + private String adjustDate; + + /** 调整时间 */ + @Excel(name = "调整时间") + private Long adjstTime; + + /** 原值 */ + @Excel(name = "原值") + private BigDecimal valOrigin; + + /** 调整值 */ + @Excel(name = "调整值") + private BigDecimal valAdjust; + + /** 结果值 */ + @Excel(name = "结果值") + private BigDecimal valResult; + +} 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 new file mode 100644 index 0000000..e8ae001 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetAdjustDayMasterMapper.java @@ -0,0 +1,63 @@ +package com.lzbi.draft.mapper; + +import java.util.List; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.lzbi.draft.domain.DcBusiTargetAdjustDayMasterDao; + +/** + * 资产指标调整单主(日)Mapper接口 + * + * @author lienbo + * @date 2023-12-05 + */ + +public interface DcBusiTargetAdjustDayMasterMapper extends BaseMapper +{ + /** + * 查询资产指标调整单主(日) + * + * @param id 资产指标调整单主(日)主键 + * @return 资产指标调整单主(日) + */ + public DcBusiTargetAdjustDayMasterDao selectDcBusiTargetAdjustDayMasterDaoById(Long id); + + /** + * 查询资产指标调整单主(日)列表 + * + * @param dcBusiTargetAdjustDayMasterDao 资产指标调整单主(日) + * @return 资产指标调整单主(日)集合 + */ + public List selectDcBusiTargetAdjustDayMasterDaoList(DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao); + + /** + * 新增资产指标调整单主(日) + * + * @param dcBusiTargetAdjustDayMasterDao 资产指标调整单主(日) + * @return 结果 + */ + public int insertDcBusiTargetAdjustDayMasterDao(DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao); + + /** + * 修改资产指标调整单主(日) + * + * @param dcBusiTargetAdjustDayMasterDao 资产指标调整单主(日) + * @return 结果 + */ + public int updateDcBusiTargetAdjustDayMasterDao(DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao); + + /** + * 删除资产指标调整单主(日) + * + * @param id 资产指标调整单主(日)主键 + * @return 结果 + */ + public int deleteDcBusiTargetAdjustDayMasterDaoById(Long id); + + /** + * 批量删除资产指标调整单主(日) + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteDcBusiTargetAdjustDayMasterDaoByIds(Long[] ids); +} diff --git a/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetAdjustDaySubMapper.java b/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetAdjustDaySubMapper.java new file mode 100644 index 0000000..4a4e996 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetAdjustDaySubMapper.java @@ -0,0 +1,63 @@ +package com.lzbi.draft.mapper; + +import java.util.List; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.lzbi.draft.domain.DcBusiTargetAdjustDaySubDao; + +/** + * 统计单元指标调整单子(日)Mapper接口 + * + * @author lienbo + * @date 2023-12-05 + */ + +public interface DcBusiTargetAdjustDaySubMapper extends BaseMapper +{ + /** + * 查询统计单元指标调整单子(日) + * + * @param id 统计单元指标调整单子(日)主键 + * @return 统计单元指标调整单子(日) + */ + public DcBusiTargetAdjustDaySubDao selectDcBusiTargetAdjustDaySubDaoById(Long id); + + /** + * 查询统计单元指标调整单子(日)列表 + * + * @param dcBusiTargetAdjustDaySubDao 统计单元指标调整单子(日) + * @return 统计单元指标调整单子(日)集合 + */ + public List selectDcBusiTargetAdjustDaySubDaoList(DcBusiTargetAdjustDaySubDao dcBusiTargetAdjustDaySubDao); + + /** + * 新增统计单元指标调整单子(日) + * + * @param dcBusiTargetAdjustDaySubDao 统计单元指标调整单子(日) + * @return 结果 + */ + public int insertDcBusiTargetAdjustDaySubDao(DcBusiTargetAdjustDaySubDao dcBusiTargetAdjustDaySubDao); + + /** + * 修改统计单元指标调整单子(日) + * + * @param dcBusiTargetAdjustDaySubDao 统计单元指标调整单子(日) + * @return 结果 + */ + public int updateDcBusiTargetAdjustDaySubDao(DcBusiTargetAdjustDaySubDao dcBusiTargetAdjustDaySubDao); + + /** + * 删除统计单元指标调整单子(日) + * + * @param id 统计单元指标调整单子(日)主键 + * @return 结果 + */ + public int deleteDcBusiTargetAdjustDaySubDaoById(Long id); + + /** + * 批量删除统计单元指标调整单子(日) + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteDcBusiTargetAdjustDaySubDaoByIds(Long[] ids); +} diff --git a/lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustDayMasterService.java b/lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustDayMasterService.java new file mode 100644 index 0000000..01c4bc5 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustDayMasterService.java @@ -0,0 +1,136 @@ +package com.lzbi.draft.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.lzbi.asset.domain.DcBaseAssetInfo; +import com.lzbi.asset.mapper.DcBaseAssetInfoMapper; +import com.lzbi.common.core.domain.entity.SysDept; +import com.lzbi.common.utils.DateUtils; +import com.lzbi.draft.domain.DcBusiTargetAdjustDayMasterDao; +import com.lzbi.draft.domain.DcBusiTargetAdjustDaySubDao; +import com.lzbi.draft.mapper.DcBusiTargetAdjustDayMasterMapper; +import com.lzbi.system.service.impl.SysDeptServiceImpl; +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 javax.annotation.Resource; +import java.util.List; + +/** + * 资产指标调整单主(日)Service业务层处理 + * + * @author lienbo + * @date 2023-12-05 + */ +@Service +public class DcBusiTargetAdjustDayMasterService extends ServiceImpl implements IService +{ + + @Resource + private DcBaseAssetInfoMapper dcBaseAssetInfoMapper; + + @Autowired + private SysDeptServiceImpl sysDeptService; + + @Autowired + private DcBusiTargetAdjustDaySubService dcBusiTargetAdjustDaySubService; + + /** + * 查询资产指标调整单主(日) + * + * @param id 资产指标调整单主(日)主键 + * @return 资产指标调整单主(日) + */ + public DcBusiTargetAdjustDayMasterDao selectDcBusiTargetAdjustDayMasterDaoById(Long id) + { + return baseMapper.selectDcBusiTargetAdjustDayMasterDaoById(id); + } + + /** + * 查询资产指标调整单主(日)列表 + * + * @param dcBusiTargetAdjustDayMasterDao 资产指标调整单主(日) + * @return 资产指标调整单主(日) + */ + public List selectDcBusiTargetAdjustDayMasterDaoList(DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao) + { + return baseMapper.selectDcBusiTargetAdjustDayMasterDaoList(dcBusiTargetAdjustDayMasterDao); + } + + /** + * 新增资产指标调整单主(日) + * + * @param dcBusiTargetAdjustDayMasterDao 资产指标调整单主(日) + * @return 结果 + */ + @Transactional(rollbackFor = Exception.class) + public int insertDcBusiTargetAdjustDayMasterDao(DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao) + { + String assetCode = dcBusiTargetAdjustDayMasterDao.getAssetCode(); + // 公司 + SysDept company = sysDeptService.selectDeptById(dcBusiTargetAdjustDayMasterDao.getCompanyId()); + if (ObjectUtils.isNotEmpty(company)) { + dcBusiTargetAdjustDayMasterDao.setCompanyName(company.getDeptName()); + } + // 组织 + SysDept organize = sysDeptService.selectDeptById(dcBusiTargetAdjustDayMasterDao.getOragnizeId()); + if (ObjectUtils.isNotEmpty(organize)) { + dcBusiTargetAdjustDayMasterDao.setOrganizeName(organize.getDeptName()); + } + // 查询统计单元 + DcBaseAssetInfo dcBaseAssetInfo = dcBaseAssetInfoMapper.selectDcBaseAssetInfoByAssetCode(assetCode); + if (ObjectUtils.isNotEmpty(dcBaseAssetInfo)) { + dcBusiTargetAdjustDayMasterDao.setAssetName(dcBaseAssetInfo.getAssetName()); + } + dcBusiTargetAdjustDayMasterDao.setCheckStauts(DcBusiTargetAdjustDayMasterDao.CHECK_STATUS_PENDING_CHECK); + dcBusiTargetAdjustDayMasterDao.setCheckType(DcBusiTargetAdjustDayMasterDao.CHECK_TYPE_ARTIFICIAL); + dcBusiTargetAdjustDayMasterDao.setCreatedTime(DateUtils.getNowDate()); + + // 新增子表数据 + List children = dcBusiTargetAdjustDayMasterDao.getChildren(); + for (DcBusiTargetAdjustDaySubDao dcBusiTargetAdjustDaySubDao : children) { + dcBusiTargetAdjustDaySubDao.setBillNoMaster(dcBusiTargetAdjustDayMasterDao.getBillSerial()); + dcBusiTargetAdjustDaySubService.insertDcBusiTargetAdjustDaySubDao(dcBusiTargetAdjustDaySubDao, assetCode); + } + return baseMapper.insertDcBusiTargetAdjustDayMasterDao(dcBusiTargetAdjustDayMasterDao); + } + + /** + * 修改资产指标调整单主(日) + * + * @param dcBusiTargetAdjustDayMasterDao 资产指标调整单主(日) + * @return 结果 + */ + + public int updateDcBusiTargetAdjustDayMasterDao(DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao) + { + dcBusiTargetAdjustDayMasterDao.setUpdatedTime(DateUtils.getNowDate()); + return baseMapper.updateDcBusiTargetAdjustDayMasterDao(dcBusiTargetAdjustDayMasterDao); + } + + /** + * 批量删除资产指标调整单主(日) + * + * @param ids 需要删除的资产指标调整单主(日)主键 + * @return 结果 + */ + + public int deleteDcBusiTargetAdjustDayMasterDaoByIds(Long[] ids) + { + return baseMapper.deleteDcBusiTargetAdjustDayMasterDaoByIds(ids); + } + + /** + * 删除资产指标调整单主(日)信息 + * + * @param id 资产指标调整单主(日)主键 + * @return 结果 + */ + + public int deleteDcBusiTargetAdjustDayMasterDaoById(Long id) + { + return baseMapper.deleteDcBusiTargetAdjustDayMasterDaoById(id); + } +} 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 new file mode 100644 index 0000000..854f2d3 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustDaySubService.java @@ -0,0 +1,96 @@ +package com.lzbi.draft.service; + +import java.util.List; +import com.lzbi.common.utils.DateUtils; +import com.lzbi.draft.domain.DcBusiTargetAdjustDaySubDao; +import com.lzbi.draft.mapper.DcBusiTargetAdjustDaySubMapper; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.service.IService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.transaction.annotation.Transactional; + +/** + * 统计单元指标调整单子(日)Service业务层处理 + * + * @author lienbo + * @date 2023-12-05 + */ +@Service +public class DcBusiTargetAdjustDaySubService extends ServiceImpl implements IService +{ + + /** + * 查询统计单元指标调整单子(日) + * + * @param id 统计单元指标调整单子(日)主键 + * @return 统计单元指标调整单子(日) + */ + public DcBusiTargetAdjustDaySubDao selectDcBusiTargetAdjustDaySubDaoById(Long id) + { + return baseMapper.selectDcBusiTargetAdjustDaySubDaoById(id); + } + + /** + * 查询统计单元指标调整单子(日)列表 + * + * @param dcBusiTargetAdjustDaySubDao 统计单元指标调整单子(日) + * @return 统计单元指标调整单子(日) + */ + public List selectDcBusiTargetAdjustDaySubDaoList(DcBusiTargetAdjustDaySubDao dcBusiTargetAdjustDaySubDao) + { + return baseMapper.selectDcBusiTargetAdjustDaySubDaoList(dcBusiTargetAdjustDaySubDao); + } + + /** + * 新增统计单元指标调整单子(日) + * + * @param dcBusiTargetAdjustDaySubDao 统计单元指标调整单子(日) + * @param assetId 资产ID + * @return 结果 + */ + @Transactional(rollbackFor = Exception.class) + public int insertDcBusiTargetAdjustDaySubDao(DcBusiTargetAdjustDaySubDao dcBusiTargetAdjustDaySubDao, String assetId) + { + String targetName = "123"; //TODO 从service获取 + dcBusiTargetAdjustDaySubDao.setTargetName(targetName); + dcBusiTargetAdjustDaySubDao.setCreatedTime(DateUtils.getNowDate()); + return baseMapper.insertDcBusiTargetAdjustDaySubDao(dcBusiTargetAdjustDaySubDao); + } + + /** + * 修改统计单元指标调整单子(日) + * + * @param dcBusiTargetAdjustDaySubDao 统计单元指标调整单子(日) + * @return 结果 + */ + + public int updateDcBusiTargetAdjustDaySubDao(DcBusiTargetAdjustDaySubDao dcBusiTargetAdjustDaySubDao) + { + dcBusiTargetAdjustDaySubDao.setUpdatedTime(DateUtils.getNowDate()); + return baseMapper.updateDcBusiTargetAdjustDaySubDao(dcBusiTargetAdjustDaySubDao); + } + + /** + * 批量删除统计单元指标调整单子(日) + * + * @param ids 需要删除的统计单元指标调整单子(日)主键 + * @return 结果 + */ + + public int deleteDcBusiTargetAdjustDaySubDaoByIds(Long[] ids) + { + return baseMapper.deleteDcBusiTargetAdjustDaySubDaoByIds(ids); + } + + /** + * 删除统计单元指标调整单子(日)信息 + * + * @param id 统计单元指标调整单子(日)主键 + * @return 结果 + */ + + public int deleteDcBusiTargetAdjustDaySubDaoById(Long id) + { + return baseMapper.deleteDcBusiTargetAdjustDaySubDaoById(id); + } +} diff --git a/lzbi-module/src/main/resources/mapper/asset/DcBaseAssetInfoMapper.xml b/lzbi-module/src/main/resources/mapper/asset/DcBaseAssetInfoMapper.xml index abf2616..324ba92 100644 --- a/lzbi-module/src/main/resources/mapper/asset/DcBaseAssetInfoMapper.xml +++ b/lzbi-module/src/main/resources/mapper/asset/DcBaseAssetInfoMapper.xml @@ -73,6 +73,11 @@ where id = #{id} + + insert into dc_base_asset_info diff --git a/lzbi-module/src/main/resources/mapper/asset/DcBusiTargetAdjustDayMasterMapper.xml b/lzbi-module/src/main/resources/mapper/asset/DcBusiTargetAdjustDayMasterMapper.xml new file mode 100644 index 0000000..d3f972d --- /dev/null +++ b/lzbi-module/src/main/resources/mapper/asset/DcBusiTargetAdjustDayMasterMapper.xml @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select bill_serial, biil_type, company_id, company_name, organize_name, oragnize_id, asset_code, asset_name, id, date_adjust, tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time, check_stauts, check_type from dc_busi_target_adjust_day_master + + + + + + + + insert into dc_busi_target_adjust_day_master + + bill_serial, + biil_type, + company_id, + company_name, + organize_name, + oragnize_id, + asset_code, + asset_name, + date_adjust, + tenant_id, + revision, + created_by, + created_time, + updated_by, + updated_time, + delete_by, + delete_time, + check_stauts, + check_type, + + + #{billSerial}, + #{biilType}, + #{companyId}, + #{companyName}, + #{organizeName}, + #{oragnizeId}, + #{assetCode}, + #{assetName}, + #{dateAdjust}, + #{tenantId}, + #{revision}, + #{createdBy}, + #{createdTime}, + #{updatedBy}, + #{updatedTime}, + #{deleteBy}, + #{deleteTime}, + #{checkStauts}, + #{checkType}, + + + + + update dc_busi_target_adjust_day_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}, + 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_stauts = #{checkStauts}, + check_type = #{checkType}, + + where id = #{id} + + + + delete from dc_busi_target_adjust_day_master where id = #{id} + + + + delete from dc_busi_target_adjust_day_master where id in + + #{id} + + + \ No newline at end of file diff --git a/lzbi-module/src/main/resources/mapper/asset/DcBusiTargetAdjustDaySubMapper.xml b/lzbi-module/src/main/resources/mapper/asset/DcBusiTargetAdjustDaySubMapper.xml new file mode 100644 index 0000000..f74de61 --- /dev/null +++ b/lzbi-module/src/main/resources/mapper/asset/DcBusiTargetAdjustDaySubMapper.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_day_sub + + + + + + + + insert into dc_busi_target_adjust_day_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_day_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_day_sub where id = #{id} + + + + delete from dc_busi_target_adjust_day_sub where id in + + #{id} + + + \ No newline at end of file From 00e080e7d1c180cdba628ee5f1e9f4c3a7c0fa38 Mon Sep 17 00:00:00 2001 From: bobol Date: Wed, 6 Dec 2023 10:39:16 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E8=B5=84=E4=BA=A7=E6=8C=87=E6=A0=87?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=8D=95=E5=AE=A1=E6=A0=B8=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...DcBusiTargetAdjustDayMasterController.java | 20 +++ .../DcBusiTargetAdjustDayMasterDao.java | 125 +++++++++++++--- .../domain/DcBusiTargetAdjustDaySubDao.java | 16 ++ .../mapper/DcBusiTargetDraftDayMapper.java | 1 + .../DcBusiTargetAdjustDayMasterService.java | 61 +++++++- .../mapper/DcBaseWorkSpecialMapper.java | 8 + .../mapper/asset/DcBaseWorkSpecialMapper.xml | 6 + .../DcBusiTargetAdjustDayMasterMapper.xml | 141 +++++++++++------- 8 files changed, 303 insertions(+), 75 deletions(-) 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 4420e98..f0c8f8b 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 @@ -5,6 +5,10 @@ import javax.servlet.http.HttpServletResponse; import com.lzbi.draft.domain.DcBusiTargetAdjustDayMasterDao; 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.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -28,6 +32,7 @@ import com.lzbi.common.core.page.TableDataInfo; * @author lienbo * @date 2023-12-05 */ +@Api(value = "资产指标调整单",tags = "资产指标调整单") @RestController @RequestMapping("/asset/target/adjust") public class DcBusiTargetAdjustDayMasterController extends BaseController @@ -73,6 +78,7 @@ public class DcBusiTargetAdjustDayMasterController extends BaseController /** * 新增资产指标调整单主(日) */ + @ApiOperation("新增资产指标调整单") @PreAuthorize("@ss.hasPermi('lzbi:master:add')") @Log(title = "资产指标调整单主(日)", businessType = BusinessType.INSERT) @PostMapping @@ -102,4 +108,18 @@ public class DcBusiTargetAdjustDayMasterController extends BaseController { return toAjax(dcBusiTargetAdjustDayMasterService.deleteDcBusiTargetAdjustDayMasterDaoByIds(ids)); } + + /** + * 新增资产指标调整单主(日) + */ + @ApiOperation("审核资产指标调整单") + @ApiImplicitParam(name = "id", value = "id", dataType = "Long", dataTypeClass = Long.class, paramType = "path") + @PreAuthorize("@ss.hasPermi('lzbi:master:add')") + @Log(title = "资产指标调整单主(日)", businessType = BusinessType.OTHER) + @PostMapping("/{id}") + public AjaxResult audit(@PathVariable("id") Long id) + { + return toAjax(dcBusiTargetAdjustDayMasterService.audit(id)); + } + } 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 f939b93..cabd4ca 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 @@ -4,88 +4,167 @@ import java.util.Date; import java.util.List; import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import lombok.Data; import com.lzbi.common.annotation.Excel; import com.lzbi.module.base.BaseModuleEntity; +import springfox.documentation.annotations.ApiIgnore; /** * 资产指标调整单主(日)对象 dc_busi_target_adjust_day_master - * + * * @author win * @date 2023-12-05 */ - @Data -public class DcBusiTargetAdjustDayMasterDao extends BaseModuleEntity -{ - /** 待审核状态 */ +@ApiModel(value = "DcBusiTargetAdjustDayMasterDao对象", description = "资产指标调整单主表对象") +@Data +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 = "0"; private static final long serialVersionUID = 1L; - /** 单据号 */ + /** + * 单据号 + */ + @ApiModelProperty(value = "单据号", dataType = "String") @Excel(name = "单据号") private String billSerial; - /** 单据类别 */ + /** + * 单据类别 + */ + @ApiModelProperty(value = "单据类别", dataType = "String") @Excel(name = "单据类别") private String biilType; - /** 公司ID */ + /** + * 公司ID + */ + @ApiModelProperty(value = "公司ID", dataType = "Long") @Excel(name = "公司ID") private Long companyId; - /** 公司名称 */ + /** + * 公司名称 + */ + @ApiModelProperty(hidden = true) @Excel(name = "公司名称") private String companyName; - /** 组织机构名称 */ + /** + * 组织机构名称 + */ + @ApiModelProperty(hidden = true) @Excel(name = "组织机构名称") private String organizeName; - /** 组织机构ID */ + /** + * 组织机构ID + */ + @ApiModelProperty(value = "组织机构ID", dataType = "String") @Excel(name = "组织机构ID") private Long oragnizeId; - /** 统计单元编码 */ + /** + * 统计单元编码 + */ + @ApiModelProperty(value = "统计单元编码", dataType = "String") @Excel(name = "统计单元编码") private String assetCode; - /** 统计单元名称 */ + /** + * 统计单元名称 + */ + @ApiModelProperty(hidden = true) @Excel(name = "统计单元名称") private String assetName; - /** 主键 */ + /** + * 统计专业代码 + */ + @ApiModelProperty(value = "统计专业代码", dataType = "String") + @Excel(name = "统计专业代码") + private String fieldCode; + + /** + * 统计专业名称 + */ + @ApiModelProperty(hidden = true) + @Excel(name = "统计专业名称") + private String fieldName; + + /** + * 主键 + */ private Long id; - /** 调整目标日期 */ + /** + * 调整目标日期 + */ + @ApiModelProperty(value = "调整目标日期", dataType = "String") @Excel(name = "调整目标日期") private String dateAdjust; - /** 创建人 */ + /** + * 创建人 + */ + @ApiModelProperty(hidden = true) private String createdBy; - /** 创建时间 */ + /** + * 创建时间 + */ + @ApiModelProperty(hidden = true) private Date createdTime; - /** 更新人 */ + /** + * 更新人 + */ + @ApiModelProperty(hidden = true) private String updatedBy; - /** 更新时间 */ + /** + * 更新时间 + */ + @ApiModelProperty(hidden = true) private Date updatedTime; - /** 审核状态;0待审核 1 已经审核 2已处理 */ + /** + * 审核状态;0待审核 1 已经审核 2已处理 + */ + @ApiModelProperty(hidden = true) @Excel(name = "审核状态;0待审核 1 已经审核 2已处理") private String checkStauts; - /** 审核类型;1人工2自动 */ + /** + * 审核类型;1人工2自动 + */ + @ApiModelProperty(hidden = true) @Excel(name = "审核类型;1人工2自动") private String checkType; - /** 统计单元指标调整单子表集合 */ + /** + * 统计单元指标调整单子表集合 + */ + @ApiModelProperty(value = "统计单元指标调整单子表集合", dataType = "DcBusiTargetAdjustDaySubDao") private List children; } diff --git a/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustDaySubDao.java b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustDaySubDao.java index 511ae70..4264b40 100644 --- a/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustDaySubDao.java +++ b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustDaySubDao.java @@ -3,6 +3,8 @@ package com.lzbi.draft.domain; import java.math.BigDecimal; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import lombok.Data; @@ -15,59 +17,73 @@ import com.lzbi.module.base.BaseModuleEntity; * @author win * @date 2023-12-05 */ +@ApiModel(value = "DcBusiTargetAdjustDaySubDao对象", description = "资产指标调整单子表对象") @Data public class DcBusiTargetAdjustDaySubDao extends BaseModuleEntity { private static final long serialVersionUID = 1L; /** 创建人 */ + @ApiModelProperty(hidden = true) private String createdBy; /** 创建时间 */ + @ApiModelProperty(hidden = true) private Date createdTime; /** 更新人 */ + @ApiModelProperty(hidden = true) private String updatedBy; /** 更新时间 */ + @ApiModelProperty(hidden = true) private Date updatedTime; /** 主键 */ private Long id; /** 主单据编号 */ + @ApiModelProperty(hidden = true) @Excel(name = "主单据编号") private String billNoMaster; /** 指标编码 */ + @ApiModelProperty(value = "指标编码") @Excel(name = "指标编码") private String targetCode; /** 指标名称 */ + @ApiModelProperty(hidden = true) @Excel(name = "指标名称") private String targetName; /** 指标单位 */ + @ApiModelProperty(value = "指标单位") @Excel(name = "指标单位") private String tagetUnit; /** 日期调整日期 */ + @ApiModelProperty(value = "日期调整日期") @Excel(name = "日期调整日期") private String adjustDate; /** 调整时间 */ + @ApiModelProperty(value = "调整时间") @Excel(name = "调整时间") private Long adjstTime; /** 原值 */ + @ApiModelProperty(value = "原值") @Excel(name = "原值") private BigDecimal valOrigin; /** 调整值 */ + @ApiModelProperty(value = "调整值") @Excel(name = "调整值") private BigDecimal valAdjust; /** 结果值 */ + @ApiModelProperty(value = "结果值") @Excel(name = "结果值") private BigDecimal valResult; diff --git a/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetDraftDayMapper.java b/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetDraftDayMapper.java index d2f12a2..51b24a0 100644 --- a/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetDraftDayMapper.java +++ b/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetDraftDayMapper.java @@ -2,6 +2,7 @@ package com.lzbi.draft.mapper; import java.util.List; +import com.lzbi.draft.domain.DcBusiTargetAdjustDaySubDao; import com.lzbi.draft.domain.DcBusiTargetDraftDayDao; import com.baomidou.mybatisplus.core.mapper.BaseMapper; diff --git a/lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustDayMasterService.java b/lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustDayMasterService.java index 01c4bc5..2b3f388 100644 --- a/lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustDayMasterService.java +++ b/lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustDayMasterService.java @@ -8,7 +8,12 @@ import com.lzbi.common.core.domain.entity.SysDept; import com.lzbi.common.utils.DateUtils; import com.lzbi.draft.domain.DcBusiTargetAdjustDayMasterDao; import com.lzbi.draft.domain.DcBusiTargetAdjustDaySubDao; +import com.lzbi.draft.domain.DcBusiTargetDraftDayDao; import com.lzbi.draft.mapper.DcBusiTargetAdjustDayMasterMapper; +import com.lzbi.draft.mapper.DcBusiTargetAdjustDaySubMapper; +import com.lzbi.draft.mapper.DcBusiTargetDraftDayMapper; +import com.lzbi.special.domain.DcBaseWorkSpecial; +import com.lzbi.special.mapper.DcBaseWorkSpecialMapper; import com.lzbi.system.service.impl.SysDeptServiceImpl; import org.apache.commons.lang3.ObjectUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -37,6 +42,15 @@ public class DcBusiTargetAdjustDayMasterService extends ServiceImpl dcBusiTargetAdjustDaySubDaoList = dcBusiTargetAdjustDaySubMapper.selectDcBusiTargetAdjustDaySubDaoList(params); + // 遍历子表集合,向指标数据底稿表(日)中同步数据 + for (DcBusiTargetAdjustDaySubDao dcBusiTargetAdjustDaySubDao : dcBusiTargetAdjustDaySubDaoList) { + DcBusiTargetDraftDayDao dcBusiTargetDraftDayDao = new DcBusiTargetDraftDayDao(); +// dcBusiTargetDraftDayDao.setCompanyCode(); +// dcBusiTargetDraftDayMapper.disposeDcBusiTargetDraftDayDao(dcBusiTargetAdjustDaySubDao); + } + // 修改审核状态为已处理 + dcBusiTargetAdjustDayMasterDao.setCheckStauts(DcBusiTargetAdjustDayMasterDao.CHECK_STATUS_PROCESSED); + return this.updateDcBusiTargetAdjustDayMasterDao(dcBusiTargetAdjustDayMasterDao); + } } diff --git a/lzbi-module/src/main/java/com/lzbi/special/mapper/DcBaseWorkSpecialMapper.java b/lzbi-module/src/main/java/com/lzbi/special/mapper/DcBaseWorkSpecialMapper.java index 1dfc9a0..f40c625 100644 --- a/lzbi-module/src/main/java/com/lzbi/special/mapper/DcBaseWorkSpecialMapper.java +++ b/lzbi-module/src/main/java/com/lzbi/special/mapper/DcBaseWorkSpecialMapper.java @@ -23,6 +23,14 @@ public interface DcBaseWorkSpecialMapper extends BaseMapper */ public DcBaseWorkSpecial selectDcBaseWorkSpecialById(Long id); + /** + * 查询生产专业管理 + * + * @param specialCode 专业编码 + * @return 生产专业管理 + */ + public DcBaseWorkSpecial selectDcBaseWorkSpecialBySpecialCode(String specialCode); + /** * 查询生产专业管理列表 * diff --git a/lzbi-module/src/main/resources/mapper/asset/DcBaseWorkSpecialMapper.xml b/lzbi-module/src/main/resources/mapper/asset/DcBaseWorkSpecialMapper.xml index f1096f7..695bb96 100644 --- a/lzbi-module/src/main/resources/mapper/asset/DcBaseWorkSpecialMapper.xml +++ b/lzbi-module/src/main/resources/mapper/asset/DcBaseWorkSpecialMapper.xml @@ -38,10 +38,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and special_name like concat('%', #{specialName}, '%') + + + insert into dc_base_work_special diff --git a/lzbi-module/src/main/resources/mapper/asset/DcBusiTargetAdjustDayMasterMapper.xml b/lzbi-module/src/main/resources/mapper/asset/DcBusiTargetAdjustDayMasterMapper.xml index d3f972d..dd0ad08 100644 --- a/lzbi-module/src/main/resources/mapper/asset/DcBusiTargetAdjustDayMasterMapper.xml +++ b/lzbi-module/src/main/resources/mapper/asset/DcBusiTargetAdjustDayMasterMapper.xml @@ -1,59 +1,92 @@ - - - - - - - - - - - - - - - - - - - - - - - + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> + + + + + + + + + + + + + + + + + + + + + + + + + - select bill_serial, biil_type, company_id, company_name, organize_name, oragnize_id, asset_code, asset_name, id, date_adjust, tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time, check_stauts, check_type from dc_busi_target_adjust_day_master + 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_stauts, + check_type + from dc_busi_target_adjust_day_master - - - and bill_serial = #{billSerial} - and biil_type = #{biilType} - and company_id = #{companyId} - and company_name like concat('%', #{companyName}, '%') - and organize_name like concat('%', #{organizeName}, '%') - and oragnize_id = #{oragnizeId} - and asset_code = #{assetCode} - and asset_name like concat('%', #{assetName}, '%') - and date_adjust = #{dateAdjust} - and check_stauts = #{checkStauts} - and check_type = #{checkType} + + and bill_serial = #{billSerial} + and biil_type = #{biilType} + and company_id = #{companyId} + and company_name like concat('%', #{companyName}, + '%') + + and organize_name like concat('%', #{organizeName}, + '%') + + and oragnize_id = #{oragnizeId} + and asset_code = #{assetCode} + and asset_name like concat('%', #{assetName}, '%') + and field_code = #{fieldCode} + and field_name like concat('%', #{fieldName}, '%') + and date_adjust = #{dateAdjust} + and check_stauts = #{checkStauts} + and check_type = #{checkType} - - where id = #{id} - - + + insert into dc_busi_target_adjust_day_master bill_serial, @@ -64,6 +97,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" oragnize_id, asset_code, asset_name, + field_code, + field_name, date_adjust, tenant_id, revision, @@ -75,7 +110,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" delete_time, check_stauts, check_type, - + #{billSerial}, #{biilType}, @@ -85,6 +120,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{oragnizeId}, #{assetCode}, #{assetName}, + #{fieldCode}, + #{fieldName}, #{dateAdjust}, #{tenantId}, #{revision}, @@ -96,10 +133,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{deleteTime}, #{checkStauts}, #{checkType}, - + - + update dc_busi_target_adjust_day_master bill_serial = #{billSerial}, @@ -110,6 +147,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" oragnize_id = #{oragnizeId}, asset_code = #{assetCode}, asset_name = #{assetName}, + field_code = #{fieldCode}, + field_name = #{fieldName}, date_adjust = #{dateAdjust}, tenant_id = #{tenantId}, revision = #{revision}, @@ -125,12 +164,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where id = #{id} - - delete from dc_busi_target_adjust_day_master where id = #{id} + + delete + from dc_busi_target_adjust_day_master + where id = #{id} - - delete from dc_busi_target_adjust_day_master where id in + + delete from dc_busi_target_adjust_day_master where id in #{id} From edb454077efbd7aac09347540242aafaee25f6f7 Mon Sep 17 00:00:00 2001 From: bobol Date: Wed, 6 Dec 2023 14:20:01 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E8=B5=84=E4=BA=A7=E6=8C=87=E6=A0=87?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=8D=95=E5=A4=84=E7=90=86=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...DcBusiTargetAdjustDayMasterController.java | 21 +++- .../domain/DcBusiTargetAdjustDaySubDao.java | 64 +++++++--- .../DcBusiTargetAdjustDayMasterService.java | 116 ++++++++++++------ .../DcBusiTargetAdjustDayMasterMapper.xml | 16 +-- 4 files changed, 152 insertions(+), 65 deletions(-) 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 f0c8f8b..7f0ce40 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 @@ -110,16 +110,33 @@ public class DcBusiTargetAdjustDayMasterController extends BaseController } /** - * 新增资产指标调整单主(日) + * 审核资产指标调整单(日) */ @ApiOperation("审核资产指标调整单") @ApiImplicitParam(name = "id", value = "id", dataType = "Long", dataTypeClass = Long.class, paramType = "path") @PreAuthorize("@ss.hasPermi('lzbi:master:add')") @Log(title = "资产指标调整单主(日)", businessType = BusinessType.OTHER) - @PostMapping("/{id}") + @PostMapping("/audit/{id}") public AjaxResult audit(@PathVariable("id") Long id) { return toAjax(dcBusiTargetAdjustDayMasterService.audit(id)); } + /** + * 处理资产指标调整单主(日) + */ + @ApiOperation("处理资产指标调整单") + @ApiImplicitParam(name = "id", value = "id", dataType = "Long", dataTypeClass = Long.class, paramType = "path") + @PreAuthorize("@ss.hasPermi('lzbi:master:add')") + @Log(title = "资产指标调整单主(日)", businessType = BusinessType.OTHER) + @PostMapping("/dispose/{id}") + public AjaxResult dispose(@PathVariable("id") Long id) + { + try{ + return toAjax(dcBusiTargetAdjustDayMasterService.dispose(id)); + } catch (RuntimeException e) { + return error(e.getMessage()); + } + } + } diff --git a/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustDaySubDao.java b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustDaySubDao.java index 4264b40..dc1106e 100644 --- a/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustDaySubDao.java +++ b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustDaySubDao.java @@ -2,6 +2,7 @@ package com.lzbi.draft.domain; import java.math.BigDecimal; import java.util.Date; + import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -13,76 +14,103 @@ import com.lzbi.module.base.BaseModuleEntity; /** * 统计单元指标调整单子(日)对象 dc_busi_target_adjust_day_sub - * + * * @author win * @date 2023-12-05 */ @ApiModel(value = "DcBusiTargetAdjustDaySubDao对象", description = "资产指标调整单子表对象") - @Data -public class DcBusiTargetAdjustDaySubDao extends BaseModuleEntity -{ +@Data +public class DcBusiTargetAdjustDaySubDao extends BaseModuleEntity { private static final long serialVersionUID = 1L; - /** 创建人 */ + /** + * 创建人 + */ @ApiModelProperty(hidden = true) private String createdBy; - /** 创建时间 */ + /** + * 创建时间 + */ @ApiModelProperty(hidden = true) private Date createdTime; - /** 更新人 */ + /** + * 更新人 + */ @ApiModelProperty(hidden = true) private String updatedBy; - /** 更新时间 */ + /** + * 更新时间 + */ @ApiModelProperty(hidden = true) private Date updatedTime; - /** 主键 */ + /** + * 主键 + */ private Long id; - /** 主单据编号 */ + /** + * 主单据编号 + */ @ApiModelProperty(hidden = true) @Excel(name = "主单据编号") private String billNoMaster; - /** 指标编码 */ + /** + * 指标编码 + */ @ApiModelProperty(value = "指标编码") @Excel(name = "指标编码") private String targetCode; - /** 指标名称 */ + /** + * 指标名称 + */ @ApiModelProperty(hidden = true) @Excel(name = "指标名称") private String targetName; - /** 指标单位 */ + /** + * 指标单位 + */ @ApiModelProperty(value = "指标单位") @Excel(name = "指标单位") private String tagetUnit; - /** 日期调整日期 */ + /** + * 日期调整日期 + */ @ApiModelProperty(value = "日期调整日期") @Excel(name = "日期调整日期") private String adjustDate; - /** 调整时间 */ + /** + * 调整时间 + */ @ApiModelProperty(value = "调整时间") @Excel(name = "调整时间") private Long adjstTime; - /** 原值 */ + /** + * 原值 + */ @ApiModelProperty(value = "原值") @Excel(name = "原值") private BigDecimal valOrigin; - /** 调整值 */ + /** + * 调整值 + */ @ApiModelProperty(value = "调整值") @Excel(name = "调整值") private BigDecimal valAdjust; - /** 结果值 */ + /** + * 结果值 + */ @ApiModelProperty(value = "结果值") @Excel(name = "结果值") private BigDecimal valResult; diff --git a/lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustDayMasterService.java b/lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustDayMasterService.java index 2b3f388..09f21d0 100644 --- a/lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustDayMasterService.java +++ b/lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustDayMasterService.java @@ -8,30 +8,35 @@ import com.lzbi.common.core.domain.entity.SysDept; import com.lzbi.common.utils.DateUtils; import com.lzbi.draft.domain.DcBusiTargetAdjustDayMasterDao; import com.lzbi.draft.domain.DcBusiTargetAdjustDaySubDao; -import com.lzbi.draft.domain.DcBusiTargetDraftDayDao; +import com.lzbi.draft.domain.DcBusiTargetDraftDay; import com.lzbi.draft.mapper.DcBusiTargetAdjustDayMasterMapper; import com.lzbi.draft.mapper.DcBusiTargetAdjustDaySubMapper; import com.lzbi.draft.mapper.DcBusiTargetDraftDayMapper; import com.lzbi.special.domain.DcBaseWorkSpecial; import com.lzbi.special.mapper.DcBaseWorkSpecialMapper; import com.lzbi.system.service.impl.SysDeptServiceImpl; +import lombok.extern.slf4j.Slf4j; 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.math.BigDecimal; import java.util.List; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReentrantLock; /** * 资产指标调整单主(日)Service业务层处理 - * + * * @author lienbo * @date 2023-12-05 */ +@Slf4j @Service -public class DcBusiTargetAdjustDayMasterService extends ServiceImpl implements IService -{ +public class DcBusiTargetAdjustDayMasterService extends ServiceImpl implements IService { @Resource private DcBaseAssetInfoMapper dcBaseAssetInfoMapper; @@ -51,37 +56,36 @@ public class DcBusiTargetAdjustDayMasterService extends ServiceImpl selectDcBusiTargetAdjustDayMasterDaoList(DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao) - { + public List selectDcBusiTargetAdjustDayMasterDaoList(DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao) { return baseMapper.selectDcBusiTargetAdjustDayMasterDaoList(dcBusiTargetAdjustDayMasterDao); } /** * 新增资产指标调整单主(日) - * + * * @param dcBusiTargetAdjustDayMasterDao 资产指标调整单主(日) * @return 结果 */ @Transactional(rollbackFor = Exception.class) - public int insertDcBusiTargetAdjustDayMasterDao(DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao) - { + public int insertDcBusiTargetAdjustDayMasterDao(DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao) { String assetCode = dcBusiTargetAdjustDayMasterDao.getAssetCode(); // 查询公司 SysDept company = sysDeptService.selectDeptById(dcBusiTargetAdjustDayMasterDao.getCompanyId()); @@ -118,38 +122,35 @@ public class DcBusiTargetAdjustDayMasterService extends ServiceImpl dcBusiTargetAdjustDaySubDaoList = dcBusiTargetAdjustDaySubMapper.selectDcBusiTargetAdjustDaySubDaoList(params); - // 遍历子表集合,向指标数据底稿表(日)中同步数据 - for (DcBusiTargetAdjustDaySubDao dcBusiTargetAdjustDaySubDao : dcBusiTargetAdjustDaySubDaoList) { - DcBusiTargetDraftDayDao dcBusiTargetDraftDayDao = new DcBusiTargetDraftDayDao(); -// dcBusiTargetDraftDayDao.setCompanyCode(); -// dcBusiTargetDraftDayMapper.disposeDcBusiTargetDraftDayDao(dcBusiTargetAdjustDaySubDao); + public int dispose(Long id) throws RuntimeException { + lock.lock(); + try { + // 查询审核资产指标调整单主表数据 + DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao = baseMapper.selectDcBusiTargetAdjustDayMasterDaoById(id); + // 调整单未审核不能处理 + if (DcBusiTargetAdjustDayMasterDao.CHECK_STATUS_PENDING_CHECK.equals(dcBusiTargetAdjustDayMasterDao.getCheckStauts())) { + throw new RuntimeException("调整单未审核不能处理"); + } + // 调整单已处理 + if (DcBusiTargetAdjustDayMasterDao.CHECK_STATUS_PROCESSED.equals(dcBusiTargetAdjustDayMasterDao.getCheckStauts())) { + throw new RuntimeException("调整单已处理"); + } + // 查询审核资产指标调整单子表集合 + DcBusiTargetAdjustDaySubDao params = new DcBusiTargetAdjustDaySubDao(); + params.setBillNoMaster(dcBusiTargetAdjustDayMasterDao.getBillSerial()); + List dcBusiTargetAdjustDaySubDaoList = dcBusiTargetAdjustDaySubMapper.selectDcBusiTargetAdjustDaySubDaoList(params); + // 遍历子表集合,向指标数据底稿表(日)中同步数据 + for (DcBusiTargetAdjustDaySubDao dcBusiTargetAdjustDaySubDao : dcBusiTargetAdjustDaySubDaoList) { + DcBusiTargetDraftDay dcBusiTargetDraftDay = new DcBusiTargetDraftDay(); + dcBusiTargetDraftDay.setCompanyId(dcBusiTargetAdjustDayMasterDao.getCompanyId()); + dcBusiTargetDraftDay.setOrgId(dcBusiTargetAdjustDayMasterDao.getOragnizeId()); + dcBusiTargetDraftDay.setAssetCode(dcBusiTargetAdjustDayMasterDao.getAssetCode()); + dcBusiTargetDraftDay.setFieldCode(dcBusiTargetAdjustDayMasterDao.getFieldCode()); + dcBusiTargetDraftDay.setTargetCode(dcBusiTargetDraftDay.getTargetCode()); + List dcBusiTargetDraftDayList = dcBusiTargetDraftDayMapper.selectDcBusiTargetDraftDayList(dcBusiTargetDraftDay); + // 如果未查询出来指标数据底稿数据,就新增,否则修改 + if (CollectionUtils.isEmpty(dcBusiTargetDraftDayList)) { + dcBusiTargetDraftDay.setCompanyName(dcBusiTargetAdjustDayMasterDao.getCompanyName()); + dcBusiTargetDraftDay.setOrgName(dcBusiTargetAdjustDayMasterDao.getOrganizeName()); + dcBusiTargetDraftDay.setAssetName(dcBusiTargetAdjustDayMasterDao.getAssetName()); + dcBusiTargetDraftDay.setFieldName(dcBusiTargetAdjustDayMasterDao.getFieldName()); + dcBusiTargetDraftDay.setTargetName(dcBusiTargetAdjustDaySubDao.getTargetName()); + dcBusiTargetDraftDay.setTargetUint(dcBusiTargetAdjustDaySubDao.getTagetUnit()); + dcBusiTargetDraftDay.setCountDate(dcBusiTargetAdjustDayMasterDao.getDateAdjust()); + dcBusiTargetDraftDay.setValOriginal(dcBusiTargetAdjustDaySubDao.getValOrigin()); + dcBusiTargetDraftDay.setValAdjust(dcBusiTargetAdjustDaySubDao.getValAdjust()); + dcBusiTargetDraftDay.setValResult(dcBusiTargetAdjustDaySubDao.getValResult()); + dcBusiTargetDraftDayMapper.insertDcBusiTargetDraftDay(dcBusiTargetDraftDay); + } else { + dcBusiTargetDraftDay = dcBusiTargetDraftDayList.get(0); + BigDecimal valResult = dcBusiTargetDraftDay.getValResult().add(new BigDecimal(0)); + dcBusiTargetDraftDay.setValOriginal(valResult); + dcBusiTargetDraftDay.setValAdjust(dcBusiTargetAdjustDaySubDao.getValAdjust()); + dcBusiTargetDraftDay.setValResult(valResult.add(dcBusiTargetAdjustDaySubDao.getValAdjust())); + dcBusiTargetDraftDayMapper.updateDcBusiTargetDraftDay(dcBusiTargetDraftDay); + } + } + // 修改审核状态为已处理 + dcBusiTargetAdjustDayMasterDao.setCheckStauts(DcBusiTargetAdjustDayMasterDao.CHECK_STATUS_PROCESSED); + return this.updateDcBusiTargetAdjustDayMasterDao(dcBusiTargetAdjustDayMasterDao); + } catch (RuntimeException e) { + log.error("处理异常", e); + throw e; + }finally { + lock.unlock(); } - // 修改审核状态为已处理 - dcBusiTargetAdjustDayMasterDao.setCheckStauts(DcBusiTargetAdjustDayMasterDao.CHECK_STATUS_PROCESSED); - return this.updateDcBusiTargetAdjustDayMasterDao(dcBusiTargetAdjustDayMasterDao); } } diff --git a/lzbi-module/src/main/resources/mapper/asset/DcBusiTargetAdjustDayMasterMapper.xml b/lzbi-module/src/main/resources/mapper/asset/DcBusiTargetAdjustDayMasterMapper.xml index dd0ad08..488380e 100644 --- a/lzbi-module/src/main/resources/mapper/asset/DcBusiTargetAdjustDayMasterMapper.xml +++ b/lzbi-module/src/main/resources/mapper/asset/DcBusiTargetAdjustDayMasterMapper.xml @@ -2,9 +2,9 @@ - + - + @@ -55,7 +55,7 @@ from dc_busi_target_adjust_day_master - - - insert into dc_busi_target_adjust_day_master @@ -136,7 +136,7 @@ - + update dc_busi_target_adjust_day_master bill_serial = #{billSerial}, @@ -164,13 +164,13 @@ where id = #{id} - + delete from dc_busi_target_adjust_day_master where id = #{id} - + delete from dc_busi_target_adjust_day_master where id in #{id} From 689afb6b0b8fa09ba6bf2ecb9705f9b24be636d5 Mon Sep 17 00:00:00 2001 From: bobol Date: Wed, 6 Dec 2023 15:41:02 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E8=B5=84=E4=BA=A7=E6=8C=87=E6=A0=87?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=8D=95=E5=A4=84=E7=90=86=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...DcBusiTargetAdjustDayMasterController.java | 7 ++++--- .../DcBusiTargetAdjustDayMasterDao.java | 20 +++++++++---------- .../domain/DcBusiTargetAdjustDaySubDao.java | 14 ++++++------- 3 files changed, 21 insertions(+), 20 deletions(-) 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 7f0ce40..a4be5e3 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 @@ -4,6 +4,7 @@ import java.util.List; import javax.servlet.http.HttpServletResponse; import com.lzbi.draft.domain.DcBusiTargetAdjustDayMasterDao; +import com.lzbi.draft.domain.DcBusiTargetAdjustDaySubDao; import com.lzbi.draft.service.DcBusiTargetAdjustDayMasterService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; @@ -82,7 +83,7 @@ public class DcBusiTargetAdjustDayMasterController extends BaseController @PreAuthorize("@ss.hasPermi('lzbi:master:add')") @Log(title = "资产指标调整单主(日)", businessType = BusinessType.INSERT) @PostMapping - public AjaxResult add(@RequestBody DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao) + public AjaxResult add(@RequestBody DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao) { return toAjax(dcBusiTargetAdjustDayMasterService.insertDcBusiTargetAdjustDayMasterDao(dcBusiTargetAdjustDayMasterDao)); } @@ -113,7 +114,7 @@ public class DcBusiTargetAdjustDayMasterController extends BaseController * 审核资产指标调整单(日) */ @ApiOperation("审核资产指标调整单") - @ApiImplicitParam(name = "id", value = "id", dataType = "Long", dataTypeClass = Long.class, paramType = "path") + @ApiImplicitParam(name = "id", value = "id", dataType = "Long", dataTypeClass = Long.class, paramType = "path", required = true) @PreAuthorize("@ss.hasPermi('lzbi:master:add')") @Log(title = "资产指标调整单主(日)", businessType = BusinessType.OTHER) @PostMapping("/audit/{id}") @@ -126,7 +127,7 @@ public class DcBusiTargetAdjustDayMasterController extends BaseController * 处理资产指标调整单主(日) */ @ApiOperation("处理资产指标调整单") - @ApiImplicitParam(name = "id", value = "id", dataType = "Long", dataTypeClass = Long.class, paramType = "path") + @ApiImplicitParam(name = "id", value = "id", dataType = "Long", dataTypeClass = Long.class, paramType = "path", required = true) @PreAuthorize("@ss.hasPermi('lzbi:master:add')") @Log(title = "资产指标调整单主(日)", businessType = BusinessType.OTHER) @PostMapping("/dispose/{id}") 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 cabd4ca..b3f4000 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 @@ -21,7 +21,7 @@ import springfox.documentation.annotations.ApiIgnore; */ @ApiModel(value = "DcBusiTargetAdjustDayMasterDao对象", description = "资产指标调整单主表对象") @Data -public class DcBusiTargetAdjustDayMasterDao extends BaseModuleEntity { +public class DcBusiTargetAdjustDayMasterDao extends BaseModuleEntity { /** * 待审核状态 */ @@ -44,21 +44,21 @@ public class DcBusiTargetAdjustDayMasterDao extends BaseModuleEntity { /** * 单据号 */ - @ApiModelProperty(value = "单据号", dataType = "String") + @ApiModelProperty(name = "billSerial", value = "单据号") @Excel(name = "单据号") private String billSerial; /** * 单据类别 */ - @ApiModelProperty(value = "单据类别", dataType = "String") + @ApiModelProperty(name = "biilType", value = "单据类别") @Excel(name = "单据类别") private String biilType; /** * 公司ID */ - @ApiModelProperty(value = "公司ID", dataType = "Long") + @ApiModelProperty(name = "companyId", value = "公司ID") @Excel(name = "公司ID") private Long companyId; @@ -79,14 +79,14 @@ public class DcBusiTargetAdjustDayMasterDao extends BaseModuleEntity { /** * 组织机构ID */ - @ApiModelProperty(value = "组织机构ID", dataType = "String") + @ApiModelProperty(name = "oragnizeId", value = "组织机构ID") @Excel(name = "组织机构ID") private Long oragnizeId; /** * 统计单元编码 */ - @ApiModelProperty(value = "统计单元编码", dataType = "String") + @ApiModelProperty(name = "assetCode", value = "统计单元编码") @Excel(name = "统计单元编码") private String assetCode; @@ -100,7 +100,7 @@ public class DcBusiTargetAdjustDayMasterDao extends BaseModuleEntity { /** * 统计专业代码 */ - @ApiModelProperty(value = "统计专业代码", dataType = "String") + @ApiModelProperty(name = "fieldCode", value = "统计专业代码") @Excel(name = "统计专业代码") private String fieldCode; @@ -119,7 +119,7 @@ public class DcBusiTargetAdjustDayMasterDao extends BaseModuleEntity { /** * 调整目标日期 */ - @ApiModelProperty(value = "调整目标日期", dataType = "String") + @ApiModelProperty(name = "dateAdjust", value = "调整目标日期") @Excel(name = "调整目标日期") private String dateAdjust; @@ -164,7 +164,7 @@ public class DcBusiTargetAdjustDayMasterDao extends BaseModuleEntity { /** * 统计单元指标调整单子表集合 */ - @ApiModelProperty(value = "统计单元指标调整单子表集合", dataType = "DcBusiTargetAdjustDaySubDao") - private List children; + @ApiModelProperty(name = "children", value = "统计单元指标调整单子表集合") + private List children; } diff --git a/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustDaySubDao.java b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustDaySubDao.java index dc1106e..7530a0b 100644 --- a/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustDaySubDao.java +++ b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustDaySubDao.java @@ -62,7 +62,7 @@ public class DcBusiTargetAdjustDaySubDao extends BaseModuleEntity { /** * 指标编码 */ - @ApiModelProperty(value = "指标编码") + @ApiModelProperty(name = "targetCode", value = "指标编码") @Excel(name = "指标编码") private String targetCode; @@ -76,42 +76,42 @@ public class DcBusiTargetAdjustDaySubDao extends BaseModuleEntity { /** * 指标单位 */ - @ApiModelProperty(value = "指标单位") + @ApiModelProperty(name = "tagetUnit", value = "指标单位") @Excel(name = "指标单位") private String tagetUnit; /** * 日期调整日期 */ - @ApiModelProperty(value = "日期调整日期") + @ApiModelProperty(name = "adjustDate", value = "日期调整日期") @Excel(name = "日期调整日期") private String adjustDate; /** * 调整时间 */ - @ApiModelProperty(value = "调整时间") + @ApiModelProperty(name = "adjstTime", value = "调整时间") @Excel(name = "调整时间") private Long adjstTime; /** * 原值 */ - @ApiModelProperty(value = "原值") + @ApiModelProperty(name = "valOrigin", value = "原值") @Excel(name = "原值") private BigDecimal valOrigin; /** * 调整值 */ - @ApiModelProperty(value = "调整值") + @ApiModelProperty(name = "valAdjust", value = "调整值") @Excel(name = "调整值") private BigDecimal valAdjust; /** * 结果值 */ - @ApiModelProperty(value = "结果值") + @ApiModelProperty(name = "valResult", value = "结果值") @Excel(name = "结果值") private BigDecimal valResult; From 8cf6e4661d9f635dc36b40675d932f862015e9db Mon Sep 17 00:00:00 2001 From: bobol Date: Thu, 7 Dec 2023 09:09:21 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DcBusiTargetAdjustDayMasterController.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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 a4be5e3..9ad4289 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 @@ -44,7 +44,7 @@ public class DcBusiTargetAdjustDayMasterController extends BaseController /** * 查询资产指标调整单主(日)列表 */ - @PreAuthorize("@ss.hasPermi('lzbi:master:list')") + @PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:list')") @GetMapping("/list") public TableDataInfo list(DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao) { @@ -56,7 +56,7 @@ public class DcBusiTargetAdjustDayMasterController extends BaseController /** * 导出资产指标调整单主(日)列表 */ - @PreAuthorize("@ss.hasPermi('lzbi:master:export')") + @PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:export')") @Log(title = "资产指标调整单主(日)", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao) @@ -69,7 +69,7 @@ public class DcBusiTargetAdjustDayMasterController extends BaseController /** * 获取资产指标调整单主(日)详细信息 */ - @PreAuthorize("@ss.hasPermi('lzbi:master:query')") + @PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { @@ -80,7 +80,7 @@ public class DcBusiTargetAdjustDayMasterController extends BaseController * 新增资产指标调整单主(日) */ @ApiOperation("新增资产指标调整单") - @PreAuthorize("@ss.hasPermi('lzbi:master:add')") + @PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:add')") @Log(title = "资产指标调整单主(日)", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao) @@ -91,7 +91,7 @@ public class DcBusiTargetAdjustDayMasterController extends BaseController /** * 修改资产指标调整单主(日) */ - @PreAuthorize("@ss.hasPermi('lzbi:master:edit')") + @PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:edit')") @Log(title = "资产指标调整单主(日)", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao) @@ -102,7 +102,7 @@ public class DcBusiTargetAdjustDayMasterController extends BaseController /** * 删除资产指标调整单主(日) */ - @PreAuthorize("@ss.hasPermi('lzbi:master:remove')") + @PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:remove')") @Log(title = "资产指标调整单主(日)", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) @@ -115,7 +115,7 @@ public class DcBusiTargetAdjustDayMasterController extends BaseController */ @ApiOperation("审核资产指标调整单") @ApiImplicitParam(name = "id", value = "id", dataType = "Long", dataTypeClass = Long.class, paramType = "path", required = true) - @PreAuthorize("@ss.hasPermi('lzbi:master:add')") + @PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:audit')") @Log(title = "资产指标调整单主(日)", businessType = BusinessType.OTHER) @PostMapping("/audit/{id}") public AjaxResult audit(@PathVariable("id") Long id) @@ -128,7 +128,7 @@ public class DcBusiTargetAdjustDayMasterController extends BaseController */ @ApiOperation("处理资产指标调整单") @ApiImplicitParam(name = "id", value = "id", dataType = "Long", dataTypeClass = Long.class, paramType = "path", required = true) - @PreAuthorize("@ss.hasPermi('lzbi:master:add')") + @PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:dispose')") @Log(title = "资产指标调整单主(日)", businessType = BusinessType.OTHER) @PostMapping("/dispose/{id}") public AjaxResult dispose(@PathVariable("id") Long id)