diff --git a/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/terminal/service/impl/TerminalServiceImpl.java b/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/terminal/service/impl/TerminalServiceImpl.java index e71b249..0ac984d 100644 --- a/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/terminal/service/impl/TerminalServiceImpl.java +++ b/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/terminal/service/impl/TerminalServiceImpl.java @@ -109,6 +109,7 @@ public class TerminalServiceImpl extends ServiceImpl i for (Long terminalId : terminalIds) { Terminal terminal = getById(terminalId); terminal.setOccupy(i); + terminal.setVersion(0l); baseMapper.updateById(terminal); } } diff --git a/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/work/service/impl/WrkInfoServiceImpl.java b/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/work/service/impl/WrkInfoServiceImpl.java index c57195a..bfa55f4 100644 --- a/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/work/service/impl/WrkInfoServiceImpl.java +++ b/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/work/service/impl/WrkInfoServiceImpl.java @@ -600,6 +600,7 @@ public class WrkInfoServiceImpl extends ServiceImpl impl wrkInfo.setWorkSource(query.getWorkSource()); wrkInfo.setTaskId(dispatch.getTaskId()); wrkInfo.setLowerTaskId(dispatch.getLowerTaskId()); + wrkInfo.setVersion(0L); // 处理时间 //wrkInfo.setDisposeTime(query.getEndTime()); // 业务员名字和客户经理? @@ -613,21 +614,23 @@ public class WrkInfoServiceImpl extends ServiceImpl impl Set nickNames = StreamUtils.toSet(dispatch, DispatchDTO::getAccountManager); Result> result = userFeignService.getIdByNicknames(nickNames, SecurityConstants.INNER); if (result.isSuccess()) { - Map userIds = result.getData(); +// Map userIds = result.getData(); for (DispatchDTO dispatchDTO : dispatch) { - Long userId = userIds.get(dispatchDTO.getAccountManager()); - Assert.notNull(userId, "【{}】未设置商户", dispatchDTO.getAccountManager()); +// Long userId = userIds.get(dispatchDTO.getAccountManager()); +// Assert.notNull(userId, "【{}】未设置商户", dispatchDTO.getAccountManager()); // 组装wrkinfo实体 - WrkInfo wrkInfo = makeWrkInfoEntity(dispatchDTO, query, userId, dispatchDTO.getAccountManager(), 0); + WrkInfo wrkInfo = makeWrkInfoEntity(dispatchDTO, query, query.getUserId(), dispatchDTO.getAccountManager(), 0); save(wrkInfo); //组装wrkterminal 实体 WrkInfoTerminalRecord wrkInfoTerminalRecord = BeanUtil.copyProperties(dispatchDTO, WrkInfoTerminalRecord.class); wrkInfoTerminalRecord.setWrkId(wrkInfo.getWrkId()); + wrkInfoTerminalRecord.setVersion(0L); wrkInfoTerminalRecordService.save(wrkInfoTerminalRecord); WrkInfoStoreRecord wrkInfoStoreRecord = BeanUtil.copyProperties(dispatchDTO, WrkInfoStoreRecord.class); wrkInfoStoreRecord.setWrkId(wrkInfo.getWrkId()); wrkInfoStoreRecord.setDeptId(SecurityUtils.getDeptId()); wrkInfoStoreRecord.setStoreId(dispatchDTO.getStoreId()); + wrkInfoStoreRecord.setVersion(0L); wrkInfoStoreRecordService.save(wrkInfoStoreRecord); } } diff --git a/chushang-modules/chushang-module-inspection/inspection-service/src/main/resources/mapper/TerminalMapper.xml b/chushang-modules/chushang-module-inspection/inspection-service/src/main/resources/mapper/TerminalMapper.xml index e238851..0e46a5c 100644 --- a/chushang-modules/chushang-module-inspection/inspection-service/src/main/resources/mapper/TerminalMapper.xml +++ b/chushang-modules/chushang-module-inspection/inspection-service/src/main/resources/mapper/TerminalMapper.xml @@ -217,12 +217,19 @@ - AND t1.terminal_no in + AND t1.store_no in #{no} + + AND t1.terminal_no in + + #{no} + + + AND t1.terminal_id in