|
@@ -160,6 +160,8 @@ public class PushAdjustOpPlugin extends AbstractOperationServicePlugIn implement
|
|
|
applyBillEntry.put("amount", entity.getBigDecimal(FormConstant.NCKD_MONEY));
|
|
applyBillEntry.put("amount", entity.getBigDecimal(FormConstant.NCKD_MONEY));
|
|
|
applyBillEntry.put("position", position.getLong(FormConstant.ID_KEY));
|
|
applyBillEntry.put("position", position.getLong(FormConstant.ID_KEY));
|
|
|
applyBillEntry.put("reason", entity.getString(ExcellsConstant.NCKD_DESC));
|
|
applyBillEntry.put("reason", entity.getString(ExcellsConstant.NCKD_DESC));
|
|
|
|
|
+ applyBillEntry.put("startdate", entity.getDate(ExcellsConstant.NCKD_EFFDT));
|
|
|
|
|
+ applyBillEntry.put("enddate", entity.getDate(ExcellsConstant.NCKD_LEFFDT) == null ? DateUtil.getMaxDateAsDate() : entity.getDate(ExcellsConstant.NCKD_LEFFDT));
|
|
|
applyBillEntryData.add(applyBillEntry);
|
|
applyBillEntryData.add(applyBillEntry);
|
|
|
applyBill.put("applybillent", applyBillEntryData);
|
|
applyBill.put("applybillent", applyBillEntryData);
|
|
|
applyBillMap.put(id+"-"+orgId, applyBill);
|
|
applyBillMap.put(id+"-"+orgId, applyBill);
|
|
@@ -175,6 +177,7 @@ public class PushAdjustOpPlugin extends AbstractOperationServicePlugIn implement
|
|
|
}
|
|
}
|
|
|
papams.put("data", applybillList);
|
|
papams.put("data", applybillList);
|
|
|
papams.put("isUseMatchAmount", Boolean.TRUE);
|
|
papams.put("isUseMatchAmount", Boolean.TRUE);
|
|
|
|
|
+ List<DynamicObject> saveDynamicObjects = new ArrayList<>();
|
|
|
TXHandle tx = TX.requiresNew();
|
|
TXHandle tx = TX.requiresNew();
|
|
|
try {
|
|
try {
|
|
|
Map<String, Object> result = HCDMApplyBillServiceHelper.saveDraftApplyBill(papams);
|
|
Map<String, Object> result = HCDMApplyBillServiceHelper.saveDraftApplyBill(papams);
|
|
@@ -191,12 +194,10 @@ public class PushAdjustOpPlugin extends AbstractOperationServicePlugIn implement
|
|
|
for (Map<String, Object> dataMap : list) {
|
|
for (Map<String, Object> dataMap : list) {
|
|
|
Long uniqueCode = ConvertUtil.toLong(dataMap.get("_uniquecode"));
|
|
Long uniqueCode = ConvertUtil.toLong(dataMap.get("_uniquecode"));
|
|
|
if (id == uniqueCode) {
|
|
if (id == uniqueCode) {
|
|
|
- Object adjInfoId = dataMap.get("id");
|
|
|
|
|
- if (adjInfoId != null) {
|
|
|
|
|
- dynamicObject.set(PositionStructureConstant.NCKD_ISSALADJPUSH, Boolean.TRUE);
|
|
|
|
|
- dynamicObject.set(PositionStructureConstant.NCKD_SALADJPUSHTIME, new Date());
|
|
|
|
|
- dynamicObject.set(PositionStructureConstant.NCKD_SALADJID, adjInfoId);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ dynamicObject.set(PositionStructureConstant.NCKD_ISSALADJPUSH, Boolean.TRUE);
|
|
|
|
|
+ dynamicObject.set(PositionStructureConstant.NCKD_SALADJPUSHTIME, new Date());
|
|
|
|
|
+// dynamicObject.set(PositionStructureConstant.NCKD_SALADJID, adjInfoId);
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
logger.info("成功推送的定调薪申请单,申请单ID: {}", uniqueCode);
|
|
logger.info("成功推送的定调薪申请单,申请单ID: {}", uniqueCode);
|
|
|
saveDynamicObjects.add(dynamicObject);
|
|
saveDynamicObjects.add(dynamicObject);
|
|
@@ -211,16 +212,9 @@ public class PushAdjustOpPlugin extends AbstractOperationServicePlugIn implement
|
|
|
tx.close();
|
|
tx.close();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- List<DynamicObject> saveDynamicObjects = new ArrayList<>();
|
|
|
|
|
-
|
|
|
|
|
- @Override
|
|
|
|
|
- public void afterExecuteOperationTransaction(AfterOperationArgs e) {
|
|
|
|
|
- if(this.getOperationResult() != null && this.getOperationResult().isSuccess()) {
|
|
|
|
|
if (!saveDynamicObjects.isEmpty()) {
|
|
if (!saveDynamicObjects.isEmpty()) {
|
|
|
- OperationResult operationResult = SaveServiceHelper.saveOperate(ExcellsConstant.EXCELLENTSSALLOWANCE_ENTITYID, saveDynamicObjects.toArray(new DynamicObject[0]), OperateOption.create());
|
|
|
|
|
|
|
+ SaveServiceHelper.update(saveDynamicObjects.toArray(new DynamicObject[0]));
|
|
|
|
|
+ /*OperationResult operationResult = SaveServiceHelper.saveOperate(ExcellsConstant.EXCELLENTSSALLOWANCE_ENTITYID, saveDynamicObjects.toArray(new DynamicObject[0]), OperateOption.create());
|
|
|
if (!operationResult.isSuccess()) {
|
|
if (!operationResult.isSuccess()) {
|
|
|
StringJoiner errorMsg = new StringJoiner("\n");
|
|
StringJoiner errorMsg = new StringJoiner("\n");
|
|
|
for (IOperateInfo error : operationResult.getAllErrorOrValidateInfo()) {
|
|
for (IOperateInfo error : operationResult.getAllErrorOrValidateInfo()) {
|
|
@@ -233,8 +227,11 @@ public class PushAdjustOpPlugin extends AbstractOperationServicePlugIn implement
|
|
|
throw new ValidationException("保存职位津贴失败,原因:" + errorMsg.toString());
|
|
throw new ValidationException("保存职位津贴失败,原因:" + errorMsg.toString());
|
|
|
} else {
|
|
} else {
|
|
|
logger.info("成功保存 {} 条职位津贴记录", saveDynamicObjects.size());
|
|
logger.info("成功保存 {} 条职位津贴记录", saveDynamicObjects.size());
|
|
|
- }
|
|
|
|
|
|
|
+ }*/
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
}
|
|
}
|