Browse Source

1.考核-指标管理按钮权限修复

chenglong
zhenghaoyu 1 year ago
parent
commit
86a1886ba8
  1. 3
      blade-service-api/logpm-supervise-api/src/main/java/com/logpm/supervise/vo/IndicatorsVO.java
  2. 3
      blade-service/logpm-supervise/src/main/java/com/logpm/supervise/service/impl/ClassifyServiceImpl.java
  3. 9
      blade-service/logpm-supervise/src/main/java/com/logpm/supervise/service/impl/IndicatorsServiceImpl.java
  4. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.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.IndicatorsAnnexEntity;
import com.logpm.supervise.entity.IndicatorsEntity; import com.logpm.supervise.entity.IndicatorsEntity;
import com.logpm.supervise.entity.PointsEntity;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
@ -37,4 +36,6 @@ public class IndicatorsVO extends IndicatorsEntity {
private List<IndicatorsAnnexEntity> files = new ArrayList<>(); private List<IndicatorsAnnexEntity> files = new ArrayList<>();
private Integer isEdit;
} }

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

@ -124,7 +124,7 @@ public class ClassifyServiceImpl extends BaseServiceImpl<ClassifyMapper, Classif
Long deptId = record.getCreateDept(); Long deptId = record.getCreateDept();
String deptName = deptClient.findNameById(deptId); String deptName = deptClient.findNameById(deptId);
record.setCreateDeptName(deptName); record.setCreateDeptName(deptName);
if (!"1".equals(isPid)) {
String ancestors = deptClient.getAncestorsByDeptId(deptId); String ancestors = deptClient.getAncestorsByDeptId(deptId);
boolean contains = ancestors.contains(loginDeptId); boolean contains = ancestors.contains(loginDeptId);
if(contains){ if(contains){
@ -133,6 +133,7 @@ public class ClassifyServiceImpl extends BaseServiceImpl<ClassifyMapper, Classif
record.setIsEdit(0); record.setIsEdit(0);
} }
if (!"1".equals(isPid)) {
Long classifyId = record.getId(); Long classifyId = record.getId();
Long pId1 = record.getPId(); Long pId1 = record.getPId();
ClassifyEntity classifyEntity = getById(pId1); ClassifyEntity classifyEntity = getById(pId1);

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

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

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

Loading…
Cancel
Save