app/src/main/java/cn/flightfeather/thirdapp/util/CommonUtils.java
@@ -5,10 +5,12 @@
import com.ping.greendao.gen.DaoSession;
import com.ping.greendao.gen.DomainitemDao;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import cn.flightfeather.thirdapp.R;
import cn.flightfeather.thirdapp.bean.entity.Domainitem;
@@ -18,6 +20,7 @@
 */
public class CommonUtils {
    public static List<Domainitem> getDomainItemByCalalogGuid(DaoSession daoSession, String guid) {
        return daoSession.getDomainitemDao().queryBuilder()
                .where(DomainitemDao.Properties.Dcguid.eq(guid))
@@ -213,6 +216,26 @@
    }
    /**
     * 获取时间段文本
     */
    public static String getStartEndDate(Date startDate, Date endDate) {
        SimpleDateFormat format1 = new SimpleDateFormat("yyyy.MM.dd", Locale.CHINESE);
        String s = format1.format(startDate);
        String e = format1.format(endDate);
        String str = "";
        try {
            if (s.substring(0, 4).equals(e.substring(0, 4))) {
                str = s + "-" + e.substring(5);
            } else {
                str = s + "-" + e;
            }
        } catch (Exception exception) {
            exception.printStackTrace();
        }
        return str;
    }
    /**
     * 工作日查询
     *
     * @param cal         日历对象
@@ -385,7 +408,7 @@
                default:
                    return R.drawable.selector_button_problem_others;
            }
        } else if (sceneType.equals(Constant.SCENE_TYPE_WHARF)){
        } else if (sceneType.equals(Constant.SCENE_TYPE_WHARF)) {
            switch (type) {
                case "1":
                    return R.drawable.selector_button_problem_road;
@@ -403,8 +426,27 @@
                    return R.drawable.selector_button_problem_sewage;
                case "8":
                    return R.drawable.selector_button_problem_attitude;
                case "9":
                default:
                    return R.drawable.selector_button_problem_others;
            }
        } else if (sceneType.equals(Constant.SCENE_TYPE14)) {
            switch (type) {
                case "1":
                    return R.drawable.selector_button_problem_road;
                case "2":
                    return R.drawable.selector_button_problem_vehicle;
                case "3":
                    return R.drawable.selector_button_problem_bulk_material;
                case "4":
                    return R.drawable.selector_button_problem_protect;
                case "5":
                    return R.drawable.selector_button_problem_dust_equipment;
                case "6":
                    return R.drawable.selector_button_problem_dedusting;
                case "7":
                    return R.drawable.selector_button_problem_sewage;
                case "8":
                    return R.drawable.selector_button_problem_attitude;
                default:
                    return R.drawable.selector_button_problem_others;
            }
@@ -457,4 +499,5 @@
    public static byte intToByte(int x) {
        return (byte) x;
    }
}