|
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSON;
|
|
import com.aspose.cells.PageSetup;
|
|
import com.aspose.cells.PageSetup;
|
|
import com.aspose.cells.SaveFormat;
|
|
import com.aspose.cells.SaveFormat;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
@@ -22,15 +23,20 @@ import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.Data;
|
|
import lombok.Data;
|
|
|
|
+import net.logstash.logback.encoder.org.apache.commons.lang3.ObjectUtils;
|
|
import org.apache.commons.lang.StringUtils;
|
|
import org.apache.commons.lang.StringUtils;
|
|
import org.apache.commons.lang.time.DateUtils;
|
|
import org.apache.commons.lang.time.DateUtils;
|
|
import org.apache.poi.ss.usermodel.*;
|
|
import org.apache.poi.ss.usermodel.*;
|
|
import org.apache.poi.ss.util.CellRangeAddress;
|
|
import org.apache.poi.ss.util.CellRangeAddress;
|
|
import org.apache.poi.util.IOUtils;
|
|
import org.apache.poi.util.IOUtils;
|
|
import org.apache.poi.xssf.usermodel.XSSFRichTextString;
|
|
import org.apache.poi.xssf.usermodel.XSSFRichTextString;
|
|
|
|
+import org.jsoup.Jsoup;
|
|
|
|
+import org.jsoup.nodes.Element;
|
|
|
|
+import org.jsoup.select.Elements;
|
|
import org.springblade.business.entity.*;
|
|
import org.springblade.business.entity.*;
|
|
import org.springblade.business.feign.TaskClient;
|
|
import org.springblade.business.feign.TaskClient;
|
|
import org.springblade.common.constant.ClientIdConstant;
|
|
import org.springblade.common.constant.ClientIdConstant;
|
|
|
|
+import org.springblade.common.constant.CommonConstant;
|
|
import org.springblade.common.utils.BaseUtils;
|
|
import org.springblade.common.utils.BaseUtils;
|
|
import org.springblade.common.utils.CommonUtil;
|
|
import org.springblade.common.utils.CommonUtil;
|
|
import org.springblade.common.utils.SnowFlakeUtil;
|
|
import org.springblade.common.utils.SnowFlakeUtil;
|
|
@@ -45,11 +51,14 @@ import org.springblade.core.secure.utils.SecureUtil;
|
|
import org.springblade.core.tool.api.R;
|
|
import org.springblade.core.tool.api.R;
|
|
import org.springblade.core.tool.utils.*;
|
|
import org.springblade.core.tool.utils.*;
|
|
import org.springblade.core.tool.utils.DateUtil;
|
|
import org.springblade.core.tool.utils.DateUtil;
|
|
|
|
+import org.springblade.evisa.feign.EVisaClient;
|
|
|
|
+import org.springblade.evisa.vo.SigInfoVO;
|
|
import org.springblade.feign.ArchiveFileTaskClient;
|
|
import org.springblade.feign.ArchiveFileTaskClient;
|
|
-import org.springblade.manager.entity.ContractInfo;
|
|
|
|
-import org.springblade.manager.entity.ContractRelationJlyz;
|
|
|
|
|
|
+import org.springblade.manager.entity.*;
|
|
|
|
+import org.springblade.manager.feign.ExcelTabClient;
|
|
import org.springblade.manager.feign.FormulaClient;
|
|
import org.springblade.manager.feign.FormulaClient;
|
|
import org.springblade.manager.feign.ProjectClient;
|
|
import org.springblade.manager.feign.ProjectClient;
|
|
|
|
+import org.springblade.manager.feign.WbsTreePrivateClient;
|
|
import org.springblade.manager.vo.ReportMergeCellsConfig;
|
|
import org.springblade.manager.vo.ReportMergeCellsConfig;
|
|
import org.springblade.manager.vo.ReportResult;
|
|
import org.springblade.manager.vo.ReportResult;
|
|
import org.springblade.meter.config.MyJdbcTemplate;
|
|
import org.springblade.meter.config.MyJdbcTemplate;
|
|
@@ -63,9 +72,11 @@ import org.springblade.meter.service.IInterimPayCertificateService;
|
|
import org.springblade.meter.service.IMaterialStartStatementService;
|
|
import org.springblade.meter.service.IMaterialStartStatementService;
|
|
import org.springblade.meter.service.impl.*;
|
|
import org.springblade.meter.service.impl.*;
|
|
import org.springblade.meter.utils.CollectionUtils;
|
|
import org.springblade.meter.utils.CollectionUtils;
|
|
|
|
+import org.springblade.meter.utils.FileUtils;
|
|
import org.springblade.meter.vo.*;
|
|
import org.springblade.meter.vo.*;
|
|
import org.springblade.producer.bean.PushMessage;
|
|
import org.springblade.producer.bean.PushMessage;
|
|
import org.springblade.resource.feign.NewIOSSClient;
|
|
import org.springblade.resource.feign.NewIOSSClient;
|
|
|
|
+import org.springblade.system.cache.ParamCache;
|
|
import org.springblade.system.user.entity.User;
|
|
import org.springblade.system.user.entity.User;
|
|
import org.springblade.system.user.feign.IUserClient;
|
|
import org.springblade.system.user.feign.IUserClient;
|
|
import org.springframework.jdbc.core.BeanPropertyRowMapper;
|
|
import org.springframework.jdbc.core.BeanPropertyRowMapper;
|
|
@@ -118,6 +129,9 @@ public class TaskController extends BladeController {
|
|
private final AttachmentFormServiceTaskImpl attachmentFormServiceTask;
|
|
private final AttachmentFormServiceTaskImpl attachmentFormServiceTask;
|
|
private final MiddleMeterApplyMapper middleMeterApplyMapper;
|
|
private final MiddleMeterApplyMapper middleMeterApplyMapper;
|
|
|
|
|
|
|
|
+ private final WbsTreePrivateClient wbsTreePrivateClient;
|
|
|
|
+ private final ExcelTabClient excelTabClient;
|
|
|
|
+ private final EVisaClient eVisaClient;
|
|
|
|
|
|
private final ChangeTokenFormServiceImpl changeTokenFormService;
|
|
private final ChangeTokenFormServiceImpl changeTokenFormService;
|
|
private final ChangeTokenFormServiceTaskImpl changeTokenFormServiceTask;
|
|
private final ChangeTokenFormServiceTaskImpl changeTokenFormServiceTask;
|
|
@@ -1182,47 +1196,6 @@ public class TaskController extends BladeController {
|
|
if (taskParallels.size() == 0){
|
|
if (taskParallels.size() == 0){
|
|
throw new ServiceException("未获取到任务流程信息");
|
|
throw new ServiceException("未获取到任务流程信息");
|
|
}
|
|
}
|
|
- String firstUser = taskParallels.get(0).getTaskUser();
|
|
|
|
- /*中间计量申请,返回值增加:上报总金额,本期进度款,审计意见*/
|
|
|
|
- if (task.getMeterTaskType() != null && task.getMeterTaskType() == 1){
|
|
|
|
- //实时查询上报总金额
|
|
|
|
- BigDecimal reportAllMoney = middleMeterApplyTaskMapper.selectAllMoney(task.getId());
|
|
|
|
- if (reportAllMoney == null){
|
|
|
|
- throw new ServiceException("上报金额不能为0");
|
|
|
|
- }
|
|
|
|
- ContractMeterPeriod period = contractMeterPeriodService.getById(task.getFormDataId());
|
|
|
|
- if (period == null){
|
|
|
|
- throw new ServiceException("未获取到计量期信息");
|
|
|
|
- }
|
|
|
|
- vo.setReportAllMoney(reportAllMoney);
|
|
|
|
- vo.setProgressMoney(task.getTaskCommonMoney() == null ? BigDecimal.ZERO : task.getTaskCommonMoney());
|
|
|
|
- vo.setPdfUrl(task.getAttachmentPdfUrl());
|
|
|
|
- //查看当前用户是否是第一人
|
|
|
|
- String currentUser = AuthUtil.getUserId()+"";
|
|
|
|
- if (currentUser.equals(firstUser)){
|
|
|
|
- //是第一人,设置意见为1,并返回默认值字段
|
|
|
|
- vo.setOpinionType(1);
|
|
|
|
- //todo 目前直接把key写死在代码里面,后面有空再去动态获取key
|
|
|
|
- Map<String,Object> tableData = new HashMap<>();
|
|
|
|
- tableData.put("key_18__3_1",projectClient.getById(task.getProjectId()).getProjectName());
|
|
|
|
- tableData.put("key_7__4_3",reportAllMoney);
|
|
|
|
- tableData.put("key_1__5_3",LocalDate.now());
|
|
|
|
- tableData.put("key_5__10_1",reportAllMoney);
|
|
|
|
- //获取本期之前所有计量期金额
|
|
|
|
- BigDecimal beforeMoney = contractMeterPeriodMapper.getBeforeMoney(period);
|
|
|
|
- tableData.put("key_14__11_1",beforeMoney == null ? "" : beforeMoney);
|
|
|
|
- tableData.put("key_10__11_3",beforeMoney == null ? reportAllMoney : beforeMoney.add(reportAllMoney));
|
|
|
|
- vo.setTableData(tableData);
|
|
|
|
- }else {
|
|
|
|
- //不是第一人,判断PDF是否生成,生成了类型为2,没有生成类型为3
|
|
|
|
- if (StringUtils.isNotBlank(task.getAttachmentPdfUrl())){
|
|
|
|
- vo.setOpinionType(2);
|
|
|
|
- }else {
|
|
|
|
- vo.setOpinionType(3);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
|
|
|
|
/*上报人*/
|
|
/*上报人*/
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
@@ -1233,9 +1206,18 @@ public class TaskController extends BladeController {
|
|
taskUserOne.put("flowValue", "上报");
|
|
taskUserOne.put("flowValue", "上报");
|
|
taskProcessInfo.add(0, taskUserOne);
|
|
taskProcessInfo.add(0, taskUserOne);
|
|
|
|
|
|
|
|
+ //判断当前用户所属流程,如果为第一流程则类型1显示Excel,如果是后面流程则类型2显示PDF,没有PDF则类型3
|
|
|
|
+ int currentUserFlow = 1;
|
|
/*预设流程(平行、顺序审批)*/
|
|
/*预设流程(平行、顺序审批)*/
|
|
if (ObjectUtil.isNotEmpty(task.getFixedFlowId()) && !task.getFixedFlowId().equals(0L)) {
|
|
if (ObjectUtil.isNotEmpty(task.getFixedFlowId()) && !task.getFixedFlowId().equals(0L)) {
|
|
List<FixedFlowLink> query = jdbcTemplate.query("SELECT * FROM u_fixed_flow_link WHERE fixed_flow_id = ?", new Object[]{task.getFixedFlowId()}, new BeanPropertyRowMapper<>(FixedFlowLink.class));
|
|
List<FixedFlowLink> query = jdbcTemplate.query("SELECT * FROM u_fixed_flow_link WHERE fixed_flow_id = ?", new Object[]{task.getFixedFlowId()}, new BeanPropertyRowMapper<>(FixedFlowLink.class));
|
|
|
|
+ //校验当前用户在第几流程
|
|
|
|
+ Integer sort = query.stream().collect(Collectors.toMap(l -> l.getFixedFlowLinkUser(), l -> l.getFixedFlowBranchSort())).get(AuthUtil.getUserId());
|
|
|
|
+ if (sort == null){
|
|
|
|
+ throw new ServiceException("未获取到当前用户在流程中的信息");
|
|
|
|
+ }
|
|
|
|
+ currentUserFlow = sort;
|
|
|
|
+
|
|
Map<String, List<FixedFlowLink>> group = query.stream()
|
|
Map<String, List<FixedFlowLink>> group = query.stream()
|
|
.collect(Collectors.groupingBy(obj -> obj.getFixedFlowLink() + "@@@" + obj.getFixedFlowLinkType(),
|
|
.collect(Collectors.groupingBy(obj -> obj.getFixedFlowLink() + "@@@" + obj.getFixedFlowLinkType(),
|
|
LinkedHashMap::new,
|
|
LinkedHashMap::new,
|
|
@@ -1305,6 +1287,60 @@ public class TaskController extends BladeController {
|
|
}
|
|
}
|
|
vo.setTaskProcessInfo(taskProcessInfo);
|
|
vo.setTaskProcessInfo(taskProcessInfo);
|
|
}
|
|
}
|
|
|
|
+ /*中间计量申请,返回值增加:上报总金额,本期进度款,审计意见*/
|
|
|
|
+ if (task.getMeterTaskType() != null && task.getMeterTaskType() == 1){
|
|
|
|
+ //实时查询上报总金额
|
|
|
|
+ BigDecimal reportAllMoney = middleMeterApplyTaskMapper.selectAllMoney(task.getId());
|
|
|
|
+ if (reportAllMoney == null){
|
|
|
|
+ throw new ServiceException("上报金额不能为0");
|
|
|
|
+ }
|
|
|
|
+ ContractMeterPeriod period = contractMeterPeriodService.getById(task.getFormDataId());
|
|
|
|
+ if (period == null){
|
|
|
|
+ throw new ServiceException("未获取到计量期信息");
|
|
|
|
+ }
|
|
|
|
+ vo.setReportAllMoney(reportAllMoney);
|
|
|
|
+ vo.setProgressMoney(task.getTaskCommonMoney() == null ? BigDecimal.ZERO : task.getTaskCommonMoney());
|
|
|
|
+ vo.setPdfUrl(task.getAttachmentPdfUrl());
|
|
|
|
+ //查看当前用户是否在第一流程
|
|
|
|
+ if (currentUserFlow == 1){
|
|
|
|
+ //是第一人,设置意见为1,查询已经填写的值,如果没有则返回默认值
|
|
|
|
+ vo.setOpinionType(1);
|
|
|
|
+ vo.setTableHtml(this.getExcelHtmlByBuss(Long.valueOf(task.getProjectId())));
|
|
|
|
+ R<WbsTreePrivate> r = wbsTreePrivateClient.getProjectOpinionNode(Long.valueOf(task.getProjectId()));
|
|
|
|
+ if (r.getCode() != 200){
|
|
|
|
+ throw new ServiceException(r.getMsg());
|
|
|
|
+ }
|
|
|
|
+ WbsTreePrivate aPrivate = r.getData();
|
|
|
|
+ //实体数据
|
|
|
|
+// String querySql = "select * from " + aPrivate.getInitTableName() + " where p_key_id=" + task.getId();
|
|
|
|
+// List<Map<String, Object>> dataIn = jdbcTemplate.queryForList(querySql);
|
|
|
|
+ Map<String, Object> dataInfo = getBussDataInfo(aPrivate, task.getId());
|
|
|
|
+ //todo 目前直接把key写死在代码里面,后面有空再去动态获取key
|
|
|
|
+ Map<String, Object> tableData = new HashMap<>();
|
|
|
|
+ if (dataInfo.size() == 0) {
|
|
|
|
+ tableData.put("key_18__3_1", projectClient.getById(task.getProjectId()).getProjectName());
|
|
|
|
+ tableData.put("key_7__4_3", reportAllMoney);
|
|
|
|
+ tableData.put("key_1__5_3", LocalDate.now());
|
|
|
|
+ tableData.put("key_5__10_1", reportAllMoney);
|
|
|
|
+ //获取本期之前所有计量期金额
|
|
|
|
+ BigDecimal beforeMoney = contractMeterPeriodMapper.getBeforeMoney(period);
|
|
|
|
+ tableData.put("key_14__11_1", beforeMoney == null ? "" : beforeMoney);
|
|
|
|
+ tableData.put("key_10__11_3", beforeMoney == null ? reportAllMoney : beforeMoney.add(reportAllMoney));
|
|
|
|
+ }else {
|
|
|
|
+ tableData = dataInfo;
|
|
|
|
+ }
|
|
|
|
+ vo.setTableData(tableData);
|
|
|
|
+ }else {
|
|
|
|
+ if (StringUtils.isNotBlank(task.getAttachmentPdfUrl())){
|
|
|
|
+ vo.setOpinionType(2);
|
|
|
|
+ }else {
|
|
|
|
+ //不是第一人,判断PDF是否生成,生成了类型为2,没有生成类型为3
|
|
|
|
+ vo.setOpinionType(3);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
/*中间业务taskVO复制数据(只有待审批、已审批任务才能查看到具体的taskVO复制数据,因为废除任务时taskVO被删除,但是单条驳回时有记录单条数据的历史信息,所以通过的任务还是能查看到)*/
|
|
/*中间业务taskVO复制数据(只有待审批、已审批任务才能查看到具体的taskVO复制数据,因为废除任务时taskVO被删除,但是单条驳回时有记录单条数据的历史信息,所以通过的任务还是能查看到)*/
|
|
// if (ObjectUtil.isNotEmpty(task.getFormDataId()) && Arrays.asList(1, 2).contains(task.getStatus())) {
|
|
// if (ObjectUtil.isNotEmpty(task.getFormDataId()) && Arrays.asList(1, 2).contains(task.getStatus())) {
|
|
@@ -2269,6 +2305,7 @@ public class TaskController extends BladeController {
|
|
@ApiOperationSupport(order = 19)
|
|
@ApiOperationSupport(order = 19)
|
|
@ApiOperation(value = "同意审批(批量审批)", notes = "传入TaskApproveDTO")
|
|
@ApiOperation(value = "同意审批(批量审批)", notes = "传入TaskApproveDTO")
|
|
@PushMessage(clientId = ClientIdConstant.METER_CLIENT_ID)
|
|
@PushMessage(clientId = ClientIdConstant.METER_CLIENT_ID)
|
|
|
|
+ @Transactional
|
|
public R<Object> approve(@RequestBody TaskApproveDTO dto) {
|
|
public R<Object> approve(@RequestBody TaskApproveDTO dto) {
|
|
if (ObjectUtil.isEmpty(dto.getTaskId()) || ObjectUtil.isEmpty(dto.getProjectId()) || ObjectUtil.isEmpty(dto.getContractId()) || ObjectUtil.isEmpty(SecureUtil.getUserId())) {
|
|
if (ObjectUtil.isEmpty(dto.getTaskId()) || ObjectUtil.isEmpty(dto.getProjectId()) || ObjectUtil.isEmpty(dto.getContractId()) || ObjectUtil.isEmpty(SecureUtil.getUserId())) {
|
|
throw new ServiceException("入参数据异常");
|
|
throw new ServiceException("入参数据异常");
|
|
@@ -2296,8 +2333,11 @@ public class TaskController extends BladeController {
|
|
/*当前审批轮次*/
|
|
/*当前审批轮次*/
|
|
String sql_2 = "SELECT * FROM u_task_parallel WHERE process_instance_id = ? ORDER BY sort";
|
|
String sql_2 = "SELECT * FROM u_task_parallel WHERE process_instance_id = ? ORDER BY sort";
|
|
List<TaskParallel> taskParallels = jdbcTemplate.query(sql_2, new Object[]{task.getProcessInstanceId()}, new BeanPropertyRowMapper<>(TaskParallel.class));
|
|
List<TaskParallel> taskParallels = jdbcTemplate.query(sql_2, new Object[]{task.getProcessInstanceId()}, new BeanPropertyRowMapper<>(TaskParallel.class));
|
|
- boolean isCurrentUserLastApprove = checkTheTaskPersonSort(taskParallels);
|
|
|
|
|
|
|
|
|
|
+ //如果当前是中间计量申请,并且是第一流程,则保存表单但数据,若第一流程所有人都已审批则生成PDF,并且设置task对应值
|
|
|
|
+ checkMiddleApp(dto,task,taskParallels);
|
|
|
|
+
|
|
|
|
+ boolean isCurrentUserLastApprove = checkTheTaskPersonSort(taskParallels);
|
|
/*单条业务数据状态*/
|
|
/*单条业务数据状态*/
|
|
updateCopyDataStatus(task, dto);
|
|
updateCopyDataStatus(task, dto);
|
|
String reportId = null;
|
|
String reportId = null;
|
|
@@ -2381,6 +2421,119 @@ public class TaskController extends BladeController {
|
|
return R.fail("操作失败");
|
|
return R.fail("操作失败");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private void checkMiddleApp(TaskApproveDTO dto, Task task, List<TaskParallel> taskParallels) {
|
|
|
|
+ if (task.getMeterTaskType() != null && task.getMeterTaskType() == 1){
|
|
|
|
+ //判断当前用户所属流程,只处理第一流程
|
|
|
|
+ int currentUserFlow = 1;
|
|
|
|
+ Boolean isDefiniteFlow = false;
|
|
|
|
+ Boolean isAllApp = false;
|
|
|
|
+ List<FixedFlowLink> query = new ArrayList<>();
|
|
|
|
+ if (task.getFixedFlowId() != null && !task.getFixedFlowId().equals(0L)){
|
|
|
|
+ isDefiniteFlow = true;
|
|
|
|
+ query = jdbcTemplate.query("SELECT * FROM u_fixed_flow_link WHERE fixed_flow_id = ?", new Object[]{task.getFixedFlowId()}, new BeanPropertyRowMapper<>(FixedFlowLink.class));
|
|
|
|
+ //校验当前用户在第几流程
|
|
|
|
+ Integer sort = query.stream().collect(Collectors.toMap(l -> l.getFixedFlowLinkUser(), l -> l.getFixedFlowBranchSort())).get(AuthUtil.getUserId());
|
|
|
|
+ if (sort == null) {
|
|
|
|
+ throw new ServiceException("未获取到当前用户在流程中的信息");
|
|
|
|
+ }
|
|
|
|
+ currentUserFlow = sort;
|
|
|
|
+ }
|
|
|
|
+ if (currentUserFlow == 1){
|
|
|
|
+ //查询出项目审计意见节点的基本信息
|
|
|
|
+ R r = wbsTreePrivateClient.getProjectOpinionNode(Long.valueOf(dto.getProjectId()));
|
|
|
|
+ if (r.getCode() != 200){
|
|
|
|
+ throw new ServiceException(r.getMsg());
|
|
|
|
+ }
|
|
|
|
+ WbsTreePrivate aPrivate = (WbsTreePrivate) r.getData();
|
|
|
|
+ if (isDefiniteFlow) {
|
|
|
|
+ //获取出当前流程中所有用户
|
|
|
|
+ List<String> ids = query.stream()
|
|
|
|
+ .filter(l -> l.getFixedFlowLinkSort() == 1 && !l.getFixedFlowLinkUser().equals(AuthUtil.getUserId()))
|
|
|
|
+ .map(l -> l.getFixedFlowLinkUser() + "")
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
|
+ //根据用户获取这些用户在当前任务中的进度,来判断是否全部审批完成
|
|
|
|
+ long count = taskParallels.stream()
|
|
|
|
+ .filter(l -> ids.contains(l.getTaskUser()))
|
|
|
|
+ .filter(l -> l.getStatus() != 2).count();
|
|
|
|
+ if (count == 0) {
|
|
|
|
+ isAllApp = true;
|
|
|
|
+ }
|
|
|
|
+ }else {
|
|
|
|
+ long count = taskParallels.stream()
|
|
|
|
+ .filter(l->!l.getTaskUser().equals(AuthUtil.getUserId()+""))
|
|
|
|
+ .filter(l -> l.getStatus() != 2).count();
|
|
|
|
+ if (count == 0) {
|
|
|
|
+ isAllApp = true;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ Task updateTask = new Task();
|
|
|
|
+ updateTask.setId(task.getId());
|
|
|
|
+ Map<String, Object> tableData = dto.getTableData();
|
|
|
|
+ Object object = tableData.get("key_5__10_1");
|
|
|
|
+ if (object != null) {
|
|
|
|
+ try {
|
|
|
|
+ updateTask.setTaskCommonMoney(new BigDecimal(object.toString()));
|
|
|
|
+ }catch (Exception e){
|
|
|
|
+ throw new ServiceException("本期审核进度款格式不对");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //如果为第一流程则判断是否当前流程已全部审批,已经全部审批则生成电签PDF,没有全部审批则只保存数据
|
|
|
|
+ if (isAllApp){
|
|
|
|
+ //要求付款额度
|
|
|
|
+ //本期审核进度款
|
|
|
|
+ //截至上期累计进度款
|
|
|
|
+ //截至本期累计进度款
|
|
|
|
+ String pdfUrl = "";
|
|
|
|
+ try {
|
|
|
|
+ pdfUrl = getEntrustPDFTrial(Long.valueOf(dto.getProjectId()), aPrivate.getPKeyId(), tableData);
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ throw new ServiceException("生成咨询意见PDF时失败:"+e.getMessage());
|
|
|
|
+ }
|
|
|
|
+ SigInfoVO vo = new SigInfoVO();
|
|
|
|
+ vo.setPdfUrl(pdfUrl);
|
|
|
|
+ R<String> r1 = eVisaClient.batchEVisa(vo);
|
|
|
|
+ if (r1.getCode() != 200 || StringUtils.isBlank(r1.getData())){
|
|
|
|
+ throw new ServiceException("咨询意见PDF电签时失败");
|
|
|
|
+ }
|
|
|
|
+ updateTask.setAttachmentPdfUrl(r1.getData());
|
|
|
|
+ }else {
|
|
|
|
+ //只保存数据到m表
|
|
|
|
+ String delSql = "delete from " + aPrivate.getInitTableName() + " where p_key_id=" + task.getId();
|
|
|
|
+ jdbcTemplate.execute(delSql);
|
|
|
|
+ String sqlInfo = "";
|
|
|
|
+ Map<String, Object> dataMap2 = dto.getTableData();
|
|
|
|
+ Map<String, Object> dataMap = new HashMap<>();
|
|
|
|
+ for (String e : dataMap2.keySet()) {
|
|
|
|
+ if (e.contains("__")) {
|
|
|
|
+ String[] split = e.split("__");
|
|
|
|
+ dataMap.put(split[0], dataMap2.get(e)+"_^_"+split[1]);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ /*检查发现有p_key_id缺失的情况,导致表单数据丢失,所以强制覆盖*/
|
|
|
|
+ dataMap.put("p_key_id",task.getId());
|
|
|
|
+ sqlInfo = "INSERT INTO " + aPrivate.getInitTableName() + " ( ";
|
|
|
|
+ String keyStr = "id,";
|
|
|
|
+ String valStr = SnowFlakeUtil.getId() + ",";
|
|
|
|
+ for (String keys : dataMap.keySet()) {
|
|
|
|
+ keyStr += keys + ",";
|
|
|
|
+ valStr += "'" + dataMap.get(keys) + "',";
|
|
|
|
+ }
|
|
|
|
+ keyStr = keyStr.substring(0, keyStr.lastIndexOf(","));
|
|
|
|
+ valStr = valStr.substring(0, valStr.lastIndexOf(","));
|
|
|
|
+ sqlInfo = sqlInfo + keyStr + ") VALUES (" + valStr + ")";
|
|
|
|
+ jdbcTemplate.execute(sqlInfo);
|
|
|
|
+ }
|
|
|
|
+ R r1 = taskClient.updateTask(updateTask);
|
|
|
|
+ if (r1.getCode() != 200){
|
|
|
|
+ throw new ServiceException("修改任务信息时出现错误");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (1==1){
|
|
|
|
+ throw new ServiceException("回滚测试");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
private void check(Task task) {
|
|
private void check(Task task) {
|
|
String sql_2 = "SELECT * FROM u_task_parallel WHERE process_instance_id = ? ORDER BY sort";
|
|
String sql_2 = "SELECT * FROM u_task_parallel WHERE process_instance_id = ? ORDER BY sort";
|
|
List<TaskParallel> taskParallels = jdbcTemplate.query(sql_2, new Object[]{task.getProcessInstanceId()}, new BeanPropertyRowMapper<>(TaskParallel.class));
|
|
List<TaskParallel> taskParallels = jdbcTemplate.query(sql_2, new Object[]{task.getProcessInstanceId()}, new BeanPropertyRowMapper<>(TaskParallel.class));
|
|
@@ -3309,4 +3462,329 @@ public class TaskController extends BladeController {
|
|
return R.success("操作成功");
|
|
return R.success("操作成功");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public String getExcelHtmlByBuss(Long projectId) {
|
|
|
|
+
|
|
|
|
+ R<WbsTreePrivate> r = wbsTreePrivateClient.getProjectOpinionNode(projectId);
|
|
|
|
+ if (r.getCode() != 200){
|
|
|
|
+ throw new ServiceException(r.getMsg());
|
|
|
|
+ }
|
|
|
|
+ WbsTreePrivate aPrivate = r.getData();
|
|
|
|
+ try {
|
|
|
|
+// InputStream fileInputStream = new FileInputStream(fileUrl);
|
|
|
|
+ InputStream fileInputStream = new FileInputStream("C:\\Users\\泓创研发01\\Desktop\\fsdownload\\1789967486389583872.html");
|
|
|
|
+ String htmlString = IoUtil.readToString(fileInputStream);
|
|
|
|
+ htmlString = htmlString.replaceAll("placeholder", "placeholderxx");
|
|
|
|
+ htmlString = htmlString.replaceAll("title", "titlexx");
|
|
|
|
+ // 远程搜索配置
|
|
|
|
+ org.jsoup.nodes.Document doc = Jsoup.parse(htmlString);
|
|
|
|
+ Element table = doc.select("table").first();
|
|
|
|
+ fileInputStream.close();
|
|
|
|
+ return table+"";
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ throw new ServiceException("解析咨询意见表单时发生异常");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public String getEntrustPDFTrial(Long projectId,Long pkeyId,Map<String, Object> DataInfo) throws Exception {
|
|
|
|
+ String file_path = FileUtils.getSysLocalFileUrl();//ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
|
|
|
|
+ String sys_file_net_url = ParamCache.getValue(CommonConstant.SYS_FILE_NET_URL);
|
|
|
|
+ R r = wbsTreePrivateClient.getProjectOpinionNode(projectId);
|
|
|
|
+ if (r.getCode() != 200){
|
|
|
|
+ throw new ServiceException(r.getMsg());
|
|
|
|
+ }
|
|
|
|
+ WbsTreePrivate aPrivate = (WbsTreePrivate) r.getData();
|
|
|
|
+
|
|
|
|
+ String pdfPath = file_path + "/pdf//" + pkeyId + ".pdf";
|
|
|
|
+ String excelPath = file_path + "/pdf//" + pkeyId + ".xlsx";
|
|
|
|
+
|
|
|
|
+ File tabPdf = ResourceUtil.getFile(pdfPath);
|
|
|
|
+ if (tabPdf.exists()) {
|
|
|
|
+ tabPdf.delete();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //获取清表信息
|
|
|
|
+ ExcelTab excelTab = excelTabClient.getById(aPrivate.getExcelId()+"");
|
|
|
|
+
|
|
|
|
+ if (excelTab == null) {
|
|
|
|
+ throw new ServiceException("操作失败!");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //获取清表excel文件
|
|
|
|
+ org.apache.poi.ss.usermodel.Workbook workbook = WorkbookFactory.create(Objects.requireNonNull(CommonUtil.getOSSInputStreamTow(excelTab.getFileUrl())));
|
|
|
|
+ Sheet sheet = workbook.getSheetAt(0);
|
|
|
|
+ sheet.setForceFormulaRecalculation(true);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ //数据不为空,构造数据
|
|
|
|
+ String fileUrl = aPrivate.getHtmlUrl();
|
|
|
|
+// File file1 = ResourceUtil.getFile(fileUrl);
|
|
|
|
+ File file1 = ResourceUtil.getFile("C:\\Users\\泓创研发01\\Desktop\\fsdownload\\1789967486389583872.html");
|
|
|
|
+ InputStream fileInputStream;
|
|
|
|
+ if (file1.exists()) {
|
|
|
|
+ fileInputStream = new FileInputStream(file1);
|
|
|
|
+ } else {
|
|
|
|
+ String path = sys_file_net_url + fileUrl.replaceAll("//", "/").replaceAll(file_path, "");
|
|
|
|
+ fileInputStream = CommonUtil.getOSSInputStream(path);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ String htmlString = IoUtil.readToString(fileInputStream);
|
|
|
|
+ htmlString = htmlString.replaceAll("placeholder", "placeholderxx");
|
|
|
|
+ htmlString = htmlString.replaceAll("title", "titlexx");
|
|
|
|
+
|
|
|
|
+ org.jsoup.nodes.Document doc = Jsoup.parse(htmlString);
|
|
|
|
+ Element table = doc.select("table").first();
|
|
|
|
+ Elements trs = table.select("tr");
|
|
|
|
+
|
|
|
|
+ if (ObjectUtil.isNotEmpty(DataInfo)) {
|
|
|
|
+ for (String val : Objects.requireNonNull(DataInfo).keySet()) {
|
|
|
|
+ if (val.contains("__")) {
|
|
|
|
+ String[] DataVal = val.split("__");
|
|
|
|
+ String[] xy = DataVal[1].split("_");
|
|
|
|
+ if (Integer.parseInt(xy[0]) < trs.size()) {
|
|
|
|
+ Element ytzData = trs.get(Integer.parseInt(xy[0]));
|
|
|
|
+ if (ytzData != null) {
|
|
|
|
+ Elements tdsx = ytzData.select("td");
|
|
|
|
+ if (Integer.parseInt(xy[1]) < tdsx.size()) {
|
|
|
|
+ Element data = ytzData.select("td").get(Integer.parseInt(xy[1]));
|
|
|
|
+ if (data != null) {
|
|
|
|
+ if (data.html().contains("x1") && data.html().contains("y1")) {
|
|
|
|
+ int x1 = 0;
|
|
|
|
+ int x2 = 0;
|
|
|
|
+ int y1 = 0;
|
|
|
|
+ int y2 = 0;
|
|
|
|
+ if (data.html().contains("el-tooltip")) {
|
|
|
|
+ x1 = Integer.parseInt(data.children().get(0).children().get(0).attr("x1"));
|
|
|
|
+ x2 = Integer.parseInt(data.children().get(0).children().get(0).attr("x2"));
|
|
|
|
+ y1 = Integer.parseInt(data.children().get(0).children().get(0).attr("y1"));
|
|
|
|
+ } else {
|
|
|
|
+ x1 = Integer.parseInt(data.children().get(0).attr("x1"));
|
|
|
|
+ y1 = Integer.parseInt(data.children().get(0).attr("y1"));
|
|
|
|
+ }
|
|
|
|
+ if (x1 == 0) {
|
|
|
|
+ x1 = 1;
|
|
|
|
+ }
|
|
|
|
+ String myData = DataInfo.get(val) + "";
|
|
|
|
+ if (myData.contains("T") && myData.contains("-") && myData.contains(":")) {
|
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
|
|
|
|
+ sdf.setTimeZone(TimeZone.getTimeZone("GTM+8"));
|
|
|
|
+ SimpleDateFormat formatStr = new SimpleDateFormat("yyyy年MM月dd日");
|
|
|
|
+ if (myData.contains(",") && myData.contains("]")) {
|
|
|
|
+
|
|
|
|
+ myData = myData.replace("[", "").replace("]", "").replaceAll("'", "");
|
|
|
|
+ String[] dataVal = myData.split(",");
|
|
|
|
+
|
|
|
|
+ Date Start_dataStr = sdf.parse(dataVal[0]);
|
|
|
|
+ Date end_dataStr = sdf.parse(dataVal[1]);
|
|
|
|
+ String StartDate = formatStr.format(Start_dataStr);
|
|
|
|
+ String endDate = formatStr.format(end_dataStr);
|
|
|
|
+ if (StartDate.equals(endDate)) {
|
|
|
|
+ myData = StartDate;
|
|
|
|
+ } else {
|
|
|
|
+ myData = StartDate + "-" + endDate;
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ String[] dataStr = myData.split("T")[0].split("-");
|
|
|
|
+ myData = StringUtil.format("{}年{}月{}日", dataStr[0], dataStr[1], Integer.parseInt(dataStr[2]));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (myData.contains("lang.String")) {
|
|
|
|
+ Object obj = DataInfo.get(val);
|
|
|
|
+ if (obj instanceof String[]) {
|
|
|
|
+ String[] dataDate = (String[]) obj;
|
|
|
|
+ myData = dataDate[0].trim() + "-" + dataDate[1].trim();
|
|
|
|
+ if (dataDate[0].trim().equals(dataDate[1].trim())) {
|
|
|
|
+ myData = dataDate[0];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (myData.equals("1") && data.html().contains("hc-form-checkbox-group")) {
|
|
|
|
+ Row row = sheet.getRow(y1 - 1);
|
|
|
|
+ if (row != null) {
|
|
|
|
+ Cell cell = row.getCell(x1 - 1);
|
|
|
|
+ if (cell != null) {
|
|
|
|
+ String exceVal = cell.getStringCellValue().replaceAll(" ", "");
|
|
|
|
+ short fontIndex = cell.getCellStyle().getFontIndex();
|
|
|
|
+ Font fontAt = workbook.getFontAt(fontIndex);
|
|
|
|
+ fontAt.setFontName("EUDC");
|
|
|
|
+ cell.setCellValue(exceVal.replace("□", "\u2611"));
|
|
|
|
+ } else {
|
|
|
|
+ ObjectUtils.isNotEmpty(cell);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ Row row = sheet.getRow(y1 - 1);
|
|
|
|
+ if (row != null) {
|
|
|
|
+ Cell cell = row.getCell(x1 - 1);
|
|
|
|
+ if (cell != null) {
|
|
|
|
+ cell.setCellValue(myData);
|
|
|
|
+ } else {
|
|
|
|
+ ObjectUtils.isNotEmpty(cell);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 组装电签设置
|
|
|
|
+ List<TextdictInfo> textdictInfos = jdbcTemplate.query("select col_key,id from m_textdict_info where type in (2,6) and tab_id = " + aPrivate.getPKeyId(), new BeanPropertyRowMapper<>(TextdictInfo.class));
|
|
|
|
+ if (textdictInfos != null && !textdictInfos.isEmpty()) {
|
|
|
|
+ for (TextdictInfo e : textdictInfos) {
|
|
|
|
+ String key = e.getColKey();
|
|
|
|
+ String[] keys = key.split("__");
|
|
|
|
+ String[] trtd = keys[1].split("_");
|
|
|
|
+ if (Integer.parseInt(trtd[0]) < trs.size()) {
|
|
|
|
+ Element ytzData = trs.get(Integer.parseInt(trtd[0]));
|
|
|
|
+ if (ytzData != null) {
|
|
|
|
+ Elements tdsx = ytzData.select("td");
|
|
|
|
+ if (Integer.parseInt(trtd[1]) < tdsx.size()) {
|
|
|
|
+ Element data = ytzData.select("td").get(Integer.parseInt(trtd[1]));
|
|
|
|
+ if (data.html().contains("el-tooltip")) {
|
|
|
|
+ data = data.children().get(0);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ int x1 = Integer.parseInt(data.children().get(0).attr("x1"));
|
|
|
|
+ if (x1 == 0) {
|
|
|
|
+ x1 = 1;
|
|
|
|
+ }
|
|
|
|
+ int y1 = Integer.parseInt(data.children().get(0).attr("y1"));
|
|
|
|
+
|
|
|
|
+ Row row = sheet.getRow(y1 - 1);
|
|
|
|
+ if (row != null) {
|
|
|
|
+ Cell cell = sheet.getRow(y1 - 1).getCell(x1 - 1);
|
|
|
|
+ if (cell != null) {
|
|
|
|
+ short fontIndex = cell.getCellStyle().getFontIndex();
|
|
|
|
+ Font oldfontAt = workbook.getFontAt(fontIndex);
|
|
|
|
+
|
|
|
|
+ Font redFont = workbook.createFont();
|
|
|
|
+ redFont.setColor(IndexedColors.WHITE.getIndex()); //设置字体颜色
|
|
|
|
+ redFont.setFontHeightInPoints(oldfontAt.getFontHeightInPoints());//设置字体大小
|
|
|
|
+ redFont.setFontName(oldfontAt.getFontName());//设置字体
|
|
|
|
+
|
|
|
|
+ CellStyle newStyle = workbook.createCellStyle(); //创建单元格样式
|
|
|
|
+ newStyle.cloneStyleFrom(cell.getCellStyle());
|
|
|
|
+ newStyle.setFont(redFont);
|
|
|
|
+ cell.setCellStyle(newStyle);
|
|
|
|
+ cell.setCellValue(e.getId() + "");
|
|
|
|
+ } else {
|
|
|
|
+ ObjectUtils.isNotEmpty(cell);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //输出流
|
|
|
|
+ FileOutputStream outputStream = new FileOutputStream(excelPath);
|
|
|
|
+ workbook.write(outputStream);
|
|
|
|
+ FileUtils.setExcelScaleToPdf(excelPath, pdfPath);
|
|
|
|
+ BladeFile bladeFile = newIOSSClient.uploadFile(pkeyId + ".pdf", pdfPath);
|
|
|
|
+
|
|
|
|
+ if (bladeFile != null) {
|
|
|
|
+ return bladeFile.getLink();
|
|
|
|
+ }else {
|
|
|
|
+ throw new ServiceException("生成咨询意见PDF时失败");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public Map<String,Object> getBussDataInfo(WbsTreePrivate aPrivate,Long taskId) {
|
|
|
|
+
|
|
|
|
+ Map<String, Object> reData = new HashMap<>();
|
|
|
|
+
|
|
|
|
+ //表单是否存储在
|
|
|
|
+ String tabName = aPrivate.getInitTableName();
|
|
|
|
+ String isExitSql = " select * from information_schema.TABLES where TABLE_NAME='" + tabName + "'";
|
|
|
|
+ List<Map<String, Object>> tabList = jdbcTemplate.queryForList(isExitSql);
|
|
|
|
+ if (tabList == null || tabList.size() <= 0) {
|
|
|
|
+ return reData;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ String querySql = "select * from " + aPrivate.getInitTableName() + " where p_key_id=" + taskId;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ //String querySql = "select * from table_data_info where p_key_id=" + pkeyId;
|
|
|
|
+ List<Map<String, Object>> dataIn = jdbcTemplate.queryForList(querySql);
|
|
|
|
+
|
|
|
|
+ if (dataIn != null && dataIn.size() >= 1) {
|
|
|
|
+ Map<String, Object> mysqlData = dataIn.get(0);
|
|
|
|
+ for (String key : mysqlData.keySet()) {
|
|
|
|
+ String tabVal = mysqlData.get(key) + "";
|
|
|
|
+ // 时间段处理
|
|
|
|
+ if (StringUtils.isNotEmpty(tabVal) && tabVal.indexOf("null") < 0) {
|
|
|
|
+ if (tabVal.indexOf("T") >= 0 && tabVal.indexOf(".000Z]") >= 0) {
|
|
|
|
+ String[] tabData = tabVal.split("_\\^_");
|
|
|
|
+
|
|
|
|
+ if (reData.containsKey("pickerKey")) {
|
|
|
|
+ String pickerKey = reData.get("pickerKey") + "," + key + "__" + tabData[1];
|
|
|
|
+ reData.put("pickerKey", pickerKey);
|
|
|
|
+ } else {
|
|
|
|
+ reData.put("pickerKey", key + "__" + tabData[1]);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ String sql = tabData[0];
|
|
|
|
+ sql = sql.replaceAll("\\[", "['");
|
|
|
|
+ sql = sql.replaceAll("]", "']");
|
|
|
|
+ sql = sql.replaceAll("000Z,", "000Z',");
|
|
|
|
+ sql = sql.replaceAll(", 20", ", '20");
|
|
|
|
+ // sql = sql.replaceAll("'", "");
|
|
|
|
+ if (StringUtils.isNotEmpty(tabData[0])) {
|
|
|
|
+ reData.put(key + "__" + tabData[1], sql);
|
|
|
|
+ }
|
|
|
|
+ } else if (tabVal.indexOf("T") >= 0 && tabVal.indexOf(".000Z") >= 0) { //时间
|
|
|
|
+ // 时间和字符串合作
|
|
|
|
+ if (tabVal.indexOf("☆") >= 0) {
|
|
|
|
+ String[] mysql = tabVal.split("☆");
|
|
|
|
+ for (String data : mysql) {
|
|
|
|
+ String[] tabData = data.split("_\\^_");
|
|
|
|
+ if (StringUtils.isNotEmpty(tabData[0])) {
|
|
|
|
+ reData.put(key + "__" + tabData[1], tabData[0]);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ String[] tabData = tabVal.split("_\\^_");
|
|
|
|
+ if (StringUtils.isNotEmpty(tabData[0])) {
|
|
|
|
+ reData.put(key + "__" + tabData[1], tabData[0]);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else if (tabVal.indexOf("☆") >= 0) {
|
|
|
|
+ String[] mysql = tabVal.split("☆");
|
|
|
|
+ for (String data : mysql) {
|
|
|
|
+ String[] tabData = data.split("_\\^_");
|
|
|
|
+ if (StringUtils.isNotEmpty(tabData[0])) {
|
|
|
|
+ reData.put(key + "__" + tabData[1], tabData[0]);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else if (tabVal.indexOf("_^_") >= 0) { //数组处理方式
|
|
|
|
+ String[] tabData = tabVal.split("_\\^_");
|
|
|
|
+ if (StringUtils.isNotEmpty(tabData[0])) {
|
|
|
|
+ if (tabVal.contains("[") && tabVal.contains("年")) {
|
|
|
|
+ String[] strings = StringUtils.strip(tabData[0], "[]").split(",");
|
|
|
|
+ reData.put(key + "__" + tabData[1], strings);
|
|
|
|
+ }if (tabVal.contains("[") && tabVal.contains("]") && tabVal.indexOf(",")>=0) {
|
|
|
|
+ String[] strings = StringUtils.strip(tabData[0], "[]").split(",");
|
|
|
|
+ reData.put(key + "__" + tabData[1], strings);
|
|
|
|
+ } else {
|
|
|
|
+ reData.put(key + "__" + tabData[1], tabData[0]);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ reData.put(key, tabVal);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return reData;
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|