| | |
| | | import java.util.concurrent.CountDownLatch; |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | |
| | | import com.yssh.config.InitConfig; |
| | | import com.yssh.entity.*; |
| | | import com.yssh.mapper.*; |
| | | import com.yssh.utils.CalculateUtils; |
| | |
| | | //@Transactional |
| | | @Async("threadPoolTaskExecutor") |
| | | public void insertSuYuanDatasAsync(List<SuYuan> lists, String time) throws Exception { |
| | | //插入数据 |
| | | List<List<SuYuan>> list = Lists.partition(lists, AsyncService.BATCH_INSERT_NUMBER); |
| | | CountDownLatch countDownLatch = new CountDownLatch(list.size()); |
| | | for (List<SuYuan> corpReserveList : list) { |
| | |
| | | Collections.sort(list); |
| | | DistanceSuYuan max = list.get(0); |
| | | FeedbackDetail feedbackDetail = new FeedbackDetail(null, dictRecord.getTableName(), |
| | | max.getName(), max.getId(), max.getVocsName(), max.getVocsValue(), null, null, null, DateUtils.getNowDate()); |
| | | max.getName(), max.getId(), max.getVocsName(), max.getVocsValue(), null, null, null, InitConfig.getDate()); |
| | | feedbackMapper.insert(feedbackDetail); |
| | | result.put("feedbackId", feedbackDetail.getId()); |
| | | } |
| | |
| | | Collections.sort(list); |
| | | DistanceSuYuan max = list.get(0); |
| | | FeedbackDetail feedbackDetail = new FeedbackDetail(null, dictRecord.getTableName(), |
| | | max.getName(), max.getId(), max.getVocsName(), max.getVocsValue(), null, null, null, DateUtils.getNowDate()); |
| | | max.getName(), max.getId(), max.getVocsName(), max.getVocsValue(), null, null, null, InitConfig.getDate()); |
| | | feedbackMapper.insert(feedbackDetail); |
| | | result.put("feedbackId", feedbackDetail.getId()); |
| | | } |
| | |
| | | Collections.sort(list); |
| | | DistanceSuYuan max = list.get(0); |
| | | FeedbackDetail feedbackDetail = new FeedbackDetail(null, dictRecord.getTableName(), |
| | | max.getName(), max.getId(), max.getVocsName(), max.getVocsValue(), null, null, null, DateUtils.getNowDate()); |
| | | max.getName(), max.getId(), max.getVocsName(), max.getVocsValue(), null, null, null, InitConfig.getDate()); |
| | | feedbackMapper.insert(feedbackDetail); |
| | | result.put("feedbackId", feedbackDetail.getId()); |
| | | } |
| | |
| | | Collections.sort(list); |
| | | DistanceSuYuan max = list.get(0); |
| | | FeedbackDetail feedbackDetail = new FeedbackDetail(null, dictRecord.getTableName(), |
| | | max.getName(), max.getId(), max.getVocsName(), max.getVocsValue(), null, null, null, DateUtils.getNowDate()); |
| | | max.getName(), max.getId(), max.getVocsName(), max.getVocsValue(), null, null, null, InitConfig.getDate()); |
| | | feedbackMapper.insert(feedbackDetail); |
| | | result.put("feedbackId", feedbackDetail.getId()); |
| | | } |
| | |
| | | } |
| | | |
| | | public int updateVocsName(Date date, String id, String vocsName) { |
| | | String table = "su_yuan_" + DateUtils.getYyyyMmDdHh(date); // new Date() |
| | | String table = "su_yuan_" + DateUtils.getYyyyMmDdHh(date); |
| | | if (isTableExists(table) == 0) { |
| | | return 0; |
| | | } |
| | |
| | | return suYuanId; |
| | | } |
| | | |
| | | /** |
| | | * 根据ID查询快速溯源 |
| | | */ |
| | | public List<SuYuanFast> selectFastById(String id, Date date) { |
| | | String time = DateUtils.getYyyyMmDdHhMmSs(date); |
| | | |