|
|
@@ -39,6 +39,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
import java.io.InputStream;
|
|
|
import java.net.URLEncoder;
|
|
|
import java.util.*;
|
|
|
+import java.util.concurrent.atomic.AtomicInteger;
|
|
|
|
|
|
/**
|
|
|
* 技术人员花名册 服务实现类
|
|
|
@@ -103,15 +104,15 @@ public class TechnicianServiceImpl extends BaseServiceImpl<TechnicianMapper, Tec
|
|
|
@SneakyThrows
|
|
|
@Override
|
|
|
public void exportTechnician(HttpServletResponse response, TechnicianDTO technician) {
|
|
|
-
|
|
|
-
|
|
|
Query query = new Query().setCurrent(1).setSize(Integer.MAX_VALUE);
|
|
|
List<TechnicianVO> technicianList = this.selectTechnicianPage(Condition.getPage(query), technician).getRecords();
|
|
|
if(CollectionUtil.isEmpty(technicianList)){
|
|
|
throw new ServiceException("花名册无数据!");
|
|
|
}
|
|
|
+ AtomicInteger i= new AtomicInteger(1);
|
|
|
technicianList.forEach(temp -> {
|
|
|
temp.setGenderName(DictCache.getValue(DictEnum.SEX, temp.getGender()));
|
|
|
+ temp.setXh(i.getAndIncrement());
|
|
|
});
|
|
|
|
|
|
InputStream templateFileName = this.getClass().getClassLoader().getResourceAsStream("export-template/技术人员花名册.xls");
|