Browse Source

Merge remote-tracking branch 'origin/develop' into develop

# Conflicts:
#	lzbi-module/src/main/java/com/lzbi/module/base/BaseModuleEntity.java
#	lzbi-module/src/main/java/com/lzbi/special/domain/DcBaseWorkSpecial.java
#	lzbi-module/src/main/resources/mapper/targetFolder/DcBaseAssetTargetMapper.xml
develop
zhousq 11 months ago
parent
commit
1c569b84ec
  1. 93
      lzbi-module/src/main/java/com/lzbi/asset/controller/DcBaseParamModelController.java
  2. 2
      lzbi-module/src/main/java/com/lzbi/asset/domain/DcBaseParamModel.java
  3. 2
      lzbi-module/src/main/java/com/lzbi/asset/domain/DcBusiParamSource.java
  4. 2
      lzbi-module/src/main/java/com/lzbi/asset/domain/DcBusiWorkReadConfig.java
  5. 8
      lzbi-module/src/main/java/com/lzbi/asset/mapper/DcBaseAssetInfoMapper.java
  6. 2
      lzbi-module/src/main/java/com/lzbi/bill/domain/DcBusiPlanTargetMonth.java
  7. 77
      lzbi-module/src/main/java/com/lzbi/bill/service/DcBusiPlanTargetMonthService.java
  8. 2
      lzbi-module/src/main/java/com/lzbi/code/domain/DcBaseCoderuleDefine.java
  9. 2
      lzbi-module/src/main/java/com/lzbi/code/domain/DcBaseCoderuleDefineDao.java
  10. 2
      lzbi-module/src/main/java/com/lzbi/code/domain/DcBaseCoderuleSerialDao.java
  11. 2
      lzbi-module/src/main/java/com/lzbi/code/domain/DcBusiCoderuleConfig.java
  12. 2
      lzbi-module/src/main/java/com/lzbi/code/domain/DcBusiCoderuleConfigDao.java
  13. 32
      lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetAdjustDayMasterController.java
  14. 105
      lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetAdjustDaySubController.java
  15. 2
      lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamBillSub.java
  16. 4
      lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamDraftDay.java
  17. 4
      lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustDayMasterDao.java
  18. 2
      lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustDaySubDao.java
  19. 2
      lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetDraftDay.java
  20. 2
      lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetDraftMonth.java
  21. 12
      lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetAdjustDaySubMapper.java
  22. 52
      lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustDayMasterService.java
  23. 18
      lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustDaySubService.java
  24. 197
      lzbi-module/src/main/java/com/lzbi/module/base/BaseModuleEntity.java
  25. 3
      lzbi-module/src/main/java/com/lzbi/special/controller/DcBaseWorkSpecialController.java
  26. 8
      lzbi-module/src/main/java/com/lzbi/special/mapper/DcBaseWorkSpecialMapper.java
  27. 1
      lzbi-module/src/main/java/com/lzbi/targetFolder/controller/DcBaseAssetTargetController.java
  28. 129
      lzbi-module/src/main/java/com/lzbi/targetFolder/controller/DcBaseTargetModelController.java
  29. 5
      lzbi-module/src/main/java/com/lzbi/targetFolder/domain/DcBaseAssetTargetDao.java
  30. 17
      lzbi-module/src/main/java/com/lzbi/targetFolder/domain/DcBaseTargetModel.java
  31. 9
      lzbi-module/src/main/java/com/lzbi/targetFolder/mapper/DcBaseAssetTargetMapper.java
  32. 40
      lzbi-module/src/main/java/com/lzbi/targetFolder/mapper/DcBaseTargetModelMapper.java
  33. 60
      lzbi-module/src/main/java/com/lzbi/targetFolder/service/DcBaseTargetModelService.java
  34. 4
      lzbi-module/src/main/java/com/lzbi/task/service/WorkParamReadService.java
  35. 1
      lzbi-module/src/main/resources/mapper/asset/DcBusiPlanTargetMonthMapper.xml
  36. 3
      lzbi-module/src/main/resources/mapper/asset/DcBusiTargetAdjustDayMasterMapper.xml
  37. 20
      lzbi-module/src/main/resources/mapper/asset/DcBusiTargetAdjustDaySubMapper.xml
  38. 42
      lzbi-module/src/main/resources/mapper/targetFolder/DcBaseTargetModelMapper.xml

93
lzbi-module/src/main/java/com/lzbi/asset/controller/DcBaseParamModelController.java

@ -1,5 +1,8 @@
package com.lzbi.asset.controller;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lzbi.common.annotation.Log;
import com.lzbi.common.core.controller.BaseController;
@ -12,7 +15,11 @@ import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
@ -36,6 +43,7 @@ public class DcBaseParamModelController extends BaseController
* 分页列表查询
* @return 分页数据
*/
@PreAuthorize("@ss.hasPermi('asset:paramModel:list')")
@GetMapping("/list")
public TableDataInfo list(DcBaseParamModel dcBaseParamModel)
{ startPage();
@ -47,6 +55,7 @@ public class DcBaseParamModelController extends BaseController
*@param id
@return DcBaseParamModel 没有反馈空
*/
@PreAuthorize("@ss.hasPermi('asset:paramModel:query')")
@ApiOperation("根据ID获取参数模版表详细信息")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
@ -57,6 +66,7 @@ public class DcBaseParamModelController extends BaseController
*@param
*@return DcBaseParamModel
*/
@PreAuthorize("@ss.hasPermi('asset:paramModel:add')")
@ApiOperation("新增参数模版表一条数据")
@Log(title = "", businessType = BusinessType.INSERT)
@PostMapping
@ -74,6 +84,7 @@ public class DcBaseParamModelController extends BaseController
*@param
*@return DcBaseParamModel
*/
@PreAuthorize("@ss.hasPermi('asset:paramModel:edit')")
@ApiOperation("参数模版表修改")
@Log(title = "", businessType = BusinessType.UPDATE)
@PutMapping
@ -83,27 +94,16 @@ public class DcBaseParamModelController extends BaseController
dcBaseParamModel.setUpdatedTime(DateUtils.getNowDate());
return toAjax(dcBaseParamModelService.updateById(dcBaseParamModel));
}
/**
* 通过ID删除参数模版表
* @param id
* @return 成功1 失败0
*/
@ApiOperation("根据ID删除参数模版表")
@Log(title = "单一参数模版表", businessType = BusinessType.DELETE)
@DeleteMapping("/id/{id}")
public AjaxResult batchRemove(@PathVariable Long id) {
DcBaseParamModel dcBaseParamModel=new DcBaseParamModel();
dcBaseParamModel.setId(id);
return toAjax(dcBaseParamModelService.removeById( dcBaseParamModel));
}
/**
* 批量删除参数模版表
* @param ids 数组
* @return 删除的条数
*/
@PreAuthorize("@ss.hasPermi('asset:paramModel:remove')")
@ApiOperation("批量删除参数模版表")
@Log(title = "批量删除参数模版表", businessType = BusinessType.DELETE)
@DeleteMapping("/ids/{ids}")
@DeleteMapping("/{ids}")
public AjaxResult batchRemove(@PathVariable Long[] ids) {
List<Long> collect = Arrays.stream(ids).collect(Collectors.toList());
return toAjax(dcBaseParamModelService.removeBatchByIds(collect));
@ -121,6 +121,7 @@ public class DcBaseParamModelController extends BaseController
/**
* "参数模版表数据导出功能
*/
@PreAuthorize("@ss.hasPermi('asset:paramModel:export')")
@ApiOperation("导出参数模版表数据")
@PostMapping("/export")
public void export(HttpServletResponse response, DcBaseParamModel dcBaseParamModel) {
@ -129,4 +130,68 @@ public class DcBaseParamModelController extends BaseController
ExcelUtil<DcBaseParamModel> util = new ExcelUtil<>(DcBaseParamModel.class);
util.exportExcel(response, list, "导出的参数模版表数据");
}
/**
* 新增参数模版
*/
@PreAuthorize("@ss.hasPermi('asset:paramModel:add')")
@Log(title = "参数模版", businessType = BusinessType.INSERT)
@PostMapping("/addBatch")
public AjaxResult addBatch(@RequestBody JSONArray jsonArray)
{
if (jsonArray == null) {
throw new IllegalArgumentException("未能接收任何参数!");
}
List<DcBaseParamModel> dcBaseParamModelList = new ArrayList<>();
try {
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject beanObject = jsonArray.getJSONObject(i);
// 移除ID属性
beanObject.remove("id");
DcBaseParamModel dcBaseParamModel = JSON.toJavaObject(beanObject, DcBaseParamModel.class);
dcBaseParamModel.setCreatedTime(DateUtils.getNowDate());
dcBaseParamModel.setDeptId(getDeptId());
dcBaseParamModel.setUserId(getUserId());
dcBaseParamModel.setCreatedBy(String.valueOf(getUserId()));
dcBaseParamModel.setCreatedTime(DateUtils.getNowDate());
dcBaseParamModelList.add(dcBaseParamModel);
}
} catch (Exception e) {
throw new IllegalArgumentException("解析list对象异常!");
}
return toAjax(dcBaseParamModelService.saveBatch(dcBaseParamModelList));
}
/**
* 修改指标模版配置
*/
@PreAuthorize("@ss.hasPermi('asset:paramModel:edit')")
@Log(title = "指标模版配置", businessType = BusinessType.UPDATE)
@PutMapping("/editBatch")
public AjaxResult editBatch(@RequestBody JSONArray jsonArray)
{
if (jsonArray == null) {
throw new IllegalArgumentException("未能接收任何参数!");
}
List<DcBaseParamModel> dcBaseParamModelList = new ArrayList<>();
try {
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject beanObject = jsonArray.getJSONObject(i);
DcBaseParamModel dcBaseParamModel = JSON.toJavaObject(beanObject, DcBaseParamModel.class);
dcBaseParamModel.setUpdatedBy(String.valueOf(getUserId()));
dcBaseParamModel.setUpdatedTime(DateUtils.getNowDate());
dcBaseParamModelList.add(dcBaseParamModel);
}
} catch (Exception e) {
throw new IllegalArgumentException("解析list对象异常!");
}
return toAjax(dcBaseParamModelService.updateBatchById(dcBaseParamModelList));
}
}

2
lzbi-module/src/main/java/com/lzbi/asset/domain/DcBaseParamModel.java

@ -24,7 +24,7 @@ public class DcBaseParamModel extends BaseModuleEntity{
/** 主键 */
@ApiModelProperty(name = "主键",notes = "")
private long id ;
private Long id ;
/** 参数模型编码 */
@ApiModelProperty(name = "参数模型编码",notes = "")
private String paramModelCode ;

2
lzbi-module/src/main/java/com/lzbi/asset/domain/DcBusiParamSource.java

@ -49,7 +49,7 @@ public class DcBusiParamSource extends BaseModuleEntity{
/** 主键 */
@ApiModelProperty(name = "主键",notes = "")
@TableId(type= IdType.AUTO)
private Integer id ;
private Long id ;
/** 所属专业 */
@ApiModelProperty(name = "所属专业",notes = "")
private String fieldCode ;

2
lzbi-module/src/main/java/com/lzbi/asset/domain/DcBusiWorkReadConfig.java

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import com.lzbi.common.annotation.Excel;
import com.lzbi.module.base.BaseModuleEntity;
import lombok.experimental.Accessors;
/**
* 互联参数读取数据对照对象 dc_busi_work_read_config
@ -13,6 +14,7 @@ import com.lzbi.module.base.BaseModuleEntity;
* @date 2023-12-04
*/
@Data
@Accessors(chain = true)
public class DcBusiWorkReadConfig extends BaseModuleEntity
{
private static final long serialVersionUID = 1L;

8
lzbi-module/src/main/java/com/lzbi/asset/mapper/DcBaseAssetInfoMapper.java

@ -31,14 +31,6 @@ public interface DcBaseAssetInfoMapper {
*/
public List<DcBaseAssetInfo> selectDcBaseAssetInfoList(DcBaseAssetInfo dcBaseAssetInfo);
/**
* 根据资产编码查询资产信息
*
* @param assetCode 资产编码
* @return 资产信息
*/
DcBaseAssetInfo selectDcBaseAssetInfoByAssetCode(String assetCode);
/**
* 新增资产信息
*

2
lzbi-module/src/main/java/com/lzbi/bill/domain/DcBusiPlanTargetMonth.java

@ -3,6 +3,7 @@ package com.lzbi.bill.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import lombok.Data;
@ -16,6 +17,7 @@ import com.lzbi.module.base.BaseModuleEntity;
* @date 2023-12-06
*/
@Data
@Accessors(chain = true)
public class DcBusiPlanTargetMonth extends BaseModuleEntity
{
private static final long serialVersionUID = 1L;

77
lzbi-module/src/main/java/com/lzbi/bill/service/DcBusiPlanTargetMonthService.java

@ -1,12 +1,26 @@
package com.lzbi.bill.service;
import java.util.List;
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.special.domain.DcBaseWorkSpecial;
import com.lzbi.special.mapper.DcBaseWorkSpecialMapper;
import com.lzbi.system.service.impl.SysDeptServiceImpl;
import com.lzbi.targetFolder.domain.DcBaseAssetTargetDao;
import com.lzbi.targetFolder.mapper.DcBaseAssetTargetMapper;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lzbi.bill.domain.DcBusiPlanTargetMonth;
import com.lzbi.bill.mapper.DcBusiPlanTargetMonthMapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.annotation.Resource;
/**
* 指标月度计划Service业务层处理
*
@ -17,6 +31,18 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
public class DcBusiPlanTargetMonthService extends ServiceImpl<DcBusiPlanTargetMonthMapper, DcBusiPlanTargetMonth> implements IService<DcBusiPlanTargetMonth>
{
@Autowired
private SysDeptServiceImpl sysDeptService;
@Resource
private DcBaseAssetInfoMapper dcBaseAssetInfoMapper;
@Resource
private DcBaseWorkSpecialMapper dcBaseWorkSpecialMapper;
@Resource
private DcBaseAssetTargetMapper dcBaseAssetTargetMapper;
/**
* 查询指标月度计划
*
@ -48,6 +74,32 @@ public class DcBusiPlanTargetMonthService extends ServiceImpl<DcBusiPlanTargetMo
public int insertDcBusiPlanTargetMonth(DcBusiPlanTargetMonth dcBusiPlanTargetMonth)
{
// 查询公司
SysDept company = sysDeptService.selectDeptById(dcBusiPlanTargetMonth.getCompanyId());
if (ObjectUtils.isNotEmpty(company)) {
dcBusiPlanTargetMonth.setCompanyName(company.getDeptName());
}
// 查询组织
SysDept organize = sysDeptService.selectDeptById(dcBusiPlanTargetMonth.getOrgId());
if (ObjectUtils.isNotEmpty(organize)) {
dcBusiPlanTargetMonth.setOrgName(organize.getDeptName());
}
// 查询生产专业
DcBaseWorkSpecial dcBaseWorkSpecial = dcBaseWorkSpecialMapper.selectDcBaseWorkSpecialByCode(dcBusiPlanTargetMonth.getFieldCode());
if (ObjectUtils.isNotEmpty(dcBaseWorkSpecial)) {
dcBusiPlanTargetMonth.setFieldName(dcBaseWorkSpecial.getSpecialName());
}
// 查询统计单元
DcBaseAssetInfo dcBaseAssetInfo = dcBaseAssetInfoMapper.selectDcBaseAssetInfoByCode(dcBusiPlanTargetMonth.getAssetCode());
if (ObjectUtils.isNotEmpty(dcBaseAssetInfo)) {
dcBusiPlanTargetMonth.setAssetName(dcBaseAssetInfo.getAssetName());
}
DcBaseAssetTargetDao dcBaseAssetTargetDao = dcBaseAssetTargetMapper.selectDcBaseAssetTargetDaoByTargetCodeAndAssetCode(dcBusiPlanTargetMonth.getTargetCode(), dcBusiPlanTargetMonth.getAssetCode());
if (ObjectUtils.isNotEmpty(dcBaseAssetTargetDao)) {
dcBusiPlanTargetMonth.setTargetNameDefine(dcBaseAssetTargetDao.getTargetName());
dcBusiPlanTargetMonth.setTargetNameAlias(dcBaseAssetTargetDao.getTargetNameAlias());
}
dcBusiPlanTargetMonth.setCreatedTime(DateUtils.getNowDate());
return baseMapper.insertDcBusiPlanTargetMonth(dcBusiPlanTargetMonth);
}
@ -61,6 +113,31 @@ public class DcBusiPlanTargetMonthService extends ServiceImpl<DcBusiPlanTargetMo
public int updateDcBusiPlanTargetMonth(DcBusiPlanTargetMonth dcBusiPlanTargetMonth)
{
// 查询公司
SysDept company = sysDeptService.selectDeptById(dcBusiPlanTargetMonth.getCompanyId());
if (ObjectUtils.isNotEmpty(company)) {
dcBusiPlanTargetMonth.setCompanyName(company.getDeptName());
}
// 查询组织
SysDept organize = sysDeptService.selectDeptById(dcBusiPlanTargetMonth.getOrgId());
if (ObjectUtils.isNotEmpty(organize)) {
dcBusiPlanTargetMonth.setOrgName(organize.getDeptName());
}
// 查询生产专业
DcBaseWorkSpecial dcBaseWorkSpecial = dcBaseWorkSpecialMapper.selectDcBaseWorkSpecialByCode(dcBusiPlanTargetMonth.getFieldCode());
if (ObjectUtils.isNotEmpty(dcBaseWorkSpecial)) {
dcBusiPlanTargetMonth.setFieldName(dcBaseWorkSpecial.getSpecialName());
}
// 查询统计单元
DcBaseAssetInfo dcBaseAssetInfo = dcBaseAssetInfoMapper.selectDcBaseAssetInfoByCode(dcBusiPlanTargetMonth.getAssetCode());
if (ObjectUtils.isNotEmpty(dcBaseAssetInfo)) {
dcBusiPlanTargetMonth.setAssetName(dcBaseAssetInfo.getAssetName());
}
DcBaseAssetTargetDao dcBaseAssetTargetDao = dcBaseAssetTargetMapper.selectDcBaseAssetTargetDaoByTargetCodeAndAssetCode(dcBusiPlanTargetMonth.getTargetCode(), dcBusiPlanTargetMonth.getAssetCode());
if (ObjectUtils.isNotEmpty(dcBaseAssetTargetDao)) {
dcBusiPlanTargetMonth.setTargetNameDefine(dcBaseAssetTargetDao.getTargetName());
dcBusiPlanTargetMonth.setTargetNameAlias(dcBaseAssetTargetDao.getTargetNameAlias());
}
dcBusiPlanTargetMonth.setUpdatedTime(DateUtils.getNowDate());
return baseMapper.updateDcBusiPlanTargetMonth(dcBusiPlanTargetMonth);
}

2
lzbi-module/src/main/java/com/lzbi/code/domain/DcBaseCoderuleDefine.java

@ -2,6 +2,7 @@ package com.lzbi.code.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import lombok.Data;
@ -15,6 +16,7 @@ import com.lzbi.module.base.BaseModuleEntity;
* @date 2023-12-06
*/
@Data
@Accessors(chain = true)
public class DcBaseCoderuleDefine extends BaseModuleEntity
{
private static final long serialVersionUID = 1L;

2
lzbi-module/src/main/java/com/lzbi/code/domain/DcBaseCoderuleDefineDao.java

@ -2,6 +2,7 @@ package com.lzbi.code.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import lombok.Data;
@ -15,6 +16,7 @@ import com.lzbi.module.base.BaseModuleEntity;
* @date 2023-11-29
*/
@Data
@Accessors(chain = true)
public class DcBaseCoderuleDefineDao extends BaseModuleEntity
{
private static final long serialVersionUID = 1L;

2
lzbi-module/src/main/java/com/lzbi/code/domain/DcBaseCoderuleSerialDao.java

@ -27,7 +27,7 @@ public class DcBaseCoderuleSerialDao extends BaseModuleEntity{
/** 主键 */
@ApiModelProperty(name = "主键",notes = "")
@TableId
private Integer id ;
private Long id ;
/** 规则定义的ID */
@ApiModelProperty(name = "规则定义的ID",notes = "")
private Long codeRuleId ;

2
lzbi-module/src/main/java/com/lzbi/code/domain/DcBusiCoderuleConfig.java

@ -2,6 +2,7 @@ package com.lzbi.code.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import lombok.Data;
@ -15,6 +16,7 @@ import com.lzbi.module.base.BaseModuleEntity;
* @date 2023-12-06
*/
@Data
@Accessors(chain = true)
public class DcBusiCoderuleConfig extends BaseModuleEntity
{
private static final long serialVersionUID = 1L;

2
lzbi-module/src/main/java/com/lzbi/code/domain/DcBusiCoderuleConfigDao.java

@ -27,7 +27,7 @@ public class DcBusiCoderuleConfigDao extends BaseModuleEntity{
/** 主键 */
@ApiModelProperty(name = "主键",notes = "")
@TableId
private Integer id ;
private Long id ;
/** 规则名称 */
@ApiModelProperty(name = "规则名称",notes = "")
private String configName ;

32
lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetAdjustDayMasterController.java

@ -1,31 +1,23 @@
package com.lzbi.draft.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.lzbi.common.annotation.Log;
import com.lzbi.common.core.controller.BaseController;
import com.lzbi.common.core.domain.AjaxResult;
import com.lzbi.common.core.page.TableDataInfo;
import com.lzbi.common.enums.BusinessType;
import com.lzbi.common.utils.poi.ExcelUtil;
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;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 资产指标调整单主()Controller
@ -94,7 +86,7 @@ public class DcBusiTargetAdjustDayMasterController extends BaseController
@PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:edit')")
@Log(title = "资产指标调整单主(日)", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao)
public AjaxResult edit(@RequestBody DcBusiTargetAdjustDayMasterDao<DcBusiTargetAdjustDaySubDao> dcBusiTargetAdjustDayMasterDao)
{
return toAjax(dcBusiTargetAdjustDayMasterService.updateDcBusiTargetAdjustDayMasterDao(dcBusiTargetAdjustDayMasterDao));
}

105
lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetAdjustDaySubController.java

@ -0,0 +1,105 @@
package com.lzbi.draft.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.lzbi.draft.domain.DcBusiTargetAdjustDaySubDao;
import com.lzbi.draft.service.DcBusiTargetAdjustDaySubService;
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 win
* @date 2023-12-05
*/
@RestController
@RequestMapping("/asset/target/adjust/sub")
public class DcBusiTargetAdjustDaySubController extends BaseController
{
@Autowired
private DcBusiTargetAdjustDaySubService dcBusiTargetAdjustDaySubService;
/**
* 查询统计单元指标调整单子()列表
*/
@PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:list')")
@GetMapping("/list")
public TableDataInfo list(DcBusiTargetAdjustDaySubDao dcBusiTargetAdjustDaySubDao)
{
startPage();
List<DcBusiTargetAdjustDaySubDao> list = dcBusiTargetAdjustDaySubService.selectDcBusiTargetAdjustDaySubDaoList(dcBusiTargetAdjustDaySubDao);
return getDataTable(list);
}
/**
* 导出统计单元指标调整单子()列表
*/
@PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:export')")
@Log(title = "统计单元指标调整单子(日)", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, DcBusiTargetAdjustDaySubDao dcBusiTargetAdjustDaySubDao)
{
List<DcBusiTargetAdjustDaySubDao> list = dcBusiTargetAdjustDaySubService.selectDcBusiTargetAdjustDaySubDaoList(dcBusiTargetAdjustDaySubDao);
ExcelUtil<DcBusiTargetAdjustDaySubDao> util = new ExcelUtil<DcBusiTargetAdjustDaySubDao>(DcBusiTargetAdjustDaySubDao.class);
util.exportExcel(response, list, "统计单元指标调整单子(日)数据");
}
/**
* 获取统计单元指标调整单子()详细信息
*/
@PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(dcBusiTargetAdjustDaySubService.selectDcBusiTargetAdjustDaySubDaoById(id));
}
// /**
// * 新增统计单元指标调整单子(日)
// */
// @PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:add')")
// @Log(title = "统计单元指标调整单子(日)", businessType = BusinessType.INSERT)
// @PostMapping
// public AjaxResult add(@RequestBody DcBusiTargetAdjustDaySubDao dcBusiTargetAdjustDaySubDao)
// {
// return toAjax(dcBusiTargetAdjustDaySubService.insertDcBusiTargetAdjustDaySubDao(dcBusiTargetAdjustDaySubDao));
// }
/**
* 修改统计单元指标调整单子()
*/
@PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:edit')")
@Log(title = "统计单元指标调整单子(日)", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DcBusiTargetAdjustDaySubDao dcBusiTargetAdjustDaySubDao)
{
return toAjax(dcBusiTargetAdjustDaySubService.updateDcBusiTargetAdjustDaySubDao(dcBusiTargetAdjustDaySubDao));
}
/**
* 删除统计单元指标调整单子()
*/
@PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:remove')")
@Log(title = "统计单元指标调整单子(日)", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(dcBusiTargetAdjustDaySubService.deleteDcBusiTargetAdjustDaySubDaoByIds(ids));
}
}

2
lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamBillSub.java

@ -30,7 +30,7 @@ public class DcBusiParamBillSub extends BaseModuleEntity{
/** 主键 */
@ApiModelProperty(name = "主键",notes = "")
@TableId(type = IdType.AUTO)
private Integer id ;
private Long id ;
/** 单据编码 */
@ApiModelProperty(name = "单据编码",notes = "")
private String billNo ;

4
lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamDraftDay.java

@ -5,6 +5,7 @@ import java.util.Date;
import lombok.Data;
import com.lzbi.common.annotation.Excel;
import com.lzbi.module.base.BaseModuleEntity;
import lombok.experimental.Accessors;
/**
* 参数数据底稿对象 dc_busi_param_draft_day
@ -13,6 +14,7 @@ import com.lzbi.module.base.BaseModuleEntity;
* @date 2023-12-06
*/
@Data
@Accessors(chain = true)
public class DcBusiParamDraftDay extends BaseModuleEntity
{
private static final long serialVersionUID = 1L;
@ -31,7 +33,7 @@ public class DcBusiParamDraftDay extends BaseModuleEntity
/** 主键 */
@Excel(name = "主键")
private String id;
private Long id;
/** 公司编码 */
private Integer companyId;

4
lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustDayMasterDao.java

@ -6,6 +6,7 @@ import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import lombok.Data;
@ -21,6 +22,7 @@ import springfox.documentation.annotations.ApiIgnore;
*/
@ApiModel(value = "DcBusiTargetAdjustDayMasterDao对象", description = "资产指标调整单主表对象")
@Data
@Accessors(chain = true)
public class DcBusiTargetAdjustDayMasterDao<T> extends BaseModuleEntity {
/**
* 待审核状态
@ -37,7 +39,7 @@ public class DcBusiTargetAdjustDayMasterDao<T> extends BaseModuleEntity {
/**
* 人工
*/
public static final String CHECK_TYPE_ARTIFICIAL = "0";
public static final String CHECK_TYPE_ARTIFICIAL = "1";
private static final long serialVersionUID = 1L;

2
lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetAdjustDaySubDao.java

@ -6,6 +6,7 @@ import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import lombok.Data;
@ -20,6 +21,7 @@ import com.lzbi.module.base.BaseModuleEntity;
*/
@ApiModel(value = "DcBusiTargetAdjustDaySubDao对象", description = "资产指标调整单子表对象")
@Data
@Accessors(chain = true)
public class DcBusiTargetAdjustDaySubDao extends BaseModuleEntity {
private static final long serialVersionUID = 1L;

2
lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetDraftDay.java

@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import com.lzbi.common.annotation.Excel;
import com.lzbi.module.base.BaseModuleEntity;
import lombok.experimental.Accessors;
/**
* 指标数据底稿()对象 dc_busi_target_draft_day
@ -14,6 +15,7 @@ import com.lzbi.module.base.BaseModuleEntity;
* @date 2023-11-28
*/
@Data
@Accessors(chain = true)
public class DcBusiTargetDraftDay extends BaseModuleEntity
{
private static final long serialVersionUID = 1L;

2
lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetDraftMonth.java

@ -6,6 +6,7 @@ import java.util.Date;
import lombok.Data;
import com.lzbi.common.annotation.Excel;
import com.lzbi.module.base.BaseModuleEntity;
import lombok.experimental.Accessors;
/**
* 指标数据底稿()对象 dc_busi_target_draft_month
@ -14,6 +15,7 @@ import com.lzbi.module.base.BaseModuleEntity;
* @date 2023-12-06
*/
@Data
@Accessors(chain = true)
public class DcBusiTargetDraftMonth extends BaseModuleEntity
{
private static final long serialVersionUID = 1L;

12
lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetAdjustDaySubMapper.java

@ -60,4 +60,16 @@ public interface DcBusiTargetAdjustDaySubMapper extends BaseMapper<DcBusiTargetA
* @return 结果
*/
public int deleteDcBusiTargetAdjustDaySubDaoByIds(Long[] ids);
/**
* 根据主单据编号删除
* @param billSerial 主单据编号
*/
void deleteDcBusiTargetAdjustDaySubDaoByBillNoMaster(String billSerial);
/**
* 根据主表ids删除
* @param ids 主表ids
*/
void deleteDcBusiTargetAdjustDaySubDaoByMasterIds(Long[] ids);
}

52
lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustDayMasterService.java

@ -65,7 +65,12 @@ public class DcBusiTargetAdjustDayMasterService extends ServiceImpl<DcBusiTarget
* @return 资产指标调整单主()
*/
public DcBusiTargetAdjustDayMasterDao selectDcBusiTargetAdjustDayMasterDaoById(Long id) {
return baseMapper.selectDcBusiTargetAdjustDayMasterDaoById(id);
DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao = baseMapper.selectDcBusiTargetAdjustDayMasterDaoById(id);
DcBusiTargetAdjustDaySubDao dcBusiTargetAdjustDaySubDao = new DcBusiTargetAdjustDaySubDao();
dcBusiTargetAdjustDaySubDao.setBillNoMaster(dcBusiTargetAdjustDayMasterDao.getBillSerial());
List<DcBusiTargetAdjustDaySubDao> dcBusiTargetAdjustDaySubDaos = dcBusiTargetAdjustDaySubMapper.selectDcBusiTargetAdjustDaySubDaoList(dcBusiTargetAdjustDaySubDao);
dcBusiTargetAdjustDayMasterDao.setChildren(dcBusiTargetAdjustDaySubDaos);
return dcBusiTargetAdjustDayMasterDao;
}
/**
@ -98,12 +103,12 @@ public class DcBusiTargetAdjustDayMasterService extends ServiceImpl<DcBusiTarget
dcBusiTargetAdjustDayMasterDao.setOrganizeName(organize.getDeptName());
}
// 查询统计单元
DcBaseAssetInfo dcBaseAssetInfo = dcBaseAssetInfoMapper.selectDcBaseAssetInfoByAssetCode(assetCode);
DcBaseAssetInfo dcBaseAssetInfo = dcBaseAssetInfoMapper.selectDcBaseAssetInfoByCode(assetCode);
if (ObjectUtils.isNotEmpty(dcBaseAssetInfo)) {
dcBusiTargetAdjustDayMasterDao.setAssetName(dcBaseAssetInfo.getAssetName());
}
// 查询生产专业
DcBaseWorkSpecial dcBaseWorkSpecial = dcBaseWorkSpecialMapper.selectDcBaseWorkSpecialBySpecialCode(dcBusiTargetAdjustDayMasterDao.getFieldCode());
DcBaseWorkSpecial dcBaseWorkSpecial = dcBaseWorkSpecialMapper.selectDcBaseWorkSpecialByCode(dcBusiTargetAdjustDayMasterDao.getFieldCode());
if (ObjectUtils.isNotEmpty(dcBaseWorkSpecial)) {
dcBusiTargetAdjustDayMasterDao.setFieldName(dcBaseWorkSpecial.getSpecialName());
}
@ -126,8 +131,37 @@ public class DcBusiTargetAdjustDayMasterService extends ServiceImpl<DcBusiTarget
* @param dcBusiTargetAdjustDayMasterDao 资产指标调整单主()
* @return 结果
*/
@Transactional(rollbackFor = Exception.class)
public int updateDcBusiTargetAdjustDayMasterDao(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.selectDcBaseAssetInfoByCode(assetCode);
if (ObjectUtils.isNotEmpty(dcBaseAssetInfo)) {
dcBusiTargetAdjustDayMasterDao.setAssetName(dcBaseAssetInfo.getAssetName());
}
// 查询生产专业
DcBaseWorkSpecial dcBaseWorkSpecial = dcBaseWorkSpecialMapper.selectDcBaseWorkSpecialByCode(dcBusiTargetAdjustDayMasterDao.getFieldCode());
if (ObjectUtils.isNotEmpty(dcBaseWorkSpecial)) {
dcBusiTargetAdjustDayMasterDao.setFieldName(dcBaseWorkSpecial.getSpecialName());
}
// 删除子表数据
dcBusiTargetAdjustDaySubMapper.deleteDcBusiTargetAdjustDaySubDaoByBillNoMaster(dcBusiTargetAdjustDayMasterDao.getBillSerial());
// 新增子表数据
List<DcBusiTargetAdjustDaySubDao> children = dcBusiTargetAdjustDayMasterDao.getChildren();
for (DcBusiTargetAdjustDaySubDao dcBusiTargetAdjustDaySubDao : children) {
dcBusiTargetAdjustDaySubDao.setBillNoMaster(dcBusiTargetAdjustDayMasterDao.getBillSerial());
dcBusiTargetAdjustDaySubService.insertDcBusiTargetAdjustDaySubDao(dcBusiTargetAdjustDaySubDao, assetCode);
}
dcBusiTargetAdjustDayMasterDao.setUpdatedTime(DateUtils.getNowDate());
return baseMapper.updateDcBusiTargetAdjustDayMasterDao(dcBusiTargetAdjustDayMasterDao);
}
@ -138,8 +172,10 @@ public class DcBusiTargetAdjustDayMasterService extends ServiceImpl<DcBusiTarget
* @param ids 需要删除的资产指标调整单主()主键
* @return 结果
*/
@Transactional(rollbackFor = Exception.class)
public int deleteDcBusiTargetAdjustDayMasterDaoByIds(Long[] ids) {
// 删除子表数据
dcBusiTargetAdjustDaySubMapper.deleteDcBusiTargetAdjustDaySubDaoByMasterIds(ids);
return baseMapper.deleteDcBusiTargetAdjustDayMasterDaoByIds(ids);
}
@ -164,7 +200,7 @@ public class DcBusiTargetAdjustDayMasterService extends ServiceImpl<DcBusiTarget
DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao = new DcBusiTargetAdjustDayMasterDao();
dcBusiTargetAdjustDayMasterDao.setId(id);
dcBusiTargetAdjustDayMasterDao.setCheckStauts(DcBusiTargetAdjustDayMasterDao.CHECK_STATUS_CHECKED);
return this.updateDcBusiTargetAdjustDayMasterDao(dcBusiTargetAdjustDayMasterDao);
return baseMapper.updateDcBusiTargetAdjustDayMasterDao(dcBusiTargetAdjustDayMasterDao);
}
/**
@ -198,7 +234,7 @@ public class DcBusiTargetAdjustDayMasterService extends ServiceImpl<DcBusiTarget
dcBusiTargetDraftDay.setOrgId(dcBusiTargetAdjustDayMasterDao.getOragnizeId());
dcBusiTargetDraftDay.setAssetCode(dcBusiTargetAdjustDayMasterDao.getAssetCode());
dcBusiTargetDraftDay.setFieldCode(dcBusiTargetAdjustDayMasterDao.getFieldCode());
dcBusiTargetDraftDay.setTargetCode(dcBusiTargetDraftDay.getTargetCode());
dcBusiTargetDraftDay.setTargetCode(dcBusiTargetAdjustDaySubDao.getTargetCode());
List<DcBusiTargetDraftDay> dcBusiTargetDraftDayList = dcBusiTargetDraftDayMapper.selectDcBusiTargetDraftDayList(dcBusiTargetDraftDay);
// 如果未查询出来指标数据底稿数据,就新增,否则修改
if (CollectionUtils.isEmpty(dcBusiTargetDraftDayList)) {
@ -224,7 +260,7 @@ public class DcBusiTargetAdjustDayMasterService extends ServiceImpl<DcBusiTarget
}
// 修改审核状态为已处理
dcBusiTargetAdjustDayMasterDao.setCheckStauts(DcBusiTargetAdjustDayMasterDao.CHECK_STATUS_PROCESSED);
return this.updateDcBusiTargetAdjustDayMasterDao(dcBusiTargetAdjustDayMasterDao);
return baseMapper.updateDcBusiTargetAdjustDayMasterDao(dcBusiTargetAdjustDayMasterDao);
} catch (RuntimeException e) {
log.error("处理异常", e);
throw e;

18
lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustDaySubService.java

@ -4,11 +4,16 @@ import java.util.List;
import com.lzbi.common.utils.DateUtils;
import com.lzbi.draft.domain.DcBusiTargetAdjustDaySubDao;
import com.lzbi.draft.mapper.DcBusiTargetAdjustDaySubMapper;
import com.lzbi.targetFolder.domain.DcBaseAssetTargetDao;
import com.lzbi.targetFolder.mapper.DcBaseAssetTargetMapper;
import org.apache.commons.lang3.ObjectUtils;
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;
import javax.annotation.Resource;
/**
* 统计单元指标调整单子()Service业务层处理
*
@ -19,6 +24,9 @@ import org.springframework.transaction.annotation.Transactional;
public class DcBusiTargetAdjustDaySubService extends ServiceImpl<DcBusiTargetAdjustDaySubMapper, DcBusiTargetAdjustDaySubDao> implements IService<DcBusiTargetAdjustDaySubDao>
{
@Resource
private DcBaseAssetTargetMapper dcBaseAssetTargetMapper;
/**
* 查询统计单元指标调整单子()
*
@ -45,14 +53,16 @@ public class DcBusiTargetAdjustDaySubService extends ServiceImpl<DcBusiTargetAdj
* 新增统计单元指标调整单子()
*
* @param dcBusiTargetAdjustDaySubDao 统计单元指标调整单子()
* @param assetId 资产ID
* @param assetCode 统计单元编码
* @return 结果
*/
@Transactional(rollbackFor = Exception.class)
public int insertDcBusiTargetAdjustDaySubDao(DcBusiTargetAdjustDaySubDao dcBusiTargetAdjustDaySubDao, String assetId)
public int insertDcBusiTargetAdjustDaySubDao(DcBusiTargetAdjustDaySubDao dcBusiTargetAdjustDaySubDao, String assetCode)
{
String targetName = "123"; //TODO 从service获取
dcBusiTargetAdjustDaySubDao.setTargetName(targetName);
DcBaseAssetTargetDao dcBaseAssetTargetDao = dcBaseAssetTargetMapper.selectDcBaseAssetTargetDaoByTargetCodeAndAssetCode(dcBusiTargetAdjustDaySubDao.getTargetCode(), assetCode);
if (ObjectUtils.isNotEmpty(dcBaseAssetTargetDao)) {
dcBusiTargetAdjustDaySubDao.setTargetName(dcBaseAssetTargetDao.getTargetName());
}
dcBusiTargetAdjustDaySubDao.setCreatedTime(DateUtils.getNowDate());
return baseMapper.insertDcBusiTargetAdjustDaySubDao(dcBusiTargetAdjustDaySubDao);
}

197
lzbi-module/src/main/java/com/lzbi/module/base/BaseModuleEntity.java

@ -3,6 +3,8 @@ package com.lzbi.module.base;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
@ -13,135 +15,70 @@ import java.util.Date;
* @date 2023/11/16
* BaseModuleEntity
*/
public class BaseModuleEntity implements Serializable,Cloneable{
@Data
@Accessors(chain = true)
public class BaseModuleEntity implements Serializable, Cloneable {
/**
* 主键
*/
@ApiModelProperty(name = "主键", notes = "")
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 租户号
*/
@ApiModelProperty(name = "租户号", notes = "")
private String tenantId;
/**
* 乐观锁
*/
@ApiModelProperty(name = "乐观锁", notes = "")
private Integer revision;
/**
* 创建人
*/
@ApiModelProperty(name = "创建人", notes = "")
private String createdBy;
/**
* 创建时间
*/
@ApiModelProperty(name = "创建时间", notes = "")
private Date createdTime;
/**
* 更新人
*/
@ApiModelProperty(name = "更新人", notes = "")
private String updatedBy;
/**
* 更新时间
*/
@ApiModelProperty(name = "更新时间", notes = "")
private Date updatedTime;
/**
* 删除人
*/
@ApiModelProperty(name = "删除人", notes = "")
private String deleteBy;
/**
* 删除时间
*/
@ApiModelProperty(name = "删除时间", notes = "")
private Date deleteTime;
@ApiModelProperty("分页")
private Integer pageNum;
@ApiModelProperty("分页大小")
private Integer pageSize;
/**
* 部门id
*/
@ApiModelProperty(name = "部门id", notes = "")
private Long deptId;
/**
* 用户id
*/
@ApiModelProperty(name = "用户id", notes = "")
private Long userId;
/** 租户号 */
@ApiModelProperty(name = "租户号",notes = "")
private String tenantId ;
/** 乐观锁 */
@ApiModelProperty(name = "乐观锁",notes = "")
private Integer revision ;
/** 创建人 */
@ApiModelProperty(name = "创建人",notes = "")
private String createdBy ;
/** 创建时间 */
@ApiModelProperty(name = "创建时间",notes = "")
private Date createdTime ;
/** 更新人 */
@ApiModelProperty(name = "更新人",notes = "")
private String updatedBy ;
/** 更新时间 */
@ApiModelProperty(name = "更新时间",notes = "")
private Date updatedTime ;
/** 删除人 */
@ApiModelProperty(name = "删除人",notes = "")
private String deleteBy ;
/** 删除时间 */
@ApiModelProperty(name = "删除时间",notes = "")
private Date deleteTime ;
@ApiModelProperty("分页")
private Integer pageNum ;
@ApiModelProperty("分页大小")
private Integer pageSize ;
/** 部门id */
@ApiModelProperty(name = "部门id",notes = "")
private Long deptId ;
/** 用户id */
@ApiModelProperty(name = "用户id",notes = "")
private Long userId ;
public String getTenantId() {
return tenantId;
}
public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
public Integer getRevision() {
return revision;
}
public void setRevision(Integer revision) {
this.revision = revision;
}
public String getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public Date getCreatedTime() {
return createdTime;
}
public void setCreatedTime(Date createdTime) {
this.createdTime = createdTime;
}
public String getUpdatedBy() {
return updatedBy;
}
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
public Date getUpdatedTime() {
return updatedTime;
}
public void setUpdatedTime(Date updatedTime) {
this.updatedTime = updatedTime;
}
public String getDeleteBy() {
return deleteBy;
}
public void setDeleteBy(String deleteBy) {
this.deleteBy = deleteBy;
}
public Date getDeleteTime() {
return deleteTime;
}
public void setDeleteTime(Date deleteTime) {
this.deleteTime = deleteTime;
}
public Integer getPageNum() {
return pageNum;
}
public void setPageNum(Integer pageNum) {
this.pageNum = pageNum;
}
public Integer getPageSize() {
return pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
public Long getDeptId() {
return deptId;
}
public void setDeptId(Long deptId) {
this.deptId = deptId;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
}

3
lzbi-module/src/main/java/com/lzbi/special/controller/DcBaseWorkSpecialController.java

@ -1,6 +1,5 @@
package com.lzbi.special.controller;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
@ -120,8 +119,6 @@ public class DcBaseWorkSpecialController extends BaseController
List<DcBaseWorkSpecial> list = dcBaseWorkSpecialService.selectDcBaseWorkSpecialList(dcBaseWorkSpecial);
return AjaxResult.success(list);
}
/**
* 新增生产专业管理
*/

8
lzbi-module/src/main/java/com/lzbi/special/mapper/DcBaseWorkSpecialMapper.java

@ -25,14 +25,6 @@ public interface DcBaseWorkSpecialMapper extends BaseMapper<DcBaseWorkSpecial>
public DcBaseWorkSpecial selectDcBaseWorkSpecialById(Long id);
public DcBaseWorkSpecial selectDcBaseWorkSpecialByCode(String specialCode);
/**
* 查询生产专业管理
*
* @param specialCode 专业编码
* @return 生产专业管理
*/
public DcBaseWorkSpecial selectDcBaseWorkSpecialBySpecialCode(String specialCode);
/**
* 查询生产专业管理列表
*

1
lzbi-module/src/main/java/com/lzbi/targetFolder/controller/DcBaseAssetTargetController.java

@ -2,6 +2,7 @@ package com.lzbi.targetFolder.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;

129
lzbi-module/src/main/java/com/lzbi/targetFolder/controller/DcBaseTargetModelController.java

@ -1,7 +1,18 @@
package com.lzbi.targetFolder.controller;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.lzbi.common.utils.DateUtils;
import com.lzbi.targetFolder.domain.DcBaseTargetModel;
import com.lzbi.targetFolder.service.DcBaseTargetModelService;
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;
@ -16,16 +27,15 @@ 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.targetFolder.domain.DcBaseTargetModelDao;
import com.lzbi.targetFolder.service.DcBaseTargetModelService;
import com.lzbi.common.utils.poi.ExcelUtil;
import com.lzbi.common.core.page.TableDataInfo;
/**
* 指标模版配置Controller
*
*
* @author Lu.JL
* @date 2023-11-29
* @date 2023-12-07
*/
@RestController
@RequestMapping("/target/targetModel")
@ -37,81 +47,156 @@ public class DcBaseTargetModelController extends BaseController
/**
* 查询指标模版配置列表
*/
@ApiOperation("查询指标模版配置列表")
@ApiImplicitParams({
@ApiImplicitParam(name = "DcBaseTargetModel", value = "", dataType = "DcBaseTargetModel", dataTypeClass = DcBaseTargetModel.class),
})
@PreAuthorize("@ss.hasPermi('target:targetModel:list')")
@GetMapping("/list")
public TableDataInfo list(DcBaseTargetModelDao dcBaseTargetModelDao)
public TableDataInfo list(DcBaseTargetModel DcBaseTargetModel)
{
startPage();
List<DcBaseTargetModelDao> list = dcBaseTargetModelService.selectDcBaseTargetModelDaoList(dcBaseTargetModelDao);
List< DcBaseTargetModel> list = dcBaseTargetModelService.selectDcBaseTargetModelList(DcBaseTargetModel);
return getDataTable(list);
}
/**
* 导出指标模版配置列表
*/
@ApiOperation("导出指标模版配置列表")
@ApiImplicitParams({
@ApiImplicitParam(name = "DcBaseTargetModel", value = "", dataType = "DcBaseTargetModel", dataTypeClass = DcBaseTargetModel.class),
})
@PreAuthorize("@ss.hasPermi('target:targetModel:export')")
@Log(title = "指标模版配置", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, DcBaseTargetModelDao dcBaseTargetModelDao)
public void export(HttpServletResponse response,DcBaseTargetModel DcBaseTargetModel)
{
List<DcBaseTargetModelDao> list = dcBaseTargetModelService.selectDcBaseTargetModelDaoList(dcBaseTargetModelDao);
ExcelUtil<DcBaseTargetModelDao> util = new ExcelUtil<DcBaseTargetModelDao>(DcBaseTargetModelDao.class);
List<DcBaseTargetModel> list = dcBaseTargetModelService.selectDcBaseTargetModelList(DcBaseTargetModel);
ExcelUtil<DcBaseTargetModel> util = new ExcelUtil<DcBaseTargetModel>(DcBaseTargetModel.class);
util.exportExcel(response, list, "指标模版配置数据");
}
/**
* 获取指标模版配置详细信息
*/
@ApiOperation("获取指标模版配置详细信息")
@ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "", dataType = "Long", dataTypeClass = Long.class),
})
@PreAuthorize("@ss.hasPermi('target:targetModel:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(dcBaseTargetModelService.selectDcBaseTargetModelDaoById(id));
return success(dcBaseTargetModelService.selectDcBaseTargetModelById(id));
}
/**
* 新增指标模版配置
*/
@ApiOperation("新增指标模版配置")
@ApiImplicitParams({
@ApiImplicitParam(name = "DcBaseTargetModel", value = "", dataType = "DcBaseTargetModel", dataTypeClass = DcBaseTargetModel.class),
})
@PreAuthorize("@ss.hasPermi('target:targetModel:add')")
@Log(title = "指标模版配置", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DcBaseTargetModelDao dcBaseTargetModelDao)
public AjaxResult add(@RequestBody DcBaseTargetModel DcBaseTargetModel)
{
return toAjax(dcBaseTargetModelService.insertDcBaseTargetModelDao(dcBaseTargetModelDao));
return toAjax(dcBaseTargetModelService.insertDcBaseTargetModel(DcBaseTargetModel));
}
/**
* 修改指标模版配置
*/
@ApiOperation("修改指标模版配置")
@ApiImplicitParams({
@ApiImplicitParam(name = "DcBaseTargetModel", value = "", dataType = "DcBaseTargetModel", dataTypeClass = DcBaseTargetModel.class),
})
@PreAuthorize("@ss.hasPermi('target:targetModel:edit')")
@Log(title = "指标模版配置", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DcBaseTargetModelDao dcBaseTargetModelDao)
public AjaxResult edit(@RequestBody DcBaseTargetModel DcBaseTargetModel)
{
return toAjax(dcBaseTargetModelService.updateDcBaseTargetModelDao(dcBaseTargetModelDao));
return toAjax(dcBaseTargetModelService.updateDcBaseTargetModel(DcBaseTargetModel));
}
/**
* 删除指标模版配置
*/
@ApiOperation("删除指标模版配置")
@ApiImplicitParams({
@ApiImplicitParam(name = "ids", value = "", dataType = "Long", dataTypeClass =Long.class),
})
@PreAuthorize("@ss.hasPermi('target:targetModel:remove')")
@Log(title = "指标模版配置", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(dcBaseTargetModelService.deleteDcBaseTargetModelDaoByIds(ids));
return toAjax(dcBaseTargetModelService.deleteDcBaseTargetModelByIds(ids));
}
/**
* 查询指标模版配置列表
* 新增指标模版配置
*/
@PreAuthorize("@ss.hasPermi('target:targetModel:list')")
@GetMapping("/listNoPage")
public AjaxResult listNoPage(DcBaseTargetModelDao dcBaseTargetModelDao)
@PreAuthorize("@ss.hasPermi('target:targetModel:add')")
@Log(title = "指标模版配置", businessType = BusinessType.INSERT)
@PostMapping("/addBatch")
public AjaxResult addBatch(@RequestBody JSONArray jsonArray)
{
List<DcBaseTargetModelDao> list = dcBaseTargetModelService.selectDcBaseTargetModelDaoList(dcBaseTargetModelDao);
return AjaxResult.success(list);
if (jsonArray == null) {
throw new IllegalArgumentException("未能接收任何参数!");
}
List<DcBaseTargetModel> beanList = new ArrayList<>();
try {
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject beanObject = jsonArray.getJSONObject(i);
// 移除ID属性
beanObject.remove("id");
DcBaseTargetModel dcBaseTargetModel = JSON.toJavaObject(beanObject, DcBaseTargetModel.class);
dcBaseTargetModel.setCreatedTime(DateUtils.getNowDate());
dcBaseTargetModel.setDeptId(getDeptId());
dcBaseTargetModel.setUserId(getUserId());
dcBaseTargetModel.setCreatedBy(String.valueOf(getUserId()));
dcBaseTargetModel.setCreatedTime(DateUtils.getNowDate());
beanList.add(dcBaseTargetModel);
}
} catch (Exception e) {
throw new IllegalArgumentException("解析list对象异常!");
}
return toAjax(dcBaseTargetModelService.saveBatch(beanList));
}
/**
* 修改指标模版配置
*/
@PreAuthorize("@ss.hasPermi('target:targetModel:edit')")
@Log(title = "指标模版配置", businessType = BusinessType.UPDATE)
@PutMapping("editBatch")
public AjaxResult editBatch(@RequestBody JSONArray jsonArray)
{
if (jsonArray == null) {
throw new IllegalArgumentException("未能接收任何参数!");
}
List<DcBaseTargetModel> dcBaseWorkSpecialList = new ArrayList<>();
try {
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject beanObject = jsonArray.getJSONObject(i);
DcBaseTargetModel dcBaseTargetModel = JSON.toJavaObject(beanObject, DcBaseTargetModel.class);
dcBaseTargetModel.setUpdatedBy(String.valueOf(getUserId()));
dcBaseTargetModel.setUpdatedTime(DateUtils.getNowDate());
dcBaseWorkSpecialList.add(dcBaseTargetModel);
}
} catch (Exception e) {
throw new IllegalArgumentException("解析list对象异常!");
}
return toAjax(dcBaseTargetModelService.updateBatchById(dcBaseWorkSpecialList));
}
}

5
lzbi-module/src/main/java/com/lzbi/targetFolder/domain/DcBaseAssetTargetDao.java

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import com.lzbi.common.annotation.Excel;
import com.lzbi.module.base.BaseModuleEntity;
import lombok.experimental.Accessors;
/**
* 资产指标配置对象 dc_base_asset_target
@ -17,6 +18,7 @@ import com.lzbi.module.base.BaseModuleEntity;
* @date 2023-11-30
*/
@Data
@Accessors(chain = true)
public class DcBaseAssetTargetDao extends BaseModuleEntity
{
private static final long serialVersionUID = 1L;
@ -36,6 +38,9 @@ public class DcBaseAssetTargetDao extends BaseModuleEntity
@Excel(name = "指标名称")
private String targetName;
@Excel(name = "指标别名")
private String targetNameAlias;
/** 指标编码 */
@Excel(name = "指标编码")
private String targetCode;

17
lzbi-module/src/main/java/com/lzbi/targetFolder/domain/DcBaseTargetModelDao.java → lzbi-module/src/main/java/com/lzbi/targetFolder/domain/DcBaseTargetModel.java

@ -1,5 +1,10 @@
package com.lzbi.targetFolder.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.experimental.Accessors;
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;
@ -8,16 +13,14 @@ import com.lzbi.module.base.BaseModuleEntity;
* 指标模版配置对象 dc_base_target_model
*
* @author Lu.JL
* @date 2023-11-29
* @date 2023-12-07
*/
@Data
public class DcBaseTargetModelDao extends BaseModuleEntity
@Data
@Accessors(chain = true)
public class DcBaseTargetModel extends BaseModuleEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 指标模版编码 */
@Excel(name = "指标模版编码")
private String targetModelCode;
@ -38,6 +41,4 @@ public class DcBaseTargetModelDao extends BaseModuleEntity
@Excel(name = "指标等级")
private Long targetModelLevel;
}

9
lzbi-module/src/main/java/com/lzbi/targetFolder/mapper/DcBaseAssetTargetMapper.java

@ -4,6 +4,7 @@ import java.util.List;
import com.lzbi.targetFolder.domain.DcBaseAssetTargetDao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 资产指标配置Mapper接口
@ -22,6 +23,14 @@ public interface DcBaseAssetTargetMapper extends BaseMapper<DcBaseAssetTargetDao
* @return 资产指标配置
*/
public DcBaseAssetTargetDao selectDcBaseAssetTargetDaoById(Long id);
/**
* 查询资产指标配置
*
* @param targetCode 指标编码
* @param assetCode 统计单元编码
* @return 资产指标配置
*/
public DcBaseAssetTargetDao selectDcBaseAssetTargetDaoByTargetCodeAndAssetCode(@Param("targetCode") String targetCode, @Param("assetCode") String assetCode);
/**
* 查询资产指标配置列表

40
lzbi-module/src/main/java/com/lzbi/targetFolder/mapper/DcBaseTargetModelMapper.java

@ -1,63 +1,65 @@
package com.lzbi.targetFolder.mapper;
import java.util.List;
import com.lzbi.targetFolder.domain.DcBaseTargetModelDao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lzbi.targetFolder.domain.DcBaseTargetModel;
import java.util.List;
/**
* 指标模版配置Mapper接口
*
*
* @author Lu.JL
* @date 2023-11-29
* @date 2023-12-07
*/
public interface DcBaseTargetModelMapper extends BaseMapper<DcBaseTargetModelDao>
public interface DcBaseTargetModelMapper extends BaseMapper<DcBaseTargetModel>
{
/**
* 查询指标模版配置
*
*
* @param id 指标模版配置主键
* @return 指标模版配置
*/
public DcBaseTargetModelDao selectDcBaseTargetModelDaoById(Long id);
public DcBaseTargetModel selectDcBaseTargetModelById(Long id);
/**
* 查询指标模版配置列表
*
* @param dcBaseTargetModelDao 指标模版配置
*
* @param dcBaseTargetModel 指标模版配置
* @return 指标模版配置集合
*/
public List<DcBaseTargetModelDao> selectDcBaseTargetModelDaoList(DcBaseTargetModelDao dcBaseTargetModelDao);
public List<DcBaseTargetModel> selectDcBaseTargetModelList(DcBaseTargetModel dcBaseTargetModel);
/**
* 新增指标模版配置
*
* @param dcBaseTargetModelDao 指标模版配置
*
* @param dcBaseTargetModel 指标模版配置
* @return 结果
*/
public int insertDcBaseTargetModelDao(DcBaseTargetModelDao dcBaseTargetModelDao);
public int insertDcBaseTargetModel(DcBaseTargetModel dcBaseTargetModel);
/**
* 修改指标模版配置
*
*
* @param dcBaseTargetModel 指标模版配置
* @return 结果
*/
public int updateDcBaseTargetModelDao(DcBaseTargetModelDao dcBaseTargetModelDao);
public int updateDcBaseTargetModel(DcBaseTargetModel dcBaseTargetModel);
/**
* 删除指标模版配置
*
*
* @param id 指标模版配置主键
* @return 结果
*/
public int deleteDcBaseTargetModelDaoById(Long id);
public int deleteDcBaseTargetModelById(Long id);
/**
* 批量删除指标模版配置
*
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteDcBaseTargetModelDaoByIds(Long[] ids);
public int deleteDcBaseTargetModelByIds(Long[] ids);
}

60
lzbi-module/src/main/java/com/lzbi/targetFolder/service/DcBaseTargetModelService.java

@ -2,91 +2,91 @@ package com.lzbi.targetFolder.service;
import java.util.List;
import com.lzbi.common.utils.DateUtils;
import org.springframework.stereotype.Service;
import com.lzbi.targetFolder.domain.DcBaseTargetModelDao;
import com.lzbi.targetFolder.mapper.DcBaseTargetModelMapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lzbi.common.utils.DateUtils;
import com.lzbi.targetFolder.domain.DcBaseTargetModel;
import com.lzbi.targetFolder.mapper.DcBaseTargetModelMapper;
import org.springframework.stereotype.Service;
/**
* 指标模版配置Service业务层处理
*
*
* @author Lu.JL
* @date 2023-11-29
* @date 2023-12-07
*/
@Service
public class DcBaseTargetModelService extends ServiceImpl<DcBaseTargetModelMapper, DcBaseTargetModelDao> implements IService<DcBaseTargetModelDao>
public class DcBaseTargetModelService extends ServiceImpl<DcBaseTargetModelMapper, DcBaseTargetModel> implements IService<DcBaseTargetModel>
{
/**
* 查询指标模版配置
*
*
* @param id 指标模版配置主键
* @return 指标模版配置
*/
public DcBaseTargetModelDao selectDcBaseTargetModelDaoById(Long id)
public DcBaseTargetModel selectDcBaseTargetModelById(Long id)
{
return baseMapper.selectDcBaseTargetModelDaoById(id);
return baseMapper.selectDcBaseTargetModelById(id);
}
/**
* 查询指标模版配置列表
*
* @param dcBaseTargetModelDao 指标模版配置
*
* @param dcBaseTargetModel 指标模版配置
* @return 指标模版配置
*/
public List<DcBaseTargetModelDao> selectDcBaseTargetModelDaoList(DcBaseTargetModelDao dcBaseTargetModelDao)
public List<DcBaseTargetModel> selectDcBaseTargetModelList(DcBaseTargetModel dcBaseTargetModel)
{
return baseMapper.selectDcBaseTargetModelDaoList(dcBaseTargetModelDao);
return baseMapper.selectDcBaseTargetModelList(dcBaseTargetModel);
}
/**
* 新增指标模版配置
*
* @param dcBaseTargetModelDao 指标模版配置
*
* @param dcBaseTargetModel 指标模版配置
* @return 结果
*/
public int insertDcBaseTargetModelDao(DcBaseTargetModelDao dcBaseTargetModelDao)
public int insertDcBaseTargetModel(DcBaseTargetModel dcBaseTargetModel)
{
dcBaseTargetModelDao.setCreatedTime(DateUtils.getNowDate());
return baseMapper.insertDcBaseTargetModelDao(dcBaseTargetModelDao);
dcBaseTargetModel.setCreatedTime(DateUtils.getNowDate());
return baseMapper.insertDcBaseTargetModel(dcBaseTargetModel);
}
/**
* 修改指标模版配置
*
* @param dcBaseTargetModelDao 指标模版配置
*
* @param dcBaseTargetModel 指标模版配置
* @return 结果
*/
public int updateDcBaseTargetModelDao(DcBaseTargetModelDao dcBaseTargetModelDao)
public int updateDcBaseTargetModel(DcBaseTargetModel dcBaseTargetModel)
{
dcBaseTargetModelDao.setUpdatedTime(DateUtils.getNowDate());
return baseMapper.updateDcBaseTargetModelDao(dcBaseTargetModelDao);
dcBaseTargetModel.setUpdatedTime(DateUtils.getNowDate());
return baseMapper.updateDcBaseTargetModel(dcBaseTargetModel);
}
/**
* 批量删除指标模版配置
*
*
* @param ids 需要删除的指标模版配置主键
* @return 结果
*/
public int deleteDcBaseTargetModelDaoByIds(Long[] ids)
public int deleteDcBaseTargetModelByIds(Long[] ids)
{
return baseMapper.deleteDcBaseTargetModelDaoByIds(ids);
return baseMapper.deleteDcBaseTargetModelByIds(ids);
}
/**
* 删除指标模版配置信息
*
*
* @param id 指标模版配置主键
* @return 结果
*/
public int deleteDcBaseTargetModelDaoById(Long id)
public int deleteDcBaseTargetModelById(Long id)
{
return baseMapper.deleteDcBaseTargetModelDaoById(id);
return baseMapper.deleteDcBaseTargetModelById(id);
}
}

4
lzbi-module/src/main/java/com/lzbi/task/service/WorkParamReadService.java

@ -13,7 +13,7 @@ import java.util.List;
/**
* 编码规则定义Service业务层处理
*
*
* @author win
* @date 2023-11-29
*/
@ -23,7 +23,7 @@ public class WorkParamReadService extends ServiceImpl<WorkParamReadMapper, WorkP
{
/*获取生产单元的参数读取配置
* */
* */
public List<DcBusiWorkReadLog> readWorkValue(ReadQueryParams readQueryParams){
return baseMapper.readWorkValue(readQueryParams);
}

1
lzbi-module/src/main/resources/mapper/asset/DcBusiPlanTargetMonthMapper.xml

@ -47,6 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="countYear != null and countYear != ''"> and count_year = #{countYear}</if>
<if test="countMonth != null and countMonth != ''"> and count_month = #{countMonth}</if>
</where>
order by created_time desc
</select>
<select id="selectDcBusiPlanTargetMonthById" parameterType="Long" resultMap="DcBusiPlanTargetMonthResult">

3
lzbi-module/src/main/resources/mapper/asset/DcBusiTargetAdjustDayMasterMapper.xml

@ -59,7 +59,7 @@
resultMap="DcBusiTargetAdjustDayMasterResult">
<include refid="selectDcBusiTargetAdjustDayMasterVo"/>
<where>
<if test="billSerial != null and billSerial != ''">and bill_serial = #{billSerial}</if>
<if test="billSerial != null and billSerial != ''">and INSTR(bill_serial, #{billSerial}) > 0 </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},
@ -77,6 +77,7 @@
<if test="checkStauts != null and checkStauts != ''">and check_stauts = #{checkStauts}</if>
<if test="checkType != null and checkType != ''">and check_type = #{checkType}</if>
</where>
order by created_time desc
</select>
<select id="selectDcBusiTargetAdjustDayMasterDaoById" parameterType="Long"

20
lzbi-module/src/main/resources/mapper/asset/DcBusiTargetAdjustDaySubMapper.xml

@ -119,10 +119,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
delete from dc_busi_target_adjust_day_sub where id = #{id}
</delete>
<delete id="deleteDcBusiTargetAdjustDaySubDaoByBillNoMaster" parameterType="String">
delete from dc_busi_target_adjust_day_sub where bill_no_master = #{billNoMaster}
</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>
<delete id="deleteDcBusiTargetAdjustDaySubDaoByMasterIds" parameterType="String">
delete from dc_busi_target_adjust_day_sub where bill_no_master in (
SELECT
bill_serial
FROM
dc_busi_target_adjust_day_master
WHERE
id IN
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
)
</delete>
</mapper>

42
lzbi-module/src/main/resources/mapper/targetFolder/DcBaseTargetModelMapper.xml

@ -1,10 +1,10 @@
<?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">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.lzbi.targetFolder.mapper.DcBaseTargetModelMapper">
<resultMap type="com.lzbi.targetFolder.domain.DcBaseTargetModelDao" id="DcBaseTargetModelResult">
<resultMap type="com.lzbi.targetFolder.domain.DcBaseTargetModel" id="DcBaseTargetModelResult">
<result property="id" column="id" />
<result property="targetModelCode" column="target_model_code" />
<result property="targetModelName" column="target_model_name" />
@ -19,15 +19,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updatedTime" column="updated_time" />
<result property="deleteBy" column="delete_by" />
<result property="deleteTime" column="delete_time" />
<result property="deptId" column="dept_id" />
<result property="userId" column="user_id" />
</resultMap>
<sql id="selectDcBaseTargetModelVo">
select id, target_model_code, target_model_name, target_model_type, target_model_field, target_model_level, tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time from dc_base_target_model
select id, target_model_code, target_model_name, target_model_type, target_model_field, target_model_level, tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time, dept_id, user_id from dc_base_target_model
</sql>
<select id="selectDcBaseTargetModelDaoList" parameterType="DcBaseTargetModelDao" resultMap="DcBaseTargetModelResult">
<select id="selectDcBaseTargetModelList" parameterType="DcBaseTargetModel" resultMap="DcBaseTargetModelResult">
<include refid="selectDcBaseTargetModelVo"/>
<where>
<where>
<if test="targetModelCode != null and targetModelCode != ''"> and target_model_code = #{targetModelCode}</if>
<if test="targetModelName != null and targetModelName != ''"> and target_model_name like concat('%', #{targetModelName}, '%')</if>
<if test="targetModelType != null and targetModelType != ''"> and target_model_type = #{targetModelType}</if>
@ -35,13 +37,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="targetModelLevel != null "> and target_model_level = #{targetModelLevel}</if>
</where>
</select>
<select id="selectDcBaseTargetModelDaoById" parameterType="Long" resultMap="DcBaseTargetModelResult">
<select id="selectDcBaseTargetModelById" parameterType="Long" resultMap="DcBaseTargetModelResult">
<include refid="selectDcBaseTargetModelVo"/>
where id = #{id}
</select>
<insert id="insertDcBaseTargetModelDao" parameterType="DcBaseTargetModelDao" useGeneratedKeys="true" keyProperty="id">
<insert id="insertDcBaseTargetModel" parameterType="DcBaseTargetModel" useGeneratedKeys="true" keyProperty="id">
insert into dc_base_target_model
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="targetModelCode != null">target_model_code,</if>
@ -57,7 +59,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updatedTime != null">updated_time,</if>
<if test="deleteBy != null">delete_by,</if>
<if test="deleteTime != null">delete_time,</if>
</trim>
<if test="deptId != null">dept_id,</if>
<if test="userId != null">user_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="targetModelCode != null">#{targetModelCode},</if>
<if test="targetModelName != null">#{targetModelName},</if>
@ -72,10 +76,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updatedTime != null">#{updatedTime},</if>
<if test="deleteBy != null">#{deleteBy},</if>
<if test="deleteTime != null">#{deleteTime},</if>
</trim>
<if test="deptId != null">#{deptId},</if>
<if test="userId != null">#{userId},</if>
</trim>
</insert>
<update id="updateDcBaseTargetModelDao" parameterType="DcBaseTargetModelDao">
<update id="updateDcBaseTargetModel" parameterType="DcBaseTargetModel">
update dc_base_target_model
<trim prefix="SET" suffixOverrides=",">
<if test="targetModelCode != null">target_model_code = #{targetModelCode},</if>
@ -91,16 +97,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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="deptId != null">dept_id = #{deptId},</if>
<if test="userId != null">user_id = #{userId},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteDcBaseTargetModelDaoById" parameterType="Long">
<delete id="deleteDcBaseTargetModelById" parameterType="Long">
delete from dc_base_target_model where id = #{id}
</delete>
<delete id="deleteDcBaseTargetModelDaoByIds" parameterType="String">
delete from dc_base_target_model where id in
<delete id="deleteDcBaseTargetModelByIds" parameterType="String">
delete from dc_base_target_model where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>

Loading…
Cancel
Save