Commit c85eb13a authored by chenyuefang's avatar chenyuefang

Merge remote-tracking branch 'origin/V20231129-中建一局二公司' into V20231129-中建一局二公司

parents a9179dbd db7cfc0b
package com.dsk.cscec.constant;
/**
* 二期项目常量信息
*
* @author sxk
* @date 2024.02.05
* @time 15:29
*/
public interface CbSceneExpenseConstants {
/**
* 菜单来源:文件表
*/
Integer MENU_SOURCE_FILE_TABLE = 0;
/**
* 菜单来源:财务一体化系统
*/
Integer MENU_SOURCE_FINANCE_SYSTEM = 1;
/**
* 菜单层级一级(顶级)
*/
Integer MENU_LEVEL1 = 1;
/**
* 菜单层级二级
*/
Integer MENU_LEVEL2 = 2;
}
......@@ -17,6 +17,7 @@ import com.dsk.common.helper.LoginHelper;
import com.dsk.common.utils.poi.ExcelUtil;
import com.dsk.common.utils.redis.RedisUtils;
import com.dsk.cscec.domain.CbCostMeasure;
import com.dsk.cscec.domain.CbProjectExpenseSummary;
import com.dsk.cscec.domain.bo.CbCostMeasureActualBo;
import com.dsk.cscec.domain.bo.CbCostMeasureActualPushBo;
import com.dsk.cscec.domain.bo.CbCostMeasureActualSaveBo;
......@@ -24,6 +25,7 @@ import com.dsk.cscec.domain.vo.CbCostMeasureActualVo;
import com.dsk.cscec.domain.vo.CbCostMeasuresImportVo;
import com.dsk.cscec.domain.vo.CbCostMeasuresItemVo;
import com.dsk.cscec.listener.ProjectCostMeasureImportListener;
import com.dsk.cscec.service.CbProjectExpenseSummaryService;
import com.dsk.cscec.service.ICbCostMeasureService;
import com.dsk.system.domain.vo.SysUserImportVo;
import com.dsk.system.listener.SysUserImportListener;
......@@ -38,8 +40,10 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 措施费导入
......@@ -55,6 +59,10 @@ public class CbCostMeasureController {
private ICbCostMeasureService cbCostMeasureService;
@Autowired
private CbProjectExpenseSummaryService cbProjectExpenseSummaryService;
/**
* 措施费一级大类
* 根据项目查询措施费一级大类
......@@ -150,7 +158,22 @@ public class CbCostMeasureController {
// @SaCheckPermission("system:user:import")
@PostMapping(value = "/importData", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
public R<Void> importData(@RequestPart("file") MultipartFile file, Long projectId) throws Exception {
cbCostMeasureService.importExcelData(file,projectId);
String name = file.getOriginalFilename();
cbCostMeasureService.importExcelData(file.getInputStream(),name,null,projectId);
return R.ok();
}
/**
* 措施费导入数据
*
* @param projectId 项目id
*/
@SaIgnore
@Log(title = "措施费导入", businessType = BusinessType.IMPORT)
@PostMapping(value = "/parseCbCostMeasureFile")
public R<Void> parseCbCostMeasureFile(Long projectId) throws Exception {
cbCostMeasureService.parseCbCostMeasureFile(projectId);
return R.ok();
}
......@@ -168,11 +191,23 @@ public class CbCostMeasureController {
@PostMapping(value = "/summary/importData", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
public R<Void> importSummaryData(@RequestPart("file") MultipartFile file, Long projectId) throws Exception {
Integer dataType=2;
cbCostMeasureService.importExcelSummaryData(file,projectId,dataType);
cbCostMeasureService.importExcelSummaryData(file.getInputStream(),projectId,null,dataType);
return R.ok();
}
@SaIgnore
@Log(title = "措施费汇总获取")
// @SaCheckPermission("system:user:import")
@PostMapping(value = "/summary/data")
public R<List<CbProjectExpenseSummary>> summaryData(Long projectId) throws Exception {
Integer dataType=2;
List<CbProjectExpenseSummary> cbProjectExpenseSummaries = cbProjectExpenseSummaryService.queryCbSceneExpenseSummaryDataByType(projectId, dataType);
return R.ok(cbProjectExpenseSummaries);
}
public static void main(String[] args) throws FileNotFoundException {
List list =new ArrayList<>();
......@@ -180,7 +215,7 @@ public class CbCostMeasureController {
FileInputStream inputStream=new FileInputStream(file);
ExcelResult<CbCostMeasuresImportVo> result = ExcelUtil.importExcel(inputStream, CbCostMeasuresImportVo.class, new ProjectCostMeasureImportListener(1L,1));
ExcelResult<CbCostMeasuresImportVo> result = ExcelUtil.importExcel(inputStream, CbCostMeasuresImportVo.class, new ProjectCostMeasureImportListener(1L));
String analysis = result.getAnalysis();
List<CbCostMeasuresImportVo> list1 = result.getList();
......
......@@ -58,9 +58,9 @@ public class CbProjectOtherController {
public R<List<CbProjectExpenseSummary>> statistics(@PathVariable Long projectId) {
CbProjectExpenseSummary expenseSummary = new CbProjectExpenseSummary();
expenseSummary.setProjectId(projectId);
expenseSummary.setDataType(2);
expenseSummary.setDataType(3);
QueryWrapper<CbProjectExpenseSummary> queryWrapper = Wrappers.query(expenseSummary);
queryWrapper.select("id","expense_name as expenseName","expense_value as expenseValue");
queryWrapper.select("id","expense_name as expenseName","expense_value as expenseValue","proportion");
queryWrapper.orderByAsc("id");
List<CbProjectExpenseSummary> expenseSummaryList = this.cbProjectExpenseSummaryService.list(queryWrapper);
if (ObjectUtil.isEmpty(expenseSummaryList)) {
......
package com.dsk.cscec.controller;
import com.dsk.common.core.controller.BaseController;
import com.dsk.common.core.domain.R;
import com.dsk.common.helper.LoginHelper;
import com.dsk.cscec.domain.CbSceneExpenseChildren;
import com.dsk.cscec.domain.bo.CbSceneExpenseChildrenDataBo;
import com.dsk.cscec.domain.vo.CbSceneExpenseMenuVo;
import com.dsk.cscec.service.CbSceneExpenseChildrenService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.validation.constraints.NotNull;
import java.util.List;
import java.util.Objects;
/**
* 现场经费-工资统筹、其他费用、现场管理费表(CbSceneExpenseChildren)表控制层
......@@ -22,6 +30,29 @@ public class CbSceneExpenseChildrenController extends BaseController {
@Resource
private CbSceneExpenseChildrenService baseService;
/**
* 获取现场经费菜单
*/
@GetMapping("/getMenuList/{projectId}")
public R<List<CbSceneExpenseMenuVo>> getMenuList(@NotNull(message = "项目ID不能为空") @PathVariable Long projectId) {
return R.ok(baseService.getMenuList(projectId));
}
}
/**
* 现场经费二级分类数据解析
*/
@GetMapping("/parseChildrenData/{projectId}")
public R<Void> parseSceneExpenseChildrenData(@PathVariable Long projectId) throws Exception {
String username = Objects.requireNonNull(LoginHelper.getLoginUser()).getUsername();
baseService.parseSceneExpenseChildrenData(projectId, 1, username);
return R.ok();
}
/**
* 获取现场经费二级分类数据
*/
@GetMapping("/getChildrenData")
public R<List<CbSceneExpenseChildren>> getChildrenData(@Validated @RequestBody CbSceneExpenseChildrenDataBo childrenDataBo) {
return R.ok(baseService.getChildrenData(childrenDataBo));
}
}
\ No newline at end of file
......@@ -28,7 +28,7 @@ public class CbCostMeasure {
/**
* 成本阶段( 0:标前成本、1:标后成本、2:转固成本)
*/
private Integer cbStage;
private Long projectFileId;
/**
* 父项id
......
package com.dsk.cscec.domain;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.dsk.common.core.domain.BaseEntity;
import com.dsk.common.annotation.Excel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.Date;
/**
* 现场经费-工资统筹、其他费用、现场管理费表(CbSceneExpenseChildren)实体类
......@@ -14,9 +16,8 @@ import java.io.Serializable;
* @author sxk
* @since 2024-02-22 09:59:00
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class CbSceneExpenseChildren extends BaseEntity implements Serializable {
public class CbSceneExpenseChildren implements Serializable {
private static final long serialVersionUID = 895279707061984760L;
/**
* 主键ID
......@@ -28,64 +29,73 @@ public class CbSceneExpenseChildren extends BaseEntity implements Serializable {
*/
private Long projectId;
/**
* 成本阶段(0:标前成本、1:标后成本、2:转固成本)
* 项目文件ID
*/
private Integer cbStage;
/**
* 父级ID
*/
private Long parentId;
private Long projectFileId;
/**
* 序号
*/
@Excel(name = "序号")
private String number;
/**
* 排序
*/
private Integer sort;
/**
* 数据类型(0:工资统筹、1:现场管理费、2:其他费用)
*/
private Integer dataType;
/**
* 名称
*/
@Excel(name = "名称")
private String expenseName;
/**
* 单位
*/
@Excel(name = "单位")
private String unit;
/**
* 成本数量-工资统筹表
*/
private Integer cbCount;
@Excel(name = "成本数量")
private String cbCount;
/**
* 使用时间-其他费用表
*/
private Integer useTime;
@Excel(name = "使用时间")
private String useTime;
/**
* 工程量-现场管理费表
*/
@Excel(name = "工程量")
private String engineeringVolume;
/**
* 增值税税率-现场管理费表
*/
@Excel(name = "增值税税率")
private String addedTaxRate;
/**
* 公司单价/不含税单价
*/
@Excel(name = "公司单价")
private String unitPrice;
/**
* 目标成本合价(不含税)/不含税合价
*/
private String excludeTaxSumPrice;
@Excel(name = "目标成本合价(不含税)")
private String targetCbSumPriceExcludeTax;
/**
* 目标成本合价(含税)/含税合价
*/
private String includeTaxSumPrice;
@Excel(name = "目标成本合价(含税)")
private String targetCbSumPriceIncludeTax;
/**
* 备注
*/
@Excel(name = "备注")
private String remark;
/**
* 成本科目
*/
@Excel(name = "成本科目")
private String cbSubject;
/**
* 税金类型
*/
@Excel(name = "税金类型")
private String taxType;
/**
* 删除状态(0:否、2:是)
......@@ -93,7 +103,13 @@ public class CbSceneExpenseChildren extends BaseEntity implements Serializable {
@TableLogic(value = "0", delval = "2")
private Integer delFlag;
/**
* 备注
* 创建者
*/
private String remark;
@TableField(fill = FieldFill.INSERT)
private String createBy;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
private Date createTime;
}
package com.dsk.cscec.domain.bo;
import lombok.Data;
import javax.validation.constraints.NotNull;
/**
* @author sxk
* @date 2024.02.22
* @time 15:22
*/
@Data
public class CbSceneExpenseChildrenDataBo {
/**
* 项目ID
*/
@NotNull(message = "项目ID不能为空")
private Long projectId;
/**
* 项目文件ID
*/
@NotNull(message = "文件ID不能为空")
private Long fileId;
}
package com.dsk.cscec.domain.bo;
import com.dsk.common.annotation.Excel;
import com.dsk.cscec.domain.CbSceneExpenseChildren;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* @author sxk
* @date 2024.02.26
* @time 16:38
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class CbSceneExpenseChildrenImportBo extends CbSceneExpenseChildren {
/**
* 公司单价/不含税单价
*/
@Excel(name = "不含税单价(元)")
private String excludeTaxUnitPrice;
/**
* 目标成本合价(不含税)/不含税合价
*/
@Excel(name = "不含税合价(元)")
private String excludeTaxSumPrice;
/**
* 目标成本合价(含税)/含税合价
*/
@Excel(name = "含税合价(元)")
private String includeTaxSumPrice;
}
......@@ -32,14 +32,12 @@ import java.util.regex.Pattern;
public class ProjectCostMeasureImportListener extends AnalysisEventListener<CbCostMeasuresImportVo> implements ExcelListener<CbCostMeasuresImportVo> {
private final CbCostMeasureServiceImpl cbCostMeasureService;
//
// private final String password;
private final Long projectId;
private final Integer cbStage;
private List<CbCostMeasuresImportVo> dataList = new ArrayList<>();
private List<String> errList = new ArrayList<>();
// private final String operName;
private int successNum = 0;
......@@ -47,10 +45,8 @@ public class ProjectCostMeasureImportListener extends AnalysisEventListener<CbCo
private final StringBuilder successMsg = new StringBuilder();
private final StringBuilder failureMsg = new StringBuilder();
public ProjectCostMeasureImportListener(Long projectId, Integer cbStage) {
// String initPassword = SpringUtils.getBean(ISysConfigService.class).selectConfigByKey("sys.user.initPassword");
public ProjectCostMeasureImportListener(Long projectId) {
this.cbCostMeasureService = SpringUtils.getBean(CbCostMeasureServiceImpl.class);
this.cbStage = cbStage;
this.projectId = projectId;
// this.operName = LoginHelper.getUsername();
}
......@@ -62,11 +58,14 @@ public class ProjectCostMeasureImportListener extends AnalysisEventListener<CbCo
if (StrUtil.isEmpty(importVo.getItemContent())) {
failureNum++;
failureMsg.append("<br/>" + rowIndex + "行 解析失败:清单内容不能为空");
errList.add(failureMsg.toString());
return;
}
String number = importVo.getNumber();
if (StrUtil.isEmpty(number)) {
failureNum++;
failureMsg.append("<br/>" + rowIndex + "行 解析失败:序号不能为空");
errList.add(failureMsg.toString());
}
Boolean numberMatch = false;
......@@ -79,6 +78,7 @@ public class ProjectCostMeasureImportListener extends AnalysisEventListener<CbCo
} else {
failureNum++;
failureMsg.append("<br/>" + rowIndex + "行 解析失败:序号格式错误");
errList.add(failureMsg.toString());
}
......@@ -186,7 +186,7 @@ public class ProjectCostMeasureImportListener extends AnalysisEventListener<CbCo
public String getAnalysis() {
if (failureNum > 0) {
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
throw new ServiceException(failureMsg.toString());
// throw new ServiceException(failureMsg.toString());
} else {
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
}
......@@ -200,7 +200,7 @@ public class ProjectCostMeasureImportListener extends AnalysisEventListener<CbCo
@Override
public List<String> getErrorList() {
return null;
return errList;
}
};
}
......
......@@ -35,10 +35,11 @@ public class ProjectCostMeasureSummaryImportListener extends AnalysisEventListen
// private final String password;
private final Long projectId;
private final Integer cbStage;
private final Long fileId;
private final Integer dataType;
private List<CbProjectExpenseSummaryImportVo> dataList = new ArrayList<>();
private List<String> errorList = new ArrayList<>();
// private final String operName;
......@@ -47,9 +48,9 @@ public class ProjectCostMeasureSummaryImportListener extends AnalysisEventListen
private final StringBuilder successMsg = new StringBuilder();
private final StringBuilder failureMsg = new StringBuilder();
public ProjectCostMeasureSummaryImportListener(Long projectId, Integer cbStage,Integer dataType) {
public ProjectCostMeasureSummaryImportListener(Long projectId, Long fileId,Integer dataType) {
this.cbProjectExpenseSummaryService = SpringUtils.getBean(CbProjectExpenseSummaryService.class);
this.cbStage = cbStage;
this.fileId = fileId;
this.projectId = projectId;
this.dataType=dataType;
}
......@@ -60,10 +61,17 @@ public class ProjectCostMeasureSummaryImportListener extends AnalysisEventListen
CbProjectExpenseSummary cbProjectExpenseSummary=new CbProjectExpenseSummary();
BeanUtil.copyProperties(importVo,cbProjectExpenseSummary);
cbProjectExpenseSummary.setProjectId(projectId);
cbProjectExpenseSummary.setCbStage(cbStage);
cbProjectExpenseSummary.setProjectFileId(fileId);
cbProjectExpenseSummary.setDataType(dataType);
cbProjectExpenseSummary.setCreateBy(LoginHelper.getUsername());
cbProjectExpenseSummaryService.save(cbProjectExpenseSummary);
// cbProjectExpenseSummary.setCreateBy(LoginHelper.getUsername());
boolean save = cbProjectExpenseSummaryService.save(cbProjectExpenseSummary);
if(!save){
String errmsg = context.readRowHolder().getRowIndex() + " error";
log.debug("ProjectCostMeasureSummaryImportListener.invoke() "+errmsg);
errorList.add(errmsg);
}
successNum+=1;
dataList.add(importVo);
}
......@@ -94,7 +102,7 @@ public class ProjectCostMeasureSummaryImportListener extends AnalysisEventListen
@Override
public List<String> getErrorList() {
return null;
return errorList;
}
};
}
......
......@@ -65,7 +65,7 @@ public interface CbSummaryMapper extends BaseMapper<CbSummary> {
CbGainLossAnalysisListVo getGainLossAnalysisById(@Param("id") Long id, @Param("expenseDate") String expenseDate);
List<CbGainLossAnalysisListVo> getGainLossAnalysisByParentId(@Param("id") Long parentId, @Param("expenseDate") String expenseDate);
List<CbGainLossAnalysisListVo> getGainLossAnalysisByParentId(@Param("parentId") Long parentId, @Param("expenseDate") String expenseDate);
......
......@@ -22,4 +22,7 @@ public interface CbProjectExpenseSummaryService extends IService<CbProjectExpens
* @return 现场经费汇总数据
*/
List<CbProjectExpenseSummary> getCbSceneExpenseSummaryData(Long projectId);
List<CbProjectExpenseSummary> queryCbSceneExpenseSummaryDataByType(Long projectId,Integer dataType);
}
......@@ -56,4 +56,15 @@ public interface CbProjectFileService extends IService<CbProjectFile> {
*/
List<CbProjectFile> selectAnalysisList(Long projectId, Integer cbType, Integer cbStage);
/**
* 更新项目文件状态
*
* @param projectId 项目ID
* @param cbType CB型
* @param fileId 文件ID文件ID
* @param errmsg RMSG
* @return boolean
*/
boolean UpdateProjectFileStatus(Long fileId,String errmsg,Integer status);
}
......@@ -2,6 +2,10 @@ package com.dsk.cscec.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dsk.cscec.domain.CbSceneExpenseChildren;
import com.dsk.cscec.domain.bo.CbSceneExpenseChildrenDataBo;
import com.dsk.cscec.domain.vo.CbSceneExpenseMenuVo;
import java.util.List;
/**
* 现场经费-工资统筹、其他费用、现场管理费表(CbSceneExpenseChildren)表服务接口
......@@ -10,5 +14,28 @@ import com.dsk.cscec.domain.CbSceneExpenseChildren;
* @since 2024-02-22 09:59:01
*/
public interface CbSceneExpenseChildrenService extends IService<CbSceneExpenseChildren> {
/**
* 获取现场经费菜单
*
* @param projectId 项目ID
* @return 菜单
*/
List<CbSceneExpenseMenuVo> getMenuList(Long projectId);
/**
* 现场经费二级分类数据解析
*
* @param projectId 项目ID
* @param cbStage 成本阶段
* @param username 用户名
*/
void parseSceneExpenseChildrenData(Long projectId, Integer cbStage, String username) throws Exception;
/**
* 获取现场经费二级分类数据
*
* @param childrenDataBo 查询体
* @return 现场经费二级分类数据
*/
List<CbSceneExpenseChildren> getChildrenData(CbSceneExpenseChildrenDataBo childrenDataBo);
}
......@@ -5,6 +5,7 @@ import com.dsk.common.core.domain.PageQuery;
import com.dsk.common.core.domain.entity.SysDictData;
import com.dsk.common.core.page.TableDataInfo;
import com.dsk.cscec.domain.CbCostMeasure;
import com.dsk.cscec.domain.CbProjectExpenseSummary;
import com.dsk.cscec.domain.bo.CbCostMeasureActualBo;
import com.dsk.cscec.domain.bo.CbCostMeasureActualPushBo;
import com.dsk.cscec.domain.bo.CbCostMeasureActualSaveBo;
......@@ -12,6 +13,7 @@ import com.dsk.cscec.domain.vo.CbCostMeasureActualVo;
import com.dsk.cscec.domain.vo.CbCostMeasuresItemVo;
import org.springframework.web.multipart.MultipartFile;
import java.io.InputStream;
import java.util.List;
import java.util.Map;
......@@ -23,7 +25,7 @@ import java.util.Map;
*/
public interface ICbCostMeasureService extends IService<CbCostMeasure> {
void importExcelData(MultipartFile file, Long projectId);
void importExcelData(InputStream inputStream, String fileName,Long fileId, Long projectId);
List<Map<String, Object>> listByLevel(Long projectId, int i);
......@@ -33,6 +35,10 @@ public interface ICbCostMeasureService extends IService<CbCostMeasure> {
void pushCostMeasureActual(CbCostMeasureActualPushBo pushBo);
void importExcelSummaryData(MultipartFile file, Long projectId,Integer dataType);
List<String> importExcelSummaryData(InputStream inputStream, Long projectId,Long fileId, Integer dataType);
void parseCbCostMeasureFile(Long projectId);
boolean reparseCbCostMeasureFile(Long projectId,Long projectFileId);
}
......@@ -6,45 +6,37 @@ import cn.hutool.core.io.file.FileNameUtil;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.ReUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpUtil;
import com.alibaba.excel.EasyExcel;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dsk.common.core.domain.PageQuery;
import com.dsk.common.core.domain.entity.SysDictData;
import com.dsk.common.core.page.TableDataInfo;
import com.dsk.common.excel.ExcelResult;
import com.dsk.common.helper.LoginHelper;
import com.dsk.common.utils.JsonUtils;
import com.dsk.common.utils.StringUtils;
import com.dsk.common.utils.poi.ExcelUtil;
import com.dsk.cscec.domain.CbCostMeasureActual;
import com.dsk.cscec.domain.CbProjectRecord;
import com.dsk.cscec.domain.DCustomer;
import com.dsk.cscec.constant.CbProjectConstants;
import com.dsk.cscec.domain.*;
import com.dsk.cscec.domain.bo.CbCostMeasureActualBo;
import com.dsk.cscec.domain.bo.CbCostMeasureActualPushBo;
import com.dsk.cscec.domain.bo.CbCostMeasureActualSaveBo;
import com.dsk.cscec.domain.vo.CbCostMeasureActualVo;
import com.dsk.cscec.domain.vo.CbCostMeasuresImportVo;
import com.dsk.cscec.domain.vo.CbCostMeasuresItemVo;
import com.dsk.cscec.domain.vo.CbProjectExpenseSummaryImportVo;
import com.dsk.cscec.listener.ProjectCostMeasureImportListener;
import com.dsk.cscec.listener.ProjectCostMeasureSummaryImportListener;
import com.dsk.cscec.mapper.CbCostMeasureActualMapper;
import com.dsk.cscec.service.CbProjectRecordService;
import com.dsk.cscec.service.ICbCostMeasureActualService;
import com.dsk.cscec.service.ICbCostMeasureService;
import com.dsk.cscec.service.*;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dsk.cscec.mapper.CbCostMeasureMapper;
import com.dsk.cscec.domain.CbCostMeasure;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.transaction.annotation.Transactional;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
......@@ -67,35 +59,48 @@ public class CbCostMeasureServiceImpl extends ServiceImpl<CbCostMeasureMapper, C
@Autowired
private ICbCostMeasureActualService cbCostMeasureActualService;
@Autowired
private CbProjectFileService cbProjectFileService;
@Autowired
private CbProjectExpenseSummaryService cbProjectExpenseSummaryService;
@SneakyThrows
@Override
public void importExcelData(MultipartFile file, Long projectId) {
String name = file.getOriginalFilename();
name = FileNameUtil.getPrefix(name);
CbProjectRecord byId = cbProjectRecordService.getById(projectId);
Assert.notNull(byId, "项目信息不能为空");
Integer cbStage = byId.getCbStage();
ProjectCostMeasureImportListener importListener = new ProjectCostMeasureImportListener(projectId, cbStage);
EasyExcel.read(file.getInputStream(), CbCostMeasuresImportVo.class, importListener).sheet().doRead();
public void importExcelData(InputStream inputStream, String fileName, Long fileId, Long projectId) {
// 检查项目
checkProjectExist(projectId);
ProjectCostMeasureImportListener importListener = new ProjectCostMeasureImportListener(projectId);
EasyExcel.read(inputStream, CbCostMeasuresImportVo.class, importListener).sheet().doRead();
ExcelResult<CbCostMeasuresImportVo> result = importListener.getExcelResult();
String analysis = result.getAnalysis();
List<CbCostMeasuresImportVo> list = result.getList();
if (CollectionUtil.isEmpty(list)) {
List<String> errorList = result.getErrorList();
if (CollectionUtil.isNotEmpty(errorList) || CollectionUtil.isEmpty(list)) {
//解析失败
log.debug(">>>>解析失败" + list.size());
//todo 解析失败更新文件备注
cbProjectFileService.UpdateProjectFileStatus(fileId, analysis, CbProjectConstants.PROJECT_FILE_STATUS_PARSE_FAIL);
return;
}
log.debug(">>>>" + list.size());
//删除 该项目历史解析数据
LambdaQueryWrapper<CbCostMeasure> summaryLambdaQueryWrapper = Wrappers.lambdaQuery();
summaryLambdaQueryWrapper.eq(CbCostMeasure::getProjectId, projectId);
summaryLambdaQueryWrapper.eq(ObjectUtil.isNotEmpty(fileId), CbCostMeasure::getProjectFileId, fileId);
this.remove(summaryLambdaQueryWrapper);
CbCostMeasure rootCbCostMeasure = new CbCostMeasure();
rootCbCostMeasure.setItemContent(name);
rootCbCostMeasure.setItemContent(fileName);
rootCbCostMeasure.setLevel(0);
rootCbCostMeasure.setParentId(0L);
rootCbCostMeasure.setProjectId(projectId);
rootCbCostMeasure.setCbStage(cbStage);
if (ObjectUtil.isNotEmpty(fileId)) {
rootCbCostMeasure.setProjectFileId(fileId);
}
LambdaQueryWrapper<CbCostMeasure> tWrapper = Wrappers.lambdaQuery(rootCbCostMeasure);
CbCostMeasure rootMeasure = this.getOne(tWrapper);
......@@ -112,7 +117,7 @@ public class CbCostMeasureServiceImpl extends ServiceImpl<CbCostMeasureMapper, C
CbCostMeasure cbCostMeasure = new CbCostMeasure();
cbCostMeasure.setProjectId(projectId);
cbCostMeasure.setCbStage(cbStage);
cbCostMeasure.setProjectFileId(fileId);
//保存一级节点
if (ReUtil.isMatch(firstPattern, number) || ReUtil.isMatch(pattern3, number)) {
BeanUtil.copyProperties(importVo, cbCostMeasure);
......@@ -122,7 +127,7 @@ public class CbCostMeasureServiceImpl extends ServiceImpl<CbCostMeasureMapper, C
} else if (ReUtil.isMatch(secondPattern, number)) {
BeanUtil.copyProperties(importVo, cbCostMeasure);
// 根据no查询父级节点
CbCostMeasure parentCbCostMeasure = getCbCostMeasure(rootMeasuresId, number, projectId, cbStage);
CbCostMeasure parentCbCostMeasure = getCbCostMeasure(rootMeasuresId, number, projectId);
String[] split = number.split("\\.");
cbCostMeasure.setLevel(split.length);
cbCostMeasure.setParentId(parentCbCostMeasure.getId());
......@@ -131,6 +136,8 @@ public class CbCostMeasureServiceImpl extends ServiceImpl<CbCostMeasureMapper, C
cbCostMeasure.setNo(newNo);
this.save(cbCostMeasure);
}
cbProjectFileService.UpdateProjectFileStatus(fileId, null, CbProjectConstants.PROJECT_FILE_STATUS_PARSE_SUCCESS);
}
}
......@@ -144,10 +151,9 @@ public class CbCostMeasureServiceImpl extends ServiceImpl<CbCostMeasureMapper, C
CbCostMeasure rootCbCostMeasure = new CbCostMeasure();
rootCbCostMeasure.setParentId(0L);
rootCbCostMeasure.setProjectId(projectId);
rootCbCostMeasure.setCbStage(byId.getCbStage());
QueryWrapper<CbCostMeasure> tWrapper = Wrappers.query(rootCbCostMeasure);
tWrapper.select("id","item_content as itemContent");
tWrapper.select("id", "item_content as itemContent");
tWrapper.orderByAsc("id");
List<Map<String, Object>> mapList = this.listMaps(tWrapper);
......@@ -161,8 +167,6 @@ public class CbCostMeasureServiceImpl extends ServiceImpl<CbCostMeasureMapper, C
Assert.notNull(costMeasureActualBo.getProjectId(), "项目ID不能为空");
CbProjectRecord byId = cbProjectRecordService.getById(costMeasureActualBo.getProjectId());
Assert.notNull(byId, "项目信息不能为空");
costMeasureActualBo.setCbStage(byId.getCbStage());
//查询项目某项措施费所有计划成本
dataList = baseMapper.selectListByProjectAndNo(costMeasureActualBo);
// if (CollectionUtil.isEmpty(dataList)) {
......@@ -182,10 +186,10 @@ public class CbCostMeasureServiceImpl extends ServiceImpl<CbCostMeasureMapper, C
@Override
public void saveBatchCostMeasureActual(List<CbCostMeasureActualSaveBo> boList) {
List<CbCostMeasureActual> saveList=new ArrayList<>();
List<CbCostMeasureActual> saveList = new ArrayList<>();
for (CbCostMeasureActualSaveBo cbCostMeasureActualSaveBo : boList) {
CbCostMeasureActual cbCostMeasureActual =new CbCostMeasureActual();
BeanUtil.copyProperties(cbCostMeasureActualSaveBo,cbCostMeasureActual);
CbCostMeasureActual cbCostMeasureActual = new CbCostMeasureActual();
BeanUtil.copyProperties(cbCostMeasureActualSaveBo, cbCostMeasureActual);
cbCostMeasureActual.setDelFlag(0);
cbCostMeasureActual.setUpdateId(LoginHelper.getUserId());
cbCostMeasureActual.setUpdateUser(LoginHelper.getUsername());
......@@ -199,8 +203,7 @@ public class CbCostMeasureServiceImpl extends ServiceImpl<CbCostMeasureMapper, C
//todo 推送到Ipm系统
CbCostMeasureActual cbCostMeasureActual =new CbCostMeasureActual();
CbCostMeasureActual cbCostMeasureActual = new CbCostMeasureActual();
cbCostMeasureActual.setId(pushBo.getId());
cbCostMeasureActual.setPushTime(new Date());
cbCostMeasureActual.setPushDataJson(JsonUtils.toJsonString(pushBo));
......@@ -209,12 +212,111 @@ public class CbCostMeasureServiceImpl extends ServiceImpl<CbCostMeasureMapper, C
@SneakyThrows
@Override
public void importExcelSummaryData(MultipartFile file, Long projectId,Integer dataType) {
public List<String> importExcelSummaryData(InputStream inputStream, Long projectId,Long fileId, Integer dataType) {
CbProjectRecord byId = cbProjectRecordService.getById(projectId);
Assert.notNull(byId, "项目信息不能为空");
Integer cbStage = byId.getCbStage();
ExcelUtil.importExcel(file.getInputStream(), CbProjectExpenseSummaryImportVo.class,new ProjectCostMeasureSummaryImportListener(projectId,cbStage,dataType));
// 删除历史数据
LambdaUpdateWrapper<CbProjectExpenseSummary> summaryLambdaQueryWrapper = Wrappers.lambdaUpdate();
summaryLambdaQueryWrapper.eq(CbProjectExpenseSummary::getProjectId, projectId);
summaryLambdaQueryWrapper.eq(CbProjectExpenseSummary::getDataType, 2);
cbProjectExpenseSummaryService.remove(summaryLambdaQueryWrapper);
ExcelResult<CbProjectExpenseSummaryImportVo> excelResult = ExcelUtil.importExcel(inputStream, CbProjectExpenseSummaryImportVo.class, new ProjectCostMeasureSummaryImportListener(projectId, fileId, dataType));
List<String> errorList = excelResult.getErrorList();
if (CollectionUtil.isNotEmpty(errorList) || CollectionUtil.isEmpty(excelResult.getList())) {
return errorList;
}
return null;
}
@Transactional(rollbackFor = Exception.class)
@Override
public void parseCbCostMeasureFile(Long projectId) {
// 检查项目
checkProjectExist(projectId);
//获取项目待解析文件
List<CbProjectFile> cbProjectFiles = new ArrayList<>();
cbProjectFiles = cbProjectFileService.list(new LambdaQueryWrapper<CbProjectFile>()
.eq(CbProjectFile::getProjectId, projectId)
.eq(CbProjectFile::getFileParseStatus, CbProjectConstants.PROJECT_FILE_STATUS_PARSING)
.eq(CbProjectFile::getCbType, CbProjectConstants.CB_TYPE_MEASURE_PROJECT)
);
if (CollectionUtil.isEmpty(cbProjectFiles)) {
log.debug("措施费数据文件不存在");
return;
}
for (CbProjectFile cbProjectFile : cbProjectFiles) {
String fileName = cbProjectFile.getFileName();
String prefix = FileNameUtil.getPrefix(fileName);
// 解析汇总
if ("措施费".equals(prefix)) {
byte[] bytes = HttpUtil.downloadBytes(cbProjectFile.getFileOssUrl());
InputStream inputStream = new ByteArrayInputStream(bytes);
List<String> errlist = importExcelSummaryData(inputStream, projectId,cbProjectFile.getId(), 2);
if (CollectionUtil.isNotEmpty(errlist)) {
cbProjectFile.setFileParseStatus(CbProjectConstants.PROJECT_FILE_STATUS_PARSE_FAIL);
} else {
// 修改文件解析状态
cbProjectFile.setFileParseStatus(CbProjectConstants.PROJECT_FILE_STATUS_PARSE_SUCCESS);
}
cbProjectFileService.updateById(cbProjectFile);
} else {
byte[] bytes = HttpUtil.downloadBytes(cbProjectFile.getFileOssUrl());
InputStream inputStream = new ByteArrayInputStream(bytes);
importExcelData(inputStream, prefix, cbProjectFile.getId(), projectId);
}
}
}
private void checkProjectExist(Long projectId){
CbProjectRecord byId = cbProjectRecordService.getById(projectId);
Assert.notNull(byId, "项目信息不能为空");
}
@Override
public boolean reparseCbCostMeasureFile(Long projectId, Long projectFileId) {
// 查询项目
CbProjectRecord byId = cbProjectRecordService.getById(projectId);
Assert.notNull(byId, "项目信息不能为空");
List<CbProjectFile> cbProjectFiles = new ArrayList<>();
Assert.notNull(projectFileId, "措施费文件ID不能为空");
if (ObjectUtil.isNotEmpty(projectFileId)) {
CbProjectFile cbProjectFile = cbProjectFileService.getById(projectFileId);
Assert.notNull(cbProjectFile, "措施费导入文件不存在");
String fileName = cbProjectFile.getFileName();
String prefix = FileNameUtil.getPrefix(fileName);
// 解析汇总
if ("措施费".equals(prefix)) {
byte[] bytes = HttpUtil.downloadBytes(cbProjectFile.getFileOssUrl());
InputStream inputStream = new ByteArrayInputStream(bytes);
List<String> errlist = importExcelSummaryData(inputStream, projectId,projectFileId, 2);
if (CollectionUtil.isNotEmpty(errlist)) {
cbProjectFile.setFileParseStatus(CbProjectConstants.PROJECT_FILE_STATUS_PARSE_FAIL);
} else {
// 修改文件解析状态
cbProjectFile.setFileParseStatus(CbProjectConstants.PROJECT_FILE_STATUS_PARSE_SUCCESS);
}
} else {
byte[] bytes = HttpUtil.downloadBytes(cbProjectFile.getFileOssUrl());
InputStream inputStream = new ByteArrayInputStream(bytes);
importExcelData(inputStream, prefix, cbProjectFile.getId(), projectId);
}
//更新
return true;
}
return false;
}
......@@ -226,13 +328,12 @@ public class CbCostMeasureServiceImpl extends ServiceImpl<CbCostMeasureMapper, C
* @param cbStage
* @return
*/
public CbCostMeasure getCbCostMeasure(Long rootMeasuresId, String number, Long projectId, Integer cbStage) {
public CbCostMeasure getCbCostMeasure(Long rootMeasuresId, String number, Long projectId) {
String parentNo = number.substring(0, number.lastIndexOf('.'));
parentNo = String.valueOf(rootMeasuresId).concat(".").concat(parentNo);
CbCostMeasure rootCbCostMeasure = new CbCostMeasure();
rootCbCostMeasure.setNo(parentNo);
rootCbCostMeasure.setProjectId(projectId);
rootCbCostMeasure.setCbStage(cbStage);
LambdaQueryWrapper<CbCostMeasure> tWrapper = Wrappers.lambdaQuery(rootCbCostMeasure);
CbCostMeasure rootMeasure = this.getOne(tWrapper);
return rootMeasure;
......
......@@ -139,6 +139,16 @@ public class CbProjectExpenseSummaryServiceImpl extends ServiceImpl<CbProjectExp
.eq(CbProjectExpenseSummary::getDataType, CbProjectConstants.CB_TYPE_SCENE_EXPENSE));
}
@Override
public List<CbProjectExpenseSummary> queryCbSceneExpenseSummaryDataByType(Long projectId, Integer dataType) {
//校验项目是否存在
this.checkProjectExist(projectId);
return baseMapper.selectList(new LambdaQueryWrapper<CbProjectExpenseSummary>()
.eq(CbProjectExpenseSummary::getProjectId, projectId)
.eq(CbProjectExpenseSummary::getDataType, dataType));
}
/**
* 校验项目是否存在
*
......
......@@ -167,6 +167,16 @@ public class CbProjectFileServiceImpl extends ServiceImpl<CbProjectFileMapper, C
return baseMapper.selectAnalysisList(projectId, cbType, cbStage);
}
@Override
public boolean UpdateProjectFileStatus(Long fileId, String errmsg,Integer status) {
CbProjectFile cbProjectFile=new CbProjectFile();
cbProjectFile.setId(fileId);
cbProjectFile.setFailRemark(errmsg);
cbProjectFile.setFileParseStatus(status);
boolean b = this.updateById(cbProjectFile);
return b;
}
/**
* 校验项目是否存在
*
......
......@@ -22,10 +22,7 @@ import com.dsk.cscec.domain.vo.CbProjectCbStageNotDraftVo;
import com.dsk.cscec.domain.vo.CbProjectRecordSearchVo;
import com.dsk.cscec.mapper.CbProjectFileMapper;
import com.dsk.cscec.mapper.CbProjectRecordMapper;
import com.dsk.cscec.service.CbProjectExpenseSummaryService;
import com.dsk.cscec.service.CbProjectOtherService;
import com.dsk.cscec.service.CbProjectRecordService;
import com.dsk.cscec.service.CbSummaryService;
import com.dsk.cscec.service.*;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -54,6 +51,8 @@ public class CbProjectRecordServiceImpl extends ServiceImpl<CbProjectRecordMappe
@Resource
private CbProjectExpenseSummaryService projectExpenseSummaryService;
@Resource
private CbSceneExpenseChildrenService sceneExpenseChildrenService;
@Resource
private CbProjectOtherService projectOtherService;
/**
......@@ -134,6 +133,7 @@ public class CbProjectRecordServiceImpl extends ServiceImpl<CbProjectRecordMappe
projectOtherService.projectOtherDataAnalysis(projectBaseBo);
//现场经费
projectExpenseSummaryService.parseSceneExpenseSummaryData(projectId, cbStage, username);
sceneExpenseChildrenService.parseSceneExpenseChildrenData(projectId, cbStage, username);
//成本汇总
cbSummaryService.importCbSummary(projectId);
}
......
package com.dsk.cscec.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dsk.common.excel.ExcelUtils;
import com.dsk.common.utils.StringUtils;
import com.dsk.cscec.constant.CbProjectConstants;
import com.dsk.cscec.constant.CbSceneExpenseConstants;
import com.dsk.cscec.domain.CbProjectFile;
import com.dsk.cscec.domain.CbProjectRecord;
import com.dsk.cscec.domain.CbSceneExpenseChildren;
import com.dsk.cscec.domain.bo.CbSceneExpenseChildrenDataBo;
import com.dsk.cscec.domain.bo.CbSceneExpenseChildrenImportBo;
import com.dsk.cscec.domain.vo.CbSceneExpenseMenuVo;
import com.dsk.cscec.mapper.CbProjectFileMapper;
import com.dsk.cscec.mapper.CbProjectRecordMapper;
import com.dsk.cscec.mapper.CbSceneExpenseChildrenMapper;
import com.dsk.cscec.service.CbSceneExpenseChildrenService;
import com.dsk.system.service.ISysOssService;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.transaction.support.TransactionTemplate;
import javax.annotation.Resource;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/**
* 现场经费-工资统筹、其他费用、现场管理费表(CbSceneExpenseChildren)表服务实现类
......@@ -18,5 +41,167 @@ import javax.annotation.Resource;
public class CbSceneExpenseChildrenServiceImpl extends ServiceImpl<CbSceneExpenseChildrenMapper, CbSceneExpenseChildren> implements CbSceneExpenseChildrenService {
@Resource
private CbSceneExpenseChildrenMapper baseMapper;
@Resource
private CbProjectRecordMapper projectRecordMapper;
@Resource
private CbProjectFileMapper projectFileMapper;
@Resource
private ISysOssService ossService;
@Resource
private TransactionTemplate transactionTemplate;
/**
* 获取现场经费菜单
*
* @param projectId 项目ID
* @return 菜单
*/
@Override
public List<CbSceneExpenseMenuVo> getMenuList(Long projectId) {
//校验项目是否存在
this.checkProjectExist(projectId);
//TODO:菜单来源分为两部分,1、导入的文件,2、财务一体化系统
//从导入文件获取菜单
List<CbSceneExpenseMenuVo> menuList = projectFileMapper.getSceneExpenseMenuFromFile(projectId, CbProjectConstants.DELETE_FLAG_EXIST, CbProjectConstants.CB_TYPE_SCENE_EXPENSE, CbProjectConstants.PROJECT_FILE_STATUS_PARSE_SUCCESS);
menuList.forEach(menu -> {
//菜单名称去除文件格式尾缀
menu.setMenuName(menu.getMenuName().substring(0, menu.getMenuName().lastIndexOf(".")));
//若是现场经费汇总,则是一级,否则均为二级
if (CbProjectConstants.CB_TYPE_SCENE_EXPENSE_NAME.equals(menu.getMenuName())) {
menu.setMenuLevel(CbSceneExpenseConstants.MENU_LEVEL1);
} else {
menu.setMenuLevel(CbSceneExpenseConstants.MENU_LEVEL2);
}
//菜单来源
menu.setMenuSource(CbSceneExpenseConstants.MENU_SOURCE_FILE_TABLE);
});
//TODO:从财务一体化系统获取菜单
return menuList;
}
/**
* 现场经费二级分类数据解析
*
* @param projectId 项目ID
* @param cbStage 成本阶段
* @param username 用户名
*/
@Override
@Async
public void parseSceneExpenseChildrenData(Long projectId, Integer cbStage, String username) throws Exception {
//查找该项目下所有相关文件
List<CbProjectFile> projectFileList = projectFileMapper.selectAnalysisList(projectId, CbProjectConstants.CB_TYPE_SCENE_EXPENSE, cbStage);
//待解析文件
List<CbProjectFile> waitParseList = new ArrayList<>();
//提取非现场经费汇总文件
projectFileList.forEach(projectFile -> {
if (!CbProjectConstants.CB_TYPE_SCENE_EXPENSE_NAME.equals(projectFile.getFileName().substring(0, projectFile.getFileName().lastIndexOf(".")))) {
//待解析文件
waitParseList.add(projectFile);
}
});
//处理待解析文件
for (CbProjectFile projectFile : waitParseList) {
if (ObjectUtil.isNull(projectFile)) {
continue;
}
//文件下载
InputStream inputStream = ossService.downFileIO(projectFile.getFileOssId());
if (ObjectUtil.isNull(inputStream)) {
projectFile.setFileParseStatus(CbProjectConstants.PROJECT_FILE_STATUS_PARSE_FAIL);
projectFile.setFailRemark("文件数据不存在");
projectFileMapper.updateById(projectFile);
continue;
}
//解析数据
List<CbSceneExpenseChildrenImportBo> importList = new ExcelUtils<>(CbSceneExpenseChildrenImportBo.class).importExcelAllSheet(inputStream, 0);
if (importList.isEmpty()) {
projectFile.setFileParseStatus(CbProjectConstants.PROJECT_FILE_STATUS_PARSE_FAIL);
projectFile.setFailRemark("表格中不存在待导入数据");
projectFileMapper.updateById(projectFile);
continue;
}
//筛选有效数据
List<CbSceneExpenseChildrenImportBo> summaryList = importList.stream().parallel()
//筛选名称列不为空数据
.filter(item -> StringUtils.isNotBlank(item.getExpenseName()))
.peek(item -> {
item.setProjectId(projectId);
item.setProjectFileId(projectFile.getId());
//因为现场管理费Excel表中字段名称不一样,所以做以下单独映射
//公司单价/不含税单价
if (StringUtils.isNotBlank(item.getExcludeTaxUnitPrice())) {
item.setUnitPrice(item.getExcludeTaxUnitPrice());
}
//目标成本合价(不含税)/不含税合价
if (StringUtils.isNotBlank(item.getExcludeTaxSumPrice())) {
item.setTargetCbSumPriceExcludeTax(item.getExcludeTaxSumPrice());
}
//目标成本合价(含税)/含税合价
if (StringUtils.isNotBlank(item.getIncludeTaxSumPrice())) {
item.setTargetCbSumPriceIncludeTax(item.getIncludeTaxSumPrice());
}
item.setCreateBy(username);
item.setCreateTime(new Date());
})
.collect(Collectors.toList());
if (summaryList.size() != importList.size()) {
projectFile.setFileParseStatus(CbProjectConstants.PROJECT_FILE_STATUS_PARSE_FAIL);
projectFile.setFailRemark("表格中存在\"名称\"列为空数据!");
projectFileMapper.updateById(projectFile);
continue;
}
transactionTemplate.execute(status -> {
try {
//批量插入数据
CbSceneExpenseChildrenServiceImpl impl = new CbSceneExpenseChildrenServiceImpl();
Assert.isTrue(impl.saveBatch(BeanUtil.copyToList(summaryList, CbSceneExpenseChildren.class)), "数据插入失败");
//更新文件状态
projectFile.setFileParseStatus(CbProjectConstants.PROJECT_FILE_STATUS_PARSE_SUCCESS);
Assert.isTrue(projectFileMapper.updateById(projectFile) > 0, "解析成功后文件状态更新失败");
} catch (Exception e) {
status.setRollbackOnly();
projectFile.setFileParseStatus(CbProjectConstants.PROJECT_FILE_STATUS_PARSE_FAIL);
projectFile.setFailRemark(e.getMessage());
projectFileMapper.updateById(projectFile);
}
return Boolean.TRUE;
});
}
}
/**
* 获取现场经费二级分类数据
*
* @param childrenDataBo 查询体
* @return 现场经费二级分类数据
*/
@Override
public List<CbSceneExpenseChildren> getChildrenData(CbSceneExpenseChildrenDataBo childrenDataBo) {
//校验项目是否存在
this.checkProjectExist(childrenDataBo.getProjectId());
return baseMapper.selectList(new LambdaQueryWrapper<CbSceneExpenseChildren>()
.eq(CbSceneExpenseChildren::getProjectId, childrenDataBo.getProjectId())
.eq(CbSceneExpenseChildren::getProjectFileId, childrenDataBo.getFileId()));
}
/**
* 校验项目是否存在
*
* @param projectId 项目ID
* @return 项目实体
*/
private CbProjectRecord checkProjectExist(Long projectId) {
CbProjectRecord projectRecord = projectRecordMapper.selectById(projectId);
Assert.notNull(projectRecord, "该项目不存在");
return projectRecord;
}
}
......@@ -6,7 +6,7 @@
<!--@Table cb_cost_measure-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="project_id" jdbcType="BIGINT" property="projectId" />
<result column="cb_stage" jdbcType="INTEGER" property="cbStage" />
<result column="cb_stage" jdbcType="INTEGER" property="projectFileId" />
<result column="parent_id" jdbcType="BIGINT" property="parentId" />
<result column="level" jdbcType="INTEGER" property="level" />
<result column="number" jdbcType="VARCHAR" property="number" />
......
......@@ -112,6 +112,14 @@ export const getProfitLossMenuTreeApi = (params = {}) => request({
method: "get",
params
})
//盈亏分析对比 数据列表
export function getAnalysislist(data) {
return request({
url: '/cb/gain/loss/analysis/list',
method: 'get',
params:data
});
}
// 工料汇总
......
......@@ -61,7 +61,7 @@ export default {
// 文件类型, 例如['png', 'jpg', 'jpeg']
fileType: {
type: Array,
default: () => ["doc", "xls", "ppt", "txt", "pdf"],
default: () => ["xlsx","docx","doc", "xls", "ppt", "txt", "pdf"],
},
// 是否显示提示
isShowTip: {
......
......@@ -1082,9 +1082,9 @@ export function addTreeLevel(tree, startLevel = 1, removeEmptyChildren = true) {
export function addNodeParent(tree, parent = null) {
if (tree instanceof Array && tree?.length) {
tree.forEach(node => {
node["parent"] = parent ? parent : JSON.parse(JSON.stringify(parent));
node["parent"] = parent;
if (node.children instanceof Array && node.children.length) {
addNodeParent(node.children, node);
addNodeParent(node.children, JSON.parse(JSON.stringify(node)));
}
});
}
......
......@@ -62,67 +62,7 @@ export default {
comProjectDetailInfo: {},
comProjectId: "",
defaultActive: "",
menuTreeList: [
// {
// nodeName: "房建类成本科目",
// id: "1",
// children: [
// {
// nodeName: "劳务分包工程",
// id: "1-1",
// children: [
// {
// nodeName: "主体工程-结构劳务",
// id: "1-1-1",
// children: [
// {
// nodeName: "结构劳务分包",
// id: "1-1-1-1",
// }
// ]
// },
// {
// nodeName: "二次结构及粗装修劳务",
// id: "1-2-1",
// children: [
// {
// nodeName: "二次机构及粗装修劳务",
// id: "1-2-1",
// }
// ]
// },
// {
// nodeName: "拆除、修缮、清理、改造劳...",
// id: "1-3-1",
// children: [
// {
// nodeName: "拆除、修缮、清理、改造劳...",
// id: "1-3-1",
// }
// ]
// }
// ]
// },
// {
// nodeName: "专业分包工程",
// id: "2-1",
// },
// {
// nodeName: "实体工程材料(土建)",
// id: "3-1",
// },
// {
// nodeName: "其他直接费成本",
// id: "4-1",
// },
// ]
// },
// {
// nodeName: "未归类项目",
// id: "2",
// children: []
// }
]
menuTreeList: []
};
},
//可访问data属性
......
<template>
<div class="otherProjects-container">
<div class="otherProjects-cont">
<div class="left">
<div class="left-menu">
<div class="feed-summary-container">
<div class="feed-summary-inner">
<div class="left-side-menu">
<project-side-menu ref="profitloss" :menuTree="menuTreeList" :menuOptions="menuOptions" :unique-opened="false" :default-active="defaultActive" >
<template slot="盈亏分析对比-1">
<img src="@/assets/images/projectCostLedger/icon_cost_detail_7.svg" alt="">
<div class="project-sub-menu-title-text">盈亏分析对比</div>
</template>
</project-side-menu>
</div>
<div class="profitloss">
<div class="search">
<el-date-picker
v-model="expenseDate"
type="month"
placeholder="选择月"
:picker-options="pickerOptions">
</el-date-picker>
</div>
</div>
<!--<div class="right-table">-->
<!--<div class="table-item">-->
<!--<tables-->
<!--v-if="!isSkeleton"-->
<!--:tableLoading="tableLoading"-->
<!--:tableData="tableData"-->
<!--:forData="forData1"-->
<!--:MaxPage=500-->
<!--:tableDataTotal="tableDataTotal"-->
<!--:queryParams="queryParams"-->
<!--@handle-current-change="handleCurrentChange"-->
<!--@sort-change="sortChange"-->
<!--&gt;-->
<!--<template slot="number" slot-scope="scope">-->
<!--<div>{{scope.row.number || '&#45;&#45;'}}</div>-->
<!--</template>-->
<!--<template slot="proportion" slot-scope="scope">-->
<!--<div>{{scope.row.proportion || '&#45;&#45;'}}{{scope.row.proportion ? '%':''}}</div>-->
<!--</template>-->
<!--</tables>-->
<!--</div>-->
<!--</div>-->
</div>
</div>
</template>
<script>
import Tables from "../../../../component/Tables"
import {getProfitLossMenuTreeApi} from '@/api/projectCostLedger/index'
export default {
name: "ProfitLoss",
props:{
// 项目ID
projectId: {
type: String,
required: true,
default: ""
import ProjectSideMenu from "@/views/projectCostLedger/detail/components/ProjectSideMenu";
import { getProfitLossMenuTreeApi,getAnalysislist } from "@/api/projectCostLedger";
export default {
name: "orifitloss",
props: {
// 项目ID
projectId: {
type: String,
required: true,
default: ""
},
// 详情信息
projectDetailInfo: {
type: Object,
default: () => ({})
}
},
// // 详情信息
// projectDetailInfo: {
// type: Object,
// default: () => ({})
// }
},
watch: {
// projectDetailInfo: {
// handler(newValue) {
// this.comProjectDetailInfo = newValue ? newValue : {};
// this.init(this.comProjectDetailInfo);
// },
// deep: true,
// immediate: true
// },
// projectId: {
// handler(newValue) {
// this.comProjectId = newValue;
// },
// immediate: true
// }
},
components: {
Tables,
},
data() {
return {
menuOptions: {
nodeName: "name",
nodeValue: "name",
watch: {
projectDetailInfo: {
handler(newValue) {
this.comProjectDetailInfo = newValue ? newValue : {};
this.init(this.comProjectDetailInfo);
},
deep: true,
immediate: true
},
comProjectDetailInfo: {},
comProjectId: "",
defaultActive: "",
menuTreeList: [
// {
// nodeName: "房建类成本科目",
// id: "1",
// children: [
// {
// nodeName: "劳务分包工程",
// id: "1-1",
// children: [
// {
// nodeName: "主体工程-结构劳务",
// id: "1-1-1",
// children: [
// {
// nodeName: "结构劳务分包",
// id: "1-1-1-1",
// }
// ]
// },
// {
// nodeName: "二次结构及粗装修劳务",
// id: "1-2-1",
// children: [
// {
// nodeName: "二次机构及粗装修劳务",
// id: "1-2-1",
// }
// ]
// },
// {
// nodeName: "拆除、修缮、清理、改造劳...",
// id: "1-3-1",
// children: [
// {
// nodeName: "拆除、修缮、清理、改造劳...",
// id: "1-3-1",
// }
// ]
// }
// ]
// },
// {
// nodeName: "专业分包工程",
// id: "2-1",
// },
// {
// nodeName: "实体工程材料(土建)",
// id: "3-1",
// },
// {
// nodeName: "其他直接费成本",
// id: "4-1",
// },
// ]
// },
// {
// nodeName: "未归类项目",
// id: "2",
// children: []
// }
]
}
},
//可访问data属性
created() {
console.log(this.projectId)
this.init()
},
//计算集
computed: {
projectId: {
handler(newValue) {
this.comProjectId = newValue;
},
immediate: true
}
},
components: {
ProjectSideMenu
},
data() {
return {
pickerOptions: {
disabledDate(time) {
let istrue = true
let month = new Date().getMonth()+1
let year = new Date().getFullYear()
let times = (year+5)+'-'+ month + '-01 ' + '00:00:00'
istrue = new Date().getTime() < time.getTime() && time.getTime() < new Date(times).getTime()
return !istrue
},
},
menuOptions: {
nodeName: "cbName",
nodeValue: "id",
},
comProjectDetailInfo: {},
comProjectId: "",
defaultActive: "",
menuTreeList: [
// {
// nodeName: "房建类成本科目",
// id: "1",
// children: [
// {
// nodeName: "劳务分包工程",
// id: "1-1",
// children: [
// {
// nodeName: "主体工程-结构劳务",
// id: "1-1-1",
// children: [
// {
// nodeName: "结构劳务分包",
// id: "1-1-1-1",
// }
// ]
// },
// {
// nodeName: "二次结构及粗装修劳务",
// id: "1-2-1",
// children: [
// {
// nodeName: "二次机构及粗装修劳务",
// id: "1-2-1",
// }
// ]
// },
// {
// nodeName: "拆除、修缮、清理、改造劳...",
// id: "1-3-1",
// children: [
// {
// nodeName: "拆除、修缮、清理、改造劳...",
// id: "1-3-1",
// }
// ]
// }
// ]
// },
// {
// nodeName: "专业分包工程",
// id: "2-1",
// },
// {
// nodeName: "实体工程材料(土建)",
// id: "3-1",
// },
// {
// nodeName: "其他直接费成本",
// id: "4-1",
// },
// ]
// },
// {
// nodeName: "未归类项目",
// id: "2",
// children: []
// }
],
id: 0,
expenseDate:'',
};
},
//可访问data属性
created() {
let month = new Date().getMonth() +1
let year = new Date().getFullYear()
this.expenseDate = year + '-' + (month>= 9? month:'0'+ month)
},
async init(detail = {}) {
let cbStage = 1
try {
const { projectId, cbStage } = detail;
if (!projectId) return;
await this.getProfitLossMenuTree({
projectId,
cbStage
});
} catch (error) {
},
//计算集
computed: {
}
},
async getProfitLossMenuTree(params) {
try {
const result = await getProfitLossMenuTreeApi(params);
if (result.code == 200) {
const _tempArray = result.data;
this.menuTreeList = _tempArray;
}
} catch (error) {
},
//方法集
methods: {
select(menuPath){
this.id = menuPath
let param = {
id:this.id,
expenseDate:this.expenseDate
}
getAnalysislist(param).then(res=>{
}
},
}
})
},
async init(detail = {}) {
try {
const { projectId, cbStage,cbType} = detail;
if (!projectId) return;
await this.getFeedSummaryMenuTree({
projectId,
cbStage,
cbType
});
} catch (error) {
}
},
async getFeedSummaryMenuTree(params) {
try {
const result = await getProfitLossMenuTreeApi(params);
if (result.code == 200) {
let arr = {}
arr.cbName = '盈亏分析对比'
arr.id = 0
arr.children = result.data
const _tempArray = [arr];
this.menuTreeList = _tempArray;
await this.$nextTick()
this.$refs['profitloss'].$refs['customElMenu'].open(_tempArray[0].id)
this.defaultActive = result.data[0].id
this.select(result.data[0].id)
}
} catch (error) {
console.log(error)
}
}
},
}
</script>
<style lang="scss" scoped>
.otherProjects-container {
.feed-summary-container {
width: 100%;
box-sizing: border-box;
background: #ffffff;
height: 100%;
align-items: center;
.otherProjects-cont{
display: flex;
.feed-summary-inner {
width: 100%;
height: 100%;
}
.left{
width: 220px;
height: 100%;
.left-menu{
width: 100%;
display: flex;
align-items: center;
.left-side-menu {
width: 220px;
min-width: 220px;
height: 100%;
border-right: 1px solid #eeeeee;
overflow: auto;
}
white-space: nowrap; /* 不换行 */
overflow: hidden; /* 超出部分隐藏 */
text-overflow: ellipsis; /* 显示省略号 */
}
.right-table{
width: calc(100% - 220px);
padding: 16px;
.profitloss{
width: calc(100% - 220px);
height: 100%;
background: #fff;
}
}
}
</style>
<template>
<div class="project-side-menu-container">
<el-menu mode="vertical" class="project-side-menu-instance" :unique-opened="uniqueOpened" :default-active="defaultActive" @select="menuSelect"
@open="subMenuOpen" @close="subMenuClose">
<el-menu mode="vertical" class="project-side-menu-instance" :unique-opened="uniqueOpened" :default-active="comDefaultActive" @select="menuSelect"
@open="subMenuOpen" @close="subMenuClose" ref="customElMenu">
<template v-for="(item,index) of tempMenuTree">
<project-menu-item :menuItem="item" :key="item.nodeValue">
<template :slot="`${item.nodeName}-${item.level}`" slot-scope="scope">
......@@ -56,6 +56,11 @@ export default {
},
deep: true,
immediate: true
},
defaultActive: {
handler(newValue) {
this.comDefaultActive = newValue;
}
}
},
data() {
......@@ -69,7 +74,8 @@ export default {
},
tempMenuOptions: {},
tempMenuTree: [],
comMenuTree: this.menuTree
comMenuTree: this.menuTree,
comDefaultActive: this.defaultActive
};
},
//可访问data属性
......@@ -260,6 +266,7 @@ export default {
}
}
}
/* 无下级菜单 */
.project-only-menu-item {
height: unset;
......@@ -271,6 +278,12 @@ export default {
position: unset;
white-space: unset;
&.is-active,
&:hover {
/* 重置li默认样式 */
background-color: unset;
}
/* 选中 */
&.is-active {
.project-only-menu-title-container {
......@@ -285,6 +298,7 @@ export default {
}
}
}
.project-only-menu-title-container {
height: 32px;
line-height: unset;
......
......@@ -21,7 +21,7 @@
<other-projects v-if="current == 'otherItems'"></other-projects>
<!-- 盈亏分析对比 -->
<profit-Loss v-if="current == 'profitAndLoss'" :project-id="projectID"></profit-Loss>
<profit-Loss v-if="current == 'profitAndLoss'" :project-id="projectID" :project-detail-info="detailInfo"></profit-Loss>
</div>
</div>
......@@ -61,7 +61,8 @@ export default {
// 详情信息变量
detailInfo: {
projectId: "1754425038355890177",
cbStage: 0
cbStage: 0,
cbType:1
},
toggleTabs: [
{
......
......@@ -298,54 +298,55 @@
<el-table-column type="index" label="序号" :fixed="tableColumnFixed" width="60" :resizable="false">
<template slot-scope="scope">
<span>{{(pageNum - 1) *pageSize + scope.$index + 1}}</span>
<span>{{(pageNum - 1) * pageSize + scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column label="标志性工程" :fixed="tableColumnFixed" width="120" :resizable="false">
<el-table-column label="标志性工程" :fixed="tableColumnFixed" prop="name1" width="300" :resizable="false">
</el-table-column>
<el-table-column label="年度" :resizable="false">
<el-table-column label="年度" :resizable="false" width="100">
<template slot-scope="scope">
{{scope.row.name2||"--"}}
</template>
</el-table-column>
<el-table-column label="所在区域" :resizable="false">
<el-table-column label="所在区域" :resizable="false" width="100">
<template slot-scope="scope">
{{scope.row.legalPerson||"--"}}
{{scope.row.name3||"--"}}
</template>
</el-table-column>
<el-table-column label="所属省份" :resizable="false">
<el-table-column label="所属省份" :resizable="false" width="100">
<template slot-scope="scope">
{{scope.row.legalPerson||"--"}}
{{scope.row.name4||"--"}}
</template>
</el-table-column>
<el-table-column label="施工面积(㎡)" :resizable="false">
<el-table-column label="施工面积(㎡)" :resizable="false" width="140">
<template slot-scope="scope">
{{scope.row.legalPerson||"--"}}
{{scope.row.name5||"--"}}
</template>
</el-table-column>
<el-table-column label="年施工产值(亿)" :resizable="false">
<el-table-column label="年施工产值(亿)" :resizable="false" width="140">
<template slot-scope="scope">
{{scope.row.legalPerson||"--"}}
{{scope.row.name6||"--"}}
</template>
</el-table-column>
<el-table-column label="所获荣誉" :resizable="false">
<el-table-column label="所获荣誉" :resizable="false" width="100">
<template slot-scope="scope">
{{scope.row.legalPerson||"--"}}
{{scope.row.name7||"--"}}
</template>
</el-table-column>
<el-table-column label="备注说明" :resizable="false">
<template slot-scope="scope">
{{scope.row.legalPerson||"--"}}
{{scope.row.name8||"--"}}
</template>
</el-table-column>
<el-table-column label="考察项目" :resizable="false">
<el-table-column label="考察项目" :resizable="false" width="300">
<template slot-scope="scope">
{{scope.row.legalPerson||"--"}}
{{scope.row.name9||"--"}}
</template>
</el-table-column>
<el-table-column label="考察公司" :resizable="false">
<el-table-column label="考察公司" :resizable="false" width="250">
<template slot-scope="scope">
{{scope.row.legalPerson||"--"}}
{{scope.row.name10||"--"}}
</template>
</el-table-column>
......@@ -358,16 +359,16 @@
</div>
</el-tab-pane>
<el-tab-pane label="在施工情况" name="third">
<div class="table-item-jf table-item-jf1 empty-table" v-if="!tableData.length && !isSkeleton">
<el-tab-pane label="在施工情况" name="third">
<div class="table-item-jf table-item-jf1 empty-table" v-if="!tableData1.length && !isSkeleton">
<img class="item-jf-img" src="@/assets/images/kong.png" alt="">
<div class="item-jf-titel">暂无相关数据</div>
<div class="item-jf-text">抱歉,暂无数据,试试更换搜索条件吧</div>
</div>
<skeleton v-if="isSkeleton"></skeleton>
<div class="table-item-jf table-item" v-if="!isSkeleton&&tableData.length>0">
<el-table :data="tableData" :header-cell-style="{ background:'#f0f3fa',color: 'rgba(35,35,35,0.8)'}"
<div class="table-item-jf table-item" v-if="!isSkeleton&&tableData1.length>0">
<el-table :data="tableData1" :header-cell-style="{ background:'#f0f3fa',color: 'rgba(35,35,35,0.8)'}"
v-sticky-header.always="{offsetTop : '0px',offsetBottom : '10px'}" class="table-item1 fixed-table" border highlight-current-row
:header-row-class-name="setHeaderRow" :cell-class-name="setCellClass" :row-class-name="setRowClass" :header-cell-class-name="setCellClass"
ref="theOwnerListTable">
......@@ -377,51 +378,52 @@
<span>{{(pageNum - 1) *pageSize + scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column label="工程名称" :fixed="tableColumnFixed" width="120" :resizable="false">
<el-table-column label="工程名称" width="300" :fixed="tableColumnFixed" prop="name1" :resizable="false">
</el-table-column>
<el-table-column label="施工承包范围" :resizable="false">
<el-table-column label="施工承包范围" :resizable="false" width="120">
<template slot-scope="scope">
{{scope.row.name2||"--"}}
</template>
</el-table-column>
<el-table-column label="建筑平面(㎡)" :resizable="false">
<el-table-column label="建筑平面(㎡)" :resizable="false" width="120">
<template slot-scope="scope">
{{scope.row.legalPerson||"--"}}
{{scope.row.name3||"--"}}
</template>
</el-table-column>
<el-table-column label="队长名称" :resizable="false">
<el-table-column label="队长名称" :resizable="false" width="100">
<template slot-scope="scope">
{{scope.row.legalPerson||"--"}}
{{scope.row.name4||"--"}}
</template>
</el-table-column>
<el-table-column label="管理人员数量(人)" :resizable="false">
<el-table-column label="管理人员数量(人)" :resizable="false" width="150">
<template slot-scope="scope">
{{scope.row.legalPerson||"--"}}
{{scope.row.name5||"--"}}
</template>
</el-table-column>
<el-table-column label="施工人员数量(人)" :resizable="false">
<el-table-column label="施工人员数量(人)" :resizable="false" width="150">
<template slot-scope="scope">
{{scope.row.legalPerson||"--"}}
{{scope.row.name6||"--"}}
</template>
</el-table-column>
<el-table-column label="质量目标" :resizable="false">
<el-table-column label="质量目标" :resizable="false" width="100">
<template slot-scope="scope">
{{scope.row.legalPerson||"--"}}
{{scope.row.name7||"--"}}
</template>
</el-table-column>
<el-table-column label="备注说明" :resizable="false">
<el-table-column label="备注说明" :resizable="false" width="150">
<template slot-scope="scope">
{{scope.row.legalPerson||"--"}}
{{scope.row.name8||"--"}}
</template>
</el-table-column>
<el-table-column label="考察项目" :resizable="false">
<el-table-column label="考察项目" :resizable="false" width="300">
<template slot-scope="scope">
{{scope.row.legalPerson||"--"}}
{{scope.row.name9||"--"}}
</template>
</el-table-column>
<el-table-column label="考察公司" :resizable="false">
<el-table-column label="考察公司" :resizable="false" width="260">
<template slot-scope="scope">
{{scope.row.legalPerson||"--"}}
{{scope.row.name10||"--"}}
</template>
</el-table-column>
</el-table>
......@@ -455,13 +457,21 @@
activeName:'first',
isSkeleton:false,
fbsisSkeleton:false,
total:100,
tableData:[{legalPerson:8888}],
total:2,
tableData:[
{name1:'黄阁水厂二期扩建工程设计咨询服务项目',name2:'2023年',name3:'华北地区',name4:'河北省',name5:'223.23',name6:'21233',name7:'优质工程',name8:'-',name9:'黄阁水厂二期扩建工程设计咨询服务项目',name10:'中国建筑一局第二建筑有限公司'},
{name1:'黄阁水厂二期扩建工程设计咨询服务项目',name2:'2023年',name3:'华北地区',name4:'河北省',name5:'223.23',name6:'21233',name7:'优质工程',name8:'-',name9:'黄阁水厂二期扩建工程设计咨询服务项目',name10:'中国建筑一局第二建筑有限公司'},
],
tableData1:[
{name1:'黄阁水厂二期扩建工程设计咨询服务项目',name2:'2023年',name3:'233.33',name4:'张林',name5:'32',name6:'21233',name7:'优质工程',name8:'-',name9:'黄阁水厂二期扩建工程设计咨询服务项目',name10:'中国建筑一局第二建筑有限公司'},
{name1:'黄阁水厂二期扩建工程设计咨询服务项目',name2:'2023年',name3:'233.33',name4:'张林',name5:'32',name6:'21233',name7:'优质工程',name8:'-',name9:'黄阁水厂二期扩建工程设计咨询服务项目',name10:'中国建筑一局第二建筑有限公司'},
],
pageSize:20,
pageNum:1,
// table列是否悬浮
tableColumnFixed: true,
custmerInfo:{},
}
},
created() {
......
......@@ -27,31 +27,31 @@
<span>{{(pageNum - 1) *pageSize + scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column label="年度" width="120" :resizable="false">
<el-table-column label="年度" width="120" prop="name1" :resizable="false">
</el-table-column>
<el-table-column label="使用公司" :resizable="false">
<el-table-column label="使用公司" :resizable="false" width="250">
<template slot-scope="scope">
{{scope.row.legalPerson||"--"}}
{{scope.row.name2||"--"}}
</template>
</el-table-column>
<el-table-column label="使用项目" :resizable="false">
<el-table-column label="使用项目" width="250" :resizable="false">
<template slot-scope="scope">
{{scope.row.legalPerson||"--"}}
{{scope.row.name3||"--"}}
</template>
</el-table-column>
<el-table-column label="项目考评" min-width="120" :resizable="false">
<template slot-scope="scope">
{{scope.row.legalPerson||"--"}}
{{scope.row.name4||"--"}}
</template>
</el-table-column>
<el-table-column label="公司考评分" min-width="120" :resizable="false">
<template slot-scope="scope">
{{scope.row.legalPerson||"--"}}
{{scope.row.name5||"--"}}
</template>
</el-table-column>
<el-table-column label="汇总分" min-width="120" :resizable="false">
<template slot-scope="scope">
{{scope.row.legalPerson||"--"}}
{{scope.row.name6||"--"}}
</template>
</el-table-column>
</el-table>
......@@ -78,10 +78,11 @@
return{
encodeStr,
tableData:[
{name:'测试',legalPerson:'AAAA'}
{name1:'2021年度',name2:'中建一局集团第二建筑有限公司',name3:'剧场及配套办公等2项(北京市文化中心)',name4:'-',name5:'-',name6:'-'},
{name1:'2021年度',name2:'中建一局集团第二建筑有限公司',name3:'剧场及配套办公等2项(北京市文化中心)',name4:'-',name5:'-',name6:'-'},
],
isSkeleton:false,
total:100,
total:2,
pageSize:50,
pageNum:1,
}
......
......@@ -27,56 +27,56 @@
<span>{{(pageNum - 1) *pageSize + scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column label="使用项目" width="320" :fixed="tableColumnFixed" :resizable="false">
<el-table-column label="使用项目" width="350" :fixed="tableColumnFixed" prop="name1" :resizable="false">
</el-table-column>
<el-table-column label="使用单位" :min-width="200" :resizable="false">
<el-table-column label="使用单位" :min-width="260" :resizable="false">
<template slot-scope="scope">
{{scope.row.legalPerson||"--"}}
{{scope.row.name2||"--"}}
</template>
</el-table-column>
<el-table-column label="公司名称" :min-width="200" :resizable="false">
<el-table-column label="公司名称" :min-width="300" :resizable="false">
<template slot-scope="scope">
{{scope.row.legalPerson||"--"}}
{{scope.row.name3||"--"}}
</template>
</el-table-column>
<el-table-column label="处置时间" :min-width="180" :resizable="false">
<template slot-scope="scope">
{{scope.row.legalPerson||"--"}}
{{scope.row.name4||"--"}}
</template>
</el-table-column>
<el-table-column label="年度" min-width="120" :resizable="false">
<template slot-scope="scope">
{{scope.row.legalPerson||"--"}}
{{scope.row.name5||"--"}}
</template>
</el-table-column>
<el-table-column label="处置前状态" :min-width="200" :resizable="false">
<template slot-scope="scope">
{{scope.row.legalPerson||"--"}}
{{scope.row.name6||"--"}}
</template>
</el-table-column>
<el-table-column label="处置后状态" :min-width="200" :resizable="false">
<template slot-scope="scope">
{{scope.row.legalPerson||"--"}}
{{scope.row.name7||"--"}}
</template>
</el-table-column>
<el-table-column label="处置前等级" :min-width="200" :resizable="false">
<template slot-scope="scope">
{{scope.row.legalPerson||"--"}}
{{scope.row.name8||"--"}}
</template>
</el-table-column>
<el-table-column label="处置后等级" :min-width="200" :resizable="false">
<template slot-scope="scope">
{{scope.row.legalPerson||"--"}}
{{scope.row.name9||"--"}}
</template>
</el-table-column>
<el-table-column label="预警原因" :min-width="200" :resizable="false">
<template slot-scope="scope">
{{scope.row.legalPerson||"--"}}
{{scope.row.name10||"--"}}
</template>
</el-table-column>
<el-table-column label="不合格原因" :min-width="200" :resizable="false">
<template slot-scope="scope">
{{scope.row.legalPerson||"--"}}
{{scope.row.name11||"--"}}
</template>
</el-table-column>
</el-table>
......@@ -103,10 +103,11 @@
return{
encodeStr,
tableData:[
{name:'测试',legalPerson:'AAAA'}
{name1:'河南水投分布式光伏项目(一期)工程EPC总承包',name2:'中建一局集团第二建筑有限公司',name3:'剧场及配套办公等2项(北京市文化中心)',name4:'2023年11月25日',name5:'2023',name6:'-',name7:'涉诉禁用',name8:'A',name9:'B',name10:'-',name11:'-'},
{name1:'河南水投分布式光伏项目(一期)工程EPC总承包',name2:'中建一局集团第二建筑有限公司',name3:'剧场及配套办公等2项(北京市文化中心)',name4:'-',name5:'-',name6:'-',name7:'-',name8:'-',name9:'-',name10:'-',name11:'-'}
],
isSkeleton:false,
total:100,
total:2,
pageSize:50,
pageNum:1,
// table列是否悬浮
......
......@@ -54,9 +54,9 @@
</el-date-picker>
</el-form-item>
<el-form-item label="涉诉状态">
<!--<el-select multiple placeholder="请选择" :collapse-tags="true" clearable>-->
<!--<el-option v-for="(item,index) in litigationstatus" :label="item.dictLabel" :value="item.dictValue" :key="index"></el-option>-->
<!--</el-select>-->
<el-select multiple placeholder="请选择" :collapse-tags="true" clearable>
<el-option v-for="(item,index) in litigationstatus" :label="item.dictLabel" :value="item.dictValue" :key="index"></el-option>
</el-select>
</el-form-item>
</el-row>
<el-divider></el-divider>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment