|
@@ -98,7 +98,7 @@ public class BiInfoController {
|
|
|
*/
|
|
|
@GetMapping("/selectBiInfo")
|
|
|
public List<BiViewInfo> selectBiInfo(String compId, String seachMoth) {
|
|
|
- List<BiViewInfo> listRedis = cacheComponent.getObjList(Const.ADMIN_BI_INFO, BiViewInfo.class);
|
|
|
+ List<BiViewInfo> listRedis = cacheComponent.getObjList(Const.ADMIN_BI_INFO+compId+seachMoth, BiViewInfo.class);
|
|
|
if (listRedis != null && listRedis.size() > 0) {
|
|
|
return listRedis;
|
|
|
}
|
|
@@ -130,7 +130,7 @@ public class BiInfoController {
|
|
|
// 收入支出毛利润
|
|
|
getMoney(biViewInfos, seachMoth);
|
|
|
|
|
|
- cacheComponent.putRaw(Const.ADMIN_BI_INFO, JSONObject.toJSONString(biViewInfos), 60 * 60);
|
|
|
+ cacheComponent.putRaw(Const.ADMIN_BI_INFO+compId+seachMoth, JSONObject.toJSONString(biViewInfos), 60 * 60);
|
|
|
return biViewInfos;
|
|
|
}
|
|
|
|
|
@@ -141,14 +141,17 @@ public class BiInfoController {
|
|
|
*/
|
|
|
@GetMapping("/selectBiInfoNew")
|
|
|
public List<BiViewInfo> selectBiInfoNew(String compId, String seachMoth) {
|
|
|
- if(AuthSecurityUtils.getCurrentUserInfo() != null && AuthSecurityUtils.getCurrentUserInfo().getUserId() != null){
|
|
|
- String userId = AuthSecurityUtils.getCurrentUserInfo().getUserId();
|
|
|
- List<BiViewInfo> listRedis = cacheComponent.getObjList(Const.ADMIN_BI_INFO+userId+seachMoth, BiViewInfo.class);
|
|
|
- if (listRedis != null && listRedis.size() > 0) {
|
|
|
- return listRedis;
|
|
|
- }
|
|
|
+// if(AuthSecurityUtils.getCurrentUserInfo() != null && AuthSecurityUtils.getCurrentUserInfo().getUserId() != null){
|
|
|
+// String userId = AuthSecurityUtils.getCurrentUserInfo().getUserId();
|
|
|
+// List<BiViewInfo> listRedis = cacheComponent.getObjList(Const.ADMIN_BI_INFO+userId+seachMoth, BiViewInfo.class);
|
|
|
+// if (listRedis != null && listRedis.size() > 0) {
|
|
|
+// return listRedis;
|
|
|
+// }
|
|
|
+// }
|
|
|
+ List<BiViewInfo> listRedis = cacheComponent.getObjList(Const.ADMIN_BI_INFO+compId+seachMoth, BiViewInfo.class);
|
|
|
+ if (listRedis != null && listRedis.size() > 0) {
|
|
|
+// return listRedis;
|
|
|
}
|
|
|
-
|
|
|
companyId = compId;
|
|
|
List<BiViewInfo> biViewInfos = new ArrayList<>();
|
|
|
// 车辆
|
|
@@ -158,7 +161,7 @@ public class BiInfoController {
|
|
|
// 库点流向
|
|
|
getMapInfo(biViewInfos, seachMoth);
|
|
|
// 出入库分布
|
|
|
- getInOutInfo(biViewInfos, seachMoth);
|
|
|
+ getInOutInfo(biViewInfos, seachMoth,compId);
|
|
|
// 合营比例
|
|
|
getHeYing(biViewInfos, seachMoth);
|
|
|
// 库存
|
|
@@ -175,7 +178,7 @@ public class BiInfoController {
|
|
|
if(AuthSecurityUtils.getCurrentUserInfo() != null && AuthSecurityUtils.getCurrentUserInfo().getUserId() != null){
|
|
|
String userId = AuthSecurityUtils.getCurrentUserInfo().getUserId();
|
|
|
//洮南瀚城合营人员查看
|
|
|
- if("647b84ee01044e2a8d4fdc1943ce3d01,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)){
|
|
|
+ if("647b84ee01044e2a8d4fdc1943ce3d01,ec7024427b7347b98bcad422761e5bfc,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)){
|
|
|
contractManagementInfoEntityWrapper.eq("joint_venture_parties", "洮南市二龙乡瀚城农产品有限公司");
|
|
|
}
|
|
|
}
|
|
@@ -196,10 +199,12 @@ public class BiInfoController {
|
|
|
getMoney(biViewInfos, seachMoth);
|
|
|
|
|
|
|
|
|
- if(AuthSecurityUtils.getCurrentUserInfo() != null && AuthSecurityUtils.getCurrentUserInfo().getUserId() != null){
|
|
|
- String userId = AuthSecurityUtils.getCurrentUserInfo().getUserId();
|
|
|
- cacheComponent.putRaw(Const.ADMIN_BI_INFO+userId+seachMoth, JSONObject.toJSONString(biViewInfos), 60 * 20);
|
|
|
- }
|
|
|
+// if(AuthSecurityUtils.getCurrentUserInfo() != null && AuthSecurityUtils.getCurrentUserInfo().getUserId() != null){
|
|
|
+// String userId = AuthSecurityUtils.getCurrentUserInfo().getUserId();
|
|
|
+// cacheComponent.putRaw(Const.ADMIN_BI_INFO+userId+seachMoth, JSONObject.toJSONString(biViewInfos), 60 * 20);
|
|
|
+// }
|
|
|
+ cacheComponent.putRaw(Const.ADMIN_BI_INFO+compId+seachMoth, JSONObject.toJSONString(biViewInfos), 60 * 20);
|
|
|
+
|
|
|
return biViewInfos;
|
|
|
}
|
|
|
|
|
@@ -222,7 +227,7 @@ public class BiInfoController {
|
|
|
if(AuthSecurityUtils.getCurrentUserInfo() != null && AuthSecurityUtils.getCurrentUserInfo().getUserId() != null){
|
|
|
String userId = AuthSecurityUtils.getCurrentUserInfo().getUserId();
|
|
|
//洮南瀚城合营人员查看
|
|
|
- if("647b84ee01044e2a8d4fdc1943ce3d01,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)){
|
|
|
+ if("647b84ee01044e2a8d4fdc1943ce3d01,ec7024427b7347b98bcad422761e5bfc,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)){
|
|
|
contractManagementInfoEntityWrapper.eq("joint_venture_parties", "洮南市二龙乡瀚城农产品有限公司");
|
|
|
}
|
|
|
}
|
|
@@ -260,7 +265,7 @@ public class BiInfoController {
|
|
|
if(AuthSecurityUtils.getCurrentUserInfo() != null && AuthSecurityUtils.getCurrentUserInfo().getUserId() != null){
|
|
|
String userId = AuthSecurityUtils.getCurrentUserInfo().getUserId();
|
|
|
//洮南瀚城合营人员查看
|
|
|
- if("647b84ee01044e2a8d4fdc1943ce3d01,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)){
|
|
|
+ if("647b84ee01044e2a8d4fdc1943ce3d01,ec7024427b7347b98bcad422761e5bfc,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)){
|
|
|
warehouseBaseInfoEntityWrapper.eq("joint_venture_parties", "洮南市二龙乡瀚城农产品有限公司");
|
|
|
}
|
|
|
}
|
|
@@ -311,11 +316,12 @@ public class BiInfoController {
|
|
|
if(AuthSecurityUtils.getCurrentUserInfo() != null && AuthSecurityUtils.getCurrentUserInfo().getUserId() != null){
|
|
|
String userId = AuthSecurityUtils.getCurrentUserInfo().getUserId();
|
|
|
//洮南瀚城合营人员查看
|
|
|
- if("647b84ee01044e2a8d4fdc1943ce3d01,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)){
|
|
|
+ if("647b84ee01044e2a8d4fdc1943ce3d01,ec7024427b7347b98bcad422761e5bfc,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"));
|
|
|
// 查询仓库总数
|
|
@@ -325,7 +331,7 @@ public class BiInfoController {
|
|
|
if(AuthSecurityUtils.getCurrentUserInfo() != null && AuthSecurityUtils.getCurrentUserInfo().getUserId() != null){
|
|
|
String userId = AuthSecurityUtils.getCurrentUserInfo().getUserId();
|
|
|
//洮南瀚城合营人员查看
|
|
|
- if("647b84ee01044e2a8d4fdc1943ce3d01,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)){
|
|
|
+ if("647b84ee01044e2a8d4fdc1943ce3d01,ec7024427b7347b98bcad422761e5bfc,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", "洮南市二龙乡瀚城农产品有限公司"));
|
|
@@ -343,17 +349,33 @@ public class BiInfoController {
|
|
|
count1 = warehousePositionInfos.size();
|
|
|
}
|
|
|
}
|
|
|
- biViewInfoa.setCount(String.valueOf(count1));
|
|
|
- biViewInfoa.setName("合营");
|
|
|
- biViewInfoa.setPercentage(String.valueOf(count1 / countWare * 100) + "%");
|
|
|
- biViewInfob.setCount(String.valueOf(countWare - count1));
|
|
|
- biViewInfob.setName("自有");
|
|
|
- biViewInfob.setPercentage(String.valueOf((countWare - count1) / countWare * 100) + "%");
|
|
|
- biViewInfoList.add(biViewInfoa);
|
|
|
- biViewInfoList.add(biViewInfob);
|
|
|
- biViewInfoc.setBiType("合营");
|
|
|
- biViewInfoc.setBiViewInfoList(biViewInfoList);
|
|
|
- biViewInfos.add(biViewInfoc);
|
|
|
+ if(countWare == 0){
|
|
|
+ biViewInfoa.setCount(String.valueOf(0));
|
|
|
+ biViewInfoa.setName("合营");
|
|
|
+ biViewInfoa.setPercentage(String.valueOf(0) + "%");
|
|
|
+ biViewInfob.setCount(String.valueOf(0));
|
|
|
+ biViewInfob.setName("自有");
|
|
|
+ biViewInfob.setPercentage(String.valueOf(0) + "%");
|
|
|
+ biViewInfoList.add(biViewInfoa);
|
|
|
+ biViewInfoList.add(biViewInfob);
|
|
|
+ biViewInfoc.setBiType("合营");
|
|
|
+ biViewInfoc.setBiViewInfoList(biViewInfoList);
|
|
|
+ biViewInfos.add(biViewInfoc);
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ biViewInfoa.setCount(String.valueOf(count1));
|
|
|
+ biViewInfoa.setName("合营");
|
|
|
+ biViewInfoa.setPercentage(String.valueOf(count1 / countWare * 100) + "%");
|
|
|
+ biViewInfob.setCount(String.valueOf(countWare - count1));
|
|
|
+ biViewInfob.setName("自有");
|
|
|
+ biViewInfob.setPercentage(String.valueOf((countWare - count1) / countWare * 100) + "%");
|
|
|
+ biViewInfoList.add(biViewInfoa);
|
|
|
+ biViewInfoList.add(biViewInfob);
|
|
|
+ biViewInfoc.setBiType("合营");
|
|
|
+ biViewInfoc.setBiViewInfoList(biViewInfoList);
|
|
|
+ biViewInfos.add(biViewInfoc);
|
|
|
+ }
|
|
|
+
|
|
|
return biViewInfos;
|
|
|
}
|
|
|
|
|
@@ -381,7 +403,7 @@ public class BiInfoController {
|
|
|
if(AuthSecurityUtils.getCurrentUserInfo() != null && AuthSecurityUtils.getCurrentUserInfo().getUserId() != null){
|
|
|
String userId = AuthSecurityUtils.getCurrentUserInfo().getUserId();
|
|
|
//洮南瀚城合营人员查看
|
|
|
- if("647b84ee01044e2a8d4fdc1943ce3d01,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)){
|
|
|
+ if("647b84ee01044e2a8d4fdc1943ce3d01,ec7024427b7347b98bcad422761e5bfc,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)){
|
|
|
warehouseBaseInfoEntityWrapper.eq("joint_venture_parties", "洮南市二龙乡瀚城农产品有限公司");
|
|
|
}
|
|
|
}
|
|
@@ -393,7 +415,7 @@ public class BiInfoController {
|
|
|
if(AuthSecurityUtils.getCurrentUserInfo() != null && AuthSecurityUtils.getCurrentUserInfo().getUserId() != null){
|
|
|
String userId = AuthSecurityUtils.getCurrentUserInfo().getUserId();
|
|
|
//洮南瀚城合营人员查看
|
|
|
- if("647b84ee01044e2a8d4fdc1943ce3d01,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)){
|
|
|
+ if("647b84ee01044e2a8d4fdc1943ce3d01,ec7024427b7347b98bcad422761e5bfc,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)){
|
|
|
contractManagementInfoEntityWrapper.eq("joint_venture_parties", "洮南市二龙乡瀚城农产品有限公司");
|
|
|
}
|
|
|
}
|
|
@@ -413,7 +435,7 @@ public class BiInfoController {
|
|
|
if(AuthSecurityUtils.getCurrentUserInfo() != null && AuthSecurityUtils.getCurrentUserInfo().getUserId() != null){
|
|
|
String userId = AuthSecurityUtils.getCurrentUserInfo().getUserId();
|
|
|
//洮南瀚城合营人员查看
|
|
|
- if("647b84ee01044e2a8d4fdc1943ce3d01,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)){
|
|
|
+ if("647b84ee01044e2a8d4fdc1943ce3d01,ec7024427b7347b98bcad422761e5bfc,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)){
|
|
|
warehouseBaseInfoEntityWrapper.eq("joint_venture_parties", "洮南市二龙乡瀚城农产品有限公司");
|
|
|
}
|
|
|
}
|
|
@@ -424,7 +446,7 @@ public class BiInfoController {
|
|
|
if(AuthSecurityUtils.getCurrentUserInfo() != null && AuthSecurityUtils.getCurrentUserInfo().getUserId() != null){
|
|
|
String userId = AuthSecurityUtils.getCurrentUserInfo().getUserId();
|
|
|
//洮南瀚城合营人员查看
|
|
|
- if("647b84ee01044e2a8d4fdc1943ce3d01,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)){
|
|
|
+ if("647b84ee01044e2a8d4fdc1943ce3d01,ec7024427b7347b98bcad422761e5bfc,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)){
|
|
|
warehouseBaseInfoEntityWrapper1.eq("joint_venture_parties", "洮南市二龙乡瀚城农产品有限公司");
|
|
|
}
|
|
|
}
|
|
@@ -478,6 +500,12 @@ public class BiInfoController {
|
|
|
// Double sumAct = warehousePositionStorageInfoService.selectSumStoreage(companyId);
|
|
|
Double inWeight = warehousePositionStorageInfoMapper.selectSumWareNew(companyId, null,"2",seachMoth);
|
|
|
Double outWeight = warehousePositionStorageInfoMapper.selectSumWareNew(companyId, null,"1",seachMoth);
|
|
|
+ if (inWeight == null) {
|
|
|
+ inWeight = 0d;
|
|
|
+ }
|
|
|
+ if (outWeight == null) {
|
|
|
+ outWeight = 0d;
|
|
|
+ }
|
|
|
Double sumAct = inWeight - outWeight;
|
|
|
Double sumBuy = contractManagementInfoService.selectSumBuy(companyId,seachMoth);
|
|
|
Double sumSale = contractManagementInfoService.selectSumSale(companyId,seachMoth);
|
|
@@ -535,10 +563,11 @@ public class BiInfoController {
|
|
|
biViewInfo3.setCount(String.valueOf(weight));
|
|
|
biViewInfos1.add(biViewInfo3);
|
|
|
}
|
|
|
- biViewInfo4.setBiType("9-粮食总储存量");
|
|
|
- biViewInfo4.setBiViewInfoList(biViewInfos1);
|
|
|
- biViewInfos.add(biViewInfo4);
|
|
|
+
|
|
|
}
|
|
|
+ biViewInfo4.setBiType("9-粮食总储存量");
|
|
|
+ biViewInfo4.setBiViewInfoList(biViewInfos1);
|
|
|
+ biViewInfos.add(biViewInfo4);
|
|
|
return biViewInfos;
|
|
|
}
|
|
|
|
|
@@ -560,7 +589,7 @@ public class BiInfoController {
|
|
|
if(AuthSecurityUtils.getCurrentUserInfo() != null && AuthSecurityUtils.getCurrentUserInfo().getUserId() != null){
|
|
|
String userId = AuthSecurityUtils.getCurrentUserInfo().getUserId();
|
|
|
//洮南瀚城合营人员查看
|
|
|
- if("647b84ee01044e2a8d4fdc1943ce3d01,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)){
|
|
|
+ if("647b84ee01044e2a8d4fdc1943ce3d01,ec7024427b7347b98bcad422761e5bfc,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)){
|
|
|
contractManagementInfoEntityWrapper.eq("joint_venture_parties", "洮南市二龙乡瀚城农产品有限公司");
|
|
|
}
|
|
|
}
|
|
@@ -651,7 +680,7 @@ public class BiInfoController {
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
- private List<BiViewInfo> getInOutInfo(List<BiViewInfo> biViewInfos,String seachMoth) {
|
|
|
+ private List<BiViewInfo> getInOutInfo(List<BiViewInfo> biViewInfos,String seachMoth,String compId) {
|
|
|
List<BiViewInfo> biViewInfoList = new ArrayList<>();
|
|
|
BiViewInfo biViewInfo = new BiViewInfo();
|
|
|
List<BiViewInfo> biViewInfoList1 = new ArrayList<>();
|
|
@@ -669,10 +698,12 @@ public class BiInfoController {
|
|
|
if(AuthSecurityUtils.getCurrentUserInfo() != null && AuthSecurityUtils.getCurrentUserInfo().getUserId() != null){
|
|
|
String userId = AuthSecurityUtils.getCurrentUserInfo().getUserId();
|
|
|
//洮南瀚城合营人员查看
|
|
|
- if("647b84ee01044e2a8d4fdc1943ce3d01,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)){
|
|
|
+ if("647b84ee01044e2a8d4fdc1943ce3d01,ec7024427b7347b98bcad422761e5bfc,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)){
|
|
|
pageView.put("jointVentureParties","洮南市二龙乡瀚城农产品有限公司");
|
|
|
}
|
|
|
}
|
|
|
+ pageView.put("seachMoth", seachMoth);
|
|
|
+ pageView.put("compId", compId);
|
|
|
List<WarehouseInOutInfo> list = warehouseInOutInfoMapper.brokenLineStatisticalChartByYear(pageView);
|
|
|
if (list.size() == 0) {
|
|
|
Double money = 0D;
|
|
@@ -707,10 +738,13 @@ public class BiInfoController {
|
|
|
if(AuthSecurityUtils.getCurrentUserInfo() != null && AuthSecurityUtils.getCurrentUserInfo().getUserId() != null){
|
|
|
String userId = AuthSecurityUtils.getCurrentUserInfo().getUserId();
|
|
|
//洮南瀚城合营人员查看
|
|
|
- if("647b84ee01044e2a8d4fdc1943ce3d01,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)){
|
|
|
+ if("647b84ee01044e2a8d4fdc1943ce3d01,ec7024427b7347b98bcad422761e5bfc,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)){
|
|
|
pageView.put("jointVentureParties","洮南市二龙乡瀚城农产品有限公司");
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ pageView.put("seachMoth", seachMoth);
|
|
|
+ pageView.put("compId", compId);
|
|
|
List<WarehouseInOutInfo> list = warehouseInOutInfoMapper.brokenLineStatisticalChartByYear(pageView);
|
|
|
if (list.size() == 0) {
|
|
|
Double money = 0D;
|