master
周文涛 2 years ago
parent 22d20c352c
commit 86a347c86e

@ -70,7 +70,7 @@ public class Main {
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_lnspection_template\":\"检验模板\",\"oqc_sampling_plan\":\"抽样方案\",\"oqc_report_template\":\"报告模板\"}";
String json="{\"oqc_inspection_task\":\"检验任务\"}";
JSONObject tables = JSONObject.parseObject(json);
for (String table : tables.keySet()) {
String entityName = TableFieldUtil.tableNameToEntityName(table);

@ -42,4 +42,32 @@ public class TableFieldUtil {
String orderColumn = CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_CAMEL,to);
return orderColumn;
}
public static void main(String[] args) {
String[] fields=new String[]{"highest_unit","processing_unit","pn_name","pn_remark","num","basic_unit","stock_type","desc_type","batch","receiving_time","hand_measure","delivery_time","target_location","deal_node","responsible_user_id","marking"};
String[] fieldNames=new String[]{"主键id",
"最高处理单元",
"处理单元",
"产品",
"产品简短描述",
"数量",
"基本计量单位",
"库存类型",
"Desc.SType",
"批次",
"收货时间",
"处理措施",
"出库时间",
"目标库位",
"处理时间节点",
"责任人id",
"marking描述"};
for (int i = 0; i < fields.length; i++) {
String s = CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, fields[i]);
String fieldName = fieldNames[i];
System.out.println(s+":"+fieldName);
}
}
}

@ -136,6 +136,7 @@ public class ${entityName}Controller extends BaseController {
public AjaxResult import${entityName}(@RequestPart("file") MultipartFile file) throws Exception {
return ${entityName?uncap_first}Service.import${entityName}(file);
}
/**
* 导入模板
*/

@ -194,6 +194,7 @@ public class ${entityName}ServiceImpl extends ServiceImpl<${entityName}Mapper, $
}
return AjaxResult.success("导入成功");
}
/**
* 下载模板
*/

Loading…
Cancel
Save