|
@@ -5,45 +5,17 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
-import com.ydtech.config.DictEnumConfig;
|
|
|
|
|
-import com.ydtech.constants.enums.dict.DictionaryData;
|
|
|
|
|
-import com.ydtech.constants.enums.dict.DictionaryManagement;
|
|
|
|
|
-import com.ydtech.constants.enums.dict.agreement.AgreementType;
|
|
|
|
|
import com.ydtech.core.page.HttpResult;
|
|
import com.ydtech.core.page.HttpResult;
|
|
|
-import com.ydtech.core.page.PageResult;
|
|
|
|
|
-import com.ydtech.exception.SystemException;
|
|
|
|
|
-import com.ydtech.modules.esm.model.EsmInsCompany;
|
|
|
|
|
-import com.ydtech.modules.esm.service.EsmInsCompanyService;
|
|
|
|
|
-import com.ydtech.modules.order.service.InsCrawlerOrderService;
|
|
|
|
|
-import com.ydtech.modules.protocol.constants.HistoryStatusConstants;
|
|
|
|
|
import com.ydtech.modules.protocol.dao.PtlAgreementHistoryMapper;
|
|
import com.ydtech.modules.protocol.dao.PtlAgreementHistoryMapper;
|
|
|
-import com.ydtech.modules.protocol.dao.PtlAgreementMapper;
|
|
|
|
|
-import com.ydtech.modules.protocol.entity.constants.PtlApiType;
|
|
|
|
|
-import com.ydtech.modules.protocol.entity.dto.PtlAgreementAttributionDto;
|
|
|
|
|
-import com.ydtech.modules.protocol.entity.dto.PtlAgreementDto;
|
|
|
|
|
-import com.ydtech.modules.protocol.entity.dto.PtlAgreementInsCompanyDto;
|
|
|
|
|
-import com.ydtech.modules.protocol.entity.dto.PtlAgreementSaveDto;
|
|
|
|
|
-import com.ydtech.modules.protocol.entity.dto.history.PtlAgreementHistorySaveDto;
|
|
|
|
|
import com.ydtech.modules.protocol.entity.po.*;
|
|
import com.ydtech.modules.protocol.entity.po.*;
|
|
|
import com.ydtech.modules.protocol.entity.vo.*;
|
|
import com.ydtech.modules.protocol.entity.vo.*;
|
|
|
import com.ydtech.modules.protocol.service.*;
|
|
import com.ydtech.modules.protocol.service.*;
|
|
|
-import com.ydtech.modules.protocol.utils.AssertionUtils;
|
|
|
|
|
-import com.ydtech.utils.idgen.IdGenerate;
|
|
|
|
|
-import org.apache.commons.lang3.ObjectUtils;
|
|
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
-import org.jsoup.helper.DataUtil;
|
|
|
|
|
-import org.springframework.beans.BeanUtils;
|
|
|
|
|
-import org.springframework.context.annotation.Lazy;
|
|
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
-import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
-import java.time.LocalDate;
|
|
|
|
|
-import java.time.LocalDateTime;
|
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
|
|
-import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -55,6 +27,15 @@ import java.util.stream.Collectors;
|
|
|
public class PtlAgreementHistoryServiceImpl extends ServiceImpl<PtlAgreementHistoryMapper, PtlAgreementHistory> implements PtlAgreementHistoryService {
|
|
public class PtlAgreementHistoryServiceImpl extends ServiceImpl<PtlAgreementHistoryMapper, PtlAgreementHistory> implements PtlAgreementHistoryService {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private PtlAgreementAttributionHistoryService ptlAgreementAttributionHistoryService;
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private PtlAgreementDeptHistoryService ptlAgreementDeptHistoryService;
|
|
|
|
|
+
|
|
|
|
|
+// @Autowired
|
|
|
|
|
+// private PtlAgreementService ptlAgreementService;
|
|
|
|
|
+
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public boolean saveAgreementHistory(PtlAgreementHistory ptlAgreementHistory) {
|
|
public boolean saveAgreementHistory(PtlAgreementHistory ptlAgreementHistory) {
|
|
@@ -62,9 +43,11 @@ public class PtlAgreementHistoryServiceImpl extends ServiceImpl<PtlAgreementHist
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
- public Page<PtlAgreementHistoryConvertQueryVo> pageHistory(Page page, String agreementId) {
|
|
|
|
|
- Page<HashMap> hashMaps = baseMapper.pageHistory(page, agreementId);
|
|
|
|
|
|
|
+ public Page<PtlAgreementHistoryConvertQueryVo> pageHistory(Page page, PtlAgreementProductQueryVo ptlAgreementProductQueryVo) {
|
|
|
|
|
+
|
|
|
|
|
+ Page<HashMap> hashMaps = baseMapper.pageHistory(page, ptlAgreementProductQueryVo);
|
|
|
Page<PtlAgreementHistoryConvertQueryVo> ptlAgreementHistoryQueryVos = new Page();
|
|
Page<PtlAgreementHistoryConvertQueryVo> ptlAgreementHistoryQueryVos = new Page();
|
|
|
List<PtlAgreementHistoryConvertQueryVo> ptlAgreementHistoryQueryList = new ArrayList<>();
|
|
List<PtlAgreementHistoryConvertQueryVo> ptlAgreementHistoryQueryList = new ArrayList<>();
|
|
|
for (HashMap hashMap : hashMaps.getRecords()) {
|
|
for (HashMap hashMap : hashMaps.getRecords()) {
|
|
@@ -121,4 +104,58 @@ public class PtlAgreementHistoryServiceImpl extends ServiceImpl<PtlAgreementHist
|
|
|
return ptlAgreementHistoryQueryVos;
|
|
return ptlAgreementHistoryQueryVos;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public HashMap<String, Object> getHistoryDetail(String batchNo) {
|
|
|
|
|
+ LambdaQueryWrapper<PtlAgreementHistory> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
|
|
+ lambdaQueryWrapper.eq(PtlAgreementHistory::getBatch, batchNo);
|
|
|
|
|
+ PtlAgreementHistory ptlAgreementHistory = getOne(lambdaQueryWrapper);
|
|
|
|
|
+
|
|
|
|
|
+ LambdaQueryWrapper<PtlAgreementDeptHistory> deptQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
|
|
+ deptQueryWrapper.eq(PtlAgreementDeptHistory::getBatch, batchNo);
|
|
|
|
|
+ List<PtlAgreementDeptHistory> deptHistories = ptlAgreementDeptHistoryService.list(deptQueryWrapper);
|
|
|
|
|
+
|
|
|
|
|
+ LambdaQueryWrapper<PtlAgreementAttributionHistory> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
|
|
+ queryWrapper.eq(PtlAgreementAttributionHistory::getBatch, batchNo);
|
|
|
|
|
+ PtlAgreementAttributionHistory ptlAgreementAttributionHistory = ptlAgreementAttributionHistoryService.getOne(queryWrapper);
|
|
|
|
|
+
|
|
|
|
|
+ HashMap<String, Object> hashMap = new HashMap<>();
|
|
|
|
|
+ hashMap.put("ptlAgreementHistory", ptlAgreementHistory);
|
|
|
|
|
+ hashMap.put("deptHistories", deptHistories);
|
|
|
|
|
+ hashMap.put("ptlAgreementAttributionHistory", ptlAgreementAttributionHistory);
|
|
|
|
|
+
|
|
|
|
|
+ return hashMap;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+// @Override
|
|
|
|
|
+// public HashMap<String, Object> agreementComparison(String batchNo) {
|
|
|
|
|
+//
|
|
|
|
|
+// LambdaQueryWrapper<PtlAgreementHistory> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
|
|
+// lambdaQueryWrapper.eq(PtlAgreementHistory::getBatch, batchNo);
|
|
|
|
|
+// PtlAgreementHistory ptlAgreementHistory = getOne(lambdaQueryWrapper);
|
|
|
|
|
+//
|
|
|
|
|
+// LambdaQueryWrapper<PtlAgreementDeptHistory> deptQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
|
|
+// deptQueryWrapper.eq(PtlAgreementDeptHistory::getBatch, batchNo);
|
|
|
|
|
+// List<PtlAgreementDeptHistory> deptHistories = ptlAgreementDeptHistoryService.list(deptQueryWrapper);
|
|
|
|
|
+//
|
|
|
|
|
+// LambdaQueryWrapper<PtlAgreementAttributionHistory> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
|
|
+// queryWrapper.eq(PtlAgreementAttributionHistory::getBatch, batchNo);
|
|
|
|
|
+// PtlAgreementAttributionHistory ptlAgreementAttributionHistory = ptlAgreementAttributionHistoryService.getOne(queryWrapper);
|
|
|
|
|
+//
|
|
|
|
|
+// HashMap<String, Object> historyDetail = new HashMap<>();
|
|
|
|
|
+// historyDetail.put("ptlAgreementHistory", ptlAgreementHistory);
|
|
|
|
|
+// historyDetail.put("deptHistories", deptHistories);
|
|
|
|
|
+// historyDetail.put("ptlAgreementAttributionHistory", ptlAgreementAttributionHistory);
|
|
|
|
|
+//
|
|
|
|
|
+//
|
|
|
|
|
+//
|
|
|
|
|
+//// HashMap<String, Object> historyDetail = getHistoryDetail(batchNo);
|
|
|
|
|
+//
|
|
|
|
|
+// HttpResult<PtlAgreementQueryVo> newAgreementDetail = ptlAgreementService.getByAgreementId(ptlAgreementHistory.getAgreementId());
|
|
|
|
|
+//
|
|
|
|
|
+// HashMap<String, Object> hashMap = new HashMap<>();
|
|
|
|
|
+// hashMap.put("historyDetail", historyDetail);
|
|
|
|
|
+// hashMap.put("newAgreementDetail", newAgreementDetail);
|
|
|
|
|
+// return hashMap;
|
|
|
|
|
+// }
|
|
|
|
|
+
|
|
|
}
|
|
}
|