Browse Source
# Conflicts: # lzbi-module/src/main/resources/mapper/asset/DcBaseAssetInfoMapper.xml # lzbi-module/src/main/resources/mapper/asset/DcBaseWorkSpecialMapper.xmldevelop
zhousq
12 months ago
11 changed files with 1211 additions and 0 deletions
@ -0,0 +1,143 @@ |
|||||
|
package com.lzbi.draft.controller; |
||||
|
|
||||
|
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; |
||||
|
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; |
||||
|
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 |
||||
|
*/ |
||||
|
@Api(value = "资产指标调整单",tags = "资产指标调整单") |
||||
|
@RestController |
||||
|
@RequestMapping("/asset/target/adjust") |
||||
|
public class DcBusiTargetAdjustDayMasterController extends BaseController |
||||
|
{ |
||||
|
@Autowired |
||||
|
private DcBusiTargetAdjustDayMasterService dcBusiTargetAdjustDayMasterService; |
||||
|
|
||||
|
/** |
||||
|
* 查询资产指标调整单主(日)列表 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:list')") |
||||
|
@GetMapping("/list") |
||||
|
public TableDataInfo list(DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao) |
||||
|
{ |
||||
|
startPage(); |
||||
|
List<DcBusiTargetAdjustDayMasterDao> list = dcBusiTargetAdjustDayMasterService.selectDcBusiTargetAdjustDayMasterDaoList(dcBusiTargetAdjustDayMasterDao); |
||||
|
return getDataTable(list); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 导出资产指标调整单主(日)列表 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:export')") |
||||
|
@Log(title = "资产指标调整单主(日)", businessType = BusinessType.EXPORT) |
||||
|
@PostMapping("/export") |
||||
|
public void export(HttpServletResponse response, DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao) |
||||
|
{ |
||||
|
List<DcBusiTargetAdjustDayMasterDao> list = dcBusiTargetAdjustDayMasterService.selectDcBusiTargetAdjustDayMasterDaoList(dcBusiTargetAdjustDayMasterDao); |
||||
|
ExcelUtil<DcBusiTargetAdjustDayMasterDao> util = new ExcelUtil<DcBusiTargetAdjustDayMasterDao>(DcBusiTargetAdjustDayMasterDao.class); |
||||
|
util.exportExcel(response, list, "资产指标调整单主(日)数据"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取资产指标调整单主(日)详细信息 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:query')") |
||||
|
@GetMapping(value = "/{id}") |
||||
|
public AjaxResult getInfo(@PathVariable("id") Long id) |
||||
|
{ |
||||
|
return success(dcBusiTargetAdjustDayMasterService.selectDcBusiTargetAdjustDayMasterDaoById(id)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增资产指标调整单主(日) |
||||
|
*/ |
||||
|
@ApiOperation("新增资产指标调整单") |
||||
|
@PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:add')") |
||||
|
@Log(title = "资产指标调整单主(日)", businessType = BusinessType.INSERT) |
||||
|
@PostMapping |
||||
|
public AjaxResult add(@RequestBody DcBusiTargetAdjustDayMasterDao<DcBusiTargetAdjustDaySubDao> dcBusiTargetAdjustDayMasterDao) |
||||
|
{ |
||||
|
return toAjax(dcBusiTargetAdjustDayMasterService.insertDcBusiTargetAdjustDayMasterDao(dcBusiTargetAdjustDayMasterDao)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改资产指标调整单主(日) |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:edit')") |
||||
|
@Log(title = "资产指标调整单主(日)", businessType = BusinessType.UPDATE) |
||||
|
@PutMapping |
||||
|
public AjaxResult edit(@RequestBody DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao) |
||||
|
{ |
||||
|
return toAjax(dcBusiTargetAdjustDayMasterService.updateDcBusiTargetAdjustDayMasterDao(dcBusiTargetAdjustDayMasterDao)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除资产指标调整单主(日) |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:remove')") |
||||
|
@Log(title = "资产指标调整单主(日)", businessType = BusinessType.DELETE) |
||||
|
@DeleteMapping("/{ids}") |
||||
|
public AjaxResult remove(@PathVariable Long[] ids) |
||||
|
{ |
||||
|
return toAjax(dcBusiTargetAdjustDayMasterService.deleteDcBusiTargetAdjustDayMasterDaoByIds(ids)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 审核资产指标调整单(日) |
||||
|
*/ |
||||
|
@ApiOperation("审核资产指标调整单") |
||||
|
@ApiImplicitParam(name = "id", value = "id", dataType = "Long", dataTypeClass = Long.class, paramType = "path", required = true) |
||||
|
@PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:audit')") |
||||
|
@Log(title = "资产指标调整单主(日)", businessType = BusinessType.OTHER) |
||||
|
@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", required = true) |
||||
|
@PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:dispose')") |
||||
|
@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()); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,170 @@ |
|||||
|
package com.lzbi.draft.domain; |
||||
|
|
||||
|
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 |
||||
|
*/ |
||||
|
@ApiModel(value = "DcBusiTargetAdjustDayMasterDao对象", description = "资产指标调整单主表对象") |
||||
|
@Data |
||||
|
public class DcBusiTargetAdjustDayMasterDao<T> 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(name = "billSerial", value = "单据号") |
||||
|
@Excel(name = "单据号") |
||||
|
private String billSerial; |
||||
|
|
||||
|
/** |
||||
|
* 单据类别 |
||||
|
*/ |
||||
|
@ApiModelProperty(name = "biilType", value = "单据类别") |
||||
|
@Excel(name = "单据类别") |
||||
|
private String biilType; |
||||
|
|
||||
|
/** |
||||
|
* 公司ID |
||||
|
*/ |
||||
|
@ApiModelProperty(name = "companyId", value = "公司ID") |
||||
|
@Excel(name = "公司ID") |
||||
|
private Long companyId; |
||||
|
|
||||
|
/** |
||||
|
* 公司名称 |
||||
|
*/ |
||||
|
@ApiModelProperty(hidden = true) |
||||
|
@Excel(name = "公司名称") |
||||
|
private String companyName; |
||||
|
|
||||
|
/** |
||||
|
* 组织机构名称 |
||||
|
*/ |
||||
|
@ApiModelProperty(hidden = true) |
||||
|
@Excel(name = "组织机构名称") |
||||
|
private String organizeName; |
||||
|
|
||||
|
/** |
||||
|
* 组织机构ID |
||||
|
*/ |
||||
|
@ApiModelProperty(name = "oragnizeId", value = "组织机构ID") |
||||
|
@Excel(name = "组织机构ID") |
||||
|
private Long oragnizeId; |
||||
|
|
||||
|
/** |
||||
|
* 统计单元编码 |
||||
|
*/ |
||||
|
@ApiModelProperty(name = "assetCode", value = "统计单元编码") |
||||
|
@Excel(name = "统计单元编码") |
||||
|
private String assetCode; |
||||
|
|
||||
|
/** |
||||
|
* 统计单元名称 |
||||
|
*/ |
||||
|
@ApiModelProperty(hidden = true) |
||||
|
@Excel(name = "统计单元名称") |
||||
|
private String assetName; |
||||
|
|
||||
|
/** |
||||
|
* 统计专业代码 |
||||
|
*/ |
||||
|
@ApiModelProperty(name = "fieldCode", value = "统计专业代码") |
||||
|
@Excel(name = "统计专业代码") |
||||
|
private String fieldCode; |
||||
|
|
||||
|
/** |
||||
|
* 统计专业名称 |
||||
|
*/ |
||||
|
@ApiModelProperty(hidden = true) |
||||
|
@Excel(name = "统计专业名称") |
||||
|
private String fieldName; |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
private Long id; |
||||
|
|
||||
|
/** |
||||
|
* 调整目标日期 |
||||
|
*/ |
||||
|
@ApiModelProperty(name = "dateAdjust", value = "调整目标日期") |
||||
|
@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已处理 |
||||
|
*/ |
||||
|
@ApiModelProperty(hidden = true) |
||||
|
@Excel(name = "审核状态;0待审核 1 已经审核 2已处理") |
||||
|
private String checkStauts; |
||||
|
|
||||
|
/** |
||||
|
* 审核类型;1人工2自动 |
||||
|
*/ |
||||
|
@ApiModelProperty(hidden = true) |
||||
|
@Excel(name = "审核类型;1人工2自动") |
||||
|
private String checkType; |
||||
|
|
||||
|
/** |
||||
|
* 统计单元指标调整单子表集合 |
||||
|
*/ |
||||
|
@ApiModelProperty(name = "children", value = "统计单元指标调整单子表集合") |
||||
|
private List<T> children; |
||||
|
|
||||
|
} |
@ -0,0 +1,118 @@ |
|||||
|
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; |
||||
|
import com.lzbi.common.annotation.Excel; |
||||
|
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 { |
||||
|
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(name = "targetCode", value = "指标编码") |
||||
|
@Excel(name = "指标编码") |
||||
|
private String targetCode; |
||||
|
|
||||
|
/** |
||||
|
* 指标名称 |
||||
|
*/ |
||||
|
@ApiModelProperty(hidden = true) |
||||
|
@Excel(name = "指标名称") |
||||
|
private String targetName; |
||||
|
|
||||
|
/** |
||||
|
* 指标单位 |
||||
|
*/ |
||||
|
@ApiModelProperty(name = "tagetUnit", value = "指标单位") |
||||
|
@Excel(name = "指标单位") |
||||
|
private String tagetUnit; |
||||
|
|
||||
|
/** |
||||
|
* 日期调整日期 |
||||
|
*/ |
||||
|
@ApiModelProperty(name = "adjustDate", value = "日期调整日期") |
||||
|
@Excel(name = "日期调整日期") |
||||
|
private String adjustDate; |
||||
|
|
||||
|
/** |
||||
|
* 调整时间 |
||||
|
*/ |
||||
|
@ApiModelProperty(name = "adjstTime", value = "调整时间") |
||||
|
@Excel(name = "调整时间") |
||||
|
private Long adjstTime; |
||||
|
|
||||
|
/** |
||||
|
* 原值 |
||||
|
*/ |
||||
|
@ApiModelProperty(name = "valOrigin", value = "原值") |
||||
|
@Excel(name = "原值") |
||||
|
private BigDecimal valOrigin; |
||||
|
|
||||
|
/** |
||||
|
* 调整值 |
||||
|
*/ |
||||
|
@ApiModelProperty(name = "valAdjust", value = "调整值") |
||||
|
@Excel(name = "调整值") |
||||
|
private BigDecimal valAdjust; |
||||
|
|
||||
|
/** |
||||
|
* 结果值 |
||||
|
*/ |
||||
|
@ApiModelProperty(name = "valResult", value = "结果值") |
||||
|
@Excel(name = "结果值") |
||||
|
private BigDecimal valResult; |
||||
|
|
||||
|
} |
@ -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<DcBusiTargetAdjustDayMasterDao> |
||||
|
{ |
||||
|
/** |
||||
|
* 查询资产指标调整单主(日) |
||||
|
* |
||||
|
* @param id 资产指标调整单主(日)主键 |
||||
|
* @return 资产指标调整单主(日) |
||||
|
*/ |
||||
|
public DcBusiTargetAdjustDayMasterDao selectDcBusiTargetAdjustDayMasterDaoById(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 查询资产指标调整单主(日)列表 |
||||
|
* |
||||
|
* @param dcBusiTargetAdjustDayMasterDao 资产指标调整单主(日) |
||||
|
* @return 资产指标调整单主(日)集合 |
||||
|
*/ |
||||
|
public List<DcBusiTargetAdjustDayMasterDao> 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); |
||||
|
} |
@ -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<DcBusiTargetAdjustDaySubDao> |
||||
|
{ |
||||
|
/** |
||||
|
* 查询统计单元指标调整单子(日) |
||||
|
* |
||||
|
* @param id 统计单元指标调整单子(日)主键 |
||||
|
* @return 统计单元指标调整单子(日) |
||||
|
*/ |
||||
|
public DcBusiTargetAdjustDaySubDao selectDcBusiTargetAdjustDaySubDaoById(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 查询统计单元指标调整单子(日)列表 |
||||
|
* |
||||
|
* @param dcBusiTargetAdjustDaySubDao 统计单元指标调整单子(日) |
||||
|
* @return 统计单元指标调整单子(日)集合 |
||||
|
*/ |
||||
|
public List<DcBusiTargetAdjustDaySubDao> 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); |
||||
|
} |
@ -0,0 +1,235 @@ |
|||||
|
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.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<DcBusiTargetAdjustDayMasterMapper, DcBusiTargetAdjustDayMasterDao> implements IService<DcBusiTargetAdjustDayMasterDao> { |
||||
|
|
||||
|
@Resource |
||||
|
private DcBaseAssetInfoMapper dcBaseAssetInfoMapper; |
||||
|
|
||||
|
@Autowired |
||||
|
private SysDeptServiceImpl sysDeptService; |
||||
|
|
||||
|
@Autowired |
||||
|
private DcBusiTargetAdjustDaySubService dcBusiTargetAdjustDaySubService; |
||||
|
|
||||
|
@Resource |
||||
|
private DcBusiTargetAdjustDaySubMapper dcBusiTargetAdjustDaySubMapper; |
||||
|
|
||||
|
@Resource |
||||
|
private DcBaseWorkSpecialMapper dcBaseWorkSpecialMapper; |
||||
|
|
||||
|
@Resource |
||||
|
private DcBusiTargetDraftDayMapper dcBusiTargetDraftDayMapper; |
||||
|
|
||||
|
private static final Lock lock = new ReentrantLock(); |
||||
|
|
||||
|
/** |
||||
|
* 查询资产指标调整单主(日) |
||||
|
* |
||||
|
* @param id 资产指标调整单主(日)主键 |
||||
|
* @return 资产指标调整单主(日) |
||||
|
*/ |
||||
|
public DcBusiTargetAdjustDayMasterDao selectDcBusiTargetAdjustDayMasterDaoById(Long id) { |
||||
|
return baseMapper.selectDcBusiTargetAdjustDayMasterDaoById(id); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 查询资产指标调整单主(日)列表 |
||||
|
* |
||||
|
* @param dcBusiTargetAdjustDayMasterDao 资产指标调整单主(日) |
||||
|
* @return 资产指标调整单主(日) |
||||
|
*/ |
||||
|
public List<DcBusiTargetAdjustDayMasterDao> 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()); |
||||
|
} |
||||
|
// 查询生产专业
|
||||
|
DcBaseWorkSpecial dcBaseWorkSpecial = dcBaseWorkSpecialMapper.selectDcBaseWorkSpecialBySpecialCode(dcBusiTargetAdjustDayMasterDao.getFieldCode()); |
||||
|
if (ObjectUtils.isNotEmpty(dcBaseWorkSpecial)) { |
||||
|
dcBusiTargetAdjustDayMasterDao.setFieldName(dcBaseWorkSpecial.getSpecialName()); |
||||
|
} |
||||
|
dcBusiTargetAdjustDayMasterDao.setCheckStauts(DcBusiTargetAdjustDayMasterDao.CHECK_STATUS_PENDING_CHECK); |
||||
|
dcBusiTargetAdjustDayMasterDao.setCheckType(DcBusiTargetAdjustDayMasterDao.CHECK_TYPE_ARTIFICIAL); |
||||
|
dcBusiTargetAdjustDayMasterDao.setCreatedTime(DateUtils.getNowDate()); |
||||
|
|
||||
|
// 新增子表数据
|
||||
|
List<DcBusiTargetAdjustDaySubDao> 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); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 审核资产指标调整单 |
||||
|
* |
||||
|
* @param id 资产指标调整单主(日)主键 |
||||
|
* @return |
||||
|
*/ |
||||
|
public int audit(Long id) { |
||||
|
DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao = new DcBusiTargetAdjustDayMasterDao(); |
||||
|
dcBusiTargetAdjustDayMasterDao.setId(id); |
||||
|
dcBusiTargetAdjustDayMasterDao.setCheckStauts(DcBusiTargetAdjustDayMasterDao.CHECK_STATUS_CHECKED); |
||||
|
return this.updateDcBusiTargetAdjustDayMasterDao(dcBusiTargetAdjustDayMasterDao); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 审核资产指标调整单 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return |
||||
|
*/ |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
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<DcBusiTargetAdjustDaySubDao> 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<DcBusiTargetDraftDay> 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(); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -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<DcBusiTargetAdjustDaySubMapper, DcBusiTargetAdjustDaySubDao> implements IService<DcBusiTargetAdjustDaySubDao> |
||||
|
{ |
||||
|
|
||||
|
/** |
||||
|
* 查询统计单元指标调整单子(日) |
||||
|
* |
||||
|
* @param id 统计单元指标调整单子(日)主键 |
||||
|
* @return 统计单元指标调整单子(日) |
||||
|
*/ |
||||
|
public DcBusiTargetAdjustDaySubDao selectDcBusiTargetAdjustDaySubDaoById(Long id) |
||||
|
{ |
||||
|
return baseMapper.selectDcBusiTargetAdjustDaySubDaoById(id); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 查询统计单元指标调整单子(日)列表 |
||||
|
* |
||||
|
* @param dcBusiTargetAdjustDaySubDao 统计单元指标调整单子(日) |
||||
|
* @return 统计单元指标调整单子(日) |
||||
|
*/ |
||||
|
public List<DcBusiTargetAdjustDaySubDao> 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); |
||||
|
} |
||||
|
} |
@ -0,0 +1,179 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!DOCTYPE mapper |
||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.lzbi.draft.mapper.DcBusiTargetAdjustDayMasterMapper"> |
||||
|
|
||||
|
<resultMap type="com.lzbi.draft.domain.DcBusiTargetAdjustDayMasterDao" id="DcBusiTargetAdjustDayMasterResult"> |
||||
|
<result property="billSerial" column="bill_serial"/> |
||||
|
<result property="biilType" column="biil_type"/> |
||||
|
<result property="companyId" column="company_id"/> |
||||
|
<result property="companyName" column="company_name"/> |
||||
|
<result property="organizeName" column="organize_name"/> |
||||
|
<result property="oragnizeId" column="oragnize_id"/> |
||||
|
<result property="assetCode" column="asset_code"/> |
||||
|
<result property="assetName" column="asset_name"/> |
||||
|
<result property="fieldCode" column="field_code"/> |
||||
|
<result property="fieldName" column="field_name"/> |
||||
|
<result property="id" column="id"/> |
||||
|
<result property="dateAdjust" column="date_adjust"/> |
||||
|
<result property="tenantId" column="tenant_id"/> |
||||
|
<result property="revision" column="revision"/> |
||||
|
<result property="createdBy" column="created_by"/> |
||||
|
<result property="createdTime" column="created_time"/> |
||||
|
<result property="updatedBy" column="updated_by"/> |
||||
|
<result property="updatedTime" column="updated_time"/> |
||||
|
<result property="deleteBy" column="delete_by"/> |
||||
|
<result property="deleteTime" column="delete_time"/> |
||||
|
<result property="checkStauts" column="check_stauts"/> |
||||
|
<result property="checkType" column="check_type"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
<sql id="selectDcBusiTargetAdjustDayMasterVo"> |
||||
|
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 |
||||
|
</sql> |
||||
|
|
||||
|
<select id="selectDcBusiTargetAdjustDayMasterDaoList" parameterType="DcBusiTargetAdjustDayMasterDao" |
||||
|
resultMap="DcBusiTargetAdjustDayMasterResult"> |
||||
|
<include refid="selectDcBusiTargetAdjustDayMasterVo"/> |
||||
|
<where> |
||||
|
<if test="billSerial != null and billSerial != ''">and bill_serial = #{billSerial}</if> |
||||
|
<if test="biilType != null and biilType != ''">and biil_type = #{biilType}</if> |
||||
|
<if test="companyId != null ">and company_id = #{companyId}</if> |
||||
|
<if test="companyName != null and companyName != ''">and company_name like concat('%', #{companyName}, |
||||
|
'%') |
||||
|
</if> |
||||
|
<if test="organizeName != null and organizeName != ''">and organize_name like concat('%', #{organizeName}, |
||||
|
'%') |
||||
|
</if> |
||||
|
<if test="oragnizeId != null ">and oragnize_id = #{oragnizeId}</if> |
||||
|
<if test="assetCode != null and assetCode != ''">and asset_code = #{assetCode}</if> |
||||
|
<if test="assetName != null and assetName != ''">and asset_name like concat('%', #{assetName}, '%')</if> |
||||
|
<if test="fieldCode != null and fieldCode != ''">and field_code = #{fieldCode}</if> |
||||
|
<if test="fieldName != null and fieldName != ''">and field_name like concat('%', #{fieldName}, '%')</if> |
||||
|
<if test="dateAdjust != null and dateAdjust != ''">and date_adjust = #{dateAdjust}</if> |
||||
|
<if test="checkStauts != null and checkStauts != ''">and check_stauts = #{checkStauts}</if> |
||||
|
<if test="checkType != null and checkType != ''">and check_type = #{checkType}</if> |
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectDcBusiTargetAdjustDayMasterDaoById" parameterType="Long" |
||||
|
resultMap="DcBusiTargetAdjustDayMasterResult"> |
||||
|
<include refid="selectDcBusiTargetAdjustDayMasterVo"/> |
||||
|
where id = #{id} |
||||
|
</select> |
||||
|
|
||||
|
<insert id="insertDcBusiTargetAdjustDayMasterDao" parameterType="DcBusiTargetAdjustDayMasterDao" useGeneratedKeys="true" |
||||
|
keyProperty="id"> |
||||
|
insert into dc_busi_target_adjust_day_master |
||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
|
<if test="billSerial != null">bill_serial,</if> |
||||
|
<if test="biilType != null">biil_type,</if> |
||||
|
<if test="companyId != null">company_id,</if> |
||||
|
<if test="companyName != null">company_name,</if> |
||||
|
<if test="organizeName != null">organize_name,</if> |
||||
|
<if test="oragnizeId != null">oragnize_id,</if> |
||||
|
<if test="assetCode != null">asset_code,</if> |
||||
|
<if test="assetName != null">asset_name,</if> |
||||
|
<if test="fieldCode != null">field_code,</if> |
||||
|
<if test="fieldName != null">field_name,</if> |
||||
|
<if test="dateAdjust != null">date_adjust,</if> |
||||
|
<if test="tenantId != null">tenant_id,</if> |
||||
|
<if test="revision != null">revision,</if> |
||||
|
<if test="createdBy != null">created_by,</if> |
||||
|
<if test="createdTime != null">created_time,</if> |
||||
|
<if test="updatedBy != null">updated_by,</if> |
||||
|
<if test="updatedTime != null">updated_time,</if> |
||||
|
<if test="deleteBy != null">delete_by,</if> |
||||
|
<if test="deleteTime != null">delete_time,</if> |
||||
|
<if test="checkStauts != null">check_stauts,</if> |
||||
|
<if test="checkType != null">check_type,</if> |
||||
|
</trim> |
||||
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
|
<if test="billSerial != null">#{billSerial},</if> |
||||
|
<if test="biilType != null">#{biilType},</if> |
||||
|
<if test="companyId != null">#{companyId},</if> |
||||
|
<if test="companyName != null">#{companyName},</if> |
||||
|
<if test="organizeName != null">#{organizeName},</if> |
||||
|
<if test="oragnizeId != null">#{oragnizeId},</if> |
||||
|
<if test="assetCode != null">#{assetCode},</if> |
||||
|
<if test="assetName != null">#{assetName},</if> |
||||
|
<if test="fieldCode != null">#{fieldCode},</if> |
||||
|
<if test="fieldName != null">#{fieldName},</if> |
||||
|
<if test="dateAdjust != null">#{dateAdjust},</if> |
||||
|
<if test="tenantId != null">#{tenantId},</if> |
||||
|
<if test="revision != null">#{revision},</if> |
||||
|
<if test="createdBy != null">#{createdBy},</if> |
||||
|
<if test="createdTime != null">#{createdTime},</if> |
||||
|
<if test="updatedBy != null">#{updatedBy},</if> |
||||
|
<if test="updatedTime != null">#{updatedTime},</if> |
||||
|
<if test="deleteBy != null">#{deleteBy},</if> |
||||
|
<if test="deleteTime != null">#{deleteTime},</if> |
||||
|
<if test="checkStauts != null">#{checkStauts},</if> |
||||
|
<if test="checkType != null">#{checkType},</if> |
||||
|
</trim> |
||||
|
</insert> |
||||
|
|
||||
|
<update id="updateDcBusiTargetAdjustDayMasterDao" parameterType="DcBusiTargetAdjustDayMasterDao"> |
||||
|
update dc_busi_target_adjust_day_master |
||||
|
<trim prefix="SET" suffixOverrides=","> |
||||
|
<if test="billSerial != null">bill_serial = #{billSerial},</if> |
||||
|
<if test="biilType != null">biil_type = #{biilType},</if> |
||||
|
<if test="companyId != null">company_id = #{companyId},</if> |
||||
|
<if test="companyName != null">company_name = #{companyName},</if> |
||||
|
<if test="organizeName != null">organize_name = #{organizeName},</if> |
||||
|
<if test="oragnizeId != null">oragnize_id = #{oragnizeId},</if> |
||||
|
<if test="assetCode != null">asset_code = #{assetCode},</if> |
||||
|
<if test="assetName != null">asset_name = #{assetName},</if> |
||||
|
<if test="fieldCode != null">field_code = #{fieldCode},</if> |
||||
|
<if test="fieldName != null">field_name = #{fieldName},</if> |
||||
|
<if test="dateAdjust != null">date_adjust = #{dateAdjust},</if> |
||||
|
<if test="tenantId != null">tenant_id = #{tenantId},</if> |
||||
|
<if test="revision != null">revision = #{revision},</if> |
||||
|
<if test="createdBy != null">created_by = #{createdBy},</if> |
||||
|
<if test="createdTime != null">created_time = #{createdTime},</if> |
||||
|
<if test="updatedBy != null">updated_by = #{updatedBy},</if> |
||||
|
<if test="updatedTime != null">updated_time = #{updatedTime},</if> |
||||
|
<if test="deleteBy != null">delete_by = #{deleteBy},</if> |
||||
|
<if test="deleteTime != null">delete_time = #{deleteTime},</if> |
||||
|
<if test="checkStauts != null">check_stauts = #{checkStauts},</if> |
||||
|
<if test="checkType != null">check_type = #{checkType},</if> |
||||
|
</trim> |
||||
|
where id = #{id} |
||||
|
</update> |
||||
|
|
||||
|
<delete id="deleteDcBusiTargetAdjustDayMasterDaoById" parameterType="Long"> |
||||
|
delete |
||||
|
from dc_busi_target_adjust_day_master |
||||
|
where id = #{id} |
||||
|
</delete> |
||||
|
|
||||
|
<delete id="deleteDcBusiTargetAdjustDayMasterDaoByIds" parameterType="String"> |
||||
|
delete from dc_busi_target_adjust_day_master where id in |
||||
|
<foreach item="id" collection="array" open="(" separator="," close=")"> |
||||
|
#{id} |
||||
|
</foreach> |
||||
|
</delete> |
||||
|
</mapper> |
@ -0,0 +1,128 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!DOCTYPE mapper |
||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.lzbi.draft.mapper.DcBusiTargetAdjustDaySubMapper"> |
||||
|
|
||||
|
<resultMap type="com.lzbi.draft.domain.DcBusiTargetAdjustDaySubDao" id="DcBusiTargetAdjustDaySubResult"> |
||||
|
<result property="tenantId" column="tenant_id" /> |
||||
|
<result property="revision" column="revision" /> |
||||
|
<result property="createdBy" column="created_by" /> |
||||
|
<result property="createdTime" column="created_time" /> |
||||
|
<result property="updatedBy" column="updated_by" /> |
||||
|
<result property="updatedTime" column="updated_time" /> |
||||
|
<result property="deleteBy" column="delete_by" /> |
||||
|
<result property="deleteTime" column="delete_time" /> |
||||
|
<result property="id" column="id" /> |
||||
|
<result property="billNoMaster" column="bill_no_master" /> |
||||
|
<result property="targetCode" column="target_code" /> |
||||
|
<result property="targetName" column="target_name" /> |
||||
|
<result property="tagetUnit" column="taget_unit" /> |
||||
|
<result property="adjustDate" column="adjust_date" /> |
||||
|
<result property="adjstTime" column="adjst_time" /> |
||||
|
<result property="valOrigin" column="val_origin" /> |
||||
|
<result property="valAdjust" column="val_adjust" /> |
||||
|
<result property="valResult" column="val_result" /> |
||||
|
</resultMap> |
||||
|
|
||||
|
<sql id="selectDcBusiTargetAdjustDaySubVo"> |
||||
|
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 |
||||
|
</sql> |
||||
|
|
||||
|
<select id="selectDcBusiTargetAdjustDaySubDaoList" parameterType="DcBusiTargetAdjustDaySubDao" resultMap="DcBusiTargetAdjustDaySubResult"> |
||||
|
<include refid="selectDcBusiTargetAdjustDaySubVo"/> |
||||
|
<where> |
||||
|
<if test="billNoMaster != null and billNoMaster != ''"> and bill_no_master = #{billNoMaster}</if> |
||||
|
<if test="targetCode != null and targetCode != ''"> and target_code = #{targetCode}</if> |
||||
|
<if test="targetName != null and targetName != ''"> and target_name like concat('%', #{targetName}, '%')</if> |
||||
|
<if test="tagetUnit != null and tagetUnit != ''"> and taget_unit = #{tagetUnit}</if> |
||||
|
<if test="adjustDate != null and adjustDate != ''"> and adjust_date = #{adjustDate}</if> |
||||
|
<if test="adjstTime != null "> and adjst_time = #{adjstTime}</if> |
||||
|
<if test="valOrigin != null "> and val_origin = #{valOrigin}</if> |
||||
|
<if test="valAdjust != null "> and val_adjust = #{valAdjust}</if> |
||||
|
<if test="valResult != null "> and val_result = #{valResult}</if> |
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectDcBusiTargetAdjustDaySubDaoById" parameterType="Long" resultMap="DcBusiTargetAdjustDaySubResult"> |
||||
|
<include refid="selectDcBusiTargetAdjustDaySubVo"/> |
||||
|
where id = #{id} |
||||
|
</select> |
||||
|
|
||||
|
<insert id="insertDcBusiTargetAdjustDaySubDao" parameterType="DcBusiTargetAdjustDaySubDao" useGeneratedKeys="true" keyProperty="id"> |
||||
|
insert into dc_busi_target_adjust_day_sub |
||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
|
<if test="tenantId != null">tenant_id,</if> |
||||
|
<if test="revision != null">revision,</if> |
||||
|
<if test="createdBy != null">created_by,</if> |
||||
|
<if test="createdTime != null">created_time,</if> |
||||
|
<if test="updatedBy != null">updated_by,</if> |
||||
|
<if test="updatedTime != null">updated_time,</if> |
||||
|
<if test="deleteBy != null">delete_by,</if> |
||||
|
<if test="deleteTime != null">delete_time,</if> |
||||
|
<if test="billNoMaster != null">bill_no_master,</if> |
||||
|
<if test="targetCode != null">target_code,</if> |
||||
|
<if test="targetName != null">target_name,</if> |
||||
|
<if test="tagetUnit != null">taget_unit,</if> |
||||
|
<if test="adjustDate != null">adjust_date,</if> |
||||
|
<if test="adjstTime != null">adjst_time,</if> |
||||
|
<if test="valOrigin != null">val_origin,</if> |
||||
|
<if test="valAdjust != null">val_adjust,</if> |
||||
|
<if test="valResult != null">val_result,</if> |
||||
|
</trim> |
||||
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
|
<if test="tenantId != null">#{tenantId},</if> |
||||
|
<if test="revision != null">#{revision},</if> |
||||
|
<if test="createdBy != null">#{createdBy},</if> |
||||
|
<if test="createdTime != null">#{createdTime},</if> |
||||
|
<if test="updatedBy != null">#{updatedBy},</if> |
||||
|
<if test="updatedTime != null">#{updatedTime},</if> |
||||
|
<if test="deleteBy != null">#{deleteBy},</if> |
||||
|
<if test="deleteTime != null">#{deleteTime},</if> |
||||
|
<if test="billNoMaster != null">#{billNoMaster},</if> |
||||
|
<if test="targetCode != null">#{targetCode},</if> |
||||
|
<if test="targetName != null">#{targetName},</if> |
||||
|
<if test="tagetUnit != null">#{tagetUnit},</if> |
||||
|
<if test="adjustDate != null">#{adjustDate},</if> |
||||
|
<if test="adjstTime != null">#{adjstTime},</if> |
||||
|
<if test="valOrigin != null">#{valOrigin},</if> |
||||
|
<if test="valAdjust != null">#{valAdjust},</if> |
||||
|
<if test="valResult != null">#{valResult},</if> |
||||
|
</trim> |
||||
|
</insert> |
||||
|
|
||||
|
<update id="updateDcBusiTargetAdjustDaySubDao" parameterType="DcBusiTargetAdjustDaySubDao"> |
||||
|
update dc_busi_target_adjust_day_sub |
||||
|
<trim prefix="SET" suffixOverrides=","> |
||||
|
<if test="tenantId != null">tenant_id = #{tenantId},</if> |
||||
|
<if test="revision != null">revision = #{revision},</if> |
||||
|
<if test="createdBy != null">created_by = #{createdBy},</if> |
||||
|
<if test="createdTime != null">created_time = #{createdTime},</if> |
||||
|
<if test="updatedBy != null">updated_by = #{updatedBy},</if> |
||||
|
<if test="updatedTime != null">updated_time = #{updatedTime},</if> |
||||
|
<if test="deleteBy != null">delete_by = #{deleteBy},</if> |
||||
|
<if test="deleteTime != null">delete_time = #{deleteTime},</if> |
||||
|
<if test="billNoMaster != null">bill_no_master = #{billNoMaster},</if> |
||||
|
<if test="targetCode != null">target_code = #{targetCode},</if> |
||||
|
<if test="targetName != null">target_name = #{targetName},</if> |
||||
|
<if test="tagetUnit != null">taget_unit = #{tagetUnit},</if> |
||||
|
<if test="adjustDate != null">adjust_date = #{adjustDate},</if> |
||||
|
<if test="adjstTime != null">adjst_time = #{adjstTime},</if> |
||||
|
<if test="valOrigin != null">val_origin = #{valOrigin},</if> |
||||
|
<if test="valAdjust != null">val_adjust = #{valAdjust},</if> |
||||
|
<if test="valResult != null">val_result = #{valResult},</if> |
||||
|
</trim> |
||||
|
where id = #{id} |
||||
|
</update> |
||||
|
|
||||
|
<delete id="deleteDcBusiTargetAdjustDaySubDaoById" parameterType="Long"> |
||||
|
delete from dc_busi_target_adjust_day_sub where id = #{id} |
||||
|
</delete> |
||||
|
|
||||
|
<delete id="deleteDcBusiTargetAdjustDaySubDaoByIds" parameterType="String"> |
||||
|
delete from dc_busi_target_adjust_day_sub where id in |
||||
|
<foreach item="id" collection="array" open="(" separator="," close=")"> |
||||
|
#{id} |
||||
|
</foreach> |
||||
|
</delete> |
||||
|
</mapper> |
Loading…
Reference in new issue