|
|
@ -29,6 +29,7 @@ import org.slf4j.LoggerFactory; |
|
|
|
import org.springblade.common.constant.LogpmDataStatusEnum; |
|
|
|
import org.springblade.common.constant.LogpmDataStatusEnum; |
|
|
|
import org.springblade.common.constant.PackagesTypeEnum; |
|
|
|
import org.springblade.common.constant.PackagesTypeEnum; |
|
|
|
import org.springblade.common.utils.CommonUtil; |
|
|
|
import org.springblade.common.utils.CommonUtil; |
|
|
|
|
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
@ -428,24 +429,41 @@ public class FactoryXxlJob { |
|
|
|
@XxlJob("factoryByOpOrderPackageCodeJobHandlerIn") |
|
|
|
@XxlJob("factoryByOpOrderPackageCodeJobHandlerIn") |
|
|
|
public ReturnT<String> factoryByOpOrderPackageCodeJobHandlerIn(String param) throws Exception { |
|
|
|
public ReturnT<String> factoryByOpOrderPackageCodeJobHandlerIn(String param) throws Exception { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<String> split = new ArrayList<>(); |
|
|
|
|
|
|
|
List<String> codes = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isBlank(param)) { |
|
|
|
if (StringUtils.isBlank(param)) { |
|
|
|
return ReturnT.FAIL; |
|
|
|
// return ReturnT.FAIL;
|
|
|
|
|
|
|
|
// 查询数据库
|
|
|
|
|
|
|
|
List<JSONObject> packagePushAgain = factoryOrderMapper.findPackagePushAgain(1); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (JSONObject jsonObject : packagePushAgain) { |
|
|
|
|
|
|
|
split.add(jsonObject.getString("code")); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String[] splits = param.split(","); |
|
|
|
|
|
|
|
split.addAll(Arrays.asList(splits)); |
|
|
|
} |
|
|
|
} |
|
|
|
String[] split = param.split(","); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
for (String orderPackageCode : split) { |
|
|
|
for (String orderPackageCode : split) { |
|
|
|
|
|
|
|
|
|
|
|
OrderStatusDTO orderStatusDTO = new OrderStatusDTO(); |
|
|
|
OrderStatusDTO orderStatusDTO = new OrderStatusDTO(); |
|
|
|
orderStatusDTO.setUnitNo(orderPackageCode); |
|
|
|
orderStatusDTO.setUnitNo(orderPackageCode.trim()); |
|
|
|
orderStatusDTO.setStatus("1"); |
|
|
|
orderStatusDTO.setStatus("1"); |
|
|
|
|
|
|
|
|
|
|
|
// 查询老系统的操作人
|
|
|
|
// 查询老系统的操作人
|
|
|
|
orderStatusDTO.setUsername("admin");// 操作人
|
|
|
|
orderStatusDTO.setUsername("admin");// 操作人
|
|
|
|
ouPaiFactoryService.handleStatusData(orderStatusDTO); |
|
|
|
R r =ouPaiFactoryService.handleStatusData(orderStatusDTO); |
|
|
|
|
|
|
|
if(r.isSuccess()){ |
|
|
|
|
|
|
|
factoryOrderMapper.updatePackagePushAgain(orderPackageCode.trim(),1); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ReturnT.SUCCESS; |
|
|
|
return ReturnT.SUCCESS; |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
XxlJobLogger.log(e); |
|
|
|
XxlJobLogger.log(e); |
|
|
|