|
|
@@ -86,7 +86,7 @@ public class PersonReimQuotaHelper {
|
|
|
}
|
|
|
personAmountBill.set("totalamount", totalAmount);
|
|
|
personAmountBill.set("auditstatus", "0");
|
|
|
- personAmountBill.set("nckd_sourcetype",quotaVO.getSourcetype().getValue());
|
|
|
+ personAmountBill.set("nckd_sourcetype",quotaVO.getSourcetype().getKey());
|
|
|
personAmountBill.set("nckd_sourcebillid",quotaVO.getSourcebillid());
|
|
|
personAmountBill.set("nckd_limitrelaset",quotaVO.getLimitRelasetId());
|
|
|
|
|
|
@@ -187,18 +187,18 @@ public class PersonReimQuotaHelper {
|
|
|
protected boolean copyModifyPersonReim(DynamicObject personAmountBill, Long copyPersonAmountBillId,BigDecimal amount, int startMonth) {
|
|
|
DynamicObject oriPersonAmount = BusinessDataServiceHelper.loadSingle(copyPersonAmountBillId, BillTypeConstants.ER_REIMBURSEAMOUNT);
|
|
|
|
|
|
+// 不同职级、相同额度时,如果没有新创建的,会作废掉现有的数据。因此调整逻辑,都需要创建
|
|
|
// 如果月份之后的额度与需要更新的额度相同,则不保存
|
|
|
- Boolean isNeedUpdate = false;
|
|
|
- for(int i = startMonth; i <= 12; i++) {
|
|
|
- if( amount != null && amount.compareTo(oriPersonAmount.getBigDecimal("month" + i)) != 0){
|
|
|
- isNeedUpdate = true;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if(!isNeedUpdate){
|
|
|
- return false;
|
|
|
- }
|
|
|
+// Boolean isNeedUpdate = false;
|
|
|
+// for(int i = startMonth; i <= 12; i++) {
|
|
|
+// if( amount != null && amount.compareTo(oriPersonAmount.getBigDecimal("month" + i)) != 0){
|
|
|
+// isNeedUpdate = true;
|
|
|
+// break;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// if(!isNeedUpdate){
|
|
|
+// return false;
|
|
|
+// }
|
|
|
|
|
|
Set<String> ignoreSet = new HashSet<>(Arrays.asList("id","creator","createtime","modifier","modifytime","auditor","auditdate","nckd_sourcetype","nckd_sourcebillid","nckd_limitrelaset"));
|
|
|
DynamicObjectUtils.copy(oriPersonAmount,personAmountBill,ignoreSet);
|