|
|
@@ -202,7 +202,7 @@ public class OrgCognizanceServiceImpl extends BaseMybatisDao<OrgCognizanceMapper
|
|
|
|
|
|
@Override
|
|
|
public void updateCognizance(OrgCognizance cog, OrgCognizanceLog log, Date recordTime, String aid) {
|
|
|
- if (null != log.getState() && null != recordTime && null != cog.getUid()) {
|
|
|
+ if (null != log.getState() && null != recordTime && null != cog.getUid() && null != log.getPrincipal()) {
|
|
|
log.setRecordTime(recordTime);
|
|
|
|
|
|
if (OrgCognizanceStatus.getStatus(cog.getState()) == OrgCognizanceStatus.DELIVERD) {
|
|
|
@@ -307,31 +307,7 @@ public class OrgCognizanceServiceImpl extends BaseMybatisDao<OrgCognizanceMapper
|
|
|
pageNo, pageSize);
|
|
|
}
|
|
|
|
|
|
- private void createNotice(OrgCognizance cog, OrgCognizanceLog l) {
|
|
|
- OrgCognizance info = orgCognizanceMapper.selectByPrimaryKey(cog.getId());
|
|
|
-
|
|
|
- Notice n = new Notice();
|
|
|
- Calendar now = Calendar.getInstance();
|
|
|
- now.set(Calendar.MILLISECOND, 0);
|
|
|
- n.setId(UUID.randomUUID().toString());
|
|
|
- n.setCreateTime(now.getTime());
|
|
|
- n.setReaded(NoticeReadStatus.UNREAD.getCode());
|
|
|
-
|
|
|
- User u = userMapper.selectByPrimaryKey(cog.getUid());
|
|
|
- if (null != u){
|
|
|
- n.setPid(u.getAid());
|
|
|
- }
|
|
|
-
|
|
|
- n.setUid(cog.getUid());
|
|
|
- n.setRid(cog.getId());
|
|
|
-
|
|
|
- n.setYear(cog.getYear());
|
|
|
-
|
|
|
- n.setAid(l.getPrincipal());
|
|
|
- n.setContent("编号" + info.getSerialNumber() + " " + OrgCognizanceStatus.getStatus(l.getState()).getDesc());
|
|
|
- n.setNoticeType(NoticeStatus.COGNIZANCE.getCode());
|
|
|
- noticeMapper.insert(n);
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
@Override
|
|
|
public OrgCognizance selectByPrimaryKey(String id) {
|
|
|
@@ -358,5 +334,31 @@ public class OrgCognizanceServiceImpl extends BaseMybatisDao<OrgCognizanceMapper
|
|
|
o.setTechProject(ProportionStatus.UNFINISHED.getCode());
|
|
|
return o;
|
|
|
}
|
|
|
+
|
|
|
+ private void createNotice(OrgCognizance cog, OrgCognizanceLog l) {
|
|
|
+ OrgCognizance info = orgCognizanceMapper.selectByPrimaryKey(cog.getId());
|
|
|
+
|
|
|
+ Notice n = new Notice();
|
|
|
+ Calendar now = Calendar.getInstance();
|
|
|
+ now.set(Calendar.MILLISECOND, 0);
|
|
|
+ n.setId(UUID.randomUUID().toString());
|
|
|
+ n.setCreateTime(now.getTime());
|
|
|
+ n.setReaded(NoticeReadStatus.UNREAD.getCode());
|
|
|
+
|
|
|
+ User u = userMapper.selectByPrimaryKey(cog.getUid());
|
|
|
+ if (null != u){
|
|
|
+ n.setPid(u.getAid());
|
|
|
+ }
|
|
|
+
|
|
|
+ n.setUid(cog.getUid());
|
|
|
+ n.setRid(cog.getId());
|
|
|
+
|
|
|
+ n.setYear(cog.getYear());
|
|
|
+
|
|
|
+ n.setAid(l.getPrincipal());
|
|
|
+ n.setContent("编号" + info.getSerialNumber() + " " + OrgCognizanceStatus.getStatus(l.getState()).getDesc());
|
|
|
+ n.setNoticeType(NoticeStatus.COGNIZANCE.getCode());
|
|
|
+ noticeMapper.insert(n);
|
|
|
+ }
|
|
|
|
|
|
}
|