| | |
| | | import cn.hutool.core.util.ArrayUtil; |
| | | import cn.hutool.core.util.NumberUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.sandu.ximon.admin.constant.Constants; |
| | | import com.sandu.ximon.admin.dto.SingleLightOrderDto; |
| | | import com.sandu.ximon.dao.enums.WeekEnums; |
| | | import org.quartz.DateBuilder; |
| | |
| | | public class TaskOrderUtil { |
| | | |
| | | public static SingleLightOrderDto parseLightOrder(String lightOrder) { |
| | | if (StrUtil.length(lightOrder) != 6) { |
| | | if (StrUtil.length(lightOrder) != 7) { |
| | | return null; |
| | | } |
| | | SingleLightOrderDto singleLightOrderDto = new SingleLightOrderDto(); |
| | | singleLightOrderDto.setHour(NumberUtil.parseInt(lightOrder.substring(0, 2))); |
| | | singleLightOrderDto.setMinute(NumberUtil.parseInt(lightOrder.substring(2, 4))); |
| | | singleLightOrderDto.setBrightness(NumberUtil.parseInt(lightOrder.substring(4, 6))); |
| | | singleLightOrderDto.setBrightness(NumberUtil.parseInt(lightOrder.substring(4, 7))); |
| | | return singleLightOrderDto; |
| | | } |
| | | |