|
|
@@ -664,15 +664,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());
|
|
|
@@ -714,14 +706,20 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
PublicAssistDetails usePd = publicAssistDetailsMapper.selectByPrid(in.getId());
|
|
|
//如果是非公出协单添加协单信息
|
|
|
if (in.getType()==5){
|
|
|
- PublicAssistDetails publicAssistDetails = publicAssistDetailsMapper.selectById(in.getId());
|
|
|
- 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);
|
|
|
+ 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);
|
|
|
@@ -763,18 +761,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
in.setProcessStatus(0);
|
|
|
}
|
|
|
publicReleaseMapper.update(in);
|
|
|
- //如果是非公出协单添加协单信息
|
|
|
- if (in.getType()==5){
|
|
|
- addPublicAssistType(in);
|
|
|
- if (StringUtils.isNotBlank(in.getAssistType())){
|
|
|
- publicAssistDetailsMapper.deeleteByPrid(in.getId());
|
|
|
- addPublicReleaseType(in.getId(),in.getAssistType());
|
|
|
- }
|
|
|
- if (StringUtils.isNotBlank(in.getAssistContent())){
|
|
|
- publicReleaseContentTypeMapper.deleteByPrid(in.getId());
|
|
|
- addPublicCotentType(in.getId(),in.getAssistContentType());
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
if (in.getOrderNo()!=null){
|
|
|
TOrderNew tOrderNew = tOrderNewMapper.queryById(in.getOrderNo());
|
|
|
orderNewService.pushOrderPublicReleaseCount(tOrderNew);
|
|
|
@@ -2475,7 +2462,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;
|