When jeecg exports the excel file, it is the id, and the processing method of the display name

 1. Problem description:

In the jeecg3.5.3 version, a basic table is created and the menu is configured. After inputting the data, if the data needs to be exported, and the display page type of the data type is another table field, in this case, the default function of jeecg is directly used, and the exported Excel does not display the field name of the selected field by default like the page.

For example: the page displays as follows:

 After the actual export, the content of the excel table is as follows:

Two solutions:

1. If the fields to be displayed in the associated table do not have duplicate names

Configure the href of the check field, dictionary table and dictionary code

In the design interface, fill in the field href, and fill in the dictionary table and dictionary code. The dictionary table is the indication of the table where the associated record is located; href and dictionary code are what need to be displayed in the associated table

This method will directly write the value of the corresponding field of the association table into the field, without association through id. If the associated fields have duplicate names, it is not suitable to use this method. 

2. Set Java Enhancement

If the associated fields are duplicated, the id needs to be associated, so that the id is written into the database, and then passed

Guess you like

Origin blog.csdn.net/jiao_zg/article/details/132335857