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/mapper/DcBaseWorkSpecialMapper.java
#	lzbi-module/src/main/resources/mapper/asset/DcBaseWorkSpecialMapper.xml
develop
zhousq 11 months ago
parent
commit
be3c2be756
  1. 2
      lzbi-common/src/main/java/com/lzbi/common/utils/html/HTMLFilter.java
  2. 14
      lzbi-module/src/main/java/com/lzbi/asset/controller/DcBaseAssetInfoController.java
  3. 103
      lzbi-module/src/main/java/com/lzbi/special/controller/DcBaseWorkSpecialController.java
  4. 7
      lzbi-module/src/main/java/com/lzbi/special/domain/DcBaseWorkSpecial.java
  5. 38
      lzbi-module/src/main/java/com/lzbi/special/service/DcBaseWorkSpecialService.java
  6. 118
      lzbi-module/src/main/java/com/lzbi/targetFolder/controller/DcBaseAssetTargetController.java
  7. 117
      lzbi-module/src/main/java/com/lzbi/targetFolder/controller/DcBaseTargetModelController.java
  8. 77
      lzbi-module/src/main/java/com/lzbi/targetFolder/domain/DcBaseAssetTargetDao.java
  9. 43
      lzbi-module/src/main/java/com/lzbi/targetFolder/domain/DcBaseTargetModelDao.java
  10. 65
      lzbi-module/src/main/java/com/lzbi/targetFolder/mapper/DcBaseAssetTargetMapper.java
  11. 63
      lzbi-module/src/main/java/com/lzbi/targetFolder/mapper/DcBaseTargetModelMapper.java
  12. 95
      lzbi-module/src/main/java/com/lzbi/targetFolder/service/DcBaseAssetTargetService.java
  13. 92
      lzbi-module/src/main/java/com/lzbi/targetFolder/service/DcBaseTargetModelService.java
  14. 4
      lzbi-module/src/main/java/com/lzbi/task/service/WorkParamReadService.java
  15. 143
      lzbi-module/src/main/resources/mapper/targetFolder/DcBaseAssetTargetMapper.xml
  16. 108
      lzbi-module/src/main/resources/mapper/targetFolder/DcBaseTargetModelMapper.xml

2
lzbi-common/src/main/java/com/lzbi/common/utils/html/HTMLFilter.java

@ -106,7 +106,7 @@ public final class HTMLFilter
final ArrayList<String> a_atts = new ArrayList<>();
a_atts.add("href");
a_atts.add("target");
a_atts.add("targetFolder");
vAllowed.put("a", a_atts);
final ArrayList<String> img_atts = new ArrayList<>();

14
lzbi-module/src/main/java/com/lzbi/asset/controller/DcBaseAssetInfoController.java

@ -30,7 +30,7 @@ import java.util.List;
* @date 2023-11-27
*/
@RestController
@RequestMapping("/lzbi/asset_info")
@RequestMapping("/lzbi/assetInfo")
public class DcBaseAssetInfoController extends BaseController {
@Autowired
private IDcBaseAssetInfoService dcBaseAssetInfoService;
@ -38,7 +38,7 @@ public class DcBaseAssetInfoController extends BaseController {
/**
* 查询资产信息列表
*/
@PreAuthorize("@ss.hasPermi('lzbi:asset_info:list')")
@PreAuthorize("@ss.hasPermi('lzbi:assetInfo:list')")
@GetMapping("/list")
public TableDataInfo list(DcBaseAssetInfo dcBaseAssetInfo) {
startPage();
@ -49,7 +49,7 @@ public class DcBaseAssetInfoController extends BaseController {
/**
* 导出资产信息列表
*/
@PreAuthorize("@ss.hasPermi('lzbi:asset_info:export')")
@PreAuthorize("@ss.hasPermi('lzbi:assetInfo:export')")
@Log(title = "资产信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, DcBaseAssetInfo dcBaseAssetInfo) {
@ -61,7 +61,7 @@ public class DcBaseAssetInfoController extends BaseController {
/**
* 获取资产信息详细信息
*/
@PreAuthorize("@ss.hasPermi('lzbi:asset_info:query')")
@PreAuthorize("@ss.hasPermi('lzbi:assetInfo:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(dcBaseAssetInfoService.selectDcBaseAssetInfoById(id));
@ -70,7 +70,7 @@ public class DcBaseAssetInfoController extends BaseController {
/**
* 新增资产信息
*/
@PreAuthorize("@ss.hasPermi('lzbi:asset_info:add')")
@PreAuthorize("@ss.hasPermi('lzbi:assetInfo:add')")
@Log(title = "资产信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DcBaseAssetInfo dcBaseAssetInfo) {
@ -80,7 +80,7 @@ public class DcBaseAssetInfoController extends BaseController {
/**
* 修改资产信息
*/
@PreAuthorize("@ss.hasPermi('lzbi:asset_info:edit')")
@PreAuthorize("@ss.hasPermi('lzbi:assetInfo:edit')")
@Log(title = "资产信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DcBaseAssetInfo dcBaseAssetInfo) {
@ -90,7 +90,7 @@ public class DcBaseAssetInfoController extends BaseController {
/**
* 删除资产信息
*/
@PreAuthorize("@ss.hasPermi('lzbi:asset_info:remove')")
@PreAuthorize("@ss.hasPermi('lzbi:assetInfo:remove')")
@Log(title = "资产信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {

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

@ -1,8 +1,15 @@
package com.lzbi.special.controller;
import java.time.LocalDateTime;
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.special.domain.DcBaseWorkSpecial;
import com.lzbi.special.service.DcBaseWorkSpecialService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
@ -18,7 +25,6 @@ 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.special.domain.DcBaseWorkSpecialDao;
import com.lzbi.common.utils.poi.ExcelUtil;
import com.lzbi.common.core.page.TableDataInfo;
@ -40,10 +46,10 @@ public class DcBaseWorkSpecialController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('special:specialManager:list')")
@GetMapping("/list")
public TableDataInfo list(DcBaseWorkSpecialDao dcBaseWorkSpecialDao)
public TableDataInfo list(DcBaseWorkSpecial dcBaseWorkSpecial)
{
startPage();
List<DcBaseWorkSpecialDao> list = dcBaseWorkSpecialService.selectDcBaseWorkSpecialDaoList(dcBaseWorkSpecialDao);
List<DcBaseWorkSpecial> list = dcBaseWorkSpecialService.selectDcBaseWorkSpecialDaoList(dcBaseWorkSpecial);
return getDataTable(list);
}
@ -53,10 +59,10 @@ public class DcBaseWorkSpecialController extends BaseController
@PreAuthorize("@ss.hasPermi('special:specialManager:export')")
@Log(title = "生产专业管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, DcBaseWorkSpecialDao dcBaseWorkSpecialDao)
public void export(HttpServletResponse response, DcBaseWorkSpecial dcBaseWorkSpecial)
{
List<DcBaseWorkSpecialDao> list = dcBaseWorkSpecialService.selectDcBaseWorkSpecialDaoList(dcBaseWorkSpecialDao);
ExcelUtil<DcBaseWorkSpecialDao> util = new ExcelUtil<DcBaseWorkSpecialDao>(DcBaseWorkSpecialDao.class);
List<DcBaseWorkSpecial> list = dcBaseWorkSpecialService.selectDcBaseWorkSpecialDaoList(dcBaseWorkSpecial);
ExcelUtil<DcBaseWorkSpecial> util = new ExcelUtil<DcBaseWorkSpecial>(DcBaseWorkSpecial.class);
util.exportExcel(response, list, "生产专业管理数据");
}
@ -67,7 +73,7 @@ public class DcBaseWorkSpecialController extends BaseController
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(dcBaseWorkSpecialService.selectDcBaseWorkSpecialDaoById(id));
return success(dcBaseWorkSpecialService.selectDcBaseWorkSpecialById(id));
}
/**
@ -76,9 +82,9 @@ public class DcBaseWorkSpecialController extends BaseController
@PreAuthorize("@ss.hasPermi('special:specialManager:add')")
@Log(title = "生产专业管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DcBaseWorkSpecialDao dcBaseWorkSpecialDao)
public AjaxResult add(@RequestBody DcBaseWorkSpecial dcBaseWorkSpecial)
{
return toAjax(dcBaseWorkSpecialService.insertDcBaseWorkSpecialDao(dcBaseWorkSpecialDao));
return toAjax(dcBaseWorkSpecialService.insertDcBaseWorkSpecial(dcBaseWorkSpecial));
}
/**
@ -87,9 +93,9 @@ public class DcBaseWorkSpecialController extends BaseController
@PreAuthorize("@ss.hasPermi('special:specialManager:edit')")
@Log(title = "生产专业管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DcBaseWorkSpecialDao dcBaseWorkSpecialDao)
public AjaxResult edit(@RequestBody DcBaseWorkSpecial dcBaseWorkSpecial)
{
return toAjax(dcBaseWorkSpecialService.updateDcBaseWorkSpecialDao(dcBaseWorkSpecialDao));
return toAjax(dcBaseWorkSpecialService.updateDcBaseWorkSpecialDao(dcBaseWorkSpecial));
}
/**
@ -100,6 +106,79 @@ public class DcBaseWorkSpecialController extends BaseController
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(dcBaseWorkSpecialService.deleteDcBaseWorkSpecialDaoByIds(ids));
return toAjax(dcBaseWorkSpecialService.deleteDcBaseWorkSpecialByIds(ids));
}
/**
* 查询生产专业管理列表
*/
@PreAuthorize("@ss.hasPermi('special:specialManager:list')")
@GetMapping("/listNoPage")
public AjaxResult listNoPage(DcBaseWorkSpecial dcBaseWorkSpecial)
{
List<DcBaseWorkSpecial> list = dcBaseWorkSpecialService.selectDcBaseWorkSpecialDaoList(dcBaseWorkSpecial);
return AjaxResult.success(list);
}
/**
* 新增生产专业管理
*/
@PreAuthorize("@ss.hasPermi('special:specialManager:add')")
@Log(title = "生产专业管理", businessType = BusinessType.INSERT)
@PostMapping("/addBatch")
public AjaxResult addBatch(@RequestBody JSONArray jsonArray)
{
if (jsonArray == null) {
throw new IllegalArgumentException("未能接收任何参数!");
}
List<DcBaseWorkSpecial> beanList = new ArrayList<>();
try {
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject beanObject = jsonArray.getJSONObject(i);
// 移除ID属性
beanObject.remove("id");
DcBaseWorkSpecial dcBaseWorkSpecial = JSON.toJavaObject(beanObject, DcBaseWorkSpecial.class);
dcBaseWorkSpecial.setCreatedTime(DateUtils.getNowDate());
dcBaseWorkSpecial.setDeptId(getDeptId());
dcBaseWorkSpecial.setUserId(getUserId());
dcBaseWorkSpecial.setCreatedBy(String.valueOf(getUserId()));
dcBaseWorkSpecial.setCreatedTime(DateUtils.getNowDate());
beanList.add(dcBaseWorkSpecial);
}
} catch (Exception e) {
throw new IllegalArgumentException("解析list对象异常!");
}
return toAjax(dcBaseWorkSpecialService.saveBatch(beanList));
}
/**
* 修改生产专业管理
*/
@PreAuthorize("@ss.hasPermi('special:specialManager:edit')")
@Log(title = "生产专业管理", businessType = BusinessType.UPDATE)
@PutMapping("editBatch")
public AjaxResult editBatch(@RequestBody JSONArray jsonArray)
{
if (jsonArray == null) {
throw new IllegalArgumentException("未能接收任何参数!");
}
List<DcBaseWorkSpecial> dcBaseWorkSpecialList = new ArrayList<>();
try {
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject beanObject = jsonArray.getJSONObject(i);
DcBaseWorkSpecial dcBaseWorkSpecial = JSON.toJavaObject(beanObject, DcBaseWorkSpecial.class);
dcBaseWorkSpecial.setUpdatedBy(String.valueOf(getUserId()));
dcBaseWorkSpecial.setUpdatedTime(DateUtils.getNowDate());
dcBaseWorkSpecialList.add(dcBaseWorkSpecial);
}
} catch (Exception e) {
throw new IllegalArgumentException("解析list对象异常!");
}
return toAjax(dcBaseWorkSpecialService.updateBatchById(dcBaseWorkSpecialList));
}
}

7
lzbi-module/src/main/java/com/lzbi/special/domain/DcBaseWorkSpecialDao.java → lzbi-module/src/main/java/com/lzbi/special/domain/DcBaseWorkSpecial.java

@ -1,7 +1,9 @@
package com.lzbi.special.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.lzbi.common.annotation.Excel;
@ -13,7 +15,7 @@ import com.lzbi.module.base.BaseModuleEntity;
* @author win
* @date 2023-11-28
*/
public class DcBaseWorkSpecialDao extends BaseModuleEntity
public class DcBaseWorkSpecial extends BaseModuleEntity
{
private static final long serialVersionUID = 1L;
@ -41,6 +43,7 @@ public class DcBaseWorkSpecialDao extends BaseModuleEntity
/** 删除时间 */
private Date deleteTime;
@TableId(value = "id", type = IdType.AUTO)
/** 主键 */
private Long id;

38
lzbi-module/src/main/java/com/lzbi/special/service/DcBaseWorkSpecialService.java

@ -4,7 +4,7 @@ import java.util.List;
import com.lzbi.common.utils.DateUtils;
import org.springframework.stereotype.Service;
import com.lzbi.special.domain.DcBaseWorkSpecialDao;
import com.lzbi.special.domain.DcBaseWorkSpecial;
import com.lzbi.special.mapper.DcBaseWorkSpecialMapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -15,7 +15,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
* @date 2023-11-28
*/
@Service
public class DcBaseWorkSpecialService extends ServiceImpl<DcBaseWorkSpecialMapper, DcBaseWorkSpecialDao> implements IService<DcBaseWorkSpecialDao>
public class DcBaseWorkSpecialService extends ServiceImpl<DcBaseWorkSpecialMapper, DcBaseWorkSpecial> implements IService<DcBaseWorkSpecial>
{
@ -26,21 +26,21 @@ public class DcBaseWorkSpecialService extends ServiceImpl<DcBaseWorkSpecialMappe
* @return 生产专业管理
*/
public DcBaseWorkSpecialDao selectDcBaseWorkSpecialDaoById(Long id)
public DcBaseWorkSpecial selectDcBaseWorkSpecialById(Long id)
{
return baseMapper.selectDcBaseWorkSpecialDaoById(id);
return baseMapper.selectDcBaseWorkSpecialById(id);
}
/**
* 查询生产专业管理列表
*
* @param dcBaseWorkSpecialDao 生产专业管理
* @param dcBaseWorkSpecial 生产专业管理
* @return 生产专业管理
*/
public List<DcBaseWorkSpecialDao> selectDcBaseWorkSpecialDaoList(DcBaseWorkSpecialDao dcBaseWorkSpecialDao)
public List<DcBaseWorkSpecial> selectDcBaseWorkSpecialDaoList(DcBaseWorkSpecial dcBaseWorkSpecial)
{
return baseMapper.selectDcBaseWorkSpecialDaoList(dcBaseWorkSpecialDao);
return baseMapper.selectDcBaseWorkSpecialList(dcBaseWorkSpecial);
}
public List<DcBaseWorkSpecialDao> selectDcBaseWorkSpecialDaoDictList(DcBaseWorkSpecialDao dcBaseWorkSpecialDao)
{
@ -49,27 +49,27 @@ public class DcBaseWorkSpecialService extends ServiceImpl<DcBaseWorkSpecialMappe
/**
* 新增生产专业管理
*
* @param dcBaseWorkSpecialDao 生产专业管理
* @param dcBaseWorkSpecial 生产专业管理
* @return 结果
*/
public int insertDcBaseWorkSpecialDao(DcBaseWorkSpecialDao dcBaseWorkSpecialDao)
public int insertDcBaseWorkSpecial(DcBaseWorkSpecial dcBaseWorkSpecial)
{
dcBaseWorkSpecialDao.setCreatedTime(DateUtils.getNowDate());
return baseMapper.insertDcBaseWorkSpecialDao(dcBaseWorkSpecialDao);
dcBaseWorkSpecial.setCreatedTime(DateUtils.getNowDate());
return baseMapper.insertDcBaseWorkSpecial(dcBaseWorkSpecial);
}
/**
* 修改生产专业管理
*
* @param dcBaseWorkSpecialDao 生产专业管理
* @param dcBaseWorkSpecial 生产专业管理
* @return 结果
*/
public int updateDcBaseWorkSpecialDao(DcBaseWorkSpecialDao dcBaseWorkSpecialDao)
public int updateDcBaseWorkSpecialDao(DcBaseWorkSpecial dcBaseWorkSpecial)
{
dcBaseWorkSpecialDao.setUpdatedTime(DateUtils.getNowDate());
return baseMapper.updateDcBaseWorkSpecialDao(dcBaseWorkSpecialDao);
dcBaseWorkSpecial.setUpdatedTime(DateUtils.getNowDate());
return baseMapper.updateDcBaseWorkSpecial(dcBaseWorkSpecial);
}
/**
@ -79,9 +79,9 @@ public class DcBaseWorkSpecialService extends ServiceImpl<DcBaseWorkSpecialMappe
* @return 结果
*/
public int deleteDcBaseWorkSpecialDaoByIds(Long[] ids)
public int deleteDcBaseWorkSpecialByIds(Long[] ids)
{
return baseMapper.deleteDcBaseWorkSpecialDaoByIds(ids);
return baseMapper.deleteDcBaseWorkSpecialByIds(ids);
}
/**
@ -91,8 +91,8 @@ public class DcBaseWorkSpecialService extends ServiceImpl<DcBaseWorkSpecialMappe
* @return 结果
*/
public int deleteDcBaseWorkSpecialDaoById(Long id)
public int deleteDcBaseWorkSpecialById(Long id)
{
return baseMapper.deleteDcBaseWorkSpecialDaoById(id);
return baseMapper.deleteDcBaseWorkSpecialById(id);
}
}

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

@ -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);
}
}

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

@ -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);
}
}

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

@ -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;
}

43
lzbi-module/src/main/java/com/lzbi/targetFolder/domain/DcBaseTargetModelDao.java

@ -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;
}

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

@ -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);
}

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

@ -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);
}

95
lzbi-module/src/main/java/com/lzbi/targetFolder/service/DcBaseAssetTargetService.java

@ -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);
}
}

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

@ -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);
}
}

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

@ -1,6 +1,5 @@
package com.lzbi.task.service;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lzbi.task.domain.DcBusiWorkReadLog;
@ -11,13 +10,14 @@ import org.springframework.stereotype.Service;
import java.util.List;
/**
* 编码规则定义Service业务层处理
*
* @author win
* @date 2023-11-29
*/
@DS("workDB")
//@DS("workDB")
@Service
public class WorkParamReadService extends ServiceImpl<WorkParamReadMapper, WorkParamInfo> implements IService<WorkParamInfo>

143
lzbi-module/src/main/resources/mapper/targetFolder/DcBaseAssetTargetMapper.xml

@ -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>

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

@ -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…
Cancel
Save