Commit 0912a7f1 authored by suhuiguang's avatar suhuiguang

1.anysc不器作用解决

parent 2ea72259
......@@ -15,6 +15,7 @@ import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.privilege.model.CompanyModel;
import com.yeejoin.amos.feign.privilege.model.DepartmentModel;
import com.yeejoin.amos.feign.privilege.model.RoleModel;
import org.apache.commons.lang3.ObjectUtils;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
......@@ -68,7 +69,12 @@ public class ControllerAop {
public void doBefore(JoinPoint joinPoint) {
PermissionInterceptorContext.clean();
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletRequest request = attributes.getRequest();
HttpServletRequest request = null;
if(ObjectUtils.isNotEmpty(attributes)){
request = attributes.getRequest();
} else {
return;
}
// 不需要添加请求头的接口
String[] url = new String[]{"/api/user/save/curCompany", "/jcs/command/lookHtmlText",
"/jcs/common/duty-person/findByDutyAreaId", "/tzs/wechatBack", "/tzs/elevator/getElevatorInfo"};
......
......@@ -11,6 +11,7 @@ import java.util.stream.Collectors;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import com.yeejoin.equipmanage.common.utils.*;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
......@@ -62,12 +63,6 @@ import com.yeejoin.equipmanage.common.enums.IndustryEnum;
import com.yeejoin.equipmanage.common.enums.OnBoardEquipmentEnum;
import com.yeejoin.equipmanage.common.enums.SystemDicTypeEum;
import com.yeejoin.equipmanage.common.enums.TrueOrFalseEnum;
import com.yeejoin.equipmanage.common.utils.CommonResponseUtil;
import com.yeejoin.equipmanage.common.utils.DateUtils;
import com.yeejoin.equipmanage.common.utils.NameUtils;
import com.yeejoin.equipmanage.common.utils.ParsePropertyUtil;
import com.yeejoin.equipmanage.common.utils.QRCodeUtil;
import com.yeejoin.equipmanage.common.utils.StringUtil;
import com.yeejoin.equipmanage.common.vo.CarForUE4VO;
import com.yeejoin.equipmanage.common.vo.CarInfosResponse;
import com.yeejoin.equipmanage.common.vo.EquipStateOnCarVo;
......@@ -238,7 +233,8 @@ public class CarController extends AbstractBaseController {
});
}
Car car2= iCarService.saveOne(car);
refreshCount(car.getBizOrgCode());
CarController controllerProxy = SpringUtils.getBean(CarController.class);
controllerProxy.refreshCount(car.getBizOrgCode());
return car2;
}
......@@ -321,6 +317,8 @@ public class CarController extends AbstractBaseController {
// saveFile(carInstance);视频图片文件后期统一处理
EquipmentSpecificSerivceImpl.registerMqttTopic(car.getIotCode(), equipmentIotMqttReceiveConfig);
Car car1= iCarService.updateOneById(car);
CarController controllerProxy = SpringUtils.getBean(CarController.class);
controllerProxy.refreshCount(car.getBizOrgCode());
refreshCount(car.getBizOrgCode());
return car1;
}
......@@ -1099,7 +1097,8 @@ public class CarController extends AbstractBaseController {
});
boolean flag = iCarService.removeOneByIds(idList);
if(flag) {
refreshCount(cars) ;
CarController controllerProxy = SpringUtils.getBean(CarController.class);
controllerProxy.refreshCount(cars);
}
return flag;
}
......
......@@ -10,6 +10,7 @@ import com.yeejoin.equipmanage.common.entity.vo.EquipmentDetailDownloadVO;
import com.yeejoin.equipmanage.common.enums.ExcelEnums;
import com.yeejoin.equipmanage.common.utils.ExcelUtils;
import com.yeejoin.equipmanage.common.utils.NameUtils;
import com.yeejoin.equipmanage.common.utils.SpringUtils;
import com.yeejoin.equipmanage.common.utils.StringUtil;
import com.yeejoin.equipmanage.common.vo.EquipmentDate;
import com.yeejoin.equipmanage.dto.ExcelDto;
......@@ -155,7 +156,8 @@ public class EquipmentDetailController extends AbstractBaseController {
if (syncSwitch) {
equipmentSpecificSerivce.equipSpecificDataSync(equipmentId);
}
refreshCount(vo.getBizOrgCode());
EquipmentDetailController controllerProxy = SpringUtils.getBean(EquipmentDetailController.class);
controllerProxy.refreshCount(vo.getBizOrgCode());
return date;
}
......@@ -263,7 +265,8 @@ public class EquipmentDetailController extends AbstractBaseController {
if (syncSwitch) {
equipmentSpecificSerivce.equipSpecificDataSync(bean.getEquipmentId());
}
refreshCount(vo.getBizOrgCode());
EquipmentDetailController controllerProxy = SpringUtils.getBean(EquipmentDetailController.class);
controllerProxy.refreshCount(vo.getBizOrgCode());
return equipmentDate;
}
......
......@@ -11,6 +11,7 @@ import java.util.stream.Collectors;
import javax.annotation.Resource;
import com.yeejoin.equipmanage.common.utils.SpringUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
......@@ -395,7 +396,9 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements
}
equipmentSpecificMapper.insert(equipmentSpecific);
refreshCount(equipmentSpecific.getBizOrgCode());//添加对于装备类型统计数据的刷新
StockServiceImpl controllerProxy = SpringUtils.getBean(StockServiceImpl.class);
//添加对于装备类型统计数据的刷新
controllerProxy.refreshCount(equipmentSpecific.getBizOrgCode());
//位置编码不为空入库
if (equipmentDetailDownloadVOS.get(i) != null && equipmentDetailDownloadVOS.get(i).getWarehouseStructCode() != null) {
QueryWrapper<WarehouseStructure> warehouseStructureQueryWrapper = new QueryWrapper<>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment