package com.zy.asrs.utils; import com.core.common.Arith; import com.core.common.Cools; import com.zy.core.properties.SlaveProperties; import java.text.DecimalFormat; import java.util.ArrayList; import java.util.List; /** * Created by vincent on 2020/8/27 */ public class Utils { public static final List FIRST_GROUP_ROW_LIST = new ArrayList() {{ add(2);add(3);add(4);add(5);add(6);add(7);add(8);add(9);add(10); add(11);add(12);add(13);add(14);add(15);add(16);add(17); }}; public static final List SECOND_GROUP_ROW_LIST = new ArrayList() {{ add(18);add(19);add(20); add(21);add(22);add(23);add(24);add(25);add(26);add(27);add(28);add(29);add(30); }}; private static final DecimalFormat fmt = new DecimalFormat("##0.00"); 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){ return msg; } else if (msg.length() > count){ return msg.substring(0, 16); } else { StringBuilder msgBuilder = new StringBuilder(msg); for (int i = 0; i