| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.client.RestTemplate; |
| | | import com.java110.db.dao.IQueryServiceDAO; |
| | | import com.java110.utils.factory.ApplicationContextFactory; |
| | | import com.java110.utils.util.StringUtil; |
| | | import org.springframework.beans.BeansException; |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.web.client.RestTemplateBuilder; |
| | | import org.springframework.context.ApplicationContext; |
| | | import org.springframework.context.ApplicationContextAware; |
| | | import org.springframework.http.converter.StringHttpMessageConverter; |
| | | |
| | | import java.nio.charset.Charset; |
| | | |
| | | public class TableToJson { |
| | | |
| | | //show create table c_orders 用这个语句获取 |
| | | public static final String createTableSql = "CREATE TABLE `fee_receipt_print` (\n" + |
| | | " `print_id` varchar(30) NOT NULL COMMENT '打印ID',\n" + |
| | | " `community_id` varchar(30) NOT NULL COMMENT '小区ID',\n" + |
| | | " `receipt_id` varchar(30) NOT NULL COMMENT '收据ID',\n" + |
| | | " `print_pre` varchar(12) NOT NULL COMMENT '打印前缀,一般为日期 例如:20211025',\n" + |
| | | " `num` BIGINT NOT NULL default 0 COMMENT '序号',\n" + |
| | | " print_num varchar(30) not null comment '打印编号',\n" + |
| | | " `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',\n" + |
| | | " `status_cd` varchar(12) NOT NULL DEFAULT '0' COMMENT '数据状态',\n" + |
| | | " `remark` varchar(200) DEFAULT NULL COMMENT '备注'\n" + |
| | | public static final String createTableSql = "CREATE TABLE `return_pay_fee` (\n" + |
| | | " `return_fee_id` varchar(30) NOT NULL COMMENT '退费id',\n" + |
| | | " `community_id` varchar(30) NOT NULL COMMENT '小区id',\n" + |
| | | " `b_id` varchar(30) NOT NULL COMMENT '业务id',\n" + |
| | | " `config_id` varchar(30) NOT NULL COMMENT '费用项id',\n" + |
| | | " `fee_id` varchar(30) NOT NULL COMMENT '费用id',\n" + |
| | | " `fee_type_cd` varchar(30) NOT NULL COMMENT '费用类型',\n" + |
| | | " `detail_id` varchar(30) NOT NULL COMMENT '缴费id',\n" + |
| | | " `cycles` decimal(9,2) DEFAULT NULL COMMENT '周期',\n" + |
| | | " `receivable_amount` decimal(10,2) DEFAULT NULL COMMENT '应收金额',\n" + |
| | | " `received_amount` decimal(10,2) DEFAULT NULL COMMENT '实收金额',\n" + |
| | | " `prime_rate` decimal(3,2) DEFAULT NULL COMMENT '打折率',\n" + |
| | | " `remark` varchar(200) DEFAULT NULL COMMENT '备注',\n" + |
| | | " `state` varchar(4) NOT NULL COMMENT '审核状态:1000待审核1001审核通过10002审核不通过',\n" + |
| | | " `status_cd` varchar(2) NOT NULL COMMENT '数据状态,详细参考c_status表,S 保存,0, 在用 1失效',\n" + |
| | | " `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '申请退费时间',\n" + |
| | | " `pay_time` datetime NOT NULL COMMENT '缴费时间',\n" + |
| | | " `reason` varchar(200) NOT NULL COMMENT '退费原因',\n" + |
| | | " PRIMARY KEY (`return_fee_id`)\n" + |
| | | ")"; |
| | | |
| | | public static void main(String[] args) { |
| | | String desc = "收据打印编号"; |
| | | String id = "printId"; |
| | | String name = "feeReceiptPrint"; |
| | | String desc = "退费表"; |
| | | String id = "returnFeeId"; |
| | | String name = "returnPayFee"; |
| | | String shareName = "fee"; //生成到那个服务下 |
| | | String shareColumn = "community_id"; |
| | | String shareParam = "communityId"; |
| | |
| | | if ("KEY".equals(key)) { |
| | | continue; |
| | | } |
| | | if ("PRIMARY".equals(key)) { |
| | | continue; |
| | | } |
| | | if ("b_id".equals(key)) { |
| | | continue; |
| | | } |
| | |
| | | param.put("required", requireds); |
| | | System.out.println(param.toJSONString()); |
| | | } |
| | | |
| | | } |