Browse Source

Merge branch 'develop' of https://gitee.com/lmlz_0/manage into develop

develop
ljlong_2630 12 months ago
parent
commit
cc252a955b
  1. 140
      lzbi-module/src/main/java/com/lzbi/asset/controller/DcBusiWorkReadConfigController.java
  2. 10
      lzbi-module/src/main/java/com/lzbi/asset/domain/DcBusiParamSource.java
  3. 3
      lzbi-module/src/main/java/com/lzbi/asset/domain/DcBusiWorkReadConfig.java
  4. 2
      lzbi-module/src/main/java/com/lzbi/asset/mapper/DcBaseAssetInfoMapper.java
  5. 2
      lzbi-module/src/main/java/com/lzbi/asset/service/IDcBaseAssetInfoService.java
  6. 5
      lzbi-module/src/main/java/com/lzbi/asset/service/impl/DcBaseAssetInfoServiceImpl.java
  7. 131
      lzbi-module/src/main/java/com/lzbi/bill/controller/DcBusiPlanTargetMonthController.java
  8. 96
      lzbi-module/src/main/java/com/lzbi/bill/domain/DcBusiPlanTargetMonth.java
  9. 63
      lzbi-module/src/main/java/com/lzbi/bill/mapper/DcBusiPlanTargetMonthMapper.java
  10. 91
      lzbi-module/src/main/java/com/lzbi/bill/service/DcBusiPlanTargetMonthService.java
  11. 5
      lzbi-module/src/main/java/com/lzbi/common/SelectOptionsControl.java
  12. 44
      lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiParamCollectBill.java
  13. 16
      lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetAdjustDayMasterController.java
  14. 14
      lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustDaySubService.java
  15. 1
      lzbi-module/src/main/java/com/lzbi/special/mapper/DcBaseWorkSpecialMapper.java
  16. 4
      lzbi-module/src/main/java/com/lzbi/special/service/DcBaseWorkSpecialService.java
  17. 11
      lzbi-module/src/main/java/com/lzbi/targetFolder/domain/DcBaseAssetTargetDao.java
  18. 8
      lzbi-module/src/main/java/com/lzbi/targetFolder/mapper/DcBaseAssetTargetMapper.java
  19. 3
      lzbi-module/src/main/resources/mapper/asset/DcBaseAssetInfoMapper.xml
  20. 5
      lzbi-module/src/main/resources/mapper/asset/DcBaseWorkSpecialMapper.xml
  21. 151
      lzbi-module/src/main/resources/mapper/asset/DcBusiPlanTargetMonthMapper.xml
  22. 2
      lzbi-module/src/main/resources/mapper/asset/DcBusiWorkReadConfigMapper.xml
  23. 17
      lzbi-module/src/main/resources/mapper/targetFolder/DcBaseAssetTargetMapper.xml

140
lzbi-module/src/main/java/com/lzbi/asset/controller/DcBusiWorkReadConfigController.java

@ -1,77 +1,77 @@
package com.lzbi.asset.controller; package com.lzbi.asset.controller;
import java.util.List; import cn.hutool.core.bean.BeanUtil;
import java.util.Optional; import com.alibaba.fastjson2.JSONArray;
import javax.servlet.http.HttpServletResponse; import com.alibaba.fastjson2.JSONObject;
import com.fasterxml.jackson.databind.ext.OptionalHandlerFactory;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.lzbi.asset.domain.DcBusiWorkReadConfig;
import com.lzbi.asset.service.DcBusiWorkReadConfigService;
import com.lzbi.asset.service.IDcBaseAssetInfoService;
import com.lzbi.common.AssetQueryParams; import com.lzbi.common.AssetQueryParams;
import com.lzbi.common.core.page.PageDomain;
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.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.core.page.TableDataInfo;
import com.lzbi.common.enums.BusinessType; import com.lzbi.common.enums.BusinessType;
import com.lzbi.asset.domain.DcBusiWorkReadConfig; import com.lzbi.common.utils.StringUtils;
import com.lzbi.asset.service.DcBusiWorkReadConfigService;
import com.lzbi.common.utils.poi.ExcelUtil; import com.lzbi.common.utils.poi.ExcelUtil;
import com.lzbi.common.core.page.TableDataInfo; import com.lzbi.special.service.DcBaseWorkSpecialService;
import com.lzbi.system.service.ISysDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import static com.lzbi.common.core.page.TableSupport.getPageDomain; import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
/** /**
* 互联参数读取数据对照Controller * 互联参数读取数据对照Controller
* *
* @author zhousq * @author zhousq
* @date 2023-12-04 * @date 2023-12-04
*/ */
@RestController @RestController
@RequestMapping("/asset/assetExtConfig") @RequestMapping("/asset/assetExtConfig")
public class DcBusiWorkReadConfigController extends BaseController public class DcBusiWorkReadConfigController extends BaseController {
{
@Autowired @Autowired
private DcBusiWorkReadConfigService dcBusiWorkReadConfigService; private DcBusiWorkReadConfigService dcBusiWorkReadConfigService;
@Autowired
private ISysDeptService deptService;
@Autowired
private DcBaseWorkSpecialService specialService;
@Autowired
private IDcBaseAssetInfoService assetInfoService;
/** /**
* 查询互联参数读取数据对照列表 * 查询互联参数读取数据对照列表
*/ */
@PostMapping("/list") @PostMapping("/list")
public TableDataInfo list(@RequestBody AssetQueryParams assetQueryParams) public TableDataInfo list(@RequestBody AssetQueryParams assetQueryParams) {
{
//startPage(); //startPage();
PageHelper.startPage(assetQueryParams.getPageNum(), assetQueryParams.getPageSize()); PageHelper.startPage(assetQueryParams.getPageNum(), assetQueryParams.getPageSize());
List<DcBusiWorkReadConfig> list = dcBusiWorkReadConfigService.selectDcBusiWorkReadConfigMainList(assetQueryParams); List<DcBusiWorkReadConfig> list = dcBusiWorkReadConfigService.selectDcBusiWorkReadConfigMainList(assetQueryParams);
return getDataTable(list); return getDataTable(list);
} }
@PostMapping("/detail/list") @PostMapping("/detail/list")
public TableDataInfo list(@RequestBody DcBusiWorkReadConfig dcBusiWorkReadConfig) public TableDataInfo list(@RequestBody DcBusiWorkReadConfig dcBusiWorkReadConfig) {
{
//startPage(); //startPage();
dcBusiWorkReadConfig.setAssetCode(Optional.ofNullable(dcBusiWorkReadConfig.getAssetCode()).orElse("*")); dcBusiWorkReadConfig.setAssetCode(Optional.ofNullable(dcBusiWorkReadConfig.getAssetCode()).orElse("*"));
dcBusiWorkReadConfig.setAssetName(Optional.ofNullable(dcBusiWorkReadConfig.getAssetName()).orElse("")); dcBusiWorkReadConfig.setAssetName(Optional.ofNullable(dcBusiWorkReadConfig.getAssetName()).orElse(""));
List<DcBusiWorkReadConfig> list = dcBusiWorkReadConfigService.selectDcBusiWorkReadConfigList(dcBusiWorkReadConfig); List<DcBusiWorkReadConfig> list = dcBusiWorkReadConfigService.selectDcBusiWorkReadConfigList(dcBusiWorkReadConfig);
return getDataTable(list); return getDataTable(list);
} }
/** /**
* 导出互联参数读取数据对照列表 * 导出互联参数读取数据对照列表
*/ */
//@PreAuthorize("@ss.hasPermi('asset:assetExtConfig:export')") //@PreAuthorize("@ss.hasPermi('asset:assetExtConfig:export')")
@Log(title = "互联参数读取数据对照", businessType = BusinessType.EXPORT) @Log(title = "互联参数读取数据对照", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, DcBusiWorkReadConfig DcBusiWorkReadConfig) public void export(HttpServletResponse response, DcBusiWorkReadConfig dcBusiWorkReadConfig) {
{ List<DcBusiWorkReadConfig> list = dcBusiWorkReadConfigService.selectDcBusiWorkReadConfigList(dcBusiWorkReadConfig);
List<DcBusiWorkReadConfig> list = dcBusiWorkReadConfigService.selectDcBusiWorkReadConfigList(DcBusiWorkReadConfig);
ExcelUtil<DcBusiWorkReadConfig> util = new ExcelUtil<DcBusiWorkReadConfig>(DcBusiWorkReadConfig.class); ExcelUtil<DcBusiWorkReadConfig> util = new ExcelUtil<DcBusiWorkReadConfig>(DcBusiWorkReadConfig.class);
util.exportExcel(response, list, "互联参数读取数据对照数据"); util.exportExcel(response, list, "互联参数读取数据对照数据");
} }
@ -81,8 +81,7 @@ public class DcBusiWorkReadConfigController extends BaseController
*/ */
//@PreAuthorize("@ss.hasPermi('asset:assetExtConfig:query')") //@PreAuthorize("@ss.hasPermi('asset:assetExtConfig:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id) {
{
return success(dcBusiWorkReadConfigService.selectDcBusiWorkReadConfigById(id)); return success(dcBusiWorkReadConfigService.selectDcBusiWorkReadConfigById(id));
} }
@ -92,9 +91,26 @@ public class DcBusiWorkReadConfigController extends BaseController
///@PreAuthorize("@ss.hasPermi('asset:assetExtConfig:add')") ///@PreAuthorize("@ss.hasPermi('asset:assetExtConfig:add')")
@Log(title = "互联参数读取数据对照", businessType = BusinessType.INSERT) @Log(title = "互联参数读取数据对照", businessType = BusinessType.INSERT)
@PostMapping("/add") @PostMapping("/add")
public AjaxResult add(@RequestBody DcBusiWorkReadConfig DcBusiWorkReadConfig) public AjaxResult add(@RequestBody JSONObject jParam) {
{ Long companyId = jParam.getLong("companyId");
return toAjax(dcBusiWorkReadConfigService.insertDcBusiWorkReadConfig(DcBusiWorkReadConfig)); Long organizeId = jParam.getLong("oragnizeId");
String assetFieldCode = jParam.getString("assetFieldCode");
String assetCode = jParam.getString("assetCode");
if (StringUtils.isNull(companyId)) {
return AjaxResult.error("请选择公司!");
}
if (StringUtils.isNull(organizeId)) {
return AjaxResult.error("请选择组织结构!");
}
if (StringUtils.isNull(assetFieldCode)) {
return AjaxResult.error("请选择专业!");
}
if (StringUtils.isNull(assetCode)) {
return AjaxResult.error("请选择统计单元!");
}
JSONArray data=JSONArray.parseArray(jParam.getString("sub"));
List<DcBusiWorkReadConfig> list=getDataList(companyId ,organizeId, assetFieldCode ,assetCode,data,"id");
return AjaxResult.success(dcBusiWorkReadConfigService.saveBatch(list));
} }
/** /**
@ -103,19 +119,57 @@ public class DcBusiWorkReadConfigController extends BaseController
//@PreAuthorize("@ss.hasPermi('asset:assetExtConfig:edit')") //@PreAuthorize("@ss.hasPermi('asset:assetExtConfig:edit')")
@Log(title = "互联参数读取数据对照", businessType = BusinessType.UPDATE) @Log(title = "互联参数读取数据对照", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody DcBusiWorkReadConfig DcBusiWorkReadConfig) public AjaxResult edit(@RequestBody JSONObject jParam) {
{ Long companyId = jParam.getLong("companyId");
return toAjax(dcBusiWorkReadConfigService.updateDcBusiWorkReadConfig(DcBusiWorkReadConfig)); Long organizeId = jParam.getLong("oragnizeId");
} String assetFieldCode = jParam.getString("assetFieldCode");
String assetCode = jParam.getString("assetCode");
if (StringUtils.isNull(companyId)) {
return AjaxResult.error("请选择公司!");
}
if (StringUtils.isNull(organizeId)) {
return AjaxResult.error("请选择组织结构!");
}
if (StringUtils.isNull(assetFieldCode)) {
return AjaxResult.error("请选择专业!");
}
if (StringUtils.isNull(assetCode)) {
return AjaxResult.error("请选择统计单元!");
}
JSONArray data=JSONArray.parseArray(jParam.getString("sub"));
List<DcBusiWorkReadConfig> list=getDataList(companyId ,organizeId, assetFieldCode , assetCode,data,"");
return AjaxResult.success(dcBusiWorkReadConfigService.updateBatchById(list));
}
private List<DcBusiWorkReadConfig> getDataList( Long companyId , Long organizeId, String assetFieldCode , String assetCode,JSONArray data,String igorenProperties){
List<DcBusiWorkReadConfig> list = new ArrayList<>();
String companyName = Optional.ofNullable(deptService.selectDeptById(companyId).getDeptName()).orElse("");
String organizeName = Optional.ofNullable(deptService.selectDeptById(organizeId).getDeptName()).orElse("");
String assetName = Optional.ofNullable(assetInfoService.selectDcBaseAssetInfoByCode(assetCode).getAssetName()).orElse("");
String assetFieldName = Optional.ofNullable(specialService.selectDcBaseWorkSpecialByCode(assetFieldCode).getSpecialName()).orElse("");
data.forEach(item -> {
String ss = item.toString();
DcBusiWorkReadConfig ds = new DcBusiWorkReadConfig();
BeanUtil.copyProperties(JSONObject.parseObject(ss), ds,igorenProperties);
ds.setAssetCode(assetCode);
ds.setCompanyId(companyId);
ds.setOragnizeId(organizeId);
ds.setAssetFieldCode(assetFieldCode);
ds.setAssetName(assetName);
ds.setAssetFieldName(assetFieldName);
ds.setOrganizeName(organizeName);
ds.setCompanyName(companyName);
list.add(ds);
});
return list;
}
/** /**
* 删除互联参数读取数据对照 * 删除互联参数读取数据对照
*/ */
// @PreAuthorize("@ss.hasPermi('asset:assetExtConfig:remove')") // @PreAuthorize("@ss.hasPermi('asset:assetExtConfig:remove')")
@Log(title = "互联参数读取数据对照", businessType = BusinessType.DELETE) @Log(title = "互联参数读取数据对照", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids) {
{
return toAjax(dcBusiWorkReadConfigService.deleteDcBusiWorkReadConfigByIds(ids)); return toAjax(dcBusiWorkReadConfigService.deleteDcBusiWorkReadConfigByIds(ids));
} }
} }

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

@ -56,5 +56,15 @@ public class DcBusiParamSource extends BaseModuleEntity{
/** 所属名称 */ /** 所属名称 */
@ApiModelProperty(name = "所属名称",notes = "") @ApiModelProperty(name = "所属名称",notes = "")
private String fieldName ; private String fieldName ;
private String value;
private String label;
public String getValue() {
return this.paramCode;
}
public String getLabel() {
return this.paramCode;
}
} }

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

@ -1,5 +1,7 @@
package com.lzbi.asset.domain; package com.lzbi.asset.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
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;
@ -16,6 +18,7 @@ public class DcBusiWorkReadConfig extends BaseModuleEntity
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** 主键 */ /** 主键 */
@Excel(name = "主键") @Excel(name = "主键")
@TableId(type= IdType.AUTO)
private Long id; private Long id;
/** 公司ID */ /** 公司ID */

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

@ -19,7 +19,7 @@ public interface DcBaseAssetInfoMapper {
* @return 资产信息 * @return 资产信息
*/ */
public DcBaseAssetInfo selectDcBaseAssetInfoById(Long id); public DcBaseAssetInfo selectDcBaseAssetInfoById(Long id);
public DcBaseAssetInfo selectDcBaseAssetInfoByCode(String assetcode);
/** /**
* 查询资产信息列表 * 查询资产信息列表
* *

2
lzbi-module/src/main/java/com/lzbi/asset/service/IDcBaseAssetInfoService.java

@ -19,7 +19,7 @@ public interface IDcBaseAssetInfoService {
* @return 资产信息 * @return 资产信息
*/ */
public DcBaseAssetInfo selectDcBaseAssetInfoById(Long id); public DcBaseAssetInfo selectDcBaseAssetInfoById(Long id);
public DcBaseAssetInfo selectDcBaseAssetInfoByCode(String assetCode);
/** /**
* 查询资产信息列表 * 查询资产信息列表
* *

5
lzbi-module/src/main/java/com/lzbi/asset/service/impl/DcBaseAssetInfoServiceImpl.java

@ -29,7 +29,10 @@ public class DcBaseAssetInfoServiceImpl implements IDcBaseAssetInfoService {
public DcBaseAssetInfo selectDcBaseAssetInfoById(Long id) { public DcBaseAssetInfo selectDcBaseAssetInfoById(Long id) {
return dcBaseAssetInfoMapper.selectDcBaseAssetInfoById(id); return dcBaseAssetInfoMapper.selectDcBaseAssetInfoById(id);
} }
@Override
public DcBaseAssetInfo selectDcBaseAssetInfoByCode(String assetCode) {
return dcBaseAssetInfoMapper.selectDcBaseAssetInfoByCode(assetCode);
}
/** /**
* 查询资产信息列表 * 查询资产信息列表
* *

131
lzbi-module/src/main/java/com/lzbi/bill/controller/DcBusiPlanTargetMonthController.java

@ -0,0 +1,131 @@
package com.lzbi.bill.controller;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
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.bill.domain. DcBusiPlanTargetMonth;
import com.lzbi.bill.service.DcBusiPlanTargetMonthService;
import com.lzbi.common.utils.poi.ExcelUtil;
import com.lzbi.common.core.page.TableDataInfo;
/**
* 指标月度计划Controller
*
* @author zhousq
* @date 2023-12-06
*/
@RestController
@RequestMapping("/asset/targetPlanMonth")
public class DcBusiPlanTargetMonthController extends BaseController
{
@Autowired
private DcBusiPlanTargetMonthService dcBusiPlanTargetMonthService;
/**
* 查询指标月度计划列表
*/
@ApiOperation("查询指标月度计划列表")
@ApiImplicitParams({
@ApiImplicitParam(name = "DcBusiPlanTargetMonth", value = "", dataType = "DcBusiPlanTargetMonth", dataTypeClass = DcBusiPlanTargetMonth.class),
})
@PreAuthorize("@ss.hasPermi('asset:targetPlanMonth:list')")
@GetMapping("/list")
public TableDataInfo list(DcBusiPlanTargetMonth DcBusiPlanTargetMonth)
{
startPage();
List< DcBusiPlanTargetMonth> list = dcBusiPlanTargetMonthService.selectDcBusiPlanTargetMonthList(DcBusiPlanTargetMonth);
return getDataTable(list);
}
/**
* 导出指标月度计划列表
*/
@ApiOperation("导出指标月度计划列表")
@ApiImplicitParams({
@ApiImplicitParam(name = "DcBusiPlanTargetMonth", value = "", dataType = "DcBusiPlanTargetMonth", dataTypeClass = DcBusiPlanTargetMonth.class),
})
@PreAuthorize("@ss.hasPermi('asset:targetPlanMonth:export')")
@Log(title = "指标月度计划", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response,DcBusiPlanTargetMonth DcBusiPlanTargetMonth)
{
List<DcBusiPlanTargetMonth> list = dcBusiPlanTargetMonthService.selectDcBusiPlanTargetMonthList(DcBusiPlanTargetMonth);
ExcelUtil<DcBusiPlanTargetMonth> util = new ExcelUtil<DcBusiPlanTargetMonth>(DcBusiPlanTargetMonth.class);
util.exportExcel(response, list, "指标月度计划数据");
}
/**
* 获取指标月度计划详细信息
*/
@ApiOperation("获取指标月度计划详细信息")
@ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "", dataType = "Long", dataTypeClass = Long.class),
})
@PreAuthorize("@ss.hasPermi('asset:targetPlanMonth:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(dcBusiPlanTargetMonthService.selectDcBusiPlanTargetMonthById(id));
}
/**
* 新增指标月度计划
*/
@ApiOperation("新增指标月度计划")
@ApiImplicitParams({
@ApiImplicitParam(name = "DcBusiPlanTargetMonth", value = "", dataType = "DcBusiPlanTargetMonth", dataTypeClass = DcBusiPlanTargetMonth.class),
})
@PreAuthorize("@ss.hasPermi('asset:targetPlanMonth:add')")
@Log(title = "指标月度计划", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DcBusiPlanTargetMonth DcBusiPlanTargetMonth)
{
return toAjax(dcBusiPlanTargetMonthService.insertDcBusiPlanTargetMonth(DcBusiPlanTargetMonth));
}
/**
* 修改指标月度计划
*/
@ApiOperation("修改指标月度计划")
@ApiImplicitParams({
@ApiImplicitParam(name = "DcBusiPlanTargetMonth", value = "", dataType = "DcBusiPlanTargetMonth", dataTypeClass = DcBusiPlanTargetMonth.class),
})
@PreAuthorize("@ss.hasPermi('asset:targetPlanMonth:edit')")
@Log(title = "指标月度计划", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DcBusiPlanTargetMonth DcBusiPlanTargetMonth)
{
return toAjax(dcBusiPlanTargetMonthService.updateDcBusiPlanTargetMonth(DcBusiPlanTargetMonth));
}
/**
* 删除指标月度计划
*/
@ApiOperation("删除指标月度计划")
@ApiImplicitParams({
@ApiImplicitParam(name = "ids", value = "", dataType = "Long", dataTypeClass =Long.class),
})
@PreAuthorize("@ss.hasPermi('asset:targetPlanMonth:remove')")
@Log(title = "指标月度计划", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(dcBusiPlanTargetMonthService.deleteDcBusiPlanTargetMonthByIds(ids));
}
}

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

@ -0,0 +1,96 @@
package com.lzbi.bill.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import lombok.Data;
import com.lzbi.common.annotation.Excel;
import com.lzbi.module.base.BaseModuleEntity;
/**
* 指标月度计划对象 dc_busi_plan_target_month
*
* @author zhousq
* @date 2023-12-06
*/
@Data
public class DcBusiPlanTargetMonth extends BaseModuleEntity
{
private static final long serialVersionUID = 1L;
/** 创建人 */
private String createdBy;
/** 创建时间 */
private Date createdTime;
/** 更新人 */
private String updatedBy;
/** 更新时间 */
private Date updatedTime;
/** 主键 */
private Long id;
/** 公司名称 */
@Excel(name = "公司名称")
private String companyName;
/** 公司编码 */
private Long companyId;
/** 组织机构代码 */
private Long orgId;
/** 组织机构名称 */
@Excel(name = "组织机构名称")
private String orgName;
/** 统计单元编码 */
@Excel(name = "统计单元编码")
private String assetCode;
/** 统计单元名称 */
@Excel(name = "统计单元名称")
private String assetName;
/** 所属专业名称 */
@Excel(name = "所属专业名称")
private String fieldName;
/** 所属专业编码 */
@Excel(name = "所属专业编码")
private String fieldCode;
/** 指标名称 */
@Excel(name = "指标名称")
private String targetNameDefine;
/** 指标编码 */
@Excel(name = "指标编码")
private String targetCode;
/** 指标单位 */
@Excel(name = "指标单位")
private String targetUint;
/** 年 */
@Excel(name = "年")
private String countYear;
/** 月 */
@Excel(name = "月")
private String countMonth;
/** 指标别名 */
@Excel(name = "指标别名")
private String targetNameAlias;
/** 计划值 */
@Excel(name = "计划值")
private BigDecimal valPlan;
}

63
lzbi-module/src/main/java/com/lzbi/bill/mapper/DcBusiPlanTargetMonthMapper.java

@ -0,0 +1,63 @@
package com.lzbi.bill.mapper;
import java.util.List;
import com.lzbi.bill.domain.DcBusiPlanTargetMonth;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 指标月度计划Mapper接口
*
* @author zhousq
* @date 2023-12-06
*/
public interface DcBusiPlanTargetMonthMapper extends BaseMapper<DcBusiPlanTargetMonth>
{
/**
* 查询指标月度计划
*
* @param id 指标月度计划主键
* @return 指标月度计划
*/
public DcBusiPlanTargetMonth selectDcBusiPlanTargetMonthById(Long id);
/**
* 查询指标月度计划列表
*
* @param dcBusiPlanTargetMonth 指标月度计划
* @return 指标月度计划集合
*/
public List<DcBusiPlanTargetMonth> selectDcBusiPlanTargetMonthList(DcBusiPlanTargetMonth dcBusiPlanTargetMonth);
/**
* 新增指标月度计划
*
* @param dcBusiPlanTargetMonth 指标月度计划
* @return 结果
*/
public int insertDcBusiPlanTargetMonth(DcBusiPlanTargetMonth dcBusiPlanTargetMonth);
/**
* 修改指标月度计划
*
* @param dcBusiPlanTargetMonth 指标月度计划
* @return 结果
*/
public int updateDcBusiPlanTargetMonth(DcBusiPlanTargetMonth dcBusiPlanTargetMonth);
/**
* 删除指标月度计划
*
* @param id 指标月度计划主键
* @return 结果
*/
public int deleteDcBusiPlanTargetMonthById(Long id);
/**
* 批量删除指标月度计划
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteDcBusiPlanTargetMonthByIds(Long[] ids);
}

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

@ -0,0 +1,91 @@
package com.lzbi.bill.service;
import java.util.List;
import com.lzbi.common.utils.DateUtils;
import org.springframework.stereotype.Service;
import com.lzbi.bill.domain.DcBusiPlanTargetMonth;
import com.lzbi.bill.mapper.DcBusiPlanTargetMonthMapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* 指标月度计划Service业务层处理
*
* @author zhousq
* @date 2023-12-06
*/
@Service
public class DcBusiPlanTargetMonthService extends ServiceImpl<DcBusiPlanTargetMonthMapper, DcBusiPlanTargetMonth> implements IService<DcBusiPlanTargetMonth>
{
/**
* 查询指标月度计划
*
* @param id 指标月度计划主键
* @return 指标月度计划
*/
public DcBusiPlanTargetMonth selectDcBusiPlanTargetMonthById(Long id)
{
return baseMapper.selectDcBusiPlanTargetMonthById(id);
}
/**
* 查询指标月度计划列表
*
* @param dcBusiPlanTargetMonth 指标月度计划
* @return 指标月度计划
*/
public List<DcBusiPlanTargetMonth> selectDcBusiPlanTargetMonthList(DcBusiPlanTargetMonth dcBusiPlanTargetMonth)
{
return baseMapper.selectDcBusiPlanTargetMonthList(dcBusiPlanTargetMonth);
}
/**
* 新增指标月度计划
*
* @param dcBusiPlanTargetMonth 指标月度计划
* @return 结果
*/
public int insertDcBusiPlanTargetMonth(DcBusiPlanTargetMonth dcBusiPlanTargetMonth)
{
dcBusiPlanTargetMonth.setCreatedTime(DateUtils.getNowDate());
return baseMapper.insertDcBusiPlanTargetMonth(dcBusiPlanTargetMonth);
}
/**
* 修改指标月度计划
*
* @param dcBusiPlanTargetMonth 指标月度计划
* @return 结果
*/
public int updateDcBusiPlanTargetMonth(DcBusiPlanTargetMonth dcBusiPlanTargetMonth)
{
dcBusiPlanTargetMonth.setUpdatedTime(DateUtils.getNowDate());
return baseMapper.updateDcBusiPlanTargetMonth(dcBusiPlanTargetMonth);
}
/**
* 批量删除指标月度计划
*
* @param ids 需要删除的指标月度计划主键
* @return 结果
*/
public int deleteDcBusiPlanTargetMonthByIds(Long[] ids)
{
return baseMapper.deleteDcBusiPlanTargetMonthByIds(ids);
}
/**
* 删除指标月度计划信息
*
* @param id 指标月度计划主键
* @return 结果
*/
public int deleteDcBusiPlanTargetMonthById(Long id)
{
return baseMapper.deleteDcBusiPlanTargetMonthById(id);
}
}

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

@ -115,9 +115,8 @@ public class SelectOptionsControl extends BaseController {
{ {
DcBaseAssetTargetDao dcBaseAssetTargetDao=new DcBaseAssetTargetDao(); DcBaseAssetTargetDao dcBaseAssetTargetDao=new DcBaseAssetTargetDao();
dcBaseAssetTargetDao.setAssetCode(assetQueryParams.getAssetCode()); dcBaseAssetTargetDao.setAssetCode(assetQueryParams.getAssetCode());
dcBaseAssetTargetDao.setAssetId(assetQueryParams.getAssetId()); //dcBaseAssetTargetDao.setAssetId(assetQueryParams.getAssetId());
dcBaseAssetTargetService.selectDcBaseAssetTargetDaoList(dcBaseAssetTargetDao); return AjaxResult.success(dcBaseAssetTargetService.selectDcBaseAssetTargetDaoList(dcBaseAssetTargetDao));
return AjaxResult.success(null);
} }
// //
//获取IOT参数列表 //获取IOT参数列表

44
lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiParamCollectBill.java

@ -0,0 +1,44 @@
package com.lzbi.draft.controller;
import com.lzbi.common.annotation.Log;
import com.lzbi.common.core.controller.BaseController;
import com.lzbi.common.core.domain.AjaxResult;
import com.lzbi.common.core.page.TableDataInfo;
import com.lzbi.common.enums.BusinessType;
import com.lzbi.common.utils.poi.ExcelUtil;
import com.lzbi.draft.domain.DcBusiParamBillMaster;
import com.lzbi.draft.service.DcBusiParamBillMasterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 参数采集录入单据主Controller
*
* @author win
* @date 2023-11-28
*/
@RestController
@RequestMapping("/draft/paramCollect")
public class DcBusiParamCollectBill extends BaseController
{
@Autowired
private DcBusiParamBillMasterService dcBusiParamBillMasterService;
/**
* 查询参数采集录入单据主列表
*/
@PreAuthorize("@ss.hasPermi('param:paramData:list')")
@GetMapping("/list")
public TableDataInfo list(DcBusiParamBillMaster dcBusiParamBillMasterDao)
{
startPage();
List<DcBusiParamBillMaster> list = dcBusiParamBillMasterService.selectDcBusiParamBillMasterDaoList(dcBusiParamBillMasterDao);
return getDataTable(list);
}
}

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

@ -44,7 +44,7 @@ public class DcBusiTargetAdjustDayMasterController extends BaseController
/** /**
* 查询资产指标调整单主()列表 * 查询资产指标调整单主()列表
*/ */
@PreAuthorize("@ss.hasPermi('lzbi:master:list')") @PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao) public TableDataInfo list(DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao)
{ {
@ -56,7 +56,7 @@ public class DcBusiTargetAdjustDayMasterController extends BaseController
/** /**
* 导出资产指标调整单主()列表 * 导出资产指标调整单主()列表
*/ */
@PreAuthorize("@ss.hasPermi('lzbi:master:export')") @PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:export')")
@Log(title = "资产指标调整单主(日)", businessType = BusinessType.EXPORT) @Log(title = "资产指标调整单主(日)", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao) public void export(HttpServletResponse response, DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao)
@ -69,7 +69,7 @@ public class DcBusiTargetAdjustDayMasterController extends BaseController
/** /**
* 获取资产指标调整单主()详细信息 * 获取资产指标调整单主()详细信息
*/ */
@PreAuthorize("@ss.hasPermi('lzbi:master:query')") @PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id)
{ {
@ -80,7 +80,7 @@ public class DcBusiTargetAdjustDayMasterController extends BaseController
* 新增资产指标调整单主() * 新增资产指标调整单主()
*/ */
@ApiOperation("新增资产指标调整单") @ApiOperation("新增资产指标调整单")
@PreAuthorize("@ss.hasPermi('lzbi:master:add')") @PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:add')")
@Log(title = "资产指标调整单主(日)", businessType = BusinessType.INSERT) @Log(title = "资产指标调整单主(日)", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody DcBusiTargetAdjustDayMasterDao<DcBusiTargetAdjustDaySubDao> dcBusiTargetAdjustDayMasterDao) public AjaxResult add(@RequestBody DcBusiTargetAdjustDayMasterDao<DcBusiTargetAdjustDaySubDao> dcBusiTargetAdjustDayMasterDao)
@ -91,7 +91,7 @@ public class DcBusiTargetAdjustDayMasterController extends BaseController
/** /**
* 修改资产指标调整单主() * 修改资产指标调整单主()
*/ */
@PreAuthorize("@ss.hasPermi('lzbi:master:edit')") @PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:edit')")
@Log(title = "资产指标调整单主(日)", businessType = BusinessType.UPDATE) @Log(title = "资产指标调整单主(日)", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao) public AjaxResult edit(@RequestBody DcBusiTargetAdjustDayMasterDao dcBusiTargetAdjustDayMasterDao)
@ -102,7 +102,7 @@ public class DcBusiTargetAdjustDayMasterController extends BaseController
/** /**
* 删除资产指标调整单主() * 删除资产指标调整单主()
*/ */
@PreAuthorize("@ss.hasPermi('lzbi:master:remove')") @PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:remove')")
@Log(title = "资产指标调整单主(日)", businessType = BusinessType.DELETE) @Log(title = "资产指标调整单主(日)", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids)
@ -115,7 +115,7 @@ public class DcBusiTargetAdjustDayMasterController extends BaseController
*/ */
@ApiOperation("审核资产指标调整单") @ApiOperation("审核资产指标调整单")
@ApiImplicitParam(name = "id", value = "id", dataType = "Long", dataTypeClass = Long.class, paramType = "path", required = true) @ApiImplicitParam(name = "id", value = "id", dataType = "Long", dataTypeClass = Long.class, paramType = "path", required = true)
@PreAuthorize("@ss.hasPermi('lzbi:master:add')") @PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:audit')")
@Log(title = "资产指标调整单主(日)", businessType = BusinessType.OTHER) @Log(title = "资产指标调整单主(日)", businessType = BusinessType.OTHER)
@PostMapping("/audit/{id}") @PostMapping("/audit/{id}")
public AjaxResult audit(@PathVariable("id") Long id) public AjaxResult audit(@PathVariable("id") Long id)
@ -128,7 +128,7 @@ public class DcBusiTargetAdjustDayMasterController extends BaseController
*/ */
@ApiOperation("处理资产指标调整单") @ApiOperation("处理资产指标调整单")
@ApiImplicitParam(name = "id", value = "id", dataType = "Long", dataTypeClass = Long.class, paramType = "path", required = true) @ApiImplicitParam(name = "id", value = "id", dataType = "Long", dataTypeClass = Long.class, paramType = "path", required = true)
@PreAuthorize("@ss.hasPermi('lzbi:master:add')") @PreAuthorize("@ss.hasPermi('asset:targetAdjustBill:dispose')")
@Log(title = "资产指标调整单主(日)", businessType = BusinessType.OTHER) @Log(title = "资产指标调整单主(日)", businessType = BusinessType.OTHER)
@PostMapping("/dispose/{id}") @PostMapping("/dispose/{id}")
public AjaxResult dispose(@PathVariable("id") Long id) public AjaxResult dispose(@PathVariable("id") Long id)

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

@ -4,11 +4,16 @@ import java.util.List;
import com.lzbi.common.utils.DateUtils; import com.lzbi.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.mapper.DcBaseAssetTargetMapper;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
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;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
/** /**
* 统计单元指标调整单子()Service业务层处理 * 统计单元指标调整单子()Service业务层处理
* *
@ -19,6 +24,9 @@ import org.springframework.transaction.annotation.Transactional;
public class DcBusiTargetAdjustDaySubService extends ServiceImpl<DcBusiTargetAdjustDaySubMapper, DcBusiTargetAdjustDaySubDao> implements IService<DcBusiTargetAdjustDaySubDao> public class DcBusiTargetAdjustDaySubService extends ServiceImpl<DcBusiTargetAdjustDaySubMapper, DcBusiTargetAdjustDaySubDao> implements IService<DcBusiTargetAdjustDaySubDao>
{ {
@Resource
private DcBaseAssetTargetMapper dcBaseAssetTargetMapper;
/** /**
* 查询统计单元指标调整单子() * 查询统计单元指标调整单子()
* *
@ -51,8 +59,10 @@ public class DcBusiTargetAdjustDaySubService extends ServiceImpl<DcBusiTargetAdj
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public int insertDcBusiTargetAdjustDaySubDao(DcBusiTargetAdjustDaySubDao dcBusiTargetAdjustDaySubDao, String assetId) public int insertDcBusiTargetAdjustDaySubDao(DcBusiTargetAdjustDaySubDao dcBusiTargetAdjustDaySubDao, String assetId)
{ {
String targetName = "123"; //TODO 从service获取 DcBaseAssetTargetDao dcBaseAssetTargetDao = dcBaseAssetTargetMapper.selectDcBaseAssetTargetDaoByTargetCodeAndAssetId(dcBusiTargetAdjustDaySubDao.getTargetCode(), assetId);
dcBusiTargetAdjustDaySubDao.setTargetName(targetName); if (ObjectUtils.isNotEmpty(dcBaseAssetTargetDao)) {
dcBusiTargetAdjustDaySubDao.setTargetName(dcBaseAssetTargetDao.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/special/mapper/DcBaseWorkSpecialMapper.java

@ -22,6 +22,7 @@ public interface DcBaseWorkSpecialMapper extends BaseMapper<DcBaseWorkSpecial>
* @return 生产专业管理 * @return 生产专业管理
*/ */
public DcBaseWorkSpecial selectDcBaseWorkSpecialById(Long id); public DcBaseWorkSpecial selectDcBaseWorkSpecialById(Long id);
public DcBaseWorkSpecial selectDcBaseWorkSpecialByCode(String specialCode);
/** /**
* 查询生产专业管理 * 查询生产专业管理

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

@ -30,6 +30,10 @@ public class DcBaseWorkSpecialService extends ServiceImpl<DcBaseWorkSpecialMappe
{ {
return baseMapper.selectDcBaseWorkSpecialById(id); return baseMapper.selectDcBaseWorkSpecialById(id);
} }
public DcBaseWorkSpecial selectDcBaseWorkSpecialByCode(String specialCode)
{
return baseMapper.selectDcBaseWorkSpecialByCode(specialCode);
}
/** /**
* 查询生产专业管理列表 * 查询生产专业管理列表

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

@ -72,6 +72,17 @@ public class DcBaseAssetTargetDao extends BaseModuleEntity
@Excel(name = "统计单元编码") @Excel(name = "统计单元编码")
private String assetCode; private String assetCode;
private String value;
private String label;
public String getValue() {
return this.targetCode;
}
public String getLabel() {
return this.targetCode;
}
} }

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

@ -22,6 +22,14 @@ public interface DcBaseAssetTargetMapper extends BaseMapper<DcBaseAssetTargetDao
* @return 资产指标配置 * @return 资产指标配置
*/ */
public DcBaseAssetTargetDao selectDcBaseAssetTargetDaoById(Long id); public DcBaseAssetTargetDao selectDcBaseAssetTargetDaoById(Long id);
/**
* 查询资产指标配置
*
* @param targetCode 指标编码
* @param assetId 统计单元ID
* @return 资产指标配置
*/
public DcBaseAssetTargetDao selectDcBaseAssetTargetDaoByTargetCodeAndAssetId(String targetCode, String assetId);
/** /**
* 查询资产指标配置列表 * 查询资产指标配置列表

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

@ -71,11 +71,10 @@
where id = #{id} where id = #{id}
</select> </select>
<select id="selectDcBaseAssetInfoByAssetCode" parameterType="String" resultMap="DcBaseAssetInfoResult"> <select id="selectDcBaseAssetInfoByCode" parameterType="String" resultMap="DcBaseAssetInfoResult">
<include refid="selectDcBaseAssetInfoVo"/> <include refid="selectDcBaseAssetInfoVo"/>
where asset_code = #{assetCode} where asset_code = #{assetCode}
</select> </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=",">

5
lzbi-module/src/main/resources/mapper/asset/DcBaseWorkSpecialMapper.xml

@ -38,17 +38,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="specialName != null and specialName != ''"> and special_name like concat('%', #{specialName}, '%')</if> <if test="specialName != null and specialName != ''"> and special_name like concat('%', #{specialName}, '%')</if>
</where> </where>
</select> </select>
<select id="selectDcBaseWorkSpecialById" parameterType="Long" resultMap="DcBaseWorkSpecialResult"> <select id="selectDcBaseWorkSpecialById" parameterType="Long" resultMap="DcBaseWorkSpecialResult">
<include refid="selectDcBaseWorkSpecialVo"/> <include refid="selectDcBaseWorkSpecialVo"/>
where id = #{id} where id = #{id}
</select> </select>
<select id="selectDcBaseWorkSpecialByCode" parameterType="String" resultMap="DcBaseWorkSpecialResult">
<select id="selectDcBaseWorkSpecialBySpecialCode" parameterType="String" resultMap="DcBaseWorkSpecialResult">
<include refid="selectDcBaseWorkSpecialVo"/> <include refid="selectDcBaseWorkSpecialVo"/>
where special_code = #{specialCode} where special_code = #{specialCode}
</select> </select>
<insert id="insertDcBaseWorkSpecial" parameterType="DcBaseWorkSpecial" useGeneratedKeys="true" keyProperty="id"> <insert id="insertDcBaseWorkSpecial" parameterType="DcBaseWorkSpecial" useGeneratedKeys="true" keyProperty="id">
insert into dc_base_work_special insert into dc_base_work_special
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">

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

@ -0,0 +1,151 @@
<?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.bill.mapper.DcBusiPlanTargetMonthMapper">
<resultMap type="com.lzbi.bill.domain.DcBusiPlanTargetMonth" id="DcBusiPlanTargetMonthResult">
<result property="tenantId" column="tenant_id" />
<result property="revision" column="revision" />
<result property="createdBy" column="created_by" />
<result property="createdTime" column="created_time" />
<result property="updatedBy" column="updated_by" />
<result property="updatedTime" column="updated_time" />
<result property="deleteBy" column="delete_by" />
<result property="deleteTime" column="delete_time" />
<result property="id" column="id" />
<result property="companyName" column="company_name" />
<result property="companyId" column="company_id" />
<result property="orgId" column="org_id" />
<result property="orgName" column="org_name" />
<result property="assetCode" column="asset_code" />
<result property="assetName" column="asset_name" />
<result property="fieldName" column="field_name" />
<result property="fieldCode" column="field_code" />
<result property="targetNameDefine" column="target_name_define" />
<result property="targetCode" column="target_code" />
<result property="targetUint" column="target_uint" />
<result property="countYear" column="count_year" />
<result property="countMonth" column="count_month" />
<result property="targetNameAlias" column="target_name_alias" />
<result property="valPlan" column="val_plan" />
</resultMap>
<sql id="selectDcBusiPlanTargetMonthVo">
select tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time, id, company_name, company_id, org_id, org_name, asset_code, asset_name, field_name, field_code, target_name_define, target_code, target_uint, count_year, count_month, target_name_alias, val_plan from dc_busi_plan_target_month
</sql>
<select id="selectDcBusiPlanTargetMonthList" parameterType="DcBusiPlanTargetMonth" resultMap="DcBusiPlanTargetMonthResult">
<include refid="selectDcBusiPlanTargetMonthVo"/>
<where>
<if test="companyId != null "> and company_id = #{companyId}</if>
<if test="orgId != null "> and org_id = #{orgId}</if>
<if test="assetCode != null and assetCode != ''"> and asset_code = #{assetCode}</if>
<if test="fieldCode != null and fieldCode != ''"> and field_code = #{fieldCode}</if>
<if test="targetNameDefine != null and targetNameDefine != ''"> and target_name_define = #{targetNameDefine}</if>
<if test="targetCode != null and targetCode != ''"> and target_code = #{targetCode}</if>
<if test="countYear != null and countYear != ''"> and count_year = #{countYear}</if>
<if test="countMonth != null and countMonth != ''"> and count_month = #{countMonth}</if>
</where>
</select>
<select id="selectDcBusiPlanTargetMonthById" parameterType="Long" resultMap="DcBusiPlanTargetMonthResult">
<include refid="selectDcBusiPlanTargetMonthVo"/>
where id = #{id}
</select>
<insert id="insertDcBusiPlanTargetMonth" parameterType="DcBusiPlanTargetMonth" useGeneratedKeys="true" keyProperty="id">
insert into dc_busi_plan_target_month
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="tenantId != null">tenant_id,</if>
<if test="revision != null">revision,</if>
<if test="createdBy != null">created_by,</if>
<if test="createdTime != null">created_time,</if>
<if test="updatedBy != null">updated_by,</if>
<if test="updatedTime != null">updated_time,</if>
<if test="deleteBy != null">delete_by,</if>
<if test="deleteTime != null">delete_time,</if>
<if test="companyName != null">company_name,</if>
<if test="companyId != null">company_id,</if>
<if test="orgId != null">org_id,</if>
<if test="orgName != null">org_name,</if>
<if test="assetCode != null">asset_code,</if>
<if test="assetName != null">asset_name,</if>
<if test="fieldName != null">field_name,</if>
<if test="fieldCode != null">field_code,</if>
<if test="targetNameDefine != null">target_name_define,</if>
<if test="targetCode != null">target_code,</if>
<if test="targetUint != null">target_uint,</if>
<if test="countYear != null">count_year,</if>
<if test="countMonth != null">count_month,</if>
<if test="targetNameAlias != null">target_name_alias,</if>
<if test="valPlan != null">val_plan,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="tenantId != null">#{tenantId},</if>
<if test="revision != null">#{revision},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="createdTime != null">#{createdTime},</if>
<if test="updatedBy != null">#{updatedBy},</if>
<if test="updatedTime != null">#{updatedTime},</if>
<if test="deleteBy != null">#{deleteBy},</if>
<if test="deleteTime != null">#{deleteTime},</if>
<if test="companyName != null">#{companyName},</if>
<if test="companyId != null">#{companyId},</if>
<if test="orgId != null">#{orgId},</if>
<if test="orgName != null">#{orgName},</if>
<if test="assetCode != null">#{assetCode},</if>
<if test="assetName != null">#{assetName},</if>
<if test="fieldName != null">#{fieldName},</if>
<if test="fieldCode != null">#{fieldCode},</if>
<if test="targetNameDefine != null">#{targetNameDefine},</if>
<if test="targetCode != null">#{targetCode},</if>
<if test="targetUint != null">#{targetUint},</if>
<if test="countYear != null">#{countYear},</if>
<if test="countMonth != null">#{countMonth},</if>
<if test="targetNameAlias != null">#{targetNameAlias},</if>
<if test="valPlan != null">#{valPlan},</if>
</trim>
</insert>
<update id="updateDcBusiPlanTargetMonth" parameterType="DcBusiPlanTargetMonth">
update dc_busi_plan_target_month
<trim prefix="SET" suffixOverrides=",">
<if test="tenantId != null">tenant_id = #{tenantId},</if>
<if test="revision != null">revision = #{revision},</if>
<if test="createdBy != null">created_by = #{createdBy},</if>
<if test="createdTime != null">created_time = #{createdTime},</if>
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
<if test="deleteBy != null">delete_by = #{deleteBy},</if>
<if test="deleteTime != null">delete_time = #{deleteTime},</if>
<if test="companyName != null">company_name = #{companyName},</if>
<if test="companyId != null">company_id = #{companyId},</if>
<if test="orgId != null">org_id = #{orgId},</if>
<if test="orgName != null">org_name = #{orgName},</if>
<if test="assetCode != null">asset_code = #{assetCode},</if>
<if test="assetName != null">asset_name = #{assetName},</if>
<if test="fieldName != null">field_name = #{fieldName},</if>
<if test="fieldCode != null">field_code = #{fieldCode},</if>
<if test="targetNameDefine != null">target_name_define = #{targetNameDefine},</if>
<if test="targetCode != null">target_code = #{targetCode},</if>
<if test="targetUint != null">target_uint = #{targetUint},</if>
<if test="countYear != null">count_year = #{countYear},</if>
<if test="countMonth != null">count_month = #{countMonth},</if>
<if test="targetNameAlias != null">target_name_alias = #{targetNameAlias},</if>
<if test="valPlan != null">val_plan = #{valPlan},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteDcBusiPlanTargetMonthById" parameterType="Long">
delete from dc_busi_plan_target_month where id = #{id}
</delete>
<delete id="deleteDcBusiPlanTargetMonthByIds" parameterType="String">
delete from dc_busi_plan_target_month where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

2
lzbi-module/src/main/resources/mapper/asset/DcBusiWorkReadConfigMapper.xml

@ -49,6 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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 asset_code = #{assetCode}</if> <if test=" assetCode != null "> and asset_code = #{assetCode}</if>
</where> </where>
order by id desc
</select> </select>
<select id="selectDcBusiWorkReadConfigMainList" parameterType="com.lzbi.common.AssetQueryParams" resultMap="DcBusiWorkReadConfigResult"> <select id="selectDcBusiWorkReadConfigMainList" parameterType="com.lzbi.common.AssetQueryParams" resultMap="DcBusiWorkReadConfigResult">
select company_id, company_name, organize_name, oragnize_id, asset_code, asset_name,asset_field_code, asset_field_name,count(asset_param_code) as param_counts from dc_busi_work_read_config select company_id, company_name, organize_name, oragnize_id, asset_code, asset_name,asset_field_code, asset_field_name,count(asset_param_code) as param_counts from dc_busi_work_read_config
@ -62,6 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fieldName != null and fieldName != ''"> and asset_field_name like concat('%', #{assetFieldName}, '%')</if> <if test="fieldName != null and fieldName != ''"> and asset_field_name like concat('%', #{assetFieldName}, '%')</if>
</where> </where>
group by company_id, company_name, organize_name, oragnize_id, asset_code, asset_name,asset_field_code, asset_field_name group by company_id, company_name, organize_name, oragnize_id, asset_code, asset_name,asset_field_code, asset_field_name
order by company_name,organize_name,asset_field_name,asset_field_name
</select> </select>
<select id="selectDcBusiWorkReadConfigById" parameterType="Long" resultMap="DcBusiWorkReadConfigResult"> <select id="selectDcBusiWorkReadConfigById" parameterType="Long" resultMap="DcBusiWorkReadConfigResult">

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

@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="com.lzbi.targetFolder.domain.DcBaseAssetTargetDao" id="DcBaseAssetTargetResult"> <resultMap type="com.lzbi.targetFolder.domain.DcBaseAssetTargetDao" id="DcBaseAssetTargetResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="assetId" column="asset_id" /> <result property="assetId" column="asset_id" />
<result property="assetCode" column="asset_code" />
<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="targetCode" column="target_code" /> <result property="targetCode" column="target_code" />
@ -29,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectDcBaseAssetTargetVo"> <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 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 from dc_base_asset_target
</sql> </sql>
<select id="selectDcBaseAssetTargetDaoList" parameterType="DcBaseAssetTargetDao" resultMap="DcBaseAssetTargetResult"> <select id="selectDcBaseAssetTargetDaoList" parameterType="DcBaseAssetTargetDao" resultMap="DcBaseAssetTargetResult">
@ -40,13 +41,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="targetName != null and targetName != ''"> and target_name like concat('%', #{targetName}, '%')</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="targetCode != null and targetCode != ''"> and target_code = #{targetCode}</if>
<if test="targetField != null and targetField != ''"> and target_field = #{targetField}</if> <if test="targetField != null and targetField != ''"> and target_field = #{targetField}</if>
<if test="limitUp != null "> and limit_up = #{limitUp}</if> <if test="assetCode != null "> and asset_code = #{assetCode}</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> </where>
</select> </select>
@ -54,6 +50,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectDcBaseAssetTargetVo"/> <include refid="selectDcBaseAssetTargetVo"/>
where id = #{id} where id = #{id}
</select> </select>
<select id="selectDcBaseAssetTargetDaoByTargetCodeAndAssetId" parameterType="String" resultMap="DcBaseAssetTargetResult">
<include refid="selectDcBaseAssetTargetVo"/>
where target_code = #{targetCode} and asset_id = #{assetId}
</select>
<insert id="insertDcBaseAssetTargetDao" parameterType="DcBaseAssetTargetDao" useGeneratedKeys="true" keyProperty="id"> <insert id="insertDcBaseAssetTargetDao" parameterType="DcBaseAssetTargetDao" useGeneratedKeys="true" keyProperty="id">
insert into dc_base_asset_target insert into dc_base_asset_target

Loading…
Cancel
Save