Browse Source

结局冲突,并修改dao修饰的bean加资产指标基础界面开发测试版

develop
ljlong_2630 11 months ago
parent
commit
74cbd25a8b
  1. 1
      lzbi-module/src/main/java/com/lzbi/asset/domain/DcBaseAssetInfo.java
  2. 18
      lzbi-module/src/main/java/com/lzbi/bill/service/DcBusiPlanTargetMonthService.java
  3. 22
      lzbi-module/src/main/java/com/lzbi/common/SelectOptionsControl.java
  4. 8
      lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustDaySubService.java
  5. 1
      lzbi-module/src/main/java/com/lzbi/module/base/BaseModuleEntity.java
  6. 93
      lzbi-module/src/main/java/com/lzbi/targetFolder/controller/DcBaseAssetTargetController.java
  7. 15
      lzbi-module/src/main/java/com/lzbi/targetFolder/controller/DcBaseTargetModelController.java
  8. 60
      lzbi-module/src/main/java/com/lzbi/targetFolder/domain/DcBaseAssetTarget.java
  9. 23
      lzbi-module/src/main/java/com/lzbi/targetFolder/mapper/DcBaseAssetTargetMapper.java
  10. 38
      lzbi-module/src/main/java/com/lzbi/targetFolder/service/DcBaseAssetTargetService.java
  11. 137
      lzbi-module/src/main/resources/mapper/asset/DcBaseAssetInfoMapper.xml
  12. 55
      lzbi-module/src/main/resources/mapper/targetFolder/DcBaseAssetTargetMapper.xml

1
lzbi-module/src/main/java/com/lzbi/asset/domain/DcBaseAssetInfo.java

@ -13,7 +13,6 @@ import lombok.experimental.Accessors;
* @date 2023-11-27 * @date 2023-11-27
*/ */
@Data @Data
//@TableName("dc_base_work_special")
@Accessors(chain = true) @Accessors(chain = true)
public class DcBaseAssetInfo extends BaseModuleEntity { public class DcBaseAssetInfo extends BaseModuleEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

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

@ -9,7 +9,7 @@ import com.lzbi.common.utils.DateUtils;
import com.lzbi.special.domain.DcBaseWorkSpecial; import com.lzbi.special.domain.DcBaseWorkSpecial;
import com.lzbi.special.mapper.DcBaseWorkSpecialMapper; import com.lzbi.special.mapper.DcBaseWorkSpecialMapper;
import com.lzbi.system.service.impl.SysDeptServiceImpl; import com.lzbi.system.service.impl.SysDeptServiceImpl;
import com.lzbi.targetFolder.domain.DcBaseAssetTargetDao; import com.lzbi.targetFolder.domain.DcBaseAssetTarget;
import com.lzbi.targetFolder.mapper.DcBaseAssetTargetMapper; import com.lzbi.targetFolder.mapper.DcBaseAssetTargetMapper;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -94,10 +94,10 @@ public class DcBusiPlanTargetMonthService extends ServiceImpl<DcBusiPlanTargetMo
if (ObjectUtils.isNotEmpty(dcBaseAssetInfo)) { if (ObjectUtils.isNotEmpty(dcBaseAssetInfo)) {
dcBusiPlanTargetMonth.setAssetName(dcBaseAssetInfo.getAssetName()); dcBusiPlanTargetMonth.setAssetName(dcBaseAssetInfo.getAssetName());
} }
DcBaseAssetTargetDao dcBaseAssetTargetDao = dcBaseAssetTargetMapper.selectDcBaseAssetTargetDaoByTargetCodeAndAssetCode(dcBusiPlanTargetMonth.getTargetCode(), dcBusiPlanTargetMonth.getAssetCode()); DcBaseAssetTarget dcBaseAssetTarget = dcBaseAssetTargetMapper.selectDcBaseAssetTargetByTargetCodeAndAssetCode(dcBusiPlanTargetMonth.getTargetCode(), dcBusiPlanTargetMonth.getAssetCode());
if (ObjectUtils.isNotEmpty(dcBaseAssetTargetDao)) { if (ObjectUtils.isNotEmpty(dcBaseAssetTarget)) {
dcBusiPlanTargetMonth.setTargetNameDefine(dcBaseAssetTargetDao.getTargetName()); dcBusiPlanTargetMonth.setTargetNameDefine(dcBaseAssetTarget.getTargetName());
dcBusiPlanTargetMonth.setTargetNameAlias(dcBaseAssetTargetDao.getTargetNameAlias()); dcBusiPlanTargetMonth.setTargetNameAlias(dcBaseAssetTarget.getTargetNameAlias());
} }
dcBusiPlanTargetMonth.setCreatedTime(DateUtils.getNowDate()); dcBusiPlanTargetMonth.setCreatedTime(DateUtils.getNowDate());
@ -133,10 +133,10 @@ public class DcBusiPlanTargetMonthService extends ServiceImpl<DcBusiPlanTargetMo
if (ObjectUtils.isNotEmpty(dcBaseAssetInfo)) { if (ObjectUtils.isNotEmpty(dcBaseAssetInfo)) {
dcBusiPlanTargetMonth.setAssetName(dcBaseAssetInfo.getAssetName()); dcBusiPlanTargetMonth.setAssetName(dcBaseAssetInfo.getAssetName());
} }
DcBaseAssetTargetDao dcBaseAssetTargetDao = dcBaseAssetTargetMapper.selectDcBaseAssetTargetDaoByTargetCodeAndAssetCode(dcBusiPlanTargetMonth.getTargetCode(), dcBusiPlanTargetMonth.getAssetCode()); DcBaseAssetTarget dcBaseAssetTarget = dcBaseAssetTargetMapper.selectDcBaseAssetTargetByTargetCodeAndAssetCode(dcBusiPlanTargetMonth.getTargetCode(), dcBusiPlanTargetMonth.getAssetCode());
if (ObjectUtils.isNotEmpty(dcBaseAssetTargetDao)) { if (ObjectUtils.isNotEmpty(dcBaseAssetTarget)) {
dcBusiPlanTargetMonth.setTargetNameDefine(dcBaseAssetTargetDao.getTargetName()); dcBusiPlanTargetMonth.setTargetNameDefine(dcBaseAssetTarget.getTargetName());
dcBusiPlanTargetMonth.setTargetNameAlias(dcBaseAssetTargetDao.getTargetNameAlias()); dcBusiPlanTargetMonth.setTargetNameAlias(dcBaseAssetTarget.getTargetNameAlias());
} }
dcBusiPlanTargetMonth.setUpdatedTime(DateUtils.getNowDate()); dcBusiPlanTargetMonth.setUpdatedTime(DateUtils.getNowDate());
return baseMapper.updateDcBusiPlanTargetMonth(dcBusiPlanTargetMonth); return baseMapper.updateDcBusiPlanTargetMonth(dcBusiPlanTargetMonth);

22
lzbi-module/src/main/java/com/lzbi/common/SelectOptionsControl.java

@ -11,7 +11,7 @@ import com.lzbi.common.core.domain.entity.SysDept;
import com.lzbi.special.domain.DcBaseWorkSpecial; import com.lzbi.special.domain.DcBaseWorkSpecial;
import com.lzbi.special.service.DcBaseWorkSpecialService; import com.lzbi.special.service.DcBaseWorkSpecialService;
import com.lzbi.system.service.impl.SysDeptServiceImpl; import com.lzbi.system.service.impl.SysDeptServiceImpl;
import com.lzbi.targetFolder.domain.DcBaseAssetTargetDao; import com.lzbi.targetFolder.domain.DcBaseAssetTarget;
import com.lzbi.targetFolder.service.DcBaseAssetTargetService; import com.lzbi.targetFolder.service.DcBaseAssetTargetService;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -114,22 +114,22 @@ public class SelectOptionsControl extends BaseController {
@PostMapping("/assetTaget/list") @PostMapping("/assetTaget/list")
public AjaxResult getAssetTargetSelectList(@RequestBody AssetQueryParams assetQueryParams) public AjaxResult getAssetTargetSelectList(@RequestBody AssetQueryParams assetQueryParams)
{ {
DcBaseAssetTargetDao dcBaseAssetTargetDao=new DcBaseAssetTargetDao(); DcBaseAssetTarget dcBaseAssetTarget=new DcBaseAssetTarget();
dcBaseAssetTargetDao.setAssetCode(assetQueryParams.getAssetCode()); dcBaseAssetTarget.setAssetCode(assetQueryParams.getAssetCode());
dcBaseAssetTargetDao.setTargetField(assetQueryParams.getFieldCode()); dcBaseAssetTarget.setTargetField(assetQueryParams.getFieldCode());
dcBaseAssetTargetDao.setColumnType("T"); dcBaseAssetTarget.setColumnType("T");
//dcBaseAssetTargetDao.setAssetId(assetQueryParams.getAssetId()); //dcBaseAssetTargetDao.setAssetId(assetQueryParams.getAssetId());
return AjaxResult.success(dcBaseAssetTargetService.selectDcBaseAssetTargetDaoList(dcBaseAssetTargetDao)); return AjaxResult.success(dcBaseAssetTargetService.selectDcBaseAssetTargetList(dcBaseAssetTarget));
} }
@PostMapping("/assetParam/list") @PostMapping("/assetParam/list")
public AjaxResult getAssetParamSelectList(@RequestBody AssetQueryParams assetQueryParams) public AjaxResult getAssetParamSelectList(@RequestBody AssetQueryParams assetQueryParams)
{ {
DcBaseAssetTargetDao dcBaseAssetTargetDao=new DcBaseAssetTargetDao(); DcBaseAssetTarget dcBaseAssetTarget=new DcBaseAssetTarget();
dcBaseAssetTargetDao.setAssetCode(assetQueryParams.getAssetCode()); dcBaseAssetTarget.setAssetCode(assetQueryParams.getAssetCode());
dcBaseAssetTargetDao.setTargetField(assetQueryParams.getFieldCode()); dcBaseAssetTarget.setTargetField(assetQueryParams.getFieldCode());
dcBaseAssetTargetDao.setColumnType("P"); dcBaseAssetTarget.setColumnType("P");
//dcBaseAssetTargetDao.setAssetId(assetQueryParams.getAssetId()); //dcBaseAssetTargetDao.setAssetId(assetQueryParams.getAssetId());
return AjaxResult.success(dcBaseAssetTargetService.selectDcBaseAssetTargetDaoList(dcBaseAssetTargetDao)); return AjaxResult.success(dcBaseAssetTargetService.selectDcBaseAssetTargetList(dcBaseAssetTarget));
} }
// //
//获取IOT参数列表 //获取IOT参数列表

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

@ -4,7 +4,7 @@ import java.util.List;
import com.lzbi.common.utils.DateUtils; import com.lzbi.common.utils.DateUtils;
import com.lzbi.draft.domain.DcBusiTargetAdjustDaySubDao; import com.lzbi.draft.domain.DcBusiTargetAdjustDaySubDao;
import com.lzbi.draft.mapper.DcBusiTargetAdjustDaySubMapper; import com.lzbi.draft.mapper.DcBusiTargetAdjustDaySubMapper;
import com.lzbi.targetFolder.domain.DcBaseAssetTargetDao; import com.lzbi.targetFolder.domain.DcBaseAssetTarget;
import com.lzbi.targetFolder.mapper.DcBaseAssetTargetMapper; import com.lzbi.targetFolder.mapper.DcBaseAssetTargetMapper;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -59,9 +59,9 @@ public class DcBusiTargetAdjustDaySubService extends ServiceImpl<DcBusiTargetAdj
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public int insertDcBusiTargetAdjustDaySubDao(DcBusiTargetAdjustDaySubDao dcBusiTargetAdjustDaySubDao, String assetCode) public int insertDcBusiTargetAdjustDaySubDao(DcBusiTargetAdjustDaySubDao dcBusiTargetAdjustDaySubDao, String assetCode)
{ {
DcBaseAssetTargetDao dcBaseAssetTargetDao = dcBaseAssetTargetMapper.selectDcBaseAssetTargetDaoByTargetCodeAndAssetCode(dcBusiTargetAdjustDaySubDao.getTargetCode(), assetCode); DcBaseAssetTarget dcBaseAssetTarget = dcBaseAssetTargetMapper.selectDcBaseAssetTargetByTargetCodeAndAssetCode(dcBusiTargetAdjustDaySubDao.getTargetCode(), assetCode);
if (ObjectUtils.isNotEmpty(dcBaseAssetTargetDao)) { if (ObjectUtils.isNotEmpty(dcBaseAssetTarget)) {
dcBusiTargetAdjustDaySubDao.setTargetName(dcBaseAssetTargetDao.getTargetName()); dcBusiTargetAdjustDaySubDao.setTargetName(dcBaseAssetTarget.getTargetName());
} }
dcBusiTargetAdjustDaySubDao.setCreatedTime(DateUtils.getNowDate()); dcBusiTargetAdjustDaySubDao.setCreatedTime(DateUtils.getNowDate());
return baseMapper.insertDcBusiTargetAdjustDaySubDao(dcBusiTargetAdjustDaySubDao); return baseMapper.insertDcBusiTargetAdjustDaySubDao(dcBusiTargetAdjustDaySubDao);

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

@ -65,7 +65,6 @@ public class BaseModuleEntity implements Serializable, Cloneable {
*/ */
@ApiModelProperty(name = "删除时间", notes = "") @ApiModelProperty(name = "删除时间", notes = "")
private Date deleteTime; private Date deleteTime;
@ApiModelProperty("分页") @ApiModelProperty("分页")
private Integer pageNum; private Integer pageNum;
@ApiModelProperty("分页大小") @ApiModelProperty("分页大小")

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

@ -1,8 +1,14 @@
package com.lzbi.targetFolder.controller; package com.lzbi.targetFolder.controller;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; 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.DcBaseAssetTarget;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -17,7 +23,6 @@ import com.lzbi.common.annotation.Log;
import com.lzbi.common.core.controller.BaseController; import com.lzbi.common.core.controller.BaseController;
import com.lzbi.common.core.domain.AjaxResult; import com.lzbi.common.core.domain.AjaxResult;
import com.lzbi.common.enums.BusinessType; import com.lzbi.common.enums.BusinessType;
import com.lzbi.targetFolder.domain.DcBaseAssetTargetDao;
import com.lzbi.targetFolder.service.DcBaseAssetTargetService; import com.lzbi.targetFolder.service.DcBaseAssetTargetService;
import com.lzbi.common.utils.poi.ExcelUtil; import com.lzbi.common.utils.poi.ExcelUtil;
import com.lzbi.common.core.page.TableDataInfo; import com.lzbi.common.core.page.TableDataInfo;
@ -40,10 +45,10 @@ public class DcBaseAssetTargetController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('target:target:list')") @PreAuthorize("@ss.hasPermi('target:target:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(DcBaseAssetTargetDao dcBaseAssetTargetDao) public TableDataInfo list(DcBaseAssetTarget dcBaseAssetTarget)
{ {
startPage(); startPage();
List<DcBaseAssetTargetDao> list = dcBaseAssetTargetService.selectDcBaseAssetTargetDaoList(dcBaseAssetTargetDao); List<DcBaseAssetTarget> list = dcBaseAssetTargetService.selectDcBaseAssetTargetList(dcBaseAssetTarget);
return getDataTable(list); return getDataTable(list);
} }
@ -53,10 +58,10 @@ public class DcBaseAssetTargetController extends BaseController
@PreAuthorize("@ss.hasPermi('target:target:export')") @PreAuthorize("@ss.hasPermi('target:target:export')")
@Log(title = "资产指标配置", businessType = BusinessType.EXPORT) @Log(title = "资产指标配置", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, DcBaseAssetTargetDao dcBaseAssetTargetDao) public void export(HttpServletResponse response, DcBaseAssetTarget dcBaseAssetTarget)
{ {
List<DcBaseAssetTargetDao> list = dcBaseAssetTargetService.selectDcBaseAssetTargetDaoList(dcBaseAssetTargetDao); List<DcBaseAssetTarget> list = dcBaseAssetTargetService.selectDcBaseAssetTargetList(dcBaseAssetTarget);
ExcelUtil<DcBaseAssetTargetDao> util = new ExcelUtil<DcBaseAssetTargetDao>(DcBaseAssetTargetDao.class); ExcelUtil<DcBaseAssetTarget> util = new ExcelUtil<DcBaseAssetTarget>(DcBaseAssetTarget.class);
util.exportExcel(response, list, "资产指标配置数据"); util.exportExcel(response, list, "资产指标配置数据");
} }
@ -67,7 +72,7 @@ public class DcBaseAssetTargetController extends BaseController
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id)
{ {
return success(dcBaseAssetTargetService.selectDcBaseAssetTargetDaoById(id)); return success(dcBaseAssetTargetService.selectDcBaseAssetTargetById(id));
} }
/** /**
@ -76,9 +81,9 @@ public class DcBaseAssetTargetController extends BaseController
@PreAuthorize("@ss.hasPermi('target:target:add')") @PreAuthorize("@ss.hasPermi('target:target:add')")
@Log(title = "资产指标配置", businessType = BusinessType.INSERT) @Log(title = "资产指标配置", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody DcBaseAssetTargetDao dcBaseAssetTargetDao) public AjaxResult add(@RequestBody DcBaseAssetTarget dcBaseAssetTarget)
{ {
return toAjax(dcBaseAssetTargetService.insertDcBaseAssetTargetDao(dcBaseAssetTargetDao)); return toAjax(dcBaseAssetTargetService.insertDcBaseAssetTarget(dcBaseAssetTarget));
} }
/** /**
@ -87,9 +92,9 @@ public class DcBaseAssetTargetController extends BaseController
@PreAuthorize("@ss.hasPermi('target:target:edit')") @PreAuthorize("@ss.hasPermi('target:target:edit')")
@Log(title = "资产指标配置", businessType = BusinessType.UPDATE) @Log(title = "资产指标配置", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody DcBaseAssetTargetDao dcBaseAssetTargetDao) public AjaxResult edit(@RequestBody DcBaseAssetTarget dcBaseAssetTarget)
{ {
return toAjax(dcBaseAssetTargetService.updateDcBaseAssetTargetDao(dcBaseAssetTargetDao)); return toAjax(dcBaseAssetTargetService.updateDcBaseAssetTarget(dcBaseAssetTarget));
} }
/** /**
@ -100,7 +105,7 @@ public class DcBaseAssetTargetController extends BaseController
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids)
{ {
return toAjax(dcBaseAssetTargetService.deleteDcBaseAssetTargetDaoByIds(ids)); return toAjax(dcBaseAssetTargetService.deleteDcBaseAssetTargetByIds(ids));
} }
@ -109,11 +114,71 @@ public class DcBaseAssetTargetController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('target:target:list')") @PreAuthorize("@ss.hasPermi('target:target:list')")
@GetMapping("/listNoPage") @GetMapping("/listNoPage")
public AjaxResult listNoPage(DcBaseAssetTargetDao dcBaseAssetTargetDao) public AjaxResult listNoPage(DcBaseAssetTarget dcBaseAssetTarget)
{ {
List<DcBaseAssetTargetDao> list = dcBaseAssetTargetService.selectDcBaseAssetTargetDaoList(dcBaseAssetTargetDao); List<DcBaseAssetTarget> list = dcBaseAssetTargetService.selectDcBaseAssetTargetList(dcBaseAssetTarget);
return AjaxResult.success(list); return AjaxResult.success(list);
} }
/**
* 新增资产信息
*/
@PreAuthorize("@ss.hasPermi('lzbi:assetInfo:add')")
@Log(title = "资产信息", businessType = BusinessType.INSERT)
@PostMapping("/addBatch")
public AjaxResult addBatch(@RequestBody JSONArray jsonArray)
{
if (jsonArray == null) {
throw new IllegalArgumentException("未能接收任何参数!");
}
List<DcBaseAssetTarget> beanList = new ArrayList<>();
try {
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject beanObject = jsonArray.getJSONObject(i);
// 移除ID属性
beanObject.remove("id");
DcBaseAssetTarget dcBaseAssetTarget = JSON.toJavaObject(beanObject, DcBaseAssetTarget.class);
dcBaseAssetTarget.setCreatedTime(DateUtils.getNowDate());
dcBaseAssetTarget.setDeptId(getDeptId());
dcBaseAssetTarget.setUserId(getUserId());
dcBaseAssetTarget.setCreatedBy(String.valueOf(getUserId()));
dcBaseAssetTarget.setCreatedTime(DateUtils.getNowDate());
beanList.add(dcBaseAssetTarget);
}
} catch (Exception e) {
throw new IllegalArgumentException("解析list对象异常!");
}
return toAjax(dcBaseAssetTargetService.saveBatch(beanList));
}
/**
* 修改资产信息
*/
@PreAuthorize("@ss.hasPermi('lzbi:assetInfo:edit')")
@Log(title = "资产信息", businessType = BusinessType.UPDATE)
@PutMapping("/editBatch")
public AjaxResult editBatch(@RequestBody JSONArray jsonArray)
{
if (jsonArray == null) {
throw new IllegalArgumentException("未能接收任何参数!");
}
List<DcBaseAssetTarget> beanList = new ArrayList<>();
try {
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject beanObject = jsonArray.getJSONObject(i);
DcBaseAssetTarget dcBaseAssetTarget = JSON.toJavaObject(beanObject, DcBaseAssetTarget.class);
dcBaseAssetTarget.setUpdatedBy(String.valueOf(getUserId()));
dcBaseAssetTarget.setUpdatedTime(DateUtils.getNowDate());
beanList.add(dcBaseAssetTarget);
}
} catch (Exception e) {
throw new IllegalArgumentException("解析list对象异常!");
}
return toAjax(dcBaseAssetTargetService.updateBatchById(beanList));
}
} }

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

@ -197,6 +197,21 @@ public class DcBaseTargetModelController extends BaseController
} }
/**
* 查询指标模版配置列表
*/
@ApiOperation("查询指标模版配置列表")
@ApiImplicitParams({
@ApiImplicitParam(name = "DcBaseTargetModel", value = "", dataType = "DcBaseTargetModel", dataTypeClass = DcBaseTargetModel.class),
})
@PreAuthorize("@ss.hasPermi('target:targetModel:list')")
@GetMapping("/listNoPage")
public AjaxResult listNoPage(DcBaseTargetModel DcBaseTargetModel)
{
List< DcBaseTargetModel> list = dcBaseTargetModelService.selectDcBaseTargetModelList(DcBaseTargetModel);
return AjaxResult.success(list);
}
} }

60
lzbi-module/src/main/java/com/lzbi/targetFolder/domain/DcBaseAssetTargetDao.java → lzbi-module/src/main/java/com/lzbi/targetFolder/domain/DcBaseAssetTarget.java

@ -2,32 +2,29 @@ package com.lzbi.targetFolder.domain;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import com.lzbi.common.annotation.Excel; import com.lzbi.common.annotation.Excel;
import com.lzbi.module.base.BaseModuleEntity; import com.lzbi.module.base.BaseModuleEntity;
import lombok.experimental.Accessors;
/** /**
* 资产指标配置对象 dc_base_asset_target * 资产指标配置对象 dc_base_asset_target
* *
* @author Lu.JL * @author Lu.JL
* @date 2023-11-30 * @date 2023-12-14
*/ */
@Data @Data
@Accessors(chain = true) @Accessors(chain = true)
public class DcBaseAssetTargetDao extends BaseModuleEntity public class DcBaseAssetTarget extends BaseModuleEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
/** 主键 */
private Long id;
/** 资产ID */ /** 统计单元编码 */
@Excel(name = "资产ID") @Excel(name = "统计单元编码")
private String assetCode;
/** 统计单元ID */
@Excel(name = "统计单元ID")
private Long assetId; private Long assetId;
/** 指标模型编码 */ /** 指标模型编码 */
@ -38,6 +35,7 @@ public class DcBaseAssetTargetDao extends BaseModuleEntity
@Excel(name = "指标名称") @Excel(name = "指标名称")
private String targetName; private String targetName;
/** 指标别名 */
@Excel(name = "指标别名") @Excel(name = "指标别名")
private String targetNameAlias; private String targetNameAlias;
@ -73,32 +71,20 @@ public class DcBaseAssetTargetDao extends BaseModuleEntity
@Excel(name = "是否积算") @Excel(name = "是否积算")
private String flagCompute; private String flagCompute;
/** 排序 */ /** $column.columnComment */
@Excel(name = "排序") @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String sort; private String sort;
/** 统计单元编码 */ /** 所属专业名称 */
@Excel(name = "统计单元编码") @Excel(name = "所属专业名称")
private String assetCode;
//add by zhousq 2023-12-12
@ApiModelProperty("所属专业名称")
private String targetFieldName; private String targetFieldName;
@ApiModelProperty("单位")
private String fieldUnit;
@ApiModelProperty("字段类型")
private String columnType;
private String value;
private String label;
public String getValue() { /** T指标P参数 */
return this.targetCode; @Excel(name = "T指标P参数")
} private String columnType;
public String getLabel() {
return this.targetCode;
}
/** 单位 */
@Excel(name = "单位")
private String fieldUnit;
} }

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

@ -1,7 +1,8 @@
package com.lzbi.targetFolder.mapper; package com.lzbi.targetFolder.mapper;
import java.util.List; import java.util.List;
import com.lzbi.targetFolder.domain.DcBaseAssetTargetDao;
import com.lzbi.targetFolder.domain.DcBaseAssetTarget;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -14,7 +15,7 @@ import org.apache.ibatis.annotations.Param;
*/ */
@Mapper @Mapper
public interface DcBaseAssetTargetMapper extends BaseMapper<DcBaseAssetTargetDao> public interface DcBaseAssetTargetMapper extends BaseMapper<DcBaseAssetTarget>
{ {
/** /**
* 查询资产指标配置 * 查询资产指标配置
@ -22,7 +23,7 @@ public interface DcBaseAssetTargetMapper extends BaseMapper<DcBaseAssetTargetDao
* @param id 资产指标配置主键 * @param id 资产指标配置主键
* @return 资产指标配置 * @return 资产指标配置
*/ */
public DcBaseAssetTargetDao selectDcBaseAssetTargetDaoById(Long id); public DcBaseAssetTarget selectDcBaseAssetTargetById(Long id);
/** /**
* 查询资产指标配置 * 查询资产指标配置
* *
@ -30,24 +31,24 @@ public interface DcBaseAssetTargetMapper extends BaseMapper<DcBaseAssetTargetDao
* @param assetCode 统计单元编码 * @param assetCode 统计单元编码
* @return 资产指标配置 * @return 资产指标配置
*/ */
public DcBaseAssetTargetDao selectDcBaseAssetTargetDaoByTargetCodeAndAssetCode(@Param("targetCode") String targetCode, @Param("assetCode") String assetCode); public DcBaseAssetTarget selectDcBaseAssetTargetByTargetCodeAndAssetCode(@Param("targetCode") String targetCode, @Param("assetCode") String assetCode);
/** /**
* 查询资产指标配置列表 * 查询资产指标配置列表
* *
* @param dcBaseAssetTargetDao 资产指标配置 * @param dcBaseAssetTarget 资产指标配置
* @return 资产指标配置集合 * @return 资产指标配置集合
*/ */
public List<DcBaseAssetTargetDao> selectDcBaseAssetTargetDaoList(DcBaseAssetTargetDao dcBaseAssetTargetDao); public List<DcBaseAssetTarget> selectDcBaseAssetTargetList(DcBaseAssetTarget dcBaseAssetTarget);
/** /**
* 新增资产指标配置 * 新增资产指标配置
* *
* @param dcBaseAssetTargetDao 资产指标配置 * @param dcBaseAssetTarget 资产指标配置
* @return 结果 * @return 结果
*/ */
public int insertDcBaseAssetTargetDao(DcBaseAssetTargetDao dcBaseAssetTargetDao); public int insertDcBaseAssetTarget(DcBaseAssetTarget dcBaseAssetTarget);
/** /**
* 修改资产指标配置 * 修改资产指标配置
@ -55,7 +56,7 @@ public interface DcBaseAssetTargetMapper extends BaseMapper<DcBaseAssetTargetDao
* @param dcBaseAssetTarget 资产指标配置 * @param dcBaseAssetTarget 资产指标配置
* @return 结果 * @return 结果
*/ */
public int updateDcBaseAssetTargetDao(DcBaseAssetTargetDao dcBaseAssetTargetDao); public int updateDcBaseAssetTarget(DcBaseAssetTarget dcBaseAssetTarget);
/** /**
* 删除资产指标配置 * 删除资产指标配置
@ -63,7 +64,7 @@ public interface DcBaseAssetTargetMapper extends BaseMapper<DcBaseAssetTargetDao
* @param id 资产指标配置主键 * @param id 资产指标配置主键
* @return 结果 * @return 结果
*/ */
public int deleteDcBaseAssetTargetDaoById(Long id); public int deleteDcBaseAssetTargetById(Long id);
/** /**
* 批量删除资产指标配置 * 批量删除资产指标配置
@ -71,5 +72,5 @@ public interface DcBaseAssetTargetMapper extends BaseMapper<DcBaseAssetTargetDao
* @param ids 需要删除的数据主键集合 * @param ids 需要删除的数据主键集合
* @return 结果 * @return 结果
*/ */
public int deleteDcBaseAssetTargetDaoByIds(Long[] ids); public int deleteDcBaseAssetTargetByIds(Long[] ids);
} }

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

@ -3,9 +3,9 @@ package com.lzbi.targetFolder.service;
import java.util.List; import java.util.List;
import com.lzbi.common.utils.DateUtils; import com.lzbi.common.utils.DateUtils;
import com.lzbi.targetFolder.domain.DcBaseAssetTarget;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.lzbi.targetFolder.domain.DcBaseAssetTargetDao;
import com.lzbi.targetFolder.mapper.DcBaseAssetTargetMapper; import com.lzbi.targetFolder.mapper.DcBaseAssetTargetMapper;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -16,7 +16,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
* @date 2023-11-30 * @date 2023-11-30
*/ */
@Service @Service
public class DcBaseAssetTargetService extends ServiceImpl<DcBaseAssetTargetMapper, DcBaseAssetTargetDao> implements IService<DcBaseAssetTargetDao> public class DcBaseAssetTargetService extends ServiceImpl<DcBaseAssetTargetMapper, DcBaseAssetTarget> implements IService<DcBaseAssetTarget>
{ {
@Autowired @Autowired
private DcBaseAssetTargetMapper dcBaseAssetTargetMapper; private DcBaseAssetTargetMapper dcBaseAssetTargetMapper;
@ -27,46 +27,46 @@ public class DcBaseAssetTargetService extends ServiceImpl<DcBaseAssetTargetMappe
* @param id 资产指标配置主键 * @param id 资产指标配置主键
* @return 资产指标配置 * @return 资产指标配置
*/ */
public DcBaseAssetTargetDao selectDcBaseAssetTargetDaoById(Long id) public DcBaseAssetTarget selectDcBaseAssetTargetById(Long id)
{ {
return dcBaseAssetTargetMapper.selectDcBaseAssetTargetDaoById(id); return dcBaseAssetTargetMapper.selectDcBaseAssetTargetById(id);
} }
/** /**
* 查询资产指标配置列表 * 查询资产指标配置列表
* *
* @param dcBaseAssetTargetDao 资产指标配置 * @param dcBaseAssetTarget 资产指标配置
* @return 资产指标配置 * @return 资产指标配置
*/ */
public List<DcBaseAssetTargetDao> selectDcBaseAssetTargetDaoList(DcBaseAssetTargetDao dcBaseAssetTargetDao) public List<DcBaseAssetTarget> selectDcBaseAssetTargetList(DcBaseAssetTarget dcBaseAssetTarget)
{ {
return dcBaseAssetTargetMapper.selectDcBaseAssetTargetDaoList(dcBaseAssetTargetDao); return dcBaseAssetTargetMapper.selectDcBaseAssetTargetList(dcBaseAssetTarget);
} }
/** /**
* 新增资产指标配置 * 新增资产指标配置
* *
* @param dcBaseAssetTargetDao 资产指标配置 * @param dcBaseAssetTarget 资产指标配置
* @return 结果 * @return 结果
*/ */
public int insertDcBaseAssetTargetDao(DcBaseAssetTargetDao dcBaseAssetTargetDao) public int insertDcBaseAssetTarget(DcBaseAssetTarget dcBaseAssetTarget)
{ {
dcBaseAssetTargetDao.setCreatedTime(DateUtils.getNowDate()); dcBaseAssetTarget.setCreatedTime(DateUtils.getNowDate());
return dcBaseAssetTargetMapper.insertDcBaseAssetTargetDao(dcBaseAssetTargetDao); return dcBaseAssetTargetMapper.insertDcBaseAssetTarget(dcBaseAssetTarget);
} }
/** /**
* 修改资产指标配置 * 修改资产指标配置
* *
* @param dcBaseAssetTargetDao 资产指标配置 * @param dcBaseAssetTarget 资产指标配置
* @return 结果 * @return 结果
*/ */
public int updateDcBaseAssetTargetDao(DcBaseAssetTargetDao dcBaseAssetTargetDao) public int updateDcBaseAssetTarget(DcBaseAssetTarget dcBaseAssetTarget)
{ {
dcBaseAssetTargetDao.setUpdatedTime(DateUtils.getNowDate()); dcBaseAssetTarget.setUpdatedTime(DateUtils.getNowDate());
return dcBaseAssetTargetMapper.updateDcBaseAssetTargetDao(dcBaseAssetTargetDao); return dcBaseAssetTargetMapper.updateDcBaseAssetTarget(dcBaseAssetTarget);
} }
/** /**
@ -76,9 +76,9 @@ public class DcBaseAssetTargetService extends ServiceImpl<DcBaseAssetTargetMappe
* @return 结果 * @return 结果
*/ */
public int deleteDcBaseAssetTargetDaoByIds(Long[] ids) public int deleteDcBaseAssetTargetByIds(Long[] ids)
{ {
return dcBaseAssetTargetMapper.deleteDcBaseAssetTargetDaoByIds(ids); return dcBaseAssetTargetMapper.deleteDcBaseAssetTargetByIds(ids);
} }
/** /**
@ -88,8 +88,8 @@ public class DcBaseAssetTargetService extends ServiceImpl<DcBaseAssetTargetMappe
* @return 结果 * @return 结果
*/ */
public int deleteDcBaseAssetTargetDaoById(Long id) public int deleteDcBaseAssetTargetById(Long id)
{ {
return dcBaseAssetTargetMapper.deleteDcBaseAssetTargetDaoById(id); return dcBaseAssetTargetMapper.deleteDcBaseAssetTargetById(id);
} }
} }

137
lzbi-module/src/main/resources/mapper/asset/DcBaseAssetInfoMapper.xml

@ -4,94 +4,64 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.lzbi.asset.mapper.DcBaseAssetInfoMapper"> <mapper namespace="com.lzbi.asset.mapper.DcBaseAssetInfoMapper">
<resultMap type="DcBaseAssetInfo" id="DcBaseAssetInfoResult"> <resultMap type="com.lzbi.asset.domain.DcBaseAssetInfo" id="DcBaseAssetInfoResult">
<result property="tenantId" column="TENANT_ID"/> <result property="tenantId" column="tenant_id" />
<result property="REVISION" column="REVISION"/> <result property="revision" column="revision" />
<result property="createdBy" column="CREATED_BY"/> <result property="createdBy" column="created_by" />
<result property="createdTime" column="CREATED_TIME"/> <result property="createdTime" column="created_time" />
<result property="updatedBy" column="UPDATED_BY"/> <result property="updatedBy" column="updated_by" />
<result property="updatedTime" column="UPDATED_TIME"/> <result property="updatedTime" column="updated_time" />
<result property="deleteBy" column="DELETE_BY"/> <result property="deleteBy" column="delete_by" />
<result property="deleteTime" column="DELETE_TIME"/> <result property="deleteTime" column="delete_time" />
<result property="id" column="id"/> <result property="id" column="id" />
<result property="assetName" column="asset_name"/> <result property="assetName" column="asset_name" />
<result property="assetCode" column="asset_code"/> <result property="assetCode" column="asset_code" />
<result property="assetClass" column="asset_class"/> <result property="assetClass" column="asset_class" />
<result property="flagValidateDept" column="flag_validate_dept"/> <result property="flagValidateDept" column="flag_validate_dept" />
<result property="flagValidateRole" column="flag_validate_role"/> <result property="flagValidateRole" column="flag_validate_role" />
<result property="flagValidateUser" column="flag_validate_user"/> <result property="flagValidateUser" column="flag_validate_user" />
<result property="statusAsset" column="status_asset"/> <result property="statusAsset" column="status_asset" />
<result property="comanyId" column="comany_id"/> <result property="comanyId" column="comany_id" />
<result property="deptId" column="dept_id"/> <result property="deptId" column="dept_id" />
<result property="userId" column="user_id" />
</resultMap> </resultMap>
<sql id="selectDcBaseAssetInfoVo"> <sql id="selectDcBaseAssetInfoVo">
select TENANT_ID, select tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time, id, asset_name, asset_code, asset_class, flag_validate_dept, flag_validate_role, flag_validate_user, status_asset, comany_id, dept_id, user_id from dc_base_asset_info
REVISION,
CREATED_BY,
CREATED_TIME,
UPDATED_BY,
UPDATED_TIME,
DELETE_BY,
DELETE_TIME,
id,
asset_name,
asset_code,
asset_class,
flag_validate_dept,
flag_validate_role,
flag_validate_user,
status_asset,
comany_id,
dept_id
from dc_base_asset_info
</sql> </sql>
<select id="selectDcBaseAssetInfoList" parameterType="DcBaseAssetInfo" resultMap="DcBaseAssetInfoResult"> <select id="selectDcBaseAssetInfoList" parameterType="DcBaseAssetInfo" resultMap="DcBaseAssetInfoResult">
<include refid="selectDcBaseAssetInfoVo"/> <include refid="selectDcBaseAssetInfoVo"/>
<where> <where>
<if test="assetName != null and assetName != ''">and asset_name like concat('%', #{assetName}, '%')</if> <if test="assetName != null and assetName != ''"> and asset_name like concat('%', #{assetName}, '%')</if>
<if test="assetCode != null and assetCode != ''">and asset_code = #{assetCode}</if> <if test="assetCode != null and assetCode != ''"> and asset_code = #{assetCode}</if>
<if test="assetClass != null and assetClass != ''">and asset_class = #{assetClass}</if> <if test="assetClass != null and assetClass != ''"> and asset_class = #{assetClass}</if>
<if test="flagValidateDept != null and flagValidateDept != ''">and flag_validate_dept = <if test="flagValidateDept != null and flagValidateDept != ''"> and flag_validate_dept = #{flagValidateDept}</if>
#{flagValidateDept} <if test="flagValidateRole != null and flagValidateRole != ''"> and flag_validate_role = #{flagValidateRole}</if>
</if> <if test="flagValidateUser != null and flagValidateUser != ''"> and flag_validate_user = #{flagValidateUser}</if>
<if test="flagValidateRole != null and flagValidateRole != ''">and flag_validate_role = <if test="statusAsset != null and statusAsset != ''"> and status_asset = #{statusAsset}</if>
#{flagValidateRole} <if test="comanyId != null "> and comany_id = #{comanyId}</if>
</if> <if test="deptId != null "> and dept_id = #{deptId}</if>
<if test="flagValidateUser != null and flagValidateUser != ''">and flag_validate_user = <if test="userId != null "> and user_id = #{userId}</if>
#{flagValidateUser}
</if>
<if test="statusAsset != null and statusAsset != ''">and status_asset = #{statusAsset}</if>
<if test="comanyId != null ">and comany_id = #{comanyId}</if>
<if test="deptId != null ">and dept_id = #{deptId}</if>
</where> </where>
</select> </select>
<select id="selectDcBaseAssetInfoById" parameterType="Long" resultMap="DcBaseAssetInfoResult"> <select id="selectDcBaseAssetInfoById" parameterType="Long" resultMap="DcBaseAssetInfoResult">
<include refid="selectDcBaseAssetInfoVo"/> <include refid="selectDcBaseAssetInfoVo"/>
where id = #{id} where id = #{id}
</select> </select>
<select id="selectDcBaseAssetInfoByCode" parameterType="String" resultMap="DcBaseAssetInfoResult">
<include refid="selectDcBaseAssetInfoVo"/>
where asset_code = #{assetCode}
</select>
<!--add by zhousq 2023-12-12 -->
<select id="selectDcBaseAssetInfoMap" resultType="hashmap">
select asset_code,
asset_name
from dc_base_asset_info
</select>
<insert id="insertDcBaseAssetInfo" parameterType="DcBaseAssetInfo" useGeneratedKeys="true" keyProperty="id"> <insert id="insertDcBaseAssetInfo" parameterType="DcBaseAssetInfo" useGeneratedKeys="true" keyProperty="id">
insert into dc_base_asset_info insert into dc_base_asset_info
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="tenantId != null">TENANT_ID,</if> <if test="tenantId != null">tenant_id,</if>
<if test="REVISION != null">REVISION,</if> <if test="revision != null">revision,</if>
<if test="createdBy != null">CREATED_BY,</if> <if test="createdBy != null">created_by,</if>
<if test="createdTime != null">CREATED_TIME,</if> <if test="createdTime != null">created_time,</if>
<if test="updatedBy != null">UPDATED_BY,</if> <if test="updatedBy != null">updated_by,</if>
<if test="updatedTime != null">UPDATED_TIME,</if> <if test="updatedTime != null">updated_time,</if>
<if test="deleteBy != null">DELETE_BY,</if> <if test="deleteBy != null">delete_by,</if>
<if test="deleteTime != null">DELETE_TIME,</if> <if test="deleteTime != null">delete_time,</if>
<if test="assetName != null and assetName != ''">asset_name,</if> <if test="assetName != null and assetName != ''">asset_name,</if>
<if test="assetCode != null and assetCode != ''">asset_code,</if> <if test="assetCode != null and assetCode != ''">asset_code,</if>
<if test="assetClass != null and assetClass != ''">asset_class,</if> <if test="assetClass != null and assetClass != ''">asset_class,</if>
@ -101,10 +71,11 @@
<if test="statusAsset != null">status_asset,</if> <if test="statusAsset != null">status_asset,</if>
<if test="comanyId != null">comany_id,</if> <if test="comanyId != null">comany_id,</if>
<if test="deptId != null">dept_id,</if> <if test="deptId != null">dept_id,</if>
<if test="userId != null">user_id,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="tenantId != null">#{tenantId},</if> <if test="tenantId != null">#{tenantId},</if>
<if test="REVISION != null">#{REVISION},</if> <if test="revision != null">#{revision},</if>
<if test="createdBy != null">#{createdBy},</if> <if test="createdBy != null">#{createdBy},</if>
<if test="createdTime != null">#{createdTime},</if> <if test="createdTime != null">#{createdTime},</if>
<if test="updatedBy != null">#{updatedBy},</if> <if test="updatedBy != null">#{updatedBy},</if>
@ -120,20 +91,21 @@
<if test="statusAsset != null">#{statusAsset},</if> <if test="statusAsset != null">#{statusAsset},</if>
<if test="comanyId != null">#{comanyId},</if> <if test="comanyId != null">#{comanyId},</if>
<if test="deptId != null">#{deptId},</if> <if test="deptId != null">#{deptId},</if>
<if test="userId != null">#{userId},</if>
</trim> </trim>
</insert> </insert>
<update id="updateDcBaseAssetInfo" parameterType="DcBaseAssetInfo"> <update id="updateDcBaseAssetInfo" parameterType="DcBaseAssetInfo">
update dc_base_asset_info update dc_base_asset_info
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="tenantId != null">TENANT_ID = #{tenantId},</if> <if test="tenantId != null">tenant_id = #{tenantId},</if>
<if test="REVISION != null">REVISION = #{REVISION},</if> <if test="revision != null">revision = #{revision},</if>
<if test="createdBy != null">CREATED_BY = #{createdBy},</if> <if test="createdBy != null">created_by = #{createdBy},</if>
<if test="createdTime != null">CREATED_TIME = #{createdTime},</if> <if test="createdTime != null">created_time = #{createdTime},</if>
<if test="updatedBy != null">UPDATED_BY = #{updatedBy},</if> <if test="updatedBy != null">updated_by = #{updatedBy},</if>
<if test="updatedTime != null">UPDATED_TIME = #{updatedTime},</if> <if test="updatedTime != null">updated_time = #{updatedTime},</if>
<if test="deleteBy != null">DELETE_BY = #{deleteBy},</if> <if test="deleteBy != null">delete_by = #{deleteBy},</if>
<if test="deleteTime != null">DELETE_TIME = #{deleteTime},</if> <if test="deleteTime != null">delete_time = #{deleteTime},</if>
<if test="assetName != null and assetName != ''">asset_name = #{assetName},</if> <if test="assetName != null and assetName != ''">asset_name = #{assetName},</if>
<if test="assetCode != null and assetCode != ''">asset_code = #{assetCode},</if> <if test="assetCode != null and assetCode != ''">asset_code = #{assetCode},</if>
<if test="assetClass != null and assetClass != ''">asset_class = #{assetClass},</if> <if test="assetClass != null and assetClass != ''">asset_class = #{assetClass},</if>
@ -143,14 +115,13 @@
<if test="statusAsset != null">status_asset = #{statusAsset},</if> <if test="statusAsset != null">status_asset = #{statusAsset},</if>
<if test="comanyId != null">comany_id = #{comanyId},</if> <if test="comanyId != null">comany_id = #{comanyId},</if>
<if test="deptId != null">dept_id = #{deptId},</if> <if test="deptId != null">dept_id = #{deptId},</if>
<if test="userId != null">user_id = #{userId},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>
<delete id="deleteDcBaseAssetInfoById" parameterType="Long"> <delete id="deleteDcBaseAssetInfoById" parameterType="Long">
delete delete from dc_base_asset_info where id = #{id}
from dc_base_asset_info
where id = #{id}
</delete> </delete>
<delete id="deleteDcBaseAssetInfoByIds" parameterType="String"> <delete id="deleteDcBaseAssetInfoByIds" parameterType="String">

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

@ -3,13 +3,14 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.lzbi.targetFolder.mapper.DcBaseAssetTargetMapper"> <mapper namespace="com.lzbi.targetFolder.mapper.DcBaseAssetTargetMapper">
<resultMap type="com.lzbi.targetFolder.domain.DcBaseAssetTargetDao" id="DcBaseAssetTargetResult"> <resultMap type="com.lzbi.targetFolder.domain.DcBaseAssetTarget" id="DcBaseAssetTargetResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="assetId" column="asset_id" />
<result property="assetCode" column="asset_code" /> <result property="assetCode" column="asset_code" />
<result property="assetId" column="asset_id" />
<result property="targetModelCode" column="target_model_code" /> <result property="targetModelCode" column="target_model_code" />
<result property="targetName" column="target_name" /> <result property="targetName" column="target_name" />
<result property="targetNameAlias" column="target_name_alias" />
<result property="targetCode" column="target_code" /> <result property="targetCode" column="target_code" />
<result property="targetField" column="target_field" /> <result property="targetField" column="target_field" />
<result property="limitUp" column="limit_up" /> <result property="limitUp" column="limit_up" />
@ -18,7 +19,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="flagAvg" column="flag_avg" /> <result property="flagAvg" column="flag_avg" />
<result property="flagSum" column="flag_sum" /> <result property="flagSum" column="flag_sum" />
<result property="flagCompute" column="flag_compute" /> <result property="flagCompute" column="flag_compute" />
<result property="sort" column="sort" />
<result property="tenantId" column="tenant_id" /> <result property="tenantId" column="tenant_id" />
<result property="revision" column="revision" /> <result property="revision" column="revision" />
<result property="createdBy" column="created_by" /> <result property="createdBy" column="created_by" />
@ -27,19 +27,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updatedTime" column="updated_time" /> <result property="updatedTime" column="updated_time" />
<result property="deleteBy" column="delete_by" /> <result property="deleteBy" column="delete_by" />
<result property="deleteTime" column="delete_time" /> <result property="deleteTime" column="delete_time" />
<result property="sort" column="sort" />
<result property="targetFieldName" column="target_field_name" /> <result property="targetFieldName" column="target_field_name" />
<result property="fieldUnit" column="field_unit" />
<result property="columnType" column="column_type" /> <result property="columnType" column="column_type" />
<result property="fieldUnit" column="field_unit" />
</resultMap> </resultMap>
<sql id="selectDcBaseAssetTargetVo"> <sql id="selectDcBaseAssetTargetVo">
select id, asset_id,asset_code, 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,target_field_name select id, asset_code, asset_id, target_model_code, target_name, target_name_alias, target_code, target_field, limit_up, limit_down, value_base, flag_avg, flag_sum, flag_compute, tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time, sort, target_field_name, column_type, field_unit from dc_base_asset_target
value_type,
field_unit
from dc_base_asset_target
</sql> </sql>
<select id="selectDcBaseAssetTargetDaoList" parameterType="DcBaseAssetTargetDao" resultMap="DcBaseAssetTargetResult"> <select id="selectDcBaseAssetTargetList" parameterType="DcBaseAssetTarget" resultMap="DcBaseAssetTargetResult">
<include refid="selectDcBaseAssetTargetVo"/> <include refid="selectDcBaseAssetTargetVo"/>
<where> <where>
<if test="assetId != null "> and asset_id = #{assetId}</if> <if test="assetId != null "> and asset_id = #{assetId}</if>
@ -53,17 +51,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="selectDcBaseAssetTargetDaoById" parameterType="Long" resultMap="DcBaseAssetTargetResult"> <select id="selectDcBaseAssetTargetById" parameterType="Long" resultMap="DcBaseAssetTargetResult">
<include refid="selectDcBaseAssetTargetVo"/> <include refid="selectDcBaseAssetTargetVo"/>
where id = #{id} where id = #{id}
</select> </select>
<insert id="insertDcBaseAssetTargetDao" parameterType="DcBaseAssetTargetDao" useGeneratedKeys="true" keyProperty="id"> <insert id="insertDcBaseAssetTarget" parameterType="DcBaseAssetTarget" useGeneratedKeys="true" keyProperty="id">
insert into dc_base_asset_target insert into dc_base_asset_target
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="assetCode != null">asset_code,</if>
<if test="assetId != null">asset_id,</if> <if test="assetId != null">asset_id,</if>
<if test="targetModelCode != null">target_model_code,</if> <if test="targetModelCode != null">target_model_code,</if>
<if test="targetName != null">target_name,</if> <if test="targetName != null">target_name,</if>
<if test="targetNameAlias != null">target_name_alias,</if>
<if test="targetCode != null">target_code,</if> <if test="targetCode != null">target_code,</if>
<if test="targetField != null">target_field,</if> <if test="targetField != null">target_field,</if>
<if test="limitUp != null">limit_up,</if> <if test="limitUp != null">limit_up,</if>
@ -72,7 +72,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="flagAvg != null">flag_avg,</if> <if test="flagAvg != null">flag_avg,</if>
<if test="flagSum != null">flag_sum,</if> <if test="flagSum != null">flag_sum,</if>
<if test="flagCompute != null">flag_compute,</if> <if test="flagCompute != null">flag_compute,</if>
<if test="sort != null">sort,</if>
<if test="tenantId != null">tenant_id,</if> <if test="tenantId != null">tenant_id,</if>
<if test="revision != null">revision,</if> <if test="revision != null">revision,</if>
<if test="createdBy != null">created_by,</if> <if test="createdBy != null">created_by,</if>
@ -81,11 +80,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updatedTime != null">updated_time,</if> <if test="updatedTime != null">updated_time,</if>
<if test="deleteBy != null">delete_by,</if> <if test="deleteBy != null">delete_by,</if>
<if test="deleteTime != null">delete_time,</if> <if test="deleteTime != null">delete_time,</if>
</trim> <if test="sort != null">sort,</if>
<if test="targetFieldName != null">target_field_name,</if>
<if test="columnType != null">column_type,</if>
<if test="fieldUnit != null">field_unit,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="assetCode != null">#{assetCode},</if>
<if test="assetId != null">#{assetId},</if> <if test="assetId != null">#{assetId},</if>
<if test="targetModelCode != null">#{targetModelCode},</if> <if test="targetModelCode != null">#{targetModelCode},</if>
<if test="targetName != null">#{targetName},</if> <if test="targetName != null">#{targetName},</if>
<if test="targetNameAlias != null">#{targetNameAlias},</if>
<if test="targetCode != null">#{targetCode},</if> <if test="targetCode != null">#{targetCode},</if>
<if test="targetField != null">#{targetField},</if> <if test="targetField != null">#{targetField},</if>
<if test="limitUp != null">#{limitUp},</if> <if test="limitUp != null">#{limitUp},</if>
@ -94,7 +99,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="flagAvg != null">#{flagAvg},</if> <if test="flagAvg != null">#{flagAvg},</if>
<if test="flagSum != null">#{flagSum},</if> <if test="flagSum != null">#{flagSum},</if>
<if test="flagCompute != null">#{flagCompute},</if> <if test="flagCompute != null">#{flagCompute},</if>
<if test="sort != null">#{sort},</if>
<if test="tenantId != null">#{tenantId},</if> <if test="tenantId != null">#{tenantId},</if>
<if test="revision != null">#{revision},</if> <if test="revision != null">#{revision},</if>
<if test="createdBy != null">#{createdBy},</if> <if test="createdBy != null">#{createdBy},</if>
@ -103,15 +107,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updatedTime != null">#{updatedTime},</if> <if test="updatedTime != null">#{updatedTime},</if>
<if test="deleteBy != null">#{deleteBy},</if> <if test="deleteBy != null">#{deleteBy},</if>
<if test="deleteTime != null">#{deleteTime},</if> <if test="deleteTime != null">#{deleteTime},</if>
</trim> <if test="sort != null">#{sort},</if>
<if test="targetFieldName != null">#{targetFieldName},</if>
<if test="columnType != null">#{columnType},</if>
<if test="fieldUnit != null">#{fieldUnit},</if>
</trim>
</insert> </insert>
<update id="updateDcBaseAssetTargetDao" parameterType="DcBaseAssetTargetDao"> <update id="updateDcBaseAssetTarget" parameterType="DcBaseAssetTarget">
update dc_base_asset_target update dc_base_asset_target
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="assetCode != null">asset_code = #{assetCode},</if>
<if test="assetId != null">asset_id = #{assetId},</if> <if test="assetId != null">asset_id = #{assetId},</if>
<if test="targetModelCode != null">target_model_code = #{targetModelCode},</if> <if test="targetModelCode != null">target_model_code = #{targetModelCode},</if>
<if test="targetName != null">target_name = #{targetName},</if> <if test="targetName != null">target_name = #{targetName},</if>
<if test="targetNameAlias != null">target_name_alias = #{targetNameAlias},</if>
<if test="targetCode != null">target_code = #{targetCode},</if> <if test="targetCode != null">target_code = #{targetCode},</if>
<if test="targetField != null">target_field = #{targetField},</if> <if test="targetField != null">target_field = #{targetField},</if>
<if test="limitUp != null">limit_up = #{limitUp},</if> <if test="limitUp != null">limit_up = #{limitUp},</if>
@ -120,7 +130,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="flagAvg != null">flag_avg = #{flagAvg},</if> <if test="flagAvg != null">flag_avg = #{flagAvg},</if>
<if test="flagSum != null">flag_sum = #{flagSum},</if> <if test="flagSum != null">flag_sum = #{flagSum},</if>
<if test="flagCompute != null">flag_compute = #{flagCompute},</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="tenantId != null">tenant_id = #{tenantId},</if>
<if test="revision != null">revision = #{revision},</if> <if test="revision != null">revision = #{revision},</if>
<if test="createdBy != null">created_by = #{createdBy},</if> <if test="createdBy != null">created_by = #{createdBy},</if>
@ -129,15 +138,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updatedTime != null">updated_time = #{updatedTime},</if> <if test="updatedTime != null">updated_time = #{updatedTime},</if>
<if test="deleteBy != null">delete_by = #{deleteBy},</if> <if test="deleteBy != null">delete_by = #{deleteBy},</if>
<if test="deleteTime != null">delete_time = #{deleteTime},</if> <if test="deleteTime != null">delete_time = #{deleteTime},</if>
<if test="sort != null">sort = #{sort},</if>
<if test="targetFieldName != null">target_field_name = #{targetFieldName},</if>
<if test="columnType != null">column_type = #{columnType},</if>
<if test="fieldUnit != null">field_unit = #{fieldUnit},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>
<delete id="deleteDcBaseAssetTargetDaoById" parameterType="Long"> <delete id="deleteDcBaseAssetTargetById" parameterType="Long">
delete from dc_base_asset_target where id = #{id} delete from dc_base_asset_target where id = #{id}
</delete> </delete>
<delete id="deleteDcBaseAssetTargetDaoByIds" parameterType="String"> <delete id="deleteDcBaseAssetTargetByIds" parameterType="String">
delete from dc_base_asset_target where id in delete from dc_base_asset_target where id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}

Loading…
Cancel
Save