'123'
This commit is contained in:
parent
64fadfd745
commit
44af7b5ac4
|
@ -39,21 +39,17 @@ public class QuotTask
|
|||
* 检查OA报加单审批流程是否结束
|
||||
*/
|
||||
public void OAQuot() throws Exception {
|
||||
|
||||
Boolean lock= redisLock.getLock(getJobKey("OAQuotTaskLock"), 120, "OAQuotTask");
|
||||
if(lock){
|
||||
try{
|
||||
// 查询 报价单-OA审批状态为审批中的单号,并且在中间表显示流程已经结束的单据,根据单号更新 OA审批状态
|
||||
List<OASysQuot> quots = quotService.selectOAQUOT();
|
||||
for(OASysQuot sysoaquot:quots){
|
||||
// 批量更新报价单-OA审批状态,备注
|
||||
quotService.updateQuotOAApprovalStatus(sysoaquot.getQuotId(),sysoaquot.getState(),sysoaquot.getRemark());
|
||||
//将中间表 根据报价单号更新 isfinish=1 表示报价流程已结束
|
||||
quotService.updateOAQuotByQuotCode(sysoaquot.getQuotCode());
|
||||
}
|
||||
}catch (Exception e) {
|
||||
throw new Exception(e.getMessage(), e);
|
||||
try{
|
||||
// 查询 报价单-OA审批状态为审批中的单号,并且在中间表显示流程已经结束的单据,根据单号更新 OA审批状态
|
||||
List<OASysQuot> quots = quotService.selectOAQUOT();
|
||||
for(OASysQuot sysoaquot:quots){
|
||||
// 批量更新报价单-OA审批状态,备注
|
||||
quotService.updateQuotOAApprovalStatus(sysoaquot.getQuotId(),sysoaquot.getState(),sysoaquot.getRemark());
|
||||
//将中间表 根据报价单号更新 isfinish=1 表示报价流程已结束
|
||||
quotService.updateOAQuotByQuotCode(sysoaquot.getQuotCode());
|
||||
}
|
||||
}catch (Exception e) {
|
||||
throw new Exception(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -54,32 +54,29 @@ public class RbTask
|
|||
public void tongb() throws Exception {
|
||||
|
||||
String rbVersionUid = testUtils.sapTjService.selRbVersionUid();//红本调价记录uid
|
||||
Boolean lock= redisLock.getLock(getJobKey("rbTask"), 480, "rbTask");
|
||||
if(lock){
|
||||
//判断是否已执行调价 (6.3 redbook rb_productVersion 是否有新增uid and sta='1'、sdmdm1 调价日期今日的数据是否存在)
|
||||
String locVersionUid = testUtils.sapTjService.selLocVersionUid();//本地红本调价记录uid
|
||||
//判断是否已执行调价 (6.3 redbook rb_productVersion 是否有新增uid and sta='1'、sdmdm1 调价日期今日的数据是否存在)
|
||||
String locVersionUid = testUtils.sapTjService.selLocVersionUid();//本地红本调价记录uid
|
||||
|
||||
String RbProductPriceCount = testUtils.sapTjService.selRbProductPriceVersionUid(rbVersionUid);//RbProductPrice表是否有更新
|
||||
String RbProductBasePriceCount = testUtils.sapTjService.selRbProductBasePriceVersionUid(rbVersionUid);//RbProductBasePrice表是否有更新
|
||||
String RbProductPriceCount = testUtils.sapTjService.selRbProductPriceVersionUid(rbVersionUid);//RbProductPrice表是否有更新
|
||||
String RbProductBasePriceCount = testUtils.sapTjService.selRbProductBasePriceVersionUid(rbVersionUid);//RbProductBasePrice表是否有更新
|
||||
|
||||
try{
|
||||
if(!rbVersionUid.equals(locVersionUid) && Integer.valueOf(RbProductPriceCount)>0 && Integer.valueOf(RbProductBasePriceCount)>0) {//有新增调价版本并且有调价记录
|
||||
System.out.println("=======================开始同步!======================");
|
||||
testUtils.sapTjService.deleteLocProductPrice();//删除本地c_rb_product_price表数据
|
||||
List<c_rb_product_price> productPriceList = testUtils.sapTjService.getProductPriceList(rbVersionUid);
|
||||
JDBCBatchInsert.insertRbProductPrice(productPriceList);//批量插入
|
||||
try{
|
||||
if(!rbVersionUid.equals(locVersionUid) && Integer.valueOf(RbProductPriceCount)>0 && Integer.valueOf(RbProductBasePriceCount)>0) {//有新增调价版本并且有调价记录
|
||||
System.out.println("=======================开始同步!======================");
|
||||
testUtils.sapTjService.deleteLocProductPrice();//删除本地c_rb_product_price表数据
|
||||
List<c_rb_product_price> productPriceList = testUtils.sapTjService.getProductPriceList(rbVersionUid);
|
||||
JDBCBatchInsert.insertRbProductPrice(productPriceList);//批量插入
|
||||
|
||||
testUtils.sapTjService.deleteLocProductBasePrice();//删除本地c_rb_productbase_price表数据
|
||||
List<c_rb_productbase_price> productBasePriceList = testUtils.sapTjService.getProductBasePriceList(rbVersionUid);
|
||||
JDBCBatchInsert.insertRbProductBasePrice(productBasePriceList);//批量插入
|
||||
testUtils.sapTjService.deleteLocProductBasePrice();//删除本地c_rb_productbase_price表数据
|
||||
List<c_rb_productbase_price> productBasePriceList = testUtils.sapTjService.getProductBasePriceList(rbVersionUid);
|
||||
JDBCBatchInsert.insertRbProductBasePrice(productBasePriceList);//批量插入
|
||||
|
||||
testUtils.sapTjService.updateLocRbVersion(rbVersionUid);//更新本地c_rb_version表
|
||||
testUtils.sapTjService.updateLocRbVersion(rbVersionUid);//更新本地c_rb_version表
|
||||
|
||||
}
|
||||
redisCache.deleteObject(getJobKey("rbTask"));
|
||||
}catch (Exception e) {
|
||||
throw new Exception(e.getMessage(), e);
|
||||
}
|
||||
redisCache.deleteObject(getJobKey("rbTask"));
|
||||
}catch (Exception e) {
|
||||
throw new Exception(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ public class ScheduleUtils
|
|||
jobDetail.getJobDataMap().put(ScheduleConstants.TASK_PROPERTIES, job);
|
||||
|
||||
//注册triggerListener ->项目多机部署时使用
|
||||
// scheduler.getListenerManager().addTriggerListener(new RedisTriggerListener());
|
||||
scheduler.getListenerManager().addTriggerListener(new RedisTriggerListener());
|
||||
|
||||
// 判断是否存在
|
||||
if (scheduler.checkExists(getJobKey(jobId, jobGroup)))
|
||||
|
|
|
@ -494,6 +494,7 @@
|
|||
:action="uploadUrl"
|
||||
:headers="headers"
|
||||
:data="{ relation_id: this.form.quotId,file_type: 'quotXjFile' }"
|
||||
:before-upload="beforeAvatarUpload"
|
||||
:on-success="handleAvatarSuccess"
|
||||
:show-file-list="false"
|
||||
:limit="1"
|
||||
|
@ -1264,7 +1265,8 @@ export default {
|
|||
let self = this;
|
||||
this.$modal.confirm('是否确认修订所选报价单且更新状态为协助中?').then(function() {
|
||||
getReturnUpdateQuot(quotId).then(response => {
|
||||
self.setInfo(response);
|
||||
//self.setInfo(response);
|
||||
this.$modal.msgSuccess("更改成功");
|
||||
});
|
||||
}).then(() => {}).catch(() => {});
|
||||
},
|
||||
|
@ -1342,7 +1344,7 @@ export default {
|
|||
});
|
||||
} else {
|
||||
addQuot(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.$modal.msgSuccess("创建成功");
|
||||
|
||||
const row = {'quotId':response.data.quotId}
|
||||
this.handleUpdate(row);
|
||||
|
@ -1630,7 +1632,20 @@ export default {
|
|||
uploadFile(activeName){
|
||||
this.activeName = activeName
|
||||
},
|
||||
|
||||
//上传前校验
|
||||
beforeAvatarUpload(file) {
|
||||
let activeName = this.activeName;
|
||||
if(activeName=='quotXjFile'){
|
||||
if(file.name.split('.')[1].toLowerCase() != 'xls' && file.name.split('.')[1].toLowerCase() != 'xlsx'){
|
||||
this.$modal.msgError("清单附件必须是Excel格式");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/*const isLt2M = file.size / 1024 / 1024 < 2; // 小于2M
|
||||
if ( !isLt2M ) {
|
||||
console.log('文件大小超出2M');
|
||||
}*/
|
||||
},
|
||||
//成功回调
|
||||
handleAvatarSuccess(res) {
|
||||
let activeName = this.activeName;
|
||||
|
|
Loading…
Reference in New Issue