update 定时任务同步
This commit is contained in:
+3
-3
@@ -460,9 +460,9 @@ public class LawsAsmsOpenApiServiceImpl extends ServiceImpl<LawsAsmsOpenApiMappe
|
|||||||
// 代替标准号
|
// 代替标准号
|
||||||
lawsReplacedStandardService.addRelation(lawsAsmsDomestic.getReplaceCode(), lawsAsmsDomestic.getCode(), 1);
|
lawsReplacedStandardService.addRelation(lawsAsmsDomestic.getReplaceCode(), lawsAsmsDomestic.getCode(), 1);
|
||||||
// 标准性质
|
// 标准性质
|
||||||
itemValues = getItemValues(lawsAsmsDomestic.getStandardNature(),
|
/*itemValues = getItemValues(lawsAsmsDomestic.getStandardNature(),
|
||||||
"1695010513489833985", sysDictItemList);
|
"1695010513489833985", sysDictItemList);*/
|
||||||
lawsDomesticStandard.setStandardProperty(itemValues);
|
lawsDomesticStandard.setStandardProperty("SN002");
|
||||||
// 标准状态
|
// 标准状态
|
||||||
itemValues = getItemValues(lawsAsmsDomestic.getStandardStatus(),
|
itemValues = getItemValues(lawsAsmsDomestic.getStandardStatus(),
|
||||||
"1695991936599715842", sysDictItemList);
|
"1695991936599715842", sysDictItemList);
|
||||||
|
|||||||
+21
-8
@@ -117,6 +117,17 @@ public class SynchronizationAsmsService {
|
|||||||
log.info("=====================没有获取到ASMS系统数据,同步结束=====================");
|
log.info("=====================没有获取到ASMS系统数据,同步结束=====================");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LambdaQueryWrapper<LawsDomesticStandard> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.select(LawsDomesticStandard::getStandardNumber);
|
||||||
|
List<LawsDomesticStandard> lawsDomesticStandards = lawsDomesticStandardService.list(queryWrapper);
|
||||||
|
List<String> dupCodeList;
|
||||||
|
if (CollectionUtils.isNotEmpty(lawsDomesticStandards)) {
|
||||||
|
dupCodeList = lawsDomesticStandards.stream().map(LawsDomesticStandard::getStandardNumber).collect(Collectors.toList());
|
||||||
|
} else {
|
||||||
|
dupCodeList = new ArrayList<>();
|
||||||
|
}
|
||||||
|
|
||||||
List<LawsAsmsDomestic> lawsAsmsDomesticList = new ArrayList();
|
List<LawsAsmsDomestic> lawsAsmsDomesticList = new ArrayList();
|
||||||
mapList.forEach(eMap -> {
|
mapList.forEach(eMap -> {
|
||||||
String createTimeString = eMap.get("createTime");
|
String createTimeString = eMap.get("createTime");
|
||||||
@@ -124,11 +135,13 @@ public class SynchronizationAsmsService {
|
|||||||
Date yesterday = DateUtil.getDateAddDays(new Date(), -1);
|
Date yesterday = DateUtil.getDateAddDays(new Date(), -1);
|
||||||
// 创建时间为昨天的数据
|
// 创建时间为昨天的数据
|
||||||
if (createTime.after(DateUtil.getDayStart(yesterday)) && createTime.before(DateUtil.getDayEnd(yesterday))) {
|
if (createTime.after(DateUtil.getDayStart(yesterday)) && createTime.before(DateUtil.getDayEnd(yesterday))) {
|
||||||
LawsAsmsDomestic lawsAsmsDomestic = JSONObject.parseObject(JSONObject.toJSONString(eMap), LawsAsmsDomestic.class);
|
if (!dupCodeList.contains((String) eMap.get("code"))) {
|
||||||
lawsAsmsDomestic.setCreateTimeString(createTimeString);
|
LawsAsmsDomestic lawsAsmsDomestic = JSONObject.parseObject(JSONObject.toJSONString(eMap), LawsAsmsDomestic.class);
|
||||||
lawsAsmsDomestic.setUpdateTimeString(eMap.get("updateTime"));
|
lawsAsmsDomestic.setCreateTimeString(createTimeString);
|
||||||
lawsAsmsDomestic.setFocalPointName(eMap.get("focalPoint"));
|
lawsAsmsDomestic.setUpdateTimeString(eMap.get("updateTime"));
|
||||||
lawsAsmsDomesticList.add(lawsAsmsDomestic);
|
lawsAsmsDomestic.setFocalPointName(eMap.get("focalPoint"));
|
||||||
|
lawsAsmsDomesticList.add(lawsAsmsDomestic);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (CollectionUtils.isEmpty(lawsAsmsDomesticList)) {
|
if (CollectionUtils.isEmpty(lawsAsmsDomesticList)) {
|
||||||
@@ -205,9 +218,9 @@ public class SynchronizationAsmsService {
|
|||||||
// 代替标准号
|
// 代替标准号
|
||||||
lawsReplacedStandardService.addRelation(lawsAsmsDomestic.getReplaceCode(), lawsAsmsDomestic.getCode(), 1);
|
lawsReplacedStandardService.addRelation(lawsAsmsDomestic.getReplaceCode(), lawsAsmsDomestic.getCode(), 1);
|
||||||
// 标准性质
|
// 标准性质
|
||||||
itemValues = getItemValues(lawsAsmsDomestic.getStandardNature(),
|
/*itemValues = getItemValues(lawsAsmsDomestic.getStandardNature(),
|
||||||
"1695010513489833985", sysDictItemList);
|
"1695010513489833985", sysDictItemList);*/
|
||||||
lawsDomesticStandard.setStandardProperty(itemValues);
|
lawsDomesticStandard.setStandardProperty("SN002");
|
||||||
// 标准状态
|
// 标准状态
|
||||||
itemValues = getItemValues(lawsAsmsDomestic.getStandardStatus(),
|
itemValues = getItemValues(lawsAsmsDomestic.getStandardStatus(),
|
||||||
"1695991936599715842", sysDictItemList);
|
"1695991936599715842", sysDictItemList);
|
||||||
|
|||||||
+1
-1
@@ -9,6 +9,6 @@ public class ProcessDefinitionKey {
|
|||||||
|
|
||||||
private ProcessDefinitionKey() {}
|
private ProcessDefinitionKey() {}
|
||||||
|
|
||||||
public static final String FB_ENTRY_CHANGE = "fb-entry-change";
|
public static final String FB_ENTRY_CHANGE = "fb-entry-change"; // 标准法规入库/变更流程
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+18
@@ -7,7 +7,9 @@ import com.jero.modules.activiti.process.fb.mapper.ProcessFbEntryChangeMapper;
|
|||||||
import com.jero.modules.activiti.process.fb.service.IProcessFbEntryChangeService;
|
import com.jero.modules.activiti.process.fb.service.IProcessFbEntryChangeService;
|
||||||
import com.jero.modules.activiti.process.fb.service.IProcessHandleService;
|
import com.jero.modules.activiti.process.fb.service.IProcessHandleService;
|
||||||
import com.jero.modules.activiti.process.fb.vo.ProcessInfoVO;
|
import com.jero.modules.activiti.process.fb.vo.ProcessInfoVO;
|
||||||
|
import com.jero.modules.laws.common.constant.FieldCommon;
|
||||||
import com.jero.modules.laws.common.constant.ResultCommon;
|
import com.jero.modules.laws.common.constant.ResultCommon;
|
||||||
|
import com.jero.modules.laws.common.service.ILawsCommonService;
|
||||||
import com.jero.modules.laws.common.util.CurrentUserUtil;
|
import com.jero.modules.laws.common.util.CurrentUserUtil;
|
||||||
import com.jero.modules.laws.dataCenter.entity.LawsDataCenterFile;
|
import com.jero.modules.laws.dataCenter.entity.LawsDataCenterFile;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -18,6 +20,7 @@ import com.jero.common.exception.JeroBootException;
|
|||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@@ -35,6 +38,8 @@ public class ProcessFbEntryChangeServiceImpl extends ServiceImpl<ProcessFbEntryC
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IProcessHandleService processHandleService;
|
private IProcessHandleService processHandleService;
|
||||||
|
@Resource
|
||||||
|
private ILawsCommonService lawsCommonService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: liao
|
* @Author: liao
|
||||||
@@ -43,6 +48,8 @@ public class ProcessFbEntryChangeServiceImpl extends ServiceImpl<ProcessFbEntryC
|
|||||||
**/
|
**/
|
||||||
@Override
|
@Override
|
||||||
public void addBusinessInfo(ProcessFbEntryChange processFbEntryChange) {
|
public void addBusinessInfo(ProcessFbEntryChange processFbEntryChange) {
|
||||||
|
// 设置标准编号
|
||||||
|
setStandardNumber(processFbEntryChange);
|
||||||
save(processFbEntryChange);
|
save(processFbEntryChange);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,9 +60,20 @@ public class ProcessFbEntryChangeServiceImpl extends ServiceImpl<ProcessFbEntryC
|
|||||||
**/
|
**/
|
||||||
@Override
|
@Override
|
||||||
public void editBusinessInfo(ProcessFbEntryChange processFbEntryChange) {
|
public void editBusinessInfo(ProcessFbEntryChange processFbEntryChange) {
|
||||||
|
// 设置标准编号
|
||||||
|
setStandardNumber(processFbEntryChange);
|
||||||
updateById(processFbEntryChange);
|
updateById(processFbEntryChange);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void setStandardNumber(ProcessFbEntryChange processFbEntryChange) {
|
||||||
|
Map<String, Object> parameterMap = new HashMap<>();
|
||||||
|
parameterMap.put(FieldCommon.STANDARD_CLASS, processFbEntryChange.getStandardClass());
|
||||||
|
parameterMap.put(FieldCommon.STANDARD_NUMBER_TEMP, processFbEntryChange.getStandardNumberTemp());
|
||||||
|
parameterMap.put(FieldCommon.YEAR_NUMBER, processFbEntryChange.getYearNumber());
|
||||||
|
lawsCommonService.setStandardNumber(parameterMap);
|
||||||
|
processFbEntryChange.setStandardNumber((String) parameterMap.get(FieldCommon.STANDARD_NUMBER));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: liao
|
* @Author: liao
|
||||||
* @Date: 2023/11/2 16:34
|
* @Date: 2023/11/2 16:34
|
||||||
|
|||||||
Reference in New Issue
Block a user