src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/zy/asrs/utils/Utils.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -831,6 +831,8 @@ short staNo = 1012; if (wrkMast.getSourceStaNo() == 1022) { staNo = 1023; } else if (wrkMast.getSourceStaNo() == 1031 || wrkMast.getSourceStaNo() == 1032) { staNo = 1032; } staProtocol = staProtocol.clone(); @@ -936,6 +938,8 @@ String locNo = "0200305"; if (wrkMast.getSourceStaNo() == 1012) { locNo = "0200301"; } else if (wrkMast.getSourceStaNo() == 1032 || wrkMast.getSourceStaNo() == 1031) { locNo = "0200308"; } boolean dispatchShuttle = shuttleDispatchUtils.searchDispatchShuttleS(wrkMast.getWrkNo(), locNo, wrkMast.getLocNo(), "TRANSPORT_LIFT"); if (!dispatchShuttle) { @@ -943,9 +947,13 @@ return false; } int lev = 105; if (wrkMast.getSourceStaNo() == 1012) { lev = 101; int lev = 101; if (wrkMast.getSourceStaNo() == 1021) { //TODO // lev = 105; lev = 1021; } else if (wrkMast.getSourceStaNo() == 1032 || wrkMast.getSourceStaNo() == 1031) { lev = 1031; } //获取提升机命令 List<LiftCommand> liftCommands = liftThread.getPalletInCommand(wrkMast.getWrkNo(), sourceStaNo, lev); @@ -1078,6 +1086,8 @@ String locNo = "0200305"; if (wrkMast.getStaNo() == 1011) { locNo = "0200301"; } else if (wrkMast.getStaNo() == 1032) { locNo = "0200308"; } boolean dispatchShuttle = shuttleDispatchUtils.searchDispatchShuttleS(wrkMast.getWrkNo(), wrkMast.getSourceLocNo(), locNo, "TRANSPORT_LIFT"); if (!dispatchShuttle) { src/main/java/com/zy/asrs/utils/Utils.java
@@ -4,7 +4,6 @@ import com.core.common.Arith; import com.core.common.Cools; import com.core.common.SpringUtils; import com.core.exception.CoolException; import com.zy.asrs.entity.LocMast; import com.zy.asrs.entity.WrkMast; import com.zy.asrs.service.LocMastService; @@ -19,29 +18,31 @@ import com.zy.core.model.protocol.ShuttleProtocol; import com.zy.core.properties.SlaveProperties; import com.zy.core.thread.ShuttleThread; import java.text.DecimalFormat; import java.util.*; import java.util.ArrayList; import java.util.List; public class Utils { private static final DecimalFormat fmt = new DecimalFormat("##0.00"); public static float scale(Float f){ public static float scale(Float f) { if (f == null || f == 0f || Float.isNaN(f)) { return 0f; } return (float) Arith.multiplys(2, f, 1); } public static String zerofill(String msg, Integer count){ if (msg.length() == count){ public static String zerofill(String msg, Integer count) { if (msg.length() == count) { return msg; } else if (msg.length() > count){ } else if (msg.length() > count) { return msg.substring(0, 16); } else { StringBuilder msgBuilder = new StringBuilder(msg); for (int i = 0; i<count-msg.length(); i++){ msgBuilder.insert(0,"0"); for (int i = 0; i < count - msg.length(); i++) { msgBuilder.insert(0, "0"); } return msgBuilder.toString(); }