fix:
1.订舱通知单打开报错 2.外销合同填写数量报错
This commit is contained in:
parent
6f42d858a8
commit
5b7b0ed8fa
@ -387,8 +387,13 @@ public class SalesOrderPJEdit extends AbstractBillPlugIn implements Plugin, Befo
|
|||||||
|
|
||||||
private void calculateCostSharing(IDataModel model) {
|
private void calculateCostSharing(IDataModel model) {
|
||||||
// ClientUtils.totalSaFobAmount(model, "yem_es_materialinfo", "yem_ifgift", "yem_safobamount", "yem_amount");//销售fob金额 汇总表头 fob金额
|
// ClientUtils.totalSaFobAmount(model, "yem_es_materialinfo", "yem_ifgift", "yem_safobamount", "yem_amount");//销售fob金额 汇总表头 fob金额
|
||||||
|
String name = this.getModel().getDataEntityType().getName();
|
||||||
|
if ("yem_es_xsalesorder".equals(name)) {
|
||||||
String dataNewValue = (String) this.getModel().getValue("yem_sharethecost");
|
String dataNewValue = (String) this.getModel().getValue("yem_sharethecost");
|
||||||
if ("A".equals(dataNewValue)) {
|
if (!"A".equals(dataNewValue)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
int rowCount = model.getEntryRowCount("yem_es_materialinfo");
|
int rowCount = model.getEntryRowCount("yem_es_materialinfo");
|
||||||
BigDecimal amount = (BigDecimal) model.getValue("yem_amount");
|
BigDecimal amount = (BigDecimal) model.getValue("yem_amount");
|
||||||
BigDecimal sumedamount = (BigDecimal) model.getValue("yem_sumedamount");
|
BigDecimal sumedamount = (BigDecimal) model.getValue("yem_sumedamount");
|
||||||
@ -415,7 +420,7 @@ public class SalesOrderPJEdit extends AbstractBillPlugIn implements Plugin, Befo
|
|||||||
excludeLastRow = excludeLastRow.add(calc);
|
excludeLastRow = excludeLastRow.add(calc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -224,26 +224,26 @@ public class StorageTransEdit extends AbstractBillPlugIn implements BeforeF7Sele
|
|||||||
*/
|
*/
|
||||||
private void qty() {
|
private void qty() {
|
||||||
DynamicObjectCollection yemEsMaterialinfo = this.getModel().getEntryEntity("yem_es_materialinfo");
|
DynamicObjectCollection yemEsMaterialinfo = this.getModel().getEntryEntity("yem_es_materialinfo");
|
||||||
if (!yemEsMaterialinfo.isEmpty()){
|
if (!yemEsMaterialinfo.isEmpty()) {
|
||||||
Map<Long ,BigDecimal> map = new HashMap<>();
|
Map<Long, BigDecimal> map = new HashMap<>();
|
||||||
for (DynamicObject loadSingle : yemEsMaterialinfo) {
|
for (DynamicObject loadSingle : yemEsMaterialinfo) {
|
||||||
long aLong = loadSingle.getLong("yem_productmodel.id");
|
long aLong = loadSingle.getLong("yem_productmodel.id");
|
||||||
BigDecimal yemQty = loadSingle.getBigDecimal("yem_qty");
|
BigDecimal yemQty = loadSingle.getBigDecimal("yem_qty");
|
||||||
if (map.get(aLong).compareTo(BigDecimal.ZERO)==0){
|
if (map.get(aLong) != null ) {
|
||||||
map.put(aLong,yemQty);
|
|
||||||
}else {
|
|
||||||
BigDecimal bigDecimal = map.get(aLong);
|
BigDecimal bigDecimal = map.get(aLong);
|
||||||
map.put(aLong,bigDecimal.add(yemQty));
|
map.put(aLong, bigDecimal.add(yemQty));
|
||||||
|
} else {
|
||||||
|
map.put(aLong, yemQty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DynamicObjectCollection yemEsSalesorderL = this.getModel().getEntryEntity("yem_es_salesorder_l");
|
DynamicObjectCollection yemEsSalesorderL = this.getModel().getEntryEntity("yem_es_salesorder_l");
|
||||||
if (yemEsSalesorderL!=null){
|
if (yemEsSalesorderL != null) {
|
||||||
for (DynamicObject loadSingle : yemEsSalesorderL) {
|
for (DynamicObject loadSingle : yemEsSalesorderL) {
|
||||||
DynamicObject yemGiftproactype = loadSingle.getDynamicObject("yem_giftproactype");
|
DynamicObject yemGiftproactype = loadSingle.getDynamicObject("yem_giftproactype");
|
||||||
if (yemGiftproactype!=null) {
|
if (yemGiftproactype != null) {
|
||||||
long aLong = yemGiftproactype.getLong("id");
|
long aLong = yemGiftproactype.getLong("id");
|
||||||
if (map.get(aLong).compareTo(BigDecimal.ZERO)!=0) {
|
if (map.get(aLong) != null ) {
|
||||||
loadSingle.set("yem_tsagerqty",map.get(aLong) );
|
loadSingle.set("yem_tsagerqty", map.get(aLong));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -262,12 +262,12 @@ public class StorageTransEdit extends AbstractBillPlugIn implements BeforeF7Sele
|
|||||||
DynamicObject bdMeasureunits = BusinessDataServiceHelper.loadSingle("bd_measureunits", "id,number,name"
|
DynamicObject bdMeasureunits = BusinessDataServiceHelper.loadSingle("bd_measureunits", "id,number,name"
|
||||||
, new QFilter[]{new QFilter("name", QCP.equals, yemUnit)});
|
, new QFilter[]{new QFilter("name", QCP.equals, yemUnit)});
|
||||||
// long aLong = bdMeasureunits.getLong("id");
|
// long aLong = bdMeasureunits.getLong("id");
|
||||||
this.getModel().setValue("yem_declareunit", bdMeasureunits,rowIndex);
|
this.getModel().setValue("yem_declareunit", bdMeasureunits, rowIndex);
|
||||||
}else {
|
} else {
|
||||||
this.getModel().setValue("yem_declareunit",null,rowIndex);
|
this.getModel().setValue("yem_declareunit", null, rowIndex);
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
this.getModel().setValue("yem_declareunit",null,rowIndex);
|
this.getModel().setValue("yem_declareunit", null, rowIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -806,6 +806,7 @@ public class StorageTransEdit extends AbstractBillPlugIn implements BeforeF7Sele
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 订舱通知单和订舱通知单信保回填之间同步附件
|
* 订舱通知单和订舱通知单信保回填之间同步附件
|
||||||
|
*
|
||||||
* @param dataEntity
|
* @param dataEntity
|
||||||
* @see ContactBookSaveOp#uploadAttachmentPanel(DynamicObject, DynamicObject)
|
* @see ContactBookSaveOp#uploadAttachmentPanel(DynamicObject, DynamicObject)
|
||||||
*/
|
*/
|
||||||
@ -852,7 +853,7 @@ public class StorageTransEdit extends AbstractBillPlugIn implements BeforeF7Sele
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ("yem_es_storagetrans_sfile".equals(actionId) && returnData != null) {
|
if ("yem_es_storagetrans_sfile".equals(actionId) && returnData != null) {
|
||||||
putAttachmentData((Map < String, Object > ) returnData, model, this.getView());
|
putAttachmentData((Map<String, Object>) returnData, model, this.getView());
|
||||||
// syncAccessoryPanel(dataEntity);
|
// syncAccessoryPanel(dataEntity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -860,6 +861,7 @@ public class StorageTransEdit extends AbstractBillPlugIn implements BeforeF7Sele
|
|||||||
/**
|
/**
|
||||||
* 是否是最后一次发运(订舱)
|
* 是否是最后一次发运(订舱)
|
||||||
* 是否是最后一批发货
|
* 是否是最后一批发货
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static boolean isLastShip(DynamicObject dataEntity) {
|
public static boolean isLastShip(DynamicObject dataEntity) {
|
||||||
@ -920,21 +922,17 @@ public class StorageTransEdit extends AbstractBillPlugIn implements BeforeF7Sele
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void putAttachmentData(Map < String, Object > attachInfor, IDataModel modal, IFormView view)
|
public void putAttachmentData(Map<String, Object> attachInfor, IDataModel modal, IFormView view) {
|
||||||
{
|
|
||||||
String entityId = view.getEntityId();
|
String entityId = view.getEntityId();
|
||||||
view.invokeOperation("refresh");
|
view.invokeOperation("refresh");
|
||||||
if(attachInfor != null)
|
if (attachInfor != null) {
|
||||||
{
|
List<Map<String, Object>> retData = (List<Map<String, Object>>) attachInfor.get("attach");
|
||||||
List < Map < String, Object >> retData = (List < Map < String, Object >> ) attachInfor.get("attach");
|
|
||||||
Long userId = (Long) attachInfor.get("user");
|
Long userId = (Long) attachInfor.get("user");
|
||||||
Date date = (Date) attachInfor.get("date");
|
Date date = (Date) attachInfor.get("date");
|
||||||
DynamicObject dataEntity = modal.getDataEntity(true);
|
DynamicObject dataEntity = modal.getDataEntity(true);
|
||||||
// ...
|
// ...
|
||||||
if(retData != null && !retData.isEmpty())
|
if (retData != null && !retData.isEmpty()) {
|
||||||
{
|
for (Map<String, Object> map : retData) {
|
||||||
for(Map < String, Object > map: retData)
|
|
||||||
{
|
|
||||||
String url = (String) map.get("url");
|
String url = (String) map.get("url");
|
||||||
String name = (String) map.get("name");
|
String name = (String) map.get("name");
|
||||||
// 持久化附件到服务器
|
// 持久化附件到服务器
|
||||||
@ -1125,6 +1123,7 @@ public class StorageTransEdit extends AbstractBillPlugIn implements BeforeF7Sele
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private QFilter filterCustomClass(int index) {
|
private QFilter filterCustomClass(int index) {
|
||||||
IDataModel model = this.getModel();
|
IDataModel model = this.getModel();
|
||||||
DynamicObject[] loads = getDeclarationElementsUseF7Select(model, index, "yem_customclass");
|
DynamicObject[] loads = getDeclarationElementsUseF7Select(model, index, "yem_customclass");
|
||||||
@ -1188,6 +1187,7 @@ public class StorageTransEdit extends AbstractBillPlugIn implements BeforeF7Sele
|
|||||||
/**
|
/**
|
||||||
* 订舱通知单计算 出库报关金额值
|
* 订舱通知单计算 出库报关金额值
|
||||||
* 出库报关金额差值 = 出库金额 - 订舱通知单明细的销售金额(价格条款)
|
* 出库报关金额差值 = 出库金额 - 订舱通知单明细的销售金额(价格条款)
|
||||||
|
*
|
||||||
* @param dataEntity
|
* @param dataEntity
|
||||||
*/
|
*/
|
||||||
public static void calculateExportAmount(DynamicObject dataEntity) {
|
public static void calculateExportAmount(DynamicObject dataEntity) {
|
||||||
|
Loading…
Reference in New Issue
Block a user