优化入库单
This commit is contained in:
parent
b2f0702195
commit
70c70c4201
|
@ -1300,7 +1300,8 @@ public class MaterialInBillEditPluginExt extends AbstractEcmaBillPlugin implemen
|
||||||
|
|
||||||
warehouse = (DynamicObject) this.getModel().getValue("warehouse");
|
warehouse = (DynamicObject) this.getModel().getValue("warehouse");
|
||||||
project = propValue.getDynamicObject("project");
|
project = propValue.getDynamicObject("project");
|
||||||
if (project != null) {
|
Object project1 = this.getModel().getValue("project");
|
||||||
|
if (project != null && project1 == null) {
|
||||||
this.getModel().setValue("project", project.getPkValue());
|
this.getModel().setValue("project", project.getPkValue());
|
||||||
} else if (warehouse != null) {
|
} else if (warehouse != null) {
|
||||||
DynamicObject wareProject = warehouse.getDynamicObject("project");
|
DynamicObject wareProject = warehouse.getDynamicObject("project");
|
||||||
|
|
|
@ -418,13 +418,13 @@ public class MaterialInventoryUtilsExt {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static DynamicObject getMatInvInfo(String orgId, String projectId, String warehouseId, String matId, String modelnum, String lot, String unitId) {
|
private static DynamicObject getMatInvInfo(String orgId, String projectId, String warehouseId, String matId, String modelnum, String lot, String unitId) {
|
||||||
QFilter filter = new QFilter("org", "=", StringUtils.isBlank(orgId) ? 0L : Long.parseLong(orgId));
|
QFilter filter = new QFilter("org", "=", StringUtils.isBlank(orgId) ? 0L : Long.parseLong(orgId));//所属组织
|
||||||
filter.and(new QFilter("project", "=", StringUtils.isBlank(projectId) ? 0L : Long.parseLong(projectId)));
|
filter.and(new QFilter("project", "=", StringUtils.isBlank(projectId) ? 0L : Long.parseLong(projectId)));//项目
|
||||||
filter.and(new QFilter("warehouse", "=", StringUtils.isBlank(warehouseId) ? 0L : Long.parseLong(warehouseId)));
|
filter.and(new QFilter("warehouse", "=", StringUtils.isBlank(warehouseId) ? 0L : Long.parseLong(warehouseId)));//仓库
|
||||||
filter.and(new QFilter("material", "=", StringUtils.isBlank(matId) ? 0L : Long.parseLong(matId)));
|
filter.and(new QFilter("material", "=", StringUtils.isBlank(matId) ? 0L : Long.parseLong(matId)));//资源
|
||||||
filter.and(new QFilter("modelnum", "=", modelnum == "" ? " " : modelnum));
|
filter.and(new QFilter("modelnum", "=", modelnum == "" ? " " : modelnum));//规格型号
|
||||||
filter.and(new QFilter("lot", "=", lot));
|
filter.and(new QFilter("lot", "=", lot));//批次
|
||||||
filter.and(new QFilter("measureunit", "=", StringUtils.isBlank(unitId) ? 0L : Long.parseLong(unitId)));
|
filter.and(new QFilter("measureunit", "=", StringUtils.isBlank(unitId) ? 0L : Long.parseLong(unitId)));//计量单位
|
||||||
DynamicObject matInvInfo = BusinessDataServiceHelper.loadSingle("ecma_matinventory", "id,measureunit,lot,currency,price,qty,amount,lockedqty,tempqty,modelnum,saleprice,measureuint,project,org,material,warehouse", new QFilter[]{filter});
|
DynamicObject matInvInfo = BusinessDataServiceHelper.loadSingle("ecma_matinventory", "id,measureunit,lot,currency,price,qty,amount,lockedqty,tempqty,modelnum,saleprice,measureuint,project,org,material,warehouse", new QFilter[]{filter});
|
||||||
return matInvInfo;
|
return matInvInfo;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue