This commit is contained in:
xd 2024-06-07 16:31:19 +08:00
parent 64fadfd745
commit 44af7b5ac4
4 changed files with 48 additions and 40 deletions

View File

@ -39,21 +39,17 @@ public class QuotTask
* 检查OA报加单审批流程是否结束 * 检查OA报加单审批流程是否结束
*/ */
public void OAQuot() throws Exception { public void OAQuot() throws Exception {
try{
Boolean lock= redisLock.getLock(getJobKey("OAQuotTaskLock"), 120, "OAQuotTask"); // 查询 报价单-OA审批状态为审批中的单号并且在中间表显示流程已经结束的单据根据单号更新 OA审批状态
if(lock){ List<OASysQuot> quots = quotService.selectOAQUOT();
try{ for(OASysQuot sysoaquot:quots){
// 查询 报价单-OA审批状态为审批中的单号并且在中间表显示流程已经结束的单据根据单号更新 OA审批状态 // 批量更新报价单-OA审批状态,备注
List<OASysQuot> quots = quotService.selectOAQUOT(); quotService.updateQuotOAApprovalStatus(sysoaquot.getQuotId(),sysoaquot.getState(),sysoaquot.getRemark());
for(OASysQuot sysoaquot:quots){ //将中间表 根据报价单号更新 isfinish=1 表示报价流程已结束
// 批量更新报价单-OA审批状态,备注 quotService.updateOAQuotByQuotCode(sysoaquot.getQuotCode());
quotService.updateQuotOAApprovalStatus(sysoaquot.getQuotId(),sysoaquot.getState(),sysoaquot.getRemark());
//将中间表 根据报价单号更新 isfinish=1 表示报价流程已结束
quotService.updateOAQuotByQuotCode(sysoaquot.getQuotCode());
}
}catch (Exception e) {
throw new Exception(e.getMessage(), e);
} }
}catch (Exception e) {
throw new Exception(e.getMessage(), e);
} }
} }

View File

@ -54,32 +54,29 @@ public class RbTask
public void tongb() throws Exception { public void tongb() throws Exception {
String rbVersionUid = testUtils.sapTjService.selRbVersionUid();//红本调价记录uid String rbVersionUid = testUtils.sapTjService.selRbVersionUid();//红本调价记录uid
Boolean lock= redisLock.getLock(getJobKey("rbTask"), 480, "rbTask"); //判断是否已执行调价 6.3 redbook rb_productVersion 是否有新增uid and sta='1'sdmdm1 调价日期今日的数据是否存在
if(lock){ 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 RbProductPriceCount = testUtils.sapTjService.selRbProductPriceVersionUid(rbVersionUid);//RbProductPrice表是否有更新
String RbProductBasePriceCount = testUtils.sapTjService.selRbProductBasePriceVersionUid(rbVersionUid);//RbProductBasePrice表是否有更新 String RbProductBasePriceCount = testUtils.sapTjService.selRbProductBasePriceVersionUid(rbVersionUid);//RbProductBasePrice表是否有更新
try{ try{
if(!rbVersionUid.equals(locVersionUid) && Integer.valueOf(RbProductPriceCount)>0 && Integer.valueOf(RbProductBasePriceCount)>0) {//有新增调价版本并且有调价记录 if(!rbVersionUid.equals(locVersionUid) && Integer.valueOf(RbProductPriceCount)>0 && Integer.valueOf(RbProductBasePriceCount)>0) {//有新增调价版本并且有调价记录
System.out.println("=======================开始同步!======================"); System.out.println("=======================开始同步!======================");
testUtils.sapTjService.deleteLocProductPrice();//删除本地c_rb_product_price表数据 testUtils.sapTjService.deleteLocProductPrice();//删除本地c_rb_product_price表数据
List<c_rb_product_price> productPriceList = testUtils.sapTjService.getProductPriceList(rbVersionUid); List<c_rb_product_price> productPriceList = testUtils.sapTjService.getProductPriceList(rbVersionUid);
JDBCBatchInsert.insertRbProductPrice(productPriceList);//批量插入 JDBCBatchInsert.insertRbProductPrice(productPriceList);//批量插入
testUtils.sapTjService.deleteLocProductBasePrice();//删除本地c_rb_productbase_price表数据 testUtils.sapTjService.deleteLocProductBasePrice();//删除本地c_rb_productbase_price表数据
List<c_rb_productbase_price> productBasePriceList = testUtils.sapTjService.getProductBasePriceList(rbVersionUid); List<c_rb_productbase_price> productBasePriceList = testUtils.sapTjService.getProductBasePriceList(rbVersionUid);
JDBCBatchInsert.insertRbProductBasePrice(productBasePriceList);//批量插入 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);
} }
} }

View File

@ -77,7 +77,7 @@ public class ScheduleUtils
jobDetail.getJobDataMap().put(ScheduleConstants.TASK_PROPERTIES, job); jobDetail.getJobDataMap().put(ScheduleConstants.TASK_PROPERTIES, job);
//注册triggerListener ->项目多机部署时使用 //注册triggerListener ->项目多机部署时使用
// scheduler.getListenerManager().addTriggerListener(new RedisTriggerListener()); scheduler.getListenerManager().addTriggerListener(new RedisTriggerListener());
// 判断是否存在 // 判断是否存在
if (scheduler.checkExists(getJobKey(jobId, jobGroup))) if (scheduler.checkExists(getJobKey(jobId, jobGroup)))

View File

@ -494,6 +494,7 @@
:action="uploadUrl" :action="uploadUrl"
:headers="headers" :headers="headers"
:data="{ relation_id: this.form.quotId,file_type: 'quotXjFile' }" :data="{ relation_id: this.form.quotId,file_type: 'quotXjFile' }"
:before-upload="beforeAvatarUpload"
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:show-file-list="false" :show-file-list="false"
:limit="1" :limit="1"
@ -1264,7 +1265,8 @@ export default {
let self = this; let self = this;
this.$modal.confirm('是否确认修订所选报价单且更新状态为协助中?').then(function() { this.$modal.confirm('是否确认修订所选报价单且更新状态为协助中?').then(function() {
getReturnUpdateQuot(quotId).then(response => { getReturnUpdateQuot(quotId).then(response => {
self.setInfo(response); //self.setInfo(response);
this.$modal.msgSuccess("更改成功");
}); });
}).then(() => {}).catch(() => {}); }).then(() => {}).catch(() => {});
}, },
@ -1342,7 +1344,7 @@ export default {
}); });
} else { } else {
addQuot(this.form).then(response => { addQuot(this.form).then(response => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("创建成功");
const row = {'quotId':response.data.quotId} const row = {'quotId':response.data.quotId}
this.handleUpdate(row); this.handleUpdate(row);
@ -1630,7 +1632,20 @@ export default {
uploadFile(activeName){ uploadFile(activeName){
this.activeName = 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) { handleAvatarSuccess(res) {
let activeName = this.activeName; let activeName = this.activeName;