|
|
@@ -2,6 +2,7 @@ package com.goafanti.patent.service.impl;
|
|
|
|
|
|
import java.text.ParseException;
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.Arrays;
|
|
|
import java.util.Calendar;
|
|
|
import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
|
@@ -469,21 +470,26 @@ public class PatentInfoServiceImpl extends BaseMybatisDao<PatentInfoMapper> impl
|
|
|
}
|
|
|
pl.setRecordTime(recordTime);
|
|
|
List<PatentLog> p = new ArrayList<PatentLog>();
|
|
|
- List<PatentInfo> list = patentInfoMapper.selectByPrimaryKeys(ids);
|
|
|
- if (null != list && list.size() > 0){
|
|
|
- for (PatentInfo patentInfo : list){
|
|
|
+ List<PatentInfo> list = patentInfoMapper.selectByPrimaryKeys(Arrays.asList(ids));
|
|
|
+ if (null != list && list.size() > 0) {
|
|
|
+ for (PatentInfo patentInfo : list) {
|
|
|
PatentLog patentLog = new PatentLog();
|
|
|
+ BeanUtils.copyProperties(pl, patentLog);
|
|
|
patentLog.setId(UUID.randomUUID().toString());
|
|
|
patentLog.setPid(patentInfo.getId());
|
|
|
- patentLog.setOperator(TokenManager.getAdminId());;
|
|
|
- BeanUtils.copyProperties(pl, patentLog);
|
|
|
+ patentLog.setOperator(TokenManager.getAdminId());
|
|
|
p.add(patentLog);
|
|
|
+ if (PatentInfoStatus.CIRCULATION.getCode() != patentLog.getState()) {
|
|
|
+ patentInfo.setPatentState(patentLog.getState());
|
|
|
+ patentInfoMapper.updateByPrimaryKeySelective(patentInfo);
|
|
|
+ }
|
|
|
createNotice(patentInfo, patentLog);
|
|
|
}
|
|
|
+ patentLogMapper.batchInsert(p);
|
|
|
}
|
|
|
- return patentLogMapper.batchInsert(p);
|
|
|
+ return 0;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
private void createNotice(PatentInfo p, PatentLog l) {
|
|
|
PatentInfo info = patentInfoMapper.selectByPrimaryKey(p.getId());
|
|
|
|