|
@@ -7,7 +7,9 @@ import com.ruoyi.common.utils.poi.POIConstants;
|
|
|
import com.ruoyi.common.utils.poi.PoiWordTools;
|
|
|
import com.ruoyi.project.plant.domain.TMtEhsopenitem;
|
|
|
import com.ruoyi.project.system.domain.SysDictData;
|
|
|
+import com.ruoyi.project.system.domain.SysUser;
|
|
|
import com.ruoyi.project.system.service.ISysDictTypeService;
|
|
|
+import com.ruoyi.project.system.service.ISysUserService;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.apache.poi.xwpf.usermodel.*;
|
|
|
import org.apache.xmlbeans.XmlCursor;
|
|
@@ -32,6 +34,8 @@ public class TMtPersonServiceImpl implements ITMtPersonService
|
|
|
private TMtPersonMapper tMtPersonMapper;
|
|
|
@Autowired
|
|
|
private ISysDictTypeService iSysDictTypeService;
|
|
|
+ @Autowired
|
|
|
+ private ISysUserService sysUserService;
|
|
|
/**
|
|
|
* 查询会议人员
|
|
|
*
|
|
@@ -122,12 +126,20 @@ public class TMtPersonServiceImpl implements ITMtPersonService
|
|
|
tMtPerson.setMeetingId(meetingId);
|
|
|
tMtPerson.setIsCc(0l);
|
|
|
List<TMtPerson> list = tMtPersonMapper.selectTMtPersonList(tMtPerson);
|
|
|
-
|
|
|
+ for (TMtPerson t: list
|
|
|
+ ) {
|
|
|
+ SysUser user = sysUserService.selectUserByStaffId(t.getStaffid());
|
|
|
+ if (user != null) {
|
|
|
+ t.setName(user.getNickName());
|
|
|
+ t.setContact(user.getEmail());
|
|
|
+ t.setUnit(user.getDept().getDeptName());
|
|
|
+ }
|
|
|
+ }
|
|
|
if (CollectionUtils.isNotEmpty(list)) {
|
|
|
for (int i = 0; i < list.size(); i++) {
|
|
|
// 表格第二行
|
|
|
XWPFTableRow tableOneRowTwo = tableOne.createRow();// 行
|
|
|
- PoiWordTools.setWordCellSelfStyle(tableOneRowTwo.getCell(0), POIConstants.FONT_NAME, POIConstants.MT_FONT_SIZE, POIConstants.FONT_BOLD, POIConstants.ALIGNMENT,POIConstants.VERTICAL, POIConstants.FONT_COLOR, POIConstants.BG_COLOR, "20", DictUtils.getDictVale(staff ,list.get(i).getUnit())+ " " + DictUtils.getDictVale(actualpost ,list.get(i).getActualpost()));
|
|
|
+ PoiWordTools.setWordCellSelfStyle(tableOneRowTwo.getCell(0), POIConstants.FONT_NAME, POIConstants.MT_FONT_SIZE, POIConstants.FONT_BOLD, POIConstants.ALIGNMENT,POIConstants.VERTICAL, POIConstants.FONT_COLOR, POIConstants.BG_COLOR, "20", list.get(i).getUnit()+ " " + DictUtils.getDictVale(actualpost ,list.get(i).getActualpost()));
|
|
|
PoiWordTools.setWordCellSelfStyle(tableOneRowTwo.getCell(1), POIConstants.FONT_NAME, POIConstants.MT_FONT_SIZE, POIConstants.FONT_BOLD, POIConstants.ALIGNMENT,POIConstants.VERTICAL, POIConstants.FONT_COLOR, POIConstants.BG_COLOR, "40", list.get(i).getName());
|
|
|
}
|
|
|
}
|
|
@@ -152,11 +164,22 @@ public class TMtPersonServiceImpl implements ITMtPersonService
|
|
|
List<TMtPerson> list = tMtPersonMapper.selectTMtPersonList(tMtPerson);
|
|
|
List<SysDictData> staff = iSysDictTypeService.selectDictDataByType("STAFF_UNIT");
|
|
|
List<SysDictData> actualpost = iSysDictTypeService.selectDictDataByType("ACTUALPOST");
|
|
|
+
|
|
|
+ for (TMtPerson t: list
|
|
|
+ ) {
|
|
|
+ SysUser user = sysUserService.selectUserByStaffId(t.getStaffid());
|
|
|
+ if (user != null) {
|
|
|
+ t.setName(user.getNickName());
|
|
|
+ t.setContact(user.getEmail());
|
|
|
+ t.setUnit(user.getDept().getDeptName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (CollectionUtils.isNotEmpty(list)) {
|
|
|
for (int i = 0; i < list.size(); i++) {
|
|
|
// 表格第二行
|
|
|
XWPFTableRow tableOneRowTwo = tableOne.createRow();// 行
|
|
|
- PoiWordTools.setWordCellSelfStyle(tableOneRowTwo.getCell(0), POIConstants.FONT_NAME, POIConstants.MT_FONT_SIZE, POIConstants.FONT_BOLD, POIConstants.ALIGNMENT,POIConstants.VERTICAL, POIConstants.FONT_COLOR, POIConstants.BG_COLOR, "20", DictUtils.getDictVale(staff ,list.get(i).getUnit())+ " " + DictUtils.getDictVale(actualpost ,list.get(i).getActualpost()));
|
|
|
+ PoiWordTools.setWordCellSelfStyle(tableOneRowTwo.getCell(0), POIConstants.FONT_NAME, POIConstants.MT_FONT_SIZE, POIConstants.FONT_BOLD, POIConstants.ALIGNMENT,POIConstants.VERTICAL, POIConstants.FONT_COLOR, POIConstants.BG_COLOR, "20", list.get(i).getUnit()+ " " + DictUtils.getDictVale(actualpost ,list.get(i).getActualpost()));
|
|
|
PoiWordTools.setWordCellSelfStyle(tableOneRowTwo.getCell(1), POIConstants.FONT_NAME, POIConstants.MT_FONT_SIZE, POIConstants.FONT_BOLD, POIConstants.ALIGNMENT,POIConstants.VERTICAL, POIConstants.FONT_COLOR, POIConstants.BG_COLOR, "40", list.get(i).getName());
|
|
|
}
|
|
|
}
|