| | |
| | | import com.ruoyi.system.service.TErpProcurementService; |
| | | import com.ruoyi.system.task.base.QuartzManager; |
| | | import com.ruoyi.system.task.base.TimeJobType; |
| | | import com.ruoyi.system.task.jobs.LivePushJob; |
| | | import com.ruoyi.system.task.jobs.RevenueSharingJob; |
| | | import com.ruoyi.web.core.config.LakalaConfig; |
| | | import com.ruoyi.web.listener.event.TradeOrderEvent; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.SneakyThrows; |
| | |
| | | import org.apache.http.entity.StringEntity; |
| | | import org.apache.http.impl.client.DefaultHttpClient; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.ApplicationContext; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | |
| | | private final TCrmSupplierService crmSupplierService; |
| | | |
| | | private final TokenService tokenService; |
| | | |
| | | private final ApplicationContext applicationContext; |
| | | |
| | | @Autowired |
| | | public TOrderController(TErpProcurementService erpProcurementService, TokenService tokenService, TErpProcurementGoodsService erpProcurementGoodsService, TCrmSupplierService crmSupplierService) { |
| | | public TOrderController(TErpProcurementService erpProcurementService, TokenService tokenService, TErpProcurementGoodsService erpProcurementGoodsService, TCrmSupplierService crmSupplierService, ApplicationContext applicationContext) { |
| | | this.erpProcurementService = erpProcurementService; |
| | | this.tokenService = tokenService; |
| | | this.erpProcurementGoodsService = erpProcurementGoodsService; |
| | | this.crmSupplierService = crmSupplierService; |
| | | this.applicationContext = applicationContext; |
| | | } |
| | | |
| | | private static final String SYMBOLS = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; |
| | |
| | | // erpProcurementService.updateById(erpProcurement); |
| | | // } |
| | | |
| | | // 执行的推送创建云仓订单 |
| | | applicationContext.publishEvent(new TradeOrderEvent(erpProcurement.getId()+"_1")); |
| | | |
| | | // 响应success |
| | | JSONObject responseJsonObject = new JSONObject(); |
| | | responseJsonObject.put("code", "SUCCESS"); |
| | |
| | | if ( erpProcurement!=null && "SUCCESS".equals(status)) { |
| | | erpProcurement.setStatus(6); |
| | | erpProcurementService.updateById(erpProcurement); |
| | | // 执行的推送取消云仓订单 |
| | | applicationContext.publishEvent(new TradeOrderEvent(erpProcurement.getId()+"_2")); |
| | | // 响应success |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("code", "SUCCESS"); |