|
|
@@ -13,7 +13,9 @@ import org.apache.commons.beanutils.BeanUtils;
|
|
|
import org.apache.commons.beanutils.ConvertUtils;
|
|
|
import org.apache.commons.beanutils.converters.DateConverter;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
@@ -23,16 +25,15 @@ import com.goafanti.common.dao.TTaskHoursMapper;
|
|
|
import com.goafanti.common.model.TOrderNew;
|
|
|
import com.goafanti.common.model.TOrderTask;
|
|
|
import com.goafanti.common.model.TTaskHours;
|
|
|
+import com.goafanti.common.utils.ExportExcelUtil;
|
|
|
import com.goafanti.core.mybatis.BaseMybatisDao;
|
|
|
import com.goafanti.core.mybatis.page.Pagination;
|
|
|
import com.goafanti.core.shiro.token.TokenManager;
|
|
|
import com.goafanti.order.bo.TOrderNewBo;
|
|
|
-import com.goafanti.order.bo.TOrderRefundBo;
|
|
|
import com.goafanti.order.bo.TOrderTaskBo;
|
|
|
import com.goafanti.order.bo.TOrderTaskDetailBo;
|
|
|
import com.goafanti.order.bo.TOrderTaskListBo;
|
|
|
import com.goafanti.order.enums.ProcessStatus;
|
|
|
-import com.goafanti.order.enums.ProjectNewStage;
|
|
|
import com.goafanti.order.service.OrderProjectService;
|
|
|
import com.goafanti.techproject.enums.TaskState;
|
|
|
@Service
|
|
|
@@ -43,6 +44,9 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
|
|
|
private TOrderNewMapper tOrderNewMapper;
|
|
|
@Autowired
|
|
|
private TTaskHoursMapper tTaskHoursMapper;
|
|
|
+ @Value(value = "${upload.path}")
|
|
|
+ private String uploadPath = null;
|
|
|
+
|
|
|
|
|
|
@Override
|
|
|
public int updateProjectDistribution(Integer taskId, String taskReceiverId,Integer specially) {
|
|
|
@@ -183,6 +187,20 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
|
|
|
}
|
|
|
return p;
|
|
|
}
|
|
|
+
|
|
|
+ @SuppressWarnings("null")
|
|
|
+ @Override
|
|
|
+ public HSSFWorkbook exportTaskHoursListData(String name, String taskId, String starTime, String endTime) {
|
|
|
+ if(endTime!=null) endTime=endTime+" 23:59:59";
|
|
|
+ List<TOrderTaskListBo> list=tTaskHoursMapper.getTaskHoursData(name,taskId,starTime,endTime);
|
|
|
+ if (list==null && list.size()==0) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ String[] comment = {"任务编号","任务名称","订单编号","业务别类","客户名称","任务负责人","任务状态","工时"};
|
|
|
+ String filePath = uploadPath + "/TaskHours";
|
|
|
+ HSSFWorkbook wb = ExportExcelUtil.exportTaskHoursListData(list, comment, filePath);
|
|
|
+ return wb;
|
|
|
+ }
|
|
|
|
|
|
|
|
|
}
|