提交部署

This commit is contained in:
磷叶 2024-11-21 15:53:10 +08:00
parent ea3648e9ca
commit 85a71ff6c1
2 changed files with 30 additions and 1 deletions

View File

@ -163,7 +163,7 @@ public class Constants
/**
* 定时任务白名单配置仅允许访问的包名如其他需要可以自行添加
*/
public static final String[] JOB_WHITELIST_STR = { "com.ruoyi.quartz.task" };
public static final String[] JOB_WHITELIST_STR = { "com.ruoyi.quartz.task", "com.ruoyi.task" };
/**
* 定时任务违规的字符

View File

@ -0,0 +1,29 @@
package com.ruoyi.task.prodOrder;
import com.ruoyi.common.constant.Constants;
import com.ruoyi.web.yh.prodOrder.domain.dto.ProdOrderSyncQuery;
import com.ruoyi.web.yh.prodOrder.domain.enums.ProdOrderErpStatus;
import com.ruoyi.web.yh.prodOrder.service.ProdOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* @author wjh
* 2024/11/21
*/
@Component
public class ProdOrderTask {
@Autowired
private ProdOrderService prodOrderService;
/**
* 同步生产订单
*/
public void sync() {
ProdOrderSyncQuery query = new ProdOrderSyncQuery();
query.setStatusList(ProdOrderErpStatus.canSync());
prodOrderService.sync(query, Constants.SYSTEM_USER_ID);
}
}