From 2d94ddd240fca69ebbc4b0570abb30c803db7754 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期五, 13 三月 2026 11:33:44 +0800
Subject: [PATCH] fix: 区分基础数据与生产计划数据查询
---
src/main/java/com/ruoyi/production/service/impl/ProductMaterialServiceImpl.java | 394 +++++++++++++++++++++++++++----------------------------
1 files changed, 193 insertions(+), 201 deletions(-)
diff --git a/src/main/java/com/ruoyi/production/service/impl/ProductMaterialServiceImpl.java b/src/main/java/com/ruoyi/production/service/impl/ProductMaterialServiceImpl.java
index b1dd5b4..6446f4e 100644
--- a/src/main/java/com/ruoyi/production/service/impl/ProductMaterialServiceImpl.java
+++ b/src/main/java/com/ruoyi/production/service/impl/ProductMaterialServiceImpl.java
@@ -4,11 +4,14 @@
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.http.HttpUtils;
import com.ruoyi.framework.config.AliDingConfig;
+import com.ruoyi.production.dto.ProductMaterialDto;
+import com.ruoyi.production.dto.ProductMaterialGroupDto;
import com.ruoyi.production.enums.MaterialConfigTypeEnum;
import com.ruoyi.production.mapper.ProductMaterialMapper;
import com.ruoyi.production.pojo.ProductMaterial;
@@ -30,6 +33,7 @@
import java.time.format.DateTimeParseException;
import java.util.*;
import java.util.concurrent.locks.ReentrantLock;
+import java.util.stream.Collectors;
/**
* <br>
@@ -54,9 +58,15 @@
private ProductMaterialSkuService productMaterialSkuService;
/**
- * 鍚屾閿侊紝闃叉鎵嬪姩鍜屽畾鏃朵换鍔″悓鏃舵墽琛�
+ * 鍚屾閿�
*/
private final ReentrantLock syncLock = new ReentrantLock();
+
+ /**
+ * config缂撳瓨
+ */
+ private final Map<String, Integer> configCache = new HashMap<>();
+
@Override
@Transactional(rollbackFor = Exception.class)
@@ -71,296 +81,231 @@
}
/**
- * 鍚屾鏁版嵁
+ * 鍚屾鐗╂枡鏁版嵁
*/
@Transactional(rollbackFor = Exception.class)
- public void syncProductMaterialData(Integer dataSyncType) {
+ public void syncProductMaterialData(Integer syncType) {
if (!syncLock.tryLock()) {
- log.warn("鍚屾姝e湪杩涜涓紝鏈 {} 鍚屾璇锋眰琚烦杩�", dataSyncType == 1 ? "鎵嬪姩" : "瀹氭椂浠诲姟");
+ log.warn("鍚屾浠诲姟姝e湪鎵ц锛屾湰娆¤姹傝烦杩�");
return;
}
-
try {
- // 鑾峰彇 AccessToken
String accessToken = getAccessToken();
if (StringUtils.isEmpty(accessToken)) {
return;
}
-
- // 鑾峰彇鏈湴鏈�鍚庡悓姝ユ椂闂�
LocalDateTime lastSyncTime = getLastSyncTime();
- log.info("寮�濮嬬墿鏂欑紪鐮佸閲忓悓姝ワ紝鏈湴鏈�鍚庝慨鏀规椂闂�: {}", lastSyncTime);
+ log.info("寮�濮嬪悓姝ョ墿鏂欙紝鏈湴鏈�鍚庢椂闂� {}", lastSyncTime);
- int pageNumber = 1;
- int pageSize = 50;
+ int page = 1;
+ int size = 50;
boolean hasMore = true;
- int totalSynced = 0;
+ int total = 0;
while (hasMore) {
- // 鏌ヨ鍙傛暟
- JSONObject searchParam = buildSearchParam(lastSyncTime, pageNumber, pageSize);
+ JSONObject param = buildSearchParam(lastSyncTime, page, size);
+ String res = HttpUtils.sendPostJson(
+ aliDingConfig.getSearchFormDataUrl(),
+ param.toJSONString(),
+ StandardCharsets.UTF_8.name(),
+ null,
+ accessToken
+ );
- // 璋冪敤瀹滄惌鎺ュ彛鎷夊彇鏁版嵁
- String dataRes = HttpUtils.sendPostJson(aliDingConfig.getSearchFormDataUrl(), searchParam.toJSONString(), StandardCharsets.UTF_8.name(), null, accessToken);
-
- if (StringUtils.isEmpty(dataRes)) {
- log.warn("绗� {} 椤垫媺鍙栨暟鎹负绌�", pageNumber);
+ JSONObject result = JSON.parseObject(res);
+ JSONArray dataArr = result.getJSONArray("data");
+ Integer totalCount = result.getInteger("totalCount");
+ if (CollectionUtils.isEmpty(dataArr)) {
break;
}
-
- JSONObject resultObj = JSON.parseObject(dataRes);
- JSONArray dataArr = resultObj.getJSONArray("data");
- Integer totalCount = resultObj.getInteger("totalCount");
-
- if (dataArr == null || dataArr.isEmpty()) {
- log.info("娌℃湁鏇村鏂版暟鎹渶瑕佸悓姝�");
- break;
- }
-
- // 瑙f瀽骞朵繚瀛樻暟鎹�
- List<ProductMaterialSku> list = parseProductMaterials(dataArr, totalCount);
- if (!list.isEmpty()) {
- // 澶勭悊鏇存柊鎴栨柊澧�
- int affected = processSaveOrUpdate(list);
- totalSynced += affected;
- }
-
- // 鍒ゆ柇鏄惁杩樻湁涓嬩竴椤�
- hasMore = (pageNumber * pageSize) < totalCount;
- pageNumber++;
-
- log.info("姝e湪鍚屾绗� {} 椤碉紝褰撳墠宸插悓姝� {}/{}", pageNumber - 1, totalSynced, totalCount);
+ List<ProductMaterialSku> list = parseProductMaterials(dataArr);
+ int affected = processSaveOrUpdate(list);
+ total += affected;
+ hasMore = page * size < totalCount;
+ page++;
+ log.info("鍚屾杩涘害 {} / {}", total, totalCount);
}
-
- log.info("鐗╂枡鏁版嵁鍚屾瀹屾垚锛屽叡鍚屾 {} 鏉℃暟鎹�", totalSynced);
+ log.info("鐗╂枡鍚屾瀹屾垚 鍏� {} 鏉�", total);
} catch (Exception e) {
- log.error("鍚屾鐗╂枡缂栫爜寮傚父", e);
+ log.error("鍚屾寮傚父", e);
} finally {
- // 閲婃斁閿�
syncLock.unlock();
}
}
- private String getAccessToken() {
- String params = "appkey=" + aliDingConfig.getAppKey() + "&appsecret=" + aliDingConfig.getAppSecret();
- String tokenRes = HttpUtils.sendGet(aliDingConfig.getAccessTokenUrl(), params);
- JSONObject tokenObj = JSON.parseObject(tokenRes);
- String accessToken = tokenObj.getString("access_token");
- if (StringUtils.isEmpty(accessToken)) {
- log.error("鑾峰彇閽夐拤AccessToken澶辫触: {}", tokenRes);
- }
- return accessToken;
- }
-
- private LocalDateTime getLastSyncTime() {
- LambdaQueryWrapper<ProductMaterialSku> queryWrapper = new LambdaQueryWrapper<>();
- queryWrapper.orderByDesc(ProductMaterialSku::getFormModifiedTime).last("LIMIT 1");
- ProductMaterialSku lastRecord = productMaterialSkuService.getOne(queryWrapper);
- return lastRecord != null ? lastRecord.getFormModifiedTime() : null;
- }
-
- private JSONObject buildSearchParam(LocalDateTime lastSyncTime, int pageNumber, int pageSize) {
- JSONObject searchParam = new JSONObject();
- searchParam.put("appType", aliDingConfig.getAppType());
- searchParam.put("systemToken", aliDingConfig.getSystemToken());
- searchParam.put("userId", aliDingConfig.getUserId());
- searchParam.put("formUuid", aliDingConfig.getMaterialCodeFormUuid());
- searchParam.put("currentPage", pageNumber);
- searchParam.put("pageSize", pageSize);
-
- JSONArray searchConditions = new JSONArray();
- JSONObject statusCondition = new JSONObject();
- statusCondition.put("key", "processInstanceStatus");
- JSONArray statusValueArray = new JSONArray();
- statusValueArray.add("COMPLETED");
- statusCondition.put("value", statusValueArray);
- statusCondition.put("type", "ARRAY");
- statusCondition.put("operator", "in");
- statusCondition.put("componentName", "SelectField");
- searchConditions.add(statusCondition);
-
- JSONObject resultCondition = new JSONObject();
- resultCondition.put("key", "processApprovedResult");
- JSONArray resultValueArray = new JSONArray();
- resultValueArray.add("agree");
- resultCondition.put("value", resultValueArray);
- resultCondition.put("type", "ARRAY");
- resultCondition.put("operator", "in");
- resultCondition.put("componentName", "SelectField");
- searchConditions.add(resultCondition);
-
- searchParam.put("searchFieldJson", searchConditions.toJSONString());
- searchParam.put("orderConfigJson", "{\"gmt_modified\":\"+\"}");
-
- if (lastSyncTime != null) {
- String startTime = lastSyncTime.plusSeconds(1).atZone(ZoneId.systemDefault()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
- searchParam.put("modifiedFromTimeGMT", startTime);
- }
-
- String endTime = LocalDateTime.now().atZone(ZoneId.systemDefault()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
- searchParam.put("modifiedToTimeGMT", endTime);
-
- return searchParam;
- }
-
- private List<ProductMaterialSku> parseProductMaterials(JSONArray dataArr, Integer totalCount) {
+ private List<ProductMaterialSku> parseProductMaterials(JSONArray arr) {
List<ProductMaterialSku> list = new ArrayList<>();
LocalDateTime now = LocalDateTime.now();
-
- for (int i = 0; i < dataArr.size(); i++) {
- JSONObject item = dataArr.getJSONObject(i);
- String formInstanceId = item.getString("formInstanceId");
-
- JSONObject originator = item.getJSONObject("originator");
- String originatorName = originator != null && originator.containsKey("userName") ? originator.getJSONObject("userName").getString("nameInChinese") : "鏈煡";
+ for (int i = 0; i < arr.size(); i++) {
+ JSONObject item = arr.getJSONObject(i);
JSONObject formData = item.getJSONObject("formData");
- // 澶勭悊鐗╂枡涓昏〃鏁版嵁
+
+ String materialName = formData.getString("textField_l92f36f5");
ProductMaterial material = new ProductMaterial();
- material.setMaterialName(formData.getString("textField_l92f36f5"));
+ material.setMaterialName(materialName);
material.setBaseUnit(formData.getString("textField_la147lnw"));
- material.setRemark(formData.getString("textareaField_l92f36f9"));
-
- String materialType = formData.getString("selectField_l92f36fb");
- String inventoryCat = formData.getString("selectField_la154noy");
- material.setMaterialTypeId(getOrCreateConfigId(materialType, MaterialConfigTypeEnum.MATERIAL_TYPE.name()));
- material.setInventoryCategoryId(getOrCreateConfigId(inventoryCat, MaterialConfigTypeEnum.INVENTORY_CAT.name()));
-
+ String type = formData.getString("selectField_l92f36fb");
+ String inventory = formData.getString("selectField_la154noy");
+ material.setMaterialTypeId(getOrCreateConfigId(type, MaterialConfigTypeEnum.MATERIAL_TYPE.name()));
+ material.setInventoryCategoryId(getOrCreateConfigId(inventory, MaterialConfigTypeEnum.INVENTORY_CAT.name()));
Long materialId = getOrCreateMaterial(material);
-
- // 澶勭悊鐗╂枡瑙勬牸鏁版嵁
ProductMaterialSku sku = new ProductMaterialSku();
sku.setMaterialId(materialId);
- sku.setFormInstanceId(formInstanceId);
- sku.setIdentifierCode(formData.getString("textField_l92h77ju"));
sku.setMaterialCode(formData.getString("textField_l92f36f2"));
sku.setSpecification(formData.getString("textField_l92f36f6"));
- sku.setSupplyType(formData.getString("selectField_la14k51j"));
- sku.setOriginatorName(originatorName);
- sku.setOriginatorOrg("瀹佸涓垱缁胯兘瀹炰笟闆嗗洟鏈夐檺鍏徃");
+ sku.setIdentifierCode(formData.getString("textField_l92h77ju"));
sku.setFormModifiedTime(parseUtcTime(item.getString("modifiedTimeGMT")));
sku.setCreateTime(now);
sku.setUpdateTime(now);
-
list.add(sku);
}
return list;
}
private Long getOrCreateMaterial(ProductMaterial material) {
- LambdaQueryWrapper<ProductMaterial> queryWrapper = new LambdaQueryWrapper<>();
- queryWrapper.eq(ProductMaterial::getMaterialName, material.getMaterialName());
-
- ProductMaterial exist = this.getOne(queryWrapper);
+ ProductMaterial exist = this.getOne(
+ new LambdaQueryWrapper<ProductMaterial>()
+ .eq(ProductMaterial::getMaterialName, material.getMaterialName())
+ );
if (exist == null) {
material.setCreateTime(LocalDateTime.now());
material.setUpdateTime(LocalDateTime.now());
this.save(material);
return material.getId();
- } else {
- // 濡傛灉宸插瓨鍦紝浣嗗叧閿睘鎬у彂鐢熷彉鍖栵紝鍒欒繘琛屾洿鏂帮紙浠ュ疁鎼暟鎹负鍑嗭級
- boolean needUpdate = false;
- if (material.getMaterialTypeId() != null && !material.getMaterialTypeId().equals(exist.getMaterialTypeId())) {
- exist.setMaterialTypeId(material.getMaterialTypeId());
- needUpdate = true;
- }
- if (material.getInventoryCategoryId() != null && !material.getInventoryCategoryId().equals(exist.getInventoryCategoryId())) {
- exist.setInventoryCategoryId(material.getInventoryCategoryId());
- needUpdate = true;
- }
- if (StringUtils.isNotEmpty(material.getBaseUnit()) && !material.getBaseUnit().equals(exist.getBaseUnit())) {
- exist.setBaseUnit(material.getBaseUnit());
- needUpdate = true;
- }
- if (needUpdate) {
- exist.setUpdateTime(LocalDateTime.now());
- this.updateById(exist);
- }
- return exist.getId();
}
+
+ return exist.getId();
}
+
private Integer getOrCreateConfigId(String name, String type) {
if (StringUtils.isEmpty(name)) {
return null;
}
- ProductMaterialConfig config = productMaterialConfigService.getOne(new LambdaQueryWrapper<ProductMaterialConfig>().eq(ProductMaterialConfig::getConfigName, name).eq(ProductMaterialConfig::getConfigType, type));
+ String key = type + "_" + name;
+ if (configCache.containsKey(key)) {
+ return configCache.get(key);
+ }
+ ProductMaterialConfig config = productMaterialConfigService.getOne(new LambdaQueryWrapper<ProductMaterialConfig>()
+ .eq(ProductMaterialConfig::getConfigName, name)
+ .eq(ProductMaterialConfig::getConfigType, type));
if (config == null) {
config = new ProductMaterialConfig();
config.setConfigName(name);
config.setConfigType(type);
productMaterialConfigService.save(config);
}
+ configCache.put(key, config.getId());
return config.getId();
}
private int processSaveOrUpdate(List<ProductMaterialSku> list) {
- if (list == null || list.isEmpty()) {
+ if (CollectionUtils.isEmpty(list)) {
return 0;
}
int affected = 0;
-
for (ProductMaterialSku sku : list) {
- ProductMaterialSku exist =
- productMaterialSkuService.getOne(new LambdaQueryWrapper<ProductMaterialSku>()
- .eq(ProductMaterialSku::getMaterialId, sku.getMaterialId())
- .eq(ProductMaterialSku::getSpecification, sku.getSpecification()));
+ ProductMaterialSku exist = productMaterialSkuService.getOne(new LambdaQueryWrapper<ProductMaterialSku>()
+ .eq(ProductMaterialSku::getMaterialId, sku.getMaterialId())
+ .eq(ProductMaterialSku::getSpecification, sku.getSpecification()));
+
if (exist == null) {
productMaterialSkuService.save(sku);
affected++;
- log.info("鏂板鐗╂枡瑙勬牸 {}", sku.getSpecification());
- } else {
- if (exist.getFormModifiedTime() == null || !exist.getFormModifiedTime().equals(sku.getFormModifiedTime())) {
- sku.setId(exist.getId());
- sku.setCreateTime(exist.getCreateTime());
- productMaterialSkuService.updateById(sku);
-
- affected++;
- log.info("鏇存柊鐗╂枡瑙勬牸 {}", sku.getSpecification());
- }
+ } else if (!Objects.equals(exist.getFormModifiedTime(), sku.getFormModifiedTime())) {
+ sku.setId(exist.getId());
+ sku.setCreateTime(exist.getCreateTime());
+ productMaterialSkuService.updateById(sku);
+ affected++;
}
}
return affected;
}
- private LocalDateTime parseUtcTime(String utcString) {
- if (StringUtils.isEmpty(utcString)) {
- return null;
+ @Override
+ public List<ProductMaterialGroupDto> ProductMaterialList(Integer type) {
+ List<ProductMaterialConfig> configList = productMaterialConfigService.list(new LambdaQueryWrapper<ProductMaterialConfig>()
+ .eq(ProductMaterialConfig::getConfigType, MaterialConfigTypeEnum.MATERIAL_TYPE.name())
+ );
+ if (CollectionUtils.isEmpty(configList)) {
+ return new ArrayList<>();
}
- try {
- OffsetDateTime odt = OffsetDateTime.parse(utcString);
- return odt.toLocalDateTime();
- } catch (DateTimeParseException ex) {
- log.warn("瑙f瀽鏃堕棿 {} 澶辫触: {}", utcString, ex.getMessage());
- return null;
+ List<ProductMaterialGroupDto> result = new ArrayList<>();
+ Map<Integer, List<ProductMaterialDto>> materialMap = new HashMap<>();
+ if (type != null && type == 2) {
+ List<ProductMaterial> materialList = this.list(new LambdaQueryWrapper<ProductMaterial>()
+ .select(
+ ProductMaterial::getId,
+ ProductMaterial::getMaterialTypeId,
+ ProductMaterial::getInventoryCategoryId,
+ ProductMaterial::getMaterialName
+ )
+ );
+ materialMap = materialList.stream()
+ .map(this::convert)
+ .collect(Collectors.groupingBy(ProductMaterialDto::getMaterialTypeId));
}
+
+ for (ProductMaterialConfig config : configList) {
+ ProductMaterialGroupDto dto = new ProductMaterialGroupDto();
+ dto.setConfigId(config.getId());
+ dto.setConfigName(config.getConfigName());
+ if (type != null && type == 2) {
+ dto.setMaterialList(materialMap.getOrDefault(config.getId(), new ArrayList<>()));
+ }
+ result.add(dto);
+ }
+ return result;
}
+
@Override
- public Map<String, List<ProductMaterial>> ProductMaterialList(String materialName) {
+ public List<ProductMaterialGroupDto> productMaterialListByQuery(String materialName, Integer materialTypeId) {
- List<ProductMaterialConfig> materialConfigList =
- productMaterialConfigService.list(new LambdaQueryWrapper<ProductMaterialConfig>()
- .eq(ProductMaterialConfig::getConfigType, MaterialConfigTypeEnum.MATERIAL_TYPE.name()));
-
- Map<String, List<ProductMaterial>> productMaterialMap = new HashMap<>();
- if (materialConfigList == null || materialConfigList.isEmpty()) {
- return productMaterialMap;
+ if (StringUtils.isEmpty(materialName) && materialTypeId == null) {
+ return new ArrayList<>();
}
- for (ProductMaterialConfig materialConfig : materialConfigList) {
- LambdaQueryWrapper<ProductMaterial> wrapper = new LambdaQueryWrapper<>();
- wrapper.eq(ProductMaterial::getMaterialTypeId, materialConfig.getId())
- .select(ProductMaterial::getId, ProductMaterial::getMaterialName)
- .like(materialName != null && !materialName.isEmpty(), ProductMaterial::getMaterialName, materialName);
- List<ProductMaterial> productMaterialList = list(wrapper);
+ LambdaQueryWrapper<ProductMaterial> wrapper = new LambdaQueryWrapper<>();
+ // 鍙煡璇㈤渶瑕佺殑瀛楁鏁版嵁
+ wrapper.select(
+ ProductMaterial::getId,
+ ProductMaterial::getMaterialTypeId,
+ ProductMaterial::getInventoryCategoryId,
+ ProductMaterial::getMaterialName
+ );
+ if (StringUtils.isNotEmpty(materialName)) {
+ wrapper.like(ProductMaterial::getMaterialName, materialName);
+ }
+ if (materialTypeId != null) {
+ wrapper.eq(ProductMaterial::getMaterialTypeId, materialTypeId);
+ }
+ List<ProductMaterial> materials = this.list(wrapper);
+ if (CollectionUtils.isEmpty(materials)) {
+ return new ArrayList<>();
+ }
+ Map<Integer, List<ProductMaterialDto>> map = materials.stream()
+ .map(this::convert)
+ .collect(Collectors.groupingBy(ProductMaterialDto::getMaterialTypeId));
- if (productMaterialList != null && !productMaterialList.isEmpty()) {
- productMaterialMap.put(materialConfig.getConfigName(), productMaterialList);
+ List<ProductMaterialConfig> configList = productMaterialConfigService.list(new LambdaQueryWrapper<ProductMaterialConfig>()
+ .eq(ProductMaterialConfig::getConfigType, MaterialConfigTypeEnum.MATERIAL_TYPE.name()));
+
+ List<ProductMaterialGroupDto> result = new ArrayList<>();
+ for (ProductMaterialConfig config : configList) {
+ List<ProductMaterialDto> dtoList = map.get(config.getId());
+ if (CollectionUtils.isEmpty(dtoList)) {
+ continue;
}
+ ProductMaterialGroupDto dto = new ProductMaterialGroupDto();
+ dto.setConfigId(config.getId());
+ dto.setConfigName(config.getConfigName());
+ dto.setMaterialList(dtoList);
+ result.add(dto);
}
- return productMaterialMap;
+ return result;
}
@Override
@@ -411,6 +356,7 @@
log.info("鍒犻櫎鐗╂枡鎴愬姛 ids={}", ids);
}
+
private void validateProductMaterial(ProductMaterial productMaterial, boolean requireId) {
if (productMaterial == null) {
throw new ServiceException("鍙傛暟涓嶈兘涓虹┖");
@@ -434,4 +380,50 @@
}
return this.count(queryWrapper) > 0;
}
-}
+
+ private ProductMaterialDto convert(ProductMaterial m) {
+ ProductMaterialDto dto = new ProductMaterialDto();
+ dto.setId(m.getId());
+ dto.setMaterialName(m.getMaterialName());
+ dto.setMaterialTypeId(m.getMaterialTypeId());
+ dto.setInventoryCategoryId(m.getInventoryCategoryId());
+ return dto;
+ }
+
+ private LocalDateTime parseUtcTime(String utc) {
+ if (StringUtils.isEmpty(utc)) {
+ return null;
+ }
+ try {
+ return OffsetDateTime.parse(utc).toLocalDateTime();
+ } catch (DateTimeParseException e) {
+ log.warn("鏃堕棿瑙f瀽澶辫触 {}", utc);
+ return null;
+ }
+ }
+
+ private String getAccessToken() {
+ String params = "appkey=" + aliDingConfig.getAppKey() + "&appsecret=" + aliDingConfig.getAppSecret();
+ String res = HttpUtils.sendGet(aliDingConfig.getAccessTokenUrl(), params);
+ JSONObject obj = JSON.parseObject(res);
+ return obj.getString("access_token");
+ }
+
+ private LocalDateTime getLastSyncTime() {
+ ProductMaterialSku last = productMaterialSkuService.getOne(new LambdaQueryWrapper<ProductMaterialSku>()
+ .orderByDesc(ProductMaterialSku::getFormModifiedTime)
+ .last("limit 1"));
+ return last == null ? null : last.getFormModifiedTime();
+ }
+
+ private JSONObject buildSearchParam(LocalDateTime lastTime, int page, int size) {
+ JSONObject obj = new JSONObject();
+ obj.put("appType", aliDingConfig.getAppType());
+ obj.put("systemToken", aliDingConfig.getSystemToken());
+ obj.put("formUuid", aliDingConfig.getMaterialCodeFormUuid());
+ obj.put("currentPage", page);
+ obj.put("pageSize", size);
+
+ return obj;
+ }
+}
\ No newline at end of file
--
Gitblit v1.9.3