|
@@ -15,6 +15,7 @@ import org.springblade.business.entity.*;
|
|
import org.springblade.business.mapper.TaskMapper;
|
|
import org.springblade.business.mapper.TaskMapper;
|
|
import org.springblade.business.service.*;
|
|
import org.springblade.business.service.*;
|
|
import org.springblade.business.vo.*;
|
|
import org.springblade.business.vo.*;
|
|
|
|
+import org.springblade.common.utils.CommonUtil;
|
|
import org.springblade.common.utils.FileUtils;
|
|
import org.springblade.common.utils.FileUtils;
|
|
import org.springblade.common.utils.SnowFlakeUtil;
|
|
import org.springblade.common.utils.SnowFlakeUtil;
|
|
import org.springblade.core.log.exception.ServiceException;
|
|
import org.springblade.core.log.exception.ServiceException;
|
|
@@ -38,11 +39,14 @@ import org.springblade.flow.core.utils.TaskUtil;
|
|
import org.springblade.flow.core.vo.FlowProcessVO;
|
|
import org.springblade.flow.core.vo.FlowProcessVO;
|
|
import org.springblade.manager.entity.ContractInfo;
|
|
import org.springblade.manager.entity.ContractInfo;
|
|
import org.springblade.manager.entity.ProjectInfo;
|
|
import org.springblade.manager.entity.ProjectInfo;
|
|
|
|
+import org.springblade.manager.entity.TabBusstimeInfo;
|
|
import org.springblade.manager.entity.WbsTreeContract;
|
|
import org.springblade.manager.entity.WbsTreeContract;
|
|
import org.springblade.manager.feign.ArchiveTreeContractClient;
|
|
import org.springblade.manager.feign.ArchiveTreeContractClient;
|
|
import org.springblade.manager.feign.ContractClient;
|
|
import org.springblade.manager.feign.ContractClient;
|
|
import org.springblade.manager.feign.ProjectClient;
|
|
import org.springblade.manager.feign.ProjectClient;
|
|
import org.springblade.manager.feign.WbsTreeContractClient;
|
|
import org.springblade.manager.feign.WbsTreeContractClient;
|
|
|
|
+import org.springblade.manager.vo.AppWbsTreeContractVO;
|
|
|
|
+import org.springblade.resource.feign.CommonFileClient;
|
|
import org.springblade.system.user.cache.UserCache;
|
|
import org.springblade.system.user.cache.UserCache;
|
|
import org.springblade.system.user.entity.User;
|
|
import org.springblade.system.user.entity.User;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
@@ -108,7 +112,8 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
|
|
|
|
|
|
private final WbsTreeContractClient wbsTreeContractClient;
|
|
private final WbsTreeContractClient wbsTreeContractClient;
|
|
|
|
|
|
- private final ArchiveTreeContractClient archiveTreeContractClient;
|
|
|
|
|
|
+ private final CommonFileClient commonFileClient;
|
|
|
|
+
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
StringRedisTemplate RedisTemplate;
|
|
StringRedisTemplate RedisTemplate;
|
|
@@ -966,11 +971,48 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
|
|
*/
|
|
*/
|
|
@Transactional
|
|
@Transactional
|
|
public void updateWriteBusinessDataStatus(String formDataId, Integer status, String newFileUrl) {
|
|
public void updateWriteBusinessDataStatus(String formDataId, Integer status, String newFileUrl) {
|
|
- this.informationQueryService.update(Wrappers.<InformationQuery>lambdaUpdate().set(InformationQuery::getStatus, status)
|
|
|
|
- .set(InformationQuery::getEVisaPdfUrl, newFileUrl)
|
|
|
|
- .set(InformationQuery::getReportNumber, null)
|
|
|
|
- .set(InformationQuery::getAuditUserIdAndName, null)
|
|
|
|
- .in(InformationQuery::getId, Arrays.asList(formDataId.split(","))));
|
|
|
|
|
|
+
|
|
|
|
+ try {
|
|
|
|
+ String pdfPage = commonFileClient.getPdfNum(newFileUrl);
|
|
|
|
+ Long pdfSize = CommonUtil.getResourceLength(newFileUrl);
|
|
|
|
+ List<String> list = Arrays.asList(formDataId.split(","));
|
|
|
|
+ for(String iId : list){
|
|
|
|
+ //获取
|
|
|
|
+ String dateInfo = "";
|
|
|
|
+ InformationQuery queryinfo = informationQueryService.getById(iId);
|
|
|
|
+ List<AppWbsTreeContractVO> WbsTreeContract = wbsTreeContractClient.searchNodeAllTable(queryinfo.getWbsId() + "", queryinfo.getClassify() + "", queryinfo.getContractId() + "", queryinfo.getProjectId() + "");
|
|
|
|
+ List<String> collect = new ArrayList<>();
|
|
|
|
+ Map<String,String> idMap = new HashMap<>();
|
|
|
|
+ for(AppWbsTreeContractVO appWbsTreeContractVO : WbsTreeContract){
|
|
|
|
+ collect.add(appWbsTreeContractVO.getInitTableName());
|
|
|
|
+ idMap.put(appWbsTreeContractVO.getInitTableName(),appWbsTreeContractVO.getPKeyId()+"");
|
|
|
|
+ }
|
|
|
|
+ List<TabBusstimeInfo> tabussTimeInfo = informationQueryService.getTabussTimeInfo(collect);
|
|
|
|
+ if(tabussTimeInfo!=null && tabussTimeInfo.size()>=1){
|
|
|
|
+ TabBusstimeInfo tabBusstimeInfo = tabussTimeInfo.get(0);
|
|
|
|
+ String querySql = "select "+tabBusstimeInfo.getColKey()+" from "+tabBusstimeInfo.getTabEnName()+" where p_key_id="+idMap.get(tabBusstimeInfo.getTabEnName());
|
|
|
|
+ Map<String, Object> maps = jdbcTemplate.queryForMap(querySql);
|
|
|
|
+ if(maps!=null){
|
|
|
|
+ dateInfo = maps.get(tabBusstimeInfo.getColKey())+"";
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ this.informationQueryService.update(Wrappers.<InformationQuery>lambdaUpdate().set(InformationQuery::getStatus, status)
|
|
|
|
+ .set(InformationQuery::getEVisaPdfUrl, newFileUrl)
|
|
|
|
+ .set(InformationQuery::getReportNumber, null)
|
|
|
|
+ .set(InformationQuery::getAuditUserIdAndName, null)
|
|
|
|
+ .set(InformationQuery::getEVisaPdfPage, pdfPage)
|
|
|
|
+ .set(InformationQuery::getEVisaPdfSize, pdfSize)
|
|
|
|
+ .set(InformationQuery::getBusinessTime, dateInfo)
|
|
|
|
+ .in(InformationQuery::getId, Arrays.asList(formDataId.split(","))));
|
|
|
|
+ }
|
|
|
|
+ }catch (Exception e){
|
|
|
|
+ this.informationQueryService.update(Wrappers.<InformationQuery>lambdaUpdate().set(InformationQuery::getStatus, status)
|
|
|
|
+ .set(InformationQuery::getEVisaPdfUrl, newFileUrl)
|
|
|
|
+ .set(InformationQuery::getReportNumber, null)
|
|
|
|
+ .set(InformationQuery::getAuditUserIdAndName, null)
|
|
|
|
+ .in(InformationQuery::getId, Arrays.asList(formDataId.split(","))));
|
|
|
|
+ }
|
|
|
|
|
|
//TODO 测试完成后打开
|
|
//TODO 测试完成后打开
|
|
// InformationQuery query = this.informationQueryService.getById(formDataId);
|
|
// InformationQuery query = this.informationQueryService.getById(formDataId);
|