|
@@ -35,6 +35,12 @@ import com.kingdee.eas.framework.CoreBaseInfo;
|
|
|
import com.kingdee.eas.hr.base.HRBillStateEnum;
|
|
|
import com.kingdee.eas.util.app.DbUtil;
|
|
|
|
|
|
+
|
|
|
+/**
|
|
|
+ * 自动提交日提报单
|
|
|
+ * @author coyle
|
|
|
+ * 2025-05-25
|
|
|
+ */
|
|
|
public class AutoSubDayDetailFacadeControllerBean extends AbstractAutoSubDayDetailFacadeControllerBean
|
|
|
{
|
|
|
private static Logger logger =
|
|
@@ -54,15 +60,16 @@ public class AutoSubDayDetailFacadeControllerBean extends AbstractAutoSubDayDeta
|
|
|
// 获取当前日期
|
|
|
LocalDate currentDate = LocalDate.now();
|
|
|
// 根据preCalcDays计算起始日期和结束日期
|
|
|
- LocalDate startDate = currentDate.minusDays(Math.abs(preCalcDays));
|
|
|
- LocalDate endDate = currentDate.plusDays(preCalcDays >= 0 ? preCalcDays : 0);
|
|
|
+
|
|
|
+ LocalDate startDate = currentDate.minusDays( Math.abs(preCalcDays));
|
|
|
+ LocalDate endDate = currentDate;
|
|
|
|
|
|
// 如果preCalcDays是正数,调整startDate和endDate的顺序
|
|
|
- if (preCalcDays < 0) {
|
|
|
- LocalDate temp = startDate;
|
|
|
- startDate = endDate;
|
|
|
- endDate = temp;
|
|
|
- }
|
|
|
+// if (preCalcDays > 0) {
|
|
|
+// LocalDate temp = startDate;
|
|
|
+// startDate = endDate;
|
|
|
+// endDate = temp;
|
|
|
+// }
|
|
|
|
|
|
// 在日期范围内每天执行一次executeSubmit方法
|
|
|
while (!startDate.isAfter(endDate)) {
|
|
@@ -129,10 +136,16 @@ public class AutoSubDayDetailFacadeControllerBean extends AbstractAutoSubDayDeta
|
|
|
|
|
|
protected void reAssembleModel(Context ctx, BatchSubmitShemeBillInfo model) throws SHRWebException {
|
|
|
String oql = "select *, entry.*,submitScheme.id,entry.submitElement.name,entry.person.name,entry.person.number where id = '%s'";
|
|
|
- BatchSubmitShemeBillInfo info = CmpIntegrateWebHelper.getBatchSubmitShemeBillInfo(ctx,
|
|
|
- String.format(oql, model.getId().toString()));
|
|
|
- model.clear();
|
|
|
- model.putAll(info);
|
|
|
+ try {
|
|
|
+ BatchSubmitShemeBillInfo info = BatchSubmitShemeBillFactory.getLocalInstance(ctx).getBatchSubmitShemeBillInfo(String.format(oql, model.getId().toString()));
|
|
|
+ model.clear();
|
|
|
+ model.putAll(info);
|
|
|
+ } catch (EASBizException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ } catch (BOSException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|