修复:统一企业ID主键并修正匹配回填
parent
1b26af67e7
commit
a580f400e1
|
|
@ -17,8 +17,10 @@ import java.util.stream.Collectors;
|
|||
*
|
||||
* <p>V20260710_02 is idempotent and can be safely rerun after Flyway removes
|
||||
* its failed history entry. V20260722_01 was removed and only its failed
|
||||
* history entry needs cleanup. Other failed migrations are never repaired
|
||||
* automatically so that new database problems still stop application startup.</p>
|
||||
* history entry needs cleanup. V20260801_01 is also idempotent: it normalizes
|
||||
* unmappable legacy company ids to NULL before changing the column type.
|
||||
* Other failed migrations are never repaired automatically so that new
|
||||
* database problems still stop application startup.</p>
|
||||
*/
|
||||
@Configuration
|
||||
public class FlywayRecoveryConfiguration {
|
||||
|
|
@ -26,6 +28,7 @@ public class FlywayRecoveryConfiguration {
|
|||
private static final Logger LOGGER = LoggerFactory.getLogger(FlywayRecoveryConfiguration.class);
|
||||
private static final MigrationVersion RECOVERABLE_VERSION = MigrationVersion.fromVersion("20260710.02");
|
||||
private static final MigrationVersion REMOVED_VERSION = MigrationVersion.fromVersion("20260722.01");
|
||||
private static final MigrationVersion CORPINFO_ID_VERSION = MigrationVersion.fromVersion("20260801.01");
|
||||
|
||||
@Bean
|
||||
public FlywayMigrationStrategy flywayMigrationStrategy() {
|
||||
|
|
@ -57,6 +60,8 @@ public class FlywayRecoveryConfiguration {
|
|||
}
|
||||
|
||||
private boolean isRecoverable(MigrationVersion version) {
|
||||
return RECOVERABLE_VERSION.equals(version) || REMOVED_VERSION.equals(version);
|
||||
return RECOVERABLE_VERSION.equals(version)
|
||||
|| REMOVED_VERSION.equals(version)
|
||||
|| CORPINFO_ID_VERSION.equals(version);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
spring:
|
||||
config:
|
||||
import:
|
||||
- classpath:nacos-prod.yml
|
||||
# - classpath:nacos.yml
|
||||
# - classpath:nacos-prod.yml
|
||||
- classpath:nacos.yml
|
||||
- classpath:kafka.yml
|
||||
- classpath:sdk.yml
|
||||
- classpath:swagger.yml
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ personnel-positioning:
|
|||
send-time-limit-ms: ${PERSONNEL_POSITIONING_WEBSOCKET_LOCATION_SEND_TIME_LIMIT_MS:10000}
|
||||
buffer-size-limit-bytes: ${PERSONNEL_POSITIONING_WEBSOCKET_LOCATION_BUFFER_SIZE_LIMIT_BYTES:524288}
|
||||
mock:
|
||||
enabled: ${PERSONNEL_POSITIONING_WEBSOCKET_LOCATION_MOCK_ENABLED:true}
|
||||
enabled: ${PERSONNEL_POSITIONING_WEBSOCKET_LOCATION_MOCK_ENABLED:false}
|
||||
initial-delay-ms: ${PERSONNEL_POSITIONING_WEBSOCKET_LOCATION_MOCK_INITIAL_DELAY_MS:1000}
|
||||
interval-ms: ${PERSONNEL_POSITIONING_WEBSOCKET_LOCATION_MOCK_INTERVAL_MS:1000}
|
||||
new-person-delay-ms: ${PERSONNEL_POSITIONING_WEBSOCKET_LOCATION_MOCK_NEW_PERSON_DELAY_MS:8000}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
sdk:
|
||||
server:
|
||||
# app-key: 4e11af8a2b224f6fb1c680df53c72457
|
||||
app-key: 9f32c2300c4444a6a2ab8f48a15802a0
|
||||
# app-key: 4e11af8a2b224f6fb1c680df53c72457 #生产
|
||||
app-key: 9f32c2300c4444a6a2ab8f48a15802a0 #测试
|
||||
client:
|
||||
gateway:
|
||||
url: ${common.gateway.network.http.external}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
package com.zcloud.personnel.positioning.config;
|
||||
|
||||
import com.fasterxml.jackson.databind.BeanDescription;
|
||||
import com.fasterxml.jackson.databind.JavaType;
|
||||
import com.fasterxml.jackson.databind.Module;
|
||||
import com.fasterxml.jackson.databind.SerializationConfig;
|
||||
import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||
import com.fasterxml.jackson.databind.ser.BeanPropertyWriter;
|
||||
import com.fasterxml.jackson.databind.ser.BeanSerializerModifier;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Configuration
|
||||
public class CorpinfoIdJacksonConfig {
|
||||
|
||||
@Bean
|
||||
public Module corpinfoIdStringModule() {
|
||||
SimpleModule module = new SimpleModule("CorpinfoIdStringModule");
|
||||
module.setSerializerModifier(new BeanSerializerModifier() {
|
||||
@Override
|
||||
public List<BeanPropertyWriter> changeProperties(SerializationConfig config,
|
||||
BeanDescription beanDesc,
|
||||
List<BeanPropertyWriter> beanProperties) {
|
||||
for (BeanPropertyWriter writer : beanProperties) {
|
||||
JavaType type = writer.getType();
|
||||
if ("corpinfoId".equals(writer.getName())
|
||||
&& (type.hasRawClass(Long.class) || type.hasRawClass(Long.TYPE))) {
|
||||
// 企业主键可能达到 19 位,对外按字符串输出以避免 JavaScript 精度丢失。
|
||||
writer.assignSerializer(ToStringSerializer.instance);
|
||||
}
|
||||
}
|
||||
return beanProperties;
|
||||
}
|
||||
});
|
||||
return module;
|
||||
}
|
||||
}
|
||||
|
|
@ -88,14 +88,14 @@ public class AlarmDisposeRecordController {
|
|||
private void fillCorpinfo(AlarmDisposeRecordAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
cmd.setCorpinfoId(String.valueOf(ssoUser.getCompanyId()));
|
||||
cmd.setCorpinfoId(ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
|
||||
private void fillCorpinfo(AlarmDisposeRecordUpdateCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
cmd.setCorpinfoId(String.valueOf(ssoUser.getCompanyId()));
|
||||
cmd.setCorpinfoId(ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,14 +105,14 @@ public class AlarmRecordController {
|
|||
private void fillCorpinfo(AlarmRecordAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
cmd.setCorpinfoId(String.valueOf(ssoUser.getCompanyId()));
|
||||
cmd.setCorpinfoId(ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
|
||||
private void fillCorpinfo(AlarmRecordUpdateCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
cmd.setCorpinfoId(String.valueOf(ssoUser.getCompanyId()));
|
||||
cmd.setCorpinfoId(ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -88,14 +88,14 @@ public class AlarmRecordTargetController {
|
|||
private void fillCorpinfo(AlarmRecordTargetAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
cmd.setCorpinfoId(String.valueOf(ssoUser.getCompanyId()));
|
||||
cmd.setCorpinfoId(ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
|
||||
private void fillCorpinfo(AlarmRecordTargetUpdateCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
cmd.setCorpinfoId(String.valueOf(ssoUser.getCompanyId()));
|
||||
cmd.setCorpinfoId(ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,14 +117,14 @@ public class AlarmRuleController {
|
|||
private void fillCorpinfo(AlarmRuleAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (cmd.getCorpinfoId() == null && ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
cmd.setCorpinfoId(String.valueOf(ssoUser.getCompanyId()));
|
||||
cmd.setCorpinfoId(ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
|
||||
private void fillCorpinfo(AlarmRuleUpdateCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (cmd.getCorpinfoId() == null && ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
cmd.setCorpinfoId(String.valueOf(ssoUser.getCompanyId()));
|
||||
cmd.setCorpinfoId(ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,14 +88,14 @@ public class AlarmRuleFenceRelController {
|
|||
private void fillCorpinfo(AlarmRuleFenceRelAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
cmd.setCorpinfoId(String.valueOf(ssoUser.getCompanyId()));
|
||||
cmd.setCorpinfoId(ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
|
||||
private void fillCorpinfo(AlarmRuleFenceRelUpdateCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
cmd.setCorpinfoId(String.valueOf(ssoUser.getCompanyId()));
|
||||
cmd.setCorpinfoId(ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,14 +88,14 @@ public class AlarmRuleItemController {
|
|||
private void fillCorpinfo(AlarmRuleItemAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
cmd.setCorpinfoId(String.valueOf(ssoUser.getCompanyId()));
|
||||
cmd.setCorpinfoId(ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
|
||||
private void fillCorpinfo(AlarmRuleItemUpdateCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
cmd.setCorpinfoId(String.valueOf(ssoUser.getCompanyId()));
|
||||
cmd.setCorpinfoId(ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public class AreaController {
|
|||
|
||||
@ApiOperation("可选区域选项")
|
||||
@GetMapping("/options")
|
||||
public MultiResponse<OptionCO> options(@RequestParam(required = false) String corpinfoId,
|
||||
public MultiResponse<OptionCO> options(@RequestParam(required = false) Long corpinfoId,
|
||||
@RequestParam(required = false) String keyword) {
|
||||
return MultiResponse.of(areaService.listOptions(corpinfoId, keyword));
|
||||
}
|
||||
|
|
@ -99,14 +99,14 @@ public class AreaController {
|
|||
private void fillCorpinfo(AreaAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
cmd.setCorpinfoId(String.valueOf(ssoUser.getCompanyId()));
|
||||
cmd.setCorpinfoId(ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
|
||||
private void fillCorpinfo(AreaUpdateCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
cmd.setCorpinfoId(String.valueOf(ssoUser.getCompanyId()));
|
||||
cmd.setCorpinfoId(ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,11 +53,11 @@ public class FenceController {
|
|||
|
||||
@ApiOperation("公司区域详情")
|
||||
@GetMapping("/company-area")
|
||||
public SingleResponse<FenceCompanyAreaCO> getCompanyArea(@RequestParam(required = false) String corpinfoId,
|
||||
public SingleResponse<FenceCompanyAreaCO> getCompanyArea(@RequestParam(required = false) Long corpinfoId,
|
||||
@RequestParam(required = false) String corpinfoName) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (corpinfoId == null && ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
corpinfoId = String.valueOf(ssoUser.getCompanyId());
|
||||
corpinfoId = ssoUser.getCompanyId();
|
||||
}
|
||||
return SingleResponse.of(fenceService.queryCompanyArea(corpinfoId, corpinfoName));
|
||||
}
|
||||
|
|
@ -139,21 +139,21 @@ public class FenceController {
|
|||
private void fillCorpinfo(FenceAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (cmd.getCorpinfoId() == null && ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
cmd.setCorpinfoId(String.valueOf(ssoUser.getCompanyId()));
|
||||
cmd.setCorpinfoId(ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
|
||||
private void fillCorpinfo(FenceUpdateCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (cmd.getCorpinfoId() == null && ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
cmd.setCorpinfoId(String.valueOf(ssoUser.getCompanyId()));
|
||||
cmd.setCorpinfoId(ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
|
||||
private void fillCorpinfo(FenceCompanyAreaSaveCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (cmd.getCorpinfoId() == null && ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
cmd.setCorpinfoId(String.valueOf(ssoUser.getCompanyId()));
|
||||
cmd.setCorpinfoId(ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,14 +88,14 @@ public class FencePointController {
|
|||
private void fillCorpinfo(FencePointAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
cmd.setCorpinfoId(String.valueOf(ssoUser.getCompanyId()));
|
||||
cmd.setCorpinfoId(ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
|
||||
private void fillCorpinfo(FencePointUpdateCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
cmd.setCorpinfoId(String.valueOf(ssoUser.getCompanyId()));
|
||||
cmd.setCorpinfoId(ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,14 +88,14 @@ public class OpenapiConfigController {
|
|||
private void fillCorpinfo(OpenapiConfigAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
cmd.setCorpinfoId(String.valueOf(ssoUser.getCompanyId()));
|
||||
cmd.setCorpinfoId(ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
|
||||
private void fillCorpinfo(OpenapiConfigUpdateCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
cmd.setCorpinfoId(String.valueOf(ssoUser.getCompanyId()));
|
||||
cmd.setCorpinfoId(ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,14 +88,14 @@ public class SyncLogController {
|
|||
private void fillCorpinfo(SyncLogAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
cmd.setCorpinfoId(String.valueOf(ssoUser.getCompanyId()));
|
||||
cmd.setCorpinfoId(ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
|
||||
private void fillCorpinfo(SyncLogUpdateCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
cmd.setCorpinfoId(String.valueOf(ssoUser.getCompanyId()));
|
||||
cmd.setCorpinfoId(ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,14 +88,14 @@ public class SyncTaskController {
|
|||
private void fillCorpinfo(SyncTaskAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
cmd.setCorpinfoId(String.valueOf(ssoUser.getCompanyId()));
|
||||
cmd.setCorpinfoId(ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
|
||||
private void fillCorpinfo(SyncTaskUpdateCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
cmd.setCorpinfoId(String.valueOf(ssoUser.getCompanyId()));
|
||||
cmd.setCorpinfoId(ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,14 +88,14 @@ public class TerminalBindController {
|
|||
private void fillCorpinfo(TerminalBindAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
cmd.setCorpinfoId(String.valueOf(ssoUser.getCompanyId()));
|
||||
cmd.setCorpinfoId(ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
|
||||
private void fillCorpinfo(TerminalBindUpdateCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
cmd.setCorpinfoId(String.valueOf(ssoUser.getCompanyId()));
|
||||
cmd.setCorpinfoId(ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -208,28 +208,28 @@ public class TerminalController {
|
|||
private void fillCorpinfo(TerminalAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
cmd.setCorpinfoId(String.valueOf(ssoUser.getCompanyId()));
|
||||
cmd.setCorpinfoId(ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
|
||||
private void fillCorpinfo(TerminalUpdateCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
cmd.setCorpinfoId(String.valueOf(ssoUser.getCompanyId()));
|
||||
cmd.setCorpinfoId(ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
|
||||
private void fillCorpinfo(TerminalCardSaveCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (cmd.getCorpinfoId() == null && ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
cmd.setCorpinfoId(String.valueOf(ssoUser.getCompanyId()));
|
||||
cmd.setCorpinfoId(ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
|
||||
private void fillCorpinfo(TerminalAppSaveCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (cmd.getCorpinfoId() == null && ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
cmd.setCorpinfoId(String.valueOf(ssoUser.getCompanyId()));
|
||||
cmd.setCorpinfoId(ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ public class MockPersonLocationPublisher {
|
|||
BiPersonLocationCO location = baseLocation(
|
||||
"Codex测试人员A", "CODEX-STAFF-001", "CODEX-TERMINAL-001");
|
||||
location.setCompanyName("Codex测试东港公司");
|
||||
location.setCorpinfoId("CODEX-CORP-EAST");
|
||||
location.setCorpinfoId(1001L);
|
||||
location.setCorpinfoName("Codex测试东港公司");
|
||||
location.setOrgCode("CODEX-ORG-EAST");
|
||||
location.setOrgName("Codex测试东港组织");
|
||||
|
|
@ -125,7 +125,7 @@ public class MockPersonLocationPublisher {
|
|||
BiPersonLocationCO location = baseLocation(
|
||||
"Codex测试人员B", "CODEX-STAFF-002", "CODEX-TERMINAL-002");
|
||||
location.setCompanyName("Codex测试西港公司");
|
||||
location.setCorpinfoId("CODEX-CORP-WEST");
|
||||
location.setCorpinfoId(1002L);
|
||||
location.setCorpinfoName("Codex测试西港公司");
|
||||
location.setOrgCode("CODEX-ORG-WEST");
|
||||
location.setOrgName("Codex测试西港组织");
|
||||
|
|
@ -142,7 +142,7 @@ public class MockPersonLocationPublisher {
|
|||
BiPersonLocationCO location = baseLocation(
|
||||
"Codex测试新增人员C", "CODEX-STAFF-003", "CODEX-TERMINAL-003");
|
||||
location.setCompanyName("Codex测试港区公司");
|
||||
location.setCorpinfoId("CODEX-CORP-HARBOR");
|
||||
location.setCorpinfoId(1003L);
|
||||
location.setCorpinfoName("Codex测试港区公司");
|
||||
location.setOrgCode("CODEX-ORG-HARBOR");
|
||||
location.setOrgName("Codex测试港区组织");
|
||||
|
|
|
|||
|
|
@ -229,13 +229,16 @@ public class AlarmRecordFindsPullService {
|
|||
record.getFirstIdCardNo(), record.getFirstStaffNoSnapshot(),
|
||||
record.getFirstStaffNameSnapshot(), terminalNoAt(row.path("terminalNoList"), 0));
|
||||
if (corpMatch == null) {
|
||||
corpMatch = findsCorpMappingService.resolve(config.getConfigCode(), config.getCorpinfoId(),
|
||||
config.getCorpinfoName(), null, null);
|
||||
corpMatch = config.getCorpinfoId() == null
|
||||
? findsCorpMappingService.resolve(config.getConfigCode(), null,
|
||||
config.getCorpinfoName(), null, null)
|
||||
: new FindsCorpMappingService.CorpMatch(config.getCorpinfoId(), config.getCorpinfoName(),
|
||||
null, null, "CONFIG");
|
||||
}
|
||||
if (corpMatch != null) {
|
||||
record.setCorpinfoId(corpMatch.getCorpinfoId());
|
||||
record.setCorpinfoName(corpMatch.getCorpinfoName());
|
||||
} else if ("0".equals(record.getCorpinfoId())) {
|
||||
} else if (Long.valueOf(0L).equals(record.getCorpinfoId())) {
|
||||
record.setCorpinfoId(null);
|
||||
record.setCorpinfoName(null);
|
||||
}
|
||||
|
|
@ -346,7 +349,7 @@ public class AlarmRecordFindsPullService {
|
|||
task.setTaskCode(taskCode);
|
||||
task.setTaskName("FindS告警增量拉取-" + configIdentity(config));
|
||||
task.setBizType("ALARM");
|
||||
task.setCorpinfoId(config.getCorpinfoId() == null ? "0" : config.getCorpinfoId());
|
||||
task.setCorpinfoId(config.getCorpinfoId());
|
||||
task.setCorpinfoName(config.getCorpinfoName());
|
||||
task.setSyncDirection("PULL");
|
||||
task.setCronExpr(TASK_CRON);
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ public class AlarmRuleConfigPersistence {
|
|||
AlarmRuleFenceRelDO rel = new AlarmRuleFenceRelDO();
|
||||
BeanUtils.copyProperties(relCmd, rel);
|
||||
rel.setRuleId(rule.getId());
|
||||
rel.setCorpinfoId(defaultString(rel.getCorpinfoId(), rule.getCorpinfoId()));
|
||||
rel.setCorpinfoId(defaultLong(rel.getCorpinfoId(), rule.getCorpinfoId()));
|
||||
rel.setCorpinfoName(defaultIfBlank(rel.getCorpinfoName(), rule.getCorpinfoName()));
|
||||
rel.setRelType(defaultIfBlank(rel.getRelType(), REL_EFFECTIVE));
|
||||
fillFenceSnapshot(rel);
|
||||
|
|
@ -142,7 +142,7 @@ public class AlarmRuleConfigPersistence {
|
|||
AlarmRuleItemDO item = new AlarmRuleItemDO();
|
||||
BeanUtils.copyProperties(itemCmd, item);
|
||||
item.setRuleId(rule.getId());
|
||||
item.setCorpinfoId(defaultString(item.getCorpinfoId(), rule.getCorpinfoId()));
|
||||
item.setCorpinfoId(defaultLong(item.getCorpinfoId(), rule.getCorpinfoId()));
|
||||
item.setCorpinfoName(defaultIfBlank(item.getCorpinfoName(), rule.getCorpinfoName()));
|
||||
if (item.getLevel() == null) {
|
||||
item.setLevel(1);
|
||||
|
|
@ -192,7 +192,7 @@ public class AlarmRuleConfigPersistence {
|
|||
rel.setFenceName(fence.getFenceName());
|
||||
rel.setFindsFenceId(fence.getFindsFenceId());
|
||||
rel.setRelType(REL_EFFECTIVE);
|
||||
rel.setCorpinfoId(defaultString(rule.getCorpinfoId(), fence.getCorpinfoId()));
|
||||
rel.setCorpinfoId(defaultLong(rule.getCorpinfoId(), fence.getCorpinfoId()));
|
||||
rel.setCorpinfoName(defaultIfBlank(rule.getCorpinfoName(), fence.getCorpinfoName()));
|
||||
alarmRuleFenceRelRepository.save(rel);
|
||||
}
|
||||
|
|
@ -208,7 +208,7 @@ public class AlarmRuleConfigPersistence {
|
|||
}
|
||||
rel.setFenceName(defaultIfBlank(rel.getFenceName(), fence.getFenceName()));
|
||||
rel.setFindsFenceId(defaultLong(rel.getFindsFenceId(), fence.getFindsFenceId()));
|
||||
rel.setCorpinfoId(defaultString(rel.getCorpinfoId(), fence.getCorpinfoId()));
|
||||
rel.setCorpinfoId(defaultLong(rel.getCorpinfoId(), fence.getCorpinfoId()));
|
||||
rel.setCorpinfoName(defaultIfBlank(rel.getCorpinfoName(), fence.getCorpinfoName()));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,12 +62,12 @@ public class AlarmRuleFindsPullService {
|
|||
private final ObjectMapper objectMapper;
|
||||
|
||||
public void refreshForCompanyStats(AlarmRuleCompanyPageQry qry) {
|
||||
String companyId = qry == null ? null : qry.getEqCorpinfoId();
|
||||
Long companyId = qry == null ? null : qry.getEqCorpinfoId();
|
||||
refreshConfigs(resolveConfigs(companyId), null);
|
||||
}
|
||||
|
||||
public void refreshForList(AlarmRulePageQry qry) {
|
||||
String companyId = qry == null ? null : qry.getEqCorpinfoId();
|
||||
Long companyId = qry == null ? null : qry.getEqCorpinfoId();
|
||||
String alarmCode = qry == null ? null : qry.getEqAlarmCode();
|
||||
refreshConfigs(resolveConfigs(companyId), alarmCode);
|
||||
}
|
||||
|
|
@ -178,9 +178,12 @@ public class AlarmRuleFindsPullService {
|
|||
FindsCorpMappingService.CorpMatch mappedCorp = validCorp(scopeFence)
|
||||
? new FindsCorpMappingService.CorpMatch(scopeFence.getCorpinfoId(), scopeFence.getCorpinfoName(),
|
||||
null, null, "FENCE")
|
||||
: findsCorpMappingService.resolve(config.getConfigCode(), config.getCorpinfoId(),
|
||||
config.getCorpinfoName(), null, null);
|
||||
String corpinfoId = mappedCorp == null ? validCorpinfoId(rule.getCorpinfoId()) : mappedCorp.getCorpinfoId();
|
||||
: config.getCorpinfoId() == null
|
||||
? findsCorpMappingService.resolve(config.getConfigCode(), null,
|
||||
config.getCorpinfoName(), null, null)
|
||||
: new FindsCorpMappingService.CorpMatch(config.getCorpinfoId(), config.getCorpinfoName(),
|
||||
null, null, "CONFIG");
|
||||
Long corpinfoId = mappedCorp == null ? validCorpinfoId(rule.getCorpinfoId()) : mappedCorp.getCorpinfoId();
|
||||
String corpinfoName = mappedCorp == null ? rule.getCorpinfoName() : mappedCorp.getCorpinfoName();
|
||||
rule.setCorpinfoId(corpinfoId);
|
||||
rule.setCorpinfoName(corpinfoName);
|
||||
|
|
@ -253,7 +256,7 @@ public class AlarmRuleFindsPullService {
|
|||
if (fence != null) {
|
||||
rel.setFenceId(fence.getId());
|
||||
rel.setFenceName(fence.getFenceName());
|
||||
if (!StringUtils.hasText(rel.getCorpinfoId()) || "0".equals(rel.getCorpinfoId())) {
|
||||
if (rel.getCorpinfoId() == null || Long.valueOf(0L).equals(rel.getCorpinfoId())) {
|
||||
rel.setCorpinfoId(fence.getCorpinfoId());
|
||||
rel.setCorpinfoName(fence.getCorpinfoName());
|
||||
}
|
||||
|
|
@ -264,8 +267,8 @@ public class AlarmRuleFindsPullService {
|
|||
return fence != null && validCorpinfoId(fence.getCorpinfoId()) != null;
|
||||
}
|
||||
|
||||
private String validCorpinfoId(String corpinfoId) {
|
||||
return StringUtils.hasText(corpinfoId) && !"0".equals(corpinfoId) ? corpinfoId : null;
|
||||
private Long validCorpinfoId(Long corpinfoId) {
|
||||
return corpinfoId != null && corpinfoId.longValue() != 0L ? corpinfoId : null;
|
||||
}
|
||||
|
||||
private FenceDO findFirstScopeFence(JsonNode scope) {
|
||||
|
|
@ -330,12 +333,12 @@ public class AlarmRuleFindsPullService {
|
|||
}
|
||||
}
|
||||
|
||||
private List<OpenapiConfigDO> resolveConfigs(String requestedCorpinfoId) {
|
||||
private List<OpenapiConfigDO> resolveConfigs(Long requestedCorpinfoId) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
String corpinfoId = requestedCorpinfoId != null
|
||||
Long corpinfoId = requestedCorpinfoId != null
|
||||
? requestedCorpinfoId
|
||||
: (ssoUser == null || ssoUser.getCompanyId() == null
|
||||
? null : String.valueOf(ssoUser.getCompanyId()));
|
||||
? null : ssoUser.getCompanyId());
|
||||
QueryWrapper<OpenapiConfigDO> queryWrapper = baseConfigQuery();
|
||||
if (corpinfoId != null) {
|
||||
queryWrapper.eq("corpinfo_id", corpinfoId);
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ public class FenceCompanyAreaSaveExe {
|
|||
return map(area, fence);
|
||||
}
|
||||
|
||||
public FenceCompanyAreaCO query(String corpinfoId, String corpinfoName) {
|
||||
public FenceCompanyAreaCO query(Long corpinfoId, String corpinfoName) {
|
||||
AreaDO area = queryArea(null, corpinfoId, corpinfoName);
|
||||
FenceDO fence = null;
|
||||
if (area != null && area.getBindFenceId() != null) {
|
||||
|
|
@ -142,7 +142,7 @@ public class FenceCompanyAreaSaveExe {
|
|||
return fence;
|
||||
}
|
||||
|
||||
private AreaDO queryArea(Long areaId, String corpinfoId, String corpinfoName) {
|
||||
private AreaDO queryArea(Long areaId, Long corpinfoId, String corpinfoName) {
|
||||
if (areaId != null) {
|
||||
return areaRepository.getById(areaId);
|
||||
}
|
||||
|
|
@ -155,7 +155,7 @@ public class FenceCompanyAreaSaveExe {
|
|||
return areaRepository.getOne(queryWrapper, false);
|
||||
}
|
||||
|
||||
private FenceDO queryFence(Long fenceId, String corpinfoId, String corpinfoName) {
|
||||
private FenceDO queryFence(Long fenceId, Long corpinfoId, String corpinfoName) {
|
||||
if (fenceId != null) {
|
||||
return fenceRepository.getById(fenceId);
|
||||
}
|
||||
|
|
@ -168,7 +168,7 @@ public class FenceCompanyAreaSaveExe {
|
|||
return fenceRepository.getOne(queryWrapper, false);
|
||||
}
|
||||
|
||||
private <T> void applyCompany(QueryWrapper<T> queryWrapper, String corpinfoId, String corpinfoName) {
|
||||
private <T> void applyCompany(QueryWrapper<T> queryWrapper, Long corpinfoId, String corpinfoName) {
|
||||
if (corpinfoId != null) {
|
||||
queryWrapper.eq("corpinfo_id", corpinfoId);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ public class FenceFindsPullService {
|
|||
|
||||
public FenceSyncCO sync(FenceSyncCmd cmd) {
|
||||
FenceSyncCmd command = cmd == null ? new FenceSyncCmd() : cmd;
|
||||
String companyId = command.getCorpinfoId() == null ? currentCompanyId() : command.getCorpinfoId();
|
||||
Long companyId = command.getCorpinfoId() == null ? currentCompanyId() : command.getCorpinfoId();
|
||||
if (command.getCorpinfoId() == null && companyId != null) {
|
||||
command.setCorpinfoId(companyId);
|
||||
}
|
||||
|
|
@ -488,14 +488,14 @@ public class FenceFindsPullService {
|
|||
return value == null || value < 1 ? defaultValue : value;
|
||||
}
|
||||
|
||||
private String currentCompanyId() {
|
||||
private Long currentCompanyId() {
|
||||
SSOUser currentUser = AuthContext.getCurrentUser();
|
||||
return currentUser == null || currentUser.getCompanyId() == null
|
||||
? null : String.valueOf(currentUser.getCompanyId());
|
||||
? null : currentUser.getCompanyId();
|
||||
}
|
||||
|
||||
private static class CorpInfo {
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
private String corpName;
|
||||
private String orgCode;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public class FindsCorpMappingService {
|
|||
OrgMatchSnapshotDO saved = StringUtils.hasText(corpName) || StringUtils.hasText(departmentName)
|
||||
? orgMatchRepository.findMatched(configCode, emptyIfBlank(corpName), emptyIfBlank(departmentName))
|
||||
: null;
|
||||
if (saved != null) {
|
||||
if (saved != null && saved.getLocalCorpinfoId() != null) {
|
||||
orgMatchRepository.touch(configCode, emptyIfBlank(corpName),
|
||||
emptyIfBlank(departmentName), LocalDateTime.now());
|
||||
return fromSaved(saved);
|
||||
|
|
@ -68,8 +68,8 @@ public class FindsCorpMappingService {
|
|||
return resolved;
|
||||
}
|
||||
|
||||
private MatchAttempt queryCorp(String matchType, String key, String value) {
|
||||
if (!StringUtils.hasText(value)) {
|
||||
private MatchAttempt queryCorp(String matchType, String key, Object value) {
|
||||
if (value == null || value instanceof String && !StringUtils.hasText((String) value)) {
|
||||
return null;
|
||||
}
|
||||
Map<String, Object> params = new LinkedHashMap<>();
|
||||
|
|
@ -95,9 +95,9 @@ public class FindsCorpMappingService {
|
|||
}
|
||||
|
||||
private MatchAttempt distinct(String matchType, List<CorpMatch> rows) {
|
||||
Map<String, CorpMatch> distinct = new LinkedHashMap<>();
|
||||
Map<Long, CorpMatch> distinct = new LinkedHashMap<>();
|
||||
for (CorpMatch row : rows) {
|
||||
if (row != null && StringUtils.hasText(row.corpinfoId)) {
|
||||
if (row != null && row.corpinfoId != null) {
|
||||
distinct.putIfAbsent(row.corpinfoId, row);
|
||||
}
|
||||
}
|
||||
|
|
@ -130,8 +130,15 @@ public class FindsCorpMappingService {
|
|||
return attempt != null && !attempt.candidates.isEmpty();
|
||||
}
|
||||
|
||||
private String validCorpinfoId(String value) {
|
||||
return StringUtils.hasText(value) && !"0".equals(value) ? value : null;
|
||||
private Long validCorpinfoId(String value) {
|
||||
if (!StringUtils.hasText(value) || "0".equals(value)) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return Long.valueOf(value);
|
||||
} catch (NumberFormatException ignored) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private String clean(String value) {
|
||||
|
|
@ -152,13 +159,13 @@ public class FindsCorpMappingService {
|
|||
|
||||
@Getter
|
||||
public static class CorpMatch {
|
||||
private final String corpinfoId;
|
||||
private final Long corpinfoId;
|
||||
private final String corpinfoName;
|
||||
private final Long departmentId;
|
||||
private final String departmentName;
|
||||
private final String matchType;
|
||||
|
||||
public CorpMatch(String corpinfoId, String corpinfoName, Long departmentId,
|
||||
public CorpMatch(Long corpinfoId, String corpinfoName, Long departmentId,
|
||||
String departmentName, String matchType) {
|
||||
this.corpinfoId = corpinfoId;
|
||||
this.corpinfoName = corpinfoName;
|
||||
|
|
|
|||
|
|
@ -59,9 +59,9 @@ public class FindsPersonCorpResolver {
|
|||
}
|
||||
|
||||
private Resolution resolveRows(List<CorpInfoSnapshotDO> rows, String matchType) {
|
||||
Map<String, CorpInfoSnapshotDO> distinct = new LinkedHashMap<>();
|
||||
Map<Long, CorpInfoSnapshotDO> distinct = new LinkedHashMap<>();
|
||||
for (CorpInfoSnapshotDO row : rows) {
|
||||
if (row != null && StringUtils.hasText(row.getCorpinfoId())) {
|
||||
if (row != null && row.getCorpinfoId() != null) {
|
||||
distinct.putIfAbsent(row.getCorpinfoId(), row);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -165,10 +165,10 @@ public class TerminalAppSyncExe {
|
|||
terminal.setDeviceType(DEVICE_TYPE_APP);
|
||||
terminal.setAppAccount(appAccount);
|
||||
terminal.setCorpinfoId(corpInfo == null
|
||||
? firstText(cmd.getCorpinfoId(), keepExistingCorp ? terminal.getCorpinfoId() : null)
|
||||
? firstLong(cmd.getCorpinfoId(), keepExistingCorp ? terminal.getCorpinfoId() : null)
|
||||
: corpInfo.corpinfoId);
|
||||
terminal.setCorpinfoName(firstText(cmd.getCorpinfoName(), corpInfo == null ? null : corpInfo.corpName,
|
||||
keepExistingCorp && StringUtils.hasText(terminal.getCorpinfoId()) ? terminal.getCorpinfoName() : null,
|
||||
keepExistingCorp && terminal.getCorpinfoId() != null ? terminal.getCorpinfoName() : null,
|
||||
textValue(child(row, "corpinfoName")), textValue(child(row, "corpName")),
|
||||
textValue(child(row, "orgName")), terminal.getCorpinfoName()));
|
||||
terminal.setOrgCode(firstText(textValue(child(row, "orgCode")), textValue(child(row, "orgId")),
|
||||
|
|
@ -194,6 +194,7 @@ public class TerminalAppSyncExe {
|
|||
terminalRepository.save(terminal);
|
||||
} else {
|
||||
terminalRepository.updateById(terminal);
|
||||
terminalRepository.updateCorpInfo(terminal.getId(), terminal.getCorpinfoId(), terminal.getCorpinfoName());
|
||||
}
|
||||
|
||||
PersonSnapshot person = personFromTrack(track);
|
||||
|
|
@ -214,7 +215,7 @@ public class TerminalAppSyncExe {
|
|||
return false;
|
||||
}
|
||||
PersonSnapshot normalized = mergePerson(person, resolvePerson(person.idCardNo, person.staffNo, person.staffName));
|
||||
if (StringUtils.hasText(normalized.corpinfoId)) {
|
||||
if (normalized.corpinfoId != null) {
|
||||
terminal.setCorpinfoId(normalized.corpinfoId);
|
||||
terminal.setCorpinfoName(normalized.corpinfoName);
|
||||
terminal.setOrgName(firstText(normalized.corpinfoName, terminal.getOrgName()));
|
||||
|
|
@ -231,6 +232,7 @@ public class TerminalAppSyncExe {
|
|||
active.setFindsTerminalId(firstLong(terminal.getFindsTerminalId(), active.getFindsTerminalId()));
|
||||
markBindingSyncStatus(active, callFinds, now);
|
||||
terminalBindRepository.updateById(active);
|
||||
terminalBindRepository.updateCorpInfo(active.getId(), active.getCorpinfoId(), active.getCorpinfoName());
|
||||
updateTerminalBindIdCardNo(terminal, active.getIdCardNo());
|
||||
return true;
|
||||
}
|
||||
|
|
@ -361,7 +363,7 @@ public class TerminalAppSyncExe {
|
|||
return mergePerson(person, fallback);
|
||||
}
|
||||
|
||||
private CorpInfo resolveCorpInfo(String corpinfoId, String corpinfoName, String orgCode, String orgName) {
|
||||
private CorpInfo resolveCorpInfo(Long corpinfoId, String corpinfoName, String orgCode, String orgName) {
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
if (corpinfoId != null) {
|
||||
params.put("corpinfoId", corpinfoId);
|
||||
|
|
@ -392,7 +394,7 @@ public class TerminalAppSyncExe {
|
|||
}
|
||||
|
||||
private boolean shouldKeepExistingCorp(TerminalDO terminal, String remoteOrgName, String remoteOrgCode) {
|
||||
if (!StringUtils.hasText(terminal.getCorpinfoId())) {
|
||||
if (terminal.getCorpinfoId() == null) {
|
||||
return false;
|
||||
}
|
||||
if (!StringUtils.hasText(remoteOrgName) && !StringUtils.hasText(remoteOrgCode)) {
|
||||
|
|
@ -508,7 +510,7 @@ public class TerminalAppSyncExe {
|
|||
first.staffNo = firstText(first.staffNo, second.staffNo);
|
||||
first.staffName = firstText(first.staffName, second.staffName);
|
||||
first.mobileNo = firstText(first.mobileNo, second.mobileNo);
|
||||
first.corpinfoId = firstText(first.corpinfoId, second.corpinfoId);
|
||||
first.corpinfoId = firstLong(first.corpinfoId, second.corpinfoId);
|
||||
first.corpinfoName = firstText(first.corpinfoName, second.corpinfoName);
|
||||
first.findsTrackId = firstLong(first.findsTrackId, second.findsTrackId);
|
||||
return first;
|
||||
|
|
@ -735,13 +737,13 @@ public class TerminalAppSyncExe {
|
|||
private String staffNo;
|
||||
private String staffName;
|
||||
private String mobileNo;
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
private String corpinfoName;
|
||||
private Long findsTrackId;
|
||||
}
|
||||
|
||||
private static class CorpInfo {
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
private String corpName;
|
||||
private String creditCode;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,14 +91,16 @@ public class TerminalBindingService {
|
|||
return mergePerson(person, fallback);
|
||||
}
|
||||
|
||||
public CorpInfoSnapshotDO resolveCorpInfo(String corpinfoId, String corpinfoName,
|
||||
public CorpInfoSnapshotDO resolveCorpInfo(Long corpinfoId, String corpinfoName,
|
||||
String orgCode, String orgName) {
|
||||
if (corpinfoId == null && !StringUtils.hasText(orgCode)
|
||||
&& !StringUtils.hasText(corpinfoName) && !StringUtils.hasText(orgName)) {
|
||||
return null;
|
||||
}
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
putText(params, "corpinfoId", corpinfoId);
|
||||
if (corpinfoId != null) {
|
||||
params.put("corpinfoId", corpinfoId);
|
||||
}
|
||||
putText(params, "orgCode", orgCode);
|
||||
putText(params, "corpinfoName", firstText(corpinfoName, orgName));
|
||||
return terminalRepository.findCorpInfo(params);
|
||||
|
|
@ -244,7 +246,7 @@ public class TerminalBindingService {
|
|||
result.setStaffNo(firstText(preferred.getStaffNo(), fallback.getStaffNo()));
|
||||
result.setStaffName(firstText(preferred.getStaffName(), fallback.getStaffName()));
|
||||
result.setMobileNo(firstText(preferred.getMobileNo(), fallback.getMobileNo()));
|
||||
result.setCorpinfoId(firstText(preferred.getCorpinfoId(), fallback.getCorpinfoId()));
|
||||
result.setCorpinfoId(firstLong(preferred.getCorpinfoId(), fallback.getCorpinfoId()));
|
||||
result.setCorpinfoName(firstText(preferred.getCorpinfoName(), fallback.getCorpinfoName()));
|
||||
result.setFindsTrackId(firstLong(preferred.getFindsTrackId(), fallback.getFindsTrackId()));
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -161,10 +161,10 @@ public class TerminalCardSyncExe {
|
|||
terminal.setSimCardNo(firstText(textValue(child(row, "simCardNo")), textValue(child(row, "simNo")),
|
||||
terminal.getSimCardNo()));
|
||||
terminal.setCorpinfoId(corpInfo == null
|
||||
? firstText(cmd.getCorpinfoId(), keepExistingCorp ? terminal.getCorpinfoId() : null)
|
||||
? firstLong(cmd.getCorpinfoId(), keepExistingCorp ? terminal.getCorpinfoId() : null)
|
||||
: corpInfo.corpinfoId);
|
||||
terminal.setCorpinfoName(firstText(cmd.getCorpinfoName(), corpInfo == null ? null : corpInfo.corpName,
|
||||
keepExistingCorp && StringUtils.hasText(terminal.getCorpinfoId()) ? terminal.getCorpinfoName() : null,
|
||||
keepExistingCorp && terminal.getCorpinfoId() != null ? terminal.getCorpinfoName() : null,
|
||||
textValue(child(row, "corpinfoName")), textValue(child(row, "corpName")),
|
||||
textValue(child(row, "orgName")), terminal.getCorpinfoName()));
|
||||
terminal.setOrgCode(firstText(textValue(child(row, "orgCode")), textValue(child(row, "orgId")),
|
||||
|
|
@ -190,6 +190,7 @@ public class TerminalCardSyncExe {
|
|||
terminalRepository.save(terminal);
|
||||
} else {
|
||||
terminalRepository.updateById(terminal);
|
||||
terminalRepository.updateCorpInfo(terminal.getId(), terminal.getCorpinfoId(), terminal.getCorpinfoName());
|
||||
}
|
||||
|
||||
PersonSnapshot person = personFromTrack(track);
|
||||
|
|
@ -210,7 +211,7 @@ public class TerminalCardSyncExe {
|
|||
return false;
|
||||
}
|
||||
PersonSnapshot normalized = mergePerson(person, resolvePerson(person.idCardNo, person.staffNo, person.staffName));
|
||||
if (StringUtils.hasText(normalized.corpinfoId)) {
|
||||
if (normalized.corpinfoId != null) {
|
||||
terminal.setCorpinfoId(normalized.corpinfoId);
|
||||
terminal.setCorpinfoName(normalized.corpinfoName);
|
||||
terminal.setOrgName(firstText(normalized.corpinfoName, terminal.getOrgName()));
|
||||
|
|
@ -227,6 +228,7 @@ public class TerminalCardSyncExe {
|
|||
active.setFindsTerminalId(firstLong(terminal.getFindsTerminalId(), active.getFindsTerminalId()));
|
||||
markBindingSyncStatus(active, callFinds, now);
|
||||
terminalBindRepository.updateById(active);
|
||||
terminalBindRepository.updateCorpInfo(active.getId(), active.getCorpinfoId(), active.getCorpinfoName());
|
||||
updateTerminalBindIdCardNo(terminal, active.getIdCardNo());
|
||||
return true;
|
||||
}
|
||||
|
|
@ -342,7 +344,7 @@ public class TerminalCardSyncExe {
|
|||
return mergePerson(person, fallback);
|
||||
}
|
||||
|
||||
private CorpInfo resolveCorpInfo(String corpinfoId, String corpinfoName, String orgCode, String orgName) {
|
||||
private CorpInfo resolveCorpInfo(Long corpinfoId, String corpinfoName, String orgCode, String orgName) {
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
if (corpinfoId != null) {
|
||||
params.put("corpinfoId", corpinfoId);
|
||||
|
|
@ -374,7 +376,7 @@ public class TerminalCardSyncExe {
|
|||
}
|
||||
|
||||
private boolean shouldKeepExistingCorp(TerminalDO terminal, String remoteOrgName, String remoteOrgCode) {
|
||||
if (!StringUtils.hasText(terminal.getCorpinfoId())) {
|
||||
if (terminal.getCorpinfoId() == null) {
|
||||
return false;
|
||||
}
|
||||
if (!StringUtils.hasText(remoteOrgName) && !StringUtils.hasText(remoteOrgCode)) {
|
||||
|
|
@ -470,7 +472,7 @@ public class TerminalCardSyncExe {
|
|||
first.staffNo = firstText(first.staffNo, second.staffNo);
|
||||
first.staffName = firstText(first.staffName, second.staffName);
|
||||
first.mobileNo = firstText(first.mobileNo, second.mobileNo);
|
||||
first.corpinfoId = firstText(first.corpinfoId, second.corpinfoId);
|
||||
first.corpinfoId = firstLong(first.corpinfoId, second.corpinfoId);
|
||||
first.corpinfoName = firstText(first.corpinfoName, second.corpinfoName);
|
||||
first.findsTrackId = firstLong(first.findsTrackId, second.findsTrackId);
|
||||
return first;
|
||||
|
|
@ -697,13 +699,13 @@ public class TerminalCardSyncExe {
|
|||
private String staffNo;
|
||||
private String staffName;
|
||||
private String mobileNo;
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
private String corpinfoName;
|
||||
private Long findsTrackId;
|
||||
}
|
||||
|
||||
private static class CorpInfo {
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
private String corpName;
|
||||
private String creditCode;
|
||||
private String contactName;
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public class AlarmRecordQueryExe {
|
|||
|
||||
public List<AlarmRecordCO> listBiAlarm(AlarmRecordBiQry qry) {
|
||||
AlarmRecordBiQry query = qry == null ? new AlarmRecordBiQry() : qry;
|
||||
String corpinfoId = query.getCorpinfoId() == null ? null : String.valueOf(query.getCorpinfoId());
|
||||
Long corpinfoId = query.getCorpinfoId();
|
||||
List<AlarmRecordCO> rows = alarmRecordCoConvertor.converDOsToCOs(
|
||||
alarmRecordRepository.listBiAlarm(corpinfoId, query.getPortArea()));
|
||||
return rows;
|
||||
|
|
@ -71,7 +71,7 @@ public class AlarmRecordQueryExe {
|
|||
|
||||
public List<AlarmTypeStatCO> listBiAlarmType(AlarmRecordBiAlarmTypeQry qry) {
|
||||
AlarmRecordBiAlarmTypeQry query = qry == null ? new AlarmRecordBiAlarmTypeQry() : qry;
|
||||
String corpinfoId = query.getCorpinfoId() == null ? null : String.valueOf(query.getCorpinfoId());
|
||||
Long corpinfoId = query.getCorpinfoId();
|
||||
List<AlarmTypeStatDO> rows = alarmRecordRepository.listBiAlarmType(corpinfoId);
|
||||
if (rows == null || rows.isEmpty()) {
|
||||
return Collections.emptyList();
|
||||
|
|
|
|||
|
|
@ -44,11 +44,7 @@ import java.util.stream.Collectors;
|
|||
@Component
|
||||
@AllArgsConstructor
|
||||
public class AlarmRuleQueryExe {
|
||||
private static final String COMPANY_GROUP_UNMAPPED = "UNMAPPED";
|
||||
private static final String COMPANY_GROUP_UNMAPPED_NAME = "未归属企业";
|
||||
private static final String COMPANY_GROUP_ID_PREFIX = "ID:";
|
||||
private static final String COMPANY_GROUP_ORG_PREFIX = "ORG:";
|
||||
private static final String COMPANY_GROUP_NAME_PREFIX = "NAME:";
|
||||
|
||||
private final AlarmRuleRepository alarmRuleRepository;
|
||||
private final AlarmRuleFenceRelRepository alarmRuleFenceRelRepository;
|
||||
|
|
@ -75,7 +71,7 @@ public class AlarmRuleQueryExe {
|
|||
Map<String, Object> params = new HashMap<>();
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
params.put("eqCorpinfoId", String.valueOf(ssoUser.getCompanyId()));
|
||||
params.put("eqCorpinfoId", ssoUser.getCompanyId());
|
||||
}
|
||||
if (StringUtils.hasText(keyword)) {
|
||||
params.put("keyword", keyword.trim());
|
||||
|
|
@ -173,39 +169,25 @@ public class AlarmRuleQueryExe {
|
|||
}
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
params.put("eqCorpinfoId", String.valueOf(ssoUser.getCompanyId()));
|
||||
params.put("eqCorpinfoId", ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
|
||||
private void normalizeCompanyGroupParams(Map<String, Object> params) {
|
||||
String corpinfoId = textValue(params.get("eqCorpinfoId"));
|
||||
String corpinfoName = textValue(params.get("eqCorpinfoName"));
|
||||
String likeCorpinfoName = textValue(params.get("likeCorpinfoName"));
|
||||
Long corpinfoId = (Long) params.get("eqCorpinfoId");
|
||||
String corpinfoName = (String) params.get("eqCorpinfoName");
|
||||
String likeCorpinfoName = (String) params.get("likeCorpinfoName");
|
||||
if (StringUtils.hasText(likeCorpinfoName)
|
||||
&& COMPANY_GROUP_UNMAPPED_NAME.contains(likeCorpinfoName)) {
|
||||
params.put("includeUnmappedCompany", Boolean.TRUE);
|
||||
}
|
||||
if (COMPANY_GROUP_UNMAPPED.equalsIgnoreCase(corpinfoId)
|
||||
|| COMPANY_GROUP_UNMAPPED_NAME.equals(corpinfoName)
|
||||
|| ("0".equals(corpinfoId) && !StringUtils.hasText(corpinfoName))) {
|
||||
if (COMPANY_GROUP_UNMAPPED_NAME.equals(corpinfoName)) {
|
||||
params.remove("eqCorpinfoId");
|
||||
params.remove("eqCorpinfoName");
|
||||
params.put("unmappedCompany", Boolean.TRUE);
|
||||
return;
|
||||
}
|
||||
if (StringUtils.hasText(corpinfoId) && corpinfoId.startsWith(COMPANY_GROUP_ID_PREFIX)) {
|
||||
corpinfoId = corpinfoId.substring(COMPANY_GROUP_ID_PREFIX.length());
|
||||
} else if (StringUtils.hasText(corpinfoId) && corpinfoId.startsWith(COMPANY_GROUP_ORG_PREFIX)) {
|
||||
params.remove("eqCorpinfoId");
|
||||
params.remove("eqCorpinfoName");
|
||||
params.put("companyGroupOrgCode", corpinfoId.substring(COMPANY_GROUP_ORG_PREFIX.length()));
|
||||
return;
|
||||
} else if (StringUtils.hasText(corpinfoId) && corpinfoId.startsWith(COMPANY_GROUP_NAME_PREFIX)) {
|
||||
params.remove("eqCorpinfoId");
|
||||
params.put("eqCorpinfoName", corpinfoId.substring(COMPANY_GROUP_NAME_PREFIX.length()));
|
||||
return;
|
||||
}
|
||||
if (!StringUtils.hasText(corpinfoId) || "0".equals(corpinfoId)) {
|
||||
if (corpinfoId == null || corpinfoId.longValue() == 0L) {
|
||||
params.remove("eqCorpinfoId");
|
||||
return;
|
||||
}
|
||||
|
|
@ -213,14 +195,10 @@ public class AlarmRuleQueryExe {
|
|||
params.remove("eqCorpinfoName");
|
||||
}
|
||||
|
||||
private String textValue(Object value) {
|
||||
return value == null ? null : String.valueOf(value).trim();
|
||||
}
|
||||
|
||||
private void applyCorpinfo(QueryWrapper<AlarmRuleDO> queryWrapper) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
queryWrapper.eq("corpinfo_id", String.valueOf(ssoUser.getCompanyId()));
|
||||
queryWrapper.eq("corpinfo_id", ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public class AreaQueryExe {
|
|||
return areaCoConvertor.converDOsToCOs(areaRepository.list(queryWrapper));
|
||||
}
|
||||
|
||||
public List<OptionCO> listOptions(String corpinfoId, String keyword) {
|
||||
public List<OptionCO> listOptions(Long corpinfoId, String keyword) {
|
||||
QueryWrapper<AreaDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.and(wrapper -> wrapper.isNull("delete_enum").or().eq("delete_enum", "FALSE"));
|
||||
queryWrapper.and(wrapper -> wrapper.isNull("status").or().eq("status", "ENABLED"));
|
||||
|
|
@ -79,7 +79,7 @@ public class AreaQueryExe {
|
|||
if (corpinfoId == null) {
|
||||
throw new BizException("企业id不能为空");
|
||||
}
|
||||
String companyId = String.valueOf(corpinfoId);
|
||||
Long companyId = corpinfoId;
|
||||
List<AreaStatAccumulator> areas = listCompanyAreas(companyId);
|
||||
List<BiCompanyOnlinePersonCO> personList =
|
||||
biPersonLocationProvider.listCompanyOnlinePersons(companyId, null, null);
|
||||
|
|
@ -101,7 +101,7 @@ public class AreaQueryExe {
|
|||
return areaCoConvertor.converDOToCO(dataObject);
|
||||
}
|
||||
|
||||
private List<AreaStatAccumulator> listCompanyAreas(String corpinfoId) {
|
||||
private List<AreaStatAccumulator> listCompanyAreas(Long corpinfoId) {
|
||||
QueryWrapper<AreaDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.and(wrapper -> wrapper.isNull("delete_enum").or().eq("delete_enum", "FALSE"));
|
||||
queryWrapper.and(wrapper -> wrapper.isNull("status").or().eq("status", "ENABLED"));
|
||||
|
|
@ -190,7 +190,7 @@ public class AreaQueryExe {
|
|||
}
|
||||
}
|
||||
|
||||
private void applyCorpinfo(QueryWrapper<AreaDO> queryWrapper, String corpinfoId) {
|
||||
private void applyCorpinfo(QueryWrapper<AreaDO> queryWrapper, Long corpinfoId) {
|
||||
if (corpinfoId != null) {
|
||||
queryWrapper.eq("corpinfo_id", corpinfoId);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -37,10 +37,10 @@ public class BiPersonLocationProvider {
|
|||
private final UserRepository userRepository;
|
||||
private final PositionPersonQueryExe positionPersonQueryExe;
|
||||
|
||||
public List<BiCompanyOnlinePersonCO> listCompanyOnlinePersons(String corpinfoId,
|
||||
public List<BiCompanyOnlinePersonCO> listCompanyOnlinePersons(Long corpinfoId,
|
||||
String corpinfoName,
|
||||
String corpCode) {
|
||||
if (!StringUtils.hasText(corpinfoId)) {
|
||||
if (corpinfoId == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
LOGGER.info("开始查询可视化大屏第三方人员定位,corpinfoId={}", corpinfoId);
|
||||
|
|
@ -62,7 +62,7 @@ public class BiPersonLocationProvider {
|
|||
return person != null && STATUS_ONLINE.equalsIgnoreCase(person.getLocationStatus());
|
||||
}
|
||||
|
||||
private List<ThirdPartyPersonLocation> loadThirdPartyPersonLocations(String corpinfoId,
|
||||
private List<ThirdPartyPersonLocation> loadThirdPartyPersonLocations(Long corpinfoId,
|
||||
String corpinfoName,
|
||||
String corpCode) {
|
||||
LOGGER.info("开始调用企业人员定位查询,corpinfoId={},corpinfoName={},corpCode={}",
|
||||
|
|
@ -110,7 +110,7 @@ public class BiPersonLocationProvider {
|
|||
return location;
|
||||
}
|
||||
|
||||
private Map<String, BiPersonPositionUserDO> buildUserMap(String corpinfoId) {
|
||||
private Map<String, BiPersonPositionUserDO> buildUserMap(Long corpinfoId) {
|
||||
List<BiPersonPositionUserDO> users = userRepository.listBiPersonPositionUsers(corpinfoId);
|
||||
Map<String, BiPersonPositionUserDO> result = new LinkedHashMap<>();
|
||||
for (BiPersonPositionUserDO user : users) {
|
||||
|
|
@ -130,7 +130,7 @@ public class BiPersonLocationProvider {
|
|||
}
|
||||
}
|
||||
|
||||
private BiCompanyOnlinePersonCO toOnlinePerson(String corpinfoId,
|
||||
private BiCompanyOnlinePersonCO toOnlinePerson(Long corpinfoId,
|
||||
String corpinfoName,
|
||||
ThirdPartyPersonLocation location,
|
||||
Map<String, BiPersonPositionUserDO> userMap) {
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public class FenceQueryExe {
|
|||
Map<String, Object> params = new HashMap<>();
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
params.put("eqCorpinfoId", String.valueOf(ssoUser.getCompanyId()));
|
||||
params.put("eqCorpinfoId", ssoUser.getCompanyId());
|
||||
}
|
||||
if (StringUtils.hasText(keyword)) {
|
||||
params.put("keyword", keyword.trim());
|
||||
|
|
@ -97,8 +97,8 @@ public class FenceQueryExe {
|
|||
}
|
||||
|
||||
private void preferCorpinfoId(Map<String, Object> params) {
|
||||
String corpinfoId = (String) params.get("eqCorpinfoId");
|
||||
if (!StringUtils.hasText(corpinfoId)) {
|
||||
Long corpinfoId = (Long) params.get("eqCorpinfoId");
|
||||
if (corpinfoId == null) {
|
||||
return;
|
||||
}
|
||||
params.remove("eqCorpinfoName");
|
||||
|
|
@ -107,7 +107,7 @@ public class FenceQueryExe {
|
|||
private void applyCorpinfo(QueryWrapper<FenceDO> queryWrapper) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
if (ssoUser != null && ssoUser.getCompanyId() != null) {
|
||||
queryWrapper.eq("corpinfo_id", String.valueOf(ssoUser.getCompanyId()));
|
||||
queryWrapper.eq("corpinfo_id", ssoUser.getCompanyId());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ public class FindsStaffMappingSyncService {
|
|||
PersonIndexes localPeople = new PersonIndexes(localLookupService.findAllPeople());
|
||||
int matchedCount = 0;
|
||||
for (StaffSnapshot row : staffRows) {
|
||||
findsCorpMappingService.resolve(SOURCE_CONFIG_CODE, row.corpinfoId,
|
||||
findsCorpMappingService.resolve(SOURCE_CONFIG_CODE, row.findsCorpinfoId,
|
||||
row.corpinfoName, row.departmentName, null);
|
||||
LocalMatch localMatch = localPeople.match(row);
|
||||
upsert(row, localMatch, syncTime);
|
||||
|
|
@ -139,7 +139,7 @@ public class FindsStaffMappingSyncService {
|
|||
text(firstPresent(row, "idCardNo", "identityNo", "certificateNo", "cardNo")),
|
||||
text(firstPresent(terminalInfo, "idCardNo")));
|
||||
snapshot.staffName = firstText(text(firstPresent(row, "staffName", "name", "realName", "userName")));
|
||||
snapshot.corpinfoId = firstText(text(firstPresent(row,
|
||||
snapshot.findsCorpinfoId = firstText(text(firstPresent(row,
|
||||
"corpinfoId", "companyId", "corpId", "enterpriseId")));
|
||||
// FindS staff rows carry the org hierarchy as orgNamePath (root-to-leaf, e.g.
|
||||
// ["秦港股份","杂货公司","机械一部"]) plus a single orgName for the leaf (assigned) node.
|
||||
|
|
@ -174,7 +174,7 @@ public class FindsStaffMappingSyncService {
|
|||
params.put("findsTrackId", row.findsTrackId);
|
||||
params.put("idCardNo", row.idCardNo);
|
||||
params.put("staffName", row.staffName);
|
||||
params.put("corpinfoId", row.corpinfoId);
|
||||
params.put("corpinfoId", row.findsCorpinfoId);
|
||||
params.put("corpinfoName", row.corpinfoName);
|
||||
params.put("departmentName", row.departmentName);
|
||||
params.put("terminalNo", row.terminalNo);
|
||||
|
|
@ -289,7 +289,7 @@ public class FindsStaffMappingSyncService {
|
|||
private Long findsTrackId;
|
||||
private String idCardNo;
|
||||
private String staffName;
|
||||
private String corpinfoId;
|
||||
private String findsCorpinfoId;
|
||||
private String corpinfoName;
|
||||
private String departmentName;
|
||||
private String terminalNo;
|
||||
|
|
|
|||
|
|
@ -146,10 +146,10 @@ public class PersonnelPositioningBiQueryExe {
|
|||
|
||||
private List<BiCompanyLocationCO> mergeCorpInfoCompanies(List<BiCompanyLocationCO> fenceCompanies,
|
||||
Integer portArea) {
|
||||
Map<String, BiCompanyLocationCO> companiesById = new LinkedHashMap<>();
|
||||
Map<Long, BiCompanyLocationCO> companiesById = new LinkedHashMap<>();
|
||||
Map<String, BiCompanyLocationCO> companiesByName = new LinkedHashMap<>();
|
||||
for (BiCompanyLocationCO company : fenceCompanies) {
|
||||
if (StringUtils.hasText(company.getCorpinfoId())) {
|
||||
if (company.getCorpinfoId() != null) {
|
||||
companiesById.putIfAbsent(company.getCorpinfoId(), company);
|
||||
}
|
||||
String companyName = firstText(company.getCorpinfoName(), company.getCompanyName());
|
||||
|
|
@ -269,7 +269,7 @@ public class PersonnelPositioningBiQueryExe {
|
|||
public List<BiCompanyPersonPositionCO> listCompanyPersonPosition(BiCompanyOnlinePersonQry qry) {
|
||||
BiCompanyOnlinePersonQry query = qry == null ? new BiCompanyOnlinePersonQry() : qry;
|
||||
validatePortArea(query.getPortArea());
|
||||
String corpinfoId = query.getCorpinfoId() == null ? null : String.valueOf(query.getCorpinfoId());
|
||||
Long corpinfoId = query.getCorpinfoId();
|
||||
List<BiCompanyPersonPositionCO> result = new ArrayList<>();
|
||||
for (BiCorpInfoDO corpInfo : biRepository.listPersonPositionCompanies(corpinfoId, query.getPortArea())) {
|
||||
List<BiCompanyOnlinePersonCO> personList = biPersonLocationProvider.listCompanyOnlinePersons(
|
||||
|
|
@ -288,7 +288,7 @@ public class PersonnelPositioningBiQueryExe {
|
|||
if (qry == null || qry.getCorpinfoId() == null) {
|
||||
throw new BizException("企业id不能为空");
|
||||
}
|
||||
String corpinfoId = String.valueOf(qry.getCorpinfoId());
|
||||
Long corpinfoId = qry.getCorpinfoId();
|
||||
List<BiPersonPositionArea> areas = loadBiPersonPositionAreas(corpinfoId);
|
||||
Map<String, BiCompanyOnlinePersonCO> locationMap = loadBiPersonPositionLocationMap(corpinfoId);
|
||||
List<BiPersonPositionCO> result = new ArrayList<>();
|
||||
|
|
@ -299,7 +299,7 @@ public class PersonnelPositioningBiQueryExe {
|
|||
return result;
|
||||
}
|
||||
|
||||
private List<BiPersonPositionArea> loadBiPersonPositionAreas(String corpinfoId) {
|
||||
private List<BiPersonPositionArea> loadBiPersonPositionAreas(Long corpinfoId) {
|
||||
List<AreaDO> rows = areaRepository.listBiPersonPositionAreas(corpinfoId);
|
||||
List<BiPersonPositionArea> result = new ArrayList<>();
|
||||
for (AreaDO row : rows) {
|
||||
|
|
@ -308,7 +308,7 @@ public class PersonnelPositioningBiQueryExe {
|
|||
return result;
|
||||
}
|
||||
|
||||
private Map<String, BiCompanyOnlinePersonCO> loadBiPersonPositionLocationMap(String corpinfoId) {
|
||||
private Map<String, BiCompanyOnlinePersonCO> loadBiPersonPositionLocationMap(Long corpinfoId) {
|
||||
List<BiCompanyOnlinePersonCO> locations =
|
||||
biPersonLocationProvider.listCompanyOnlinePersons(corpinfoId, null, null);
|
||||
Map<String, BiCompanyOnlinePersonCO> result = new LinkedHashMap<>();
|
||||
|
|
@ -483,7 +483,7 @@ public class PersonnelPositioningBiQueryExe {
|
|||
|
||||
private List<CorpInfoView> queryCompanyOnlineCorpInfos(BiCompanyOnlinePersonQry qry) {
|
||||
if (qry.getCorpinfoId() != null) {
|
||||
CorpInfoView corpInfo = queryCorpInfoById(String.valueOf(qry.getCorpinfoId()));
|
||||
CorpInfoView corpInfo = queryCorpInfoById(qry.getCorpinfoId());
|
||||
if (corpInfo == null) {
|
||||
throw new BizException("未找到对应企业信息");
|
||||
}
|
||||
|
|
@ -496,7 +496,7 @@ public class PersonnelPositioningBiQueryExe {
|
|||
}
|
||||
|
||||
private List<BiPersonLocationCO> loadMatchedPersonLocations(BiPersonLocationQry query) {
|
||||
if (StringUtils.hasText(query.getCorpinfoId()) && localLookupService.hasPersonnelMappings()) {
|
||||
if (query.getCorpinfoId() != null && localLookupService.hasPersonnelMappings()) {
|
||||
return loadPersistedPersonLocations(query);
|
||||
}
|
||||
List<StaffSnapshot> staffRows = loadAllStaffSnapshots();
|
||||
|
|
@ -557,7 +557,7 @@ public class PersonnelPositioningBiQueryExe {
|
|||
|
||||
private List<BiPersonLocationCO> loadPersistedPersonLocations(BiPersonLocationQry query) {
|
||||
PositionPersonPageQry localQuery = new PositionPersonPageQry();
|
||||
localQuery.setCorpinfoId(query.getCorpinfoId().trim());
|
||||
localQuery.setCorpinfoId(query.getCorpinfoId());
|
||||
localQuery.setCorpinfoName(query.getCompanyName());
|
||||
localQuery.setStaffName(query.getStaffName());
|
||||
|
||||
|
|
@ -991,7 +991,7 @@ public class PersonnelPositioningBiQueryExe {
|
|||
co.setTerminalNo(terminalNo);
|
||||
co.setCompanyName(local.getCorpinfoName());
|
||||
co.setCorpinfoName(local.getCorpinfoName());
|
||||
co.setCorpinfoId(local.getCorpinfoId() == null ? null : String.valueOf(local.getCorpinfoId()));
|
||||
co.setCorpinfoId(local.getCorpinfoId());
|
||||
co.setPortArea(local.getPortArea());
|
||||
co.setCreditCode(local.getCreditCode());
|
||||
CorpInfoView corpInfo = queryCorpInfoById(local.getCorpinfoId());
|
||||
|
|
@ -1022,7 +1022,7 @@ public class PersonnelPositioningBiQueryExe {
|
|||
|
||||
private boolean matchesPersonLocation(BiPersonLocationCO co, BiPersonLocationQry qry) {
|
||||
if (qry.getCorpinfoId() != null
|
||||
&& !String.valueOf(qry.getCorpinfoId()).equals(co.getCorpinfoId())) {
|
||||
&& !qry.getCorpinfoId().equals(co.getCorpinfoId())) {
|
||||
return false;
|
||||
}
|
||||
if (StringUtils.hasText(qry.getTerminalNo()) && !qry.getTerminalNo().equals(co.getTerminalNo())) {
|
||||
|
|
@ -1191,13 +1191,13 @@ public class PersonnelPositioningBiQueryExe {
|
|||
|
||||
private void fillCompanyOnlineCounts(List<BiCompanyLocationCO> companies,
|
||||
List<BiPersonLocationCO> personList) {
|
||||
Map<String, Integer> countsByCompanyId = new HashMap<>();
|
||||
Map<Long, Integer> countsByCompanyId = new HashMap<>();
|
||||
Map<String, Integer> countsByCompanyName = new HashMap<>();
|
||||
for (BiPersonLocationCO person : personList) {
|
||||
if (!Boolean.TRUE.equals(person.getOnline())) {
|
||||
continue;
|
||||
}
|
||||
if (StringUtils.hasText(person.getCorpinfoId())) {
|
||||
if (person.getCorpinfoId() != null) {
|
||||
countsByCompanyId.merge(person.getCorpinfoId(), 1, Integer::sum);
|
||||
}
|
||||
String companyName = firstText(person.getCorpinfoName(), person.getCompanyName());
|
||||
|
|
@ -1254,11 +1254,11 @@ public class PersonnelPositioningBiQueryExe {
|
|||
}
|
||||
|
||||
private void fillCompanyAlarmCounts(List<BiCompanyLocationCO> rows) {
|
||||
Map<String, Integer> countsByCompanyId = new HashMap<>();
|
||||
Map<Long, Integer> countsByCompanyId = new HashMap<>();
|
||||
Map<String, Integer> countsByCompanyName = new HashMap<>();
|
||||
for (BiCompanyAlarmCountDO row : biRepository.listCompanyAlarmCounts()) {
|
||||
int count = row.getAlarmCount() == null ? 0 : row.getAlarmCount();
|
||||
if (StringUtils.hasText(row.getCorpinfoId())) {
|
||||
if (row.getCorpinfoId() != null) {
|
||||
countsByCompanyId.merge(row.getCorpinfoId(), count, Integer::sum);
|
||||
}
|
||||
if (StringUtils.hasText(row.getCorpinfoName())) {
|
||||
|
|
@ -1523,7 +1523,7 @@ public class PersonnelPositioningBiQueryExe {
|
|||
return mapCorpInfo(biRepository.findCorpByCreditCode(creditCode));
|
||||
}
|
||||
|
||||
private CorpInfoView queryCorpInfoById(String corpinfoId) {
|
||||
private CorpInfoView queryCorpInfoById(Long corpinfoId) {
|
||||
if (corpinfoId == null) {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -1735,7 +1735,7 @@ public class PersonnelPositioningBiQueryExe {
|
|||
private String areaType;
|
||||
private Long parentId;
|
||||
private String parentCode;
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
private String corpinfoName;
|
||||
private BigDecimal centerLon;
|
||||
private BigDecimal centerLat;
|
||||
|
|
@ -1743,7 +1743,7 @@ public class PersonnelPositioningBiQueryExe {
|
|||
}
|
||||
|
||||
private static class CorpInfoView {
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
private String corpName;
|
||||
private String code;
|
||||
private String address;
|
||||
|
|
@ -1764,7 +1764,7 @@ public class PersonnelPositioningBiQueryExe {
|
|||
private final String companyName;
|
||||
private String orgCode;
|
||||
private String creditCode;
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
private Long portId;
|
||||
private String portCode;
|
||||
private String portName;
|
||||
|
|
@ -1787,8 +1787,8 @@ public class PersonnelPositioningBiQueryExe {
|
|||
if (!StringUtils.hasText(creditCode)) {
|
||||
creditCode = fence.getCreditCode();
|
||||
}
|
||||
if (!StringUtils.hasText(corpinfoId) && fence.getCorpinfoId() != null) {
|
||||
corpinfoId = String.valueOf(fence.getCorpinfoId());
|
||||
if (corpinfoId == null && fence.getCorpinfoId() != null) {
|
||||
corpinfoId = fence.getCorpinfoId();
|
||||
}
|
||||
if (portId == null && fence.getPortId() != null) {
|
||||
portId = fence.getPortId();
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ class PositionPersonLocalLookupService {
|
|||
if (query != null) {
|
||||
params.put("userId", query.getUserId());
|
||||
params.put("staffName", normalize(query.getStaffName()));
|
||||
params.put("corpinfoId", query.getCorpinfoId() == null ? null : String.valueOf(query.getCorpinfoId()));
|
||||
params.put("corpinfoId", query.getCorpinfoId());
|
||||
params.put("corpinfoName", normalize(query.getCorpinfoName()));
|
||||
params.put("departmentId", query.getDepartmentId());
|
||||
params.put("departmentName", normalize(query.getDepartmentName()));
|
||||
|
|
@ -180,7 +180,7 @@ class PositionPersonLocalLookupService {
|
|||
private String staffName;
|
||||
private String mobileNo;
|
||||
private String idCardNo;
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
private String corpinfoName;
|
||||
private String creditCode;
|
||||
private Integer portArea;
|
||||
|
|
|
|||
|
|
@ -166,9 +166,8 @@ public class RealtimePersonLocationMatcher {
|
|||
directText(row, "companyName", "corpName", "enterpriseName"),
|
||||
directText(staff, "companyName", "corpName", "enterpriseName"),
|
||||
orgName));
|
||||
co.setCorpinfoId(firstText(
|
||||
directText(row, "corpinfoId", "companyId", "corpId", "enterpriseId"),
|
||||
directText(staff, "corpinfoId", "companyId", "corpId", "enterpriseId")));
|
||||
// FindS 企业标识是外部字符串,不能直接当作本地 corp_info.id。
|
||||
co.setCorpinfoId(null);
|
||||
co.setCorpinfoName(firstText(co.getCompanyName(), orgName));
|
||||
co.setOrgName(orgName);
|
||||
co.setOrgCode(orgCode);
|
||||
|
|
|
|||
|
|
@ -141,8 +141,7 @@ public class FindsOpenApiClient {
|
|||
|
||||
private OpenapiConfigDO loadEnabledConfig() {
|
||||
SSOUser currentUser = AuthContext.getCurrentUser();
|
||||
String companyId = currentUser == null || currentUser.getCompanyId() == null
|
||||
? null : String.valueOf(currentUser.getCompanyId());
|
||||
Long companyId = currentUser == null ? null : currentUser.getCompanyId();
|
||||
OpenapiConfigDO config = openapiConfigCache.getEnabledConfig(companyId);
|
||||
if (config == null) {
|
||||
throw new BizException("未配置启用的FindS OpenAPI配置");
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public class OpenapiConfigCache {
|
|||
this.stringRedisTemplate = stringRedisTemplateProvider.getIfAvailable();
|
||||
}
|
||||
|
||||
public OpenapiConfigDO getEnabledConfig(String companyId) {
|
||||
public OpenapiConfigDO getEnabledConfig(Long companyId) {
|
||||
OpenapiConfigDO companyConfig = companyId == null ? null
|
||||
: getOrLoad(companyKey(companyId), () -> queryConfigByCorpinfo(companyId));
|
||||
if (companyConfig != null) {
|
||||
|
|
@ -111,7 +111,7 @@ public class OpenapiConfigCache {
|
|||
return dbConfig;
|
||||
}
|
||||
|
||||
private OpenapiConfigDO queryConfigByCorpinfo(String companyId) {
|
||||
private OpenapiConfigDO queryConfigByCorpinfo(Long companyId) {
|
||||
QueryWrapper<OpenapiConfigDO> queryWrapper = baseConfigQuery();
|
||||
queryWrapper.eq("corpinfo_id", companyId);
|
||||
queryWrapper.last("LIMIT 1");
|
||||
|
|
@ -181,7 +181,7 @@ public class OpenapiConfigCache {
|
|||
localCache.put(key, new CacheEntry(config, System.currentTimeMillis() + LOCAL_TTL_MILLIS));
|
||||
}
|
||||
|
||||
private String companyKey(String companyId) {
|
||||
private String companyKey(Long companyId) {
|
||||
return "corp:" + companyId;
|
||||
}
|
||||
|
||||
|
|
@ -206,7 +206,7 @@ public class OpenapiConfigCache {
|
|||
config.setSik(text(map.get("sik")));
|
||||
config.setSisCipherText(text(map.get("sisCipherText")));
|
||||
config.setEnabled(integer(map.get("enabled")));
|
||||
config.setCorpinfoId(text(map.get("corpinfoId")));
|
||||
config.setCorpinfoId(longValue(map.get("corpinfoId")));
|
||||
config.setCorpinfoName(text(map.get("corpinfoName")));
|
||||
return config;
|
||||
}
|
||||
|
|
@ -255,7 +255,7 @@ public class OpenapiConfigCache {
|
|||
private final String sik;
|
||||
private final String sisCipherText;
|
||||
private final Integer enabled;
|
||||
private final String corpinfoId;
|
||||
private final Long corpinfoId;
|
||||
private final String corpinfoName;
|
||||
|
||||
private CachedOpenapiConfig(OpenapiConfigDO config) {
|
||||
|
|
@ -308,7 +308,7 @@ public class OpenapiConfigCache {
|
|||
return enabled;
|
||||
}
|
||||
|
||||
public String getCorpinfoId() {
|
||||
public Long getCorpinfoId() {
|
||||
return corpinfoId;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public class AreaServiceImpl implements AreaServiceI {
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<OptionCO> listOptions(String corpinfoId, String keyword) {
|
||||
public List<OptionCO> listOptions(Long corpinfoId, String keyword) {
|
||||
return areaQueryExe.listOptions(corpinfoId, keyword);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ public class FenceServiceImpl implements FenceServiceI {
|
|||
}
|
||||
|
||||
@Override
|
||||
public FenceCompanyAreaCO queryCompanyArea(String corpinfoId, String corpinfoName) {
|
||||
public FenceCompanyAreaCO queryCompanyArea(Long corpinfoId, String corpinfoName) {
|
||||
return fenceCompanyAreaSaveExe.query(corpinfoId, corpinfoName);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public interface AreaServiceI {
|
|||
|
||||
List<AreaCO> listAll();
|
||||
|
||||
List<OptionCO> listOptions(String corpinfoId, String keyword);
|
||||
List<OptionCO> listOptions(Long corpinfoId, String keyword);
|
||||
|
||||
List<AreaPersonStatCO> listPersonStat(Long corpinfoId);
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ public interface FenceServiceI {
|
|||
|
||||
FenceCO queryById(Long id);
|
||||
|
||||
FenceCompanyAreaCO queryCompanyArea(String corpinfoId, String corpinfoName);
|
||||
FenceCompanyAreaCO queryCompanyArea(Long corpinfoId, String corpinfoName);
|
||||
|
||||
SingleResponse<FenceCO> add(FenceAddCmd cmd);
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ public class AlarmDisposeRecordAddCmd extends Command {
|
|||
private Long alarmRecordId;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ public class AlarmDisposeRecordPageQry extends PageQuery {
|
|||
private Long eqAlarmRecordId;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "eqCorpinfoId")
|
||||
private String eqCorpinfoId;
|
||||
private Long eqCorpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "likeCorpinfoName")
|
||||
private String likeCorpinfoName;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public class AlarmDisposeRecordUpdateCmd extends Command {
|
|||
private Long alarmRecordId;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public class AlarmRecordAddCmd extends Command {
|
|||
private LocalDateTime gt;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public class AlarmRecordPageQry extends PageQuery {
|
|||
private LocalDateTime leGt;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "eqCorpinfoId")
|
||||
private String eqCorpinfoId;
|
||||
private Long eqCorpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "likeCorpinfoName")
|
||||
private String likeCorpinfoName;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public class AlarmRecordTargetAddCmd extends Command {
|
|||
private Long alarmRecordId;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ public class AlarmRecordTargetPageQry extends PageQuery {
|
|||
private Long eqAlarmRecordId;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "eqCorpinfoId")
|
||||
private String eqCorpinfoId;
|
||||
private Long eqCorpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "likeCorpinfoName")
|
||||
private String likeCorpinfoName;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ public class AlarmRecordTargetUpdateCmd extends Command {
|
|||
private Long alarmRecordId;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ public class AlarmRecordUpdateCmd extends Command {
|
|||
private LocalDateTime gt;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ public class AlarmRuleAddCmd extends Command {
|
|||
private String ruleStatus;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import lombok.Data;
|
|||
@Data
|
||||
public class AlarmRuleCompanyPageQry extends PageQuery {
|
||||
@ApiModelProperty(value = "企业id/公司id", name = "eqCorpinfoId")
|
||||
private String eqCorpinfoId;
|
||||
private Long eqCorpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "公司名称", name = "likeCorpinfoName")
|
||||
private String likeCorpinfoName;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public class AlarmRuleFenceRelAddCmd extends Command {
|
|||
private String relType;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public class AlarmRuleFenceRelPageQry extends PageQuery {
|
|||
private String eqRelType;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "eqCorpinfoId")
|
||||
private String eqCorpinfoId;
|
||||
private Long eqCorpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "likeCorpinfoName")
|
||||
private String likeCorpinfoName;
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ public class AlarmRuleFenceRelUpdateCmd extends Command {
|
|||
private String relType;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ public class AlarmRuleItemAddCmd extends Command {
|
|||
private Long ruleId;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public class AlarmRuleItemPageQry extends PageQuery {
|
|||
private Long eqRuleId;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "eqCorpinfoId")
|
||||
private String eqCorpinfoId;
|
||||
private Long eqCorpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "likeCorpinfoName")
|
||||
private String likeCorpinfoName;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public class AlarmRuleItemUpdateCmd extends Command {
|
|||
private Long ruleId;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public class AlarmRulePageQry extends PageQuery {
|
|||
private String eqRuleStatus;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "eqCorpinfoId")
|
||||
private String eqCorpinfoId;
|
||||
private Long eqCorpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称(精确查询)", name = "eqCorpinfoName")
|
||||
private String eqCorpinfoName;
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ public class AlarmRuleUpdateCmd extends Command {
|
|||
private String ruleStatus;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public class AreaAddCmd extends Command {
|
|||
private String orgName;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public class AreaPageQry extends PageQuery {
|
|||
private String likeOrgName;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "eqCorpinfoId")
|
||||
private String eqCorpinfoId;
|
||||
private Long eqCorpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "likeCorpinfoName")
|
||||
private String likeCorpinfoName;
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public class AreaUpdateCmd extends Command {
|
|||
private String orgName;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import lombok.Data;
|
|||
@Data
|
||||
public class BiCompanyFenceQry extends PageQuery {
|
||||
@ApiModelProperty(value = "公司ID", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "公司名称", name = "companyName")
|
||||
private String companyName;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import lombok.Data;
|
|||
@Data
|
||||
public class BiPersonLocationQry extends PageQuery {
|
||||
@ApiModelProperty(value = "本平台公司ID", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "公司名称", name = "companyName")
|
||||
private String companyName;
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public class FenceAddCmd extends Command {
|
|||
private String fenceBizName;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ public class FenceCompanyAreaSaveCmd extends Command {
|
|||
private Long fenceId;
|
||||
|
||||
@ApiModelProperty(value = "公司ID", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "公司名称", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import lombok.Data;
|
|||
@Data
|
||||
public class FenceCompanyPageQry extends PageQuery {
|
||||
@ApiModelProperty(value = "公司ID", name = "eqCorpinfoId")
|
||||
private String eqCorpinfoId;
|
||||
private Long eqCorpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "公司名称", name = "likeCorpinfoName")
|
||||
private String likeCorpinfoName;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public class FencePageQry extends PageQuery {
|
|||
private String likeFenceBizName;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "eqCorpinfoId")
|
||||
private String eqCorpinfoId;
|
||||
private Long eqCorpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称(精确查询)", name = "eqCorpinfoName")
|
||||
private String eqCorpinfoName;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public class FencePointAddCmd extends Command {
|
|||
private BigDecimal alt;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ public class FencePointPageQry extends PageQuery {
|
|||
private BigDecimal eqAlt;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "eqCorpinfoId")
|
||||
private String eqCorpinfoId;
|
||||
private Long eqCorpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "likeCorpinfoName")
|
||||
private String likeCorpinfoName;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public class FencePointUpdateCmd extends Command {
|
|||
private BigDecimal alt;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import lombok.EqualsAndHashCode;
|
|||
@Data
|
||||
public class FenceSyncCmd extends Command {
|
||||
@ApiModelProperty(value = "FindS组织无法匹配时使用的默认公司ID", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "FindS组织无法匹配时使用的默认公司名称", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ public class FenceUpdateCmd extends Command {
|
|||
private String fenceBizName;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public class OpenapiConfigAddCmd extends Command {
|
|||
private LocalDateTime lastCheckTime;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public class OpenapiConfigPageQry extends PageQuery {
|
|||
private LocalDateTime leLastCheckTime;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "eqCorpinfoId")
|
||||
private String eqCorpinfoId;
|
||||
private Long eqCorpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "likeCorpinfoName")
|
||||
private String likeCorpinfoName;
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public class OpenapiConfigUpdateCmd extends Command {
|
|||
private LocalDateTime lastCheckTime;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ public class PositionPersonPageQry extends PageQuery {
|
|||
private String staffName;
|
||||
|
||||
@ApiModelProperty(value = "本平台公司ID", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "本平台公司名称", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ public class PositionVehiclePageQry extends PageQuery {
|
|||
private String plateNo;
|
||||
|
||||
@ApiModelProperty(value = "本平台公司ID", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "本平台公司名称,模糊查询", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public class SyncLogAddCmd extends Command {
|
|||
private String bizId;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public class SyncLogPageQry extends PageQuery {
|
|||
private String eqBizId;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "eqCorpinfoId")
|
||||
private String eqCorpinfoId;
|
||||
private Long eqCorpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "likeCorpinfoName")
|
||||
private String likeCorpinfoName;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public class SyncLogUpdateCmd extends Command {
|
|||
private String bizId;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public class SyncTaskAddCmd extends Command {
|
|||
private String bizType;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public class SyncTaskPageQry extends PageQuery {
|
|||
private String eqBizType;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "eqCorpinfoId")
|
||||
private String eqCorpinfoId;
|
||||
private Long eqCorpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "likeCorpinfoName")
|
||||
private String likeCorpinfoName;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public class SyncTaskUpdateCmd extends Command {
|
|||
private String bizType;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public class TerminalAddCmd extends Command {
|
|||
private String checkCode;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import lombok.Data;
|
|||
@Data
|
||||
public class TerminalAppCompanyPageQry extends PageQuery {
|
||||
@ApiModelProperty(value = "公司ID", name = "eqCorpinfoId")
|
||||
private String eqCorpinfoId;
|
||||
private Long eqCorpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "公司名称", name = "likeCorpinfoName")
|
||||
private String likeCorpinfoName;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public class TerminalAppPageQry extends PageQuery {
|
|||
private String idCardNo;
|
||||
|
||||
@ApiModelProperty(value = "公司ID,精确匹配", name = "eqCorpinfoId")
|
||||
private String eqCorpinfoId;
|
||||
private Long eqCorpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "公司名称,精确匹配", name = "eqCorpinfoName")
|
||||
private String eqCorpinfoName;
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public class TerminalAppSaveCmd extends Command {
|
|||
private String bizName;
|
||||
|
||||
@ApiModelProperty(value = "公司ID", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "公司名称", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import lombok.EqualsAndHashCode;
|
|||
@Data
|
||||
public class TerminalAppSyncCmd extends Command {
|
||||
@ApiModelProperty(value = "公司ID", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "公司名称", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public class TerminalBindAddCmd extends Command {
|
|||
private String deviceType;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public class TerminalBindPageQry extends PageQuery {
|
|||
private String eqDeviceType;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "eqCorpinfoId")
|
||||
private String eqCorpinfoId;
|
||||
private Long eqCorpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "likeCorpinfoName")
|
||||
private String likeCorpinfoName;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public class TerminalBindUpdateCmd extends Command {
|
|||
private String deviceType;
|
||||
|
||||
@ApiModelProperty(value = "企业id/公司id(公司及子公司数据隔离)", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "企业名称/公司名称", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import lombok.Data;
|
|||
@Data
|
||||
public class TerminalCardCompanyPageQry extends PageQuery {
|
||||
@ApiModelProperty(value = "公司ID", name = "eqCorpinfoId")
|
||||
private String eqCorpinfoId;
|
||||
private Long eqCorpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "公司名称", name = "likeCorpinfoName")
|
||||
private String likeCorpinfoName;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public class TerminalCardPageQry extends PageQuery {
|
|||
private String idCardNo;
|
||||
|
||||
@ApiModelProperty(value = "公司ID,精确匹配", name = "eqCorpinfoId")
|
||||
private String eqCorpinfoId;
|
||||
private Long eqCorpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "公司名称,精确匹配", name = "eqCorpinfoName")
|
||||
private String eqCorpinfoName;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public class TerminalCardPersonOptionQry extends PageQuery {
|
|||
private String idCardNo;
|
||||
|
||||
@ApiModelProperty(value = "公司ID", name = "corpinfoId")
|
||||
private String corpinfoId;
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "公司名称", name = "corpinfoName")
|
||||
private String corpinfoName;
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue