|
@@ -566,16 +566,16 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
|
|
|
//遇到多个副条码的情况,只加第一个
|
|
|
otherMaterialMap.putIfAbsent(me.getMaterialId(), me);
|
|
|
}
|
|
|
- String nameStr = "名称*,规格,型号,颜色,品牌,类别,基础重量(kg),基本单位*,副单位,基本条码*,副条码,比例,多属性," +
|
|
|
- "采购价,零售价,销售价,最低售价,状态*,序列号,批号,自定义1,自定义2,自定义3,备注,系统sku,生产日期,保质期,供应商,商品条码,批次号,仓库名称,仓位货架";
|
|
|
+ String nameStr = "名称*,规格,型号,颜色,品牌,类别,基础重量(kg),基本单位*,副单位,比例,多属性," +
|
|
|
+ "状态*,序列号,系统sku,商品条码,自定义1,自定义2,自定义3,备注";
|
|
|
List<String> nameList = StringUtil.strToStringList(nameStr);
|
|
|
//仓库列表
|
|
|
List<Depot> depotList = depotService.getAllList();
|
|
|
- if (nameList != null) {
|
|
|
- for(Depot depot: depotList) {
|
|
|
- nameList.add(depot.getName());
|
|
|
- }
|
|
|
- }
|
|
|
+// if (nameList != null) {
|
|
|
+// for(Depot depot: depotList) {
|
|
|
+// nameList.add(depot.getName());
|
|
|
+// }
|
|
|
+// }
|
|
|
//期初库存缓存
|
|
|
List<MaterialInitialStock> misList = materialInitialStockMapperEx.getListExceptZero();
|
|
|
Map<String, BigDecimal> misMap = new HashMap<>();
|
|
@@ -599,36 +599,23 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
|
|
|
objs[6] = m.getWeight() == null ? "" : m.getWeight().setScale(3, BigDecimal.ROUND_HALF_UP).toString();
|
|
|
objs[7] = m.getCommodityUnit();
|
|
|
objs[8] = otherMaterialMap.get(m.getId()) == null ? "" : otherMaterialMap.get(m.getId()).getCommodityUnit();
|
|
|
- objs[9] = m.getmBarCode();
|
|
|
- objs[10] = otherMaterialMap.get(m.getId()) == null ? "" : otherMaterialMap.get(m.getId()).getBarCode();
|
|
|
- objs[11] = m.getRatio() == null ? "" : m.getRatio().toString();
|
|
|
- objs[12] = m.getSku();
|
|
|
- objs[13] = m.getPurchaseDecimal() == null ? "" : m.getPurchaseDecimal().setScale(3, BigDecimal.ROUND_HALF_UP).toString();
|
|
|
- objs[14] = m.getCommodityDecimal() == null ? "" : m.getCommodityDecimal().setScale(3, BigDecimal.ROUND_HALF_UP).toString();
|
|
|
- objs[15] = m.getWholesaleDecimal() == null ? "" : m.getWholesaleDecimal().setScale(3, BigDecimal.ROUND_HALF_UP).toString();
|
|
|
- objs[16] = m.getLowDecimal() == null ? "" : m.getLowDecimal().setScale(3, BigDecimal.ROUND_HALF_UP).toString();
|
|
|
- objs[17] = m.getEnabled() ? "1" : "0";
|
|
|
- objs[18] = m.getEnableSerialNumber();
|
|
|
- objs[19] = m.getEnableBatchNumber();
|
|
|
- objs[20] = m.getOtherField1();
|
|
|
- objs[21] = m.getOtherField2();
|
|
|
- objs[22] = m.getOtherField3();
|
|
|
- objs[23] = m.getRemark();
|
|
|
- objs[24] = m.getSystemSku();
|
|
|
- objs[25] = m.getProductionDate() == null ? "" : m.getProductionDate().toString();
|
|
|
- objs[26] = m.getExpiryNum() == null ? "" : m.getExpiryNum().toString();
|
|
|
- objs[27] = m.getSupplierId() == null ? "" : m.getSupplierId().toString();
|
|
|
- objs[28] = m.getBarCode();
|
|
|
- objs[29] = m.getBatchNumber();
|
|
|
- objs[30] = m.getDepotId() == null ? "" : m.getDepotId().toString();
|
|
|
- objs[31] = m.getPosition();
|
|
|
+ objs[9] = m.getRatio() == null ? "" : m.getRatio().toString();
|
|
|
+ objs[10] = m.getSku();
|
|
|
+ objs[11] = m.getEnabled() ? "1" : "0";
|
|
|
+ objs[12] = m.getEnableSerialNumber();
|
|
|
+ objs[13] = m.getSystemSku();
|
|
|
+ objs[14] = m.getBarCode();
|
|
|
+ objs[15] = m.getOtherField1();
|
|
|
+ objs[16] = m.getOtherField2();
|
|
|
+ objs[17] = m.getOtherField3();
|
|
|
+ objs[18] = m.getRemark();
|
|
|
//仓库期初库存
|
|
|
- int i = 32;
|
|
|
- for(Depot depot: depotList) {
|
|
|
- BigDecimal number = misMap.get(m.getId() + "_" + depot.getId());
|
|
|
- objs[i] = number == null ? "0" : number.setScale(2, BigDecimal.ROUND_HALF_UP).toString();
|
|
|
- i++;
|
|
|
- }
|
|
|
+ int i = 19;
|
|
|
+// for(Depot depot: depotList) {
|
|
|
+// BigDecimal number = misMap.get(m.getId() + "_" + depot.getId());
|
|
|
+// objs[i] = number == null ? "0" : number.setScale(2, BigDecimal.ROUND_HALF_UP).toString();
|
|
|
+// i++;
|
|
|
+// }
|
|
|
objects.add(objs);
|
|
|
}
|
|
|
}
|
|
@@ -1940,7 +1927,6 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
|
|
|
|
|
|
@Override
|
|
|
public List<PDADepotItemVO> inventoryInquiry(PDAInventoryDTO pdaInventoryDTO) throws Exception {
|
|
|
-
|
|
|
pdaInventoryDTO.setMaterialIds(materialInitialStockMapper.selectMaterialIdByPosition(pdaInventoryDTO.getPosition()));
|
|
|
//查询类型id的子类型
|
|
|
pdaInventoryDTO.setCategoryIds(selectCategoryIds(pdaInventoryDTO.getCategoryId()));
|