'1122'
This commit is contained in:
parent
8ca477eceb
commit
a2ab785714
|
@ -4,7 +4,11 @@ import javax.servlet.http.HttpServletResponse;
|
||||||
import com.ruoyi.bid.domain.BidFile;
|
import com.ruoyi.bid.domain.BidFile;
|
||||||
import com.ruoyi.bid.domain.SysOaBid;
|
import com.ruoyi.bid.domain.SysOaBid;
|
||||||
import com.ruoyi.bid.service.IBidFileService;
|
import com.ruoyi.bid.service.IBidFileService;
|
||||||
|
import com.ruoyi.common.annotation.DataSource;
|
||||||
|
import com.ruoyi.common.constant.CacheConstants;
|
||||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||||
|
import com.ruoyi.common.core.redis.RedisCache;
|
||||||
|
import com.ruoyi.common.enums.DataSourceType;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
@ -12,10 +16,13 @@ import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||||
import com.ruoyi.common.utils.file.MinioUtil;
|
import com.ruoyi.common.utils.file.MinioUtil;
|
||||||
import com.ruoyi.common.utils.uuid.UUID;
|
import com.ruoyi.common.utils.uuid.UUID;
|
||||||
import com.ruoyi.quot.domain.Quot;
|
import com.ruoyi.quot.domain.Quot;
|
||||||
|
import com.ruoyi.redBook.domain.OAQuot;
|
||||||
|
import com.ruoyi.redBook.domain.RbVersionDateResult;
|
||||||
import com.ruoyi.system.service.ISysDeptService;
|
import com.ruoyi.system.service.ISysDeptService;
|
||||||
import com.ruoyi.technicalConfirm.domain.BidJsqr;
|
import com.ruoyi.technicalConfirm.domain.BidJsqr;
|
||||||
import com.ruoyi.technicalConfirm.service.IBidJsqrService;
|
import com.ruoyi.technicalConfirm.service.IBidJsqrService;
|
||||||
import com.ruoyi.technicalConfirm.service.IQuotJsqrService;
|
import com.ruoyi.technicalConfirm.service.IQuotJsqrService;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
@ -51,6 +58,10 @@ public class BidController extends BaseController
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysDeptService deptService;
|
private ISysDeptService deptService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RedisCache redisCache;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分派
|
* 分派
|
||||||
*/
|
*/
|
||||||
|
@ -411,4 +422,42 @@ public class BidController extends BaseController
|
||||||
bidService.updateBid(bid);
|
bidService.updateBid(bid);
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取调价日期
|
||||||
|
* @param oAQuot
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@DataSource(DataSourceType.OAREDBOOK)
|
||||||
|
@GetMapping("/versionList")
|
||||||
|
public AjaxResult versionList(OAQuot oAQuot)
|
||||||
|
{
|
||||||
|
AjaxResult ajax = AjaxResult.success();
|
||||||
|
|
||||||
|
List<RbVersionDateResult> resCache = redisCache.getCacheObject(getCacheKey("versionBidList"));
|
||||||
|
if(CollectionUtils.isEmpty(resCache)){
|
||||||
|
resCache = bidService.versionList();
|
||||||
|
redisCache.setCacheObject(getCacheKey("versionBidList"),resCache);
|
||||||
|
}else{
|
||||||
|
// 判断是否有最新调价
|
||||||
|
String maxUid = resCache.get(0).getValue();//获取缓存里最新调价版本
|
||||||
|
String rb_price_version = bidService.rb_price_version();//获取电子红本最新的调价版本
|
||||||
|
if(!rb_price_version.equals(maxUid)){
|
||||||
|
resCache = bidService.versionList();
|
||||||
|
redisCache.setCacheObject(getCacheKey("versionBidList"),resCache);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ajax.put("versionList", resCache);
|
||||||
|
return ajax;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取redis 调价日期
|
||||||
|
* @param type
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private String getCacheKey(String type)
|
||||||
|
{
|
||||||
|
return CacheConstants.RB_VERSION_BID_DATE + type;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,6 +62,11 @@ public class CacheConstants
|
||||||
*/
|
*/
|
||||||
public static final String RB_VERSION_DATE = "rb_version_date:";
|
public static final String RB_VERSION_DATE = "rb_version_date:";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 调价日期数据-投标用 redis key
|
||||||
|
*/
|
||||||
|
public static final String RB_VERSION_BID_DATE = "rb_version_bid_date:";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 企查查客户查询次数
|
* 企查查客户查询次数
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.ruoyi.bid.mapper;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.ruoyi.bid.domain.Bid;
|
import com.ruoyi.bid.domain.Bid;
|
||||||
import com.ruoyi.bid.domain.SysOaBid;
|
import com.ruoyi.bid.domain.SysOaBid;
|
||||||
|
import com.ruoyi.redBook.domain.RbVersionDateResult;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 投标信息Mapper接口
|
* 投标信息Mapper接口
|
||||||
|
@ -86,4 +87,15 @@ public interface BidMapper
|
||||||
*/
|
*/
|
||||||
void insertSysOABid(SysOaBid sysOaBid);
|
void insertSysOABid(SysOaBid sysOaBid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取调价日期
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<RbVersionDateResult> versionList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取本地记录的调价版本
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String rb_price_version();
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
||||||
import com.ruoyi.bid.domain.Bid;
|
import com.ruoyi.bid.domain.Bid;
|
||||||
import com.ruoyi.bid.domain.SysOaBid;
|
import com.ruoyi.bid.domain.SysOaBid;
|
||||||
import com.ruoyi.quot.domain.Quot;
|
import com.ruoyi.quot.domain.Quot;
|
||||||
|
import com.ruoyi.redBook.domain.RbVersionDateResult;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 投标信息Service接口
|
* 投标信息Service接口
|
||||||
|
@ -88,4 +89,16 @@ public interface IBidService
|
||||||
*/
|
*/
|
||||||
void insertSysOABid(SysOaBid sysOaBid);
|
void insertSysOABid(SysOaBid sysOaBid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取调价日期
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<RbVersionDateResult> versionList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取本地记录的调价版本
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String rb_price_version();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@ import com.ruoyi.common.annotation.DataScope;
|
||||||
import com.ruoyi.common.annotation.DataSource;
|
import com.ruoyi.common.annotation.DataSource;
|
||||||
import com.ruoyi.common.enums.DataSourceType;
|
import com.ruoyi.common.enums.DataSourceType;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import com.ruoyi.redBook.domain.RbVersionDateResult;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.ruoyi.bid.mapper.BidMapper;
|
import com.ruoyi.bid.mapper.BidMapper;
|
||||||
|
@ -139,4 +140,22 @@ public class BidServiceImpl implements IBidService
|
||||||
public void insertSysOABid(SysOaBid sysOaBid) {
|
public void insertSysOABid(SysOaBid sysOaBid) {
|
||||||
bidMapper.insertSysOABid(sysOaBid);
|
bidMapper.insertSysOABid(sysOaBid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取调价日期
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<RbVersionDateResult> versionList() {
|
||||||
|
return bidMapper.versionList();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取本地记录的调价版本
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String rb_price_version() {
|
||||||
|
return bidMapper.rb_price_version();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -438,4 +438,20 @@
|
||||||
<include refid="selectBidVo"/>
|
<include refid="selectBidVo"/>
|
||||||
where a.bid_jsxz_confirm_id = #{bidJsqrId}
|
where a.bid_jsxz_confirm_id = #{bidJsqrId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="versionList" resultType="RbVersionDateResult">
|
||||||
|
select uid_0 value,convert(varchar(10),[date_0],23) label
|
||||||
|
from [rb_productVersion] A
|
||||||
|
inner join (select max(uid_0) muid from rb_productVersion
|
||||||
|
where sta_0=1 or sta_0=0 group by date_0 )B on A.uid_0=B.muid
|
||||||
|
order by sta_0 desc,uid_0 desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="rb_price_version" resultType="String">
|
||||||
|
select top 1 muid from
|
||||||
|
(
|
||||||
|
select max(uid_0) muid,date_0 from rb_productVersion
|
||||||
|
where sta_0=1 or sta_0=0 group by date_0
|
||||||
|
)a order by date_0 desc
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -8,6 +8,7 @@ export function bidAssign(query) {
|
||||||
data: query
|
data: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询投标信息列表
|
// 查询投标信息列表
|
||||||
export function listBid(query) {
|
export function listBid(query) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -95,3 +96,13 @@ export function rejectBid(data) {
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//获取调价日期
|
||||||
|
export function versionList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/bid/bid/versionList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -402,7 +402,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<div v-if="checkRole(['BID']) ">
|
<div v-if="!checkRole(['SALES_MAN']) ">
|
||||||
<el-divider content-position="left" class="customer_divider_text">投标信息</el-divider>
|
<el-divider content-position="left" class="customer_divider_text">投标信息</el-divider>
|
||||||
<el-row :gutter="8">
|
<el-row :gutter="8">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
|
@ -421,6 +421,30 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row :gutter="8">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="调价通知" prop="bidPriceAdjustmentNotice">
|
||||||
|
<el-select v-model="form.bidPriceAdjustmentNotice">
|
||||||
|
<el-option
|
||||||
|
v-for="item in versionList"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
@click.native="selectRbDate(item.value)"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="铜价" prop="bidTongPrice">
|
||||||
|
<el-input v-model="form.bidTongPrice" placeholder="请输入铜价" :disabled="true"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="铝价" prop="bidLvPrice">
|
||||||
|
<el-input v-model="form.bidLvPrice" placeholder="请输入铝价" :disabled="true"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
<el-row :gutter="8">
|
<el-row :gutter="8">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="开闭口" prop="bidOpenClose">
|
<el-form-item label="开闭口" prop="bidOpenClose">
|
||||||
|
@ -434,28 +458,11 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="调价通知" prop="bidPriceAdjustmentNotice">
|
|
||||||
<el-input v-model="form.bidPriceAdjustmentNotice" placeholder="请输入调价通知" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="投标有效期" prop="bidValidityPeriod">
|
<el-form-item label="投标有效期" prop="bidValidityPeriod">
|
||||||
<el-input v-model="form.bidValidityPeriod" placeholder="请输入投标有效期" />
|
<el-input v-model="form.bidValidityPeriod" placeholder="请输入投标有效期" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="8">
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="铜价" prop="bidTongPrice">
|
|
||||||
<el-input v-model="form.bidTongPrice" placeholder="请输入铜价" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="铝价" prop="bidLvPrice">
|
|
||||||
<el-input v-model="form.bidLvPrice" placeholder="请输入铝价" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="点数" prop="bidDs">
|
<el-form-item label="点数" prop="bidDs">
|
||||||
<el-input v-model="form.bidDs" placeholder="请输入点数" />
|
<el-input v-model="form.bidDs" placeholder="请输入点数" />
|
||||||
|
@ -892,7 +899,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { checkPermi,checkRole } from '@/utils/permission';// 权限判断函数
|
import { checkPermi,checkRole } from '@/utils/permission';// 权限判断函数
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
import { bidAssign,listBid, getBid, delBid, addBid, updateBid, bidFileList,bidFileDelete, commitTbxx,commitJsBid, rejectBid } from "@/api/bid/bid";
|
import { versionList,bidAssign,listBid, getBid, delBid, addBid, updateBid, bidFileList,bidFileDelete, commitTbxx,commitJsBid, rejectBid } from "@/api/bid/bid";
|
||||||
/** 弹窗放大、拖拽 */
|
/** 弹窗放大、拖拽 */
|
||||||
import elDragDialog from "@/directive/dialog/dragDialog";
|
import elDragDialog from "@/directive/dialog/dragDialog";
|
||||||
/** 导入技术确认单详情组件*/
|
/** 导入技术确认单详情组件*/
|
||||||
|
@ -1018,11 +1025,15 @@ export default {
|
||||||
//是否打开选人组件,默认不打开
|
//是否打开选人组件,默认不打开
|
||||||
peopleOpenFp:false, // 分派
|
peopleOpenFp:false, // 分派
|
||||||
peopleOpenSelectYwy:false, // 投标办选择业务员创建
|
peopleOpenSelectYwy:false, // 投标办选择业务员创建
|
||||||
selectedPeoples:[]
|
selectedPeoples:[],
|
||||||
|
|
||||||
|
//调价日期
|
||||||
|
versionList: [], // 调价版本数据列表
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.getVersionList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 权限控制 */
|
/** 权限控制 */
|
||||||
|
@ -1041,6 +1052,16 @@ export default {
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
//获取调价日期
|
||||||
|
async getVersionList(){
|
||||||
|
await versionList(this.queryParams).then(response => {
|
||||||
|
this.versionList = response.versionList;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//选择调价日期
|
||||||
|
async selectRbDate(uid) {
|
||||||
|
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
|
|
Loading…
Reference in New Issue