Browse Source

2023-12-7 新增接口,新增查询方法

develop
zhousq 11 months ago
parent
commit
0dca68058a
  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. 1
      lzbi-module/src/main/java/com/lzbi/special/mapper/DcBaseWorkSpecialMapper.java
  14. 4
      lzbi-module/src/main/java/com/lzbi/special/service/DcBaseWorkSpecialService.java
  15. 11
      lzbi-module/src/main/java/com/lzbi/targetFolder/domain/DcBaseAssetTargetDao.java
  16. 4
      lzbi-module/src/main/resources/mapper/asset/DcBaseAssetInfoMapper.xml
  17. 5
      lzbi-module/src/main/resources/mapper/asset/DcBaseWorkSpecialMapper.xml
  18. 151
      lzbi-module/src/main/resources/mapper/asset/DcBusiPlanTargetMonthMapper.xml
  19. 2
      lzbi-module/src/main/resources/mapper/asset/DcBusiWorkReadConfigMapper.xml
  20. 12
      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;
import java.util.List;
import java.util.Optional;
import javax.servlet.http.HttpServletResponse;
import com.fasterxml.jackson.databind.ext.OptionalHandlerFactory;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
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.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.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.asset.domain.DcBusiWorkReadConfig;
import com.lzbi.asset.service.DcBusiWorkReadConfigService;
import com.lzbi.common.utils.StringUtils;
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
*
*
* @author zhousq
* @date 2023-12-04
*/
@RestController
@RequestMapping("/asset/assetExtConfig")
public class DcBusiWorkReadConfigController extends BaseController
{
public class DcBusiWorkReadConfigController extends BaseController {
@Autowired
private DcBusiWorkReadConfigService dcBusiWorkReadConfigService;
@Autowired
private ISysDeptService deptService;
@Autowired
private DcBaseWorkSpecialService specialService;
@Autowired
private IDcBaseAssetInfoService assetInfoService;
/**
* 查询互联参数读取数据对照列表
*/
@PostMapping("/list")
public TableDataInfo list(@RequestBody AssetQueryParams assetQueryParams)
{
public TableDataInfo list(@RequestBody AssetQueryParams assetQueryParams) {
//startPage();
PageHelper.startPage(assetQueryParams.getPageNum(), assetQueryParams.getPageSize());
List<DcBusiWorkReadConfig> list = dcBusiWorkReadConfigService.selectDcBusiWorkReadConfigMainList(assetQueryParams);
return getDataTable(list);
}
@PostMapping("/detail/list")
public TableDataInfo list(@RequestBody DcBusiWorkReadConfig dcBusiWorkReadConfig)
{
public TableDataInfo list(@RequestBody DcBusiWorkReadConfig dcBusiWorkReadConfig) {
//startPage();
dcBusiWorkReadConfig.setAssetCode(Optional.ofNullable(dcBusiWorkReadConfig.getAssetCode()).orElse("*"));
dcBusiWorkReadConfig.setAssetName(Optional.ofNullable(dcBusiWorkReadConfig.getAssetName()).orElse(""));
List<DcBusiWorkReadConfig> list = dcBusiWorkReadConfigService.selectDcBusiWorkReadConfigList(dcBusiWorkReadConfig);
return getDataTable(list);
}
/**
* 导出互联参数读取数据对照列表
*/
//@PreAuthorize("@ss.hasPermi('asset:assetExtConfig:export')")
@Log(title = "互联参数读取数据对照", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, DcBusiWorkReadConfig DcBusiWorkReadConfig)
{
List<DcBusiWorkReadConfig> list = dcBusiWorkReadConfigService.selectDcBusiWorkReadConfigList(DcBusiWorkReadConfig);
public void export(HttpServletResponse response, DcBusiWorkReadConfig dcBusiWorkReadConfig) {
List<DcBusiWorkReadConfig> list = dcBusiWorkReadConfigService.selectDcBusiWorkReadConfigList(dcBusiWorkReadConfig);
ExcelUtil<DcBusiWorkReadConfig> util = new ExcelUtil<DcBusiWorkReadConfig>(DcBusiWorkReadConfig.class);
util.exportExcel(response, list, "互联参数读取数据对照数据");
}
@ -81,8 +81,7 @@ public class DcBusiWorkReadConfigController extends BaseController
*/
//@PreAuthorize("@ss.hasPermi('asset:assetExtConfig:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(dcBusiWorkReadConfigService.selectDcBusiWorkReadConfigById(id));
}
@ -92,9 +91,26 @@ public class DcBusiWorkReadConfigController extends BaseController
///@PreAuthorize("@ss.hasPermi('asset:assetExtConfig:add')")
@Log(title = "互联参数读取数据对照", businessType = BusinessType.INSERT)
@PostMapping("/add")
public AjaxResult add(@RequestBody DcBusiWorkReadConfig DcBusiWorkReadConfig)
{
return toAjax(dcBusiWorkReadConfigService.insertDcBusiWorkReadConfig(DcBusiWorkReadConfig));
public AjaxResult add(@RequestBody JSONObject jParam) {
Long companyId = jParam.getLong("companyId");
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')")
@Log(title = "互联参数读取数据对照", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DcBusiWorkReadConfig DcBusiWorkReadConfig)
{
return toAjax(dcBusiWorkReadConfigService.updateDcBusiWorkReadConfig(DcBusiWorkReadConfig));
}
public AjaxResult edit(@RequestBody JSONObject jParam) {
Long companyId = jParam.getLong("companyId");
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)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] 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 = "")
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;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import com.lzbi.common.annotation.Excel;
import com.lzbi.module.base.BaseModuleEntity;
@ -16,6 +18,7 @@ public class DcBusiWorkReadConfig extends BaseModuleEntity
private static final long serialVersionUID = 1L;
/** 主键 */
@Excel(name = "主键")
@TableId(type= IdType.AUTO)
private Long id;
/** 公司ID */

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

@ -19,7 +19,7 @@ public interface DcBaseAssetInfoMapper {
* @return 资产信息
*/
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 资产信息
*/
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) {
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.setAssetCode(assetQueryParams.getAssetCode());
dcBaseAssetTargetDao.setAssetId(assetQueryParams.getAssetId());
dcBaseAssetTargetService.selectDcBaseAssetTargetDaoList(dcBaseAssetTargetDao);
return AjaxResult.success(null);
//dcBaseAssetTargetDao.setAssetId(assetQueryParams.getAssetId());
return AjaxResult.success(dcBaseAssetTargetService.selectDcBaseAssetTargetDaoList(dcBaseAssetTargetDao));
}
//
//获取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);
}
}

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

@ -22,6 +22,7 @@ public interface DcBaseWorkSpecialMapper extends BaseMapper<DcBaseWorkSpecial>
* @return 生产专业管理
*/
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);
}
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 = "统计单元编码")
private String assetCode;
private String value;
private String label;
public String getValue() {
return this.targetCode;
}
public String getLabel() {
return this.targetCode;
}
}

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

@ -71,6 +71,10 @@
where id = #{id}
</select>
<select id="selectDcBaseAssetInfoByCode" parameterType="String" resultMap="DcBaseAssetInfoResult">
<include refid="selectDcBaseAssetInfoVo"/>
where asset_code = #{assetCode}
</select>
<insert id="insertDcBaseAssetInfo" parameterType="DcBaseAssetInfo" useGeneratedKeys="true" keyProperty="id">
insert into dc_base_asset_info
<trim prefix="(" suffix=")" suffixOverrides=",">

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

@ -42,7 +42,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectDcBaseWorkSpecialVo"/>
where id = #{id}
</select>
<select id="selectDcBaseWorkSpecialByCode" parameterType="String" resultMap="DcBaseWorkSpecialResult">
<include refid="selectDcBaseWorkSpecialVo"/>
where special_code = #{specialCode}
</select>
<insert id="insertDcBaseWorkSpecial" parameterType="DcBaseWorkSpecial" useGeneratedKeys="true" keyProperty="id">
insert into dc_base_work_special
<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=" assetCode != null "> and asset_code = #{assetCode}</if>
</where>
order by id desc
</select>
<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
@ -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>
</where>
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 id="selectDcBusiWorkReadConfigById" parameterType="Long" resultMap="DcBusiWorkReadConfigResult">

12
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">
<result property="id" column="id" />
<result property="assetId" column="asset_id" />
<result property="assetCode" column="asset_code" />
<result property="targetModelCode" column="target_model_code" />
<result property="targetName" column="target_name" />
<result property="targetCode" column="target_code" />
@ -29,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectDcBaseAssetTargetVo">
select id, asset_id, target_model_code, target_name, target_code, target_field, limit_up, limit_down, value_base, flag_avg, flag_sum, flag_compute, sort, tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time from dc_base_asset_target
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>
<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="targetCode != null and targetCode != ''"> and target_code = #{targetCode}</if>
<if test="targetField != null and targetField != ''"> and target_field = #{targetField}</if>
<if test="limitUp != null "> and limit_up = #{limitUp}</if>
<if test="limitDown != null "> and limit_down = #{limitDown}</if>
<if test="valueBase != null "> and value_base = #{valueBase}</if>
<if test="flagAvg != null and flagAvg != ''"> and flag_avg = #{flagAvg}</if>
<if test="flagSum != null and flagSum != ''"> and flag_sum = #{flagSum}</if>
<if test="flagCompute != null and flagCompute != ''"> and flag_compute = #{flagCompute}</if>
<if test="sort != null and sort != ''"> and sort = #{sort}</if>
<if test="assetCode != null "> and asset_code = #{assetCode}</if>
</where>
</select>

Loading…
Cancel
Save