Browse Source
# Conflicts: # lzbi-module/src/main/java/com/lzbi/module/base/BaseModuleEntity.java # lzbi-module/src/main/java/com/lzbi/special/mapper/DcBaseWorkSpecialMapper.java # lzbi-module/src/main/resources/mapper/asset/DcBaseWorkSpecialMapper.xmldevelop
zhousq
11 months ago
16 changed files with 1046 additions and 43 deletions
@ -0,0 +1,118 @@ |
|||
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; |
|||
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.targetFolder.domain.DcBaseAssetTargetDao; |
|||
import com.lzbi.targetFolder.service.DcBaseAssetTargetService; |
|||
import com.lzbi.common.utils.poi.ExcelUtil; |
|||
import com.lzbi.common.core.page.TableDataInfo; |
|||
|
|||
/** |
|||
* 资产指标配置Controller |
|||
* |
|||
* @author Lu.JL |
|||
* @date 2023-11-30 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("/target/target") |
|||
public class DcBaseAssetTargetController extends BaseController |
|||
{ |
|||
@Autowired |
|||
private DcBaseAssetTargetService dcBaseAssetTargetService; |
|||
|
|||
/** |
|||
* 查询资产指标配置列表 |
|||
*/ |
|||
@PreAuthorize("@ss.hasPermi('target:target:list')") |
|||
@GetMapping("/list") |
|||
public TableDataInfo list(DcBaseAssetTargetDao dcBaseAssetTargetDao) |
|||
{ |
|||
startPage(); |
|||
List<DcBaseAssetTargetDao> list = dcBaseAssetTargetService.selectDcBaseAssetTargetDaoList(dcBaseAssetTargetDao); |
|||
return getDataTable(list); |
|||
} |
|||
|
|||
/** |
|||
* 导出资产指标配置列表 |
|||
*/ |
|||
@PreAuthorize("@ss.hasPermi('target:target:export')") |
|||
@Log(title = "资产指标配置", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
public void export(HttpServletResponse response, DcBaseAssetTargetDao dcBaseAssetTargetDao) |
|||
{ |
|||
List<DcBaseAssetTargetDao> list = dcBaseAssetTargetService.selectDcBaseAssetTargetDaoList(dcBaseAssetTargetDao); |
|||
ExcelUtil<DcBaseAssetTargetDao> util = new ExcelUtil<DcBaseAssetTargetDao>(DcBaseAssetTargetDao.class); |
|||
util.exportExcel(response, list, "资产指标配置数据"); |
|||
} |
|||
|
|||
/** |
|||
* 获取资产指标配置详细信息 |
|||
*/ |
|||
@PreAuthorize("@ss.hasPermi('target:target:query')") |
|||
@GetMapping(value = "/{id}") |
|||
public AjaxResult getInfo(@PathVariable("id") Long id) |
|||
{ |
|||
return success(dcBaseAssetTargetService.selectDcBaseAssetTargetDaoById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 新增资产指标配置 |
|||
*/ |
|||
@PreAuthorize("@ss.hasPermi('target:target:add')") |
|||
@Log(title = "资产指标配置", businessType = BusinessType.INSERT) |
|||
@PostMapping |
|||
public AjaxResult add(@RequestBody DcBaseAssetTargetDao dcBaseAssetTargetDao) |
|||
{ |
|||
return toAjax(dcBaseAssetTargetService.insertDcBaseAssetTargetDao(dcBaseAssetTargetDao)); |
|||
} |
|||
|
|||
/** |
|||
* 修改资产指标配置 |
|||
*/ |
|||
@PreAuthorize("@ss.hasPermi('target:target:edit')") |
|||
@Log(title = "资产指标配置", businessType = BusinessType.UPDATE) |
|||
@PutMapping |
|||
public AjaxResult edit(@RequestBody DcBaseAssetTargetDao dcBaseAssetTargetDao) |
|||
{ |
|||
return toAjax(dcBaseAssetTargetService.updateDcBaseAssetTargetDao(dcBaseAssetTargetDao)); |
|||
} |
|||
|
|||
/** |
|||
* 删除资产指标配置 |
|||
*/ |
|||
@PreAuthorize("@ss.hasPermi('target:target:remove')") |
|||
@Log(title = "资产指标配置", businessType = BusinessType.DELETE) |
|||
@DeleteMapping("/{ids}") |
|||
public AjaxResult remove(@PathVariable Long[] ids) |
|||
{ |
|||
return toAjax(dcBaseAssetTargetService.deleteDcBaseAssetTargetDaoByIds(ids)); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 查询资产指标配置列表 |
|||
*/ |
|||
@PreAuthorize("@ss.hasPermi('target:target:list')") |
|||
@GetMapping("/listNoPage") |
|||
public AjaxResult listNoPage(DcBaseAssetTargetDao dcBaseAssetTargetDao) |
|||
{ |
|||
List<DcBaseAssetTargetDao> list = dcBaseAssetTargetService.selectDcBaseAssetTargetDaoList(dcBaseAssetTargetDao); |
|||
return AjaxResult.success(list); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,117 @@ |
|||
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; |
|||
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.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 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("/target/targetModel") |
|||
public class DcBaseTargetModelController extends BaseController |
|||
{ |
|||
@Autowired |
|||
private DcBaseTargetModelService dcBaseTargetModelService; |
|||
|
|||
/** |
|||
* 查询指标模版配置列表 |
|||
*/ |
|||
@PreAuthorize("@ss.hasPermi('target:targetModel:list')") |
|||
@GetMapping("/list") |
|||
public TableDataInfo list(DcBaseTargetModelDao dcBaseTargetModelDao) |
|||
{ |
|||
startPage(); |
|||
List<DcBaseTargetModelDao> list = dcBaseTargetModelService.selectDcBaseTargetModelDaoList(dcBaseTargetModelDao); |
|||
return getDataTable(list); |
|||
} |
|||
|
|||
/** |
|||
* 导出指标模版配置列表 |
|||
*/ |
|||
@PreAuthorize("@ss.hasPermi('target:targetModel:export')") |
|||
@Log(title = "指标模版配置", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
public void export(HttpServletResponse response, DcBaseTargetModelDao dcBaseTargetModelDao) |
|||
{ |
|||
List<DcBaseTargetModelDao> list = dcBaseTargetModelService.selectDcBaseTargetModelDaoList(dcBaseTargetModelDao); |
|||
ExcelUtil<DcBaseTargetModelDao> util = new ExcelUtil<DcBaseTargetModelDao>(DcBaseTargetModelDao.class); |
|||
util.exportExcel(response, list, "指标模版配置数据"); |
|||
} |
|||
|
|||
/** |
|||
* 获取指标模版配置详细信息 |
|||
*/ |
|||
@PreAuthorize("@ss.hasPermi('target:targetModel:query')") |
|||
@GetMapping(value = "/{id}") |
|||
public AjaxResult getInfo(@PathVariable("id") Long id) |
|||
{ |
|||
return success(dcBaseTargetModelService.selectDcBaseTargetModelDaoById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 新增指标模版配置 |
|||
*/ |
|||
@PreAuthorize("@ss.hasPermi('target:targetModel:add')") |
|||
@Log(title = "指标模版配置", businessType = BusinessType.INSERT) |
|||
@PostMapping |
|||
public AjaxResult add(@RequestBody DcBaseTargetModelDao dcBaseTargetModelDao) |
|||
{ |
|||
return toAjax(dcBaseTargetModelService.insertDcBaseTargetModelDao(dcBaseTargetModelDao)); |
|||
} |
|||
|
|||
/** |
|||
* 修改指标模版配置 |
|||
*/ |
|||
@PreAuthorize("@ss.hasPermi('target:targetModel:edit')") |
|||
@Log(title = "指标模版配置", businessType = BusinessType.UPDATE) |
|||
@PutMapping |
|||
public AjaxResult edit(@RequestBody DcBaseTargetModelDao dcBaseTargetModelDao) |
|||
{ |
|||
return toAjax(dcBaseTargetModelService.updateDcBaseTargetModelDao(dcBaseTargetModelDao)); |
|||
} |
|||
|
|||
/** |
|||
* 删除指标模版配置 |
|||
*/ |
|||
@PreAuthorize("@ss.hasPermi('target:targetModel:remove')") |
|||
@Log(title = "指标模版配置", businessType = BusinessType.DELETE) |
|||
@DeleteMapping("/{ids}") |
|||
public AjaxResult remove(@PathVariable Long[] ids) |
|||
{ |
|||
return toAjax(dcBaseTargetModelService.deleteDcBaseTargetModelDaoByIds(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 查询指标模版配置列表 |
|||
*/ |
|||
@PreAuthorize("@ss.hasPermi('target:targetModel:list')") |
|||
@GetMapping("/listNoPage") |
|||
public AjaxResult listNoPage(DcBaseTargetModelDao dcBaseTargetModelDao) |
|||
{ |
|||
List<DcBaseTargetModelDao> list = dcBaseTargetModelService.selectDcBaseTargetModelDaoList(dcBaseTargetModelDao); |
|||
return AjaxResult.success(list); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,77 @@ |
|||
package com.lzbi.targetFolder.domain; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
import com.lzbi.common.annotation.Excel; |
|||
import com.lzbi.module.base.BaseModuleEntity; |
|||
|
|||
/** |
|||
* 资产指标配置对象 dc_base_asset_target |
|||
* |
|||
* @author Lu.JL |
|||
* @date 2023-11-30 |
|||
*/ |
|||
@Data |
|||
public class DcBaseAssetTargetDao extends BaseModuleEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 主键 */ |
|||
private Long id; |
|||
|
|||
/** 资产ID */ |
|||
@Excel(name = "资产ID") |
|||
private Long assetId; |
|||
|
|||
/** 指标模型编码 */ |
|||
@Excel(name = "指标模型编码") |
|||
private String targetModelCode; |
|||
|
|||
/** 指标名称 */ |
|||
@Excel(name = "指标名称") |
|||
private String targetName; |
|||
|
|||
/** 指标编码 */ |
|||
@Excel(name = "指标编码") |
|||
private String targetCode; |
|||
|
|||
/** 所属专业 */ |
|||
@Excel(name = "所属专业") |
|||
private String targetField; |
|||
|
|||
/** 上限 */ |
|||
@Excel(name = "上限") |
|||
private BigDecimal limitUp; |
|||
|
|||
/** 下限 */ |
|||
@Excel(name = "下限") |
|||
private BigDecimal limitDown; |
|||
|
|||
/** 值 */ |
|||
@Excel(name = "值") |
|||
private BigDecimal valueBase; |
|||
|
|||
/** 是否均值 */ |
|||
@Excel(name = "是否均值") |
|||
private String flagAvg; |
|||
|
|||
/** 是否汇总 */ |
|||
@Excel(name = "是否汇总") |
|||
private String flagSum; |
|||
|
|||
/** 是否积算 */ |
|||
@Excel(name = "是否积算") |
|||
private String flagCompute; |
|||
|
|||
/** 排序 */ |
|||
@Excel(name = "排序") |
|||
private String sort; |
|||
|
|||
/** 统计单元编码 */ |
|||
@Excel(name = "统计单元编码") |
|||
private String assetCode; |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,43 @@ |
|||
package com.lzbi.targetFolder.domain; |
|||
|
|||
import lombok.Data; |
|||
import com.lzbi.common.annotation.Excel; |
|||
import com.lzbi.module.base.BaseModuleEntity; |
|||
|
|||
/** |
|||
* 指标模版配置对象 dc_base_target_model |
|||
* |
|||
* @author Lu.JL |
|||
* @date 2023-11-29 |
|||
*/ |
|||
@Data |
|||
public class DcBaseTargetModelDao extends BaseModuleEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 主键 */ |
|||
private Long id; |
|||
|
|||
/** 指标模版编码 */ |
|||
@Excel(name = "指标模版编码") |
|||
private String targetModelCode; |
|||
|
|||
/** 指标模版名称 */ |
|||
@Excel(name = "指标模版名称") |
|||
private String targetModelName; |
|||
|
|||
/** 指标类型;计算型,录入型 */ |
|||
@Excel(name = "指标类型;计算型,录入型") |
|||
private String targetModelType; |
|||
|
|||
/** 所属专业 */ |
|||
@Excel(name = "所属专业") |
|||
private String targetModelField; |
|||
|
|||
/** 指标等级 */ |
|||
@Excel(name = "指标等级") |
|||
private Long targetModelLevel; |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,65 @@ |
|||
package com.lzbi.targetFolder.mapper; |
|||
|
|||
import java.util.List; |
|||
import com.lzbi.targetFolder.domain.DcBaseAssetTargetDao; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 资产指标配置Mapper接口 |
|||
* |
|||
* @author Lu.JL |
|||
* @date 2023-11-30 |
|||
*/ |
|||
|
|||
@Mapper |
|||
public interface DcBaseAssetTargetMapper extends BaseMapper<DcBaseAssetTargetDao> |
|||
{ |
|||
/** |
|||
* 查询资产指标配置 |
|||
* |
|||
* @param id 资产指标配置主键 |
|||
* @return 资产指标配置 |
|||
*/ |
|||
public DcBaseAssetTargetDao selectDcBaseAssetTargetDaoById(Long id); |
|||
|
|||
/** |
|||
* 查询资产指标配置列表 |
|||
* |
|||
* @param dcBaseAssetTargetDao 资产指标配置 |
|||
* @return 资产指标配置集合 |
|||
*/ |
|||
public List<DcBaseAssetTargetDao> selectDcBaseAssetTargetDaoList(DcBaseAssetTargetDao dcBaseAssetTargetDao); |
|||
|
|||
/** |
|||
* 新增资产指标配置 |
|||
* |
|||
* @param dcBaseAssetTargetDao 资产指标配置 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertDcBaseAssetTargetDao(DcBaseAssetTargetDao dcBaseAssetTargetDao); |
|||
|
|||
/** |
|||
* 修改资产指标配置 |
|||
* |
|||
* @param dcBaseAssetTarget 资产指标配置 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateDcBaseAssetTargetDao(DcBaseAssetTargetDao dcBaseAssetTargetDao); |
|||
|
|||
/** |
|||
* 删除资产指标配置 |
|||
* |
|||
* @param id 资产指标配置主键 |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteDcBaseAssetTargetDaoById(Long id); |
|||
|
|||
/** |
|||
* 批量删除资产指标配置 |
|||
* |
|||
* @param ids 需要删除的数据主键集合 |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteDcBaseAssetTargetDaoByIds(Long[] ids); |
|||
} |
@ -0,0 +1,63 @@ |
|||
package com.lzbi.targetFolder.mapper; |
|||
|
|||
import java.util.List; |
|||
import com.lzbi.targetFolder.domain.DcBaseTargetModelDao; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
|
|||
/** |
|||
* 指标模版配置Mapper接口 |
|||
* |
|||
* @author Lu.JL |
|||
* @date 2023-11-29 |
|||
*/ |
|||
|
|||
public interface DcBaseTargetModelMapper extends BaseMapper<DcBaseTargetModelDao> |
|||
{ |
|||
/** |
|||
* 查询指标模版配置 |
|||
* |
|||
* @param id 指标模版配置主键 |
|||
* @return 指标模版配置 |
|||
*/ |
|||
public DcBaseTargetModelDao selectDcBaseTargetModelDaoById(Long id); |
|||
|
|||
/** |
|||
* 查询指标模版配置列表 |
|||
* |
|||
* @param dcBaseTargetModelDao 指标模版配置 |
|||
* @return 指标模版配置集合 |
|||
*/ |
|||
public List<DcBaseTargetModelDao> selectDcBaseTargetModelDaoList(DcBaseTargetModelDao dcBaseTargetModelDao); |
|||
|
|||
/** |
|||
* 新增指标模版配置 |
|||
* |
|||
* @param dcBaseTargetModelDao 指标模版配置 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertDcBaseTargetModelDao(DcBaseTargetModelDao dcBaseTargetModelDao); |
|||
|
|||
/** |
|||
* 修改指标模版配置 |
|||
* |
|||
* @param dcBaseTargetModel 指标模版配置 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateDcBaseTargetModelDao(DcBaseTargetModelDao dcBaseTargetModelDao); |
|||
|
|||
/** |
|||
* 删除指标模版配置 |
|||
* |
|||
* @param id 指标模版配置主键 |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteDcBaseTargetModelDaoById(Long id); |
|||
|
|||
/** |
|||
* 批量删除指标模版配置 |
|||
* |
|||
* @param ids 需要删除的数据主键集合 |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteDcBaseTargetModelDaoByIds(Long[] ids); |
|||
} |
@ -0,0 +1,95 @@ |
|||
package com.lzbi.targetFolder.service; |
|||
|
|||
import java.util.List; |
|||
|
|||
import com.lzbi.common.utils.DateUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import com.lzbi.targetFolder.domain.DcBaseAssetTargetDao; |
|||
import com.lzbi.targetFolder.mapper.DcBaseAssetTargetMapper; |
|||
import com.baomidou.mybatisplus.extension.service.IService; |
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|||
/** |
|||
* 资产指标配置Service业务层处理 |
|||
* |
|||
* @author Lu.JL |
|||
* @date 2023-11-30 |
|||
*/ |
|||
@Service |
|||
public class DcBaseAssetTargetService extends ServiceImpl<DcBaseAssetTargetMapper, DcBaseAssetTargetDao> implements IService<DcBaseAssetTargetDao> |
|||
{ |
|||
@Autowired |
|||
private DcBaseAssetTargetMapper dcBaseAssetTargetMapper; |
|||
|
|||
/** |
|||
* 查询资产指标配置 |
|||
* |
|||
* @param id 资产指标配置主键 |
|||
* @return 资产指标配置 |
|||
*/ |
|||
public DcBaseAssetTargetDao selectDcBaseAssetTargetDaoById(Long id) |
|||
{ |
|||
return dcBaseAssetTargetMapper.selectDcBaseAssetTargetDaoById(id); |
|||
} |
|||
|
|||
/** |
|||
* 查询资产指标配置列表 |
|||
* |
|||
* @param dcBaseAssetTargetDao 资产指标配置 |
|||
* @return 资产指标配置 |
|||
*/ |
|||
public List<DcBaseAssetTargetDao> selectDcBaseAssetTargetDaoList(DcBaseAssetTargetDao dcBaseAssetTargetDao) |
|||
{ |
|||
return dcBaseAssetTargetMapper.selectDcBaseAssetTargetDaoList(dcBaseAssetTargetDao); |
|||
} |
|||
|
|||
/** |
|||
* 新增资产指标配置 |
|||
* |
|||
* @param dcBaseAssetTargetDao 资产指标配置 |
|||
* @return 结果 |
|||
*/ |
|||
|
|||
public int insertDcBaseAssetTargetDao(DcBaseAssetTargetDao dcBaseAssetTargetDao) |
|||
{ |
|||
dcBaseAssetTargetDao.setCreatedTime(DateUtils.getNowDate()); |
|||
return dcBaseAssetTargetMapper.insertDcBaseAssetTargetDao(dcBaseAssetTargetDao); |
|||
} |
|||
|
|||
/** |
|||
* 修改资产指标配置 |
|||
* |
|||
* @param dcBaseAssetTargetDao 资产指标配置 |
|||
* @return 结果 |
|||
*/ |
|||
|
|||
public int updateDcBaseAssetTargetDao(DcBaseAssetTargetDao dcBaseAssetTargetDao) |
|||
{ |
|||
dcBaseAssetTargetDao.setUpdatedTime(DateUtils.getNowDate()); |
|||
return dcBaseAssetTargetMapper.updateDcBaseAssetTargetDao(dcBaseAssetTargetDao); |
|||
} |
|||
|
|||
/** |
|||
* 批量删除资产指标配置 |
|||
* |
|||
* @param ids 需要删除的资产指标配置主键 |
|||
* @return 结果 |
|||
*/ |
|||
|
|||
public int deleteDcBaseAssetTargetDaoByIds(Long[] ids) |
|||
{ |
|||
return dcBaseAssetTargetMapper.deleteDcBaseAssetTargetDaoByIds(ids); |
|||
} |
|||
|
|||
/** |
|||
* 删除资产指标配置信息 |
|||
* |
|||
* @param id 资产指标配置主键 |
|||
* @return 结果 |
|||
*/ |
|||
|
|||
public int deleteDcBaseAssetTargetDaoById(Long id) |
|||
{ |
|||
return dcBaseAssetTargetMapper.deleteDcBaseAssetTargetDaoById(id); |
|||
} |
|||
} |
@ -0,0 +1,92 @@ |
|||
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; |
|||
/** |
|||
* 指标模版配置Service业务层处理 |
|||
* |
|||
* @author Lu.JL |
|||
* @date 2023-11-29 |
|||
*/ |
|||
@Service |
|||
public class DcBaseTargetModelService extends ServiceImpl<DcBaseTargetModelMapper, DcBaseTargetModelDao> implements IService<DcBaseTargetModelDao> |
|||
{ |
|||
|
|||
/** |
|||
* 查询指标模版配置 |
|||
* |
|||
* @param id 指标模版配置主键 |
|||
* @return 指标模版配置 |
|||
*/ |
|||
public DcBaseTargetModelDao selectDcBaseTargetModelDaoById(Long id) |
|||
{ |
|||
return baseMapper.selectDcBaseTargetModelDaoById(id); |
|||
} |
|||
|
|||
/** |
|||
* 查询指标模版配置列表 |
|||
* |
|||
* @param dcBaseTargetModelDao 指标模版配置 |
|||
* @return 指标模版配置 |
|||
*/ |
|||
public List<DcBaseTargetModelDao> selectDcBaseTargetModelDaoList(DcBaseTargetModelDao dcBaseTargetModelDao) |
|||
{ |
|||
return baseMapper.selectDcBaseTargetModelDaoList(dcBaseTargetModelDao); |
|||
} |
|||
|
|||
/** |
|||
* 新增指标模版配置 |
|||
* |
|||
* @param dcBaseTargetModelDao 指标模版配置 |
|||
* @return 结果 |
|||
*/ |
|||
|
|||
public int insertDcBaseTargetModelDao(DcBaseTargetModelDao dcBaseTargetModelDao) |
|||
{ |
|||
dcBaseTargetModelDao.setCreatedTime(DateUtils.getNowDate()); |
|||
return baseMapper.insertDcBaseTargetModelDao(dcBaseTargetModelDao); |
|||
} |
|||
|
|||
/** |
|||
* 修改指标模版配置 |
|||
* |
|||
* @param dcBaseTargetModelDao 指标模版配置 |
|||
* @return 结果 |
|||
*/ |
|||
|
|||
public int updateDcBaseTargetModelDao(DcBaseTargetModelDao dcBaseTargetModelDao) |
|||
{ |
|||
dcBaseTargetModelDao.setUpdatedTime(DateUtils.getNowDate()); |
|||
return baseMapper.updateDcBaseTargetModelDao(dcBaseTargetModelDao); |
|||
} |
|||
|
|||
/** |
|||
* 批量删除指标模版配置 |
|||
* |
|||
* @param ids 需要删除的指标模版配置主键 |
|||
* @return 结果 |
|||
*/ |
|||
|
|||
public int deleteDcBaseTargetModelDaoByIds(Long[] ids) |
|||
{ |
|||
return baseMapper.deleteDcBaseTargetModelDaoByIds(ids); |
|||
} |
|||
|
|||
/** |
|||
* 删除指标模版配置信息 |
|||
* |
|||
* @param id 指标模版配置主键 |
|||
* @return 结果 |
|||
*/ |
|||
|
|||
public int deleteDcBaseTargetModelDaoById(Long id) |
|||
{ |
|||
return baseMapper.deleteDcBaseTargetModelDaoById(id); |
|||
} |
|||
} |
@ -0,0 +1,143 @@ |
|||
<?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.targetFolder.mapper.DcBaseAssetTargetMapper"> |
|||
|
|||
<resultMap type="com.lzbi.targetFolder.domain.DcBaseAssetTargetDao" id="DcBaseAssetTargetResult"> |
|||
<result property="id" column="id" /> |
|||
<result property="assetId" column="asset_id" /> |
|||
<result property="targetModelCode" column="target_model_code" /> |
|||
<result property="targetName" column="target_name" /> |
|||
<result property="targetCode" column="target_code" /> |
|||
<result property="targetField" column="target_field" /> |
|||
<result property="limitUp" column="limit_up" /> |
|||
<result property="limitDown" column="limit_down" /> |
|||
<result property="valueBase" column="value_base" /> |
|||
<result property="flagAvg" column="flag_avg" /> |
|||
<result property="flagSum" column="flag_sum" /> |
|||
<result property="flagCompute" column="flag_compute" /> |
|||
<result property="sort" column="sort" /> |
|||
<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" /> |
|||
</resultMap> |
|||
|
|||
<sql id="selectDcBaseAssetTargetVo"> |
|||
select id, asset_id, target_model_code, target_name, target_code, target_field, limit_up, limit_down, value_base, flag_avg, flag_sum, flag_compute, sort, tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time from dc_base_asset_target |
|||
</sql> |
|||
|
|||
<select id="selectDcBaseAssetTargetDaoList" parameterType="DcBaseAssetTargetDao" resultMap="DcBaseAssetTargetResult"> |
|||
<include refid="selectDcBaseAssetTargetVo"/> |
|||
<where> |
|||
<if test="assetId != null "> and asset_id = #{assetId}</if> |
|||
<if test="targetModelCode != null and targetModelCode != ''"> and target_model_code = #{targetModelCode}</if> |
|||
<if test="targetName != null and targetName != ''"> and target_name like concat('%', #{targetName}, '%')</if> |
|||
<if test="targetCode != null and targetCode != ''"> and target_code = #{targetCode}</if> |
|||
<if test="targetField != null and targetField != ''"> and target_field = #{targetField}</if> |
|||
<if test="limitUp != null "> and limit_up = #{limitUp}</if> |
|||
<if test="limitDown != null "> and limit_down = #{limitDown}</if> |
|||
<if test="valueBase != null "> and value_base = #{valueBase}</if> |
|||
<if test="flagAvg != null and flagAvg != ''"> and flag_avg = #{flagAvg}</if> |
|||
<if test="flagSum != null and flagSum != ''"> and flag_sum = #{flagSum}</if> |
|||
<if test="flagCompute != null and flagCompute != ''"> and flag_compute = #{flagCompute}</if> |
|||
<if test="sort != null and sort != ''"> and sort = #{sort}</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectDcBaseAssetTargetDaoById" parameterType="Long" resultMap="DcBaseAssetTargetResult"> |
|||
<include refid="selectDcBaseAssetTargetVo"/> |
|||
where id = #{id} |
|||
</select> |
|||
|
|||
<insert id="insertDcBaseAssetTargetDao" parameterType="DcBaseAssetTargetDao" useGeneratedKeys="true" keyProperty="id"> |
|||
insert into dc_base_asset_target |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="assetId != null">asset_id,</if> |
|||
<if test="targetModelCode != null">target_model_code,</if> |
|||
<if test="targetName != null">target_name,</if> |
|||
<if test="targetCode != null">target_code,</if> |
|||
<if test="targetField != null">target_field,</if> |
|||
<if test="limitUp != null">limit_up,</if> |
|||
<if test="limitDown != null">limit_down,</if> |
|||
<if test="valueBase != null">value_base,</if> |
|||
<if test="flagAvg != null">flag_avg,</if> |
|||
<if test="flagSum != null">flag_sum,</if> |
|||
<if test="flagCompute != null">flag_compute,</if> |
|||
<if test="sort != null">sort,</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> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="assetId != null">#{assetId},</if> |
|||
<if test="targetModelCode != null">#{targetModelCode},</if> |
|||
<if test="targetName != null">#{targetName},</if> |
|||
<if test="targetCode != null">#{targetCode},</if> |
|||
<if test="targetField != null">#{targetField},</if> |
|||
<if test="limitUp != null">#{limitUp},</if> |
|||
<if test="limitDown != null">#{limitDown},</if> |
|||
<if test="valueBase != null">#{valueBase},</if> |
|||
<if test="flagAvg != null">#{flagAvg},</if> |
|||
<if test="flagSum != null">#{flagSum},</if> |
|||
<if test="flagCompute != null">#{flagCompute},</if> |
|||
<if test="sort != null">#{sort},</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> |
|||
</trim> |
|||
</insert> |
|||
|
|||
<update id="updateDcBaseAssetTargetDao" parameterType="DcBaseAssetTargetDao"> |
|||
update dc_base_asset_target |
|||
<trim prefix="SET" suffixOverrides=","> |
|||
<if test="assetId != null">asset_id = #{assetId},</if> |
|||
<if test="targetModelCode != null">target_model_code = #{targetModelCode},</if> |
|||
<if test="targetName != null">target_name = #{targetName},</if> |
|||
<if test="targetCode != null">target_code = #{targetCode},</if> |
|||
<if test="targetField != null">target_field = #{targetField},</if> |
|||
<if test="limitUp != null">limit_up = #{limitUp},</if> |
|||
<if test="limitDown != null">limit_down = #{limitDown},</if> |
|||
<if test="valueBase != null">value_base = #{valueBase},</if> |
|||
<if test="flagAvg != null">flag_avg = #{flagAvg},</if> |
|||
<if test="flagSum != null">flag_sum = #{flagSum},</if> |
|||
<if test="flagCompute != null">flag_compute = #{flagCompute},</if> |
|||
<if test="sort != null">sort = #{sort},</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> |
|||
</trim> |
|||
where id = #{id} |
|||
</update> |
|||
|
|||
<delete id="deleteDcBaseAssetTargetDaoById" parameterType="Long"> |
|||
delete from dc_base_asset_target where id = #{id} |
|||
</delete> |
|||
|
|||
<delete id="deleteDcBaseAssetTargetDaoByIds" parameterType="String"> |
|||
delete from dc_base_asset_target where id in |
|||
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</delete> |
|||
</mapper> |
@ -0,0 +1,108 @@ |
|||
<?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.targetFolder.mapper.DcBaseTargetModelMapper"> |
|||
|
|||
<resultMap type="com.lzbi.targetFolder.domain.DcBaseTargetModelDao" id="DcBaseTargetModelResult"> |
|||
<result property="id" column="id" /> |
|||
<result property="targetModelCode" column="target_model_code" /> |
|||
<result property="targetModelName" column="target_model_name" /> |
|||
<result property="targetModelType" column="target_model_type" /> |
|||
<result property="targetModelField" column="target_model_field" /> |
|||
<result property="targetModelLevel" column="target_model_level" /> |
|||
<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" /> |
|||
</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 |
|||
</sql> |
|||
|
|||
<select id="selectDcBaseTargetModelDaoList" parameterType="DcBaseTargetModelDao" resultMap="DcBaseTargetModelResult"> |
|||
<include refid="selectDcBaseTargetModelVo"/> |
|||
<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> |
|||
<if test="targetModelField != null and targetModelField != ''"> and target_model_field = #{targetModelField}</if> |
|||
<if test="targetModelLevel != null "> and target_model_level = #{targetModelLevel}</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectDcBaseTargetModelDaoById" parameterType="Long" resultMap="DcBaseTargetModelResult"> |
|||
<include refid="selectDcBaseTargetModelVo"/> |
|||
where id = #{id} |
|||
</select> |
|||
|
|||
<insert id="insertDcBaseTargetModelDao" parameterType="DcBaseTargetModelDao" useGeneratedKeys="true" keyProperty="id"> |
|||
insert into dc_base_target_model |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="targetModelCode != null">target_model_code,</if> |
|||
<if test="targetModelName != null">target_model_name,</if> |
|||
<if test="targetModelType != null">target_model_type,</if> |
|||
<if test="targetModelField != null">target_model_field,</if> |
|||
<if test="targetModelLevel != null">target_model_level,</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> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="targetModelCode != null">#{targetModelCode},</if> |
|||
<if test="targetModelName != null">#{targetModelName},</if> |
|||
<if test="targetModelType != null">#{targetModelType},</if> |
|||
<if test="targetModelField != null">#{targetModelField},</if> |
|||
<if test="targetModelLevel != null">#{targetModelLevel},</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> |
|||
</trim> |
|||
</insert> |
|||
|
|||
<update id="updateDcBaseTargetModelDao" parameterType="DcBaseTargetModelDao"> |
|||
update dc_base_target_model |
|||
<trim prefix="SET" suffixOverrides=","> |
|||
<if test="targetModelCode != null">target_model_code = #{targetModelCode},</if> |
|||
<if test="targetModelName != null">target_model_name = #{targetModelName},</if> |
|||
<if test="targetModelType != null">target_model_type = #{targetModelType},</if> |
|||
<if test="targetModelField != null">target_model_field = #{targetModelField},</if> |
|||
<if test="targetModelLevel != null">target_model_level = #{targetModelLevel},</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> |
|||
</trim> |
|||
where id = #{id} |
|||
</update> |
|||
|
|||
<delete id="deleteDcBaseTargetModelDaoById" 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 |
|||
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</delete> |
|||
</mapper> |
Loading…
Reference in new issue