diff --git a/src/com/engine/jucailinkq/attendance/workflow/service/impl/EnterpriseCalendarServiceImpl.java b/src/com/engine/jucailinkq/attendance/workflow/service/impl/EnterpriseCalendarServiceImpl.java index 6707504..493f20d 100644 --- a/src/com/engine/jucailinkq/attendance/workflow/service/impl/EnterpriseCalendarServiceImpl.java +++ b/src/com/engine/jucailinkq/attendance/workflow/service/impl/EnterpriseCalendarServiceImpl.java @@ -68,7 +68,7 @@ public class EnterpriseCalendarServiceImpl extends Service implements Enterprise for (int day = 0; day < daysInMonth; day++) { dateInfo = new HashMap<>(); - dateInfo = createDateInfo(calendar); + dateInfo = createDateInfo(calendar, lunarFlag); dateInfo.put("formmodeid",formModeId); dateInfo.put("modeuuid", UUID.randomUUID().toString()); dateInfo.put("modedatacreater","1"); @@ -240,7 +240,7 @@ public class EnterpriseCalendarServiceImpl extends Service implements Enterprise return rows; } - private Map createDateInfo(Calendar calendar) { + private Map createDateInfo(Calendar calendar, String lunarFlag) { Map dateInfo = new HashMap<>(); // 获取阳历年-月-日 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); @@ -267,10 +267,16 @@ public class EnterpriseCalendarServiceImpl extends Service implements Enterprise //判断日期类型 String dayType = getDayType(weekIndex, specialDay); dateInfo.put("rq", solarDate); - dateInfo.put("nlrq", lunarDate); + if (lunarFlag.equals("1")) { + dateInfo.put("nlrq", lunarDate); + dateInfo.put("mc", specialDay.equals("") ? null : specialDay); + dateInfo.put("rqlx", dayType); + }else{ + dateInfo.put("nlrq", ""); + dateInfo.put("mc", ""); + dateInfo.put("rqlx", ""); + } dateInfo.put("xq", weekIndex); - dateInfo.put("mc", specialDay.equals("") ? null : specialDay); - dateInfo.put("rqlx", dayType); dateInfo.put("bz", ""); return dateInfo; }