|
@@ -138,10 +138,10 @@ public class BiInfoController {
|
|
*/
|
|
*/
|
|
@GetMapping("/selectBiInfoNew")
|
|
@GetMapping("/selectBiInfoNew")
|
|
public List<BiViewInfo> selectBiInfoNew(String compId, String seachMoth) {
|
|
public List<BiViewInfo> selectBiInfoNew(String compId, String seachMoth) {
|
|
- List<BiViewInfo> listRedis = cacheComponent.getObjList(Const.ADMIN_BI_INFO, BiViewInfo.class);
|
|
|
|
- if (listRedis != null && listRedis.size() > 0) {
|
|
|
|
- return listRedis;
|
|
|
|
- }
|
|
|
|
|
|
+ List<BiViewInfo> listRedis = cacheComponent.getObjList(Const.ADMIN_BI_INFO, BiViewInfo.class);
|
|
|
|
+ if (listRedis != null && listRedis.size() > 0) {
|
|
|
|
+ return listRedis;
|
|
|
|
+ }
|
|
companyId = compId;
|
|
companyId = compId;
|
|
List<BiViewInfo> biViewInfos = new ArrayList<>();
|
|
List<BiViewInfo> biViewInfos = new ArrayList<>();
|
|
// 车辆
|
|
// 车辆
|
|
@@ -165,6 +165,13 @@ public class BiInfoController {
|
|
EntityWrapper<ContractManagementInfo> contractManagementInfoEntityWrapper = new EntityWrapper<ContractManagementInfo>();
|
|
EntityWrapper<ContractManagementInfo> contractManagementInfoEntityWrapper = new EntityWrapper<ContractManagementInfo>();
|
|
contractManagementInfoEntityWrapper.eq("status_flag", "1");
|
|
contractManagementInfoEntityWrapper.eq("status_flag", "1");
|
|
contractManagementInfoEntityWrapper.eq("comp_id", compId);
|
|
contractManagementInfoEntityWrapper.eq("comp_id", compId);
|
|
|
|
+ if(AuthSecurityUtils.getCurrentUserInfo() != null && AuthSecurityUtils.getCurrentUserInfo().getUserId() != null){
|
|
|
|
+ String userId = AuthSecurityUtils.getCurrentUserInfo().getUserId();
|
|
|
|
+ //洮南瀚城合营人员查看
|
|
|
|
+ if("647b84ee01044e2a8d4fdc1943ce3d01,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)){
|
|
|
|
+ contractManagementInfoEntityWrapper.eq("joint_venture_parties", "洮南市二龙乡瀚城农产品有限公司");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
if (seachMoth != null) {
|
|
if (seachMoth != null) {
|
|
if (!seachMoth.contains("-")) {
|
|
if (!seachMoth.contains("-")) {
|
|
contractManagementInfoEntityWrapper.and("YEAR(create_date)='" + seachMoth + "'");
|
|
contractManagementInfoEntityWrapper.and("YEAR(create_date)='" + seachMoth + "'");
|
|
@@ -194,8 +201,20 @@ public class BiInfoController {
|
|
private List<BiViewInfo> getcontract(List<BiViewInfo> biViewInfos,String seachMoth) {
|
|
private List<BiViewInfo> getcontract(List<BiViewInfo> biViewInfos,String seachMoth) {
|
|
List<ContractManagementInfo> contractManagementInfoList = new ArrayList<>();
|
|
List<ContractManagementInfo> contractManagementInfoList = new ArrayList<>();
|
|
BiViewInfo biViewInfoa = new BiViewInfo();
|
|
BiViewInfo biViewInfoa = new BiViewInfo();
|
|
- List<ContractManagementInfo> contractManagementInfos = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
|
|
|
|
- .eq("delete_flag", "0").eq("comp_id", companyId).orderBy("create_date", false));
|
|
|
|
|
|
+// List<ContractManagementInfo> contractManagementInfos = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
|
|
|
|
+// .eq("delete_flag", "0").eq("comp_id", companyId).orderBy("create_date", false));
|
|
|
|
+ EntityWrapper<ContractManagementInfo> contractManagementInfoEntityWrapper = new EntityWrapper<ContractManagementInfo>();
|
|
|
|
+ contractManagementInfoEntityWrapper.eq("delete_flag", "0");
|
|
|
|
+ contractManagementInfoEntityWrapper.eq("comp_id", companyId);
|
|
|
|
+ contractManagementInfoEntityWrapper.orderBy("create_date",false);
|
|
|
|
+ if(AuthSecurityUtils.getCurrentUserInfo() != null && AuthSecurityUtils.getCurrentUserInfo().getUserId() != null){
|
|
|
|
+ String userId = AuthSecurityUtils.getCurrentUserInfo().getUserId();
|
|
|
|
+ //洮南瀚城合营人员查看
|
|
|
|
+ if("647b84ee01044e2a8d4fdc1943ce3d01,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)){
|
|
|
|
+ contractManagementInfoEntityWrapper.eq("joint_venture_parties", "洮南市二龙乡瀚城农产品有限公司");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ List<ContractManagementInfo> contractManagementInfos = contractManagementInfoService.selectList(contractManagementInfoEntityWrapper);
|
|
if (CollectionUtils.isNotEmpty(contractManagementInfos)) {
|
|
if (CollectionUtils.isNotEmpty(contractManagementInfos)) {
|
|
for (int i = 0; i < 10; i++) {
|
|
for (int i = 0; i < 10; i++) {
|
|
if (contractManagementInfos.size() <= i) {
|
|
if (contractManagementInfos.size() <= i) {
|
|
@@ -222,8 +241,20 @@ public class BiInfoController {
|
|
BiViewInfo biViewInfoa = new BiViewInfo();
|
|
BiViewInfo biViewInfoa = new BiViewInfo();
|
|
|
|
|
|
// 查询库存
|
|
// 查询库存
|
|
- List<WarehouseBaseInfo> warehouseBaseInfoList = warehouseBaseInfoService.selectList(new EntityWrapper<WarehouseBaseInfo>()
|
|
|
|
- .eq("delete_flag", "0").eq("comp_id", companyId).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", "洮南市二龙乡瀚城农产品有限公司");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ List<WarehouseBaseInfo> warehouseBaseInfoList = warehouseBaseInfoService.selectList(warehouseBaseInfoEntityWrapper);
|
|
|
|
+// List<WarehouseBaseInfo> warehouseBaseInfoList = warehouseBaseInfoService.selectList(new EntityWrapper<WarehouseBaseInfo>()
|
|
|
|
+// .eq("delete_flag", "0").eq("comp_id", companyId).eq("warehouse_type", "1"));
|
|
if (CollectionUtils.isNotEmpty(warehouseBaseInfoList)) {
|
|
if (CollectionUtils.isNotEmpty(warehouseBaseInfoList)) {
|
|
for (int i = 0; i < warehouseBaseInfoList.size(); i++) {
|
|
for (int i = 0; i < warehouseBaseInfoList.size(); i++) {
|
|
BiViewInfo biViewInfo = new BiViewInfo();
|
|
BiViewInfo biViewInfo = new BiViewInfo();
|
|
@@ -300,14 +331,31 @@ public class BiInfoController {
|
|
TranTaskInfo tranTaskInfo = tranTaskInfos.get(i);
|
|
TranTaskInfo tranTaskInfo = tranTaskInfos.get(i);
|
|
if (StringUtils.isNotBlank(tranTaskInfo.getReceiveWarehouse())) {
|
|
if (StringUtils.isNotBlank(tranTaskInfo.getReceiveWarehouse())) {
|
|
if ("1".equals(tranTaskInfo.getTaskTypeKey())) {
|
|
if ("1".equals(tranTaskInfo.getTaskTypeKey())) {
|
|
-
|
|
|
|
BiViewInfo biViewInfo = new BiViewInfo();
|
|
BiViewInfo biViewInfo = new BiViewInfo();
|
|
- WarehouseBaseInfo warehouseBaseInfo = warehouseBaseInfoService.selectOne(new EntityWrapper<WarehouseBaseInfo>()
|
|
|
|
- .eq("comp_id", companyId)
|
|
|
|
- .eq("warehouse_name", tranTaskInfo.getSendWarehouse()));
|
|
|
|
- ContractManagementInfo contractManagementInfo = contractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
|
|
|
|
- .eq("contract_no", tranTaskInfo.getContractNo())
|
|
|
|
- .eq("comp_id", companyId));
|
|
|
|
|
|
+ //仓库
|
|
|
|
+ EntityWrapper<WarehouseBaseInfo> warehouseBaseInfoEntityWrapper = new EntityWrapper<WarehouseBaseInfo>();
|
|
|
|
+ warehouseBaseInfoEntityWrapper.eq("comp_id", companyId);
|
|
|
|
+ warehouseBaseInfoEntityWrapper.eq("warehouse_name", tranTaskInfo.getSendWarehouse());
|
|
|
|
+ if(AuthSecurityUtils.getCurrentUserInfo() != null && AuthSecurityUtils.getCurrentUserInfo().getUserId() != null){
|
|
|
|
+ String userId = AuthSecurityUtils.getCurrentUserInfo().getUserId();
|
|
|
|
+ //洮南瀚城合营人员查看
|
|
|
|
+ if("647b84ee01044e2a8d4fdc1943ce3d01,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)){
|
|
|
|
+ warehouseBaseInfoEntityWrapper.eq("joint_venture_parties", "洮南市二龙乡瀚城农产品有限公司");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ WarehouseBaseInfo warehouseBaseInfo = warehouseBaseInfoService.selectOne(warehouseBaseInfoEntityWrapper);
|
|
|
|
+ //合同
|
|
|
|
+ EntityWrapper<ContractManagementInfo> contractManagementInfoEntityWrapper = new EntityWrapper<ContractManagementInfo>();
|
|
|
|
+ contractManagementInfoEntityWrapper.eq("contract_no", tranTaskInfo.getContractNo());
|
|
|
|
+ contractManagementInfoEntityWrapper.eq("comp_id", companyId);
|
|
|
|
+ if(AuthSecurityUtils.getCurrentUserInfo() != null && AuthSecurityUtils.getCurrentUserInfo().getUserId() != null){
|
|
|
|
+ String userId = AuthSecurityUtils.getCurrentUserInfo().getUserId();
|
|
|
|
+ //洮南瀚城合营人员查看
|
|
|
|
+ if("647b84ee01044e2a8d4fdc1943ce3d01,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)){
|
|
|
|
+ contractManagementInfoEntityWrapper.eq("joint_venture_parties", "洮南市二龙乡瀚城农产品有限公司");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ ContractManagementInfo contractManagementInfo = contractManagementInfoService.selectOne(contractManagementInfoEntityWrapper);
|
|
if (warehouseBaseInfo != null && contractManagementInfo != null) {
|
|
if (warehouseBaseInfo != null && contractManagementInfo != null) {
|
|
biViewInfo.setStartPlace(warehouseBaseInfo.getWarehousePositioning());
|
|
biViewInfo.setStartPlace(warehouseBaseInfo.getWarehousePositioning());
|
|
biViewInfo.setEndPlace(contractManagementInfo.getDeliveryLocation());
|
|
biViewInfo.setEndPlace(contractManagementInfo.getDeliveryLocation());
|
|
@@ -317,12 +365,28 @@ public class BiInfoController {
|
|
|
|
|
|
} else if ("4".equals(tranTaskInfo.getTaskTypeKey())) {
|
|
} else if ("4".equals(tranTaskInfo.getTaskTypeKey())) {
|
|
BiViewInfo biViewInfo = new BiViewInfo();
|
|
BiViewInfo biViewInfo = new BiViewInfo();
|
|
- WarehouseBaseInfo warehouseBaseInfo = warehouseBaseInfoService.selectOne(new EntityWrapper<WarehouseBaseInfo>()
|
|
|
|
- .eq("comp_id", companyId)
|
|
|
|
- .eq("warehouse_name", tranTaskInfo.getSendWarehouse()));
|
|
|
|
- WarehouseBaseInfo warehouseBaseInfo1 = warehouseBaseInfoService.selectOne(new EntityWrapper<WarehouseBaseInfo>()
|
|
|
|
- .eq("comp_id", companyId)
|
|
|
|
- .eq("warehouse_name", tranTaskInfo.getReceiveWarehouse()));
|
|
|
|
|
|
+ EntityWrapper<WarehouseBaseInfo> warehouseBaseInfoEntityWrapper = new EntityWrapper<WarehouseBaseInfo>();
|
|
|
|
+ warehouseBaseInfoEntityWrapper.eq("comp_id", companyId);
|
|
|
|
+ warehouseBaseInfoEntityWrapper.eq("warehouse_name", tranTaskInfo.getSendWarehouse());
|
|
|
|
+ if(AuthSecurityUtils.getCurrentUserInfo() != null && AuthSecurityUtils.getCurrentUserInfo().getUserId() != null){
|
|
|
|
+ String userId = AuthSecurityUtils.getCurrentUserInfo().getUserId();
|
|
|
|
+ //洮南瀚城合营人员查看
|
|
|
|
+ if("647b84ee01044e2a8d4fdc1943ce3d01,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)){
|
|
|
|
+ warehouseBaseInfoEntityWrapper.eq("joint_venture_parties", "洮南市二龙乡瀚城农产品有限公司");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ WarehouseBaseInfo warehouseBaseInfo = warehouseBaseInfoService.selectOne(warehouseBaseInfoEntityWrapper);
|
|
|
|
+ EntityWrapper<WarehouseBaseInfo> warehouseBaseInfoEntityWrapper1 = new EntityWrapper<WarehouseBaseInfo>();
|
|
|
|
+ warehouseBaseInfoEntityWrapper1.eq("comp_id", companyId);
|
|
|
|
+ warehouseBaseInfoEntityWrapper1.eq("warehouse_name", tranTaskInfo.getReceiveWarehouse());
|
|
|
|
+ if(AuthSecurityUtils.getCurrentUserInfo() != null && AuthSecurityUtils.getCurrentUserInfo().getUserId() != null){
|
|
|
|
+ String userId = AuthSecurityUtils.getCurrentUserInfo().getUserId();
|
|
|
|
+ //洮南瀚城合营人员查看
|
|
|
|
+ if("647b84ee01044e2a8d4fdc1943ce3d01,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)){
|
|
|
|
+ warehouseBaseInfoEntityWrapper1.eq("joint_venture_parties", "洮南市二龙乡瀚城农产品有限公司");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ WarehouseBaseInfo warehouseBaseInfo1 = warehouseBaseInfoService.selectOne(warehouseBaseInfoEntityWrapper1);
|
|
if (warehouseBaseInfo != null && warehouseBaseInfo1 != null) {
|
|
if (warehouseBaseInfo != null && warehouseBaseInfo1 != null) {
|
|
biViewInfo.setStartPlace(warehouseBaseInfo.getWarehousePositioning());
|
|
biViewInfo.setStartPlace(warehouseBaseInfo.getWarehousePositioning());
|
|
biViewInfo.setEndPlace(warehouseBaseInfo1.getWarehousePositioning());
|
|
biViewInfo.setEndPlace(warehouseBaseInfo1.getWarehousePositioning());
|
|
@@ -465,11 +529,34 @@ public class BiInfoController {
|
|
private List<BiViewInfo> getTranProess(List<BiViewInfo> biViewInfos,String seachMoth) {
|
|
private List<BiViewInfo> getTranProess(List<BiViewInfo> biViewInfos,String seachMoth) {
|
|
List<BiViewInfo> biViewInfoList = new ArrayList<>();
|
|
List<BiViewInfo> biViewInfoList = new ArrayList<>();
|
|
BiViewInfo biViewInfo = new BiViewInfo();
|
|
BiViewInfo biViewInfo = new BiViewInfo();
|
|
- // 今日装车
|
|
|
|
- List<TranCarInfo> tranCarInfos = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
|
|
|
|
- .eq("status_flag", "3")
|
|
|
|
- .eq("comp_id", companyId)
|
|
|
|
- .orderBy("create_date",false));
|
|
|
|
|
|
+ List<TranCarInfo> tranCarInfos = new ArrayList<>();
|
|
|
|
+ //查询登录人合同
|
|
|
|
+ EntityWrapper<ContractManagementInfo> contractManagementInfoEntityWrapper = new EntityWrapper<ContractManagementInfo>();
|
|
|
|
+ contractManagementInfoEntityWrapper.eq("delete_flag", "0");
|
|
|
|
+ contractManagementInfoEntityWrapper.eq("comp_id", companyId);
|
|
|
|
+ contractManagementInfoEntityWrapper.orderBy("create_date",false);
|
|
|
|
+ if(AuthSecurityUtils.getCurrentUserInfo() != null && AuthSecurityUtils.getCurrentUserInfo().getUserId() != null){
|
|
|
|
+ String userId = AuthSecurityUtils.getCurrentUserInfo().getUserId();
|
|
|
|
+ //洮南瀚城合营人员查看
|
|
|
|
+ if("647b84ee01044e2a8d4fdc1943ce3d01,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)){
|
|
|
|
+ contractManagementInfoEntityWrapper.eq("joint_venture_parties", "洮南市二龙乡瀚城农产品有限公司");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ List<ContractManagementInfo> contractManagementInfos = contractManagementInfoService.selectList(contractManagementInfoEntityWrapper);
|
|
|
|
+ if (CollectionUtils.isNotEmpty(contractManagementInfos)){
|
|
|
|
+ for (int i = 0; i < contractManagementInfos.size(); i++) {
|
|
|
|
+ // 今日装车
|
|
|
|
+ TranCarInfo tranCarInfo = tranCarInfoService.selectOne(new EntityWrapper<TranCarInfo>()
|
|
|
|
+ .eq("status_flag", "3")
|
|
|
|
+ .eq("comp_id", companyId)
|
|
|
|
+ .eq("contract_no",contractManagementInfos.get(i).getContractNo())
|
|
|
|
+ .orderBy("create_date",false));
|
|
|
|
+ if(tranCarInfo != null){
|
|
|
|
+ tranCarInfos.add(tranCarInfo);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
List<TranCarInfo> tranCarInfoList = new ArrayList<>();
|
|
List<TranCarInfo> tranCarInfoList = new ArrayList<>();
|
|
if (CollectionUtils.isNotEmpty(tranCarInfos)) {
|
|
if (CollectionUtils.isNotEmpty(tranCarInfos)) {
|
|
for (int i = 0; i < tranCarInfos.size(); i++) {
|
|
for (int i = 0; i < tranCarInfos.size(); i++) {
|
|
@@ -557,6 +644,13 @@ public class BiInfoController {
|
|
pageView.put("start", start);
|
|
pageView.put("start", start);
|
|
pageView.put("end", end);
|
|
pageView.put("end", end);
|
|
pageView.put("type", "1");
|
|
pageView.put("type", "1");
|
|
|
|
+ if(AuthSecurityUtils.getCurrentUserInfo() != null && AuthSecurityUtils.getCurrentUserInfo().getUserId() != null){
|
|
|
|
+ String userId = AuthSecurityUtils.getCurrentUserInfo().getUserId();
|
|
|
|
+ //洮南瀚城合营人员查看
|
|
|
|
+ if("647b84ee01044e2a8d4fdc1943ce3d01,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)){
|
|
|
|
+ pageView.put("jointVentureParties","洮南市二龙乡瀚城农产品有限公司");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
List<WarehouseInOutInfo> list = warehouseInOutInfoMapper.brokenLineStatisticalChartByYear(pageView);
|
|
List<WarehouseInOutInfo> list = warehouseInOutInfoMapper.brokenLineStatisticalChartByYear(pageView);
|
|
if (list.size() == 0) {
|
|
if (list.size() == 0) {
|
|
Double money = 0D;
|
|
Double money = 0D;
|
|
@@ -588,6 +682,13 @@ public class BiInfoController {
|
|
pageView.put("start", start);
|
|
pageView.put("start", start);
|
|
pageView.put("end", end);
|
|
pageView.put("end", end);
|
|
pageView.put("type", "2");
|
|
pageView.put("type", "2");
|
|
|
|
+ if(AuthSecurityUtils.getCurrentUserInfo() != null && AuthSecurityUtils.getCurrentUserInfo().getUserId() != null){
|
|
|
|
+ String userId = AuthSecurityUtils.getCurrentUserInfo().getUserId();
|
|
|
|
+ //洮南瀚城合营人员查看
|
|
|
|
+ if("647b84ee01044e2a8d4fdc1943ce3d01,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)){
|
|
|
|
+ pageView.put("jointVentureParties","洮南市二龙乡瀚城农产品有限公司");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
List<WarehouseInOutInfo> list = warehouseInOutInfoMapper.brokenLineStatisticalChartByYear(pageView);
|
|
List<WarehouseInOutInfo> list = warehouseInOutInfoMapper.brokenLineStatisticalChartByYear(pageView);
|
|
if (list.size() == 0) {
|
|
if (list.size() == 0) {
|
|
Double money = 0D;
|
|
Double money = 0D;
|