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) {
|
||||
// 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");
|
||||
if ("A".equals(dataNewValue)) {
|
||||
if (!"A".equals(dataNewValue)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
int rowCount = model.getEntryRowCount("yem_es_materialinfo");
|
||||
BigDecimal amount = (BigDecimal) model.getValue("yem_amount");
|
||||
BigDecimal sumedamount = (BigDecimal) model.getValue("yem_sumedamount");
|
||||
@ -415,7 +420,7 @@ public class SalesOrderPJEdit extends AbstractBillPlugIn implements Plugin, Befo
|
||||
excludeLastRow = excludeLastRow.add(calc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -224,26 +224,26 @@ public class StorageTransEdit extends AbstractBillPlugIn implements BeforeF7Sele
|
||||
*/
|
||||
private void qty() {
|
||||
DynamicObjectCollection yemEsMaterialinfo = this.getModel().getEntryEntity("yem_es_materialinfo");
|
||||
if (!yemEsMaterialinfo.isEmpty()){
|
||||
Map<Long ,BigDecimal> map = new HashMap<>();
|
||||
if (!yemEsMaterialinfo.isEmpty()) {
|
||||
Map<Long, BigDecimal> map = new HashMap<>();
|
||||
for (DynamicObject loadSingle : yemEsMaterialinfo) {
|
||||
long aLong = loadSingle.getLong("yem_productmodel.id");
|
||||
BigDecimal yemQty = loadSingle.getBigDecimal("yem_qty");
|
||||
if (map.get(aLong).compareTo(BigDecimal.ZERO)==0){
|
||||
map.put(aLong,yemQty);
|
||||
}else {
|
||||
if (map.get(aLong) != null ) {
|
||||
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");
|
||||
if (yemEsSalesorderL!=null){
|
||||
if (yemEsSalesorderL != null) {
|
||||
for (DynamicObject loadSingle : yemEsSalesorderL) {
|
||||
DynamicObject yemGiftproactype = loadSingle.getDynamicObject("yem_giftproactype");
|
||||
if (yemGiftproactype!=null) {
|
||||
if (yemGiftproactype != null) {
|
||||
long aLong = yemGiftproactype.getLong("id");
|
||||
if (map.get(aLong).compareTo(BigDecimal.ZERO)!=0) {
|
||||
loadSingle.set("yem_tsagerqty",map.get(aLong) );
|
||||
if (map.get(aLong) != null ) {
|
||||
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"
|
||||
, new QFilter[]{new QFilter("name", QCP.equals, yemUnit)});
|
||||
// long aLong = bdMeasureunits.getLong("id");
|
||||
this.getModel().setValue("yem_declareunit", bdMeasureunits,rowIndex);
|
||||
}else {
|
||||
this.getModel().setValue("yem_declareunit",null,rowIndex);
|
||||
this.getModel().setValue("yem_declareunit", bdMeasureunits, rowIndex);
|
||||
} else {
|
||||
this.getModel().setValue("yem_declareunit", null, rowIndex);
|
||||
}
|
||||
}else {
|
||||
this.getModel().setValue("yem_declareunit",null,rowIndex);
|
||||
} else {
|
||||
this.getModel().setValue("yem_declareunit", null, rowIndex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -806,6 +806,7 @@ public class StorageTransEdit extends AbstractBillPlugIn implements BeforeF7Sele
|
||||
|
||||
/**
|
||||
* 订舱通知单和订舱通知单信保回填之间同步附件
|
||||
*
|
||||
* @param dataEntity
|
||||
* @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) {
|
||||
putAttachmentData((Map < String, Object > ) returnData, model, this.getView());
|
||||
putAttachmentData((Map<String, Object>) returnData, model, this.getView());
|
||||
// syncAccessoryPanel(dataEntity);
|
||||
}
|
||||
}
|
||||
@ -860,6 +861,7 @@ public class StorageTransEdit extends AbstractBillPlugIn implements BeforeF7Sele
|
||||
/**
|
||||
* 是否是最后一次发运(订舱)
|
||||
* 是否是最后一批发货
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static boolean isLastShip(DynamicObject dataEntity) {
|
||||
@ -920,21 +922,17 @@ public class StorageTransEdit extends AbstractBillPlugIn implements BeforeF7Sele
|
||||
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();
|
||||
view.invokeOperation("refresh");
|
||||
if(attachInfor != null)
|
||||
{
|
||||
List < Map < String, Object >> retData = (List < Map < String, Object >> ) attachInfor.get("attach");
|
||||
if (attachInfor != null) {
|
||||
List<Map<String, Object>> retData = (List<Map<String, Object>>) attachInfor.get("attach");
|
||||
Long userId = (Long) attachInfor.get("user");
|
||||
Date date = (Date) attachInfor.get("date");
|
||||
DynamicObject dataEntity = modal.getDataEntity(true);
|
||||
// ...
|
||||
if(retData != null && !retData.isEmpty())
|
||||
{
|
||||
for(Map < String, Object > map: retData)
|
||||
{
|
||||
if (retData != null && !retData.isEmpty()) {
|
||||
for (Map<String, Object> map : retData) {
|
||||
String url = (String) map.get("url");
|
||||
String name = (String) map.get("name");
|
||||
// 持久化附件到服务器
|
||||
@ -1125,6 +1123,7 @@ public class StorageTransEdit extends AbstractBillPlugIn implements BeforeF7Sele
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private QFilter filterCustomClass(int index) {
|
||||
IDataModel model = this.getModel();
|
||||
DynamicObject[] loads = getDeclarationElementsUseF7Select(model, index, "yem_customclass");
|
||||
@ -1188,6 +1187,7 @@ public class StorageTransEdit extends AbstractBillPlugIn implements BeforeF7Sele
|
||||
/**
|
||||
* 订舱通知单计算 出库报关金额值
|
||||
* 出库报关金额差值 = 出库金额 - 订舱通知单明细的销售金额(价格条款)
|
||||
*
|
||||
* @param dataEntity
|
||||
*/
|
||||
public static void calculateExportAmount(DynamicObject dataEntity) {
|
||||
|
Loading…
Reference in New Issue
Block a user