Browse Source

Merge branch 'dev' into pre-production

master
zhenghaoyu 1 year ago
parent
commit
2d9d87b359
  1. 3
      blade-service-api/logpm-supervise-api/src/main/java/com/logpm/supervise/vo/IndicatorsVO.java
  2. 2
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml
  3. 19
      blade-service/logpm-supervise/src/main/java/com/logpm/supervise/service/impl/ClassifyServiceImpl.java
  4. 9
      blade-service/logpm-supervise/src/main/java/com/logpm/supervise/service/impl/IndicatorsServiceImpl.java
  5. 23
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  6. 42
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseUpdownStockupAreaApiController.java
  7. 9
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseUpdownStockupAreaService.java
  8. 84
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownStockupAreaServiceImpl.java

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

@ -2,7 +2,6 @@ package com.logpm.supervise.vo;
import com.logpm.supervise.entity.IndicatorsAnnexEntity;
import com.logpm.supervise.entity.IndicatorsEntity;
import com.logpm.supervise.entity.PointsEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -37,4 +36,6 @@ public class IndicatorsVO extends IndicatorsEntity {
private List<IndicatorsAnnexEntity> files = new ArrayList<>();
private Integer isEdit;
}

2
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml

@ -160,7 +160,7 @@ date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d
<if test="param.workOrderStatus != null and param.workOrderStatus != '' and param.handleStatus != 40 "> and lawo.work_order_status in ( #{param.workOrderStatus }) </if>
<!-- <if test="param.workOrderStatus != null and param.workOrderStatus != '' and param.customerServiceState == null "> and lawo.work_order_status in ( #{param.workOrderStatus }) and lap.types_of = '2' </if>-->
<if test="param.handleStatus != null and param.handleStatus == 40 "> and lawo.work_order_status in ('10') and lap.types_of = '2' and lap.processing_status in ('1') </if>
<if test="param.handleStatus != null and param.handleStatus == 50 "> and lawo.work_order_status in ('30') and lap.types_of = '2' and lap.processing_status in ('1') </if>
<if test="param.handleStatus != null and param.handleStatus == 50 "> and lawo.work_order_status in ('20') and lap.types_of = '2' </if>
<if test="param.handleStatus!= null and param.handleStatus == 10 ">and lap.types_of = '2' </if>
<if test="param.handleStatus!= null and param.handleStatus == 30">and lawo.work_order_status in (21,30) and lap.processing_status = '4' </if>
<if test="param.handleStatus!= null and param.handleStatus == 20 ">and lawo.work_order_status in (80,100) and lacr.warehouse_id=#{param.warehouseId} </if>

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

@ -124,15 +124,16 @@ public class ClassifyServiceImpl extends BaseServiceImpl<ClassifyMapper, Classif
Long deptId = record.getCreateDept();
String deptName = deptClient.findNameById(deptId);
record.setCreateDeptName(deptName);
if (!"1".equals(isPid)) {
String ancestors = deptClient.getAncestorsByDeptId(deptId);
boolean contains = ancestors.contains(loginDeptId);
if(contains){
record.setIsEdit(1);
}else{
record.setIsEdit(0);
}
String ancestors = deptClient.getAncestorsByDeptId(deptId);
boolean contains = ancestors.contains(loginDeptId);
if(contains){
record.setIsEdit(1);
}else{
record.setIsEdit(0);
}
if (!"1".equals(isPid)) {
Long classifyId = record.getId();
Long pId1 = record.getPId();
ClassifyEntity classifyEntity = getById(pId1);
@ -265,7 +266,7 @@ public class ClassifyServiceImpl extends BaseServiceImpl<ClassifyMapper, Classif
.eq(IndicatorsEntity::getAssessDept, l)
.eq(IndicatorsEntity::getClassifyId, entity.getId())
);
if (Func.isNotEmpty(indicatorsEntityList) && indicatorsEntityList.size()>1){
if (Func.isNotEmpty(indicatorsEntityList) && indicatorsEntityList.size()>= 1){
classifyApiVO.setIsCommit(1);
}
}

9
blade-service/logpm-supervise/src/main/java/com/logpm/supervise/service/impl/IndicatorsServiceImpl.java

@ -14,6 +14,7 @@ import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.utils.CommonUtil;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.system.entity.User;
import org.springblade.system.feign.IDeptClient;
@ -58,10 +59,18 @@ public class IndicatorsServiceImpl extends BaseServiceImpl<IndicatorsMapper, Ind
List<IndicatorsVO> records = pages.getRecords();
Long userId = AuthUtil.getUserId();
for (IndicatorsVO record : records) {
Long deptId = record.getCreateDept();
String deptName = deptClient.findNameById(deptId);
record.setCreateDeptName(deptName);
Long createUser = record.getCreateUser();
if(userId.equals(createUser)){
record.setIsEdit(1);
}else{
record.setIsEdit(0);
}
}
pages.setRecords(records);

23
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

@ -943,20 +943,25 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
String endWarehouseIds = loadEntity.getEndWarehouseIds();
String allWarehouseIds = startWarehouseId+","+endWarehouseIds;
String loadType1 = loadEntity.getLoadType();
Long nowWarehouseId = loadEntity.getNowWarehouseId();
if(!nowWarehouseId.equals(warehouseId)){
log.warn("###############selectEditDetailByLoadId: 配载计划不在当前节点 nowWarehouseId={} warehouseId={}",nowWarehouseId,warehouseId);
return R.fail(405,"配载计划不在当前节点");
}
TrunklineCarsLoadLineEntity endCarsLoadLineEntity = trunklineCarsLoadLineService.findEndNodeByLoadId(loadId);
if(Objects.isNull(endCarsLoadLineEntity)){
log.warn("###############selectEditDetailByLoadId: 终点节点信息不存在 loadId={}",loadId);
return R.fail(405,"终点节点信息不存在");
}
Long endNodeId = endCarsLoadLineEntity.getNodeId();
if(endNodeId.equals(warehouseId)){
log.warn("###############selectEditDetailByLoadId: 终点节点不能编辑配载 loadId={}",loadId);
return R.fail(405,"终点节点不能编辑配载");
if(!"4".equals(loadType1)){
TrunklineCarsLoadLineEntity endCarsLoadLineEntity = trunklineCarsLoadLineService.findEndNodeByLoadId(loadId);
if(Objects.isNull(endCarsLoadLineEntity)){
log.warn("###############selectEditDetailByLoadId: 终点节点信息不存在 loadId={}",loadId);
return R.fail(405,"终点节点信息不存在");
}
Long endNodeId = endCarsLoadLineEntity.getNodeId();
if(endNodeId.equals(warehouseId)){
log.warn("###############selectEditDetailByLoadId: 终点节点不能编辑配载 loadId={}",loadId);
return R.fail(405,"终点节点不能编辑配载");
}
}
TrunklineCarsLoadLineEntity carsLoadLineEntity = trunklineCarsLoadLineService.findEntityByLoadIdAndNodeId(loadId, warehouseId);

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

@ -351,4 +351,46 @@ public class WarehouseUpdownStockupAreaApiController {
}
}
@ResponseBody
@PostMapping("/upShelfTray")
@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();
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,"托盘码不能为空");
}
//上架托盘维度
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);
}catch (Exception e){
log.error(method+"系统异常,联系管理员",e);
return R.fail(500,"系统异常,联系管理员");
}
}
}

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

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

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

@ -98,6 +98,8 @@ public class WarehouseUpdownStockupAreaServiceImpl extends BaseServiceImpl<Wareh
private final WarehouseGoodsAllocationClient warehouseGoodsAllocationClient;
private final IWarehouseTaryAllocationService warehouseTaryAllocationService;
@ -649,6 +651,88 @@ 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();
updownStockupAreaEntity.setWarehouseId(warehouseId);

Loading…
Cancel
Save