|
@@ -38,7 +38,6 @@ import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.mock.web.MockMultipartFile;
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
@@ -112,6 +111,37 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
@Autowired
|
|
|
private OSSClient ossClient;
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 全部仓库
|
|
|
+ * @param compId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public List<WarehouseView> allWarehouse(String compId,String warehouseName,String goodsName) {
|
|
|
+ Map<String, Object> pageView = new HashMap<>();
|
|
|
+ // 公司ID
|
|
|
+ pageView.put("compId", compId);
|
|
|
+ pageView.put("warehouseName", warehouseName);
|
|
|
+ pageView.put("goodsName", goodsName);
|
|
|
+ List<WarehouseView> dataList = baseMapper.getAllWarehouseListByCondition(pageView);
|
|
|
+ return dataList;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 今日储量明细
|
|
|
+ * @param compId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public List<WarehouseNumView> reservesDetails(String compId) {
|
|
|
+ Map<String, Object> pageView = new HashMap<>();
|
|
|
+ // 公司ID
|
|
|
+ pageView.put("compId", compId);
|
|
|
+ List<WarehouseNumView> dataList = baseMapper.getReservesDetailsListByCondition(pageView);
|
|
|
+ return dataList;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 仓库管理页面列表
|
|
|
*
|
|
@@ -120,9 +150,11 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
*/
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public List<WarehouseView> selectWarehouseViewinfo(String compId, String warehouseName, String warehouseType) {
|
|
|
- if (compId == null || compId.isEmpty()) {
|
|
|
- compId = AuthSecurityUtils.getStaffById(AuthSecurityUtils.getCurrentUserId()).getCompId();
|
|
|
+ public WarehouseBaseInfo selectWarehouseViewinfo(String compId, String warehouseName, String warehouseType) {
|
|
|
+ WarehouseBaseInfo warehouseBaseInfos = new WarehouseBaseInfo();
|
|
|
+ if(compId == null || compId.isEmpty()){
|
|
|
+ compId=AuthSecurityUtils.getStaffById(AuthSecurityUtils.getCurrentUserId()).getCompId();
|
|
|
+
|
|
|
}
|
|
|
String personCharge = AuthSecurityUtils.getStaffById(AuthSecurityUtils.getCurrentUserId()).getStaffMobilePhone();
|
|
|
|
|
@@ -165,6 +197,14 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
warehouseView.setBinNumber(warehousePositionInfo.getBinNumber());
|
|
|
warehouseView.setCapacity(String.valueOf(warehousePositionInfo.getMaxStorage()));
|
|
|
warehouseView.setRemark(warehousePositionInfo.getRemark());
|
|
|
+ warehouseView.setWarehousePrivate(warehouseBaseInfo.getWarehousePrivate());
|
|
|
+ warehouseView.setWarehouseCity(warehouseBaseInfo.getWarehouseCity());
|
|
|
+ warehouseView.setWarehouseArea(warehouseBaseInfo.getWarehouseArea());
|
|
|
+ warehouseView.setDetailedAddress(warehouseBaseInfo.getDetailedAddress());
|
|
|
+ warehouseView.setPersonCharge(warehouseBaseInfo.getPersonCharge());
|
|
|
+ warehouseView.setPersonPhone(warehouseBaseInfo.getPersonPhone());
|
|
|
+ warehouseView.setOtherPersonCharge(warehouseBaseInfo.getOtherPersonCharge());
|
|
|
+ warehouseView.setWarehousePositioning(warehouseBaseInfo.getWarehousePositioning());
|
|
|
// 定义待完成数量
|
|
|
int count = 0;
|
|
|
// 定义应余量
|
|
@@ -184,7 +224,6 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
List<WarehouseInOutInfo> warehouseInOutInfoAllList = warehouseInOutInfoService.selectList(new EntityWrapper<WarehouseInOutInfo>()
|
|
|
.eq("position_id", warehousePositionInfo.getId()).eq("in_out_flag", "2").eq("delete_flag", "0")
|
|
|
.eq("status_flag", "3").eq("goods_name_key", warehouseInOutInfo.getGoodsNameKey()));
|
|
|
-
|
|
|
if (!CollectionUtils.isEmpty(warehouseInOutInfoAllList)) {
|
|
|
Double netWeight = 0d;
|
|
|
for (WarehouseInOutInfo warehouse : warehouseInOutInfoAllList) {
|
|
@@ -279,7 +318,14 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
warehouseView.setClearStatusFlag(warehouseBaseInfo.getClearStatusFlag());
|
|
|
warehouseView.setWarehouseName(warehouseBaseInfo.getWarehouseName());
|
|
|
warehouseView.setUpdateDate(warehouseBaseInfo.getUpdateDate());
|
|
|
+ warehouseView.setPersonCharge(warehouseBaseInfo.getPersonCharge());
|
|
|
+ warehouseView.setPersonPhone(warehouseBaseInfo.getPersonPhone());
|
|
|
+ warehouseView.setOtherPersonCharge(warehouseBaseInfo.getOtherPersonCharge());
|
|
|
+ warehouseView.setWarehousePositioning(warehouseBaseInfo.getWarehousePositioning());
|
|
|
warehouseView.setAddress(warehouseBaseInfo.getWarehousePrivate() + warehouseBaseInfo.getWarehouseCity() + warehouseBaseInfo.getWarehouseArea() + warehouseBaseInfo.getDetailedAddress());
|
|
|
+ ContractManagementInfo contractManagementInfo = contractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
|
|
|
+ .eq("contract_no",warehouseBaseInfo.getWarehouseName()).eq("delete_flag","0"));
|
|
|
+ warehouseView.setMaxInStorage(String.valueOf(contractManagementInfo.getWeight()+(contractManagementInfo.getWeight()*contractManagementInfo.getOverShort()/100)+50));
|
|
|
// 定义待完成数量
|
|
|
int count = 0;
|
|
|
//定义入库
|
|
@@ -368,9 +414,20 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- return warehouseViews;
|
|
|
+
|
|
|
+ //仓库储量柱形图
|
|
|
+ Map<String, Object> pageView = new HashMap<>();
|
|
|
+ // 公司ID
|
|
|
+ pageView.put("compId", compId);
|
|
|
+ pageView.put("warehouseName", warehouseName);
|
|
|
+ List<WarehouseNumView> dataList = baseMapper.getReservesWarehouseListByCondition(pageView);
|
|
|
+
|
|
|
+ warehouseBaseInfos.setWarehouseViewList(warehouseViews);
|
|
|
+ warehouseBaseInfos.setWarehouseNumViewList(dataList);
|
|
|
+ return warehouseBaseInfos;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
private List<String> getResourceIdList() {
|
|
|
User currentUser = AuthSecurityUtils.getCurrentUserInfo();
|
|
|
// 当前登录人主要角色
|