日期判空
This commit is contained in:
parent
5b4dc55bc3
commit
21da25396f
|
|
@ -70,7 +70,7 @@ public class PurInIotManagePlugin extends AbstractOperationServicePlugIn impleme
|
|||
QFilter f2 = new QFilter("tqq9_lot", QCP.equals, lotnumber);
|
||||
QFilter f3 = new QFilter("tqq9_crreatdate", QCP.equals, producedate);
|
||||
QFilter f4 = new QFilter("tqq9_invaliddate", QCP.equals, expirydate);
|
||||
DynamicObject tqq9_goodlotmanage1 = BusinessDataServiceHelper.loadSingle("tqq9_goodlotmanage", new QFilter[]{f1,f2,f3,f4});
|
||||
DynamicObject tqq9_goodlotmanage1 = BusinessDataServiceHelper.loadSingle("tqq9_goodlotmanage", new QFilter[]{f1, f2, f3, f4});
|
||||
if (tqq9_goodlotmanage1 == null) {
|
||||
falg = true;
|
||||
tqq9_goodlotmanages.add(tqq9_goodlotmanage);
|
||||
|
|
@ -78,13 +78,13 @@ public class PurInIotManagePlugin extends AbstractOperationServicePlugIn impleme
|
|||
|
||||
String warehouseNumber = null;
|
||||
DynamicObject warehouse = entry.getDynamicObject("warehouse");
|
||||
if(warehouse != null){
|
||||
if (warehouse != null) {
|
||||
warehouseNumber = warehouse.getString("number");
|
||||
}
|
||||
|
||||
// 将入库物料的批次信息写到商品明细中
|
||||
DynamicObject tqq9_goods = entry.getDynamicObject("tqq9_goods");
|
||||
if(tqq9_goods != null){
|
||||
if (tqq9_goods != null) {
|
||||
tqq9_goods = BusinessDataServiceHelper.loadSingle(tqq9_goods.getPkValue(), tqq9_goods.getDynamicObjectType().getName());
|
||||
|
||||
// 物料已经被封装成了商品
|
||||
|
|
@ -93,20 +93,20 @@ public class PurInIotManagePlugin extends AbstractOperationServicePlugIn impleme
|
|||
for (DynamicObject entry1 : entryies) {
|
||||
String lotNumber = null;
|
||||
DynamicObject tqq9_lot = entry1.getDynamicObject("tqq9_lot");
|
||||
if(tqq9_lot != null){
|
||||
if (tqq9_lot != null) {
|
||||
lotNumber = tqq9_lot.getString("number");
|
||||
}
|
||||
String whNumber = "";
|
||||
DynamicObject wh = entry1.getDynamicObject("tqq9_basedatafield");
|
||||
if(wh != null){
|
||||
if (wh != null) {
|
||||
whNumber = wh.getString("number");
|
||||
}
|
||||
Date tqq9_productdate = entry1.getDate("tqq9_productdate");
|
||||
Date tqq9_todate = entry1.getDate("tqq9_todate");
|
||||
if(((StringUtils.isBlank(lotNumber) && StringUtils.isBlank(lotnumber)) || (lotNumber!=null&&lotNumber.equals(lotnumber)))
|
||||
if (((StringUtils.isBlank(lotNumber) && StringUtils.isBlank(lotnumber)) || (lotNumber != null && lotNumber.equals(lotnumber)))
|
||||
&& ((StringUtils.isBlank(whNumber) && StringUtils.isBlank(warehouseNumber)) || whNumber.equals(warehouseNumber))
|
||||
&& ((tqq9_productdate == null && producedate == null) || (tqq9_productdate.equals(producedate)))
|
||||
&& ((tqq9_todate == null && expirydate == null) || (tqq9_todate.equals(expirydate)))){
|
||||
&& ((tqq9_productdate == null && producedate == null) || (null != tqq9_productdate && tqq9_productdate.equals(producedate)))
|
||||
&& ((tqq9_todate == null && expirydate == null) || (null != tqq9_todate && tqq9_todate.equals(expirydate)))) {
|
||||
// 如果现有的商品数据存在
|
||||
BigDecimal tqq9_availablestock = entry1.getBigDecimal("tqq9_availablestock");
|
||||
entry1.set("tqq9_availablestock", tqq9_availablestock.add(entry.getBigDecimal("qty")));
|
||||
|
|
@ -114,11 +114,11 @@ public class PurInIotManagePlugin extends AbstractOperationServicePlugIn impleme
|
|||
entry1.set("tqq9_upstock", tqq9_upstock.add(entry.getBigDecimal("qty")));
|
||||
isExistEntry = true;
|
||||
}
|
||||
if(isExistEntry){
|
||||
if (isExistEntry) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!isExistEntry){
|
||||
if (!isExistEntry) {
|
||||
DynamicObject entry1 = entryies.addNew();
|
||||
entry1.set("tqq9_lot", entry.getDynamicObject("lot"));//批号
|
||||
entry1.set("tqq9_basedatafield", warehouse);//仓库
|
||||
|
|
|
|||
Loading…
Reference in New Issue