Explorar o código

【BUG】【反馈编号:2024080272】【列表导出-个性化设置】

DINGYL hai 3 semanas
pai
achega
5e99f66bf3
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      src/com/uas/erp/core/web/ExcelViewUtils.java

+ 3 - 3
src/com/uas/erp/core/web/ExcelViewUtils.java

@@ -41,7 +41,7 @@ public class ExcelViewUtils {
 		PowerDao powerDao = (PowerDao) ContextUtil.getBean("powerDao");
 		boolean bool = baseDao.checkIf("DataListDetailEmps", "dde_caller='" + caller + "' and dde_emid=" + employee.getEm_id());
 		DataList dataList = bool ? dataListDao.getDataListByEm(caller, employee) : dataListDao.getDataList(caller, employee.getEm_master());
-		DocumentConfig config = getConfig(caller, fields, employee, dataList, false);
+		DocumentConfig config = getConfig(caller, fields, employee, dataList, false,bool);
 		String con = null;
 		if(_jobemployee){
 			con = powerDao.getRecorderCondition(condition, dataList.getDl_entryfield(), employee, true,dataList.getDl_caller());
@@ -112,7 +112,7 @@ public class ExcelViewUtils {
 	 *            字段别名
 	 * @return
 	 */
-	private static DocumentConfig getConfig(String caller, String fields, Employee employee, DataList dataList, boolean alias) {
+	private static DocumentConfig getConfig(String caller, String fields, Employee employee, DataList dataList, boolean alias,boolean emps_bool) {
 		DocumentConfig config = new DocumentConfig();
 		DataListComboDao dataListComboDao = (DataListComboDao) ContextUtil.getBean("dataListComboDao");
 		List<DataListCombo> combos = dataListComboDao.getComboxsByCaller(caller, SpObserver.getSp());
@@ -144,7 +144,7 @@ public class ExcelViewUtils {
 		}
 		int index = 0;
 		for (DataListDetail detail : details) {
-			if ((detail.getDld_width() != 0 || detail.getDld_flex() != 0)) {
+			if ((emps_bool && detail.getDde_width()!= null && detail.getDde_width()!=0) || (!emps_bool && detail.getDld_width() != 0 || detail.getDld_flex() != 0)) {
 				ff = detail.getDld_field().split(" ");
 				String field = ff[ff.length - 1];// 别名
 				if ((customFields != null && !StringUtil.isInArray(customFields, field)) || (limits != null && limits.contains(field))) {