当前位置:网站首页>Initialize static resource demo
Initialize static resource demo
2022-06-30 09:28:00 【Xiao Lu, a migrant worker in Beijing】
@Data
public class Inner3MappingConfig {
private Logger LOGGER = LoggerFactory.getLogger(Inner3MappingConfig.class);
private static final HashMap<String,HashMap<String,String>> inner3MappingConfigMap = new HashMap<>();
private static Inner3MappingConfig instance;
static {
instance = new Inner3MappingConfig();
}
private Inner3MappingConfig() {
LOGGER.info("Inner3MappingConfig initialization ing...");
this.staffFunction();
this.applyType();
this.isNewStaff();
this.isNewRole();
this.afterIsBaseRoleDelete();
this.beforeIsBaseRoleDelete();
this.riskAccountType();
this.isRiskAccount();
this.isSchedule();
this.isLeave();
LOGGER.info("Inner3MappingConfig Initialization finished ...");
}
/**
* Employee functions 1 Customer service 2 director 3 project manager 4 executive director 5 central 6 Quality testing 7 train 8 data 9 outsource IT 10 business 11 test 12 Outsourcing mobile work orders 20 Other functions
* */
private void staffFunction() {
HashMap staffFunctionHashMap = new HashMap();
staffFunctionHashMap.put("1"," Customer service ");
staffFunctionHashMap.put("2"," director ");
staffFunctionHashMap.put("3"," project manager ");
staffFunctionHashMap.put("4"," executive director ");
staffFunctionHashMap.put("5"," central ");
staffFunctionHashMap.put("6"," Quality testing ");
staffFunctionHashMap.put("7"," train ");
staffFunctionHashMap.put("8"," data ");
staffFunctionHashMap.put("9"," outsource IT");
staffFunctionHashMap.put("10"," business ");
staffFunctionHashMap.put("11"," test ");
staffFunctionHashMap.put("12"," Outsourcing mobile work orders ");
staffFunctionHashMap.put("20"," Other functions ");
inner3MappingConfigMap.put("staffFunction",staffFunctionHashMap);
}
/**
* Role application method 1-IAM Permission to apply for 2- Mobile work order support application 3- Pacific peak support request 4- Email application 5- Pacific support request
* */
private void applyType() {
HashMap applyTypeHashMap = new HashMap();
applyTypeHashMap.put("1","IAM Permission to apply for ");
applyTypeHashMap.put("2"," Mobile work order support application ");
applyTypeHashMap.put("3"," Pacific peak support request ");
applyTypeHashMap.put("4"," Email application ");
applyTypeHashMap.put("5"," Pacific support request ");
inner3MappingConfigMap.put("applyType",applyTypeHashMap);
}
/**
* Whether to add new employees 1 yes 0 no
* */
private void isNewStaff() {
HashMap isNewStaffHashMap = new HashMap();
isNewStaffHashMap.put("1"," yes ");
isNewStaffHashMap.put("2"," no ");
inner3MappingConfigMap.put("isNewStaff",isNewStaffHashMap);
}
/**
* Whether to add a new role 1 yes 0 no
* */
private void isNewRole() {
HashMap isNewRoleHashMap = new HashMap();
isNewRoleHashMap.put("1"," yes ");
isNewRoleHashMap.put("2"," no ");
inner3MappingConfigMap.put("isNewRole",isNewRoleHashMap);
}
/**
* Whether the employee basic role is deleted after job transfer 1- yes 0- no
* */
private void afterIsBaseRoleDelete() {
HashMap afterIsBaseRoleDeleteHashMap = new HashMap();
afterIsBaseRoleDeleteHashMap.put("1"," yes ");
afterIsBaseRoleDeleteHashMap.put("0"," no ");
inner3MappingConfigMap.put("afterIsBaseRoleDelete",afterIsBaseRoleDeleteHashMap);
}
/**
* Whether the employee basic role has been deleted before job transfer 1- yes 0- no
* */
private void beforeIsBaseRoleDelete() {
HashMap beforeIsBaseRoleDeleteHashMap = new HashMap();
beforeIsBaseRoleDeleteHashMap.put("1"," yes ");
beforeIsBaseRoleDeleteHashMap.put("0"," no ");
inner3MappingConfigMap.put("beforeIsBaseRoleDelete",beforeIsBaseRoleDeleteHashMap);
}
/**
* Employee transfer role exception type 0 It indicates that there is no role abnormality in the job transfer 1- The basic roles are not included after job transfer 2- Post transfer includes the basic role before post transfer, and the basic role will be transferred after the post transfer date 16 Days still valid 3-1&2
* */
private void riskAccountType() {
HashMap riskAccountTypeHashMap = new HashMap();
riskAccountTypeHashMap.put("1"," The basic roles are not included after job transfer ");
riskAccountTypeHashMap.put("2"," Post transfer includes the basic role before post transfer, and the basic role will be transferred after the post transfer date 16 Days still valid ");
riskAccountTypeHashMap.put("3"," The basic roles are not included after job transfer also Post transfer includes the basic role before post transfer, and the basic role will be transferred after the post transfer date 16 Days still valid ");
inner3MappingConfigMap.put("riskAccountType",riskAccountTypeHashMap);
}
/**
* Whether it is a risk account number 1 yes 0 no 2 Cannot judge if the application role is empty
* */
private void isRiskAccount() {
HashMap isRiskAccountHashMap = new HashMap();
isRiskAccountHashMap.put("0"," no ");
isRiskAccountHashMap.put("1"," yes ");
isRiskAccountHashMap.put("2"," Cannot judge if the application role is empty ");
inner3MappingConfigMap.put("isRiskAccount",isRiskAccountHashMap);
}
/**
* front 7 Whether there are shift scheduling records within days 1 yes 0 no
* */
private void isSchedule() {
HashMap isScheduleHashMap = new HashMap();
isScheduleHashMap.put("1"," yes ");
isScheduleHashMap.put("0"," no ");
inner3MappingConfigMap.put("isSchedule",isScheduleHashMap);
}
/**
* front 7 Whether there is leave record within days 1 yes 0 no
* */
private void isLeave() {
HashMap isLeaveHashMap = new HashMap();
isLeaveHashMap.put("1"," yes ");
isLeaveHashMap.put("0"," no ");
inner3MappingConfigMap.put("isLeave",isLeaveHashMap);
}
/**
* Whether to forbid compensation for users 1 yes 0 no
private void isProhibitedUser() {
HashMap isProhibitedUserHashMap = new HashMap();
isProhibitedUserHashMap.put("0"," no ");
isProhibitedUserHashMap.put("1"," yes ");
inner3MappingConfigMap.put("isProhibitedUser",isProhibitedUserHashMap);
} */
/**
* Whether it is non contact compensation 1 yes 0 no
*
private void isWithoutContactRefund() {
HashMap isWithoutContactRefund = new HashMap();
isWithoutContactRefund.put("0"," no ");
isWithoutContactRefund.put("1"," yes ");
inner3MappingConfigMap.put("isWithoutContactRefund",isWithoutContactRefund);
}*/
/**
* Whether to compensate in large amount ( Greater than 3000) 1 yes 0 no
*
private void isBigAmtRefund() {
HashMap isBigAmtRefundHashMap = new HashMap();
isBigAmtRefundHashMap.put("0"," no ");
isBigAmtRefundHashMap.put("1"," yes ");
inner3MappingConfigMap.put("isBigAmtRefund",isBigAmtRefundHashMap);
} */
public static void convertInner3Mapping(Map<String, Object> paramtersMap){
for(Map.Entry<String, Object> entry : paramtersMap.entrySet()) {
String paramKey = entry.getKey();
Object paramValue = entry.getValue();
if(Inner3MappingConfig.inner3MappingConfigMap.containsKey(paramKey)){
HashMap<String,String> mappings = Inner3MappingConfig.inner3MappingConfigMap.get(paramKey);
paramtersMap.put(paramKey,mappings.get(String.valueOf(paramValue)));
}
}
}
public static String getConvertValueByInner3MappingConfigMapKey(String inner3MappingConfigMapKey,String value){
if(Inner3MappingConfig.inner3MappingConfigMap.containsKey(inner3MappingConfigMapKey)){
HashMap<String,String> mappings = Inner3MappingConfig.inner3MappingConfigMap.get(inner3MappingConfigMapKey);
return mappings.get(value);
}
return null;
}
}
边栏推荐
- I'm late for school
- Dart basic notes
- Mmdet line by line deltaxywhbboxcoder
- What kind of experience is it to develop a "grandson" who will call himself "Grandpa"?
- Niuke rearrangement rule taking method
- Esp32 (6): Bluetooth and WiFi functions for function development
- Wechat development tool (applet)
- 12. problem set: process, thread and JNI architecture
- Express get request
- Harmonyos actual combat - ten thousand words long article understanding service card development process
猜你喜欢

Opencv learning notes-day5 (arithmetic operation of image pixels, add() addition function, subtract() subtraction function, divide() division function, multiply() multiplication function

I'm late for school

Abstract factory pattern

Find the number that appears only once in the array

Flutter 0001, environment configuration

Numpy (data type)

Mmdet line by line deltaxywhbboxcoder

8.8 heap insertion and deletion

Esp32 (4): overview of the overall code architecture

Acquisition de 100% des actions de Guilin latex par Guilin Robust Medical pour combler le vide de la gamme de produits Latex
随机推荐
Flutter 0001, environment configuration
How do I start? (continuously updating)
ES6 learning path (II) let & const
Solution to the sixth training competition of 2020 provincial competition
Express get request
Rew acoustic test (II): offline test
Numpy (data type)
Rew acoustic test (VI): signal and measurement
Pipe pipe --namedpipe and anonymouspipe
100 lines of code and a voice conversation assistant
Resnet50+fpn for mmdet line by line code interpretation
Deep understanding of continuation principle
Talk about how the kotlin process started?
ACM intensive training graph theory exercise 3 in the summer vacation of 2020 [problem solving]
Niuke walks on the tree (ingenious application of parallel search)
8.8 heap insertion and deletion
I'm late for school
Challenge transform() 2D
Acquisition de 100% des actions de Guilin latex par Guilin Robust Medical pour combler le vide de la gamme de produits Latex
I once met a girl whom I most wanted to take care of all my life. Later... No later