8 changed files with 144 additions and 4 deletions
@ -0,0 +1,32 @@ |
|||
package com.win.module.wms.job; |
|||
|
|||
import cn.hutool.json.JSONObject; |
|||
import cn.hutool.json.JSONUtil; |
|||
import com.win.framework.quartz.core.handler.JobHandler; |
|||
import com.win.framework.tenant.core.context.TenantContextHolder; |
|||
import com.win.module.wms.service.purchase.PurchaseMainService; |
|||
import lombok.extern.log4j.Log4j; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.context.annotation.Lazy; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import javax.annotation.Resource; |
|||
|
|||
@Component |
|||
@Slf4j |
|||
public class PurchaseOrderJob implements JobHandler { |
|||
|
|||
@Lazy |
|||
@Resource |
|||
private PurchaseMainService purchaseMainService; |
|||
|
|||
@Override |
|||
public String execute(String param) throws Exception { |
|||
JSONObject jsonObject= (JSONObject) JSONUtil.parse(param); |
|||
log.info("【采购订单自动发布】----开始,请求参数:{}",jsonObject.get("tenantId").toString()); |
|||
TenantContextHolder.setTenantId(Long.valueOf(jsonObject.get("tenantId").toString())); |
|||
purchaseMainService.autoHandlePurchaseMainByJob(); |
|||
log.info("【采购订单自动发布】----结束"); |
|||
return "采购订单自动发布"; |
|||
} |
|||
} |
@ -0,0 +1,32 @@ |
|||
package com.win.module.wms.job; |
|||
|
|||
import cn.hutool.json.JSONObject; |
|||
import cn.hutool.json.JSONUtil; |
|||
import com.win.framework.quartz.core.handler.JobHandler; |
|||
import com.win.framework.tenant.core.context.TenantContextHolder; |
|||
import com.win.module.wms.service.purchasePlan.PurchasePlanMainService; |
|||
import lombok.extern.log4j.Log4j; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.context.annotation.Lazy; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import javax.annotation.Resource; |
|||
|
|||
@Component |
|||
@Slf4j |
|||
public class PurchasePlanJob implements JobHandler { |
|||
|
|||
@Lazy |
|||
@Resource |
|||
private PurchasePlanMainService purchasePlanMainService; |
|||
|
|||
@Override |
|||
public String execute(String param) throws Exception { |
|||
JSONObject jsonObject= (JSONObject) JSONUtil.parse(param); |
|||
log.info("【要货计划主自动接收】----开始,请求参数:{}",jsonObject.get("tenantId").toString()); |
|||
TenantContextHolder.setTenantId(Long.valueOf(jsonObject.get("tenantId").toString())); |
|||
purchasePlanMainService.autoAccPurchasePlan(); |
|||
log.info("【要货计划主自动接收】----结束"); |
|||
return "要货计划主自动接收"; |
|||
} |
|||
} |
Loading…
Reference in new issue