Commit 41fb3659 by huangjinxin

feat:工作队新增,修改,添加工作起止时间字段和逻辑

1 parent 8397be7b
...@@ -26,6 +26,10 @@ public class BusinessTeamAddDTO { ...@@ -26,6 +26,10 @@ public class BusinessTeamAddDTO {
* 开放工作日 * 开放工作日
*/ */
private List<String> workdays; private List<String> workdays;
private String workOn;
private String workOff;
} }
......
...@@ -33,5 +33,9 @@ public class BusinessTeamUpdateDTO { ...@@ -33,5 +33,9 @@ public class BusinessTeamUpdateDTO {
* 开放工作日 * 开放工作日
*/ */
private List<String> workdays; private List<String> workdays;
private String workOn;
private String workOff;
} }
} }
...@@ -49,9 +49,15 @@ public class OrgTeamEntity { ...@@ -49,9 +49,15 @@ public class OrgTeamEntity {
@Column(name = "update_time", nullable = false, columnDefinition = "timestamp default current_timestamp on update current_timestamp") @Column(name = "update_time", nullable = false, columnDefinition = "timestamp default current_timestamp on update current_timestamp")
private LocalDateTime updateTime; private LocalDateTime updateTime;
/**
* 工作起始时间
*/
@Column(name = "work_on", nullable = false, columnDefinition = "varchar(5) default '08:00'") @Column(name = "work_on", nullable = false, columnDefinition = "varchar(5) default '08:00'")
private String workOn = "08:00"; private String workOn = "08:00";
/**
* 工作截止时间
*/
@Column(name = "work_off", nullable = false, columnDefinition = "varchar(5) default '18:00'") @Column(name = "work_off", nullable = false, columnDefinition = "varchar(5) default '18:00'")
private String workOff = "18:00"; private String workOff = "18:00";
......
...@@ -131,6 +131,8 @@ public class BusinessTeamServiceImpl implements BusinessTeamService { ...@@ -131,6 +131,8 @@ public class BusinessTeamServiceImpl implements BusinessTeamService {
.setTeamName(req.getTeamName()) .setTeamName(req.getTeamName())
.setTeamType(TEAMTYPE_PEA) .setTeamType(TEAMTYPE_PEA)
.setWarehouseId(req.getWarehouseId()) .setWarehouseId(req.getWarehouseId())
.setWorkOn(req.getWorkOn())
.setWorkOff(req.getWorkOff())
.setCreateTime(LocalDateTime.now()) .setCreateTime(LocalDateTime.now())
.setUpdateTime(LocalDateTime.now()); .setUpdateTime(LocalDateTime.now());
if (req.getWorkdays() != null) { if (req.getWorkdays() != null) {
...@@ -177,6 +179,12 @@ public class BusinessTeamServiceImpl implements BusinessTeamService { ...@@ -177,6 +179,12 @@ public class BusinessTeamServiceImpl implements BusinessTeamService {
if (StringUtils.isNotBlank(req.getGroupId())) { if (StringUtils.isNotBlank(req.getGroupId())) {
entity.setGroupId(req.getGroupId()); entity.setGroupId(req.getGroupId());
} }
if (StringUtils.isNotBlank(req.getWorkOn())) {
entity.setWorkOn(req.getWorkOn());
}
if (StringUtils.isNotBlank(req.getWorkOff())) {
entity.setWorkOff(req.getWorkOff());
}
entity.setUpdateTime(LocalDateTime.now()); entity.setUpdateTime(LocalDateTime.now());
orgTeamDao.save(entity); orgTeamDao.save(entity);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!