Commit c7498979 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 6ab2fc68 d83e0935
......@@ -59,8 +59,8 @@ public class CbQuantitySummaryController extends BaseController {
*/
@GetMapping(value = "/conversionNotice")
public R conversionNotice(CbQuantitySummaryListBo bo) {
baseService.conversionNotice(bo);
return R.ok();
return baseService.conversionNotice(bo);
}
/**
......
package com.dsk.cscec.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dsk.common.core.domain.R;
import com.dsk.cscec.domain.CbQuantitySummary;
import com.dsk.cscec.domain.CbQuantitySummaryActual;
import com.dsk.cscec.domain.bo.CbProjectBaseBo;
......@@ -30,6 +31,6 @@ public interface ICbQuantitySummaryService extends IService<CbQuantitySummary> {
boolean batchInsert(List<CbQuantitySummary> list);
void conversionNotice(CbQuantitySummaryListBo bo);
R conversionNotice(CbQuantitySummaryListBo bo);
}
......@@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dsk.common.constant.GlobalConstants;
import com.dsk.common.core.domain.R;
import com.dsk.common.exception.ServiceException;
import com.dsk.common.helper.LoginHelper;
import com.dsk.common.utils.redis.RedisUtils;
......@@ -161,7 +162,7 @@ public class CbQuantitySummaryServiceImpl extends ServiceImpl<CbQuantitySummaryM
}
@Override
public void conversionNotice(CbQuantitySummaryListBo bo) {
public R conversionNotice(CbQuantitySummaryListBo bo) {
if (StringUtil.isBlank(bo.getRecordDate())) {
//默认当前月
bo.setRecordDate(DatePattern.SIMPLE_MONTH_FORMAT.format(new Date()));
......@@ -169,13 +170,13 @@ public class CbQuantitySummaryServiceImpl extends ServiceImpl<CbQuantitySummaryM
//是否是实体工程材料
CbSubject cbSubject = cbSubjectMapper.selectOne(new LambdaQueryWrapper<CbSubject>().eq(CbSubject::getCbSubjectName, bo.getCbSubjectName()));
if (ObjectUtil.isNull(cbSubject)) {
return;
return R.ok();
}
if (cbSubject.getCbSubjectNo().startsWith("FG") || cbSubject.getCbSubjectNo().startsWith("JD")) {
//是否存在未换算数据
List<CbQuantitySummaryListVo> unconvertedList = baseMapper.unconvertedList(bo);
if (CollectionUtil.isEmpty(unconvertedList)) {
return;
return R.ok();
}
//是否提示
String key = GlobalConstants.UNIT_CONVERSION_NOTICE + LoginHelper.getUserId() + "_" + bo.getProjectId() + "_" + bo.getCbSubjectName() + "_" + bo.getRecordDate();
......@@ -183,11 +184,11 @@ public class CbQuantitySummaryServiceImpl extends ServiceImpl<CbQuantitySummaryM
Date now = new Date();
long expireTime = DateUtil.between(now, DateUtil.endOfDay(now), DateUnit.SECOND);
RedisUtils.setCacheObject(key, "noticed", Duration.ofSeconds(expireTime));
Assert.isTrue(false, "系统检测到您近期未进行物料单位换算,请立即进行换算。");
return R.ok("系统检测到您近期未进行物料单位换算,请立即进行换算。", 500);
}
}
return R.ok();
}
}
......@@ -474,7 +474,7 @@ public class CbSummaryServiceImpl extends ServiceImpl<CbSummaryMapper, CbSummary
if (unfilled.length() > 0) {
unfilled.deleteCharAt(unfilled.lastIndexOf("、"));
unfilled.append(" 未填写成本,是否继续锁定?");
return R.fail(unfilled.toString());
return R.ok(unfilled.toString(),500);
} else {
return R.ok();
}
......
......@@ -213,6 +213,17 @@ export const getFeedSummaryMenuTreeApi = (params = {}) => request({
params
});
/**
* 实体工程材料-单位换算提示
* @param {*} params
* @returns
*/
export const getFeedSummaryConversionNotice = (params = {}) => request({
url: "/cb/quantity/summary/conversionNotice",
method: "get",
params
});
/**
* 获取已记录月份集合
* @param {*} params
......
......@@ -57,7 +57,7 @@
</template>
<script>
import ProjectSideMenu from "@/views/projectCostLedger/detail/components/ProjectSideMenu";
import { getFeedSummaryMenuTreeApi, getFeedSummaryMonthListApi, getFeedSummaryListApi, updateFeedSummaryRowsApi } from "@/api/projectCostLedger";
import { getFeedSummaryMenuTreeApi, getFeedSummaryMonthListApi, getFeedSummaryListApi, getFeedSummaryConversionNotice, updateFeedSummaryRowsApi } from "@/api/projectCostLedger";
import DskTableHeaderSetting from "@/components/DskTableHeaderSetting";
import DskSkeleton from "@/components/DskSkeleton";
import CustomTable from "@/components/CustomTable";
......@@ -398,7 +398,38 @@ export default {
if (parentName) this.currentParentName = parentName;
// 请求数据列表
const params = this.createRequestConditions();
await this.getFeedSummaryList(params);
this.getFeedSummaryList(params);
if (this.currentParentName.indexOf('实体工程材料') != -1) {
const { projectId, cbStage } = this.comProjectDetailInfo;
const params = {
projectId,
cbStage
};
params["cbSubjectName"] = this.currentNodeName;
// 判断当月是否存在于server返回month集合中
const _now = this.getNowMonth();
if (this.includeNowMonth(_now)) {
params["recordDate"] = _now;
}
this.getFeedSummaryConversionNotice(params);
}
},
async getFeedSummaryConversionNotice(params) {
const data = await getFeedSummaryConversionNotice(params);
if (data.data == 500) {
this.$confirm('系统检测到您近一月未进行物料单位换算,是否立即进行换算?', '温馨提示', {
confirmButtonText: '立即换算',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
}
},
getCurrentType(parent) {
if (parent.level == 2) {
......
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