anderx преди 3 години
родител
ревизия
a706d27ae4
променени са 1 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 4 2
      src/main/java/com/goafanti/weChat/service/impl/PublicReleaseServiceImpl.java

+ 4 - 2
src/main/java/com/goafanti/weChat/service/impl/PublicReleaseServiceImpl.java

@@ -396,16 +396,18 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 				sendNoticeAndSoucket(out.getAid(),in.getStatus(),str.toString());
 			}else {
 				PublicRelease np = new PublicRelease();
-				BeanUtils.copyProperties(out,np);
+				BeanUtils.copyProperties(use,np);
+				np.setId(out.getId());
 				np.setMainId(null);
 				np.setClockIn(null);
 				np.setClockInTime(null);
 				np.setType(null);
 				np.setAssist(2);
 				np.setStatus(status);
+				np.setAid(null);
 				publicReleaseMapper.updateByPrimaryKeySelective(np);
 				StringBuffer str = new StringBuffer("[").append(a.getName()).append("]修改了公出").append("[").append(u.getUsername()).append("]。");
-				PublicReleaseLog log = new PublicReleaseLog(out.getId(), TokenManager.getAdminId(), PublicReleaseLog.states.xg.getCode(),str.toString(), date);
+				PublicReleaseLog log = new PublicReleaseLog(np.getId(), TokenManager.getAdminId(), PublicReleaseLog.states.xg.getCode(),str.toString(), date);
 				publicReleaseLogMapper.insertSelective(log);
 				sendNoticeAndSoucket(out.getAid(),np.getStatus(),str.toString());
 			}