Browse Source

Merge branch 'dev' into pre-production

master
汤建军 1 year ago
parent
commit
edca01084d
  1. 2
      blade-service-api/logpm-supervise-api/src/main/java/com/logpm/supervise/vo/IndicatorsVO.java
  2. 6
      blade-service/logpm-supervise/src/main/java/com/logpm/supervise/api/ClassifyApi.java
  3. 2
      blade-service/logpm-supervise/src/main/java/com/logpm/supervise/service/IClassifyService.java
  4. 18
      blade-service/logpm-supervise/src/main/java/com/logpm/supervise/service/impl/ClassifyServiceImpl.java
  5. 50
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseUpdownStockupAreaApiController.java
  6. 8
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseUpdownStockupAreaService.java
  7. 81
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownStockupAreaServiceImpl.java

2
blade-service-api/logpm-supervise-api/src/main/java/com/logpm/supervise/vo/IndicatorsVO.java

@ -29,6 +29,8 @@ public class IndicatorsVO extends IndicatorsEntity {
private String examineDeptName;
private String deduction;
private List<PointsVO> PointsVOS = new ArrayList<>();

6
blade-service/logpm-supervise/src/main/java/com/logpm/supervise/api/ClassifyApi.java

@ -70,15 +70,15 @@ public class ClassifyApi {
@GetMapping("/myApiIndicatorsDetail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "我的考核列表")
public R myApiIndicatorsDetail(@RequestParam Long id) {
R r = classifyService.myApiIndicatorsDetail(id);
public R myApiIndicatorsDetail(@RequestParam Long id,@RequestParam Long classifyId) {
R r = classifyService.myApiIndicatorsDetail(id,classifyId);
return r;
}
@PostMapping("/updateApiIndicators")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "小程序保存考核内容", notes = "传入classify")
@ApiOperation(value = "修改考核列表", notes = "传入classify")
public R updateApiIndicators(@RequestBody IndicatorsDTO instanceofDTO) {
R r = classifyService.updateApiIndicators(instanceofDTO);
return r;

2
blade-service/logpm-supervise/src/main/java/com/logpm/supervise/service/IClassifyService.java

@ -79,7 +79,7 @@ public interface IClassifyService extends BaseService<ClassifyEntity> {
* @param id
* @return
*/
R myApiIndicatorsDetail(Long id);
R myApiIndicatorsDetail(Long id,Long classifyId);
/**
* 修改我的考核

18
blade-service/logpm-supervise/src/main/java/com/logpm/supervise/service/impl/ClassifyServiceImpl.java

@ -369,7 +369,7 @@ public class ClassifyServiceImpl extends BaseServiceImpl<ClassifyMapper, Classif
}
@Override
public R myApiIndicatorsDetail(Long id) {
public R myApiIndicatorsDetail(Long id,Long classifyId) {
IndicatorsEntity indicatorsEntity = iIndicatorsService.getById(id);
//查询是否存在有附件
List<IndicatorsAnnexEntity> list = indicatorsAnnexService.list(Wrappers.<IndicatorsAnnexEntity>query().lambda().eq(IndicatorsAnnexEntity::getIndicatorsId, id));
@ -378,13 +378,18 @@ public class ClassifyServiceImpl extends BaseServiceImpl<ClassifyMapper, Classif
if (Func.isNotEmpty(userR)) {
indicatorsVO.setCreatedUserName(userR.getData().getName());
}
if (Func.isEmpty(classifyId)){
log.error("myApiIndicatorsDetail##########参数缺失,classifyId");
return R.fail("请联系管理员");
}
//处理指标项
ClassifyEntity byId = this.getById(classifyId);
if (Func.isNotEmpty(indicatorsVO)){
Long classifyId = indicatorsVO.getClassifyId();
ClassifyEntity byId = this.getById(classifyId);
// Long classifyId = indicatorsVO.getClassifyId();
if (Func.isNotEmpty(byId)){
indicatorsVO.setClassifyId(byId.getId());
indicatorsVO.setClassifyName(byId.getName());
indicatorsVO.setDeduction(byId.getDescription());
List<PointsEntity> pointsEntities = pointsService.list(Wrappers.<PointsEntity>query().lambda()
.eq(PointsEntity::getClassifyId, byId.getId())
);
@ -398,6 +403,13 @@ public class ClassifyServiceImpl extends BaseServiceImpl<ClassifyMapper, Classif
indicatorsVO.setParentClassifyName(penantClassifyEntity.getName());
}
}
}else {
log.info("###########查询考核指标项classifyId:{}",classifyId);
indicatorsVO = new IndicatorsVO();
indicatorsVO.setClassifyId(byId.getId());
indicatorsVO.setClassifyName(byId.getName());
indicatorsVO.setDeduction(byId.getDescription());
}
if (Func.isNotEmpty(list)) {
Map<Integer, List<IndicatorsAnnexEntity>> resourceMap = list.stream().filter(item -> !Objects.isNull(item.getType())).collect(Collectors.groupingBy(IndicatorsAnnexEntity::getType));

50
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseUpdownStockupAreaApiController.java

@ -352,45 +352,47 @@ public class WarehouseUpdownStockupAreaApiController {
}
@ResponseBody
@PostMapping("/upShelfTray")
@PostMapping("/upShelfScanTray")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "上架托盘维度", notes = "传入trayTypeDTO")
public R upShelfTray(@RequestBody UpdownTypeDTO updownTypeDTO ) {
String method = "###########upShelfTray: ";
log.info(method + "上架托盘维度 updownTypeDTO={}", updownTypeDTO);
String trayCode = updownTypeDTO.getTrayCode();//托盘码
Long allocationId = updownTypeDTO.getAllocationId();
@ApiOperation(value = "备货库位上架扫描托盘", notes = "传入trayTypeDTO")
public R upShelfScanTray(@RequestBody UpdownTypeDTO updownTypeDTO ) {
String method = "###########upShelfScanTray: ";
log.info(method + "上架扫描托盘 updownTypeDTO={}", updownTypeDTO);
try{
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息不能为空");
return R.fail(403,"仓库信息不能为空");
}
if(Objects.isNull(allocationId)){
log.warn(method+"库位信息不能为空 allocationId={}",allocationId);
return R.fail(403,"库位信息不能为空");
}
if(StringUtil.isBlank(trayCode)){
log.warn(method+"托盘码不能为空 trayCode={}",trayCode);
return R.fail(403,"托盘码不能为空");
//查询该库位的货物信息
UpDownStockupAreaVO upDownStockupAreaVO = warehouseUpdownStockupAreaService.upShelfScanPackage(myCurrentWarehouse.getId(), updownTypeDTO.getOrderPackageCode());
//此包件是否已经完成上架了
if (Func.isNotEmpty(upDownStockupAreaVO)){
//查询是否上架
WarehouseUpdownStockupAreaEntity updownStockupAreaEntity = warehouseUpdownStockupAreaService.getOne(Wrappers.<WarehouseUpdownStockupAreaEntity>query().lambda()
.eq(WarehouseUpdownStockupAreaEntity::getWarehouseId, myCurrentWarehouse.getId())
.eq(WarehouseUpdownStockupAreaEntity::getAssociationValue, upDownStockupAreaVO.getAssociationValue())
.eq(WarehouseUpdownStockupAreaEntity::getAllocationId, upDownStockupAreaVO.getAssociationId())
.eq(WarehouseUpdownStockupAreaEntity::getGoodsType, upDownStockupAreaVO.getGoodsType())
);
if (Func.isNotEmpty(updownStockupAreaEntity)){
//已经在备货库位进行上架了
return Resp.scanFail("该包件已上架","该包件已上架");
}
return R.data(upDownStockupAreaVO);
}else {
return Resp.scanFail("该包件不存在","该包件不存在");
}
//上架托盘维度
R r = warehouseUpdownStockupAreaService.upShelfTray(trayCode, allocationId, myCurrentWarehouse.getId());
/* if (r.getCode() == 200) {
warehouseGoodsAllocationClient.updateAllocationCache(allocationId.toString());
}*/
return r;
}catch (CustomerException e){
log.warn(e.message);
return R.fail(e.code,e.message);
return Resp.scanFail(e.code,e.message,e.message);
}catch (Exception e){
log.error(method+"系统异常,联系管理员",e);
return R.fail(500,"系统异常,联系管理员");
}
}
}

8
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseUpdownStockupAreaService.java

@ -120,12 +120,4 @@ public interface IWarehouseUpdownStockupAreaService extends BaseService<Warehous
*/
R upShelfZeroStockeArticle(List<UpShelfZeroOrderDTO> upShelfZeroOrderList, Long allocationId, Long id);
/**
* 上架托盘
* @param trayCode
* @param allocationId
* @param id
* @return
*/
R upShelfTray(String trayCode, Long allocationId, Long id);
}

81
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownStockupAreaServiceImpl.java

@ -651,87 +651,6 @@ public class WarehouseUpdownStockupAreaServiceImpl extends BaseServiceImpl<Wareh
return R.status(this.saveBatch(warehouseUpdownStockupAreaEntities));
}
/**
* @param trayCode
* @param allocationId
* @param warehouseId
* @return
*/
@Override
public R upShelfTray(String trayCode, Long allocationId, Long warehouseId) {
int num = 0;
//判断货位是否有托盘
BasicdataTrayEntity trayEntity = warehouseTaryAllocationService.getTrayByAllocationId(allocationId);
if(!Objects.isNull(trayEntity)){
log.warn("##############upShelfTray: 库位上已有托盘 allocationId={}",allocationId);
log.warn("##############upShelfTray: 库位上已有托盘 allocationId={}",allocationId);
// return R.fail(403,"库位上已有托盘");
}
// QueryWrapper<WarehouseUpdownTypeEntity> updownTypeEntityQueryWrapper = new QueryWrapper<>();
// updownTypeEntityQueryWrapper.eq("allocation_id",allocationId)
// .eq("is_deleted",0);
// WarehouseUpdownTypeEntity updownTypeEntity = baseMapper.selectOne(updownTypeEntityQueryWrapper);
// if(!Objects.isNull(updownTypeEntity)){
// log.warn("##############upShelfTray: 库位上已存在货物 allocationId={}",allocationId);
// return R.fail(403,"库位上已存在货物");
// }
BasicdataGoodsAllocationEntity goodsAllocationEntity = basicdataGoodsAllocationClient.getEntityByAllocationId(allocationId);
if(Objects.isNull(goodsAllocationEntity)){
log.warn("##############upShelfTray: 库位不存在 allocationId={}",allocationId);
return R.fail(403,"库位不存在");
}
String enableStatus = goodsAllocationEntity.getEnableStatus();
Long goodsShelfId = goodsAllocationEntity.getGoodsShelfId();
if("2".equals(enableStatus)){
log.warn("##############upShelfTray: 库位已被禁用 allocationId={}",allocationId);
return R.fail(403,"库位已被禁用");
}
BasicdataGoodsShelfEntity goodsShelfEntity = basicdataGoodsShelfClient.getEntityByGoodsShelfId(goodsShelfId);
if(Objects.isNull(goodsShelfEntity)){
log.warn("##############upShelfTray: 货架不存在 goodsShelfId={}",goodsShelfId);
return R.fail(403,"货架不存在");
}
Long goodsAreaId = goodsShelfEntity.getGoodsAreaId();
BasicdataGoodsAreaEntity goodsAreaEntity = basicdataGoodsAreaClient.getEntityByGoodsAreaId(goodsAreaId);
if(Objects.isNull(goodsAreaEntity)){
log.warn("##############upShelfTray: 货区不存在 goodsAreaId={}",goodsAreaId);
return R.fail(403,"货区不存在");
}
// String areaType = goodsAreaEntity.getAreaType();
// if("1".equals(areaType)){
// log.warn("#################upShelfTray: 备货区不能上下架 goodsAreaId={}",goodsAreaId);
// throw new CustomerException(403,"备货区不能上下架");
// }
Long wid = goodsAreaEntity.getWarehouseId();
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(wid);
if(Objects.isNull(warehouseEntity)){
log.warn("##############upShelfTray: 仓库不存在 warehouseId={}",wid);
return R.fail(403,"仓库不存在");
}
if(!wid.equals(warehouseId)){
log.warn("##############upShelfTray: 库位不在本仓库中 warehouseId={}",warehouseId);
return R.fail(403,"库位不在本仓库中");
}
//查询托盘上有哪些货物,存入相同的绑定关系和记录
QueryWrapper<WarehouseTrayTypeEntity> trayTypeEntityQueryWrapper = new QueryWrapper<>();
trayTypeEntityQueryWrapper.eq("tray_code",trayCode)
.eq("is_deleted",0);
WarehouseTrayTypeEntity trayTypeEntity = warehouseTrayTypeService.getOne(trayTypeEntityQueryWrapper);
if(Objects.isNull(trayTypeEntity)){
log.warn("##############upShelfTray: 托盘上没有货物信息 trayCode={}",trayCode);
return R.fail(403,"托盘上没有货物信息");
}
//处理托盘上的货物到库位上
return saveTrayGoodsToAllocation(trayTypeEntity,goodsAllocationEntity,goodsShelfEntity,goodsAreaEntity,warehouseId);
// return null;
}
private R saveTrayGoodsToAllocation(WarehouseTrayTypeEntity trayTypeEntity, BasicdataGoodsAllocationEntity goodsAllocationEntity, BasicdataGoodsShelfEntity goodsShelfEntity, BasicdataGoodsAreaEntity goodsAreaEntity, Long warehouseId) {
return null;
}
private WarehouseUpdownStockupAreaEntity createdNewUpShelfInventory(Long allocationId, Long warehouseId, UpShelfStockDTO upShelfStockDTO, WarehouseUpdownStockupAreaEntity updownTypeEntity, Long goodsAreaId, BasicdataGoodsAreaEntity goodsAreaEntity, Long goodsShelfId, BasicdataGoodsShelfEntity goodsShelfEntity, BasicdataGoodsAllocationEntity goodsAllocationEntity) {
WarehouseUpdownStockupAreaEntity updownStockupAreaEntity = new WarehouseUpdownStockupAreaEntity();

Loading…
Cancel
Save