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}