|
@@ -114,11 +114,12 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
|
|
|
/**
|
|
|
* 全部仓库
|
|
|
+ *
|
|
|
* @param compId
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public List<WarehouseView> allWarehouse(String compId,String warehouseName,String goodsName) {
|
|
|
+ public List<WarehouseView> allWarehouse(String compId, String warehouseName, String goodsName) {
|
|
|
Map<String, Object> pageView = new HashMap<>();
|
|
|
// 公司ID
|
|
|
pageView.put("compId", compId);
|
|
@@ -130,6 +131,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
|
|
|
/**
|
|
|
* 今日储量明细
|
|
|
+ *
|
|
|
* @param compId
|
|
|
* @return
|
|
|
*/
|
|
@@ -152,8 +154,8 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public WarehouseBaseInfo selectWarehouseViewinfo(String compId, String warehouseName, String warehouseType) {
|
|
|
WarehouseBaseInfo warehouseBaseInfos = new WarehouseBaseInfo();
|
|
|
- if(compId == null || compId.isEmpty()){
|
|
|
- compId=AuthSecurityUtils.getStaffById(AuthSecurityUtils.getCurrentUserId()).getCompId();
|
|
|
+ if (compId == null || compId.isEmpty()) {
|
|
|
+ compId = AuthSecurityUtils.getStaffById(AuthSecurityUtils.getCurrentUserId()).getCompId();
|
|
|
|
|
|
}
|
|
|
String personCharge = AuthSecurityUtils.getStaffById(AuthSecurityUtils.getCurrentUserId()).getStaffMobilePhone();
|
|
@@ -185,7 +187,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
for (WarehouseBaseInfo warehouseBaseInfo : warehouseBaseInfoList) {
|
|
|
// 以库位为维度查询
|
|
|
List<WarehousePositionInfo> warehousePositionInfos = warehousePositionInfoService.selectList(new EntityWrapper<WarehousePositionInfo>()
|
|
|
- .eq("base_id", warehouseBaseInfo.getId()).orderBy("bin_number",false));
|
|
|
+ .eq("base_id", warehouseBaseInfo.getId()).orderBy("bin_number", false));
|
|
|
if (!CollectionUtils.isEmpty(warehousePositionInfos)) {
|
|
|
for (WarehousePositionInfo warehousePositionInfo : warehousePositionInfos) {
|
|
|
WarehouseView warehouseView = new WarehouseView();
|
|
@@ -324,8 +326,8 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
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));
|
|
|
+ .eq("contract_no", warehouseBaseInfo.getWarehouseName()).eq("delete_flag", "0"));
|
|
|
+ warehouseView.setMaxInStorage(String.valueOf(contractManagementInfo.getWeight() + (contractManagementInfo.getWeight() * contractManagementInfo.getOverShort() / 100) + 50));
|
|
|
// 定义待完成数量
|
|
|
int count = 0;
|
|
|
//定义入库
|
|
@@ -582,7 +584,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
List<WarehousePositionStorageInfo> temp = new ArrayList();
|
|
|
// 以库位为维度查询
|
|
|
List<WarehousePositionInfo> warehousePositionInfos = warehousePositionInfoService.selectList(new EntityWrapper<WarehousePositionInfo>()
|
|
|
- .eq("base_id", warehouseBaseInfo.getId()).orderBy("bin_number",false));
|
|
|
+ .eq("base_id", warehouseBaseInfo.getId()).orderBy("bin_number", false));
|
|
|
if (!CollectionUtils.isEmpty(warehousePositionInfos)) {
|
|
|
for (WarehousePositionInfo warehousePositionInfo : warehousePositionInfos) {
|
|
|
//查询仓库内的货名
|
|
@@ -610,12 +612,11 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
WarehouseBaseInfo warehouseBaseInfo = this.selectById(id);
|
|
|
List<WarehousePositionInfo> warehousePositionInfoList = warehousePositionInfoService.selectList(new EntityWrapper<WarehousePositionInfo>()
|
|
|
.eq("base_id", id)
|
|
|
- .eq("delete_flag", "0").orderBy("bin_number",false));
|
|
|
+ .eq("delete_flag", "0").orderBy("bin_number", false));
|
|
|
warehousePositionInfoList.forEach(warehousePositionInfo -> {
|
|
|
List<WarehousePositionStorageInfo> warehousePositionStorageInfoList = warehousePositionStorageInfoService.selectList(new EntityWrapper<WarehousePositionStorageInfo>()
|
|
|
.eq("position_id", warehousePositionInfo.getId())
|
|
|
- .eq("delete_flag", "0"))
|
|
|
- ;
|
|
|
+ .eq("delete_flag", "0"));
|
|
|
Float storage = 0f;
|
|
|
String detailStorage = "";
|
|
|
for (WarehousePositionStorageInfo warehousePositionStorageInfo : warehousePositionStorageInfoList) {
|
|
@@ -673,7 +674,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
Float residual = 0f;
|
|
|
// 以库位为维度查询
|
|
|
List<WarehousePositionInfo> warehousePositionInfoList = warehousePositionInfoService.selectList(new EntityWrapper<WarehousePositionInfo>()
|
|
|
- .eq("base_id", warehouseBaseInfo.getId()).orderBy("bin_number",false));
|
|
|
+ .eq("base_id", warehouseBaseInfo.getId()).orderBy("bin_number", false));
|
|
|
if (!CollectionUtils.isEmpty(warehousePositionInfoList)) {
|
|
|
for (WarehousePositionInfo warehousePositionInfo : warehousePositionInfoList) {
|
|
|
// 查询应余量
|
|
@@ -745,7 +746,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
if (warehouseBaseInfo.getWarehouseType().equals("1")) {
|
|
|
//查询仓位信息
|
|
|
List<WarehousePositionInfo> warehousePositionInfos = warehousePositionInfoService.selectList(new EntityWrapper<WarehousePositionInfo>()
|
|
|
- .eq("base_id", warehouseBaseInfo.getId()).orderBy("bin_number",false));
|
|
|
+ .eq("base_id", warehouseBaseInfo.getId()).orderBy("bin_number", false));
|
|
|
if (!CollectionUtils.isEmpty(warehousePositionInfos)) {
|
|
|
for (WarehousePositionInfo warehousePositionInfo : warehousePositionInfos) {
|
|
|
warehousePositionInfoService.deleteById(warehousePositionInfo.getId());
|
|
@@ -961,7 +962,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
//查船名
|
|
|
Wrapper<TranCarInfo> shipListWrapper = new EntityWrapper<>();
|
|
|
shipListWrapper.eq("contract_no", inOutWarehouseTask.getMoveTaskNo())
|
|
|
- .eq("delete_flag", "0");
|
|
|
+ .eq("delete_flag", "0");
|
|
|
shipListWrapper.andNew().eq("tran_type", "3").or()
|
|
|
.eq("three_tran_type", "散船");
|
|
|
List<TranCarInfo> shipInfoList = tranCarInfoService.selectList(shipListWrapper);
|
|
@@ -1080,52 +1081,235 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
}
|
|
|
//查采购合同编号(不包含自运),以及移库任务编号,销售合同
|
|
|
else if (flag == 7) {
|
|
|
- List<ContractManagementInfo> contractManagementInfoList = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
|
|
|
- .eq("comp_id", compId)
|
|
|
- .eq("delete_flag", "0")
|
|
|
- .eq("contract_type", "2")
|
|
|
- .eq("status_flag", "1")
|
|
|
- .eq("deliver_type", "2")
|
|
|
- .orderBy("update_date", false));
|
|
|
- for (ContractManagementInfo contractManagementInfo : contractManagementInfoList) {
|
|
|
- ContractGoodsInfo contractGoodsInfo = contractGoodsInfoService.selectOne(new EntityWrapper<ContractGoodsInfo>()
|
|
|
- .eq("contract_id", contractManagementInfo.getId()));
|
|
|
- //查合同下的车牌号,入库只能查到未提交的
|
|
|
- List<TranCarInfo> tranCarInfoList = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
|
|
|
- .eq("contract_no", contractManagementInfo.getContractNo())
|
|
|
- .eq("fleet_flag", "0").eq("tran_type", "4").eq("three_tran_type", "汽运").ne("submit", "2")
|
|
|
- .last("ORDER BY CONVERT ( car_no USING gbk ) ASC"));
|
|
|
- if (!CollectionUtils.isEmpty(tranCarInfoList)) {
|
|
|
- contractManagementInfo.setTranCarInfoList(tranCarInfoList);
|
|
|
- }
|
|
|
- //查合同下的车队,入库只能查到未提交的
|
|
|
- List<TranCarInfo> tranCarInfoList1 = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
|
|
|
- .eq("contract_no", contractManagementInfo.getContractNo())
|
|
|
- .eq("fleet_flag", "1").eq("tran_type", "4").eq("three_tran_type", "汽运")
|
|
|
- .last("ORDER BY CONVERT ( fleet_name USING gbk ) ASC"));
|
|
|
- if (!CollectionUtils.isEmpty(tranCarInfoList1)) {
|
|
|
- contractManagementInfo.setTranCarInfoList1(tranCarInfoList1);
|
|
|
- }
|
|
|
- //查船名
|
|
|
- Wrapper<TranCarInfo> shipListWrapper = new EntityWrapper<>();
|
|
|
- shipListWrapper.eq("contract_no", contractManagementInfo.getContractNo())
|
|
|
- .eq("delete_flag", "0");
|
|
|
- shipListWrapper.andNew().eq("tran_type", "3").or()
|
|
|
- .eq("three_tran_type", "散船");
|
|
|
- List<TranCarInfo> shipInfoList = tranCarInfoService.selectList(shipListWrapper);
|
|
|
- if (!CollectionUtils.isEmpty(shipInfoList)) {
|
|
|
- contractManagementInfo.setShipInfoList(shipInfoList);
|
|
|
- }
|
|
|
- contractManagementInfo.setGoodsName(contractGoodsInfo.getGoodsName());
|
|
|
- contractManagementInfo.setGoodsNameKey(contractGoodsInfo.getGoodsNameKey());
|
|
|
- contractManagementInfo.setGrade(contractGoodsInfo.getGrade());
|
|
|
- contractManagementInfo.setInOutType("采购入库");
|
|
|
+ Map<String, Object> pageView = new HashMap<>();
|
|
|
+ pageView.put("compId", compId);
|
|
|
+ pageView.put("contractType", '2');
|
|
|
+ pageView.put("statusFlag", '1');
|
|
|
+ pageView.put("deliverType", '2');
|
|
|
+ pageView.put("fleetFlag", '0');
|
|
|
+ pageView.put("tranType", '4');
|
|
|
+ pageView.put("threeTranType", "汽运");
|
|
|
+ pageView.put("submit", '2');
|
|
|
+ pageView.put("flag", '1');
|
|
|
+ //查合同下的车牌号,入库只能查到未提交的
|
|
|
+ List<TranCarInfo> tranCarInfoLists = baseMapper.getTranCarInfo(pageView);
|
|
|
+ /*****************************/
|
|
|
+ Map<String, Object> pageView1 = new HashMap<>();
|
|
|
+ pageView1.put("compId", compId);
|
|
|
+ pageView1.put("contractType", '2');
|
|
|
+ pageView1.put("statusFlag", '1');
|
|
|
+ pageView1.put("deliverType", '2');
|
|
|
+ pageView1.put("fleetFlag", '1');
|
|
|
+ pageView1.put("tranType", '4');
|
|
|
+ pageView1.put("threeTranType", "汽运");
|
|
|
+ pageView1.put("flag", '1');
|
|
|
+ //查合同下的车牌号,入库只能查到未提交的
|
|
|
+ List<TranCarInfo> tranCarInfoLists1 = baseMapper.getTranCarInfo(pageView1);
|
|
|
+ /*****************************/
|
|
|
+ Map<String, Object> pageView2 = new HashMap<>();
|
|
|
+ pageView2.put("compId", compId);
|
|
|
+ pageView2.put("contractType", '2');
|
|
|
+ pageView2.put("statusFlag", '1');
|
|
|
+ pageView2.put("deliverType", '2');
|
|
|
+ pageView2.put("tranType", '3');
|
|
|
+ pageView2.put("threeTranType", "散船");
|
|
|
+ pageView2.put("flag", '2');
|
|
|
+ //查合同下的车牌号,入库只能查到未提交的
|
|
|
+ List<TranCarInfo> tranCarInfoLists2 = baseMapper.getTranCarInfo(pageView2);
|
|
|
+ tranCarInfoLists.addAll(tranCarInfoLists1);
|
|
|
+ tranCarInfoLists.addAll(tranCarInfoLists2);
|
|
|
+ Set< TranCarInfo > set = new HashSet<>(tranCarInfoLists);
|
|
|
+ tranCarInfoLists = set.stream()
|
|
|
+ .sorted(Comparator.comparingInt(a -> Integer.parseInt(a.getContractId().substring(1, 25)))).collect(Collectors.toList());
|
|
|
+// List<ContractManagementInfo> contractManagementInfos = new ArrayList<>();
|
|
|
+ ContractManagementInfo contractManagementInfo = new ContractManagementInfo();
|
|
|
+ List<TranCarInfo> tranCarInfos = new ArrayList<>();
|
|
|
+ List<TranCarInfo> tranCarInfos1 = new ArrayList<>();
|
|
|
+ List<TranCarInfo> tranCarInfos2 = new ArrayList<>();
|
|
|
+ for (int i = 0; i < tranCarInfoLists.size(); i++) {
|
|
|
+ TranCarInfo tranCarInfo = tranCarInfoLists.get(i);
|
|
|
+
|
|
|
if (contractManagementInfo.getUnitContractPrice() != null) {
|
|
|
//期货取点价,现货取单价
|
|
|
contractManagementInfo.setContractPrice(contractManagementInfo.getPointPrice() != null ? contractManagementInfo.getPointPrice() : Float.valueOf(String.valueOf(contractManagementInfo.getUnitContractPrice())));
|
|
|
}
|
|
|
- temp.add(contractManagementInfo);
|
|
|
+ if("0".equals(tranCarInfo.getFleetFlag())&&"4".equals(tranCarInfo.getTranType())&&"汽运".equals(tranCarInfo.getThreeTranType())&&"2".equals(tranCarInfo.getSubmit())) {
|
|
|
+ if (i == 0) {
|
|
|
+ contractManagementInfo = new ContractManagementInfo();
|
|
|
+ contractManagementInfo = contractManagementInfoService.selectById(tranCarInfo.getContractId());
|
|
|
+ ContractGoodsInfo contractGoodsInfo = contractGoodsInfoService.selectOne(new EntityWrapper<ContractGoodsInfo>()
|
|
|
+ .eq("contract_id", tranCarInfo.getContractId()));
|
|
|
+ contractManagementInfo.setGoodsName(contractGoodsInfo.getGoodsName());
|
|
|
+ contractManagementInfo.setGoodsNameKey(contractGoodsInfo.getGoodsNameKey());
|
|
|
+ contractManagementInfo.setGrade(contractGoodsInfo.getGrade());
|
|
|
+ contractManagementInfo.setInOutType("采购入库");
|
|
|
+ tranCarInfos = new ArrayList<>();
|
|
|
+ tranCarInfos1 = new ArrayList<>();
|
|
|
+ tranCarInfos2 = new ArrayList<>();
|
|
|
+ contractManagementInfo.setId(tranCarInfo.getId());
|
|
|
+ contractManagementInfo.setGoodsName(contractGoodsInfo.getGoodsName());
|
|
|
+ contractManagementInfo.setGoodsNameKey(contractGoodsInfo.getGoodsNameKey());
|
|
|
+ contractManagementInfo.setGrade(contractGoodsInfo.getGrade());
|
|
|
+ contractManagementInfo.setInOutType("采购入库");
|
|
|
+ tranCarInfos.add(tranCarInfo);
|
|
|
+ } else if (!tranCarInfo.getContractId().equals(tranCarInfoLists.get(i - 1).getContractId())) {
|
|
|
+ contractManagementInfo.setTranCarInfoList(tranCarInfos);
|
|
|
+ contractManagementInfo.setTranCarInfoList1(tranCarInfos1);
|
|
|
+ contractManagementInfo.setShipInfoList(tranCarInfos2);
|
|
|
+ temp.add(contractManagementInfo);
|
|
|
+ contractManagementInfo = new ContractManagementInfo();
|
|
|
+ contractManagementInfo = contractManagementInfoService.selectById(tranCarInfo.getContractId());
|
|
|
+ ContractGoodsInfo contractGoodsInfo = contractGoodsInfoService.selectOne(new EntityWrapper<ContractGoodsInfo>()
|
|
|
+ .eq("contract_id", tranCarInfo.getContractId()));
|
|
|
+ contractManagementInfo.setGoodsName(contractGoodsInfo.getGoodsName());
|
|
|
+ contractManagementInfo.setGoodsNameKey(contractGoodsInfo.getGoodsNameKey());
|
|
|
+ contractManagementInfo.setGrade(contractGoodsInfo.getGrade());
|
|
|
+ contractManagementInfo.setInOutType("采购入库");
|
|
|
+ tranCarInfos = new ArrayList<>();
|
|
|
+ tranCarInfos1 = new ArrayList<>();
|
|
|
+ tranCarInfos2 = new ArrayList<>();
|
|
|
+ contractManagementInfo.setId(tranCarInfo.getId());
|
|
|
+ tranCarInfos.add(tranCarInfo);
|
|
|
+ } else if (i == tranCarInfoLists.size() - 1) {
|
|
|
+ tranCarInfos.add(tranCarInfo);
|
|
|
+ contractManagementInfo.setTranCarInfoList(tranCarInfos);
|
|
|
+ temp.add(contractManagementInfo);
|
|
|
+ } else {
|
|
|
+ tranCarInfos.add(tranCarInfo);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if("1".equals(tranCarInfo.getFleetFlag())&&"4".equals(tranCarInfo.getTranType())&&"汽运".equals(tranCarInfo.getThreeTranType())) {
|
|
|
+ if (i == 0) {
|
|
|
+ contractManagementInfo = new ContractManagementInfo();
|
|
|
+ contractManagementInfo = contractManagementInfoService.selectById(tranCarInfo.getContractId());
|
|
|
+ ContractGoodsInfo contractGoodsInfo = contractGoodsInfoService.selectOne(new EntityWrapper<ContractGoodsInfo>()
|
|
|
+ .eq("contract_id", tranCarInfo.getContractId()));
|
|
|
+ contractManagementInfo.setGoodsName(contractGoodsInfo.getGoodsName());
|
|
|
+ contractManagementInfo.setGoodsNameKey(contractGoodsInfo.getGoodsNameKey());
|
|
|
+ contractManagementInfo.setGrade(contractGoodsInfo.getGrade());
|
|
|
+ contractManagementInfo.setInOutType("采购入库");
|
|
|
+ tranCarInfos = new ArrayList<>();
|
|
|
+ tranCarInfos1 = new ArrayList<>();
|
|
|
+ tranCarInfos2 = new ArrayList<>();
|
|
|
+ contractManagementInfo.setId(tranCarInfo.getId());
|
|
|
+ tranCarInfos1.add(tranCarInfo);
|
|
|
+ } else if (!tranCarInfo.getContractId().equals(tranCarInfoLists.get(i - 1).getContractId())) {
|
|
|
+ contractManagementInfo.setTranCarInfoList(tranCarInfos);
|
|
|
+ contractManagementInfo.setTranCarInfoList1(tranCarInfos1);
|
|
|
+ contractManagementInfo.setShipInfoList(tranCarInfos2);
|
|
|
+ temp.add(contractManagementInfo);
|
|
|
+ contractManagementInfo = new ContractManagementInfo();
|
|
|
+ contractManagementInfo = contractManagementInfoService.selectById(tranCarInfo.getContractId());
|
|
|
+ ContractGoodsInfo contractGoodsInfo = contractGoodsInfoService.selectOne(new EntityWrapper<ContractGoodsInfo>()
|
|
|
+ .eq("contract_id", tranCarInfo.getContractId()));
|
|
|
+ contractManagementInfo.setGoodsName(contractGoodsInfo.getGoodsName());
|
|
|
+ contractManagementInfo.setGoodsNameKey(contractGoodsInfo.getGoodsNameKey());
|
|
|
+ contractManagementInfo.setGrade(contractGoodsInfo.getGrade());
|
|
|
+ contractManagementInfo.setInOutType("采购入库");
|
|
|
+ tranCarInfos = new ArrayList<>();
|
|
|
+ tranCarInfos1 = new ArrayList<>();
|
|
|
+ tranCarInfos2 = new ArrayList<>();
|
|
|
+ contractManagementInfo.setId(tranCarInfo.getId());
|
|
|
+ tranCarInfos.add(tranCarInfo);
|
|
|
+ } else if (i == tranCarInfoLists.size() - 1) {
|
|
|
+ tranCarInfos1.add(tranCarInfo);
|
|
|
+ contractManagementInfo.setTranCarInfoList(tranCarInfos);
|
|
|
+ temp.add(contractManagementInfo);
|
|
|
+ } else {
|
|
|
+ tranCarInfos1.add(tranCarInfo);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if("3".equals(tranCarInfo.getTranType())||"散船".equals(tranCarInfo.getThreeTranType())) {
|
|
|
+ if (i == 0) {
|
|
|
+ contractManagementInfo = new ContractManagementInfo();
|
|
|
+ contractManagementInfo = contractManagementInfoService.selectById(tranCarInfo.getContractId());
|
|
|
+ ContractGoodsInfo contractGoodsInfo = contractGoodsInfoService.selectOne(new EntityWrapper<ContractGoodsInfo>()
|
|
|
+ .eq("contract_id", tranCarInfo.getContractId()));
|
|
|
+ contractManagementInfo.setGoodsName(contractGoodsInfo.getGoodsName());
|
|
|
+ contractManagementInfo.setGoodsNameKey(contractGoodsInfo.getGoodsNameKey());
|
|
|
+ contractManagementInfo.setGrade(contractGoodsInfo.getGrade());
|
|
|
+ contractManagementInfo.setInOutType("采购入库");
|
|
|
+ tranCarInfos = new ArrayList<>();
|
|
|
+ tranCarInfos1 = new ArrayList<>();
|
|
|
+ tranCarInfos2 = new ArrayList<>();
|
|
|
+ contractManagementInfo.setId(tranCarInfo.getId());
|
|
|
+ tranCarInfos2.add(tranCarInfo);
|
|
|
+ } else if (!tranCarInfo.getContractId().equals(tranCarInfoLists.get(i - 1).getContractId())) {
|
|
|
+ contractManagementInfo.setTranCarInfoList(tranCarInfos);
|
|
|
+ contractManagementInfo.setTranCarInfoList1(tranCarInfos1);
|
|
|
+ contractManagementInfo.setShipInfoList(tranCarInfos2);
|
|
|
+ temp.add(contractManagementInfo);
|
|
|
+ contractManagementInfo = new ContractManagementInfo();
|
|
|
+ contractManagementInfo = contractManagementInfoService.selectById(tranCarInfo.getContractId());
|
|
|
+ ContractGoodsInfo contractGoodsInfo = contractGoodsInfoService.selectOne(new EntityWrapper<ContractGoodsInfo>()
|
|
|
+ .eq("contract_id", tranCarInfo.getContractId()));
|
|
|
+ contractManagementInfo.setGoodsName(contractGoodsInfo.getGoodsName());
|
|
|
+ contractManagementInfo.setGoodsNameKey(contractGoodsInfo.getGoodsNameKey());
|
|
|
+ contractManagementInfo.setGrade(contractGoodsInfo.getGrade());
|
|
|
+ contractManagementInfo.setInOutType("采购入库");
|
|
|
+ tranCarInfos = new ArrayList<>();
|
|
|
+ tranCarInfos1 = new ArrayList<>();
|
|
|
+ tranCarInfos2 = new ArrayList<>();
|
|
|
+ contractManagementInfo.setId(tranCarInfo.getId());
|
|
|
+ tranCarInfos2.add(tranCarInfo);
|
|
|
+ } else if (i == tranCarInfoLists.size() - 1) {
|
|
|
+ tranCarInfos2.add(tranCarInfo);
|
|
|
+ contractManagementInfo.setTranCarInfoList(tranCarInfos);
|
|
|
+ temp.add(contractManagementInfo);
|
|
|
+ } else {
|
|
|
+ tranCarInfos2.add(tranCarInfo);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+/*****************************************************---------------------------******************************/
|
|
|
+// List<ContractManagementInfo> contractManagementInfoList = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
|
|
|
+// .eq("comp_id", compId)
|
|
|
+// .eq("delete_flag", "0")
|
|
|
+// .eq("contract_type", "2")
|
|
|
+// .eq("status_flag", "1")
|
|
|
+// .eq("deliver_type", "2")
|
|
|
+// .orderBy("update_date", false));
|
|
|
+// for (ContractManagementInfo contractManagementInfo : contractManagementInfoList) {
|
|
|
+// ContractGoodsInfo contractGoodsInfo = contractGoodsInfoService.selectOne(new EntityWrapper<ContractGoodsInfo>()
|
|
|
+// .eq("contract_id", contractManagementInfo.getId()));
|
|
|
+// //查合同下的车牌号,入库只能查到未提交的
|
|
|
+// List<TranCarInfo> tranCarInfoList = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
|
|
|
+// .eq("contract_no", contractManagementInfo.getContractNo())
|
|
|
+// .eq("fleet_flag", "0").eq("tran_type", "4").eq("three_tran_type", "汽运").ne("submit", "2")
|
|
|
+// .last("ORDER BY CONVERT ( car_no USING gbk ) ASC"));
|
|
|
+// if (!CollectionUtils.isEmpty(tranCarInfoList)) {
|
|
|
+// contractManagementInfo.setTranCarInfoList(tranCarInfoList);
|
|
|
+// }
|
|
|
+// //查合同下的车队,入库只能查到未提交的
|
|
|
+// List<TranCarInfo> tranCarInfoList1 = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
|
|
|
+// .eq("contract_no", contractManagementInfo.getContractNo())
|
|
|
+// .eq("fleet_flag", "1").eq("tran_type", "4").eq("three_tran_type", "汽运")
|
|
|
+// .last("ORDER BY CONVERT ( fleet_name USING gbk ) ASC"));
|
|
|
+// if (!CollectionUtils.isEmpty(tranCarInfoList1)) {
|
|
|
+// contractManagementInfo.setTranCarInfoList1(tranCarInfoList1);
|
|
|
+// }
|
|
|
+// //查船名
|
|
|
+// Wrapper<TranCarInfo> shipListWrapper = new EntityWrapper<>();
|
|
|
+// shipListWrapper.eq("contract_no", contractManagementInfo.getContractNo())
|
|
|
+// .eq("delete_flag", "0");
|
|
|
+// shipListWrapper.andNew().eq("tran_type", "3").or()
|
|
|
+// .eq("three_tran_type", "散船");
|
|
|
+// List<TranCarInfo> shipInfoList = tranCarInfoService.selectList(shipListWrapper);
|
|
|
+// if (!CollectionUtils.isEmpty(shipInfoList)) {
|
|
|
+// contractManagementInfo.setShipInfoList(shipInfoList);
|
|
|
+// }
|
|
|
+// contractManagementInfo.setGoodsName(contractGoodsInfo.getGoodsName());
|
|
|
+// contractManagementInfo.setGoodsNameKey(contractGoodsInfo.getGoodsNameKey());
|
|
|
+// contractManagementInfo.setGrade(contractGoodsInfo.getGrade());
|
|
|
+// contractManagementInfo.setInOutType("采购入库");
|
|
|
+// if (contractManagementInfo.getUnitContractPrice() != null) {
|
|
|
+// //期货取点价,现货取单价
|
|
|
+// contractManagementInfo.setContractPrice(contractManagementInfo.getPointPrice() != null ? contractManagementInfo.getPointPrice() : Float.valueOf(String.valueOf(contractManagementInfo.getUnitContractPrice())));
|
|
|
+// }
|
|
|
+// temp.add(contractManagementInfo);
|
|
|
+// }
|
|
|
List<ContractManagementInfo> contractManagementInfoList1 = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
|
|
|
.eq("comp_id", compId)
|
|
|
.eq("status_flag", "1")
|
|
@@ -1151,7 +1335,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
//查船名
|
|
|
Wrapper<TranCarInfo> shipListWrapper = new EntityWrapper<>();
|
|
|
shipListWrapper.eq("contract_no", contractManagementInfo1.getContractNo())
|
|
|
- .eq("delete_flag", "0");
|
|
|
+ .eq("delete_flag", "0");
|
|
|
shipListWrapper.andNew().eq("tran_type", "3").or()
|
|
|
.eq("three_tran_type", "散船");
|
|
|
List<TranCarInfo> shipInfoList = tranCarInfoService.selectList(shipListWrapper);
|
|
@@ -1171,20 +1355,20 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
.eq("in_out_flag", "1")
|
|
|
.orderBy("update_date", false));
|
|
|
for (InOutWarehouseTask inOutWarehouseTask : inOutWarehouseTaskList) {
|
|
|
- ContractManagementInfo contractManagementInfo = new ContractManagementInfo();
|
|
|
+ ContractManagementInfo contractManagementInfo1 = new ContractManagementInfo();
|
|
|
BeanUtils.copyProperties(inOutWarehouseTask, contractManagementInfo);
|
|
|
//查移库任务编号下的车牌号,入库只能查到已出库的
|
|
|
List<TranCarInfo> tranCarInfoList = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
|
|
|
.eq("contract_no", inOutWarehouseTask.getMoveTaskNo()).eq("fleet_flag", "0").eq("tran_type", "1").eq("submit", "1")
|
|
|
.last("ORDER BY CONVERT ( car_no USING gbk ) ASC"));
|
|
|
if (!CollectionUtils.isEmpty(tranCarInfoList)) {
|
|
|
- contractManagementInfo.setTranCarInfoList(tranCarInfoList);
|
|
|
+ contractManagementInfo1.setTranCarInfoList(tranCarInfoList);
|
|
|
}
|
|
|
List<TranCarInfo> tranCarInfoList1 = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
|
|
|
.eq("contract_no", inOutWarehouseTask.getMoveTaskNo()).eq("fleet_flag", "1").eq("tran_type", "1")
|
|
|
.last("ORDER BY CONVERT ( fleet_name USING gbk ) ASC"));
|
|
|
if (!CollectionUtils.isEmpty(tranCarInfoList1)) {
|
|
|
- contractManagementInfo.setTranCarInfoList1(tranCarInfoList1);
|
|
|
+ contractManagementInfo1.setTranCarInfoList1(tranCarInfoList1);
|
|
|
}
|
|
|
//查船名
|
|
|
Wrapper<TranCarInfo> shipListWrapper = new EntityWrapper<>();
|
|
@@ -1194,23 +1378,23 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
.eq("three_tran_type", "散船");
|
|
|
List<TranCarInfo> shipInfoList = tranCarInfoService.selectList(shipListWrapper);
|
|
|
if (!CollectionUtils.isEmpty(shipInfoList)) {
|
|
|
- contractManagementInfo.setShipInfoList(shipInfoList);
|
|
|
+ contractManagementInfo1.setShipInfoList(shipInfoList);
|
|
|
}
|
|
|
- contractManagementInfo.setContractNo(inOutWarehouseTask.getMoveTaskNo());
|
|
|
- contractManagementInfo.setContractPrice(inOutWarehouseTask.getUnitPrice());
|
|
|
+ contractManagementInfo1.setContractNo(inOutWarehouseTask.getMoveTaskNo());
|
|
|
+ contractManagementInfo1.setContractPrice(inOutWarehouseTask.getUnitPrice());
|
|
|
//自运采购的移库
|
|
|
- ContractManagementInfo contractManagementInfo1 = contractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
|
|
|
+ ContractManagementInfo contractManagementInfo2 = contractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
|
|
|
.eq("comp_id", inOutWarehouseTask.getCompId())
|
|
|
.eq("contract_no", inOutWarehouseTask.getSendWarehouse()));
|
|
|
- if (contractManagementInfo1 != null) {
|
|
|
- contractManagementInfo.setContractPrice(Float.valueOf(String.valueOf(contractManagementInfo1.getUnitContractPrice())));
|
|
|
+ if (contractManagementInfo2 != null) {
|
|
|
+ contractManagementInfo1.setContractPrice(Float.valueOf(String.valueOf(contractManagementInfo1.getUnitContractPrice())));
|
|
|
}
|
|
|
//移库看成自运
|
|
|
- contractManagementInfo.setDeliverType("1");
|
|
|
- contractManagementInfo.setSendWarehouse(inOutWarehouseTask.getSendWarehouse());
|
|
|
- contractManagementInfo.setGrade(inOutWarehouseTask.getGrade());
|
|
|
- contractManagementInfo.setInOutType("移库入库");
|
|
|
- temp.add(contractManagementInfo);
|
|
|
+ contractManagementInfo1.setDeliverType("1");
|
|
|
+ contractManagementInfo1.setSendWarehouse(inOutWarehouseTask.getSendWarehouse());
|
|
|
+ contractManagementInfo1.setGrade(inOutWarehouseTask.getGrade());
|
|
|
+ contractManagementInfo1.setInOutType("移库入库");
|
|
|
+ temp.add(contractManagementInfo1);
|
|
|
}
|
|
|
return temp;
|
|
|
}
|
|
@@ -1295,13 +1479,13 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
Map<String, Object> pageView = new HashMap<>();
|
|
|
pageView.put("warehouseName", warehouseBaseInfo.getWarehouseName());
|
|
|
pageView.put("compId", warehouseBaseInfo.getCompId());
|
|
|
- pageView.put("serviceManagementType","3");
|
|
|
+ pageView.put("serviceManagementType", "3");
|
|
|
// 查询收购质检信息包括已删除的
|
|
|
Integer dataCount = baseMapper.getCountByCondition(pageView);
|
|
|
Map<String, Object> pageView1 = new HashMap<>();
|
|
|
pageView1.put("warehouseName", warehouseBaseInfo.getWarehouseName());
|
|
|
pageView1.put("compId", warehouseBaseInfo.getCompId());
|
|
|
- pageView1.put("serviceManagementType","1");
|
|
|
+ pageView1.put("serviceManagementType", "1");
|
|
|
// 查询贸易质检信息包括已删除的
|
|
|
Integer dataCount1 = baseMapper.getCountByCondition(pageView1);
|
|
|
warehouseBaseInfo.setCount(dataCount);
|
|
@@ -1309,7 +1493,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
Map<String, Object> pageView2 = new HashMap<>();
|
|
|
pageView2.put("warehouseName", warehouseBaseInfo.getWarehouseName());
|
|
|
pageView2.put("compId", warehouseBaseInfo.getCompId());
|
|
|
- pageView2.put("serviceManagementType","2");
|
|
|
+ pageView2.put("serviceManagementType", "2");
|
|
|
// 查询出库信息包括已删除的
|
|
|
Integer dataCount2 = baseMapper.getCountByCondition(pageView2);
|
|
|
warehouseBaseInfo.setOutCount(dataCount2);
|
|
@@ -1338,13 +1522,13 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
Map<String, Object> pageView = new HashMap<>();
|
|
|
pageView.put("warehouseName", warehouseBaseInfo.getWarehouseName());
|
|
|
pageView.put("compId", warehouseBaseInfo.getCompId());
|
|
|
- pageView.put("serviceManagementType","3");
|
|
|
+ pageView.put("serviceManagementType", "3");
|
|
|
// 查询收购质检信息包括已删除的
|
|
|
Integer dataCount = baseMapper.getCountByCondition(pageView);
|
|
|
Map<String, Object> pageView1 = new HashMap<>();
|
|
|
pageView1.put("warehouseName", warehouseBaseInfo.getWarehouseName());
|
|
|
pageView1.put("compId", warehouseBaseInfo.getCompId());
|
|
|
- pageView1.put("serviceManagementType","1");
|
|
|
+ pageView1.put("serviceManagementType", "1");
|
|
|
// 查询贸易质检信息包括已删除的
|
|
|
Integer dataCount1 = baseMapper.getCountByCondition(pageView1);
|
|
|
warehouseBaseInfo.setCount(dataCount);
|
|
@@ -1352,7 +1536,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
Map<String, Object> pageView2 = new HashMap<>();
|
|
|
pageView2.put("warehouseName", warehouseBaseInfo.getWarehouseName());
|
|
|
pageView2.put("compId", warehouseBaseInfo.getCompId());
|
|
|
- pageView2.put("serviceManagementType","2");
|
|
|
+ pageView2.put("serviceManagementType", "2");
|
|
|
// 查询出库信息包括已删除的
|
|
|
Integer dataCount2 = baseMapper.getCountByCondition(pageView2);
|
|
|
warehouseBaseInfo.setOutCount(dataCount2);
|
|
@@ -1368,7 +1552,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
List<WarehousePositionStorageInfo> temp = new ArrayList();
|
|
|
// 以库位为维度查询
|
|
|
List<WarehousePositionInfo> warehousePositionInfos = warehousePositionInfoService.selectList(new EntityWrapper<WarehousePositionInfo>()
|
|
|
- .eq("base_id", warehouseBaseInfo.getId()).orderBy("bin_number",false));
|
|
|
+ .eq("base_id", warehouseBaseInfo.getId()).orderBy("bin_number", false));
|
|
|
if (!CollectionUtils.isEmpty(warehousePositionInfos)) {
|
|
|
for (WarehousePositionInfo warehousePositionInfo : warehousePositionInfos) {
|
|
|
//查询仓库内的货名
|
|
@@ -1405,7 +1589,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
personCharge = AuthSecurityUtils.getStaffById(AuthSecurityUtils.getCurrentUserId()).getStaffMobilePhone();
|
|
|
}
|
|
|
Wrapper<WarehouseBaseInfo> warehouseBaseInfoWrapper = new EntityWrapper<>();
|
|
|
- warehouseBaseInfoWrapper.eq("comp_id", compId).eq("warehouse_type","1")
|
|
|
+ warehouseBaseInfoWrapper.eq("comp_id", compId).eq("warehouse_type", "1")
|
|
|
.orderBy("warehouse_type", true).eq("delete_flag", "0");
|
|
|
warehouseBaseInfoWrapper.andNew().eq("person_phone", personCharge).or()
|
|
|
.like("other_person_charge", personCharge);
|
|
@@ -1422,13 +1606,13 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
Map<String, Object> pageView = new HashMap<>();
|
|
|
pageView.put("warehouseName", warehouseBaseInfo.getWarehouseName());
|
|
|
pageView.put("compId", warehouseBaseInfo.getCompId());
|
|
|
- pageView.put("serviceManagementType","3");
|
|
|
+ pageView.put("serviceManagementType", "3");
|
|
|
// 查询收购质检信息包括已删除的
|
|
|
Integer dataCount = baseMapper.getCountByCondition(pageView);
|
|
|
Map<String, Object> pageView1 = new HashMap<>();
|
|
|
pageView1.put("warehouseName", warehouseBaseInfo.getWarehouseName());
|
|
|
pageView1.put("compId", warehouseBaseInfo.getCompId());
|
|
|
- pageView1.put("serviceManagementType","1");
|
|
|
+ pageView1.put("serviceManagementType", "1");
|
|
|
// 查询贸易质检信息包括已删除的
|
|
|
Integer dataCount1 = baseMapper.getCountByCondition(pageView1);
|
|
|
warehouseBaseInfo.setCount(dataCount);
|
|
@@ -1436,7 +1620,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
Map<String, Object> pageView2 = new HashMap<>();
|
|
|
pageView2.put("warehouseName", warehouseBaseInfo.getWarehouseName());
|
|
|
pageView2.put("compId", warehouseBaseInfo.getCompId());
|
|
|
- pageView2.put("serviceManagementType","2");
|
|
|
+ pageView2.put("serviceManagementType", "2");
|
|
|
// 查询出库信息包括已删除的
|
|
|
Integer dataCount2 = baseMapper.getCountByCondition(pageView2);
|
|
|
warehouseBaseInfo.setOutCount(dataCount2);
|
|
@@ -1466,13 +1650,13 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
Map<String, Object> pageView = new HashMap<>();
|
|
|
pageView.put("warehouseName", warehouseBaseInfo.getWarehouseName());
|
|
|
pageView.put("compId", warehouseBaseInfo.getCompId());
|
|
|
- pageView.put("serviceManagementType","3");
|
|
|
+ pageView.put("serviceManagementType", "3");
|
|
|
// 查询收购质检信息包括已删除的
|
|
|
Integer dataCount = baseMapper.getCountByCondition(pageView);
|
|
|
Map<String, Object> pageView1 = new HashMap<>();
|
|
|
pageView1.put("warehouseName", warehouseBaseInfo.getWarehouseName());
|
|
|
pageView1.put("compId", warehouseBaseInfo.getCompId());
|
|
|
- pageView1.put("serviceManagementType","1");
|
|
|
+ pageView1.put("serviceManagementType", "1");
|
|
|
// 查询贸易质检信息包括已删除的
|
|
|
Integer dataCount1 = baseMapper.getCountByCondition(pageView1);
|
|
|
warehouseBaseInfo.setCount(dataCount);
|
|
@@ -1480,7 +1664,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
Map<String, Object> pageView2 = new HashMap<>();
|
|
|
pageView2.put("warehouseName", warehouseBaseInfo.getWarehouseName());
|
|
|
pageView2.put("compId", warehouseBaseInfo.getCompId());
|
|
|
- pageView2.put("serviceManagementType","2");
|
|
|
+ pageView2.put("serviceManagementType", "2");
|
|
|
// 查询出库信息包括已删除的
|
|
|
Integer dataCount2 = baseMapper.getCountByCondition(pageView2);
|
|
|
warehouseBaseInfo.setOutCount(dataCount2);
|
|
@@ -1496,7 +1680,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
List<WarehousePositionStorageInfo> temp = new ArrayList();
|
|
|
// 以库位为维度查询
|
|
|
List<WarehousePositionInfo> warehousePositionInfos = warehousePositionInfoService.selectList(new EntityWrapper<WarehousePositionInfo>()
|
|
|
- .eq("base_id", warehouseBaseInfo.getId()).orderBy("bin_number",false));
|
|
|
+ .eq("base_id", warehouseBaseInfo.getId()).orderBy("bin_number", false));
|
|
|
if (!CollectionUtils.isEmpty(warehousePositionInfos)) {
|
|
|
for (WarehousePositionInfo warehousePositionInfo : warehousePositionInfos) {
|
|
|
//查询仓库内的货名
|
|
@@ -1887,16 +2071,16 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
|
|
|
// 设置列宽
|
|
|
sheet.setColumnWidth(0, 1 * 256 + 184);
|
|
|
- sheet.setColumnWidth(1, "采购公司".getBytes().length*3*256);
|
|
|
- sheet.setColumnWidth(2, "收货仓库".getBytes().length*25/10*256);
|
|
|
+ sheet.setColumnWidth(1, "采购公司".getBytes().length * 3 * 256);
|
|
|
+ sheet.setColumnWidth(2, "收货仓库".getBytes().length * 25 / 10 * 256);
|
|
|
sheet.setColumnWidth(3, 12 * 256 + 184);
|
|
|
- sheet.setColumnWidth(4, "开票日期".getBytes().length*2*256);
|
|
|
- sheet.setColumnWidth(5, "合同编号".getBytes().length*2*256);
|
|
|
- sheet.setColumnWidth(6, "业务编号".getBytes().length*2*256);
|
|
|
+ sheet.setColumnWidth(4, "开票日期".getBytes().length * 2 * 256);
|
|
|
+ sheet.setColumnWidth(5, "合同编号".getBytes().length * 2 * 256);
|
|
|
+ sheet.setColumnWidth(6, "业务编号".getBytes().length * 2 * 256);
|
|
|
sheet.setColumnWidth(7, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(8, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(9, 12 * 256 + 184);
|
|
|
- sheet.setColumnWidth(10, "货名".getBytes().length*3*256);
|
|
|
+ sheet.setColumnWidth(10, "货名".getBytes().length * 3 * 256);
|
|
|
sheet.setColumnWidth(11, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(12, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(13, 12 * 256 + 184);
|
|
@@ -1917,17 +2101,17 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
sheet.setColumnWidth(28, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(29, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(30, 12 * 256 + 184);
|
|
|
- sheet.setColumnWidth(31, "发货库".getBytes().length*25/10*256);
|
|
|
+ sheet.setColumnWidth(31, "发货库".getBytes().length * 25 / 10 * 256);
|
|
|
sheet.setColumnWidth(32, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(33, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(34, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(35, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(36, 12 * 256 + 184);
|
|
|
- sheet.setColumnWidth(37, "合计应付".getBytes().length*2*256);
|
|
|
+ sheet.setColumnWidth(37, "合计应付".getBytes().length * 2 * 256);
|
|
|
sheet.setColumnWidth(38, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(39, 12 * 256 + 184);
|
|
|
- sheet.setColumnWidth(40, "卡号".getBytes().length*4*256);
|
|
|
- sheet.setColumnWidth(41, "开户支行".getBytes().length*4*256);
|
|
|
+ sheet.setColumnWidth(40, "卡号".getBytes().length * 4 * 256);
|
|
|
+ sheet.setColumnWidth(41, "开户支行".getBytes().length * 4 * 256);
|
|
|
sheet.setColumnWidth(42, 1 * 256 + 184);
|
|
|
|
|
|
// 创建单元格对象
|
|
@@ -2357,32 +2541,32 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
cell.setCellValue(editString(exportVView.getGrade()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
cell = rowx.createCell(13);
|
|
|
- if(!StringUtils.isEmpty(exportVView.getWaterContent())){
|
|
|
+ if (!StringUtils.isEmpty(exportVView.getWaterContent())) {
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getWaterContent()));
|
|
|
}
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
cell = rowx.createCell(14);
|
|
|
- if(!StringUtils.isEmpty(exportVView.getImpurity())){
|
|
|
+ if (!StringUtils.isEmpty(exportVView.getImpurity())) {
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getImpurity()));
|
|
|
}
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
cell = rowx.createCell(15);
|
|
|
- if(!StringUtils.isEmpty(exportVView.getMildewGrain())){
|
|
|
+ if (!StringUtils.isEmpty(exportVView.getMildewGrain())) {
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getMildewGrain()));
|
|
|
}
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
cell = rowx.createCell(16);
|
|
|
- if(!StringUtils.isEmpty(exportVView.getImperfectGrain())){
|
|
|
+ if (!StringUtils.isEmpty(exportVView.getImperfectGrain())) {
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getImperfectGrain()));
|
|
|
}
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
cell = rowx.createCell(17);
|
|
|
- if(!StringUtils.isEmpty(exportVView.getBulkDensity())){
|
|
|
+ if (!StringUtils.isEmpty(exportVView.getBulkDensity())) {
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getBulkDensity()));
|
|
|
}
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
cell = rowx.createCell(18);
|
|
|
- if(!StringUtils.isEmpty(exportVView.getJiaorenli())){
|
|
|
+ if (!StringUtils.isEmpty(exportVView.getJiaorenli())) {
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getJiaorenli()));
|
|
|
}
|
|
|
cell.setCellStyle(contextstyle);
|
|
@@ -2716,16 +2900,16 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
|
|
|
// 设置列宽
|
|
|
sheet.setColumnWidth(0, 1 * 256 + 184);
|
|
|
- sheet.setColumnWidth(1, "采购公司".getBytes().length*3*256);
|
|
|
- sheet.setColumnWidth(2, "收货仓库".getBytes().length*25/10*256);
|
|
|
+ sheet.setColumnWidth(1, "采购公司".getBytes().length * 3 * 256);
|
|
|
+ sheet.setColumnWidth(2, "收货仓库".getBytes().length * 25 / 10 * 256);
|
|
|
sheet.setColumnWidth(3, 12 * 256 + 184);
|
|
|
- sheet.setColumnWidth(4, "开票日期".getBytes().length*2*256);
|
|
|
- sheet.setColumnWidth(5, "合同编号".getBytes().length*2*256);
|
|
|
- sheet.setColumnWidth(6, "业务编号".getBytes().length*2*256);
|
|
|
+ sheet.setColumnWidth(4, "开票日期".getBytes().length * 2 * 256);
|
|
|
+ sheet.setColumnWidth(5, "合同编号".getBytes().length * 2 * 256);
|
|
|
+ sheet.setColumnWidth(6, "业务编号".getBytes().length * 2 * 256);
|
|
|
sheet.setColumnWidth(7, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(8, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(9, 12 * 256 + 184);
|
|
|
- sheet.setColumnWidth(10, "货名".getBytes().length*3*256);
|
|
|
+ sheet.setColumnWidth(10, "货名".getBytes().length * 3 * 256);
|
|
|
sheet.setColumnWidth(11, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(12, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(13, 12 * 256 + 184);
|
|
@@ -2746,17 +2930,17 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
sheet.setColumnWidth(28, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(29, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(30, 12 * 256 + 184);
|
|
|
- sheet.setColumnWidth(31, "发货库".getBytes().length*25/10*256);
|
|
|
+ sheet.setColumnWidth(31, "发货库".getBytes().length * 25 / 10 * 256);
|
|
|
sheet.setColumnWidth(32, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(33, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(34, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(35, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(36, 12 * 256 + 184);
|
|
|
- sheet.setColumnWidth(37, "合计应付".getBytes().length*2*256);
|
|
|
+ sheet.setColumnWidth(37, "合计应付".getBytes().length * 2 * 256);
|
|
|
sheet.setColumnWidth(38, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(39, 12 * 256 + 184);
|
|
|
- sheet.setColumnWidth(40, "卡号".getBytes().length*4*256);
|
|
|
- sheet.setColumnWidth(41, "开户支行".getBytes().length*4*256);
|
|
|
+ sheet.setColumnWidth(40, "卡号".getBytes().length * 4 * 256);
|
|
|
+ sheet.setColumnWidth(41, "开户支行".getBytes().length * 4 * 256);
|
|
|
sheet.setColumnWidth(42, 1 * 256 + 184);
|
|
|
|
|
|
// 创建单元格对象
|
|
@@ -3176,32 +3360,32 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
cell.setCellValue(editString(exportVView.getGrade()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
cell = rowx.createCell(13);
|
|
|
- if(!StringUtils.isEmpty(exportVView.getWaterContent())){
|
|
|
+ if (!StringUtils.isEmpty(exportVView.getWaterContent())) {
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getWaterContent()));
|
|
|
}
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
cell = rowx.createCell(14);
|
|
|
- if(!StringUtils.isEmpty(exportVView.getImpurity())){
|
|
|
+ if (!StringUtils.isEmpty(exportVView.getImpurity())) {
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getImpurity()));
|
|
|
}
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
cell = rowx.createCell(15);
|
|
|
- if(!StringUtils.isEmpty(exportVView.getMildewGrain())){
|
|
|
+ if (!StringUtils.isEmpty(exportVView.getMildewGrain())) {
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getMildewGrain()));
|
|
|
}
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
cell = rowx.createCell(16);
|
|
|
- if(!StringUtils.isEmpty(exportVView.getImperfectGrain())){
|
|
|
+ if (!StringUtils.isEmpty(exportVView.getImperfectGrain())) {
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getImperfectGrain()));
|
|
|
}
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
cell = rowx.createCell(17);
|
|
|
- if(!StringUtils.isEmpty(exportVView.getBulkDensity())){
|
|
|
+ if (!StringUtils.isEmpty(exportVView.getBulkDensity())) {
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getBulkDensity()));
|
|
|
}
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
cell = rowx.createCell(18);
|
|
|
- if(!StringUtils.isEmpty(exportVView.getJiaorenli())){
|
|
|
+ if (!StringUtils.isEmpty(exportVView.getJiaorenli())) {
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getJiaorenli()));
|
|
|
}
|
|
|
cell.setCellStyle(contextstyle);
|
|
@@ -3535,17 +3719,17 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
|
|
|
// 设置列宽
|
|
|
sheet.setColumnWidth(0, 1 * 256 + 184);
|
|
|
- sheet.setColumnWidth(1, "销售公司".getBytes().length*3*256);
|
|
|
- sheet.setColumnWidth(2, "发货仓库".getBytes().length*25/10*256);
|
|
|
+ sheet.setColumnWidth(1, "销售公司".getBytes().length * 3 * 256);
|
|
|
+ sheet.setColumnWidth(2, "发货仓库".getBytes().length * 25 / 10 * 256);
|
|
|
sheet.setColumnWidth(3, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(4, 12 * 256 + 184);
|
|
|
- sheet.setColumnWidth(5, "发货日期".getBytes().length*2*256);
|
|
|
- sheet.setColumnWidth(6, "合同编号".getBytes().length*2*256);
|
|
|
+ sheet.setColumnWidth(5, "发货日期".getBytes().length * 2 * 256);
|
|
|
+ sheet.setColumnWidth(6, "合同编号".getBytes().length * 2 * 256);
|
|
|
sheet.setColumnWidth(7, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(8, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(9, 12 * 256 + 184);
|
|
|
- sheet.setColumnWidth(10, "客户".getBytes().length*6*256);
|
|
|
- sheet.setColumnWidth(11, "货名".getBytes().length*3*256);
|
|
|
+ sheet.setColumnWidth(10, "客户".getBytes().length * 6 * 256);
|
|
|
+ sheet.setColumnWidth(11, "货名".getBytes().length * 3 * 256);
|
|
|
sheet.setColumnWidth(12, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(13, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(14, 12 * 256 + 184);
|
|
@@ -3567,7 +3751,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
sheet.setColumnWidth(30, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(31, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(32, 12 * 256 + 184);
|
|
|
- sheet.setColumnWidth(33, "反馈日期".getBytes().length*2*256);
|
|
|
+ sheet.setColumnWidth(33, "反馈日期".getBytes().length * 2 * 256);
|
|
|
sheet.setColumnWidth(34, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(35, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(36, 12 * 256 + 184);
|
|
@@ -3577,7 +3761,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
sheet.setColumnWidth(40, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(41, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(42, 12 * 256 + 184);
|
|
|
- sheet.setColumnWidth(43, "收款日期".getBytes().length*2*256);
|
|
|
+ sheet.setColumnWidth(43, "收款日期".getBytes().length * 2 * 256);
|
|
|
sheet.setColumnWidth(44, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(45, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(46, 1 * 256 + 184);
|
|
@@ -4027,32 +4211,32 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
cell.setCellValue(editString(exportVView.getGrade()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
cell = rowx.createCell(14);
|
|
|
- if(!StringUtils.isEmpty(exportVView.getWaterContent())){
|
|
|
+ if (!StringUtils.isEmpty(exportVView.getWaterContent())) {
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getWaterContent()));
|
|
|
}
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
cell = rowx.createCell(15);
|
|
|
- if(!StringUtils.isEmpty(exportVView.getImpurity())){
|
|
|
+ if (!StringUtils.isEmpty(exportVView.getImpurity())) {
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getImpurity()));
|
|
|
}
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
cell = rowx.createCell(16);
|
|
|
- if(!StringUtils.isEmpty(exportVView.getMildewGrain())){
|
|
|
+ if (!StringUtils.isEmpty(exportVView.getMildewGrain())) {
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getMildewGrain()));
|
|
|
}
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
cell = rowx.createCell(17);
|
|
|
- if(!StringUtils.isEmpty(exportVView.getImperfectGrain())){
|
|
|
+ if (!StringUtils.isEmpty(exportVView.getImperfectGrain())) {
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getImperfectGrain()));
|
|
|
}
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
cell = rowx.createCell(18);
|
|
|
- if(!StringUtils.isEmpty(exportVView.getBulkDensity())){
|
|
|
+ if (!StringUtils.isEmpty(exportVView.getBulkDensity())) {
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getBulkDensity()));
|
|
|
}
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
cell = rowx.createCell(19);
|
|
|
- if(!StringUtils.isEmpty(exportVView.getJiaorenli())){
|
|
|
+ if (!StringUtils.isEmpty(exportVView.getJiaorenli())) {
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getJiaorenli()));
|
|
|
}
|
|
|
cell.setCellStyle(contextstyle);
|
|
@@ -4396,17 +4580,17 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
|
|
|
// 设置列宽
|
|
|
sheet.setColumnWidth(0, 1 * 256 + 184);
|
|
|
- sheet.setColumnWidth(1, "销售公司".getBytes().length*3*256);
|
|
|
- sheet.setColumnWidth(2, "发货仓库".getBytes().length*25/10*256);
|
|
|
+ sheet.setColumnWidth(1, "销售公司".getBytes().length * 3 * 256);
|
|
|
+ sheet.setColumnWidth(2, "发货仓库".getBytes().length * 25 / 10 * 256);
|
|
|
sheet.setColumnWidth(3, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(4, 12 * 256 + 184);
|
|
|
- sheet.setColumnWidth(5, "发货日期".getBytes().length*2*256);
|
|
|
- sheet.setColumnWidth(6, "合同编号".getBytes().length*2*256);
|
|
|
+ sheet.setColumnWidth(5, "发货日期".getBytes().length * 2 * 256);
|
|
|
+ sheet.setColumnWidth(6, "合同编号".getBytes().length * 2 * 256);
|
|
|
sheet.setColumnWidth(7, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(8, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(9, 12 * 256 + 184);
|
|
|
- sheet.setColumnWidth(10, "客户".getBytes().length*6*256);
|
|
|
- sheet.setColumnWidth(11, "货名".getBytes().length*3*256);
|
|
|
+ sheet.setColumnWidth(10, "客户".getBytes().length * 6 * 256);
|
|
|
+ sheet.setColumnWidth(11, "货名".getBytes().length * 3 * 256);
|
|
|
sheet.setColumnWidth(12, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(13, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(14, 12 * 256 + 184);
|
|
@@ -4428,7 +4612,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
sheet.setColumnWidth(30, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(31, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(32, 12 * 256 + 184);
|
|
|
- sheet.setColumnWidth(33, "反馈日期".getBytes().length*2*256);
|
|
|
+ sheet.setColumnWidth(33, "反馈日期".getBytes().length * 2 * 256);
|
|
|
sheet.setColumnWidth(34, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(35, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(36, 12 * 256 + 184);
|
|
@@ -4438,7 +4622,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
sheet.setColumnWidth(40, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(41, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(42, 12 * 256 + 184);
|
|
|
- sheet.setColumnWidth(43, "收款日期".getBytes().length*2*256);
|
|
|
+ sheet.setColumnWidth(43, "收款日期".getBytes().length * 2 * 256);
|
|
|
sheet.setColumnWidth(44, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(45, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(46, 1 * 256 + 184);
|
|
@@ -4887,32 +5071,32 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
cell.setCellValue(editString(exportVView.getGrade()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
cell = rowx.createCell(14);
|
|
|
- if(!StringUtils.isEmpty(exportVView.getWaterContent())){
|
|
|
+ if (!StringUtils.isEmpty(exportVView.getWaterContent())) {
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getWaterContent()));
|
|
|
}
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
cell = rowx.createCell(15);
|
|
|
- if(!StringUtils.isEmpty(exportVView.getImpurity())){
|
|
|
+ if (!StringUtils.isEmpty(exportVView.getImpurity())) {
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getImpurity()));
|
|
|
}
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
cell = rowx.createCell(16);
|
|
|
- if(!StringUtils.isEmpty(exportVView.getMildewGrain())){
|
|
|
+ if (!StringUtils.isEmpty(exportVView.getMildewGrain())) {
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getMildewGrain()));
|
|
|
}
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
cell = rowx.createCell(17);
|
|
|
- if(!StringUtils.isEmpty(exportVView.getImperfectGrain())){
|
|
|
+ if (!StringUtils.isEmpty(exportVView.getImperfectGrain())) {
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getImperfectGrain()));
|
|
|
}
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
cell = rowx.createCell(18);
|
|
|
- if(!StringUtils.isEmpty(exportVView.getBulkDensity())){
|
|
|
+ if (!StringUtils.isEmpty(exportVView.getBulkDensity())) {
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getBulkDensity()));
|
|
|
}
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
cell = rowx.createCell(19);
|
|
|
- if(!StringUtils.isEmpty(exportVView.getJiaorenli())){
|
|
|
+ if (!StringUtils.isEmpty(exportVView.getJiaorenli())) {
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getJiaorenli()));
|
|
|
}
|
|
|
cell.setCellStyle(contextstyle);
|
|
@@ -5026,7 +5210,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
log.debug(e.getMessage());
|
|
|
}
|
|
|
// 下载
|
|
|
- return downloadPhone(path, response, wb);
|
|
|
+ return downloadPhone(path, response, wb);
|
|
|
|
|
|
}
|
|
|
|