|
|
@@ -28,6 +28,7 @@ import com.goafanti.admin.service.PublicReleaseService;
|
|
|
import com.goafanti.common.bo.EmailBo;
|
|
|
import com.goafanti.common.constant.AFTConstants;
|
|
|
import com.goafanti.common.dao.AdminMapper;
|
|
|
+import com.goafanti.common.dao.OrganizationContactBookMapper;
|
|
|
import com.goafanti.common.dao.PublicReleaseLogMapper;
|
|
|
import com.goafanti.common.dao.PublicReleaseMapper;
|
|
|
import com.goafanti.common.dao.UserMapper;
|
|
|
@@ -35,6 +36,7 @@ import com.goafanti.common.enums.NoticeStatus;
|
|
|
import com.goafanti.common.error.BusinessException;
|
|
|
import com.goafanti.common.model.Admin;
|
|
|
import com.goafanti.common.model.Notice;
|
|
|
+import com.goafanti.common.model.OrganizationContactBook;
|
|
|
import com.goafanti.common.model.PublicRelease;
|
|
|
import com.goafanti.common.model.PublicReleaseLog;
|
|
|
import com.goafanti.common.model.User;
|
|
|
@@ -68,6 +70,8 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
@Autowired
|
|
|
private UserMapper userMapper;
|
|
|
@Autowired
|
|
|
+ private OrganizationContactBookMapper organizationContactBookMapper;
|
|
|
+ @Autowired
|
|
|
private SystemWebSocketHandler systemWebSocketHandler;
|
|
|
|
|
|
@Override
|
|
|
@@ -233,6 +237,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
public int pushPublicReleaseClockIn(Integer id,String photoUrl) {
|
|
|
PublicRelease p=new PublicRelease();
|
|
|
PublicRelease use=publicReleaseMapper.selectByPrimaryKey(id);
|
|
|
+ String aid=TokenManager.getAdminId();
|
|
|
p.setId(id);
|
|
|
p.setClockIn(1);
|
|
|
p.setPhotoUrl(photoUrl);
|
|
|
@@ -243,6 +248,11 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
fbb.setUid(use.getUid());
|
|
|
fbb.setContactType("0");
|
|
|
fbb.setResult(use.getRemarks());
|
|
|
+ OrganizationContactBook ub=organizationContactBookMapper.getMajor(use.getUfid(),aid);
|
|
|
+ if (ub !=null) {
|
|
|
+ fbb.setContacts(ub.getName());
|
|
|
+ fbb.setContactMobile(ub.getMobile());
|
|
|
+ }
|
|
|
fbb.setFollowTime(DateUtils.formatDate(p.getClockInTime(), AFTConstants.YYYYMMDDHHMMSS));
|
|
|
String ufid=UUID.randomUUID().toString();
|
|
|
p.setUfid(ufid);
|
|
|
@@ -251,7 +261,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
}else {
|
|
|
str="刷新打卡";
|
|
|
}
|
|
|
- PublicReleaseLog log=new PublicReleaseLog(id,TokenManager.getAdminId(),3,str,new Date());
|
|
|
+ PublicReleaseLog log=new PublicReleaseLog(id,aid,3,str,new Date());
|
|
|
log.setPhotoUrl(photoUrl);
|
|
|
publicReleaseLogMapper.insertSelective(log);
|
|
|
publicReleaseMapper.updateByPrimaryKeySelective(p);
|