48 lines
1.5 KiB
Java
48 lines
1.5 KiB
Java
package com.ruoyi.quartz.task;
|
||
|
||
import com.ruoyi.quartz.domain.OASysZgys;
|
||
import com.ruoyi.quartz.service.OAZgysService;
|
||
import com.ruoyi.quartz.service.OAZgysService;
|
||
import org.springframework.stereotype.Component;
|
||
|
||
import javax.annotation.PostConstruct;
|
||
import javax.annotation.Resource;
|
||
import java.util.List;
|
||
|
||
/**
|
||
* 定时任务调度-资格预审信息OA流程状态读取
|
||
*
|
||
* @author ruoyi
|
||
*/
|
||
@Component("pqTask")
|
||
public class ZgysTask
|
||
{
|
||
@Resource
|
||
private OAZgysService zgysService;
|
||
|
||
public static ZgysTask testUtils;
|
||
|
||
@PostConstruct
|
||
public void init() {
|
||
testUtils = this;
|
||
}
|
||
|
||
/**
|
||
* 检查OA是否审核结束
|
||
*/
|
||
public void OAZgysCheck() throws Exception {
|
||
try {
|
||
// 查询 资格预审信息-OA审批状态为审批中的单号,并且在中间表显示流程已经结束的单据,根据单号更新 OA审批状态
|
||
List<OASysZgys> pqs = zgysService.selectOAZGYS();
|
||
for(OASysZgys sysZgys:pqs){
|
||
// 批量更新资格预审信息-提交、OA审批状态,备注,副总审批
|
||
zgysService.updateZgysOAApprovalStatus(sysZgys.getPqId(),sysZgys.getState(),sysZgys.getRemark(),sysZgys.getPqVpApproval());
|
||
//将中间表 根据资格预审信息单号更新 isfinish=1 表示审核流程已结束
|
||
zgysService.updateOAZgysByZgysCode(sysZgys.getPqCode());
|
||
}
|
||
} catch (Exception e) {
|
||
e.printStackTrace();
|
||
}
|
||
}
|
||
}
|