master
周文涛 2 years ago
parent fb82959b79
commit 22d20c352c

@ -69,7 +69,8 @@ public class Main {
String user = "enjoy";
String password = "Nomi1234";
//2.选择表配置
String json="{\"oqc_spot_check_record\":\"抽检记录\",\"oqc_shipment_record\":\"成品出货记录\",\"oqc_1008_record\":\"1008仓台账\",\"oqc_after_sales_record\":\"售后记录\",\"oqc_special_sample\":\"特殊样件\",\"oqc_product_record\":\"产品追溯\",\"oqc_ncr_record\":\"NCR明细\",\"oqc_qrqc_record\":\"QRQC明细\"}";
//String json="{\"oqc_spot_check_record\":\"抽检记录\",\"oqc_shipment_record\":\"成品出货记录\",\"oqc_1008_record\":\"1008仓台账\",\"oqc_after_sales_record\":\"售后记录\",\"oqc_special_sample\":\"特殊样件\",\"oqc_product_record\":\"产品追溯\",\"oqc_ncr_record\":\"NCR明细\",\"oqc_qrqc_record\":\"QRQC明细\"}";
String json="{\"oqc_lnspection_template\":\"检验模板\",\"oqc_sampling_plan\":\"抽样方案\",\"oqc_report_template\":\"报告模板\"}";
JSONObject tables = JSONObject.parseObject(json);
for (String table : tables.keySet()) {
String entityName = TableFieldUtil.tableNameToEntityName(table);

@ -139,6 +139,7 @@ public class ${entityName}Controller extends BaseController {
/**
* 导入模板
*/
@ApiOperation( value ="导入模板", notes ="导入模板", httpMethod ="POST")
@PostMapping("/importTemplate")
public void importTemplate(HttpServletResponse response) throws IOException {
${entityName?uncap_first}Service.importTemplateExcel(response);

@ -32,6 +32,10 @@ public class ${entityName} extends BaseEntity{
<#if po.fieldName == primaryKeyField>
@TableId(type = IdType.ASSIGN_ID)
<#else>
<#if po.fieldComment !=''>
/**${po.fieldComment}*/
@ApiModelProperty(value = "${po.fieldComment}")
</#if>
<#if po.fieldType =='Date'>
<#if po.fieldDbType =='date'>
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@ -43,13 +47,6 @@ public class ${entityName} extends BaseEntity{
<#else>
</#if>
</#if>
<#if po.fieldComment !=''>
/**${po.fieldComment}*/
@Excel(name = "${po.fieldComment}", width = 15)
@ExcelImport("${po.fieldComment}")
@ApiModelProperty(value = "${po.fieldComment}")
</#if>
@TableField(value="${po.fieldColumn}")
<#if po.fieldName == 'delFlag'>
@TableLogic

Loading…
Cancel
Save