Browse Source

tijiao

recovery
wang0018 4 years ago
parent
commit
6cdefc7493
  1. 25
      tall/src/main/java/com/ccsens/tall/service/ExcelService.java
  2. 4
      tall/src/main/resources/application.yml

25
tall/src/main/java/com/ccsens/tall/service/ExcelService.java

@ -13,6 +13,8 @@ import com.ccsens.util.cron.CronConstant;
import com.ccsens.util.cron.NatureToDate;
import com.ccsens.util.exception.BaseException;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang.StringUtils;
import org.apache.poi.xssf.usermodel.XSSFCell;
import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet;
@ -606,6 +608,19 @@ public class ExcelService implements IExcelService {
private void readTask(XSSFWorkbook xssfWorkbook, XSSFSheet wbsSheet, int taskStart, int taskEnd,
Long currentUserId, SysProject sysProject, List<ProTaskDetail> taskDetails,
List<ProRole> proRoles, List<ProMember> proMembers, Map<String, List<ProTaskDetail>> hasGroupMap) throws Exception {
/**
* 读取到任务的表头key为属性value为在第几列
*/
HashMap<String, Integer> map =new HashMap<String, Integer>();
XSSFRow rowq = wbsSheet.getRow(taskStart);
for (int q=0;q<100;q++){
String s= ExcelUtil.getCellValue(rowq.getCell(q));
if(StringUtils.isBlank(s)){
break;
}
map.put(s,q);
}
Long pmRoleId = null;
//获取项目经理的id(一级角色)
for (ProRole role : proRoles) {
@ -659,14 +674,24 @@ public class ExcelService implements IExcelService {
String subTaskCell = ExcelUtil.getCellValue(row.getCell(8));
//关联子项目表
String subProject = ExcelUtil.getCellValue(row.getCell(9));
//交付物
String deliver = ExcelUtil.getCellValue(row.getCell(10));
//负责人
String executorRole = ExcelUtil.getCellValue(row.getCell(11));
//检查人
String checkerRole = ExcelUtil.getCellValue(row.getCell(12));
//即时奖惩(元)
String money = ExcelUtil.getCellValue(row.getCell(13));
//任务切换模式
String delay = ExcelUtil.getCellValue(row.getCell(14));
//延迟时间
//(自动延迟模式可用)
String delayTime = ExcelUtil.getCellValue(row.getCell(15));
//跳转任务
String loopTo = ExcelUtil.getCellValue(row.getCell(16));
//跳转次数
String loopTimes = ExcelUtil.getCellValue(row.getCell(17));
//输入文件
String input = ExcelUtil.getCellValue(row.getCell(18));
//二级任务名不能为空
// if(StrUtil.isEmpty(task2)){

4
tall/src/main/resources/application.yml

@ -1,5 +1,5 @@
spring:
profiles:
active: greenvalley
include: util-greenvalley,common
active: dev
include: util-dev,common

Loading…
Cancel
Save