Commit 43caaa0e by 胡懿

修改盘盈入库代码

parent da3c02e5
......@@ -60,6 +60,7 @@ public class MaterialRequisitionService extends CrudService<MaterialRequisitionM
List<MaterialRequisitionInfo> list = materialRequisitionInfoMapper.findList(new MaterialRequisitionInfo(materialRequisition));
for (MaterialRequisitionInfo mri : list) {
LedgerInfo li = mri.getLedgerInfo();
List<Shelves> shelvesList = ShelvesUtil.getShelvesListByIds(li.getShelvesIds());
li.setShelvesList(shelvesList);
List<Warehouse> warehouseList = ShelvesUtil.getWarehouseListByIds(li.getWarehouseIds());
......
......@@ -11,7 +11,8 @@
a.update_by AS "updateBy.id",
a.update_date AS "updateDate",
a.remarks AS "remarks",
ledgerInfo.name AS "ledgerInfo.name",
ledgerInfo.code AS "ledgerInfo.code",
ledgerInfo.type_id AS "ledgerInfo.type.id",
tpye.name AS "ledgerInfo.type.name",
......
......@@ -14,6 +14,7 @@ import com.jeeplus.modules.warehouse.storage.entity.Storage;
import com.jeeplus.modules.warehouse.warehouse.entity.Warehouse;
import java.math.BigDecimal;
import java.util.List;
/**
* 盘盈入库单明细表Entity
......@@ -35,6 +36,9 @@ public class ProfitWarehousingInfo extends DataEntity<ProfitWarehousingInfo> {
private String shelvesIds; // 货架ids
private String warehouseIds; // 仓库ids
private List<Shelves> shelvesList;
private List<Warehouse> warehouseList;
public ProfitWarehousingInfo(String id, ProfitWarehousing profitWarehousing) {
super(id);
this.profitWarehousing = profitWarehousing;
......@@ -134,4 +138,20 @@ public class ProfitWarehousingInfo extends DataEntity<ProfitWarehousingInfo> {
public void setWarehouseIds(String warehouseIds) {
this.warehouseIds = warehouseIds;
}
public List<Shelves> getShelvesList() {
return shelvesList;
}
public void setShelvesList(List<Shelves> shelvesList) {
this.shelvesList = shelvesList;
}
public List<Warehouse> getWarehouseList() {
return warehouseList;
}
public void setWarehouseList(List<Warehouse> warehouseList) {
this.warehouseList = warehouseList;
}
}
\ No newline at end of file
......@@ -93,6 +93,7 @@
marking,
shelves_ids,
warehouse_ids,
num,
qr_id,
amount,
create_by,
......@@ -109,6 +110,7 @@
#{marking},
#{shelvesIds},
#{warehouseIds},
#{num},
#{qrCode.id},
#{amount},
#{createBy.id},
......@@ -129,6 +131,7 @@
shelves_ids = #{shelvesIds},
qr_id = #{qrCode.id},
warehouse_ids = #{warehouseIds},
num = #{num},
amount = #{amount},
update_by = #{updateBy.id},
update_date = #{updateDate},
......
......@@ -24,6 +24,9 @@ import com.jeeplus.modules.warehouse.qrcode.entity.QrCode;
import com.jeeplus.modules.warehouse.qrcode.mapper.QrCodeMapper;
import com.jeeplus.modules.warehouse.qrcode.service.QrCodeService;
import com.jeeplus.modules.warehouse.qrcode.util.BuildQcUtil;
import com.jeeplus.modules.warehouse.shelves.entity.Shelves;
import com.jeeplus.modules.warehouse.shelves.utils.ShelvesUtil;
import com.jeeplus.modules.warehouse.warehouse.entity.Warehouse;
import com.jeeplus.modules.warehouse.wzcode.entity.Wzcode;
import com.jeeplus.modules.warehouse.wzcode.service.WzcodeService;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -64,7 +67,15 @@ public class ProfitWarehousingService extends CrudService<ProfitWarehousingMappe
public ProfitWarehousing get(String id) {
ProfitWarehousing profitWarehousing = super.get(id);
profitWarehousing.setProfitWarehousingInfoList(profitWarehousingInfoMapper.findList(new ProfitWarehousingInfo(profitWarehousing)));
List<ProfitWarehousingInfo> profitWarehousingInfoList = profitWarehousingInfoMapper.findList(new ProfitWarehousingInfo(profitWarehousing));
for (ProfitWarehousingInfo mri : profitWarehousingInfoList) {
List<Shelves> shelvesList = ShelvesUtil.getShelvesListByIds(mri.getShelvesIds());
mri.setShelvesList(shelvesList);
List<Warehouse> warehouseList = ShelvesUtil.getWarehouseListByIds(mri.getWarehouseIds());
mri.setWarehouseList(warehouseList);
}
profitWarehousing.setProfitWarehousingInfoList(profitWarehousingInfoList);
return profitWarehousing;
}
......@@ -104,11 +115,11 @@ public class ProfitWarehousingService extends CrudService<ProfitWarehousingMappe
qrCode.setState("0");
qrCode.preInsert();
try {
BuildQcUtil.buildQrOne(qrCode, qrImgPath + "/" + wzcode.getCodeAndNum() + ".png", qrImgPath + "/" + wzcode.getCodeAndNum() + "_0"+ ".png"); // 生成图片
BuildQcUtil.buildQrOne(qrCode, qrImgPath + "/" + wzcode.getCodeAndNum() + "_tem_" + ".png", qrImgPath + "/" + wzcode.getCodeAndNum() + ".png"); // 生成图片
} catch (IOException e) {
e.printStackTrace();
}
qrCode.setUrl(Global.getAttachmentUrl() + "image/" + wzcode.getCodeAndNum() + "_0" + ".png");
qrCode.setUrl(Global.getAttachmentUrl() + "image/" + wzcode.getCodeAndNum() + ".png");
qrCodeMapper.insert(qrCode);
qrCode = qrCodeMapper.get(qrCode.getId());
profitWarehousingInfo.setQrCode(qrCode);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment