Commit 7f25b1ba authored by 鲁鸿波's avatar 鲁鸿波

值班导入日期格式问题

parent b9d3c53a
......@@ -1260,7 +1260,18 @@ public class DutyServiceImpl extends ServiceImpl<DutyDao, TSysDuty> implements D
@SneakyThrows
public Person saveDuty(Map<Integer, Object> item, TSysDuty duty, SysOrg sysOrg, UserInfo loginUser, String monthId) {
TSysDuty tSysDuty = BeanHelper.beanToBean(duty, TSysDuty.class);
String dateStr = item.get(2) + "-" + item.get(3) + "-" + item.get(4);
String month = item.get(3)+"";
String day = item.get(4)+"";
if (month.length() == 1) {
month = "0" + month;
}
// Add leading zero to day if it's a single digit
if (day.length() == 1) {
day = "0" + day;
}
String dateStr = item.get(2) + "-" + month + "-" + day;
//String dateStr = item.get(2) + "-" + item.get(3) + "-" + item.get(4);
tSysDuty.setDutyDate(dateStr);
tSysDuty.setClasses(item.get(6).toString());
String id = IdHelper.getId32bit();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment