Commit b5af2833 authored by Administrator's avatar Administrator

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

parents 2f1402e7 e388edb8
......@@ -108,6 +108,12 @@ public class CbQuantitySummaryServiceImpl extends ServiceImpl<CbQuantitySummaryM
@Override
public List<CbQuantitySummaryListVo> subjectList(CbQuantitySummaryListBo bo) {
if(ObjectUtils.isEmpty(bo.getRecordDate())){
//默认当前月
bo.setRecordDate(DatePattern.SIMPLE_MONTH_FORMAT.format(new Date()));
}
if (ObjectUtils.isEmpty(bo.getProjectId())) throw new BeanException("项目id不能为空!");
if (ObjectUtils.isEmpty(bo.getCbStage())) throw new BeanException("成本阶段不能为空!");
return baseMapper.selectListBySubject(bo);
}
......
......@@ -96,11 +96,12 @@ public class CbSummaryServiceImpl extends ServiceImpl<CbSummaryMapper, CbSummary
cbProjectFile.setFileParseStatus(CbProjectConstants.PROJECT_FILE_STATUS_PARSE_FAIL);
cbProjectFile.setFailRemark(e.getMessage());
cbProjectFileMapper.updateById(cbProjectFile);
log.error(projectId+"项目 成本汇总解析失败" + e);
}
// }
});
log.info(projectId+"项目 成本汇总解析成功");
}
/**
......@@ -132,11 +133,19 @@ public class CbSummaryServiceImpl extends ServiceImpl<CbSummaryMapper, CbSummary
transactionTemplate.execute(status -> {
try {
boolean flag = this.saveBatch(addList);
if (!flag) {
throw new ServiceException("导入数据失败");
//分批次插入
if (addList.size() > 1000) {
int index = 0;
int total = addList.size();
while (index < total) {
List<CbSummary> divideList = addList.subList(index, Math.min(index += 1000, total));
Assert.isTrue(this.saveBatch(divideList), "数据插入失败");
}
} else {
Assert.isTrue(this.saveBatch(addList), "数据插入失败");
}
//处理父级id
List<CbSummary> cbSummaryList = baseMapper.selectList(
new LambdaQueryWrapper<CbSummary>()
......@@ -161,17 +170,22 @@ public class CbSummaryServiceImpl extends ServiceImpl<CbSummaryMapper, CbSummary
}
cbSummary.setParentId(parent.getId());
}
flag = this.updateBatchById(cbSummaryList);
if (!flag) {
throw new ServiceException("更新数据失败");
//分批次修改
if (cbSummaryList.size() > 1000) {
int index = 0;
int total = cbSummaryList.size();
while (index < total) {
List<CbSummary> divideList = cbSummaryList.subList(index, Math.min(index += 1000, total));
Assert.isTrue(this.updateBatchById(divideList), "更新数据失败");
}
} else {
Assert.isTrue(this.updateBatchById(cbSummaryList), "更新数据失败");
}
//修改文件状态为解析成功
file.setFileParseStatus(CbProjectConstants.PROJECT_FILE_STATUS_PARSE_SUCCESS);
flag = cbProjectFileMapper.updateById(file) > 0;
if (!flag) {
throw new ServiceException("更新文件状态失败");
}
Assert.isTrue(cbProjectFileMapper.updateById(file) > 0, "更新文件状态失败");
} catch (Exception e) {
status.setRollbackOnly();
throw e;
......@@ -211,10 +225,18 @@ public class CbSummaryServiceImpl extends ServiceImpl<CbSummaryMapper, CbSummary
transactionTemplate.execute(status -> {
try {
boolean flag = this.saveBatch(addList);
if (!flag) {
throw new ServiceException("导入数据失败");
//分批次插入
if (addList.size() > 1000) {
int index = 0;
int total = addList.size();
while (index < total) {
List<CbSummary> divideList = addList.subList(index, Math.min(index += 1000, total));
Assert.isTrue(this.saveBatch(divideList), "数据插入失败");
}
} else {
Assert.isTrue(this.saveBatch(addList), "数据插入失败");
}
//处理父级id
List<CbSummary> cbSummaryList = baseMapper.selectList(
......@@ -249,14 +271,21 @@ public class CbSummaryServiceImpl extends ServiceImpl<CbSummaryMapper, CbSummary
}
cbSummary.setParentId(parent.getId());
}
this.updateBatchById(cbSummaryList);
//分批次修改
if (cbSummaryList.size() > 1000) {
int index = 0;
int total = cbSummaryList.size();
while (index < total) {
List<CbSummary> divideList = cbSummaryList.subList(index, Math.min(index += 1000, total));
Assert.isTrue(this.updateBatchById(divideList), "更新数据失败");
}
} else {
Assert.isTrue(this.updateBatchById(cbSummaryList), "更新数据失败");
}
//修改文件状态为解析成功
file.setFileParseStatus(CbProjectConstants.PROJECT_FILE_STATUS_PARSE_SUCCESS);
flag = cbProjectFileMapper.updateById(file) > 0;
if (!flag) {
throw new ServiceException("更新文件状态失败");
}
Assert.isTrue(cbProjectFileMapper.updateById(file) > 0, "更新文件状态失败");
} catch (Exception e) {
status.setRollbackOnly();
throw e;
......@@ -307,7 +336,7 @@ public class CbSummaryServiceImpl extends ServiceImpl<CbSummaryMapper, CbSummary
List<CbSummaryActualListVo> childrenList = baseMapper.getByParentId(bo.getId(), bo.getExpenseDate());
//截至本月费用汇总
childrenList.forEach(children -> {
childrenList.parallelStream().forEach(children -> {
Map<String, BigDecimal> total = cbSummaryActualMapper.getTotal(children.getId(), bo.getExpenseDate());
children.setTaxExclusiveExpenseTotal(total.get("taxExclusiveExpenseTotal"));
children.setTaxInclusiveExpenseTotal(total.get("taxInclusiveExpenseTotal"));
......@@ -330,7 +359,7 @@ public class CbSummaryServiceImpl extends ServiceImpl<CbSummaryMapper, CbSummary
} else {
// //递归列表
// childrenList = getProjectSumList(bo);
childrenList.forEach(child->{
childrenList.parallelStream().forEach(child->{
Long count = baseMapper.selectCount(new LambdaQueryWrapper<CbSummary>().eq(CbSummary::getParentId,child.getId()));
if(count>0l){
child.setHasChildren(1);
......
......@@ -52,28 +52,26 @@
</select>
<select id="selectListBySubject" resultType="com.dsk.cscec.domain.vo.CbQuantitySummaryListVo">
select a.*, ifnull(sum(a.quantities),0) totalQuantities from (
select
cqs.id, cqs.cb_subject_name, cqs.company_no, cqs.org_no, cqs.cb_name, cqs.job_content, cqs.calculation_rule,
cqs.unit, cqs.material_description, cqs.guide_price, cqs.bid_unit_price, cqs.unit_price_difference, cqs.quantity,
cqs.combined_price, cqs.combined_price_tax, cqs.brand_name, cqs.bid_source, cqs.remark, cqs.`number`, cqsa.quantities,
cqsa.quantities_unit, cqsa.conversion_quantities, cqsa.conversion_unit, cqsa.purchase_unit_price, cqsa.create_time,
cqsa.id actualId, cqsa.ipm_project_code, cqsa.ipm_contract_code, cqsa.ipm_biz_code, cqsa.push_quantities
cqsa.id actualId, cqsa.ipm_project_code, cqsa.ipm_contract_code, cqsa.ipm_biz_code, cqsa.push_quantities,
ifnull(sum(cqsa1.quantities),0) totalQuantities
from cb_quantity_summary cqs
left join cb_quantity_summary_actual cqsa on cqs.id = cqsa.cb_quantity_summary_id
left join cb_quantity_summary_actual cqsa on (cqs.id = cqsa.cb_quantity_summary_id and cqsa.record_date = #{recordDate} )
left join cb_quantity_summary_actual cqsa1 on (cqs.id = cqsa1.cb_quantity_summary_id and cqsa1.record_date &lt;= #{recordDate} )
left join cb_subject cs1 on cqs.cb_subject_name = cs1.cb_subject_name
where cqs.del_falg = 0 and cqs.project_id = #{projectId} and cqs.cb_stage = #{cbStage}
<if test="recordDate != null and recordDate != ''"> and cqsa.record_date &lt;= #{recordDate} </if>
<if test="cbSubjectName != null and cbSubjectName !=''">
<choose>
<when test="cbSubjectName == '未归类项目'"> and cs1.id is null </when>
<otherwise> and cqs.cb_subject_name = #{cbSubjectName} </otherwise>
<otherwise> and cs1.id is not null and cqs.cb_subject_name = #{cbSubjectName} </otherwise>
</choose>
</if>
order by cqsa.record_date desc
) a
group by a.id
order by a.`number` asc
group by cqs.id
order by cs1.sort asc, cs1.cb_subject_no asc, cqs.`number` asc
</select>
<select id="unconvertedList" resultType="com.dsk.cscec.domain.vo.CbQuantitySummaryListVo">
......
dsk-operate-ui/public/favicon.ico

4.19 KB | W: | H:

dsk-operate-ui/public/favicon.ico

16.6 KB | W: | H:

dsk-operate-ui/public/favicon.ico
dsk-operate-ui/public/favicon.ico
dsk-operate-ui/public/favicon.ico
dsk-operate-ui/public/favicon.ico
  • 2-up
  • Swipe
  • Onion skin
......@@ -40,7 +40,7 @@
<el-table-column label="含税招标合价" width="180" prop="taxIncludeTenderSumPrice"><template slot-scope="scope">{{scope.row.taxIncludeTenderSumPrice || '--'}}</template></el-table-column>
</el-table-column>
<el-table-column label="投标报价" align="center">
<el-table-column label="投标控制价合价" width="180" prop="bidSumPrice"><template slot-scope="scope">{{scope.row.bidSumPrice || '--'}}</template></el-table-column>
<el-table-column label="投标价合价" width="180" prop="bidSumPrice"><template slot-scope="scope">{{scope.row.bidSumPrice || '--'}}</template></el-table-column>
<el-table-column label="不含税投标合价" width="180" prop="taxExcludeBidSumPrice"><template slot-scope="scope">{{scope.row.taxExcludeBidSumPrice || '--'}}</template></el-table-column>
<el-table-column label="含税投标合价" width="180" prop="taxIncludebBidSumPrice"><template slot-scope="scope">{{scope.row.taxIncludebBidSumPrice || '--'}}</template></el-table-column>
</el-table-column>
......@@ -55,7 +55,7 @@
<el-table-column label="成本" width="180" prop="costExpense"><template slot-scope="scope">{{scope.row.costExpense || '--'}}</template></el-table-column>
</el-table-column>
<el-table-column label="含税成本占比" width="180" prop="taxInclusiveExpenseProportion"><template slot-scope="scope">{{scope.row.taxInclusiveExpenseProportion || '--'}}</template></el-table-column>
<el-table-column label="控制盈亏对比情况" align="center">
<el-table-column label="控制盈亏对比情况" align="center">
<el-table-column label="含税合价偏差" width="180" prop="tenderSumPriceDeviation"><template slot-scope="scope">{{scope.row.tenderSumPriceDeviation || '--'}}</template></el-table-column>
<el-table-column label="含税盈亏率" width="180" prop="tenderProfitLossRatio"><template slot-scope="scope">{{scope.row.tenderProfitLossRatio || '--'}}</template></el-table-column>
</el-table-column>
......
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