Commit ee348886 authored by tianhongyang's avatar tianhongyang

Merge branch 'V20231129-中建一局二公司' of http://192.168.60.201/root/dsk-operate-sys...

Merge branch 'V20231129-中建一局二公司' of http://192.168.60.201/root/dsk-operate-sys into V20231129-中建一局二公司
parents 0ee095ac a71b3705
...@@ -54,8 +54,6 @@ public class DataAnalysisComponent { ...@@ -54,8 +54,6 @@ public class DataAnalysisComponent {
if (ObjectUtils.isEmpty(fileList)) return; if (ObjectUtils.isEmpty(fileList)) return;
//文件处理 //文件处理
for (CbProjectFile file : fileList) { for (CbProjectFile file : fileList) {
// if (file.getDelFlag() == 0) {
//文件下载 //文件下载
InputStream inputStream = ossService.downFileIO(file.getFileOssId()); InputStream inputStream = ossService.downFileIO(file.getFileOssId());
if (ObjectUtil.isNull(inputStream)) { if (ObjectUtil.isNull(inputStream)) {
...@@ -84,24 +82,28 @@ public class DataAnalysisComponent { ...@@ -84,24 +82,28 @@ public class DataAnalysisComponent {
} }
transactionTemplate.execute(status -> { transactionTemplate.execute(status -> {
try { try {
//分批次插入 // //分批次插入
if (quantitySummaryList.size() > 1000) { // if (quantitySummaryList.size() > 1000) {
int index = 0; // int index = 0;
int sum = quantitySummaryList.size(); // int sum = quantitySummaryList.size();
while (index < sum) { // while (index < sum) {
List<CbQuantitySummary> divideList = quantitySummaryList.subList(index, Math.max((index + 1) * 1000, sum)); // List<CbQuantitySummary> divideList = quantitySummaryList.subList(index, Math.min(index + 1000, sum));
boolean b = quantitySummaryService.saveBatch(divideList); // boolean b = quantitySummaryService.saveBatch(divideList);
if (!b) { // if (!b) {
throw new ServiceException("数据插入失败!"); // throw new ServiceException("数据插入失败!");
} // }
index += 1000; // index += 1000;
} // }
} else { // } else {
boolean b = quantitySummaryService.saveBatch(quantitySummaryList); // boolean b = quantitySummaryService.saveBatch(quantitySummaryList);
if (!b) { // if (!b) {
// throw new ServiceException("数据插入失败!");
// }
// }
boolean a = quantitySummaryService.batchInsert(quantitySummaryList);
if (!a) {
throw new ServiceException("数据插入失败!"); throw new ServiceException("数据插入失败!");
} }
}
file.setFileParseStatus(2); file.setFileParseStatus(2);
boolean b = projectFileService.updateById(file); boolean b = projectFileService.updateById(file);
if (!b) { if (!b) {
...@@ -115,10 +117,6 @@ public class DataAnalysisComponent { ...@@ -115,10 +117,6 @@ public class DataAnalysisComponent {
} }
return Boolean.TRUE; return Boolean.TRUE;
}); });
// } else {
// quantitySummaryService.remove(Wrappers.<CbQuantitySummary>lambdaQuery().eq(CbQuantitySummary::getCbProjectFileId, file.getId()));
// projectFileService.removeById(file);
// }
} }
} }
} }
...@@ -2,6 +2,7 @@ package com.dsk.cscec.domain; ...@@ -2,6 +2,7 @@ package com.dsk.cscec.domain;
import java.util.Date; import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic; import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
...@@ -10,6 +11,7 @@ import java.io.Serializable; ...@@ -10,6 +11,7 @@ import java.io.Serializable;
import com.dsk.common.annotation.Excel; import com.dsk.common.annotation.Excel;
import lombok.Data; import lombok.Data;
import org.springframework.util.ObjectUtils;
/** /**
* 成本-工料汇总基本表(CbQuantitySummary)表实体类 * 成本-工料汇总基本表(CbQuantitySummary)表实体类
...@@ -32,7 +34,6 @@ public class CbQuantitySummary implements Serializable { ...@@ -32,7 +34,6 @@ public class CbQuantitySummary implements Serializable {
/** /**
* 序号 * 序号
*/ */
@Excel(name = "序号")
private Integer number; private Integer number;
/** /**
* 成本阶段(0:标前成本 1:标后成本 2:转固成本) * 成本阶段(0:标前成本 1:标后成本 2:转固成本)
...@@ -141,5 +142,12 @@ public class CbQuantitySummary implements Serializable { ...@@ -141,5 +142,12 @@ public class CbQuantitySummary implements Serializable {
@TableLogic(value = "0", delval = "2") @TableLogic(value = "0", delval = "2")
private Integer delFalg; private Integer delFalg;
@Excel(name = "序号")
@TableField(exist = false)
private String num;
public void setNum(String num) {
this.number = ObjectUtils.isEmpty(num) ? null : Integer.valueOf(num);
}
} }
...@@ -20,6 +20,7 @@ import java.util.Map; ...@@ -20,6 +20,7 @@ import java.util.Map;
*/ */
public interface CbQuantitySummaryMapper extends BaseMapperPlus<CbQuantitySummaryMapper,CbQuantitySummary,CbQuantitySummary> { public interface CbQuantitySummaryMapper extends BaseMapperPlus<CbQuantitySummaryMapper,CbQuantitySummary,CbQuantitySummary> {
int batchInsert(@Param("list") List<CbQuantitySummary> list);
List<Map<String, Object>> selectSubject(CbProjectBaseBo bo); List<Map<String, Object>> selectSubject(CbProjectBaseBo bo);
...@@ -29,5 +30,7 @@ public interface CbQuantitySummaryMapper extends BaseMapperPlus<CbQuantitySummar ...@@ -29,5 +30,7 @@ public interface CbQuantitySummaryMapper extends BaseMapperPlus<CbQuantitySummar
List<CbQuantitySummaryListVo> selectListBySubject(CbQuantitySummaryListBo bo); List<CbQuantitySummaryListVo> selectListBySubject(CbQuantitySummaryListBo bo);
} }
...@@ -28,5 +28,7 @@ public interface ICbQuantitySummaryService extends IService<CbQuantitySummary> { ...@@ -28,5 +28,7 @@ public interface ICbQuantitySummaryService extends IService<CbQuantitySummary> {
void pushData(CbQuantitySummaryActual bo); void pushData(CbQuantitySummaryActual bo);
boolean batchInsert(List<CbQuantitySummary> list);
} }
...@@ -139,5 +139,11 @@ public class CbQuantitySummaryServiceImpl extends ServiceImpl<CbQuantitySummaryM ...@@ -139,5 +139,11 @@ public class CbQuantitySummaryServiceImpl extends ServiceImpl<CbQuantitySummaryM
//TODO 推送数据 //TODO 推送数据
} }
@Override
public boolean batchInsert(List<CbQuantitySummary> list) {
int i = baseMapper.batchInsert(list);
return i == list.size();
}
} }
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dsk.cscec.mapper.CbQuantitySummaryMapper"> <mapper namespace="com.dsk.cscec.mapper.CbQuantitySummaryMapper">
<insert id="batchInsert" parameterType="com.dsk.cscec.domain.CbQuantitySummary">
INSERT INTO cscec_bms.cb_quantity_summary
(project_id, `number`, cb_stage, cb_subject_name, company_no, org_no, cb_name, job_content,
calculation_rule, unit, material_description, guide_price, bid_unit_price, unit_price_difference, quantity,
combined_price, combined_price_tax, brand_name, bid_source, remark, cb_project_file_id)
VALUES
<foreach collection="list" item="item" separator="," >
(#{item.projectId}, #{item.number}, #{item.cbStage}, #{item.cbSubjectName}, #{item.companyNo}, #{item.orgNo}, #{item.cbName},
#{item.jobContent},#{item.calculationRule},#{item.unit},#{item.materialDescription},#{item.guidePrice},
#{item.bidUnitPrice},#{item.unitPriceDifference},#{item.quantity},#{item.combinedPrice},#{item.combinedPriceTax},
#{item.brandName},#{item.bidSource},#{item.remark},#{item.cbProjectFileId})
</foreach>
</insert>
<select id="selectSubject" resultType="java.util.Map"> <select id="selectSubject" resultType="java.util.Map">
select select
......
...@@ -57,6 +57,14 @@ export function getProjectFileUploadDetail(projectId) { ...@@ -57,6 +57,14 @@ export function getProjectFileUploadDetail(projectId) {
}); });
} }
//根据项目文件导入数据
export function importData(projectId) {
return request({
url: '/cbProjectRecord/importData/'+projectId,
method: 'get',
});
}
//获取草稿箱列表 //获取草稿箱列表
export function getDraftDialogList(projectId) { export function getDraftDialogList(projectId) {
return request({ return request({
...@@ -179,6 +187,16 @@ export const getActualMonthsApi = (params = {}) => request({ ...@@ -179,6 +187,16 @@ export const getActualMonthsApi = (params = {}) => request({
params params
}); });
//批量保存或修改每月措施费
export function saveBatch(data) {
return request({
url: '/cb/cost/measures/saveBatch',
method: 'post',
data:data,
});
}
// 工料汇总 // 工料汇总
...@@ -221,6 +239,14 @@ export const getFeedSummaryListApi = (params = {}) => request({ ...@@ -221,6 +239,14 @@ export const getFeedSummaryListApi = (params = {}) => request({
params params
}); });
//工程项目信息
export const getCbProjectInfo = (relatedId) => request({
url: '/cbProjectRecord/getCbProjectInfo/' + relatedId,
method: "get",
});
// 其他项目 // 其他项目
//其他项目左侧菜单 //其他项目左侧菜单
...@@ -234,3 +260,10 @@ export const getProjectOtherStatistics = (relatedId) => request({ ...@@ -234,3 +260,10 @@ export const getProjectOtherStatistics = (relatedId) => request({
url: '/cb/projectOther/statistics/' + relatedId, url: '/cb/projectOther/statistics/' + relatedId,
method: "get", method: "get",
}); });
//其他费用-其他费用列表
export const getProjectOtherList = (params = {}) => request({
url: "/cb/projectOther/list",
method: "get",
params
});
...@@ -44,33 +44,33 @@ ...@@ -44,33 +44,33 @@
</template> </template>
<script> <script>
import InfoTable from '../../../../component/infoTable'; import InfoTable from '../../../../component/infoTable';
import { getCbProjectInfo } from "@/api/projectCostLedger";
export default { export default {
name: "projectInformation", name: "projectInformation",
components: {InfoTable}, components: {InfoTable},
data() { data() {
return { return {
comProjectId:'',
labelWidth: 250, labelWidth: 250,
forInfo: { forInfo: { },
name:'宝安中学(集团)初中部改扩建工程施工总承包(二次公告)',
},
defaultList1: [ defaultList1: [
// { name: '工程名称', prop: 'name', slot: true }, // { name: '工程名称', prop: 'name', slot: true },
{ name: '工程名称', prop: 'name', style: true }, { name: '工程名称', prop: 'projectName', style: true },
{ name: '工程所在地', prop: 'creditNo' }, { name: '工程所在地', prop: 'areaName' },
{ name: '工程详细地址', prop: 'operName' }, { name: '工程详细地址', prop: 'projectAddress' },
{ name: '业态', prop: 'status' }, { name: '业态', prop: 'status' },
{ name: '工程类型', prop: 'startDate' }, { name: '工程类型', prop: 'projectType1' },
{ name: '计价模式(清单/定额)', prop: 'registCapi' }, { name: '计价模式(清单/定额)', prop: 'registCapi' },
{ name: '承包形式(EPC/DB/EP/PC)', prop: 'actualCapi'}, { name: '承包形式(EPC/DB/EP/PC)', prop: 'actualCapi'},
{ name: '合同类型', prop: 'checkDate' }, { name: '合同类型', prop: 'checkDate' },
{ name: '建设单位', prop: 'orgNo' }, { name: '建设单位', prop: 'orgNo' },
{ name: '设计单位', prop: 'regNo' }, { name: '设计单位', prop: 'designOrgName' },
{ name: '勘察单位', prop: 'creditNo' }, { name: '勘察单位', prop: 'creditNo' },
{ name: '监理单位', prop: 'econKind' }, { name: '监理单位', prop: 'supervisorOrgName' },
{ name: '代理公司(或工料测量师)', prop: 'term'}, { name: '代理公司(或工料测量师)', prop: 'term'},
{ name: '招标形式', prop: 'qualification' }, { name: '招标形式', prop: 'qualification' },
{ name: '承包方式', prop: 'provinceCode'}, { name: '承包方式', prop: 'provinceCode'},
{ name: '资金来源', prop: 'belongOrg' }, { name: '资金来源', prop: 'moneySource' },
{ name: '分包标准费用项价格库', prop: 'colleguesNum'}, { name: '分包标准费用项价格库', prop: 'colleguesNum'},
{ name: '材料机械标准费用价格库', prop: 'colleguesNum'}, { name: '材料机械标准费用价格库', prop: 'colleguesNum'},
{ name: '专业类别', prop: 'scope'}, { name: '专业类别', prop: 'scope'},
...@@ -87,9 +87,9 @@ export default { ...@@ -87,9 +87,9 @@ export default {
{ name: '结构类型', prop: 'registCapi' }, { name: '结构类型', prop: 'registCapi' },
{ name: '基础类型', prop: 'actualCapi'}, { name: '基础类型', prop: 'actualCapi'},
{ name: '单体个数', prop: 'checkDate', style: true }, { name: '单体个数', prop: 'checkDate', style: true },
{ name: '地上层数', prop: 'orgNo' }, { name: '地上层数', prop: 'noOfOverfloor' },
{ name: '地下层数', prop: 'regNo' }, { name: '地下层数', prop: 'noOfUnderfloor' },
{ name: '建筑高度', prop: 'creditNo' }, { name: '建筑高度', prop: 'constructHeight' },
{ name: '地下深度', prop: 'econKind' }, { name: '地下深度', prop: 'econKind' },
{ name: '首层(m)', prop: 'term'}, { name: '首层(m)', prop: 'term'},
{ name: '标准层(m)', prop: 'qualification' }, { name: '标准层(m)', prop: 'qualification' },
...@@ -146,9 +146,9 @@ export default { ...@@ -146,9 +146,9 @@ export default {
time:'2023-10-20' time:'2023-10-20'
}, },
defaultListYd4: [ defaultListYd4: [
{ name: '计划开工日期', prop: 'time' }, { name: '计划开工日期', prop: 'planStartDate' },
{ name: '计划竣工日期', prop: 'operName' }, { name: '计划竣工日期', prop: 'planEndDate' },
{ name: '总工期(天)', prop: 'status' }, { name: '总工期(天)', prop: 'contractWorkDays' },
{ name: '缺陷责任', prop: 'startDate' }, { name: '缺陷责任', prop: 'startDate' },
], ],
forInfoYd5:{ forInfoYd5:{
...@@ -191,9 +191,40 @@ export default { ...@@ -191,9 +191,40 @@ export default {
], ],
}; };
}, },
props: {
// 项目ID
// projectId: {
// type: String,
// required: true,
// default: ""
// },
// 详情信息
projectDetailInfo: {
type: Object,
default: () => ({})
}
},
watch: {
projectDetailInfo: {
handler(newValue) {
this.comProjectDetailInfo = newValue ? newValue : {};
// this.getCbProjectInfo(this.comProjectDetailInfo.projectId)
this.getCbProjectInfo('1759507630130479106')
// this.init(this.comProjectDetailInfo);
},
deep: true,
immediate: true
},
projectId: {
handler(newValue) {
this.comProjectId = newValue;
},
immediate: true
}
},
//可访问data属性 //可访问data属性
created() { created() {
// this.getCbProjectInfo()
}, },
//计算集 //计算集
computed: { computed: {
...@@ -201,7 +232,17 @@ export default { ...@@ -201,7 +232,17 @@ export default {
}, },
//方法集 //方法集
methods: { methods: {
async getCbProjectInfo(params) {
try {
const result = await getCbProjectInfo(params);
if (result.code == 200) {
console.log(result.data)
this.forInfo=result.data;
}
} catch (error) {
}
},
}, },
} }
</script> </script>
......
...@@ -9,10 +9,10 @@ ...@@ -9,10 +9,10 @@
<!-- 放入组件 v-if current == ‘xxxx’ 详情变量 this.detailInfo 需要深度监听--> <!-- 放入组件 v-if current == ‘xxxx’ 详情变量 this.detailInfo 需要深度监听-->
<!-- 工程项目信息 --> <!-- 工程项目信息 -->
<engineering-information v-if="current == 'basicEngineeringInformation'"></engineering-information> <engineering-information v-if="current == 'basicEngineeringInformation'" :project-detail-info="detailInfo"></engineering-information>
<!-- 直接费成本 --> <!-- 直接费成本 -->
<direct-cost v-if="current == 'directCost'"></direct-cost> <direct-cost v-if="current == 'directCost'" :project-detail-info="detailInfo"></direct-cost>
<!-- 工料汇总 --> <!-- 工料汇总 -->
<feed-summary v-if="current == 'feedSummary'" :project-id="projectId" :project-detail-info="detailInfo"></feed-summary> <feed-summary v-if="current == 'feedSummary'" :project-id="projectId" :project-detail-info="detailInfo"></feed-summary>
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<measure-items v-if="current == 'measureItem'" :project-id="projectId" :project-detail-info="detailInfo"></measure-items> <measure-items v-if="current == 'measureItem'" :project-id="projectId" :project-detail-info="detailInfo"></measure-items>
<!-- 其他项目 --> <!-- 其他项目 -->
<other-projects v-if="current == 'otherItems'"></other-projects> <other-projects v-if="current == 'otherItems'" :project-detail-info="detailInfo"></other-projects>
<!-- 盈亏分析对比 --> <!-- 盈亏分析对比 -->
<profit-Loss v-if="current == 'profitAndLoss'" :project-id="projectId" :project-detail-info="detailInfo"></profit-Loss> <profit-Loss v-if="current == 'profitAndLoss'" :project-id="projectId" :project-detail-info="detailInfo"></profit-Loss>
......
...@@ -70,13 +70,13 @@ ...@@ -70,13 +70,13 @@
<div style="display:flex;align-items:center"> <div style="display:flex;align-items:center">
<el-tooltip placement="top" v-if="scope.row.projectText.length>20"> <el-tooltip placement="top" v-if="scope.row.projectText.length>20">
<div class="renling"> <div class="renling">
<router-link v-if="scope.row.isGetProjectDetail" :to="`/projectCostLedger/detail?projectID=${scope.row.id}`" tag="a" <router-link v-if="scope.row.isGetProjectDetail" :to="`/projectCostLedger/detail?projectId=${scope.row.id}`" tag="a"
class="wordprimary" v-html="scope.row.projectName"></router-link> class="wordprimary" v-html="scope.row.projectName"></router-link>
<span v-else v-html="scope.row.projectName"></span> <span v-else v-html="scope.row.projectName"></span>
</div> </div>
</el-tooltip> </el-tooltip>
<div class="renling" v-else> <div class="renling" v-else>
<router-link v-if="scope.row.isGetProjectDetail" :to="`/projectCostLedger/detail?projectID=${scope.row.id}`" tag="a" <router-link v-if="scope.row.isGetProjectDetail" :to="`/projectCostLedger/detail?projectId=${scope.row.id}`" tag="a"
class="wordprimary" v-html="scope.row.projectName"></router-link> class="wordprimary" v-html="scope.row.projectName"></router-link>
<span v-else v-html="scope.row.projectName"></span> <span v-else v-html="scope.row.projectName"></span>
</div> </div>
......
...@@ -243,7 +243,7 @@ ...@@ -243,7 +243,7 @@
<script> <script>
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
// import { getDicts } from '@/api/system/dict/data' // import { getDicts } from '@/api/system/dict/data'
import { deleteCbProjectFile, getProjectFileUploadDetail, uploadCbProjectFile } from '@/api/projectCostLedger/index' import { deleteCbProjectFile, getProjectFileUploadDetail, uploadCbProjectFile,importData } from '@/api/projectCostLedger/index'
export default { export default {
name: 'upload', name: 'upload',
...@@ -297,7 +297,28 @@ ...@@ -297,7 +297,28 @@
this.visible = true this.visible = true
this.$refs['ruleForm'].validate((valid) => { this.$refs['ruleForm'].validate((valid) => {
if (valid) { if (valid) {
importData(this.formdata.id).then(res=>{
})
this.issub = true this.issub = true
this.directExpense.forEach(item=>{
item.fileParseStatus = 1
})
this.quantitySummary.forEach(item=>{
item.fileParseStatus = 1
})
this.measureProject.forEach(item=>{
item.fileParseStatus = 1
})
this.otherProject.forEach(item=>{
item.fileParseStatus = 1
})
this.sceneExpense.forEach(item=>{
item.fileParseStatus = 1
})
this.cbSummary.forEach(item=>{
item.fileParseStatus = 1
})
} else { } else {
this.issub = false this.issub = false
} }
......
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