|
@@ -143,7 +143,7 @@ public class BiInfoController {
|
|
List<BiViewInfo> listRedis = cacheComponent.getObjList(Const.ADMIN_BI_INFO+userId, BiViewInfo.class);
|
|
List<BiViewInfo> listRedis = cacheComponent.getObjList(Const.ADMIN_BI_INFO+userId, BiViewInfo.class);
|
|
if (listRedis != null && listRedis.size() > 0) {
|
|
if (listRedis != null && listRedis.size() > 0) {
|
|
return listRedis;
|
|
return listRedis;
|
|
- }
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
companyId = compId;
|
|
companyId = compId;
|
|
@@ -191,6 +191,8 @@ public class BiInfoController {
|
|
getBuyInfo(contractManagementInfos, biViewInfos);
|
|
getBuyInfo(contractManagementInfos, biViewInfos);
|
|
// 收入支出毛利润
|
|
// 收入支出毛利润
|
|
getMoney(biViewInfos, seachMoth);
|
|
getMoney(biViewInfos, seachMoth);
|
|
|
|
+
|
|
|
|
+
|
|
if(AuthSecurityUtils.getCurrentUserInfo() != null && AuthSecurityUtils.getCurrentUserInfo().getUserId() != null){
|
|
if(AuthSecurityUtils.getCurrentUserInfo() != null && AuthSecurityUtils.getCurrentUserInfo().getUserId() != null){
|
|
String userId = AuthSecurityUtils.getCurrentUserInfo().getUserId();
|
|
String userId = AuthSecurityUtils.getCurrentUserInfo().getUserId();
|
|
cacheComponent.putRaw(Const.ADMIN_BI_INFO+userId, JSONObject.toJSONString(biViewInfos), 60 * 20);
|
|
cacheComponent.putRaw(Const.ADMIN_BI_INFO+userId, JSONObject.toJSONString(biViewInfos), 60 * 20);
|
|
@@ -298,15 +300,45 @@ public class BiInfoController {
|
|
BiViewInfo biViewInfoa = new BiViewInfo();
|
|
BiViewInfo biViewInfoa = new BiViewInfo();
|
|
BiViewInfo biViewInfob = new BiViewInfo();
|
|
BiViewInfo biViewInfob = new BiViewInfo();
|
|
BiViewInfo biViewInfoc = new BiViewInfo();
|
|
BiViewInfo biViewInfoc = new BiViewInfo();
|
|
- Integer countWare = warehouseBaseInfoService.selectCount(new EntityWrapper<WarehouseBaseInfo>()
|
|
|
|
- .eq("comp_id",companyId).eq("delete_flag", "0").eq("warehouse_type","1"));
|
|
|
|
|
|
+ EntityWrapper<WarehouseBaseInfo> warehouseBaseInfoEntityWrapper = new EntityWrapper<WarehouseBaseInfo>();
|
|
|
|
+ warehouseBaseInfoEntityWrapper.eq("comp_id", companyId);
|
|
|
|
+ warehouseBaseInfoEntityWrapper.eq("delete_flag", "0");
|
|
|
|
+ warehouseBaseInfoEntityWrapper.eq("warehouse_type", "1");
|
|
|
|
+ if(AuthSecurityUtils.getCurrentUserInfo() != null && AuthSecurityUtils.getCurrentUserInfo().getUserId() != null){
|
|
|
|
+ String userId = AuthSecurityUtils.getCurrentUserInfo().getUserId();
|
|
|
|
+ //洮南瀚城合营人员查看
|
|
|
|
+ if("647b84ee01044e2a8d4fdc1943ce3d01,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)){
|
|
|
|
+ warehouseBaseInfoEntityWrapper.eq("joint_venture_parties", "洮南市二龙乡瀚城农产品有限公司");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ Integer countWare = warehouseBaseInfoService.selectCount(warehouseBaseInfoEntityWrapper);
|
|
|
|
+// Integer countWare = warehouseBaseInfoService.selectCount(new EntityWrapper<WarehouseBaseInfo>()
|
|
|
|
+// .eq("comp_id",companyId).eq("delete_flag", "0").eq("warehouse_type","1"));
|
|
// 查询仓库总数
|
|
// 查询仓库总数
|
|
Integer count = warehousePositionInfoService.selectCount(new EntityWrapper<WarehousePositionInfo>()
|
|
Integer count = warehousePositionInfoService.selectCount(new EntityWrapper<WarehousePositionInfo>()
|
|
.eq("delete_flag", "0"));
|
|
.eq("delete_flag", "0"));
|
|
- // 查询自由库数量
|
|
|
|
- List<WarehousePositionInfo> warehousePositionInfos = warehousePositionInfoService.selectList(new EntityWrapper<WarehousePositionInfo>()
|
|
|
|
- .eq("delete_flag", "0").like("bin_number", "合营").groupBy("base_id"));
|
|
|
|
- Integer count1 = warehousePositionInfos.size();
|
|
|
|
|
|
+ Integer count1 = 0;
|
|
|
|
+ if(AuthSecurityUtils.getCurrentUserInfo() != null && AuthSecurityUtils.getCurrentUserInfo().getUserId() != null){
|
|
|
|
+ String userId = AuthSecurityUtils.getCurrentUserInfo().getUserId();
|
|
|
|
+ //洮南瀚城合营人员查看
|
|
|
|
+ if("647b84ee01044e2a8d4fdc1943ce3d01,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)){
|
|
|
|
+ List<WarehouseBaseInfo> warehouseBaseInfoList = warehouseBaseInfoService.selectList(new EntityWrapper<WarehouseBaseInfo>()
|
|
|
|
+ .eq("comp_id", companyId).eq("delete_flag", "0").eq("warehouse_type", "1")
|
|
|
|
+ .eq("joint_venture_parties", "洮南市二龙乡瀚城农产品有限公司"));
|
|
|
|
+ if (CollectionUtils.isNotEmpty(warehouseBaseInfoList)){
|
|
|
|
+ for (int i = 0;i<warehouseBaseInfoList.size();i++){
|
|
|
|
+ List<WarehousePositionInfo> warehousePositionInfos = warehousePositionInfoService.selectList(new EntityWrapper<WarehousePositionInfo>()
|
|
|
|
+ .eq("base_id",warehouseBaseInfoList.get(i).getId()).eq("delete_flag", "0").like("bin_number", "合营").groupBy("base_id"));
|
|
|
|
+ count1 = count1 + warehousePositionInfos.size();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }else {
|
|
|
|
+ // 查询自有库数量
|
|
|
|
+ List<WarehousePositionInfo> warehousePositionInfos = warehousePositionInfoService.selectList(new EntityWrapper<WarehousePositionInfo>()
|
|
|
|
+ .eq("delete_flag", "0").like("bin_number", "合营").groupBy("base_id"));
|
|
|
|
+ count1 = warehousePositionInfos.size();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
biViewInfoa.setCount(String.valueOf(count1));
|
|
biViewInfoa.setCount(String.valueOf(count1));
|
|
biViewInfoa.setName("合营");
|
|
biViewInfoa.setName("合营");
|
|
biViewInfoa.setPercentage(String.valueOf(count1 / countWare * 100) + "%");
|
|
biViewInfoa.setPercentage(String.valueOf(count1 / countWare * 100) + "%");
|