Commit 0912a7f1 authored by suhuiguang's avatar suhuiguang

1.anysc不器作用解决

parent 2ea72259
...@@ -15,6 +15,7 @@ import com.yeejoin.amos.feign.privilege.model.AgencyUserModel; ...@@ -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.CompanyModel;
import com.yeejoin.amos.feign.privilege.model.DepartmentModel; import com.yeejoin.amos.feign.privilege.model.DepartmentModel;
import com.yeejoin.amos.feign.privilege.model.RoleModel; import com.yeejoin.amos.feign.privilege.model.RoleModel;
import org.apache.commons.lang3.ObjectUtils;
import org.aspectj.lang.JoinPoint; import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning; import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Aspect;
...@@ -68,7 +69,12 @@ public class ControllerAop { ...@@ -68,7 +69,12 @@ public class ControllerAop {
public void doBefore(JoinPoint joinPoint) { public void doBefore(JoinPoint joinPoint) {
PermissionInterceptorContext.clean(); PermissionInterceptorContext.clean();
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); 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", String[] url = new String[]{"/api/user/save/curCompany", "/jcs/command/lookHtmlText",
"/jcs/common/duty-person/findByDutyAreaId", "/tzs/wechatBack", "/tzs/elevator/getElevatorInfo"}; "/jcs/common/duty-person/findByDutyAreaId", "/tzs/wechatBack", "/tzs/elevator/getElevatorInfo"};
......
...@@ -11,6 +11,7 @@ import java.util.stream.Collectors; ...@@ -11,6 +11,7 @@ import java.util.stream.Collectors;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import com.yeejoin.equipmanage.common.utils.*;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
...@@ -62,12 +63,6 @@ import com.yeejoin.equipmanage.common.enums.IndustryEnum; ...@@ -62,12 +63,6 @@ import com.yeejoin.equipmanage.common.enums.IndustryEnum;
import com.yeejoin.equipmanage.common.enums.OnBoardEquipmentEnum; import com.yeejoin.equipmanage.common.enums.OnBoardEquipmentEnum;
import com.yeejoin.equipmanage.common.enums.SystemDicTypeEum; import com.yeejoin.equipmanage.common.enums.SystemDicTypeEum;
import com.yeejoin.equipmanage.common.enums.TrueOrFalseEnum; 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.CarForUE4VO;
import com.yeejoin.equipmanage.common.vo.CarInfosResponse; import com.yeejoin.equipmanage.common.vo.CarInfosResponse;
import com.yeejoin.equipmanage.common.vo.EquipStateOnCarVo; import com.yeejoin.equipmanage.common.vo.EquipStateOnCarVo;
...@@ -238,7 +233,8 @@ public class CarController extends AbstractBaseController { ...@@ -238,7 +233,8 @@ public class CarController extends AbstractBaseController {
}); });
} }
Car car2= iCarService.saveOne(car); Car car2= iCarService.saveOne(car);
refreshCount(car.getBizOrgCode()); CarController controllerProxy = SpringUtils.getBean(CarController.class);
controllerProxy.refreshCount(car.getBizOrgCode());
return car2; return car2;
} }
...@@ -321,6 +317,8 @@ public class CarController extends AbstractBaseController { ...@@ -321,6 +317,8 @@ public class CarController extends AbstractBaseController {
// saveFile(carInstance);视频图片文件后期统一处理 // saveFile(carInstance);视频图片文件后期统一处理
EquipmentSpecificSerivceImpl.registerMqttTopic(car.getIotCode(), equipmentIotMqttReceiveConfig); EquipmentSpecificSerivceImpl.registerMqttTopic(car.getIotCode(), equipmentIotMqttReceiveConfig);
Car car1= iCarService.updateOneById(car); Car car1= iCarService.updateOneById(car);
CarController controllerProxy = SpringUtils.getBean(CarController.class);
controllerProxy.refreshCount(car.getBizOrgCode());
refreshCount(car.getBizOrgCode()); refreshCount(car.getBizOrgCode());
return car1; return car1;
} }
...@@ -1099,7 +1097,8 @@ public class CarController extends AbstractBaseController { ...@@ -1099,7 +1097,8 @@ public class CarController extends AbstractBaseController {
}); });
boolean flag = iCarService.removeOneByIds(idList); boolean flag = iCarService.removeOneByIds(idList);
if(flag) { if(flag) {
refreshCount(cars) ; CarController controllerProxy = SpringUtils.getBean(CarController.class);
controllerProxy.refreshCount(cars);
} }
return flag; return flag;
} }
......
...@@ -10,6 +10,7 @@ import com.yeejoin.equipmanage.common.entity.vo.EquipmentDetailDownloadVO; ...@@ -10,6 +10,7 @@ import com.yeejoin.equipmanage.common.entity.vo.EquipmentDetailDownloadVO;
import com.yeejoin.equipmanage.common.enums.ExcelEnums; import com.yeejoin.equipmanage.common.enums.ExcelEnums;
import com.yeejoin.equipmanage.common.utils.ExcelUtils; import com.yeejoin.equipmanage.common.utils.ExcelUtils;
import com.yeejoin.equipmanage.common.utils.NameUtils; 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.utils.StringUtil;
import com.yeejoin.equipmanage.common.vo.EquipmentDate; import com.yeejoin.equipmanage.common.vo.EquipmentDate;
import com.yeejoin.equipmanage.dto.ExcelDto; import com.yeejoin.equipmanage.dto.ExcelDto;
...@@ -155,7 +156,8 @@ public class EquipmentDetailController extends AbstractBaseController { ...@@ -155,7 +156,8 @@ public class EquipmentDetailController extends AbstractBaseController {
if (syncSwitch) { if (syncSwitch) {
equipmentSpecificSerivce.equipSpecificDataSync(equipmentId); equipmentSpecificSerivce.equipSpecificDataSync(equipmentId);
} }
refreshCount(vo.getBizOrgCode()); EquipmentDetailController controllerProxy = SpringUtils.getBean(EquipmentDetailController.class);
controllerProxy.refreshCount(vo.getBizOrgCode());
return date; return date;
} }
...@@ -263,7 +265,8 @@ public class EquipmentDetailController extends AbstractBaseController { ...@@ -263,7 +265,8 @@ public class EquipmentDetailController extends AbstractBaseController {
if (syncSwitch) { if (syncSwitch) {
equipmentSpecificSerivce.equipSpecificDataSync(bean.getEquipmentId()); equipmentSpecificSerivce.equipSpecificDataSync(bean.getEquipmentId());
} }
refreshCount(vo.getBizOrgCode()); EquipmentDetailController controllerProxy = SpringUtils.getBean(EquipmentDetailController.class);
controllerProxy.refreshCount(vo.getBizOrgCode());
return equipmentDate; return equipmentDate;
} }
......
...@@ -11,6 +11,7 @@ import java.util.stream.Collectors; ...@@ -11,6 +11,7 @@ import java.util.stream.Collectors;
import javax.annotation.Resource; import javax.annotation.Resource;
import com.yeejoin.equipmanage.common.utils.SpringUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy; import org.springframework.context.annotation.Lazy;
...@@ -395,7 +396,9 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements ...@@ -395,7 +396,9 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements
} }
equipmentSpecificMapper.insert(equipmentSpecific); 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) { if (equipmentDetailDownloadVOS.get(i) != null && equipmentDetailDownloadVOS.get(i).getWarehouseStructCode() != null) {
QueryWrapper<WarehouseStructure> warehouseStructureQueryWrapper = new QueryWrapper<>(); 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