提交 69a908b9 authored 作者: zhoushaopan's avatar zhoushaopan

feat(装备模块): 修改装备库房位置为0

修改装备库房位置为0
上级 bfb6c8f3
......@@ -502,7 +502,7 @@ public class AllotBillController {
deviceLibraryEntity.setLifeStatus(2);
deviceLibraryEntity.setOwnUnit(userUtils.getCurrentUserUnitName());
deviceLibraryEntity.setManageStatus(1);
deviceLibraryEntity.setStorageLocationId(null);
deviceLibraryEntity.setStorageLocationId(0);
deviceLibraryEntity.setStorageLocation(null);
deviceIds.add(id);
//如果接收时填写了生产号
......@@ -531,7 +531,7 @@ public class AllotBillController {
//存装备日志
DeviceLogDto deviceLogDto = new DeviceLogDto(id, "接收入库丢失", fileVoList, taskBto.getId(), taskBto.getId());
deviceLogService.addLog(deviceLogDto);
deviceLibraryEntity.setStorageLocationId(null);
deviceLibraryEntity.setStorageLocationId(0);
deviceLibraryEntity.setStorageLocation(null);
deviceLibraryService.update(deviceLibraryEntity);
deviceIds.add(id);
......@@ -891,7 +891,7 @@ public class AllotBillController {
deviceLibrary.setLifeStatus(2);
deviceLibrary.setOwnUnit(allotBill.getReceiveUnit());
deviceLibrary.setManageStatus(1);
deviceLibrary.setStorageLocationId(null);
deviceLibrary.setStorageLocationId(0);
deviceLibrary.setStorageLocation(null);
deviceLibraryService.update(deviceLibrary);
});
......
......@@ -323,7 +323,7 @@ public class BackController {
deviceLibraryEntity.setLifeStatus(2);
deviceLibraryEntity.setOwnUnit(userUtils.getCurrentUserUnitName());
deviceLibraryEntity.setManageStatus(1);
deviceLibraryEntity.setStorageLocationId(null);
deviceLibraryEntity.setStorageLocationId(0);
deviceLibraryEntity.setStorageLocation(null);
//判断是签字入库还是签章入库
DeviceLogDto deviceLogDto = new DeviceLogDto();
......@@ -345,7 +345,7 @@ public class BackController {
//改变装备状态
DeviceLibrary deviceLibraryEntity = deviceLibraryService.getOne(id);
deviceLibraryEntity.setLifeStatus(11);
deviceLibraryEntity.setStorageLocationId(null);
deviceLibraryEntity.setStorageLocationId(0);
deviceLibraryEntity.setStorageLocation(null);
//存装备日志
// DeviceLogDto deviceLogDto = new DeviceLogDto(id, "接收入库丢失", fileVoList,taskBto.getId(),null);
......@@ -523,7 +523,7 @@ public class BackController {
deviceLibrary.setLifeStatus(2);
deviceLibrary.setOwnUnit(allotBackBill.getReceiveUnit());
deviceLibrary.setManageStatus(1);
deviceLibrary.setStorageLocationId(null);
deviceLibrary.setStorageLocationId(0);
deviceLibrary.setStorageLocation(null);
deviceLibraryService.update(deviceLibrary);
});
......
......@@ -14,6 +14,7 @@ import com.tykj.dev.device.library.subject.domin.DeviceLibraryPosition;
import com.tykj.dev.device.library.subject.domin.DeviceLog;
import com.tykj.dev.device.library.subject.model.vo.QueryTheWarehouseVo;
import com.tykj.dev.device.library.subject.vo.*;
import com.tykj.dev.device.user.cache.StoreCache;
import com.tykj.dev.device.user.cache.UnitsCache;
import com.tykj.dev.device.user.subject.entity.Units;
import com.tykj.dev.device.user.subject.service.UnitStoreLocationService;
......@@ -91,6 +92,9 @@ public class DeviceLibraryController {
@Autowired
private UnitsService unitsService;
@Resource
private StoreCache storeCache;
// @Resource
// private DeviceLibraryPositionService deviceLibraryPositionService;
......@@ -523,7 +527,8 @@ public class DeviceLibraryController {
Map<Integer,String> matchingRangeMap = configCache.getMatchingRangeMap();
//形态
Map<Integer, String> styleMap = configCache.getStyleMap();
//库房
Map<Integer, String> idMap = storeCache.getIdMap();
Set<Integer> status = new HashSet<>();
List<String> models = new ArrayList<>();
//排序
......@@ -533,7 +538,7 @@ public class DeviceLibraryController {
Set<Integer> matchingRanges = new HashSet<>();
//添加装备形态
Set<Integer> types = new HashSet<>();
Set<String> storageLocation = new HashSet<>();
Set<Integer> storageLocationIds = new HashSet<>();
resultList.forEach(deviceVo -> {
// deviceVo.setConfigName();
status.add(deviceVo.getLifeStatus());
......@@ -544,7 +549,8 @@ public class DeviceLibraryController {
matchingRanges.add(deviceVo.getMatchingRange());
//添加形态
types.add(deviceVo.getType());
storageLocation.add(deviceVo.getStorageLocation());
// storageLocation.add(deviceVo.getStorageLocation());
storageLocationIds.add(deviceVo.getStorageLocationId());
});
List<String> finalModels = models.stream().distinct().collect(Collectors.toList());
List<String> modelToSort = DeviceModelSort.modelToSort(finalModels);
......@@ -560,7 +566,8 @@ public class DeviceLibraryController {
Page<DeviceLibrary> deviceLibraryEntities = PageUtil.getPerPage(deviceLibrarySelectVo.getPage(), deviceLibrarySelectVo.getSize(), containList, deviceLibrarySelectVo.getPageable());
map.put("pages",deviceLibraryEntities);
map.put("types",types.stream().map(integer -> new TypeVo(integer,styleMap.get(integer))).collect(Collectors.toList()));
map.put("storageLocation",storageLocation);
map.put("storageLocation",storageLocationIds.stream().map(integer -> new StorageLocationVo(integer,idMap.getOrDefault(integer,null)))
.collect(Collectors.toList()));
return ResultUtil.success(map);
}
......
......@@ -37,6 +37,9 @@ public class QueryTheWarehouseVo extends CustomPage {
@ApiModelProperty(value = "出库")
private Integer out;
@ApiModelProperty(value = "库房id")
private Integer nonStorageLocationId;
// @ApiModelProperty(value = "库房id")
// private Integer nonStorageLocationId;
@ApiModelProperty(value = "库房id的集合")
private List<Integer> StorageLocationIds;
}
......@@ -141,8 +141,8 @@ public class DeviceLibrarySelectVo extends CustomPage {
@ApiModelProperty(value = "库房ids")
private List<Integer> storageLocationIds;
@ApiModelProperty(value = "库房id")
private Integer nonStorageLocationId;
// @ApiModelProperty(value = "库房id")
// private Integer nonStorageLocationId;
@ApiModelProperty(value = "装备序列号", example = "123-1")
public String seqNumber;
......
package com.tykj.dev.device.library.subject.vo;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("库房位置的vo")
public class StorageLocationVo {
@ApiModelProperty(value = "id")
private Integer storageLocationId;
@ApiModelProperty(value = "名称")
private String storageLocation;
}
......@@ -597,7 +597,7 @@ public class RepairController {
if (level == 1) {
deviceLibraryEntity.setLifeStatus(4);
deviceLibraryEntity.setLocationUnit(repairBillSaveVo.getReceiveUnit());
deviceLibraryEntity.setStorageLocationId(null);
deviceLibraryEntity.setStorageLocationId(0);
deviceLibraryEntity.setStorageLocation(null);
} else {
deviceLibraryEntity.setLifeStatus(4);
......@@ -780,7 +780,7 @@ public class RepairController {
deviceLibraryEntity.setLifeStatus(4);
deviceLibraryEntity.setLocationUnit(repairBill.getReceiveUnit());
deviceLibraryEntity.setManageStatus(1);
deviceLibraryEntity.setStorageLocationId(null);
deviceLibraryEntity.setStorageLocationId(0);
deviceLibraryEntity.setStorageLocation(null);
//存装备日志
// DeviceLogDto deviceLogDto = new DeviceLogDto(id, "接收并发起入库", fileVoList, taskBto.getId());
......@@ -798,7 +798,7 @@ public class RepairController {
//改变装备状态
DeviceLibrary deviceLibraryEntity = deviceLibraryService.getOne(id);
deviceLibraryEntity.setLifeStatus(11);
deviceLibraryEntity.setStorageLocationId(null);
deviceLibraryEntity.setStorageLocationId(0);
deviceLibraryEntity.setStorageLocation(null);
//存装备日志
// DeviceLogDto deviceLogDto = new DeviceLogDto(id, "接收入库丢失", fileVoList, taskBto.getId());
......@@ -1358,7 +1358,7 @@ public class RepairController {
DeviceLibrary deviceLibraryEntity = deviceLibraryService.getOne(id);
deviceLibraryEntity.setLocationUnit(repairBackBill.getReceiveUnit());
deviceLibraryEntity.setStorageLocation(null);
deviceLibraryEntity.setStorageLocationId(null);
deviceLibraryEntity.setStorageLocationId(0);
//如果所属和所在一致,状态改为在库
if (deviceLibraryEntity.getOwnUnit().equals(deviceLibraryEntity.getLocationUnit())) {
deviceLibraryEntity.setLifeStatus(2);
......@@ -2367,7 +2367,7 @@ public class RepairController {
deviceLogService.addLog(deviceLogDto);
DeviceLibrary deviceLibraryEntity = deviceLibraryService.getOne(integer);
deviceLibraryEntity.setLocationUnit(repairBackBill.getReceiveUnit());
deviceLibraryEntity.setStorageLocationId(null);
deviceLibraryEntity.setStorageLocationId(0);
deviceLibraryEntity.setStorageLocation(null);
if (deviceLibraryEntity.getOwnUnit().equals(repairBackBill.getReceiveUnit())){
......@@ -2508,7 +2508,7 @@ public class RepairController {
deviceLibraryEntity.setManageStatus(1);
//设置为空
deviceLibraryEntity.setStorageLocation(null);
deviceLibraryEntity.setStorageLocationId(null);
deviceLibraryEntity.setStorageLocationId(0);
deviceLibraryService.update(deviceLibraryEntity);
// DeviceLogDto deviceLogDto = new DeviceLogDto(integer, "上传维修单", fileVoList, taskBto.getId());
DeviceLogDto deviceLogDto = new DeviceLogDto(integer, "上传维修单", fileVoList, taskBto.getId(),taskBto.getId());
......@@ -3059,7 +3059,7 @@ public class RepairController {
deviceLibraryEntity.setLifeStatus(4);
deviceLibraryEntity.setLocationUnit(repairBillSaveVo.getReceiveUnit());
deviceLibraryEntity.setStorageLocation(null);
deviceLibraryEntity.setStorageLocationId(null);
deviceLibraryEntity.setStorageLocationId(0);
}
deviceLibraryEntity.setManageStatus(0);
deviceLibraryService.update(deviceLibraryEntity);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论