Commit 43caaa0e by 胡懿

修改盘盈入库代码

parent da3c02e5
...@@ -60,6 +60,7 @@ public class MaterialRequisitionService extends CrudService<MaterialRequisitionM ...@@ -60,6 +60,7 @@ public class MaterialRequisitionService extends CrudService<MaterialRequisitionM
List<MaterialRequisitionInfo> list = materialRequisitionInfoMapper.findList(new MaterialRequisitionInfo(materialRequisition)); List<MaterialRequisitionInfo> list = materialRequisitionInfoMapper.findList(new MaterialRequisitionInfo(materialRequisition));
for (MaterialRequisitionInfo mri : list) { for (MaterialRequisitionInfo mri : list) {
LedgerInfo li = mri.getLedgerInfo(); LedgerInfo li = mri.getLedgerInfo();
List<Shelves> shelvesList = ShelvesUtil.getShelvesListByIds(li.getShelvesIds()); List<Shelves> shelvesList = ShelvesUtil.getShelvesListByIds(li.getShelvesIds());
li.setShelvesList(shelvesList); li.setShelvesList(shelvesList);
List<Warehouse> warehouseList = ShelvesUtil.getWarehouseListByIds(li.getWarehouseIds()); List<Warehouse> warehouseList = ShelvesUtil.getWarehouseListByIds(li.getWarehouseIds());
......
...@@ -11,7 +11,8 @@ ...@@ -11,7 +11,8 @@
a.update_by AS "updateBy.id", a.update_by AS "updateBy.id",
a.update_date AS "updateDate", a.update_date AS "updateDate",
a.remarks AS "remarks", a.remarks AS "remarks",
ledgerInfo.name AS "ledgerInfo.name",
ledgerInfo.code AS "ledgerInfo.code", ledgerInfo.code AS "ledgerInfo.code",
ledgerInfo.type_id AS "ledgerInfo.type.id", ledgerInfo.type_id AS "ledgerInfo.type.id",
tpye.name AS "ledgerInfo.type.name", tpye.name AS "ledgerInfo.type.name",
......
...@@ -14,6 +14,7 @@ import com.jeeplus.modules.warehouse.storage.entity.Storage; ...@@ -14,6 +14,7 @@ import com.jeeplus.modules.warehouse.storage.entity.Storage;
import com.jeeplus.modules.warehouse.warehouse.entity.Warehouse; import com.jeeplus.modules.warehouse.warehouse.entity.Warehouse;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.List;
/** /**
* 盘盈入库单明细表Entity * 盘盈入库单明细表Entity
...@@ -35,6 +36,9 @@ public class ProfitWarehousingInfo extends DataEntity<ProfitWarehousingInfo> { ...@@ -35,6 +36,9 @@ public class ProfitWarehousingInfo extends DataEntity<ProfitWarehousingInfo> {
private String shelvesIds; // 货架ids private String shelvesIds; // 货架ids
private String warehouseIds; // 仓库ids private String warehouseIds; // 仓库ids
private List<Shelves> shelvesList;
private List<Warehouse> warehouseList;
public ProfitWarehousingInfo(String id, ProfitWarehousing profitWarehousing) { public ProfitWarehousingInfo(String id, ProfitWarehousing profitWarehousing) {
super(id); super(id);
this.profitWarehousing = profitWarehousing; this.profitWarehousing = profitWarehousing;
...@@ -134,4 +138,20 @@ public class ProfitWarehousingInfo extends DataEntity<ProfitWarehousingInfo> { ...@@ -134,4 +138,20 @@ public class ProfitWarehousingInfo extends DataEntity<ProfitWarehousingInfo> {
public void setWarehouseIds(String warehouseIds) { public void setWarehouseIds(String warehouseIds) {
this.warehouseIds = 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 @@ ...@@ -93,6 +93,7 @@
marking, marking,
shelves_ids, shelves_ids,
warehouse_ids, warehouse_ids,
num,
qr_id, qr_id,
amount, amount,
create_by, create_by,
...@@ -109,6 +110,7 @@ ...@@ -109,6 +110,7 @@
#{marking}, #{marking},
#{shelvesIds}, #{shelvesIds},
#{warehouseIds}, #{warehouseIds},
#{num},
#{qrCode.id}, #{qrCode.id},
#{amount}, #{amount},
#{createBy.id}, #{createBy.id},
...@@ -129,6 +131,7 @@ ...@@ -129,6 +131,7 @@
shelves_ids = #{shelvesIds}, shelves_ids = #{shelvesIds},
qr_id = #{qrCode.id}, qr_id = #{qrCode.id},
warehouse_ids = #{warehouseIds}, warehouse_ids = #{warehouseIds},
num = #{num},
amount = #{amount}, amount = #{amount},
update_by = #{updateBy.id}, update_by = #{updateBy.id},
update_date = #{updateDate}, update_date = #{updateDate},
......
...@@ -24,6 +24,9 @@ import com.jeeplus.modules.warehouse.qrcode.entity.QrCode; ...@@ -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.mapper.QrCodeMapper;
import com.jeeplus.modules.warehouse.qrcode.service.QrCodeService; import com.jeeplus.modules.warehouse.qrcode.service.QrCodeService;
import com.jeeplus.modules.warehouse.qrcode.util.BuildQcUtil; 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.entity.Wzcode;
import com.jeeplus.modules.warehouse.wzcode.service.WzcodeService; import com.jeeplus.modules.warehouse.wzcode.service.WzcodeService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -64,7 +67,15 @@ public class ProfitWarehousingService extends CrudService<ProfitWarehousingMappe ...@@ -64,7 +67,15 @@ public class ProfitWarehousingService extends CrudService<ProfitWarehousingMappe
public ProfitWarehousing get(String id) { public ProfitWarehousing get(String id) {
ProfitWarehousing profitWarehousing = super.get(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; return profitWarehousing;
} }
...@@ -104,11 +115,11 @@ public class ProfitWarehousingService extends CrudService<ProfitWarehousingMappe ...@@ -104,11 +115,11 @@ public class ProfitWarehousingService extends CrudService<ProfitWarehousingMappe
qrCode.setState("0"); qrCode.setState("0");
qrCode.preInsert(); qrCode.preInsert();
try { 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) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
qrCode.setUrl(Global.getAttachmentUrl() + "image/" + wzcode.getCodeAndNum() + "_0" + ".png"); qrCode.setUrl(Global.getAttachmentUrl() + "image/" + wzcode.getCodeAndNum() + ".png");
qrCodeMapper.insert(qrCode); qrCodeMapper.insert(qrCode);
qrCode = qrCodeMapper.get(qrCode.getId()); qrCode = qrCodeMapper.get(qrCode.getId());
profitWarehousingInfo.setQrCode(qrCode); 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