|
@@ -59,6 +59,13 @@ public class PositionBillServiceHelper {
|
|
|
|
|
|
|
|
private static final Log log = LogFactory.getLog(PositionBillServiceHelper.class);
|
|
private static final Log log = LogFactory.getLog(PositionBillServiceHelper.class);
|
|
|
|
|
|
|
|
|
|
+ public static String getNoLineSuffixProp(String prop, String lineSuffix) {
|
|
|
|
|
+ if (prop.endsWith(lineSuffix)) {
|
|
|
|
|
+ return prop.lastIndexOf(lineSuffix) >= 0 ? prop.substring(0, prop.lastIndexOf(lineSuffix)) : prop;
|
|
|
|
|
+ }
|
|
|
|
|
+ return prop;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 获取分录序号
|
|
* 获取分录序号
|
|
|
* @param iDataModel
|
|
* @param iDataModel
|
|
@@ -160,7 +167,7 @@ public class PositionBillServiceHelper {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public static QFilter filterCurrentBillOrg(IFormView iFormView) {
|
|
public static QFilter filterCurrentBillOrg(IFormView iFormView) {
|
|
|
- List<Long> list = new ArrayList();// 378
|
|
|
|
|
|
|
+ List<Long> list = new ArrayList();
|
|
|
DynamicObjectCollection change = new DynamicObjectCollection();
|
|
DynamicObjectCollection change = new DynamicObjectCollection();
|
|
|
if (iFormView.getEntityId().equals(PositionBillConstant.NCKD_POSITIONBILL_ENTITY)) {
|
|
if (iFormView.getEntityId().equals(PositionBillConstant.NCKD_POSITIONBILL_ENTITY)) {
|
|
|
change = iFormView.getModel().getDataEntity(true).getDynamicObjectCollection(PositionBillConstant.NCKD_ENTRYENTITY_CHANGE_KEY);
|
|
change = iFormView.getModel().getDataEntity(true).getDynamicObjectCollection(PositionBillConstant.NCKD_ENTRYENTITY_CHANGE_KEY);
|
|
@@ -357,7 +364,7 @@ public class PositionBillServiceHelper {
|
|
|
if (bill == null) {
|
|
if (bill == null) {
|
|
|
return "";
|
|
return "";
|
|
|
} else {
|
|
} else {
|
|
|
- DynamicObjectCollection positionEntryDys = new DynamicObjectCollection();// 2238
|
|
|
|
|
|
|
+ DynamicObjectCollection positionEntryDys = new DynamicObjectCollection();
|
|
|
positionEntryDys.addAll(bill.getDynamicObjectCollection(PositionBillConstant.NCKD_ENTRYENTITY_ADD_KEY));
|
|
positionEntryDys.addAll(bill.getDynamicObjectCollection(PositionBillConstant.NCKD_ENTRYENTITY_ADD_KEY));
|
|
|
positionEntryDys.addAll(bill.getDynamicObjectCollection(PositionBillConstant.NCKD_ENTRYENTITY_CHANGE_KEY));
|
|
positionEntryDys.addAll(bill.getDynamicObjectCollection(PositionBillConstant.NCKD_ENTRYENTITY_CHANGE_KEY));
|
|
|
PositionBillSaveHelper helper = PositionBillSaveHelper.getInstance();
|
|
PositionBillSaveHelper helper = PositionBillSaveHelper.getInstance();
|
|
@@ -370,7 +377,7 @@ public class PositionBillServiceHelper {
|
|
|
if (PositionChangeTypeEnum.ADD.getNumber().equals(changeTypeNumber)) {
|
|
if (PositionChangeTypeEnum.ADD.getNumber().equals(changeTypeNumber)) {
|
|
|
positionBoId = helper.getPositionId(entryDy, suffix);
|
|
positionBoId = helper.getPositionId(entryDy, suffix);
|
|
|
} else {
|
|
} else {
|
|
|
- DynamicObject positionDyRef = entryDy.getDynamicObject(helper.spliceTwoStringByUnderLine(PositionBillConstant.NCKD_POSITION, suffix));
|
|
|
|
|
|
|
+ DynamicObject positionDyRef = entryDy.getDynamicObject(helper.spliceTwoStringByUnderLine(suffix, PositionBillConstant.NCKD_POSITION));
|
|
|
if (positionDyRef != null) {
|
|
if (positionDyRef != null) {
|
|
|
positionBoId = positionDyRef.getLong(PositionBillConstant.BOID_KEY);
|
|
positionBoId = positionDyRef.getLong(PositionBillConstant.BOID_KEY);
|
|
|
}
|
|
}
|
|
@@ -404,11 +411,11 @@ public class PositionBillServiceHelper {
|
|
|
for(DynamicObject positionEntryDy : positionNumberEntryDys) {
|
|
for(DynamicObject positionEntryDy : positionNumberEntryDys) {
|
|
|
String suffix = helper.getSuffixFromEntryEntityDyn(positionEntryDy);
|
|
String suffix = helper.getSuffixFromEntryEntityDyn(positionEntryDy);
|
|
|
long positionId = 0L;
|
|
long positionId = 0L;
|
|
|
- String positionNumber = positionEntryDy.getString(helper.spliceTwoStringByUnderLine(PositionBillConstant.NCKD_NUMBER_KEY, suffix));
|
|
|
|
|
|
|
+ String positionNumber = positionEntryDy.getString(helper.spliceTwoStringByUnderLine(suffix, PositionBillConstant.NCKD_NUMBER_KEY));
|
|
|
if (PositionBillConstant.NCKD_ENTRYENTITY_ADD_KEY.equals(positionEntryDy.getDynamicObjectType().getName())) {
|
|
if (PositionBillConstant.NCKD_ENTRYENTITY_ADD_KEY.equals(positionEntryDy.getDynamicObjectType().getName())) {
|
|
|
- positionId = positionEntryDy.getLong(helper.spliceTwoStringByUnderLine(PositionBillConstant.NCKD_POSITION, suffix));
|
|
|
|
|
|
|
+ positionId = positionEntryDy.getLong(helper.spliceTwoStringByUnderLine(suffix, PositionBillConstant.NCKD_POSITION));
|
|
|
} else {
|
|
} else {
|
|
|
- DynamicObject positionDy = positionEntryDy.getDynamicObject(helper.spliceTwoStringByUnderLine(PositionBillConstant.NCKD_POSITION, suffix));
|
|
|
|
|
|
|
+ DynamicObject positionDy = positionEntryDy.getDynamicObject(helper.spliceTwoStringByUnderLine(suffix, PositionBillConstant.NCKD_POSITION));
|
|
|
if (positionDy != null) {
|
|
if (positionDy != null) {
|
|
|
positionId = positionDy.getLong(PositionBillConstant.BOID_KEY);
|
|
positionId = positionDy.getLong(PositionBillConstant.BOID_KEY);
|
|
|
}
|
|
}
|