|
|
@@ -125,6 +125,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
// in.setAssistAidName(getAssistAidName(in.getAssistAid()));
|
|
|
in.setMainName(my.getName());
|
|
|
in.setAssistProcess(1);
|
|
|
+
|
|
|
}
|
|
|
if (in.getType() == 1) {
|
|
|
//技术公出
|
|
|
@@ -153,10 +154,21 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
updateName.setUserNames(userNames);
|
|
|
publicReleaseMapper.update(updateName);
|
|
|
addpublicLog(in.getId(), PublicReleaseLog.states.fq.getCode(), "发起外出申请");
|
|
|
+ //公出信息抄送
|
|
|
pushPublicCarbonCopy(in, my, userNames);
|
|
|
+ if (in.getAssist()==1){
|
|
|
+ List<PublicRelease> publicReleases = publicReleaseMapper.selectByMainId(in.getId(), null, null);
|
|
|
+ for (PublicRelease publicRelease : publicReleases) {
|
|
|
+ AdminListBo my2 = adminMapper.getDeptNameByAid(publicRelease.getAid());
|
|
|
+ pushPublicCarbonCopy(publicRelease, my2, userNames);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
return (Map<String, Object>) addPublicReleaseLog(my, in,userNames,date,users,checkOrderNo);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
private void pushUserArchivesInterview(InputPublicRelease in) {
|
|
|
if (in.getUids()!=null){
|
|
|
String[] split1 = in.getUais().split(",");
|
|
|
@@ -252,36 +264,49 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
publicReleaseDetailsMapper.insertBatch(prdList);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- private void pushPublicCarbonCopy(InputPublicRelease in, AdminListBo my, String userNames) {
|
|
|
+ private void pushPublicCarbonCopy(PublicRelease p, AdminListBo my, String userNames) {
|
|
|
List<AdminPublicReviewerBo> adminPublicReviewerBos = adminPublicReviewerMapper.selectByAid(my.getId())
|
|
|
.stream().filter(e -> e.getType() == 3).collect(Collectors.toList());
|
|
|
if (adminPublicReviewerBos.size()>0){
|
|
|
for (AdminPublicReviewerBo e : adminPublicReviewerBos) {
|
|
|
+ //公出信息
|
|
|
if (StringUtils.isNotEmpty(e.getReviewerId())){
|
|
|
- String startTime = DateUtils.formatDateChineseYYYYMMddHH(in.getReleaseStart());
|
|
|
- String endTime = DateUtils.formatDateChineseYYYYMMddHH(in.getReleaseEnd());
|
|
|
+ String startTime = DateUtils.formatDateChineseYYYYMMddHH(p.getReleaseStart());
|
|
|
+ String endTime = DateUtils.formatDateChineseYYYYMMddHH(p.getReleaseEnd());
|
|
|
//分类 0业务 1技术 2行政 3 技术协单 4 技术助手
|
|
|
String typeName=null;
|
|
|
- if(in.getType()==0)typeName="业务公出";
|
|
|
- else if(in.getType()==1)typeName="技术公出";
|
|
|
- else if(in.getType()==2)typeName="行政公出";
|
|
|
+ if(p.getType()==0)typeName="业务公出";
|
|
|
+ else if(p.getType()==1)typeName="技术公出";
|
|
|
+ else if(p.getType()==2)typeName="行政公出";
|
|
|
String str2=String.format("营销员%s,%s - %s,将公出%s,请知悉!", my.getName(),
|
|
|
startTime,
|
|
|
endTime,
|
|
|
userNames);
|
|
|
asyncUtils.addNoticAndEmail(NoticeStatus.PUBLIC_CARBON_COPY.getCode(), e.getReviewerId()
|
|
|
,str2);
|
|
|
- asyncUtils.sendCarbonCopyWeChat(e.getReviewerId(), in.getId(),
|
|
|
+ asyncUtils.sendCarbonCopyWeChat(e.getReviewerId(), p.getId(),
|
|
|
my.getName(), startTime,
|
|
|
endTime,
|
|
|
typeName,
|
|
|
- in.getPlan());
|
|
|
+ p.getPlan());
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ private void pushPublicCarbonCopy(InputPublicRelease in, AdminListBo my, String userNames) {
|
|
|
+ PublicRelease p=new PublicRelease();
|
|
|
+ p.setId(in.getId());
|
|
|
+ p.setAid(in.getAid());
|
|
|
+ p.setReleaseStart(in.getReleaseStart());
|
|
|
+ p.setReleaseEnd(in.getReleaseEnd());
|
|
|
+ p.setPlan(in.getPlan());
|
|
|
+ p.setType(in.getType());
|
|
|
+ pushPublicCarbonCopy(p, my, userNames);
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -685,6 +710,14 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
// }
|
|
|
AdminListBo my = adminMapper.getDeptNameByAid(TokenManager.getAdminId());
|
|
|
pushPublicCarbonCopy( in, my, userNames);
|
|
|
+ if (in.getAssist()==1){
|
|
|
+ List<PublicRelease> publicReleases = publicReleaseMapper.selectByMainId(in.getId(), null, null);
|
|
|
+ for (PublicRelease publicRelease : publicReleases) {
|
|
|
+ AdminListBo my2 = adminMapper.getDeptNameByAid(publicRelease.getAid());
|
|
|
+ pushPublicCarbonCopy(publicRelease, my2, userNames);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
//重新发起
|
|
|
addPublicReleaseLog(my, in, in.getUserNames(), date, uses, checkOrderNo);
|
|
|
}
|