| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.haikang.model.HKConstants; |
| | | import com.doumee.core.haikang.model.HKResponseCode; |
| | | import com.doumee.core.haikang.model.param.BaseListPageResponse; |
| | |
| | | import com.doumee.dao.business.MemberCardMapper; |
| | | import com.doumee.dao.business.MemberMapper; |
| | | import com.doumee.dao.business.join.EmpowerJoinMapper; |
| | | import com.doumee.dao.business.join.VisitsJoinMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.business.model.Device; |
| | | import com.doumee.dao.business.model.Empower; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.MemberCard; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | |
| | | List<Empower> successList = new ArrayList<>(); |
| | | List<Empower> errorList = new ArrayList<>(); |
| | | List<Empower> waitList = new ArrayList<>(); |
| | | List<Empower> cancelList = new ArrayList<>(); |
| | | List<Empower> faceErrorList = new ArrayList<>(); |
| | | for(Empower c : list) { |
| | | //向任务添加人员、设备信息数据 |
| | | if (Constants.equalsInteger(c.getDeviceDeleted(),Constants.ONE) || |
| | | (Constants.equalsInteger(c.getMemberDeleted(), Constants.ONE) && |
| | | Constants.equalsInteger(c.getMemberHkStatus(), Constants.ONE))){ |
| | | cancelList.add(c); |
| | | continue; |
| | | } |
| | | if(c.getDeviceOnline() !=null && Constants.equalsInteger(c.getDeviceOnline(),0)){ |
| | | waitList.add(c); |
| | | continue; |
| | |
| | | empowerMapper.updateById(update); |
| | | } |
| | | } |
| | | if(cancelList.size()>0){ |
| | | for(Empower model : cancelList){ |
| | | Empower update = new Empower(); |
| | | update.setId(model.getId()); |
| | | update.setSendDate(date); |
| | | update.setEditDate(date); |
| | | update.setHkId(taskId); |
| | | update.setFailFlag(Constants.ONE); |
| | | update.setSendStatus(Constants.EmpowerStatus.cancel); |
| | | update.setRemark( "设备或人员已删除,取消下发"); |
| | | update.setSendInfo( "设备或人员已删除,取消下发"); |
| | | empowerMapper.updateById(update); |
| | | } |
| | | } |
| | | if(faceErrorList.size()>0){ |
| | | for(Empower model : faceErrorList){ |
| | | Empower update = new Empower(); |