|
|
@@ -6,12 +6,16 @@ import com.goafanti.admin.bo.AdminPublicReviewerBo;
|
|
|
import com.goafanti.admin.service.DepartmentService;
|
|
|
import com.goafanti.business.bo.InputRestrictProject;
|
|
|
import com.goafanti.common.bo.EmailBo;
|
|
|
+import com.goafanti.common.bo.Result;
|
|
|
import com.goafanti.common.constant.AFTConstants;
|
|
|
import com.goafanti.common.dao.*;
|
|
|
+import com.goafanti.common.enums.AssistContentType;
|
|
|
+import com.goafanti.common.enums.AssistType;
|
|
|
import com.goafanti.common.enums.NoticeStatus;
|
|
|
import com.goafanti.common.error.BusinessException;
|
|
|
import com.goafanti.common.model.*;
|
|
|
import com.goafanti.common.utils.*;
|
|
|
+import com.goafanti.common.utils.excel.NewExcelUtil;
|
|
|
import com.goafanti.common.utils.weChat.WeChatUtils;
|
|
|
import com.goafanti.core.mybatis.BaseMybatisDao;
|
|
|
import com.goafanti.core.mybatis.page.Pagination;
|
|
|
@@ -24,13 +28,13 @@ import com.goafanti.order.service.OrderNewService;
|
|
|
import com.goafanti.weChat.bo.*;
|
|
|
import com.goafanti.weChat.service.PublicReleaseService;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.cache.annotation.CacheEvict;
|
|
|
import org.springframework.cache.annotation.Cacheable;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.socket.TextMessage;
|
|
|
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.text.ParseException;
|
|
|
import java.util.*;
|
|
|
@@ -39,71 +43,117 @@ import java.util.stream.Collectors;
|
|
|
|
|
|
@Service
|
|
|
public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper> implements PublicReleaseService {
|
|
|
- @Autowired
|
|
|
- private PublicReleaseMapper publicReleaseMapper;
|
|
|
- @Autowired
|
|
|
- private PublicReleaseLogMapper publicReleaseLogMapper;
|
|
|
- @Autowired
|
|
|
- private CustomerService customerService;
|
|
|
- @Autowired
|
|
|
- private PublicReleaseDetailsMapper publicReleaseDetailsMapper;
|
|
|
- @Autowired
|
|
|
- private WeChatUtils weChatUtils;
|
|
|
- @Autowired
|
|
|
- private AdminMapper adminMapper;
|
|
|
- @Autowired
|
|
|
- private AsyncUtils asyncUtils;
|
|
|
- @Autowired
|
|
|
- private UserMapper userMapper;
|
|
|
- @Autowired
|
|
|
- private OrganizationContactBookMapper organizationContactBookMapper;
|
|
|
- @Autowired
|
|
|
- private SystemWebSocketHandler systemWebSocketHandler;
|
|
|
- @Autowired
|
|
|
- private TOrderNewMapper tOrderNewMapper;
|
|
|
- @Autowired
|
|
|
- private DepartmentService departmentService;
|
|
|
- @Autowired
|
|
|
- private PublicExamineMapper publicExamineMapper;
|
|
|
- @Autowired
|
|
|
- private AdminUserCountMapper adminUserCountMapper;
|
|
|
- @Autowired
|
|
|
- private PublicReleaseClockMapper publicReleaseClockMapper;
|
|
|
- @Autowired
|
|
|
- private PublicReleaseDateClockMapper publicReleaseDateClockMapper;
|
|
|
- @Autowired
|
|
|
- private TOrderPublicReleaseCountMapper tOrderPublicReleaseCountMapper;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private RestrictProjectMapper restrictProjectMapper;
|
|
|
- @Autowired
|
|
|
- private OrderYearMaxDurationMapper orderYearMaxDurationMapper;
|
|
|
- @Autowired
|
|
|
- private TTaskMemberMapper tTaskMemberMapper;
|
|
|
- @Autowired
|
|
|
- private OrderNewService orderNewService;
|
|
|
- @Autowired
|
|
|
- private AdminPublicReviewerMapper adminPublicReviewerMapper;
|
|
|
- @Autowired
|
|
|
- private PublicAssistAdviceMapper publicAssistAdviceMapper;
|
|
|
- @Autowired
|
|
|
- private UserLimitCheckMapper userLimitCheckMapper;
|
|
|
- @Autowired
|
|
|
- private UserArchivesMapper userArchivesMapper;
|
|
|
- @Autowired
|
|
|
- private OrganizationIdentityMapper organizationIdentityMapper;
|
|
|
- @Autowired
|
|
|
- private UserSuperEvaluateMapper userSuperEvaluateMapper;
|
|
|
- @Autowired
|
|
|
- private OrderPublicReleaseLogMapper orderPublicReleaseLogMapper;
|
|
|
- @Autowired
|
|
|
- private PublicConfigMapper publicConfigMapper;
|
|
|
- @Autowired
|
|
|
- private UserFirstInterviewMapper userFirstInterviewMapper;
|
|
|
- @Autowired
|
|
|
- private UserArchivesInterviewMapper userArchivesInterviewMapper;
|
|
|
- @Autowired
|
|
|
- private UserInterviewProjectMapper userInterviewProjectMapper;
|
|
|
+ private final PublicReleaseMapper publicReleaseMapper;
|
|
|
+ private final PublicReleaseLogMapper publicReleaseLogMapper;
|
|
|
+ private final CustomerService customerService;
|
|
|
+ private final PublicReleaseDetailsMapper publicReleaseDetailsMapper;
|
|
|
+ private final WeChatUtils weChatUtils;
|
|
|
+ private final AdminMapper adminMapper;
|
|
|
+ private final AsyncUtils asyncUtils;
|
|
|
+ private final UserMapper userMapper;
|
|
|
+ private final OrganizationContactBookMapper organizationContactBookMapper;
|
|
|
+ private final SystemWebSocketHandler systemWebSocketHandler;
|
|
|
+ private final TOrderNewMapper tOrderNewMapper;
|
|
|
+ private final DepartmentService departmentService;
|
|
|
+ private final PublicExamineMapper publicExamineMapper;
|
|
|
+ private final PublicReleaseClockMapper publicReleaseClockMapper;
|
|
|
+ private final PublicReleaseDateClockMapper publicReleaseDateClockMapper;
|
|
|
+ private final TOrderPublicReleaseCountMapper tOrderPublicReleaseCountMapper;
|
|
|
+ private final RestrictProjectMapper restrictProjectMapper;
|
|
|
+ private final OrderYearMaxDurationMapper orderYearMaxDurationMapper;
|
|
|
+ private final TTaskMemberMapper tTaskMemberMapper;
|
|
|
+ private final OrderNewService orderNewService;
|
|
|
+ private final AdminPublicReviewerMapper adminPublicReviewerMapper;
|
|
|
+ private final PublicAssistAdviceMapper publicAssistAdviceMapper;
|
|
|
+ private final UserLimitCheckMapper userLimitCheckMapper;
|
|
|
+ private final UserArchivesMapper userArchivesMapper;
|
|
|
+ private final OrganizationIdentityMapper organizationIdentityMapper;
|
|
|
+ private final UserSuperEvaluateMapper userSuperEvaluateMapper;
|
|
|
+ private final OrderPublicReleaseLogMapper orderPublicReleaseLogMapper;
|
|
|
+ private final PublicConfigMapper publicConfigMapper;
|
|
|
+ private final UserFirstInterviewMapper userFirstInterviewMapper;
|
|
|
+ private final UserArchivesInterviewMapper userArchivesInterviewMapper;
|
|
|
+ private final UserInterviewProjectMapper userInterviewProjectMapper;
|
|
|
+ private final PublicAssistDetailsMapper publicAssistDetailsMapper;
|
|
|
+ private final PublicReleaseTypeMapper publicReleaseTypeMapper;
|
|
|
+ private final UserMidMapper userMidMapper;
|
|
|
+ private final PublicReleaseContentTypeMapper publicReleaseContentTypeMapper;
|
|
|
+
|
|
|
+ public PublicReleaseServiceImpl(
|
|
|
+ PublicReleaseMapper publicReleaseMapper,
|
|
|
+ PublicReleaseLogMapper publicReleaseLogMapper,
|
|
|
+ CustomerService customerService,
|
|
|
+ PublicReleaseDetailsMapper publicReleaseDetailsMapper,
|
|
|
+ WeChatUtils weChatUtils,
|
|
|
+ AdminMapper adminMapper,
|
|
|
+ AsyncUtils asyncUtils,
|
|
|
+ UserMapper userMapper,
|
|
|
+ OrganizationContactBookMapper organizationContactBookMapper,
|
|
|
+ SystemWebSocketHandler systemWebSocketHandler,
|
|
|
+ TOrderNewMapper tOrderNewMapper,
|
|
|
+ DepartmentService departmentService,
|
|
|
+ PublicExamineMapper publicExamineMapper,
|
|
|
+ PublicReleaseClockMapper publicReleaseClockMapper,
|
|
|
+ PublicReleaseDateClockMapper publicReleaseDateClockMapper,
|
|
|
+ TOrderPublicReleaseCountMapper tOrderPublicReleaseCountMapper,
|
|
|
+ RestrictProjectMapper restrictProjectMapper,
|
|
|
+ OrderYearMaxDurationMapper orderYearMaxDurationMapper,
|
|
|
+ TTaskMemberMapper tTaskMemberMapper,
|
|
|
+ OrderNewService orderNewService,
|
|
|
+ AdminPublicReviewerMapper adminPublicReviewerMapper,
|
|
|
+ PublicAssistAdviceMapper publicAssistAdviceMapper,
|
|
|
+ UserLimitCheckMapper userLimitCheckMapper,
|
|
|
+ UserArchivesMapper userArchivesMapper,
|
|
|
+ OrganizationIdentityMapper organizationIdentityMapper,
|
|
|
+ UserSuperEvaluateMapper userSuperEvaluateMapper,
|
|
|
+ OrderPublicReleaseLogMapper orderPublicReleaseLogMapper,
|
|
|
+ PublicConfigMapper publicConfigMapper,
|
|
|
+ UserFirstInterviewMapper userFirstInterviewMapper,
|
|
|
+ UserArchivesInterviewMapper userArchivesInterviewMapper,
|
|
|
+ UserInterviewProjectMapper userInterviewProjectMapper,
|
|
|
+ PublicAssistDetailsMapper publicAssistDetailsMapper,
|
|
|
+ PublicReleaseTypeMapper publicReleaseTypeMapper,
|
|
|
+ UserMidMapper userMidMapper,
|
|
|
+ PublicReleaseContentTypeMapper publicReleaseContentTypeMapper
|
|
|
+ ) {
|
|
|
+ super();
|
|
|
+ this.publicReleaseMapper = publicReleaseMapper;
|
|
|
+ this.publicReleaseLogMapper = publicReleaseLogMapper;
|
|
|
+ this.customerService = customerService;
|
|
|
+ this.publicReleaseDetailsMapper = publicReleaseDetailsMapper;
|
|
|
+ this.weChatUtils = weChatUtils;
|
|
|
+ this.adminMapper = adminMapper;
|
|
|
+ this.asyncUtils = asyncUtils;
|
|
|
+ this.userMapper = userMapper;
|
|
|
+ this.organizationContactBookMapper = organizationContactBookMapper;
|
|
|
+ this.systemWebSocketHandler = systemWebSocketHandler;
|
|
|
+ this.tOrderNewMapper = tOrderNewMapper;
|
|
|
+ this.departmentService = departmentService;
|
|
|
+ this.publicExamineMapper = publicExamineMapper;
|
|
|
+ this.publicReleaseClockMapper = publicReleaseClockMapper;
|
|
|
+ this.publicReleaseDateClockMapper = publicReleaseDateClockMapper;
|
|
|
+ this.tOrderPublicReleaseCountMapper = tOrderPublicReleaseCountMapper;
|
|
|
+ this.restrictProjectMapper = restrictProjectMapper;
|
|
|
+ this.orderYearMaxDurationMapper = orderYearMaxDurationMapper;
|
|
|
+ this.tTaskMemberMapper = tTaskMemberMapper;
|
|
|
+ this.orderNewService = orderNewService;
|
|
|
+ this.adminPublicReviewerMapper = adminPublicReviewerMapper;
|
|
|
+ this.publicAssistAdviceMapper = publicAssistAdviceMapper;
|
|
|
+ this.userLimitCheckMapper = userLimitCheckMapper;
|
|
|
+ this.userArchivesMapper = userArchivesMapper;
|
|
|
+ this.organizationIdentityMapper = organizationIdentityMapper;
|
|
|
+ this.userSuperEvaluateMapper = userSuperEvaluateMapper;
|
|
|
+ this.orderPublicReleaseLogMapper = orderPublicReleaseLogMapper;
|
|
|
+ this.publicConfigMapper = publicConfigMapper;
|
|
|
+ this.userFirstInterviewMapper = userFirstInterviewMapper;
|
|
|
+ this.userArchivesInterviewMapper = userArchivesInterviewMapper;
|
|
|
+ this.userInterviewProjectMapper = userInterviewProjectMapper;
|
|
|
+ this.publicAssistDetailsMapper = publicAssistDetailsMapper;
|
|
|
+ this.publicReleaseTypeMapper = publicReleaseTypeMapper;
|
|
|
+ this.userMidMapper = userMidMapper;
|
|
|
+ this.publicReleaseContentTypeMapper = publicReleaseContentTypeMapper;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
@Override
|
|
|
@Transactional
|
|
|
@@ -138,13 +188,18 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
}
|
|
|
in.setProcessStatus(1);
|
|
|
publicReleaseMapper.insertSelective(in);
|
|
|
+ //如果是非公出协单添加协单信息
|
|
|
+ if (in.getAssist()==1){
|
|
|
+ addPublicAssistType(in);
|
|
|
+ }
|
|
|
if (in.getType()==1&&in.getOrderNo()!=null){
|
|
|
TOrderNew tOrderNew = tOrderNewMapper.queryById(in.getOrderNo());
|
|
|
orderNewService.pushOrderPublicReleaseCount(tOrderNew);
|
|
|
}
|
|
|
addPRD(in, users, str, prdList);
|
|
|
addPublicReleaseDateClock(in);
|
|
|
- if (in.getType()==0&&in.getUids()!=null){
|
|
|
+ if ((in.getType()==0)
|
|
|
+ &&in.getUids()!=null){
|
|
|
pushUserArchivesInterview(in);
|
|
|
}
|
|
|
String userNames=str.substring(0,str.length()-1);
|
|
|
@@ -164,6 +219,18 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
return (Map<String, Object>) addPublicReleaseLog(my, in,userNames,date,users,checkOrderNo);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ private void addPublicAssistType(InputPublicRelease in) {
|
|
|
+ PublicAssistDetails pad=new PublicAssistDetails();
|
|
|
+ pad.setPrid(in.getId());
|
|
|
+ pad.setType(in.getAssistType());
|
|
|
+ pad.setContentType(in.getAssistContentType());
|
|
|
+ pad.setContent(in.getAssistContent());
|
|
|
+ publicAssistDetailsMapper.insert(pad);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
private void pushPublicAssistCarbonCopy(InputPublicRelease in, AdminListBo my, String userNames) {
|
|
|
String[] split = in.getAssistAid().split(",");
|
|
|
for (String aid2 : split) {
|
|
|
@@ -228,7 +295,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
}
|
|
|
|
|
|
private void addPRD(InputPublicRelease in, List<User> users, StringBuilder str, List<PublicReleaseDetails> prdList) {
|
|
|
-
|
|
|
+ List<PublicAssistDetails> listAd=new ArrayList<>();
|
|
|
if (in.getUids()!=null){
|
|
|
List<String> split = Arrays.asList(in.getUids().split(","));
|
|
|
int userCount=split.size();
|
|
|
@@ -381,7 +448,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
AtomicReference<Integer> status= new AtomicReference<>(1);
|
|
|
String formatDate = DateUtils.formatDate(in.getCreateTime(), AFTConstants.YYYYMMDDHHMMSS);
|
|
|
//业务公出
|
|
|
- if (in.getType()==0||in.getType()==2){
|
|
|
+ if (in.getType()==0||in.getType()==2||in.getType()==5){
|
|
|
//不是业务员
|
|
|
if (my.getPublicPurview()==0){
|
|
|
for (User u : users) {
|
|
|
@@ -390,7 +457,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
StringBuilder str2 = new StringBuilder();
|
|
|
Admin admin = adminMapper.selectById(u.getAid());
|
|
|
//业务公出限定项目直接公出,不是业务项目审核公出
|
|
|
- if(in.getType()==0){
|
|
|
+ if(in.getType()==0||in.getType()==5){
|
|
|
List<RestrictProject> list = restrictProjectMapper.selectListByParam(new InputRestrictProject(u.getId(), my.getId()));
|
|
|
if (!list.isEmpty()){
|
|
|
String start = DateUtils.formatDate(in.getReleaseStart(), AFTConstants.MMDDHHMM);
|
|
|
@@ -577,15 +644,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
@Override
|
|
|
public int updatePublicRelease(InputPublicRelease in) {
|
|
|
Date date = new Date();
|
|
|
- try {
|
|
|
- if(in.getReleaseStarts()!=null)in.setReleaseStart(DateUtils.parseDate(in.getReleaseStarts(), AFTConstants.YYYYMMDDHHMMSS));
|
|
|
- if(in.getReleaseEnds()!=null)in.setReleaseEnd(DateUtils.parseDate(in.getReleaseEnds(), AFTConstants.YYYYMMDDHHMMSS));
|
|
|
- } catch (ParseException e) {
|
|
|
- e.printStackTrace();
|
|
|
- throw new BusinessException("转换异常");
|
|
|
- }
|
|
|
Map checkOrderNo =null;
|
|
|
-
|
|
|
List<User> uses=null;
|
|
|
PublicRelease use = publicReleaseMapper.selectById(in.getId());
|
|
|
in.setCreateTime(use.getCreateTime());
|
|
|
@@ -624,6 +683,22 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
throw new BusinessException("该公出已签到,无法取消");
|
|
|
}
|
|
|
}
|
|
|
+ PublicAssistDetails usePd = publicAssistDetailsMapper.selectByPrid(in.getId());
|
|
|
+ //添加协单信息
|
|
|
+ PublicAssistDetails publicAssistDetails = publicAssistDetailsMapper.selectByPrid(in.getId());
|
|
|
+ if (publicAssistDetails==null){
|
|
|
+ //如果是非公出协单添加协单信息
|
|
|
+ addPublicAssistType(in);
|
|
|
+ }else {
|
|
|
+ //如果是非公出协单添加协单信息
|
|
|
+ PublicAssistDetails pad=new PublicAssistDetails();
|
|
|
+ pad.setId(publicAssistDetails.getId());
|
|
|
+ pad.setPrid(in.getId());
|
|
|
+ pad.setType(in.getAssistType());
|
|
|
+ pad.setContentType(in.getAssistContentType());
|
|
|
+ pad.setContent(in.getAssistContent());
|
|
|
+ publicAssistDetailsMapper.update(pad);
|
|
|
+ }
|
|
|
}else if (in.getAssist()==0){
|
|
|
publicReleaseMapper.updateAssist(in);
|
|
|
in.setAssistProcess(0);
|
|
|
@@ -664,6 +739,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
in.setProcessStatus(0);
|
|
|
}
|
|
|
publicReleaseMapper.update(in);
|
|
|
+
|
|
|
if (in.getOrderNo()!=null){
|
|
|
TOrderNew tOrderNew = tOrderNewMapper.queryById(in.getOrderNo());
|
|
|
orderNewService.pushOrderPublicReleaseCount(tOrderNew);
|
|
|
@@ -715,7 +791,8 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
//如果是业务切公出则撤销营销审核与审核人
|
|
|
pushUpdateType(in, use);
|
|
|
//如果是业务公出,切审核状态为其他,则重置审核
|
|
|
- if(in.getType()==0&&(use.getPublicType()==2|| use.getPublicType()==3)){
|
|
|
+ if((in.getType()==0||in.getType()==5)
|
|
|
+ &&(use.getPublicType()==2|| use.getPublicType()==3)){
|
|
|
in.setPublicType(1);
|
|
|
PublicExamine pe=new PublicExamine();
|
|
|
pe.setPrid(in.getId());
|
|
|
@@ -926,7 +1003,8 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
|
|
|
|
|
|
/**
|
|
|
- * in.type 查看类型 0我的公出 1公出审核 2管理员 3协单(技术财税总监看全部) 4 公出企业负责人审核 5 技术公出审核 6=协单审核
|
|
|
+ * in.type 查看类型 0我的全部 1公出审核 2管理员 3协单(技术财税总监看全部) 4 公出企业负责人审核 5 技术公出审核
|
|
|
+ * 6=协单审核 7=最大公出审核 8=我的公出 9=非公出协单(营销) 10=非公出协单(技术)
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
@@ -985,6 +1063,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
e.setAdminExamine(config.getOtherAuditorName());
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -995,6 +1074,11 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
list.forEach(e ->{ ids.add(e.getId()); });
|
|
|
List<PublicExamine> publicExamines = publicExamineMapper.selectByIds(ids);
|
|
|
for (OutPublicReleaseList e : list) {
|
|
|
+ if (e.getType()>4){
|
|
|
+ //开始时间和结束时间删除时分秒
|
|
|
+ e.setReleaseStarts(e.getReleaseStarts().substring(0,10));
|
|
|
+ e.setReleaseEnds(e.getReleaseEnds().substring(0,10));
|
|
|
+ }
|
|
|
if (e.getStatus()==1){
|
|
|
List<AdminPublicReviewerBo> adminPublicReviewerBos=null;
|
|
|
if (e.getType()==3){
|
|
|
@@ -1021,7 +1105,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
}
|
|
|
}
|
|
|
if (str.length()>1)e.setAdminExamine(str.substring(0,str.length()-1)+" 未审核");
|
|
|
- }else if (e.getType()==0&&e.getAssistProcess()==2){
|
|
|
+ }else if ((e.getType()==0||e.getType()>4)&&e.getAssistProcess()==2){
|
|
|
//获取技术协单
|
|
|
List<PublicRelease> publicReleases = publicReleaseMapper.selectByMainId(e.getId(), null, null);
|
|
|
StringBuffer str =new StringBuffer();
|
|
|
@@ -1066,7 +1150,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
}else {
|
|
|
e.setPublicAssistAdvice(publicAssistAdvices.size());
|
|
|
}
|
|
|
- }else if(e.getType()==0){
|
|
|
+ }else if(e.getType()==0||e.getType()==5){
|
|
|
List<PublicAssistAdvice> publicAssistAdvices = publicAssistAdviceMapper.selectList(e.getId(), 1);
|
|
|
if (publicAssistAdvices.isEmpty()){
|
|
|
e.setPublicAssistAdvice(0);
|
|
|
@@ -1150,7 +1234,11 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
}else if (use.getAssist()==0){
|
|
|
publicReleaseMapper.updateStatusByMainId(3,use.getId(),null,null);
|
|
|
}
|
|
|
- addpublicLog(id, status, "无需二级审核直接通过");
|
|
|
+ addUserMidCount(id);
|
|
|
+ //添加审核日志,在当前时间加1秒作为显示
|
|
|
+ Date date1 = new Date();
|
|
|
+ date1.setTime(date1.getTime()+1000);
|
|
|
+ addpublicLog(id, 6, "无需二级审核直接通过",date1);
|
|
|
}else {
|
|
|
if(use.getProcessStatus()==0||use.getProcessStatus()==1){
|
|
|
//一级审核
|
|
|
@@ -1186,6 +1274,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
p.setAuditInfo(str.toString());
|
|
|
p.setAuditTime(date);
|
|
|
p.setRejectName(ad.getName());
|
|
|
+ addUserMidCount(id);
|
|
|
sendNoticeAndSoucket(a.getId(),status,content.toString());
|
|
|
}
|
|
|
}
|
|
|
@@ -1396,26 +1485,51 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
count++;
|
|
|
}
|
|
|
}
|
|
|
+ List<OutPublicReleaseDetails> outPublicReleaseDetails = publicReleaseDetailsMapper.selectByPrid(id);
|
|
|
+ //如果完成了所有协单审核,主项目修改状态
|
|
|
+ int assistProcess = use.getAssistProcess();
|
|
|
if(count==newList.size()){
|
|
|
+ assistProcess=4;
|
|
|
PublicRelease newPublic2=new PublicRelease();
|
|
|
newPublic2.setId(use.getId());
|
|
|
newPublic2.setStatus(2);
|
|
|
+ newPublic2.setAssistProcess(assistProcess);
|
|
|
publicReleaseMapper.update(newPublic2);
|
|
|
+ addUserMidCount(outPublicReleaseDetails);
|
|
|
+ //添加
|
|
|
sendNoticeAndSoucket(use.getAid(),status,content.toString());
|
|
|
}else {
|
|
|
+ assistProcess=3;
|
|
|
PublicRelease newPublic2=new PublicRelease();
|
|
|
newPublic2.setId(use.getId());
|
|
|
newPublic2.setStatus(1);
|
|
|
+ newPublic2.setAssistProcess(assistProcess);
|
|
|
+ publicReleaseMapper.update(newPublic2);
|
|
|
+ }
|
|
|
+ //再根据主协单的状态修改子协单的状态
|
|
|
+ for (PublicRelease e : publicReleases) {
|
|
|
+ PublicRelease newPublic2=new PublicRelease();
|
|
|
+ newPublic2.setId(e.getId());
|
|
|
+ newPublic2.setAssistProcess(assistProcess);
|
|
|
publicReleaseMapper.update(newPublic2);
|
|
|
}
|
|
|
if (evaluateType==1){
|
|
|
- List<OutPublicReleaseDetails> outPublicReleaseDetails = publicReleaseDetailsMapper.selectByPrid(id);
|
|
|
addUserSuperEvaluate(remarks, outPublicReleaseDetails, new Date());
|
|
|
}
|
|
|
}
|
|
|
return 1;
|
|
|
}
|
|
|
+ private void addUserMidCount(Integer id) {
|
|
|
+ List<OutPublicReleaseDetails> outPublicReleaseDetails = publicReleaseDetailsMapper.selectByPrid(id);
|
|
|
+ addUserMidCount(outPublicReleaseDetails);
|
|
|
+ }
|
|
|
+ private void addUserMidCount(List<OutPublicReleaseDetails> outPublicReleaseDetails) {
|
|
|
+ for (OutPublicReleaseDetails e : outPublicReleaseDetails) {
|
|
|
+ String uid=e.getUid();
|
|
|
+ userMidMapper.addUserMidCount(uid);
|
|
|
+ }
|
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
@Override
|
|
|
@@ -1628,6 +1742,85 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
return publicConfigMapper.selectDetails();
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Object listAssist(InputListAssist in) {
|
|
|
+ Map<String, Object> params = new HashMap<>();
|
|
|
+ //把参数放入map中
|
|
|
+ params.put("startTime", in.getStartTime());
|
|
|
+ if (StringUtils.isNotBlank(in.getEndTime())){
|
|
|
+ params.put("endTime", in.getEndTime()+" 23:59:59");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ params.put("aid", in.getAid());
|
|
|
+ params.put("assistAid", in.getAssistAid());
|
|
|
+ params.put("uid", in.getUid());
|
|
|
+ params.put("type", in.getType());
|
|
|
+ if (in.getContentType() != null){
|
|
|
+ params.put("contentType", in.getContentType().split(","));
|
|
|
+ }
|
|
|
+ if (in.getAssistType()!=null){
|
|
|
+ params.put("assistType", in.getAssistType().split(","));
|
|
|
+ }
|
|
|
+ params.put("depId", in.getDepId());
|
|
|
+ params.put("assistCount", in.getAssistCount());
|
|
|
+ Pagination<OutListAssist> page = (Pagination<OutListAssist>) findPage("findAssistList", "findAssistCount", params, in.getPageNo(), in.getPageSize());
|
|
|
+ for (OutListAssist e : (List<OutListAssist>)page.getList()) {
|
|
|
+ pushTypeName(e);
|
|
|
+ }
|
|
|
+ return page;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Result listAssistExprot(InputListAssist in,String uploadPath) {
|
|
|
+ List<OutListAssist> list = (List<OutListAssist>) findList("findAssistList", in);
|
|
|
+ for (OutListAssist e : list) {
|
|
|
+ pushTypeName(e);
|
|
|
+ }
|
|
|
+ NewExcelUtil<OutListAssist> excelExport = new NewExcelUtil<>(OutListAssist.class);
|
|
|
+ return excelExport.exportExcel(list,"协单统计列表",uploadPath);
|
|
|
+ }
|
|
|
+
|
|
|
+ private void pushTypeName(OutListAssist e) {
|
|
|
+ //处理公出类型
|
|
|
+ if (Integer.valueOf(e.getType())>4){
|
|
|
+ e.setType("非公出协单");
|
|
|
+ }else {
|
|
|
+ e.setType("公出协单");
|
|
|
+ }
|
|
|
+ //处理公出项目分类
|
|
|
+ e.setAssistType(pushAssistTypeName(e.getAssistType()));
|
|
|
+
|
|
|
+ //处理公出内容分类
|
|
|
+ if (StringUtils.isNotBlank(e.getContentType())){
|
|
|
+ String[] split = e.getContentType().split(",");
|
|
|
+ StringBuilder str=new StringBuilder();
|
|
|
+ for (String s : split) {
|
|
|
+ str.append(AssistContentType.getDesc(Integer.valueOf(s))).append(",");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(e.getContent())){
|
|
|
+ str.append(e.getContent());
|
|
|
+ }else {
|
|
|
+ str.deleteCharAt(str.length()-1);
|
|
|
+ }
|
|
|
+
|
|
|
+ e.setContent(str.toString());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private String pushAssistTypeName(String assistType) {
|
|
|
+ if (StringUtils.isNotBlank(assistType)){
|
|
|
+ String[] split = assistType.split(",");
|
|
|
+ StringBuilder str=new StringBuilder();
|
|
|
+ for (String s : split) {
|
|
|
+ str.append(AssistType.getDesc(Integer.valueOf(s))).append(",");
|
|
|
+ }
|
|
|
+ str.deleteCharAt(str.length()-1);
|
|
|
+ return str.toString();
|
|
|
+ }
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+
|
|
|
private void pushCompleteMaxDuration(String orderNo) {
|
|
|
List<OrderPublicReleaseLog> orderPublicReleaseLogs = orderPublicReleaseLogMapper.queryByOrderNo(orderNo);
|
|
|
List<PublicRelease> publicReleases = publicReleaseMapper.selectByOrderNo(orderNo);
|
|
|
@@ -1689,11 +1882,13 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
orderPublicReleaseLogMapper.insert(log);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ private void addpublicLog(Integer id, Integer status, String remarks,Date date) {
|
|
|
+ PublicReleaseLog log = new PublicReleaseLog(id, TokenManager.getAdminId(), status, remarks, date);
|
|
|
+ publicReleaseLogMapper.insertSelective(log);
|
|
|
+ }
|
|
|
|
|
|
private void addpublicLog(Integer id, Integer status, String remarks) {
|
|
|
- PublicReleaseLog log = new PublicReleaseLog(id, TokenManager.getAdminId(), status, remarks, new Date());
|
|
|
- publicReleaseLogMapper.insertSelective(log);
|
|
|
+ addpublicLog(id, status, remarks,new Date());
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -1768,9 +1963,10 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
* @param date
|
|
|
*/
|
|
|
private void updatePushassist(PublicRelease use, PublicRelease updatePR, Date date, Admin a) {
|
|
|
-
|
|
|
//协单
|
|
|
- List<PublicRelease> list = publicReleaseMapper.selectByMainId(use.getId(),3,null);
|
|
|
+ int type=3;
|
|
|
+ if (use.getType()==5)type=6;
|
|
|
+ List<PublicRelease> list = publicReleaseMapper.selectByMainId(use.getId(),type,null);
|
|
|
String []ss= use.getAssistAid().split(",");
|
|
|
//数据库与传入比对,如果不存在就标记撤销 ,如果存在就修改成
|
|
|
for (PublicRelease out : list) {
|
|
|
@@ -1803,6 +1999,24 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
StringBuffer str = new StringBuffer("[").append(a.getName()).append("]修改了公出").append("[").append(use.getUserNames()).append("]。");
|
|
|
PublicReleaseLog log = new PublicReleaseLog(np.getId(), TokenManager.getAdminId(), PublicReleaseLog.states.xg.getCode(),str.toString(), date);
|
|
|
publicReleaseLogMapper.insertSelective(log);
|
|
|
+ if (use.getType()==5){
|
|
|
+ //主非协单内容
|
|
|
+ PublicAssistDetails up = publicAssistDetailsMapper.selectByPrid(use.getId());
|
|
|
+ //子非协单内容如果子不存在则新增,否则修改
|
|
|
+ PublicAssistDetails up2 = publicAssistDetailsMapper.selectByPrid(np.getId());
|
|
|
+ if (up2==null){
|
|
|
+ PublicAssistDetails np2 = new PublicAssistDetails();
|
|
|
+ BeanUtils.copyProperties(up,np2);
|
|
|
+ np2.setPrid(np.getId());
|
|
|
+ np2.setId(null);
|
|
|
+ publicAssistDetailsMapper.insert(np2);
|
|
|
+ }else {
|
|
|
+ PublicAssistDetails np2 = new PublicAssistDetails();
|
|
|
+ BeanUtils.copyProperties(up,np2);
|
|
|
+ np2.setId(up2.getId());
|
|
|
+ publicAssistDetailsMapper.update(np2);
|
|
|
+ }
|
|
|
+ }
|
|
|
sendNoticeAndSoucket(out.getAid(),np.getStatus(),str.toString());
|
|
|
}
|
|
|
}
|
|
|
@@ -1812,6 +2026,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
for (PublicRelease o : list) {
|
|
|
if (s.equals(o.getAid())) {
|
|
|
flag2 = true;
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
if (!flag2) {
|
|
|
@@ -1822,10 +2037,23 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
np.setAid(s);
|
|
|
np.setAname(my2.getName());
|
|
|
//协单审核,判定是否跳过的逻辑
|
|
|
- np.setType(3);
|
|
|
+ if (use.getType()==0){
|
|
|
+ np.setType(3);
|
|
|
+ }else {
|
|
|
+ np.setType(6);
|
|
|
+ }
|
|
|
np.setMainId(use.getId());
|
|
|
np.setId(null);
|
|
|
pushAssist(use, date, a, np, np);
|
|
|
+ if (use.getType()==5){
|
|
|
+ //主非协单内容
|
|
|
+ PublicAssistDetails up = publicAssistDetailsMapper.selectByPrid(use.getId());
|
|
|
+ PublicAssistDetails np2 = new PublicAssistDetails();
|
|
|
+ BeanUtils.copyProperties(up,np2);
|
|
|
+ np2.setPrid(np.getId());
|
|
|
+ np2.setId(null);
|
|
|
+ publicAssistDetailsMapper.insert(np2);
|
|
|
+ }
|
|
|
StringBuffer str = new StringBuffer("[").append(a.getName()).append("]邀请你技术协单").append("[").append(use.getUserNames()).append("]。");
|
|
|
PublicReleaseLog log = new PublicReleaseLog(np.getId(), TokenManager.getAdminId(), PublicReleaseLog.states.fq.getCode(), str.toString(), date);
|
|
|
sendNoticeAndSoucket(s,np.getStatus(),str.toString());
|
|
|
@@ -1834,7 +2062,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
}
|
|
|
}
|
|
|
//判定是审核还是完成,取决于协单是否通过
|
|
|
- List<PublicRelease> newList = publicReleaseMapper.selectByMainId(use.getId(),3,null);
|
|
|
+ List<PublicRelease> newList = publicReleaseMapper.selectByMainId(use.getId(),null,null);
|
|
|
int count = 0;
|
|
|
for (PublicRelease e : newList) {
|
|
|
//如果是完成或者拒绝则标记,全中断则修改状态
|
|
|
@@ -1862,6 +2090,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
publicReleaseMapper.insertSelective(np);
|
|
|
}else {
|
|
|
np.setAid(null);
|
|
|
+ np.setAname(null);
|
|
|
publicReleaseMapper.update(np);
|
|
|
}
|
|
|
updatePublicReleaseDtails(use, np);
|
|
|
@@ -2048,7 +2277,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
outPublicReleaseLog.setAname(str.substring(0,str.length()-1));
|
|
|
list.add(outPublicReleaseLog);
|
|
|
}
|
|
|
- }else if (e.getType()==0&&e.getAssistProcess()==2){
|
|
|
+ }else if ((e.getType()==0||e.getType()==5)&&e.getAssistProcess()==2){
|
|
|
//获取技术协单
|
|
|
List<PublicRelease> publicReleases = publicReleaseMapper.selectByMainId(e.getId(), null, null);
|
|
|
StringBuffer str =new StringBuffer();
|
|
|
@@ -2080,6 +2309,10 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
@Override
|
|
|
public int pushPublicReleaseClockIn(Integer id,String photoUrl,Integer clockIn ,String clockInRemarks ,String uid) {
|
|
|
if (clockIn == null) clockIn = 1;
|
|
|
+ String str = "";
|
|
|
+ Date date = new Date();
|
|
|
+ boolean flag=false;
|
|
|
+ Integer clockCount=0;
|
|
|
PublicRelease use = publicReleaseMapper.selectById(id);
|
|
|
if (use.getPublicType()==1||use.getPublicType()==3) {
|
|
|
return -1;
|
|
|
@@ -2093,13 +2326,22 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
return -3;
|
|
|
}
|
|
|
}
|
|
|
+ //非公出协单只要大于
|
|
|
+ Date start = use.getReleaseStart();
|
|
|
+ Date end = use.getReleaseEnd();
|
|
|
+ if (use.getType()==5||use.getType()==6){
|
|
|
+ //结束时间需要+1天
|
|
|
+ end = DateUtils.addDays(end, 1);
|
|
|
+ }
|
|
|
+ if (start.getTime()>date.getTime()){
|
|
|
+ return -4;
|
|
|
+ }
|
|
|
+ if (end.getTime()<date.getTime()){
|
|
|
+ return -4;
|
|
|
+ }
|
|
|
List<OutPublicReleaseDetails> prdList = publicReleaseDetailsMapper.selectByPrid(id);
|
|
|
List<PublicReleaseDateClock> prdcList = publicReleaseDateClockMapper.selectByPrid(id);
|
|
|
pushDateClockDetails(prdList,prdcList);
|
|
|
- String str = "";
|
|
|
- Date date = new Date();
|
|
|
- boolean flag=false;
|
|
|
- Integer clockCount=0;
|
|
|
PublicReleaseClock pc=new PublicReleaseClock();
|
|
|
pc.setPrid(id);
|
|
|
pc.setPhotoUrl(photoUrl);
|
|
|
@@ -2227,7 +2469,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
}
|
|
|
}
|
|
|
out.setMyExamine(0);
|
|
|
- if (out.getType()==0||out.getType()==1||out.getType()==2){
|
|
|
+ if (out.getType()==0||out.getType()==1||out.getType()==2||out.getType()==5){
|
|
|
if (adminPublicReviewerBos==null)adminPublicReviewerBos = adminPublicReviewerMapper.selectByAid(out.getAid());
|
|
|
//判定是否是上级审核人
|
|
|
boolean myFlag = false;
|
|
|
@@ -2251,7 +2493,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
}
|
|
|
//新增所有审核人就是查看权限
|
|
|
for (AdminPublicReviewerBo e : adminPublicReviewerBos) {
|
|
|
- if ((e.getType()==0||e.getType()==4)
|
|
|
+ if ((e.getType()==0||e.getType()==4||e.getType()==5)
|
|
|
&&aid.equals(e.getReviewerId())){
|
|
|
flag=true;
|
|
|
flag2=true;
|
|
|
@@ -2359,6 +2601,10 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
}else {
|
|
|
out.setPermission(1);
|
|
|
}
|
|
|
+ if (out.getType()>4){
|
|
|
+ out.setReleaseStarts(out.getReleaseStarts().substring(0,10));
|
|
|
+ out.setReleaseEnds(out.getReleaseEnds().substring(0,10));
|
|
|
+ }
|
|
|
}else {
|
|
|
out=null;
|
|
|
return out;
|
|
|
@@ -2405,7 +2651,8 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
str.append(e.getReviewerName()+",");
|
|
|
}
|
|
|
//业务公出且协单部分审核(看着流程有点问题)
|
|
|
- }else if (out.getType()==0&& out.getAssistProcess()==2){
|
|
|
+ }else if ((out.getType()==0||out.getType()==5)
|
|
|
+ && out.getAssistProcess()==2){
|
|
|
//获取技术协单
|
|
|
List<PublicRelease> publicReleases = publicReleaseMapper.selectByMainId(out.getId(), null, null);
|
|
|
List<String> names=new ArrayList<>();
|
|
|
@@ -2545,6 +2792,10 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
if(in.getStatus()!=null) map.put("status", in.getStatus());
|
|
|
if(in.getClockIn()!=null) map.put("clockIn", in.getClockIn());
|
|
|
if(in.getPublicType()!=null)map.put("publicType",in.getPublicType());
|
|
|
+ if(in.getAssistType()!=null){
|
|
|
+ String[] split = in.getAssistType().split(",");
|
|
|
+ map.put("assistType",split);
|
|
|
+ }
|
|
|
//type 0私有 1管理权限 2所有权限
|
|
|
if(TokenManager.hasRole(AFTConstants.SUPERADMIN)||TokenManager.hasRole(AFTConstants.APPROVAL_DECISION)
|
|
|
||TokenManager.hasRole(AFTConstants.CED_ASSISTANT )||TokenManager.hasRole(AFTConstants.PERSONNEL_AUDITOR)
|
|
|
@@ -2598,13 +2849,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
|
|
|
@Override
|
|
|
public int checkTime(InputPublicRelease in) {
|
|
|
- try {
|
|
|
- in.setReleaseStart(DateUtils.parseDate(in.getReleaseStarts(), AFTConstants.YYYYMMDDHHMMSS));
|
|
|
- in.setReleaseEnd(DateUtils.parseDate(in.getReleaseEnds(), AFTConstants.YYYYMMDDHHMMSS));
|
|
|
- } catch (ParseException e) {
|
|
|
- e.printStackTrace();
|
|
|
- throw new BusinessException("转换异常");
|
|
|
- }
|
|
|
+
|
|
|
//如果主协单且一起公出
|
|
|
if(in.getAssist()==1){
|
|
|
//如果一起公出先判定发起人,再判定协单人,如果只是协单公出则只需要判定协单
|
|
|
@@ -2727,25 +2972,37 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
|
|
|
@Override
|
|
|
public Object getMyNewPublic() {
|
|
|
+
|
|
|
List<PublicRelease> myPublic=publicReleaseMapper.selectMyNewPublic(TokenManager.getAdminId());
|
|
|
if(myPublic.isEmpty())return null;
|
|
|
Integer id=null;
|
|
|
long count=999999;
|
|
|
+ long nowTime=System.currentTimeMillis();
|
|
|
for (PublicRelease e : myPublic) {
|
|
|
- long nowTime=System.currentTimeMillis();
|
|
|
+ long start=e.getReleaseStart().getTime();
|
|
|
+ long end=e.getReleaseEnd().getTime();
|
|
|
+ //添加结束时间小于当前时间或者开始时间大于当前时间不显示
|
|
|
+ if (end<nowTime||start>nowTime){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
long time = Math.abs(nowTime-e.getReleaseStart().getTime())/(1000*60);
|
|
|
long time2 = Math.abs(e.getReleaseEnd().getTime()-nowTime)/(1000*60);
|
|
|
|
|
|
//距离当前时间近的开始时间,不大于当前时间
|
|
|
if (time<count&&e.getReleaseStart().getTime()<nowTime){
|
|
|
- if (e.getAlone()!=1 && e.getAssist()!=1){
|
|
|
+ if (e.getAlone()!=1 ){
|
|
|
count=time;
|
|
|
id=e.getId();
|
|
|
}
|
|
|
}
|
|
|
//距离当前时间近的结束时间,不小于当前时间
|
|
|
- if (time2<count&&e.getReleaseEnd().getTime()>nowTime){
|
|
|
- if (e.getAlone()!=1 && e.getAssist()!=1){
|
|
|
+ if (e.getType()==5||e.getType()==6){
|
|
|
+ if (time2<count){
|
|
|
+ count=time2;
|
|
|
+ id=e.getId();
|
|
|
+ }
|
|
|
+ }else if (time2<count&&e.getReleaseEnd().getTime()>nowTime){
|
|
|
+ if (e.getAlone()!=1 ){
|
|
|
count=time2;
|
|
|
id=e.getId();
|
|
|
}
|
|
|
@@ -2775,7 +3032,11 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
out.setPublicAssistAdvice(publicAssistAdvices.size());
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+ if (out.getType()>4){
|
|
|
+ //开始时间与结束时间显示去掉时分秒
|
|
|
+ out.setReleaseStarts(out.getReleaseStarts().substring(0,10));
|
|
|
+ out.setReleaseEnds(out.getReleaseEnds().substring(0,10));
|
|
|
+ }
|
|
|
return out;
|
|
|
// List<OutPublicReleaseList> myPublic = getMyPublic(0,1);
|
|
|
// if (myPublic.isEmpty()){
|
|
|
@@ -3251,6 +3512,9 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
|
|
|
private void pushiClockInTime(List<OutPublicDtails> list, List<PublicReleaseClock> publicReleaseClocks) {
|
|
|
for (OutPublicDtails outPublicDtails : list) {
|
|
|
+ //处理协单类型
|
|
|
+ outPublicDtails.setAssistType(pushAssistTypeName(outPublicDtails.getAssistType()));
|
|
|
+ //处理打卡
|
|
|
if (outPublicDtails.getClockIn()!=null){
|
|
|
if (outPublicDtails.getAlone()==2&&outPublicDtails.getAssist()==1){
|
|
|
outPublicDtails.setClockInStr("无需打卡");
|