|
|
@@ -76,13 +76,6 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
in.setCreateTime(date);
|
|
|
in.setStatus(1);
|
|
|
in.setAid(TokenManager.getAdminId());
|
|
|
- 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("转换异常");
|
|
|
- }
|
|
|
publicReleaseMapper.insertSelectiveGetId(in);
|
|
|
AdminListBo my = adminMapper.getDeptNameByAid(TokenManager.getAdminId());
|
|
|
Admin a=adminMapper.selectByPrimaryKey(my.getSuperiorId());
|
|
|
@@ -310,6 +303,31 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
return (Pagination<OutPublicDtails>) findPage("listPublicDtails", "countPublicDtails", map, in.getPageNo(), in.getPageSize());
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public boolean 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("转换异常");
|
|
|
+ }
|
|
|
+ Long l=in.getReleaseEnd().getTime()-in.getReleaseStart().getTime();
|
|
|
+ Date x=new Date(in.getReleaseStart().getTime()+(l/2));
|
|
|
+ int i=publicReleaseMapper.checkTime(x);
|
|
|
+ if (i>0) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
|
|
|
|