| | |
| | | } |
| | | } |
| | | |
| | | |
| | | // 数据库 ID 重复校验,确保新生成的 ID 在数据库中不存在 |
| | | while (this.checkIdExists(companyId, cacheId)) { |
| | | String temp = cacheId.substring(cacheId.length() - 4); |
| | | Integer i = Integer.valueOf(temp); |
| | | i++; |
| | | temp = String.valueOf(i); |
| | | if (temp.length() == 1) { |
| | | cacheId = timeKey + "000" + temp; |
| | | } |
| | | if (temp.length() == 2) { |
| | | cacheId = timeKey + "00" + temp; |
| | | } |
| | | if (temp.length() == 3) { |
| | | cacheId = timeKey + "0" + temp; |
| | | } |
| | | if (temp.length() == 4) { |
| | | cacheId = timeKey + temp; |
| | | } |
| | | } |
| | | |
| | | // 更新缓存 |
| | | redisCache.setCacheObject(cacheKey, cacheId); |
| | | |
| | | return cacheId; |
| | | } |
| | | |
| | | /** |
| | | * 检查 ID 是否在数据库中已存在 |
| | | * |
| | | * @param companyId |
| | | * @param id |
| | | * @return true-已存在,false-不存在 |
| | | */ |
| | | public boolean checkIdExists(String companyId, String id) { |
| | | QueryWrapper<InoutRecord> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("company_id", companyId); |
| | | queryWrapper.eq("id", id); |
| | | InoutRecord record = inoutRecordMapper.selectOne(queryWrapper); |
| | | return null != record; |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | queryWrapper.eq("company_id", companyId); |
| | | queryWrapper.like("id", timeKey); |
| | | queryWrapper.orderByDesc("create_time"); |
| | | |
| | | queryWrapper.orderByDesc("register_time"); |
| | | queryWrapper.orderByDesc("id"); |
| | | List<InoutRecord> inoutRecords = inoutRecordMapper.selectList(queryWrapper); |
| | | if (null == inoutRecords || inoutRecords.isEmpty()) { |
| | | return null; |
| | |
| | | <Property></Property> |
| | | <Property name="label">装卸仓库</Property> |
| | | <Property name="mapping"> |
| | | <Property name="mapValues">${dorado.getDataProvider("depotPR#getData").getResult()}</Property> |
| | | <Property name="mapValues">${dorado.getDataProvider("depotPR#getDepotByUserType").getResult()}</Property> |
| | | <Property name="keyProperty">id</Property> |
| | | <Property name="valueProperty">name</Property> |
| | | </Property> |
| | |
| | | <Property></Property> |
| | | <Property name="label">装卸仓库</Property> |
| | | <Property name="mapping"> |
| | | <Property name="mapValues">${dorado.getDataProvider("depotPR#getData").getResult()}</Property> |
| | | <Property name="mapValues">${dorado.getDataProvider("depotPR#getDepotByUserType").getResult()}</Property> |
| | | <Property name="keyProperty">id</Property> |
| | | <Property name="valueProperty">name</Property> |
| | | </Property> |
| | |
| | | <Property></Property> |
| | | <Property name="label">装卸仓库</Property> |
| | | <Property name="mapping"> |
| | | <Property name="mapValues">${dorado.getDataProvider("depotPR#getData").getResult()}</Property> |
| | | <Property name="mapValues">${dorado.getDataProvider("depotPR#getDepotByUserType").getResult()}</Property> |
| | | <Property name="keyProperty">id</Property> |
| | | <Property name="valueProperty">name</Property> |
| | | </Property> |
| | |
| | | <Property></Property> |
| | | <Property name="label">装卸仓库</Property> |
| | | <Property name="mapping"> |
| | | <Property name="mapValues">${dorado.getDataProvider("depotPR#getData").getResult()}</Property> |
| | | <Property name="mapValues">${dorado.getDataProvider("depotPR#getDepotByUserType").getResult()}</Property> |
| | | <Property name="keyProperty">id</Property> |
| | | <Property name="valueProperty">name</Property> |
| | | </Property> |
| | |
| | | List<InoutRecord> list = new ArrayList<>(); |
| | | //获取分库编码对应的分库名称 |
| | | String deptName = ""; |
| | | SysDept subDept = sysDeptService.getCacheDept(null, ContextUtil.subDeptId(null)); |
| | | String deptId= ContextUtil.subDeptId(null); |
| | | if (StringUtils.isNotBlank(param.getDeptId())){ |
| | | deptId=param.getDeptId(); |
| | | } |
| | | SysDept subDept = sysDeptService.getCacheDept(null,deptId); |
| | | if (null != subDept) { |
| | | deptName = subDept.getDeptName(); |
| | | } |
| | | |
| | | |
| | | String exportTimeDesc = ""; |
| | | String exportCreateUser = ""; |
| | | Date exportCreateTime = new Date(); |
| | |
| | | .stream() |
| | | .collect(Collectors.toMap(Dept::getId, Dept::getKqmc, (key1, key2) -> key2)); |
| | | // 创建仓库ID到名称的映射 |
| | | Map<String, String> depotMap = Optional.ofNullable(depotPR.getData(null)) |
| | | Map<String, String> depotMap = Optional.ofNullable(depotPR.getData(ContextUtil.getCompanyId())) |
| | | .orElse(new ArrayList<>()) |
| | | .stream() |
| | | .collect(Collectors.toMap(Depot::getId, Depot::getName, (key1, key2) -> key2)); |