|
@ -4,12 +4,17 @@ import cn.hutool.core.date.DateUtil; |
|
|
import cn.hutool.core.util.IdUtil; |
|
|
import cn.hutool.core.util.IdUtil; |
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
import cn.hutool.core.util.StrUtil; |
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
|
|
import com.alibaba.fastjson.serializer.SerializerFeature; |
|
|
import org.nl.modules.common.exception.BadRequestException; |
|
|
import org.nl.modules.common.exception.BadRequestException; |
|
|
|
|
|
import org.nl.modules.common.utils.RedisUtils; |
|
|
import org.nl.modules.common.utils.SecurityUtils; |
|
|
import org.nl.modules.common.utils.SecurityUtils; |
|
|
import org.nl.modules.system.util.CodeUtil; |
|
|
import org.nl.modules.system.util.CodeUtil; |
|
|
import org.nl.modules.wql.WQL; |
|
|
import org.nl.modules.wql.WQL; |
|
|
import org.nl.modules.wql.core.bean.WQLObject; |
|
|
import org.nl.modules.wql.core.bean.WQLObject; |
|
|
|
|
|
import org.nl.modules.wql.util.SpringContextHolder; |
|
|
|
|
|
import org.nl.wms.cockpit.constant.CockpitConstants; |
|
|
import org.nl.wms.common.PickType; |
|
|
import org.nl.wms.common.PickType; |
|
|
import org.nl.wms.sch.manage.*; |
|
|
import org.nl.wms.sch.manage.*; |
|
|
|
|
|
|
|
@ -239,7 +244,7 @@ public class TaskUtils { |
|
|
/** |
|
|
/** |
|
|
* 生成喷码内容,祥见 SVN 项目文档信息。 |
|
|
* 生成喷码内容,祥见 SVN 项目文档信息。 |
|
|
* |
|
|
* |
|
|
* @param vd 组盘对象 |
|
|
* @param vd 组盘对象 |
|
|
* @param yjCode 压机编码 |
|
|
* @param yjCode 压机编码 |
|
|
* @return 喷码内容 |
|
|
* @return 喷码内容 |
|
|
*/ |
|
|
*/ |
|
@ -279,4 +284,45 @@ public class TaskUtils { |
|
|
return null; |
|
|
return null; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void inKiln(String vehicleCode) { |
|
|
|
|
|
if (StrUtil.isBlank(CockpitConstants.kilnData.get(0))) { |
|
|
|
|
|
CockpitConstants.kilnData.set(0, vehicleCode); |
|
|
|
|
|
SpringContextHolder.getBean(RedisUtils.class).set(CockpitConstants.KILN_DATA_KEY, JSON.toJSONString(CockpitConstants.kilnData, SerializerFeature.WriteMapNullValue)); |
|
|
|
|
|
} else { |
|
|
|
|
|
for (int i = CockpitConstants.kilnData.size() - 1; i > 0; i--) { |
|
|
|
|
|
CockpitConstants.kilnData.set(i, CockpitConstants.kilnData.get(i - 1)); |
|
|
|
|
|
} |
|
|
|
|
|
CockpitConstants.kilnData.set(0, vehicleCode); |
|
|
|
|
|
SpringContextHolder.getBean(RedisUtils.class).set(CockpitConstants.KILN_DATA_KEY, JSON.toJSONString(CockpitConstants.kilnData, SerializerFeature.WriteMapNullValue)); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void outKiln(String vehicleCode) { |
|
|
|
|
|
if (vehicleCode.equals(CockpitConstants.kilnData.get(CockpitConstants.kilnData.size() - 1))) { |
|
|
|
|
|
for (int i = CockpitConstants.kilnData.size() - 1; i > 0; i--) { |
|
|
|
|
|
CockpitConstants.kilnData.set(i, CockpitConstants.kilnData.get(i - 1)); |
|
|
|
|
|
} |
|
|
|
|
|
CockpitConstants.kilnData.set(0, null); |
|
|
|
|
|
SpringContextHolder.getBean(RedisUtils.class).set(CockpitConstants.KILN_DATA_KEY, JSON.toJSONString(CockpitConstants.kilnData, SerializerFeature.WriteMapNullValue)); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void inCooling(String vehicleCode) { |
|
|
|
|
|
for (int i = CockpitConstants.coolingData.size() - 1; i > 0; i--) { |
|
|
|
|
|
CockpitConstants.coolingData.set(i, CockpitConstants.coolingData.get(i - 1)); |
|
|
|
|
|
} |
|
|
|
|
|
CockpitConstants.coolingData.set(0, vehicleCode); |
|
|
|
|
|
SpringContextHolder.getBean(RedisUtils.class).set(CockpitConstants.COOLING_DATA_KEY, JSON.toJSONString(CockpitConstants.coolingData, SerializerFeature.WriteMapNullValue)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void outCooling(String vehicleCode) { |
|
|
|
|
|
if (vehicleCode.equals(CockpitConstants.coolingData.get(CockpitConstants.coolingData.size() - 1))) { |
|
|
|
|
|
for (int i = CockpitConstants.coolingData.size() - 1; i > 0; i--) { |
|
|
|
|
|
CockpitConstants.coolingData.set(i, CockpitConstants.coolingData.get(i - 1)); |
|
|
|
|
|
} |
|
|
|
|
|
CockpitConstants.coolingData.set(0, null); |
|
|
|
|
|
SpringContextHolder.getBean(RedisUtils.class).set(CockpitConstants.COOLING_DATA_KEY, JSON.toJSONString(CockpitConstants.coolingData, SerializerFeature.WriteMapNullValue)); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|