|
@@ -17,6 +17,8 @@ import com.jeeplus.business.monthly.mapper.MonthlyMapper;
|
|
|
import com.jeeplus.business.monthly.service.dto.MonthlyDTO;
|
|
|
import com.jeeplus.business.project.service.JyProjectService;
|
|
|
import com.jeeplus.business.project.service.dto.JyProjectDTO;
|
|
|
+import com.jeeplus.business.useSeal.domain.Signet;
|
|
|
+import com.jeeplus.business.useSeal.mapper.SignetMapper;
|
|
|
import com.jeeplus.common.TokenProvider;
|
|
|
import com.jeeplus.core.query.QueryWrapperGenerator;
|
|
|
import com.jeeplus.flowable.feign.IFlowableApi;
|
|
@@ -30,6 +32,7 @@ import com.jeeplus.sys.service.dto.PostDTO;
|
|
|
import com.jeeplus.sys.service.dto.UserDTO;
|
|
|
import com.jeeplus.utils.StringUtils;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
@@ -51,6 +54,9 @@ public class MonthlyService {
|
|
|
@Resource
|
|
|
private JyProcessMapper jyProcessMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private SignetMapper signetMapper;
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 列表展示
|
|
@@ -187,10 +193,65 @@ public class MonthlyService {
|
|
|
*/
|
|
|
public List<JyProcess> saveProcess(List<JyProjectDTO> projectDTOS,String monthId){
|
|
|
ArrayList<JyProcess> jyProcesses = new ArrayList<>();
|
|
|
+
|
|
|
+ //获取用印id
|
|
|
+ QueryWrapper<Signet> queryWrapper = new QueryWrapper<>();
|
|
|
+ queryWrapper.eq("del_flag",'0');
|
|
|
+ queryWrapper.orderByDesc("create_time");
|
|
|
+ List<Signet> signets = signetMapper.selectList(queryWrapper);
|
|
|
+ projectDTOS.stream().forEach(item ->{
|
|
|
+ for (Signet signet : signets) {
|
|
|
+ if (org.apache.commons.lang3.StringUtils.isNotBlank(signet.getProjectId())){
|
|
|
+ String[] split = signet.getProjectId().split(",");
|
|
|
+ for (String s : split) {
|
|
|
+ if (org.apache.commons.lang3.StringUtils.isNotBlank(s)){
|
|
|
+ if (org.apache.commons.lang3.StringUtils.isNotBlank(signet.getTypeStatus())){
|
|
|
+ //用印类型为报告,则获取报告签发
|
|
|
+ if ( s.equals(item.getId()) && signet.getTypeStatus().equals("1") ){
|
|
|
+ item.setReportStatus(signet.getStatus());
|
|
|
+ item.setReportTime(signet.getUpdateTime());
|
|
|
+ }
|
|
|
+ if (s.equals(item.getId()) && signet.getTypeStatus().equals("2")){
|
|
|
+ //用印类型为报批,则设置报批签发所需信息
|
|
|
+ item.setReportsTime(signet.getUpdateTime());
|
|
|
+ item.setReportsStatus(signet.getStatus());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (org.apache.commons.lang3.StringUtils.isNotBlank(signet.getProjectId())){
|
|
|
+ String[] split = signet.getProjectId().split(",");
|
|
|
+ for (String s : split) {
|
|
|
+ if (org.apache.commons.lang3.StringUtils.isNotBlank(s)){
|
|
|
+ if (org.apache.commons.lang3.StringUtils.isNotBlank(signet.getTypeStatus())){
|
|
|
+ //用印类型为报告,则获取报告签发
|
|
|
+ if ( s.equals(item.getId()) && signet.getTypeStatus().equals("1") ){
|
|
|
+ item.setSealId(signet.getId());
|
|
|
+ item.setProcInsReportIssuance(signet.getProcInsId());
|
|
|
+ item.setReportIssuance(signet.getStatus());
|
|
|
+ }
|
|
|
+ if (s.equals(item.getId()) && signet.getTypeStatus().equals("2")){
|
|
|
+ //用印类型为报批,则设置报批签发所需信息
|
|
|
+ item.setReportsSubmitId(signet.getId());
|
|
|
+ item.setProcInsIdReports(signet.getProcInsId());
|
|
|
+ item.setReportsSubmit(signet.getStatus());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
projectDTOS.stream().forEach(item->{
|
|
|
JyProcess jyProcess = new JyProcess();
|
|
|
String id = UUID.randomUUID().toString().replace("-", "");
|
|
|
jyProcess.setId(id);
|
|
|
+ jyProcess.setProjectId(item.getId());
|
|
|
jyProcess.setOfficeName(item.getOfficeName());//部门
|
|
|
jyProcess.setProjectName(item.getName());//项目名称
|
|
|
jyProcess.setNo(item.getNo());//报告号
|
|
@@ -198,6 +259,17 @@ public class MonthlyService {
|
|
|
jyProcess.setProcessTime(item.getProcessTime());//进度完成时间
|
|
|
jyProcess.setProcess(item.getProcess());//进度
|
|
|
jyProcess.setMonthlyId(monthId);//月报id
|
|
|
+
|
|
|
+ jyProcess.setAuditId1(item.getAuditId1());
|
|
|
+ jyProcess.setAuditId2(item.getAuditId2());
|
|
|
+ jyProcess.setAuditId3(item.getAuditId3());
|
|
|
+ jyProcess.setSealId(item.getSealId());
|
|
|
+ jyProcess.setOutInstanceId(item.getOutInstanceId());
|
|
|
+ jyProcess.setReportsSubmitId(item.getReportsSubmitId());
|
|
|
+ jyProcess.setArchiveId(item.getArchiveId());
|
|
|
+ jyProcess.setArchiveId(item.getArchiveId());
|
|
|
+ jyProcess.setEiaId(item.getEiaId());
|
|
|
+
|
|
|
jyProcessMapper.insert(jyProcess);
|
|
|
jyProcesses.add(jyProcess);
|
|
|
});
|