Compare commits
2 Commits
4a88d4abbd
...
196c25159c
| Author | SHA1 | Date |
|---|---|---|
|
|
196c25159c | |
|
|
c5ce7f32bf |
|
|
@ -7,6 +7,11 @@ import java.util.List;
|
|||
@Data
|
||||
public class SjTeamPeopleVo {
|
||||
|
||||
/**
|
||||
* 到港时间
|
||||
*/
|
||||
private String onDutyTime;
|
||||
|
||||
private String id;
|
||||
/**
|
||||
* 班组id
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.securitycontrol.background.service.impl;
|
|||
import com.alibaba.nacos.shaded.org.checkerframework.checker.units.qual.A;
|
||||
import com.securitycontrol.background.mapper.SjWorkTeamMapper;
|
||||
import com.securitycontrol.background.service.SjWorkTeamService;
|
||||
import com.securitycontrol.common.core.utils.StringUtils;
|
||||
import com.securitycontrol.common.core.utils.aes.DateTimeHelper;
|
||||
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||
import com.securitycontrol.entity.background.vo.*;
|
||||
|
|
@ -163,6 +164,11 @@ public class SjWorkTeamServiceImpl implements SjWorkTeamService {
|
|||
@Override
|
||||
public List<SjTeamPeopleVo> getNoDutyList(SjTeamPeopleVo dto) {
|
||||
try{
|
||||
String onDutyTime=dto.getOnDutyTime();
|
||||
if(StringUtils.isEmpty(onDutyTime)){
|
||||
onDutyTime= DateTimeHelper.getNowDay();
|
||||
}
|
||||
dto.setOnDutyTime(onDutyTime);
|
||||
return mapper.getNoDutyList(dto);
|
||||
}catch (Exception e){
|
||||
log.error(e.getMessage(),e);
|
||||
|
|
@ -178,10 +184,15 @@ public class SjWorkTeamServiceImpl implements SjWorkTeamService {
|
|||
@Override
|
||||
public AjaxResult addOnDutyUser(SjTeamPeopleVo dto) {
|
||||
try{
|
||||
String onDutyTime=dto.getOnDutyTime();
|
||||
if(StringUtils.isEmpty(onDutyTime)){
|
||||
onDutyTime= DateTimeHelper.getNowDay();
|
||||
}
|
||||
List<String> list=dto.getIds();
|
||||
if(list!=null && list.isEmpty()){
|
||||
return AjaxResult.error("请选择入场人员");
|
||||
}
|
||||
|
||||
mapper.addOnDutyUser(list,dto.getTeamId(), DateTimeHelper.getNowDay());
|
||||
return AjaxResult.success("添加成功");
|
||||
}catch (Exception e){
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@
|
|||
select people.id,people.name, people.id_card idCard, duty.on_time onTime,
|
||||
people.phone phone, people.sex , people.work_type workType, people.team_id teamId
|
||||
from sj_team_people people
|
||||
left join sj_on_duty duty on duty.people_id=people.id AND duty.on_time=CURRENT_DATE
|
||||
left join sj_on_duty duty on duty.people_id=people.id AND duty.on_time=#{onDutyTime}
|
||||
where duty.id is null and people.team_id=#{teamId}
|
||||
<where>
|
||||
<if test="keyWord!=null and keyWord!=''">
|
||||
|
|
|
|||
Loading…
Reference in New Issue