| | |
| | | import com.fzzy.api.utils.RedisConst; |
| | | import com.fzzy.api.utils.RedisUtil; |
| | | import com.fzzy.api.view.repository.ApiTriggerRep; |
| | | |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | public ApiTrigger findNameByCode(String code, String parentCode) { |
| | | |
| | | List<ApiTrigger> listParent = apiTriggerRep.findNameByCode(code, parentCode); |
| | |
| | | String result = null; |
| | | Map<String, String> parentMap = contextMap.get(parentCode); |
| | | if (null == parentMap || parentMap.isEmpty()) { |
| | | if(StringUtils.isEmpty(bizCode)){ |
| | | if (StringUtils.isEmpty(bizCode)) { |
| | | return bizCode; |
| | | } |
| | | if(Constant.TRIGGER_P_LSPZ.equals(parentCode)){ |
| | | result = Integer.valueOf(bizCode)*1000000 + ""; |
| | | result = result.substring(0,7); |
| | | }else if(Constant.TRIGGER_P_LSXZ.equals(parentCode)){ |
| | | result = Integer.valueOf(bizCode)*100 + ""; |
| | | result = result.substring(0,3); |
| | | }else { |
| | | if (Constant.TRIGGER_P_LSPZ.equals(parentCode)) { |
| | | result = Integer.valueOf(bizCode) * 1000000 + ""; |
| | | result = result.substring(0, 7); |
| | | } else if (Constant.TRIGGER_P_LSXZ.equals(parentCode)) { |
| | | result = Integer.valueOf(bizCode) * 100 + ""; |
| | | result = result.substring(0, 3); |
| | | } else { |
| | | result = bizCode; |
| | | } |
| | | return result; |
| | |
| | | |
| | | result = parentMap.get(bizCode); |
| | | if (null == result) { |
| | | if (Constant.TRIGGER_P_LSPZ.equals(parentCode)) { |
| | | result = parentMap.get(bizCode.substring(0, 3)); |
| | | } |
| | | } |
| | | if (null == result) { |
| | | result = parentMap.get(DEFAULT_MAP_KEY); |
| | | } |
| | | |
| | | if (null == result) { |
| | | if(StringUtils.isEmpty(bizCode)){ |
| | | if (StringUtils.isEmpty(bizCode)) { |
| | | return bizCode; |
| | | } |
| | | if(Constant.TRIGGER_P_LSPZ.equals(parentCode)){ |
| | | result = Integer.valueOf(bizCode)*1000000 + ""; |
| | | result = result.substring(0,7); |
| | | }else if(Constant.TRIGGER_P_LSXZ.equals(parentCode)){ |
| | | result = Integer.valueOf(bizCode)*100 + ""; |
| | | result = result.substring(0,3); |
| | | }else { |
| | | if (Constant.TRIGGER_P_LSPZ.equals(parentCode)) { |
| | | result = Integer.valueOf(bizCode) * 1000000 + ""; |
| | | result = result.substring(0, 7); |
| | | } else if (Constant.TRIGGER_P_LSXZ.equals(parentCode)) { |
| | | result = Integer.valueOf(bizCode) * 100 + ""; |
| | | result = result.substring(0, 3); |
| | | } else { |
| | | result = bizCode; |
| | | } |
| | | } |
| | |
| | | list.add(new ApiTrigger(PushProtocol.SB_SH_2021.getCode(), PushProtocol.SB_SH_2021.getName())); |
| | | list.add(new ApiTrigger(PushProtocol.SB_SC_2021.getCode(), PushProtocol.SB_SC_2021.getName())); |
| | | list.add(new ApiTrigger(PushProtocol.SB_GD_2022.getCode(), PushProtocol.SB_GD_2022.getName())); |
| | | list.add(new ApiTrigger(PushProtocol.SB_GD_2023.getCode(), PushProtocol.SB_GD_2023.getName())); |
| | | list.add(new ApiTrigger(PushProtocol.SB_GD_2020.getCode(), PushProtocol.SB_GD_2020.getName())); |
| | | list.add(new ApiTrigger(PushProtocol.SB_HN_2022.getCode(), PushProtocol.SB_HN_2022.getName())); |
| | | list.add(new ApiTrigger(PushProtocol.SB_WHJL_2023.getCode(), PushProtocol.SB_WHJL_2023.getName())); |
| | | list.add(new ApiTrigger(PushProtocol.HB_FZZY_JG_2022.getCode(), PushProtocol.HB_FZZY_JG_2022.getName())); |
| | | list.add(new ApiTrigger(PushProtocol.SB_SHJdJW_2023.getCode(), PushProtocol.SB_SHJdJW_2023.getName())); |
| | | list.add(new ApiTrigger(PushProtocol.SB_SH_2023.getCode(), PushProtocol.SB_SH_2023.getName())); |
| | | list.add(new ApiTrigger(PushProtocol.SB_NX_2023.getCode(), PushProtocol.SB_NX_2023.getName())); |
| | | list.add(new ApiTrigger(PushProtocol.SB_NX_2024.getCode(), PushProtocol.SB_NX_2024.getName())); |
| | | list.add(new ApiTrigger(PushProtocol.SB_SX_2023.getCode(), PushProtocol.SB_SX_2023.getName())); |
| | | list.add(new ApiTrigger(PushProtocol.SB_SX_2024.getCode(), PushProtocol.SB_SX_2024.getName())); |
| | | return list; |
| | | } |
| | | |
| | |
| | | list.add(new ApiTrigger(SyncProtocol.FZZY_V30_GB.getCode(), SyncProtocol.FZZY_V30_GB.getName())); |
| | | list.add(new ApiTrigger(SyncProtocol.FZZY_V35_GB.getCode(), SyncProtocol.FZZY_V35_GB.getName())); |
| | | list.add(new ApiTrigger(SyncProtocol.FZZY_V40_GB.getCode(), SyncProtocol.FZZY_V40_GB.getName())); |
| | | list.add(new ApiTrigger(SyncProtocol.FZZY_V40_WHJL.getCode(), SyncProtocol.FZZY_V40_WHJL.getName())); |
| | | list.add(new ApiTrigger(SyncProtocol.FZZY_V35_SHYZ.getCode(), SyncProtocol.FZZY_V35_SHYZ.getName())); |
| | | return list; |
| | | } |