Merge branch 'devlop' of http://47.97.1.152:5880/r/wms-master into devlop
|  |  |  | 
|---|
|  |  |  | "/pda/login", | 
|---|
|  |  |  | "/erp/**", | 
|---|
|  |  |  | "/login", | 
|---|
|  |  |  | "/**/download", | 
|---|
|  |  |  | "/register", | 
|---|
|  |  |  | "/druid/**", | 
|---|
|  |  |  | "/doc.html", | 
|---|
|  |  |  | 
|---|
|  |  |  | @TableField(exist = false) | 
|---|
|  |  |  | private Integer flagWare; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @TableField(exist = false) | 
|---|
|  |  |  | @ApiModelProperty("用于仓库树状图,唯一索引") | 
|---|
|  |  |  | private Long index; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public Warehouse() {} | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.service.CompanysService; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.service.ShipperService; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.service.WarehouseService; | 
|---|
|  |  |  | import io.swagger.annotations.Api; | 
|---|
|  |  |  | import org.springframework.format.annotation.DateTimeFormat; | 
|---|
|  |  |  | import java.text.SimpleDateFormat; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  | 
|---|
|  |  |  | @TableField(exist = false) | 
|---|
|  |  |  | @ApiModelProperty("是否仓库") | 
|---|
|  |  |  | private Integer flagWare; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @TableField(exist = false) | 
|---|
|  |  |  | @ApiModelProperty("用于仓库树状图,唯一索引") | 
|---|
|  |  |  | private Long index; | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 备注 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | 
|---|
|  |  |  | @Transactional(rollbackFor = Exception.class) | 
|---|
|  |  |  | public R initLocs(LocMastInitParam param, Long loginUserId) { | 
|---|
|  |  |  | //清空表 | 
|---|
|  |  |  | this.baseMapper.deleteAll(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //        this.baseMapper.deleteAll(); | 
|---|
|  |  |  | //清空当前库区库位 | 
|---|
|  |  |  | List<Loc> locs = this.list(new LambdaQueryWrapper<Loc>().eq(Loc::getWarehouseId, param.getWarehouseId()).eq(Loc::getAreaId, param.getAreaId())); | 
|---|
|  |  |  | if (!locs.isEmpty()) { | 
|---|
|  |  |  | if (!this.remove(new LambdaQueryWrapper<Loc>().eq(Loc::getWarehouseId, param.getWarehouseId()).eq(Loc::getAreaId, param.getAreaId()))) { | 
|---|
|  |  |  | throw new CoolException("初始化失败:数据删除失败!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | WarehouseAreas warehouseAreas = warehouseAreasService.getOne(new LambdaQueryWrapper<WarehouseAreas>() | 
|---|
|  |  |  | .eq(WarehouseAreas::getWarehouseId, param.getWarehouseId()) | 
|---|
|  |  |  | .eq(WarehouseAreas::getId, param.getAreaId())); | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | warehouses.forEach(warehouse -> { | 
|---|
|  |  |  | warehouse.setFlagWare(1); | 
|---|
|  |  |  | //仓库ID和库区ID有可能重复,拼接仓库ID,组成唯一索引 | 
|---|
|  |  |  | warehouse.setIndex(warehouse.getId()); | 
|---|
|  |  |  | List<WarehouseAreas> areas = new ArrayList<>(); | 
|---|
|  |  |  | warehouseAreas.forEach(warehouseAreas1 -> { | 
|---|
|  |  |  | if (warehouse.getId().equals(warehouseAreas1.getWarehouseId())) { | 
|---|
|  |  |  | warehouseAreas1.setFlagWare(0); | 
|---|
|  |  |  | //仓库ID和库区ID有可能重复,拼接仓库ID,组成唯一索引 | 
|---|
|  |  |  | String s = warehouseAreas1.getId() + "" + warehouseAreas1.getWarehouseId(); | 
|---|
|  |  |  | warehouseAreas1.setIndex(Long.parseLong(s)); | 
|---|
|  |  |  | areas.add(warehouseAreas1); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | 
|---|
|  |  |  | call-setters-on-nulls: true | 
|---|
|  |  |  | global-config: | 
|---|
|  |  |  | :banner: false | 
|---|
|  |  |  | db-config: | 
|---|
|  |  |  | id-type: auto | 
|---|
|  |  |  | #    db-config: | 
|---|
|  |  |  | #      id-type: auto | 
|---|
|  |  |  | #      logic-delete-value: 1 | 
|---|
|  |  |  | #      logic-not-delete-value: 0 | 
|---|
|  |  |  |  | 
|---|