package com.gtiit.shr.utils;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public  class FinalParamUtil {
    @Value("${api.shr.address}")
    private String shrUrl;
    @Value("${api.shr.transmitPunchCardRecord}")
    private String transmitPunchCardRecord;
    @Value("${api.shr.inteOAGetAdminOrgDataService}")
    private String inteOAGetAdminOrgDataService;
    @Value("${api.shr.inteOAGetPositionDataService}")
    private String inteOAGetPositionDataService;
    @Value("${api.shr.synPersonService}")
    private String synPersonService;
    @Value("${api.shr.synADService}")
    private String synADService;
    @Value("${api.shr.gtiitLocalPersonOsfService}")
    private String gtiitLocalPersonOsfService;
    @Value("${api.shr.gtiitOrgAdminService}")
    private String gtiitOrgAdminService;
    @Value("${api.shr.gtiitOrgPositionService}")
    private String gtiitOrgPositionService;
    @Value("${api.shr.gtiitEmpOrgRelationService}")
    private String gtiitEmpOrgRelationService;
    @Value("${api.shr.gtiitLocalJobOsfService}")
    private String gtiitLocalJobOsfService;
    @Value("${api.attendance.tokenUrl}")
    private String tokenUrl;
    @Value("${api.attendance.username}")
    private String username;
    @Value("${api.attendance.password}")
    private String passWord;
    @Value("${api.attendance.attnumber}")
    private String attNumber;
    @Value("${api.oa.url}")
    private String oaUrl;
    @Value("${api.oa.appid}")
    private String APPID;
    @Value("${api.oa.IsJobTitlePrefixed}")
    private String IsJobTitlePrefixed;
    @Value("${api.oa.subcompanycode}")
    private String subcompanycode;
    @Value("${api.oa.new.url}")
    private String newoaUrl;
    @Value("${api.oa.new.app_key}")
    private String appKey;
    @Value("${api.oa.new.app_secret}")
    private String appSecret;
    @Value("${api.oa.new.grant_type}")
    private String grantType;
    @Value("${api.oa.new.corpid}")
    private String corpid;
    @Value("${api.oa.new.response_type}")
    private String responseType;

    public static Boolean getLastDateTime(String fLastUpdateTime) throws ParseException {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Calendar cal = Calendar.getInstance();
        cal.add(5, -1);
        cal.set(11, 0);
        cal.set(12, 0);
        cal.set(13, 0);
        cal.set(14, 0);
        return cal.getTime().getTime() < sdf.parse(fLastUpdateTime).getTime();
    }

    public static String formatDate(Date date) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String dateStr = "";
        if (date != null) {
            dateStr = sdf.format(date);
        }

        return dateStr;
    }

    public static Date parse(String dateStr) {
        Date date = null;

        try {
            SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            date = fmt.parse(dateStr);
        } catch (Exception var3) {
        }

        return date;
    }

    public static String getBeforeOneDay(Date currentdate) {
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(currentdate);
        calendar.add(5, -1);
        currentdate = calendar.getTime();
        String dayTime = format.format(currentdate);
        return dayTime;
    }

    public static Date getLastDate(Date date) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        calendar.set(11, 23);
        calendar.set(12, 59);
        calendar.set(13, 59);
        return calendar.getTime();
    }

    public static Date getFirstDate(Date date) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        calendar.set(11, 0);
        calendar.set(12, 0);
        calendar.set(13, 0);
        return calendar.getTime();
    }

    public FinalParamUtil() {
    }

    public String getShrUrl() {
        return this.shrUrl;
    }

    public String getTransmitPunchCardRecord() {
        return this.transmitPunchCardRecord;
    }

    public String getInteOAGetAdminOrgDataService() {
        return this.inteOAGetAdminOrgDataService;
    }

    public String getInteOAGetPositionDataService() {
        return this.inteOAGetPositionDataService;
    }

    public String getSynPersonService() {
        return this.synPersonService;
    }

    public String getSynADService() {
        return this.synADService;
    }

    public String getGtiitLocalPersonOsfService() {
        return this.gtiitLocalPersonOsfService;
    }

    public String getGtiitOrgAdminService() {
        return this.gtiitOrgAdminService;
    }

    public String getGtiitOrgPositionService() {
        return this.gtiitOrgPositionService;
    }

    public String getGtiitEmpOrgRelationService() {
        return this.gtiitEmpOrgRelationService;
    }

    public String getGtiitLocalJobOsfService() {
        return this.gtiitLocalJobOsfService;
    }

    public String getTokenUrl() {
        return this.tokenUrl;
    }

    public String getUsername() {
        return this.username;
    }

    public String getPassWord() {
        return this.passWord;
    }

    public String getAttNumber() {
        return this.attNumber;
    }

    public String getOaUrl() {
        return this.oaUrl;
    }

    public String getAPPID() {
        return this.APPID;
    }

    public String getIsJobTitlePrefixed() {
        return this.IsJobTitlePrefixed;
    }

    public String getSubcompanycode() {
        return this.subcompanycode;
    }

    public String getNewoaUrl() {
        return this.newoaUrl;
    }

    public String getAppKey() {
        return this.appKey;
    }

    public String getAppSecret() {
        return this.appSecret;
    }

    public String getGrantType() {
        return this.grantType;
    }

    public String getCorpid() {
        return this.corpid;
    }

    public String getResponseType() {
        return this.responseType;
    }

    public void setShrUrl(final String shrUrl) {
        this.shrUrl = shrUrl;
    }

    public void setTransmitPunchCardRecord(final String transmitPunchCardRecord) {
        this.transmitPunchCardRecord = transmitPunchCardRecord;
    }

    public void setInteOAGetAdminOrgDataService(final String inteOAGetAdminOrgDataService) {
        this.inteOAGetAdminOrgDataService = inteOAGetAdminOrgDataService;
    }

    public void setInteOAGetPositionDataService(final String inteOAGetPositionDataService) {
        this.inteOAGetPositionDataService = inteOAGetPositionDataService;
    }

    public void setSynPersonService(final String synPersonService) {
        this.synPersonService = synPersonService;
    }

    public void setSynADService(final String synADService) {
        this.synADService = synADService;
    }

    public void setGtiitLocalPersonOsfService(final String gtiitLocalPersonOsfService) {
        this.gtiitLocalPersonOsfService = gtiitLocalPersonOsfService;
    }

    public void setGtiitOrgAdminService(final String gtiitOrgAdminService) {
        this.gtiitOrgAdminService = gtiitOrgAdminService;
    }

    public void setGtiitOrgPositionService(final String gtiitOrgPositionService) {
        this.gtiitOrgPositionService = gtiitOrgPositionService;
    }

    public void setGtiitEmpOrgRelationService(final String gtiitEmpOrgRelationService) {
        this.gtiitEmpOrgRelationService = gtiitEmpOrgRelationService;
    }

    public void setGtiitLocalJobOsfService(final String gtiitLocalJobOsfService) {
        this.gtiitLocalJobOsfService = gtiitLocalJobOsfService;
    }

    public void setTokenUrl(final String tokenUrl) {
        this.tokenUrl = tokenUrl;
    }

    public void setUsername(final String username) {
        this.username = username;
    }

    public void setPassWord(final String passWord) {
        this.passWord = passWord;
    }

    public void setAttNumber(final String attNumber) {
        this.attNumber = attNumber;
    }

    public void setOaUrl(final String oaUrl) {
        this.oaUrl = oaUrl;
    }

    public void setAPPID(final String APPID) {
        this.APPID = APPID;
    }

    public void setIsJobTitlePrefixed(final String IsJobTitlePrefixed) {
        this.IsJobTitlePrefixed = IsJobTitlePrefixed;
    }

    public void setSubcompanycode(final String subcompanycode) {
        this.subcompanycode = subcompanycode;
    }

    public void setNewoaUrl(String newoaUrl) {
        this.newoaUrl = newoaUrl;
    }

    public void setAppKey(String appKey) {
        this.appKey = appKey;
    }

    public void setAppSecret(String appSecret) {
        this.appSecret = appSecret;
    }

    public void setGrantType(String grantType) {
        this.grantType = grantType;
    }

    public void setCorpid(String corpid) {
        this.corpid = corpid;
    }

    public void setResponseType(String responseType) {
        this.responseType = responseType;
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof FinalParamUtil)) {
            return false;
        } else {
            FinalParamUtil other = (FinalParamUtil)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                label239: {
                    Object this$shrUrl = this.getShrUrl();
                    Object other$shrUrl = other.getShrUrl();
                    if (this$shrUrl == null) {
                        if (other$shrUrl == null) {
                            break label239;
                        }
                    } else if (this$shrUrl.equals(other$shrUrl)) {
                        break label239;
                    }

                    return false;
                }

                Object this$transmitPunchCardRecord = this.getTransmitPunchCardRecord();
                Object other$transmitPunchCardRecord = other.getTransmitPunchCardRecord();
                if (this$transmitPunchCardRecord == null) {
                    if (other$transmitPunchCardRecord != null) {
                        return false;
                    }
                } else if (!this$transmitPunchCardRecord.equals(other$transmitPunchCardRecord)) {
                    return false;
                }

                Object this$inteOAGetAdminOrgDataService = this.getInteOAGetAdminOrgDataService();
                Object other$inteOAGetAdminOrgDataService = other.getInteOAGetAdminOrgDataService();
                if (this$inteOAGetAdminOrgDataService == null) {
                    if (other$inteOAGetAdminOrgDataService != null) {
                        return false;
                    }
                } else if (!this$inteOAGetAdminOrgDataService.equals(other$inteOAGetAdminOrgDataService)) {
                    return false;
                }

                label218: {
                    Object this$inteOAGetPositionDataService = this.getInteOAGetPositionDataService();
                    Object other$inteOAGetPositionDataService = other.getInteOAGetPositionDataService();
                    if (this$inteOAGetPositionDataService == null) {
                        if (other$inteOAGetPositionDataService == null) {
                            break label218;
                        }
                    } else if (this$inteOAGetPositionDataService.equals(other$inteOAGetPositionDataService)) {
                        break label218;
                    }

                    return false;
                }

                label211: {
                    Object this$synPersonService = this.getSynPersonService();
                    Object other$synPersonService = other.getSynPersonService();
                    if (this$synPersonService == null) {
                        if (other$synPersonService == null) {
                            break label211;
                        }
                    } else if (this$synPersonService.equals(other$synPersonService)) {
                        break label211;
                    }

                    return false;
                }

                Object this$synADService = this.getSynADService();
                Object other$synADService = other.getSynADService();
                if (this$synADService == null) {
                    if (other$synADService != null) {
                        return false;
                    }
                } else if (!this$synADService.equals(other$synADService)) {
                    return false;
                }

                Object this$gtiitLocalPersonOsfService = this.getGtiitLocalPersonOsfService();
                Object other$gtiitLocalPersonOsfService = other.getGtiitLocalPersonOsfService();
                if (this$gtiitLocalPersonOsfService == null) {
                    if (other$gtiitLocalPersonOsfService != null) {
                        return false;
                    }
                } else if (!this$gtiitLocalPersonOsfService.equals(other$gtiitLocalPersonOsfService)) {
                    return false;
                }

                label190: {
                    Object this$gtiitOrgAdminService = this.getGtiitOrgAdminService();
                    Object other$gtiitOrgAdminService = other.getGtiitOrgAdminService();
                    if (this$gtiitOrgAdminService == null) {
                        if (other$gtiitOrgAdminService == null) {
                            break label190;
                        }
                    } else if (this$gtiitOrgAdminService.equals(other$gtiitOrgAdminService)) {
                        break label190;
                    }

                    return false;
                }

                label183: {
                    Object this$gtiitOrgPositionService = this.getGtiitOrgPositionService();
                    Object other$gtiitOrgPositionService = other.getGtiitOrgPositionService();
                    if (this$gtiitOrgPositionService == null) {
                        if (other$gtiitOrgPositionService == null) {
                            break label183;
                        }
                    } else if (this$gtiitOrgPositionService.equals(other$gtiitOrgPositionService)) {
                        break label183;
                    }

                    return false;
                }

                Object this$gtiitEmpOrgRelationService = this.getGtiitEmpOrgRelationService();
                Object other$gtiitEmpOrgRelationService = other.getGtiitEmpOrgRelationService();
                if (this$gtiitEmpOrgRelationService == null) {
                    if (other$gtiitEmpOrgRelationService != null) {
                        return false;
                    }
                } else if (!this$gtiitEmpOrgRelationService.equals(other$gtiitEmpOrgRelationService)) {
                    return false;
                }

                label169: {
                    Object this$gtiitLocalJobOsfService = this.getGtiitLocalJobOsfService();
                    Object other$gtiitLocalJobOsfService = other.getGtiitLocalJobOsfService();
                    if (this$gtiitLocalJobOsfService == null) {
                        if (other$gtiitLocalJobOsfService == null) {
                            break label169;
                        }
                    } else if (this$gtiitLocalJobOsfService.equals(other$gtiitLocalJobOsfService)) {
                        break label169;
                    }

                    return false;
                }

                Object this$tokenUrl = this.getTokenUrl();
                Object other$tokenUrl = other.getTokenUrl();
                if (this$tokenUrl == null) {
                    if (other$tokenUrl != null) {
                        return false;
                    }
                } else if (!this$tokenUrl.equals(other$tokenUrl)) {
                    return false;
                }

                label155: {
                    Object this$username = this.getUsername();
                    Object other$username = other.getUsername();
                    if (this$username == null) {
                        if (other$username == null) {
                            break label155;
                        }
                    } else if (this$username.equals(other$username)) {
                        break label155;
                    }

                    return false;
                }

                Object this$passWord = this.getPassWord();
                Object other$passWord = other.getPassWord();
                if (this$passWord == null) {
                    if (other$passWord != null) {
                        return false;
                    }
                } else if (!this$passWord.equals(other$passWord)) {
                    return false;
                }

                Object this$attNumber = this.getAttNumber();
                Object other$attNumber = other.getAttNumber();
                if (this$attNumber == null) {
                    if (other$attNumber != null) {
                        return false;
                    }
                } else if (!this$attNumber.equals(other$attNumber)) {
                    return false;
                }

                label134: {
                    Object this$oaUrl = this.getOaUrl();
                    Object other$oaUrl = other.getOaUrl();
                    if (this$oaUrl == null) {
                        if (other$oaUrl == null) {
                            break label134;
                        }
                    } else if (this$oaUrl.equals(other$oaUrl)) {
                        break label134;
                    }

                    return false;
                }

                label127: {
                    Object this$APPID = this.getAPPID();
                    Object other$APPID = other.getAPPID();
                    if (this$APPID == null) {
                        if (other$APPID == null) {
                            break label127;
                        }
                    } else if (this$APPID.equals(other$APPID)) {
                        break label127;
                    }

                    return false;
                }

                Object this$IsJobTitlePrefixed = this.getIsJobTitlePrefixed();
                Object other$IsJobTitlePrefixed = other.getIsJobTitlePrefixed();
                if (this$IsJobTitlePrefixed == null) {
                    if (other$IsJobTitlePrefixed != null) {
                        return false;
                    }
                } else if (!this$IsJobTitlePrefixed.equals(other$IsJobTitlePrefixed)) {
                    return false;
                }

                Object this$subcompanycode = this.getSubcompanycode();
                Object other$subcompanycode = other.getSubcompanycode();
                if (this$subcompanycode == null) {
                    if (other$subcompanycode != null) {
                        return false;
                    }
                } else if (!this$subcompanycode.equals(other$subcompanycode)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof FinalParamUtil;
    }

    public int hashCode() {
        boolean PRIME = true;
        int result = 1;
        Object $shrUrl = this.getShrUrl();
        result = result * 59 + ($shrUrl == null ? 43 : $shrUrl.hashCode());
        Object $transmitPunchCardRecord = this.getTransmitPunchCardRecord();
        result = result * 59 + ($transmitPunchCardRecord == null ? 43 : $transmitPunchCardRecord.hashCode());
        Object $inteOAGetAdminOrgDataService = this.getInteOAGetAdminOrgDataService();
        result = result * 59 + ($inteOAGetAdminOrgDataService == null ? 43 : $inteOAGetAdminOrgDataService.hashCode());
        Object $inteOAGetPositionDataService = this.getInteOAGetPositionDataService();
        result = result * 59 + ($inteOAGetPositionDataService == null ? 43 : $inteOAGetPositionDataService.hashCode());
        Object $synPersonService = this.getSynPersonService();
        result = result * 59 + ($synPersonService == null ? 43 : $synPersonService.hashCode());
        Object $synADService = this.getSynADService();
        result = result * 59 + ($synADService == null ? 43 : $synADService.hashCode());
        Object $gtiitLocalPersonOsfService = this.getGtiitLocalPersonOsfService();
        result = result * 59 + ($gtiitLocalPersonOsfService == null ? 43 : $gtiitLocalPersonOsfService.hashCode());
        Object $gtiitOrgAdminService = this.getGtiitOrgAdminService();
        result = result * 59 + ($gtiitOrgAdminService == null ? 43 : $gtiitOrgAdminService.hashCode());
        Object $gtiitOrgPositionService = this.getGtiitOrgPositionService();
        result = result * 59 + ($gtiitOrgPositionService == null ? 43 : $gtiitOrgPositionService.hashCode());
        Object $gtiitEmpOrgRelationService = this.getGtiitEmpOrgRelationService();
        result = result * 59 + ($gtiitEmpOrgRelationService == null ? 43 : $gtiitEmpOrgRelationService.hashCode());
        Object $gtiitLocalJobOsfService = this.getGtiitLocalJobOsfService();
        result = result * 59 + ($gtiitLocalJobOsfService == null ? 43 : $gtiitLocalJobOsfService.hashCode());
        Object $tokenUrl = this.getTokenUrl();
        result = result * 59 + ($tokenUrl == null ? 43 : $tokenUrl.hashCode());
        Object $username = this.getUsername();
        result = result * 59 + ($username == null ? 43 : $username.hashCode());
        Object $passWord = this.getPassWord();
        result = result * 59 + ($passWord == null ? 43 : $passWord.hashCode());
        Object $attNumber = this.getAttNumber();
        result = result * 59 + ($attNumber == null ? 43 : $attNumber.hashCode());
        Object $oaUrl = this.getOaUrl();
        result = result * 59 + ($oaUrl == null ? 43 : $oaUrl.hashCode());
        Object $APPID = this.getAPPID();
        result = result * 59 + ($APPID == null ? 43 : $APPID.hashCode());
        Object $IsJobTitlePrefixed = this.getIsJobTitlePrefixed();
        result = result * 59 + ($IsJobTitlePrefixed == null ? 43 : $IsJobTitlePrefixed.hashCode());
        Object $subcompanycode = this.getSubcompanycode();
        result = result * 59 + ($subcompanycode == null ? 43 : $subcompanycode.hashCode());
        return result;
    }

    public String toString() {
        return "FinalParamUtil(shrUrl=" + this.getShrUrl() + ", transmitPunchCardRecord=" + this.getTransmitPunchCardRecord() + ", inteOAGetAdminOrgDataService=" + this.getInteOAGetAdminOrgDataService() + ", inteOAGetPositionDataService=" + this.getInteOAGetPositionDataService() + ", synPersonService=" + this.getSynPersonService() + ", synADService=" + this.getSynADService() + ", gtiitLocalPersonOsfService=" + this.getGtiitLocalPersonOsfService() + ", gtiitOrgAdminService=" + this.getGtiitOrgAdminService() + ", gtiitOrgPositionService=" + this.getGtiitOrgPositionService() + ", gtiitEmpOrgRelationService=" + this.getGtiitEmpOrgRelationService() + ", gtiitLocalJobOsfService=" + this.getGtiitLocalJobOsfService() + ", tokenUrl=" + this.getTokenUrl() + ", username=" + this.getUsername() + ", passWord=" + this.getPassWord() + ", attNumber=" + this.getAttNumber() + ", oaUrl=" + this.getOaUrl() + ", APPID=" + this.getAPPID() + ", IsJobTitlePrefixed=" + this.getIsJobTitlePrefixed() + ", subcompanycode=" + this.getSubcompanycode() + ")";
    }
}
