Browse Source

2023-12-19 指标采集单审核功能,指标、参数采集单及模版的bug修复

develop
zhousq 11 months ago
parent
commit
d8b8c72af5
  1. 17
      lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiParamCollectBill.java
  2. 107
      lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetBillMasterController.java
  3. 131
      lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetBillSubController.java
  4. 15
      lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetCollectBill.java
  5. 3
      lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamBillMaster.java
  6. 3
      lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetBillMaster.java
  7. 51
      lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetBillSub.java
  8. 4
      lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetBillMasterMapper.java
  9. 63
      lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetBillSubMapper.java
  10. 6
      lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetBillMasterService.java
  11. 91
      lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetBillSubService.java
  12. 9
      lzbi-module/src/main/java/com/lzbi/targetFolder/domain/DcBaseAssetTarget.java
  13. 8
      lzbi-module/src/main/resources/mapper/asset/DcBusiParamBillMasterMapper.xml
  14. 2
      lzbi-module/src/main/resources/mapper/draft/DcBusiBillModelMasterMapper.xml
  15. 23
      lzbi-module/src/main/resources/mapper/draft/DcBusiTargetBillMasterMapper.xml
  16. 138
      lzbi-module/src/main/resources/mapper/draft/DcBusiTargetBillSubMapper.xml

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

@ -177,13 +177,18 @@ public class DcBusiParamCollectBill extends BaseController
dcBusiBillModelMaster.setBillModelNo(billModelNo);
dcBusiBillModelMaster.setBillModelName(dcBusiParamBillMaster.getBiilModelName());
List<DcBusiBillModelSub> dcBusiBillModelSubList=new ArrayList<>();
JSONArray jsonArray=Optional.ofNullable(JSONArray.from(dcBusiParamBillMaster.getSubDatas())).orElse(new JSONArray());
jsonArray.forEach(item -> {
JSONObject datasets=Optional.ofNullable(dcBusiParamBillMaster.getSubDatas()).orElse(new JSONObject());
JSONArray dataArray=new JSONArray();
dataArray.addAll(datasets.getJSONArray("insertRecords"));
dataArray.addAll(datasets.getJSONArray("updateRecords"));
//JSONArray jsonArray=Optional.ofNullable(JSONArray.from(dcBusiParamBillMaster.getSubDatas())).orElse(new JSONArray());
dataArray.forEach(item -> {
JSONObject jsb = JSONObject.from(item);
DcBusiBillModelSub modelSub=new DcBusiBillModelSub();
modelSub.setBillModelNo(billModelNo);
modelSub.setAssetCode(jsb.getString("assetCode"));
modelSub.setAssetName(jsb.getString("assetName"));
modelSub.setAssetUnitAlialsName(jsb.getString("assetAlialsName"));
//modelSub.setAssetId(item.get);
modelSub.setAssetUnitCode(jsb.getString("paramCode"));
modelSub.setAssetUnitName(jsb.getString("paramName"));
@ -236,8 +241,12 @@ public class DcBusiParamCollectBill extends BaseController
dcBusiParamBillMaster.setOragnizeId(deptId);
sysDept = Optional.ofNullable(sysDeptService.selectDeptById(deptId)).orElse(new SysDept()) ;
dcBusiParamBillMaster.setOrganizeName(sysDept.getDeptName());
JSONArray jsonArray=Optional.ofNullable(JSONArray.from(dcBusiParamBillMaster.getSubDatas())).orElse(new JSONArray());
jsonArray.forEach(item->{
// JSONArray jsonArray=Optional.ofNullable(JSONArray.from(dcBusiParamBillMaster.getSubDatas())).orElse(new JSONArray());
JSONObject datasets=Optional.ofNullable(dcBusiParamBillMaster.getSubDatas()).orElse(new JSONObject());
JSONArray dataArray=new JSONArray();
dataArray.addAll(datasets.getJSONArray("insertRecords"));
dataArray.addAll(datasets.getJSONArray("updateRecords"));
dataArray.forEach(item->{
JSONObject jsb = JSONObject.from(item);
for(int i=1;i<25;i++){
String fname="val_"+String.valueOf(i);

107
lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetBillMasterController.java

@ -1,4 +1,11 @@
package com.lzbi.draft.controller;
import com.lzbi.common.utils.DateUtils;
import com.lzbi.common.utils.SecurityUtils;
import com.lzbi.draft.domain.DcBusiParamBillMaster;
import com.lzbi.draft.domain.DcBusiParamBillSub;
import com.lzbi.draft.domain.DcBusiTargetBillSub;
import com.lzbi.draft.service.DcBusiParamBillSubService;
import com.lzbi.draft.service.DcBusiTargetBillSubService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
@ -30,12 +37,13 @@ import com.lzbi.common.core.page.TableDataInfo;
* @date 2023-12-14
*/
@RestController
@RequestMapping("/draft/targetBillMaster")
@RequestMapping("/draft/targetInBill")
public class DcBusiTargetBillMasterController extends BaseController
{
@Autowired
private DcBusiTargetBillMasterService dcBusiTargetBillMasterService;
@Autowired
private DcBusiTargetBillSubService dcBusiTargetBillSubService;
/**
* 查询统计指标录入列表
*/
@ -43,7 +51,7 @@ public class DcBusiTargetBillMasterController extends BaseController
@ApiImplicitParams({
@ApiImplicitParam(name = "DcBusiTargetBillMaster", value = "", dataType = "DcBusiTargetBillMaster", dataTypeClass = DcBusiTargetBillMaster.class),
})
@PreAuthorize("@ss.hasPermi('draft:targetCollect:list')")
//@PreAuthorize("@ss.hasPermi('draft:targetCollect:list')")
@GetMapping("/list")
public TableDataInfo list(DcBusiTargetBillMaster DcBusiTargetBillMaster)
{
@ -52,80 +60,43 @@ public class DcBusiTargetBillMasterController extends BaseController
return getDataTable(list);
}
/**
* 导出统计指标录入列表
*/
@ApiOperation("导出统计指标录入列表")
@ApiImplicitParams({
@ApiImplicitParam(name = "DcBusiTargetBillMaster", value = "", dataType = "DcBusiTargetBillMaster", dataTypeClass = DcBusiTargetBillMaster.class),
})
@PreAuthorize("@ss.hasPermi('draft:targetCollect:export')")
@Log(title = "统计指标录入", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response,DcBusiTargetBillMaster DcBusiTargetBillMaster)
{
List<DcBusiTargetBillMaster> list = dcBusiTargetBillMasterService.selectDcBusiTargetBillMasterList(DcBusiTargetBillMaster);
ExcelUtil<DcBusiTargetBillMaster> util = new ExcelUtil<DcBusiTargetBillMaster>(DcBusiTargetBillMaster.class);
util.exportExcel(response, list, "统计指标录入数据");
}
/**
* 获取统计指标录入详细信息
*/
@ApiOperation("获取统计指标录入详细信息")
@ApiOperation("指标采集单详情")
@ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "", dataType = "Long", dataTypeClass = Long.class),
@ApiImplicitParam(name = "billNo", value = "", dataType = "String", dataTypeClass = String.class),
})
@PreAuthorize("@ss.hasPermi('draft:targetCollect:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(dcBusiTargetBillMasterService.selectDcBusiTargetBillMasterById(id));
@GetMapping("/detail/{billNo}")
public AjaxResult getParamInBillDetail(@PathVariable String billNo){
DcBusiTargetBillSub sub=new DcBusiTargetBillSub();
sub.setBillNo(billNo);
List<DcBusiTargetBillSub> list = dcBusiTargetBillSubService.selectDcBusiTargetBillSubList(sub);
return AjaxResult.success(list);
}
/**
* 新增统计指标录入
*/
@ApiOperation("新增统计指标录入")
@ApiOperation("采集单驳回")
@ApiImplicitParams({
@ApiImplicitParam(name = "DcBusiTargetBillMaster", value = "", dataType = "DcBusiTargetBillMaster", dataTypeClass = DcBusiTargetBillMaster.class),
})
@PreAuthorize("@ss.hasPermi('draft:targetCollect:add')")
@Log(title = "统计指标录入", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DcBusiTargetBillMaster DcBusiTargetBillMaster)
{
return toAjax(dcBusiTargetBillMasterService.insertDcBusiTargetBillMaster(DcBusiTargetBillMaster));
}
/**
* 修改统计指标录入
*/
@ApiOperation("修改统计指标录入")
@ApiImplicitParams({
@ApiImplicitParam(name = "DcBusiTargetBillMaster", value = "", dataType = "DcBusiTargetBillMaster", dataTypeClass = DcBusiTargetBillMaster.class),
@ApiImplicitParam(name = "billNo", value = "", dataType = "String", dataTypeClass = String.class),
})
@PreAuthorize("@ss.hasPermi('draft:targetCollect:edit')")
@Log(title = "统计指标录入", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DcBusiTargetBillMaster DcBusiTargetBillMaster)
{
return toAjax(dcBusiTargetBillMasterService.updateDcBusiTargetBillMaster(DcBusiTargetBillMaster));
@GetMapping("/checkBack/{billNo}")
public AjaxResult checkParamInBillBack(@PathVariable String billNo){
DcBusiTargetBillMaster master=new DcBusiTargetBillMaster();
master.setBillNo(billNo);
master.setUpdatedBy(SecurityUtils.getUsername());
master.setCreatedTime(DateUtils.getNowDate());
master.setCheckStatus("9");
return AjaxResult.success(dcBusiTargetBillMasterService.checkBill(master));
}
/**
* 删除统计指标录入
*/
@ApiOperation("删除统计指标录入")
@ApiOperation("采集单审核")
@ApiImplicitParams({
@ApiImplicitParam(name = "ids", value = "", dataType = "Long", dataTypeClass =Long.class),
@ApiImplicitParam(name = "billNo", value = "", dataType = "String", dataTypeClass = String.class),
})
@PreAuthorize("@ss.hasPermi('draft:targetCollect:remove')")
@Log(title = "统计指标录入", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(dcBusiTargetBillMasterService.deleteDcBusiTargetBillMasterByIds(ids));
@GetMapping("/check/{billNo}")
public AjaxResult checkParamInBill(@PathVariable String billNo){
DcBusiTargetBillMaster master=new DcBusiTargetBillMaster();
master.setUpdatedBy(SecurityUtils.getUsername());
master.setCreatedTime(DateUtils.getNowDate());
master.setBillNo(billNo);
master.setCheckStatus("1");
return AjaxResult.success(dcBusiTargetBillMasterService.checkBill(master));
}
}

131
lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetBillSubController.java

@ -0,0 +1,131 @@
package com.lzbi.draft.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.draft.domain. DcBusiTargetBillSub;
import com.lzbi.draft.service.DcBusiTargetBillSubService;
import com.lzbi.common.utils.poi.ExcelUtil;
import com.lzbi.common.core.page.TableDataInfo;
/**
* 指标数据采集录入明细Controller
*
* @author zhousq
* @date 2023-12-19
*/
@RestController
@RequestMapping("/draft/targetBIllSub")
public class DcBusiTargetBillSubController extends BaseController
{
@Autowired
private DcBusiTargetBillSubService dcBusiTargetBillSubService;
/**
* 查询指标数据采集录入明细列表
*/
@ApiOperation("查询指标数据采集(录入)明细列表")
@ApiImplicitParams({
@ApiImplicitParam(name = "DcBusiTargetBillSub", value = "", dataType = "DcBusiTargetBillSub", dataTypeClass = DcBusiTargetBillSub.class),
})
@PreAuthorize("@ss.hasPermi('draft:targetBIllSub:list')")
@GetMapping("/list")
public TableDataInfo list(DcBusiTargetBillSub DcBusiTargetBillSub)
{
startPage();
List< DcBusiTargetBillSub> list = dcBusiTargetBillSubService.selectDcBusiTargetBillSubList(DcBusiTargetBillSub);
return getDataTable(list);
}
/**
* 导出指标数据采集录入明细列表
*/
@ApiOperation("导出指标数据采集(录入)明细列表")
@ApiImplicitParams({
@ApiImplicitParam(name = "DcBusiTargetBillSub", value = "", dataType = "DcBusiTargetBillSub", dataTypeClass = DcBusiTargetBillSub.class),
})
@PreAuthorize("@ss.hasPermi('draft:targetBIllSub:export')")
@Log(title = "指标数据采集(录入)明细", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response,DcBusiTargetBillSub DcBusiTargetBillSub)
{
List<DcBusiTargetBillSub> list = dcBusiTargetBillSubService.selectDcBusiTargetBillSubList(DcBusiTargetBillSub);
ExcelUtil<DcBusiTargetBillSub> util = new ExcelUtil<DcBusiTargetBillSub>(DcBusiTargetBillSub.class);
util.exportExcel(response, list, "指标数据采集(录入)明细数据");
}
/**
* 获取指标数据采集录入明细详细信息
*/
@ApiOperation("获取指标数据采集(录入)明细详细信息")
@ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "", dataType = "Long", dataTypeClass = Long.class),
})
@PreAuthorize("@ss.hasPermi('draft:targetBIllSub:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(dcBusiTargetBillSubService.selectDcBusiTargetBillSubById(id));
}
/**
* 新增指标数据采集录入明细
*/
@ApiOperation("新增指标数据采集(录入)明细")
@ApiImplicitParams({
@ApiImplicitParam(name = "DcBusiTargetBillSub", value = "", dataType = "DcBusiTargetBillSub", dataTypeClass = DcBusiTargetBillSub.class),
})
@PreAuthorize("@ss.hasPermi('draft:targetBIllSub:add')")
@Log(title = "指标数据采集(录入)明细", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DcBusiTargetBillSub DcBusiTargetBillSub)
{
return toAjax(dcBusiTargetBillSubService.insertDcBusiTargetBillSub(DcBusiTargetBillSub));
}
/**
* 修改指标数据采集录入明细
*/
@ApiOperation("修改指标数据采集(录入)明细")
@ApiImplicitParams({
@ApiImplicitParam(name = "DcBusiTargetBillSub", value = "", dataType = "DcBusiTargetBillSub", dataTypeClass = DcBusiTargetBillSub.class),
})
@PreAuthorize("@ss.hasPermi('draft:targetBIllSub:edit')")
@Log(title = "指标数据采集(录入)明细", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DcBusiTargetBillSub DcBusiTargetBillSub)
{
return toAjax(dcBusiTargetBillSubService.updateDcBusiTargetBillSub(DcBusiTargetBillSub));
}
/**
* 删除指标数据采集录入明细
*/
@ApiOperation("删除指标数据采集(录入)明细")
@ApiImplicitParams({
@ApiImplicitParam(name = "ids", value = "", dataType = "Long", dataTypeClass =Long.class),
})
@PreAuthorize("@ss.hasPermi('draft:targetBIllSub:remove')")
@Log(title = "指标数据采集(录入)明细", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(dcBusiTargetBillSubService.deleteDcBusiTargetBillSubByIds(ids));
}
}

15
lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetCollectBill.java

@ -173,13 +173,17 @@ public class DcBusiTargetCollectBill extends BaseController
dcBusiBillModelMaster.setBillModelNo(billModelNo);
dcBusiBillModelMaster.setBillModelName(dcBusiParamBillMaster.getBiilModelName());
List<DcBusiBillModelSub> dcBusiBillModelSubList=new ArrayList<>();
JSONArray jsonArray=Optional.ofNullable(JSONArray.from(dcBusiParamBillMaster.getSubDatas())).orElse(new JSONArray());
jsonArray.forEach(item -> {
JSONObject datasets=Optional.ofNullable(dcBusiParamBillMaster.getSubDatas()).orElse(new JSONObject());
JSONArray dataArray=new JSONArray();
dataArray.addAll(datasets.getJSONArray("insertRecords"));
dataArray.addAll(datasets.getJSONArray("updateRecords"));
dataArray.forEach(item -> {
JSONObject jsb = JSONObject.from(item);
DcBusiBillModelSub modelSub=new DcBusiBillModelSub();
modelSub.setBillModelNo(billModelNo);
modelSub.setAssetCode(jsb.getString("assetCode"));
modelSub.setAssetName(jsb.getString("assetName"));
modelSub.setAssetUnitAlialsName(jsb.getString("assetAlialsName"));
//modelSub.setAssetId(item.get);
modelSub.setAssetUnitCode(jsb.getString("targetCode"));
modelSub.setAssetUnitName(jsb.getString("targetName"));
@ -232,8 +236,11 @@ public class DcBusiTargetCollectBill extends BaseController
dcBusiTargetBillMaster.setOragnizeId(deptId);
sysDept = Optional.ofNullable(sysDeptService.selectDeptById(deptId)).orElse(new SysDept()) ;
dcBusiTargetBillMaster.setOrganizeName(sysDept.getDeptName());
JSONArray jsonArray=Optional.ofNullable(JSONArray.from(dcBusiTargetBillMaster.getSubDatas())).orElse(new JSONArray());
jsonArray.forEach(item->{
JSONObject datasets=Optional.ofNullable(dcBusiTargetBillMaster.getSubDatas()).orElse(new JSONObject());
JSONArray dataArray=new JSONArray();
dataArray.addAll(datasets.getJSONArray("insertRecords"));
dataArray.addAll(datasets.getJSONArray("updateRecords"));
dataArray.forEach(item->{
JSONObject jsb = JSONObject.from(item);
for(int i=1;i<31;i++){
String fname="val_"+String.valueOf(i);

3
lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamBillMaster.java

@ -1,6 +1,7 @@
package com.lzbi.draft.domain;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.annotation.IdType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -82,7 +83,7 @@ public class DcBusiParamBillMaster extends BaseModuleEntity
/** 参数数据采集(录入)明细信息 */
private List<DcBusiParamBillSub> dcBusiParamBillSubList;
@ApiModelProperty(name = "data数组数据未转换",notes = "")
private JSONArray subDatas;
private JSONObject subDatas;

3
lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetBillMaster.java

@ -4,6 +4,7 @@ import java.util.List;
import java.util.Date;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
@ -96,5 +97,5 @@ public class DcBusiTargetBillMaster extends BaseModuleEntity
@ApiModelProperty(name = "专业名称",notes = "")
private String fieldName;
@ApiModelProperty(name = "data数组数据未转换",notes = "")
private JSONArray subDatas;
private JSONObject subDatas;
}

51
lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetBillSub.java

@ -2,17 +2,12 @@ package com.lzbi.draft.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import lombok.Data;
import io.swagger.annotations.ApiModelProperty;
import lombok.experimental.Accessors;
import com.lzbi.common.annotation.Excel;
import com.lzbi.module.base.BaseModuleEntity;
@ -20,76 +15,82 @@ import com.lzbi.module.base.BaseModuleEntity;
* 指标数据采集录入明细对象 dc_busi_target_bill_sub
*
* @author zhousq
* @date 2023-12-14
* @date 2023-12-19
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ApiModel(value = "指标数据采集(录入)明细表",description = "")
@TableName("dc_busi_target_bill_sub")
public class DcBusiTargetBillSub extends BaseModuleEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
@ApiModelProperty(name = "主键",notes = "")
private Long id;
/** 单据编码 */
@Excel(name = "单据编码")
@ApiModelProperty(name = "单据编码",notes = "")
@ApiModelProperty(name = "单据编码",notes = "billNo")
private String billNo;
/** 指标名称 */
@Excel(name = "指标名称")
@ApiModelProperty(name = "指标名称",notes = "")
@ApiModelProperty(name = "指标名称",notes = "targetName")
private String targetName;
/** 指标编码 */
@Excel(name = "指标编码")
@ApiModelProperty(name = "指标编码",notes = "")
@ApiModelProperty(name = "指标编码",notes = "targetCode")
private String targetCode;
/** 指标单位 */
@Excel(name = "指标单位")
@ApiModelProperty(name = "指标单位",notes = "")
@ApiModelProperty(name = "指标单位",notes = "targetUint")
private String targetUint;
/** 指标值 */
@Excel(name = "指标值")
@ApiModelProperty(name = "指标值",notes = "")
@ApiModelProperty(name = "指标值",notes = "targetValue")
private Double targetValue;
/** 统计日期 */
@Excel(name = "统计日期")
@ApiModelProperty(name = "统计日期",notes = "")
@ApiModelProperty(name = "统计日期",notes = "countDate")
private String countDate;
/** 天 */
@Excel(name = "天")
@ApiModelProperty(name = "天",notes = "")
@ApiModelProperty(name = "天",notes = "countDay")
private Integer countDay;
/** 所属专业编码 */
@Excel(name = "所属专业编码")
@ApiModelProperty(name = "所属专业编码",notes = "")
@ApiModelProperty(name = "所属专业编码",notes = "fieldCode")
private String fieldCode;
/** 所属专业名称 */
@Excel(name = "所属专业名称")
@ApiModelProperty(name = "所属专业名称",notes = "")
@ApiModelProperty(name = "所属专业名称",notes = "fieldName")
private String fieldName;
/** 统计单元编码 */
@Excel(name = "统计单元编码")
@ApiModelProperty(name = "统计单元编码",notes = "")
@ApiModelProperty(name = "统计单元编码",notes = "assetCode")
private String assetCode;
/** 统计单元名称 */
@Excel(name = "统计单元名称")
@ApiModelProperty(name = "统计单元名称",notes = "")
@ApiModelProperty(name = "统计单元名称",notes = "assetName")
private String assetName;
/** 创建人 */
private String createdBy;
/** 创建时间 */
private Date createdTime;
/** 更新人 */
private String updatedBy;
/** 更新时间 */
private Date updatedTime;
}

4
lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetBillMasterMapper.java

@ -1,6 +1,8 @@
package com.lzbi.draft.mapper;
import java.util.List;
import com.lzbi.draft.domain.DcBusiParamBillMaster;
import com.lzbi.draft.domain.DcBusiTargetBillMaster;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lzbi.draft.domain.DcBusiTargetBillSub;
@ -29,7 +31,7 @@ public interface DcBusiTargetBillMasterMapper extends BaseMapper<DcBusiTargetBil
* @return 统计指标录入集合
*/
public List<DcBusiTargetBillMaster> selectDcBusiTargetBillMasterList(DcBusiTargetBillMaster dcBusiTargetBillMaster);
public int updateDcBusiTargetBillMasterByVo(DcBusiTargetBillMaster dcBusiTargetBillMaster);
/**
* 新增统计指标录入
*

63
lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetBillSubMapper.java

@ -0,0 +1,63 @@
package com.lzbi.draft.mapper;
import java.util.List;
import com.lzbi.draft.domain.DcBusiTargetBillSub;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 指标数据采集录入明细Mapper接口
*
* @author zhousq
* @date 2023-12-19
*/
public interface DcBusiTargetBillSubMapper extends BaseMapper<DcBusiTargetBillSub>
{
/**
* 查询指标数据采集录入明细
*
* @param id 指标数据采集录入明细主键
* @return 指标数据采集录入明细
*/
public DcBusiTargetBillSub selectDcBusiTargetBillSubById(Long id);
/**
* 查询指标数据采集录入明细列表
*
* @param dcBusiTargetBillSub 指标数据采集录入明细
* @return 指标数据采集录入明细集合
*/
public List<DcBusiTargetBillSub> selectDcBusiTargetBillSubList(DcBusiTargetBillSub dcBusiTargetBillSub);
/**
* 新增指标数据采集录入明细
*
* @param dcBusiTargetBillSub 指标数据采集录入明细
* @return 结果
*/
public int insertDcBusiTargetBillSub(DcBusiTargetBillSub dcBusiTargetBillSub);
/**
* 修改指标数据采集录入明细
*
* @param dcBusiTargetBillSub 指标数据采集录入明细
* @return 结果
*/
public int updateDcBusiTargetBillSub(DcBusiTargetBillSub dcBusiTargetBillSub);
/**
* 删除指标数据采集录入明细
*
* @param id 指标数据采集录入明细主键
* @return 结果
*/
public int deleteDcBusiTargetBillSubById(Long id);
/**
* 批量删除指标数据采集录入明细
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteDcBusiTargetBillSubByIds(Long[] ids);
}

6
lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetBillMasterService.java

@ -3,6 +3,7 @@ package com.lzbi.draft.service;
import java.util.List;
import com.lzbi.common.utils.DateUtils;
import com.lzbi.common.utils.StringUtils;
import com.lzbi.draft.domain.DcBusiParamBillMaster;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import com.lzbi.common.utils.DateUtils;
@ -43,7 +44,10 @@ public class DcBusiTargetBillMasterService extends ServiceImpl<DcBusiTargetBillM
{
return baseMapper.selectDcBusiTargetBillMasterList(dcBusiTargetBillMaster);
}
public int checkBill(DcBusiTargetBillMaster dcBusiTargetBillMaster)
{
return baseMapper.updateDcBusiTargetBillMasterByVo(dcBusiTargetBillMaster);
}
/**
* 新增统计指标录入
*

91
lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetBillSubService.java

@ -0,0 +1,91 @@
package com.lzbi.draft.service;
import java.util.List;
import com.lzbi.common.utils.DateUtils;
import org.springframework.stereotype.Service;
import com.lzbi.draft.domain.DcBusiTargetBillSub;
import com.lzbi.draft.mapper.DcBusiTargetBillSubMapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* 指标数据采集录入明细Service业务层处理
*
* @author zhousq
* @date 2023-12-19
*/
@Service
public class DcBusiTargetBillSubService extends ServiceImpl<DcBusiTargetBillSubMapper, DcBusiTargetBillSub> implements IService<DcBusiTargetBillSub>
{
/**
* 查询指标数据采集录入明细
*
* @param id 指标数据采集录入明细主键
* @return 指标数据采集录入明细
*/
public DcBusiTargetBillSub selectDcBusiTargetBillSubById(Long id)
{
return baseMapper.selectDcBusiTargetBillSubById(id);
}
/**
* 查询指标数据采集录入明细列表
*
* @param dcBusiTargetBillSub 指标数据采集录入明细
* @return 指标数据采集录入明细
*/
public List<DcBusiTargetBillSub> selectDcBusiTargetBillSubList(DcBusiTargetBillSub dcBusiTargetBillSub)
{
return baseMapper.selectDcBusiTargetBillSubList(dcBusiTargetBillSub);
}
/**
* 新增指标数据采集录入明细
*
* @param dcBusiTargetBillSub 指标数据采集录入明细
* @return 结果
*/
public int insertDcBusiTargetBillSub(DcBusiTargetBillSub dcBusiTargetBillSub)
{
dcBusiTargetBillSub.setCreatedTime(DateUtils.getNowDate());
return baseMapper.insertDcBusiTargetBillSub(dcBusiTargetBillSub);
}
/**
* 修改指标数据采集录入明细
*
* @param dcBusiTargetBillSub 指标数据采集录入明细
* @return 结果
*/
public int updateDcBusiTargetBillSub(DcBusiTargetBillSub dcBusiTargetBillSub)
{
dcBusiTargetBillSub.setUpdatedTime(DateUtils.getNowDate());
return baseMapper.updateDcBusiTargetBillSub(dcBusiTargetBillSub);
}
/**
* 批量删除指标数据采集录入明细
*
* @param ids 需要删除的指标数据采集录入明细主键
* @return 结果
*/
public int deleteDcBusiTargetBillSubByIds(Long[] ids)
{
return baseMapper.deleteDcBusiTargetBillSubByIds(ids);
}
/**
* 删除指标数据采集录入明细信息
*
* @param id 指标数据采集录入明细主键
* @return 结果
*/
public int deleteDcBusiTargetBillSubById(Long id)
{
return baseMapper.deleteDcBusiTargetBillSubById(id);
}
}

9
lzbi-module/src/main/java/com/lzbi/targetFolder/domain/DcBaseAssetTarget.java

@ -115,4 +115,13 @@ public class DcBaseAssetTarget extends BaseModuleEntity
@ApiModelProperty(name = "用户id",notes = "userId")
private Long userId;
public String getValue() {
return this.targetCode;
}
public String getLabel() {
return this.targetName;
}
}

8
lzbi-module/src/main/resources/mapper/asset/DcBusiParamBillMasterMapper.xml

@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="checkType" column="check_type" />
<result property="checkStatus" column="check_status" />
<result property="companyId" column="company_id" />
<result property="companyName" column="companyName" />
<result property="companyName" column="company_name" />
<result property="organizeName" column="organize_name" />
<result property="oragnizeId" column="oragnize_id" />
@ -52,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectDcBusiParamBillMasterVo">
select TENANT_ID, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, DELETE_BY, DELETE_TIME, id, bill_no, bill_income_date, bill_type, check_type, check_status from dc_busi_param_bill_master
select TENANT_ID, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, DELETE_BY, DELETE_TIME, id, bill_no, bill_income_date, bill_type, check_type, check_status,company_id,company_name,organize_name,oragnize_id from dc_busi_param_bill_master
</sql>
<select id="selectDcBusiParamBillMasterDaoList" parameterType="DcBusiParamBillMaster" resultMap="DcBusiParamBillMasterResult">
@ -182,9 +182,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<insert id="batchDcBusiParamBillSubDao">
insert into dc_busi_param_bill_sub( TENANT_ID, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, DELETE_BY, DELETE_TIME, id, bill_no, asset_code,asset_name, field_code, field_name, param_code, param_value,count_date,count_hour) values
insert into dc_busi_param_bill_sub( TENANT_ID, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, DELETE_BY, DELETE_TIME, id, bill_no, asset_code,asset_name, field_code, field_name, param_code, param_value,count_date,count_hour,param_name) values
<foreach item="item" index="index" collection="list" separator=",">
( #{item.tenantId}, #{item.createdBy}, #{item.createdTime}, #{item.updatedBy}, #{item.updatedTime}, #{item.deleteBy}, #{item.deleteTime}, #{item.id}, #{item.billNo}, #{item.assetCode}, #{item.assetName}, #{item.fieldCode}, #{item.fieldName},#{item.paramCode}, #{item.paramValue}, #{item.countDate}, #{item.countHour})
( #{item.tenantId}, #{item.createdBy}, #{item.createdTime}, #{item.updatedBy}, #{item.updatedTime}, #{item.deleteBy}, #{item.deleteTime}, #{item.id}, #{item.billNo}, #{item.assetCode}, #{item.assetName}, #{item.fieldCode}, #{item.fieldName},#{item.paramCode}, #{item.paramValue}, #{item.countDate}, #{item.countHour},#{item.paramName})
</foreach>
</insert>
</mapper>

2
lzbi-module/src/main/resources/mapper/draft/DcBusiBillModelMasterMapper.xml

@ -74,7 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDcBusiBillModelMasterById" parameterType="Long" resultMap="DcBusiBillModelMasterDcBusiBillModelSubResult">
select a.tenant_id, a.revision, a.created_by, a.created_time, a.updated_by, a.updated_time, a.delete_by, a.delete_time, a.dept_id, a.role_id, a.bill_model_no, a.bill_model_name, a.field_code, a.company_name, a.company_id, a.bill_model_point, a.org_name, a.org_id, a.id, a.data_state, a.use_state, a.field_name,a.model_type,
b.bill_model_no as sub_bill_model_no, b.asset_code as sub_asset_code, b.asset_name as sub_asset_name, b.asset_unit_code as sub_asset_unit_code, b.asset_unit_name as sub_asset_unit_name, b.asset_unit_type as sub_asset_unit_type, b.id as sub_id, b.asset_id as sub_asset_id,asset_unit_alials_name as sub_asset_unit_alials_name,a_unit as sub_a_unit
b.bill_model_no as sub_bill_model_no, b.asset_code as sub_asset_code, b.asset_name as sub_asset_name, b.asset_unit_code as sub_asset_unit_code, b.asset_unit_name as sub_asset_unit_name, b.asset_unit_type as sub_asset_unit_type, b.id as sub_id, b.asset_id as sub_asset_id,b.asset_unit_alials_name as sub_asset_unit_alials_name,b.a_unit as sub_a_unit
from dc_busi_bill_model_master a
left join dc_busi_bill_model_sub b on b.bill_model_no = a.bill_model_no
where a.id = #{id}

23
lzbi-module/src/main/resources/mapper/draft/DcBusiTargetBillMasterMapper.xml

@ -144,7 +144,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
where id = #{id}
</update>
<update id="updateDcBusiTargetBillMasterByVo" parameterType="DcBusiTargetBillMaster">
update dc_busi_target_bill_master
<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="billIncomeDate != null">bill_income_date = #{billIncomeDate},</if>
<if test="billType != null">bill_type = #{billType},</if>
<if test="checkType != null">check_type = #{checkType},</if>
<if test="checkStatus != null">check_status = #{checkStatus},</if>
<if test="companyId != null">company_id = #{companyId},</if>
<if test="companyName != null">company_name = #{companyName},</if>
<if test="organizeName != null">organize_name = #{organizeName},</if>
<if test="oragnizeId != null">oragnize_id = #{oragnizeId},</if>
</trim>
where bill_no = #{billNo}
</update>
<delete id="deleteDcBusiTargetBillMasterById" parameterType="Long">
delete from dc_busi_target_bill_master where id = #{id}
</delete>

138
lzbi-module/src/main/resources/mapper/draft/DcBusiTargetBillSubMapper.xml

@ -0,0 +1,138 @@
<?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.draft.mapper.DcBusiTargetBillSubMapper">
<resultMap type="com.lzbi.draft.domain.DcBusiTargetBillSub" id="DcBusiTargetBillSubResult">
<result property="id" column="id" />
<result property="billNo" column="bill_no" />
<result property="targetName" column="target_name" />
<result property="targetCode" column="target_code" />
<result property="targetUint" column="target_uint" />
<result property="targetValue" column="target_value" />
<result property="countDate" column="count_date" />
<result property="countDay" column="count_day" />
<result property="fieldCode" column="field_code" />
<result property="fieldName" column="field_name" />
<result property="assetCode" column="asset_code" />
<result property="assetName" column="asset_name" />
<result property="tenantId" column="tenant_id" />
<result property="revision" column="revision" />
<result property="createdBy" column="created_by" />
<result property="createdTime" column="created_time" />
<result property="updatedBy" column="updated_by" />
<result property="updatedTime" column="updated_time" />
<result property="deleteBy" column="delete_by" />
<result property="deleteTime" column="delete_time" />
</resultMap>
<sql id="selectDcBusiTargetBillSubVo">
select id, bill_no, target_name, target_code, target_uint, target_value, count_date, count_day, field_code, field_name, asset_code, asset_name, tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time from dc_busi_target_bill_sub
</sql>
<select id="selectDcBusiTargetBillSubList" parameterType="DcBusiTargetBillSub" resultMap="DcBusiTargetBillSubResult">
<include refid="selectDcBusiTargetBillSubVo"/>
<where>
<if test="billNo != null and billNo != ''"> and bill_no = #{billNo}</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="targetUint != null and targetUint != ''"> and target_uint = #{targetUint}</if>
<if test="targetValue != null "> and target_value = #{targetValue}</if>
<if test="countDate != null and countDate != ''"> and count_date = #{countDate}</if>
<if test="countDay != null "> and count_day = #{countDay}</if>
<if test="fieldCode != null and fieldCode != ''"> and field_code = #{fieldCode}</if>
<if test="fieldName != null and fieldName != ''"> and field_name like concat('%', #{fieldName}, '%')</if>
<if test="assetCode != null and assetCode != ''"> and asset_code = #{assetCode}</if>
<if test="assetName != null and assetName != ''"> and asset_name like concat('%', #{assetName}, '%')</if>
</where>
</select>
<select id="selectDcBusiTargetBillSubById" parameterType="Long" resultMap="DcBusiTargetBillSubResult">
<include refid="selectDcBusiTargetBillSubVo"/>
where id = #{id}
</select>
<insert id="insertDcBusiTargetBillSub" parameterType="DcBusiTargetBillSub" useGeneratedKeys="true" keyProperty="id">
insert into dc_busi_target_bill_sub
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="billNo != null">bill_no,</if>
<if test="targetName != null">target_name,</if>
<if test="targetCode != null">target_code,</if>
<if test="targetUint != null">target_uint,</if>
<if test="targetValue != null">target_value,</if>
<if test="countDate != null">count_date,</if>
<if test="countDay != null">count_day,</if>
<if test="fieldCode != null">field_code,</if>
<if test="fieldName != null">field_name,</if>
<if test="assetCode != null">asset_code,</if>
<if test="assetName != null">asset_name,</if>
<if test="tenantId != null">tenant_id,</if>
<if test="revision != null">revision,</if>
<if test="createdBy != null">created_by,</if>
<if test="createdTime != null">created_time,</if>
<if test="updatedBy != null">updated_by,</if>
<if test="updatedTime != null">updated_time,</if>
<if test="deleteBy != null">delete_by,</if>
<if test="deleteTime != null">delete_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="billNo != null">#{billNo},</if>
<if test="targetName != null">#{targetName},</if>
<if test="targetCode != null">#{targetCode},</if>
<if test="targetUint != null">#{targetUint},</if>
<if test="targetValue != null">#{targetValue},</if>
<if test="countDate != null">#{countDate},</if>
<if test="countDay != null">#{countDay},</if>
<if test="fieldCode != null">#{fieldCode},</if>
<if test="fieldName != null">#{fieldName},</if>
<if test="assetCode != null">#{assetCode},</if>
<if test="assetName != null">#{assetName},</if>
<if test="tenantId != null">#{tenantId},</if>
<if test="revision != null">#{revision},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="createdTime != null">#{createdTime},</if>
<if test="updatedBy != null">#{updatedBy},</if>
<if test="updatedTime != null">#{updatedTime},</if>
<if test="deleteBy != null">#{deleteBy},</if>
<if test="deleteTime != null">#{deleteTime},</if>
</trim>
</insert>
<update id="updateDcBusiTargetBillSub" parameterType="DcBusiTargetBillSub">
update dc_busi_target_bill_sub
<trim prefix="SET" suffixOverrides=",">
<if test="billNo != null">bill_no = #{billNo},</if>
<if test="targetName != null">target_name = #{targetName},</if>
<if test="targetCode != null">target_code = #{targetCode},</if>
<if test="targetUint != null">target_uint = #{targetUint},</if>
<if test="targetValue != null">target_value = #{targetValue},</if>
<if test="countDate != null">count_date = #{countDate},</if>
<if test="countDay != null">count_day = #{countDay},</if>
<if test="fieldCode != null">field_code = #{fieldCode},</if>
<if test="fieldName != null">field_name = #{fieldName},</if>
<if test="assetCode != null">asset_code = #{assetCode},</if>
<if test="assetName != null">asset_name = #{assetName},</if>
<if test="tenantId != null">tenant_id = #{tenantId},</if>
<if test="revision != null">revision = #{revision},</if>
<if test="createdBy != null">created_by = #{createdBy},</if>
<if test="createdTime != null">created_time = #{createdTime},</if>
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
<if test="deleteBy != null">delete_by = #{deleteBy},</if>
<if test="deleteTime != null">delete_time = #{deleteTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteDcBusiTargetBillSubById" parameterType="Long">
delete from dc_busi_target_bill_sub where id = #{id}
</delete>
<delete id="deleteDcBusiTargetBillSubByIds" parameterType="String">
delete from dc_busi_target_bill_sub where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
Loading…
Cancel
Save