123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158 |
- package com.dashitech.migration.task.other;
- import com.dashitech.migration.BaseTask;
- import com.dashitech.migration.core.FieldMapper;
- import org.apache.commons.logging.Log;
- import org.apache.commons.logging.LogFactory;
- import org.springframework.stereotype.Component;
- import org.springframework.transaction.annotation.Transactional;
- import java.util.HashMap;
- import java.util.Map;
- /**
- * @author song
- * @date 2024年10月12日
- */
- @Component
- public class DictionaryTask extends BaseTask {
- public static Log log = LogFactory.getLog(DictionaryTask.class);
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void start() {
- }
- @Override
- public FieldMapper loadCache() {
- FieldMapper mapper = null;
- if ("xiangyang".equals(appName)) {
- mapper = loadXiangYangCache();
- } else {
- mapper = loadNanJingCache();
- }
- return mapper;
- }
- private FieldMapper loadXiangYangCache() {
- log.info(" *** 加载襄阳字典缓存 *** ");
- FieldMapper mapper = new FieldMapper();
- Map<Long, Long> dicIdCache = new HashMap<>();
- mapper.setIdCache(dicIdCache);
- //知识库
- dicIdCache.put(71L, 20404L); //待审核
- dicIdCache.put(72L, 20405L); //已发布
- dicIdCache.put(73L, 20406L); //待整改
- dicIdCache.put(74L, 20407L); //已停用
- //耗材消耗
- dicIdCache.put(1735L, 20557L);//消耗
- dicIdCache.put(1736L, 20558L);//撤销
- return mapper;
- }
- private FieldMapper loadNanJingCache() {
- log.info(" *** 加载南京字典缓存 *** ");
- FieldMapper mapper = new FieldMapper();
- Map<Long, Long> idCache = new HashMap<>();
- mapper.setIdCache(idCache);
- //知识库
- idCache.put(71L, 20328L); //待审核
- idCache.put(72L, 20329L); //已发布
- idCache.put(73L, 20330L); //待整改
- idCache.put(74L, 20331L); //已停用
- //耗材消耗
- idCache.put(1732L, 20475L);//消耗
- idCache.put(1733L, 20476L);//撤销
- //公司分类
- idCache.put(1709L,20309L);
- idCache.put(1710L,20311L);
- //性别
- idCache.put(279L,1609L);
- idCache.put(280L,1610L);
- //事件-关闭代码
- idCache.put(1572L,20419L);
- idCache.put(1573L,20420L);
- idCache.put(1575L,20421L);
- idCache.put(1574L,20422L);
- idCache.put(1576L,20422L);
- idCache.put(1577L,20422L);
- //事件-满意度
- idCache.put(1578L,20414L);
- idCache.put(1579L,20415L);
- idCache.put(1580L,20416L);
- idCache.put(1581L,20417L);
- idCache.put(1582L,20418L);
- //事件-优先级
- idCache.put(1560L,5L);
- idCache.put(1561L,4L);
- idCache.put(1562L,3L);
- idCache.put(1563L,2L);
- idCache.put(1704L,1L);
- //事件-incident_source
- idCache.put(1547L,20402L);
- idCache.put(1548L,20403L);
- idCache.put(1549L,1549L);
- idCache.put(1550L,20406L);
- idCache.put(1551L,20405L);
- idCache.put(1552L,20406L);
- idCache.put(1700L,20406L);
- idCache.put(1747L,20406L);
- //事件-incident_status
- idCache.put(1479L,20423L);
- idCache.put(1543L,20424L);
- idCache.put(1544L,20425L);
- idCache.put(1545L,20426L);
- idCache.put(1546L,20426L);
- idCache.put(1674L,20427L);
- idCache.put(1748L,20428L);
- idCache.put(1749L,20429L);
- idCache.put(1750L,20430L);
- //事件-incident_handleresult
- idCache.put(1568L,20401L);
- idCache.put(1569L,20401L);
- idCache.put(1570L,20401L);
- idCache.put(1571L,20401L);
- //事件-wxincident_degree
- idCache.put(1598L,20414L);
- idCache.put(1599L,20415L);
- idCache.put(1600L,20416L);
- idCache.put(1601L,20417L);
- idCache.put(1602L,20418L);
- //事件日志-incident_log_type
- idCache.put(1736L,20435L);
- idCache.put(1737L,20436L);
- idCache.put(1738L,20437L);
- idCache.put(1739L,20438L);
- idCache.put(1740L,20439L);
- idCache.put(1741L,20440L);
- idCache.put(1742L,20441L);
- idCache.put(1743L,20442L);
- idCache.put(1744L,20443L);
- idCache.put(1745L,20444L);
- idCache.put(1751L,20445L);
- idCache.put(1752L,20446L);
- idCache.put(1753L,20447L);
- idCache.put(1754L,20448L);
- idCache.put(1755L,20449L);
- idCache.put(1766L,20450L);
- return mapper;
- }
- }
|