瀏覽代碼

优化查询属性规格

java110 5 年之前
父節點
當前提交
72398634c4

+ 98 - 27
java110-generator/src/main/resources/web/template_1.json

@@ -1,71 +1,142 @@
 {
-  "templateName":"微信模板",
-  "directories": "property",
-  "templateCode":"wechatSmsTemplate",
-  "templateKey":"templateId",
-  "templateKeyName":"ID",
-  "searchCode": "templateId",
-  "searchName": "ID",
+  "templateName":"属性配置",
+  "directories": "dev",
+  "templateCode":"attrSpec",
+  "templateKey":"specCd",
+  "templateKeyName":"规格",
+  "searchCode": "specCd",
+  "searchName": "规格",
   "conditions": [
     {
-      "name": "微信模板ID",
+      "name": "规格名称",
       "inputType": "input",
-      "code": "smsTemplateId",
+      "code": "specName",
       "whereCondition": "equal"
     },
     {
-      "name": "模板类型",
+      "name": "表名",
       "inputType": "select",
-      "selectValue":"10001,10002,10003",
-      "selectValueName":"欠费催缴,停电通知,停水通知",
-      "code": "templateType",
+      "selectValue":"building_room_attr",
+      "selectValueName":"房屋属性",
+      "code": "tableName",
       "whereCondition": "equal"
     },
     {
-      "name": "模板编码",
+      "name": "规格",
       "inputType": "input",
-      "code": "templateId",
+      "code": "specCd",
       "whereCondition": "equal"
     }
   ],
   "columns":[
     {
-      "code":"templateType",
-      "cnCode":"模板类型",
-      "desc":"必填,请填写模板类型",
+      "code":"tableName",
+      "cnCode":"属性表",
+      "desc":"必填,请选择属性",
       "required":true,
       "hasDefaultValue":false,
       "inputType": "select",
-      "selectValue":"10001,10002,10003",
-      "selectValueName":"欠费催缴,停电通知,停水通知",
-      "limit":"num",
+      "selectValue":"building_room_attr",
+      "selectValueName":"房屋属性",
+      "limit":"",
       "limitParam":"",
       "limitErrInfo":"模板格式错误",
       "show": true
     },
     {
-      "code": "smsTemplateId",
-      "cnCode":"微信模板ID",
-      "desc":"必填,请填写微信模板ID",
+      "code": "specName",
+      "cnCode":"规格名称",
+      "desc":"必填,请填写规格名称",
       "required":true,
       "hasDefaultValue":false,
       "inputType": "input",
       "limit":"maxLength",
       "limitParam":"64",
-      "limitErrInfo":"微信模板ID太长",
+      "limitErrInfo":"规格名称太长",
       "show": true
     },
     {
-      "code": "remark",
+      "code": "specHoldplace",
       "cnCode":"说明",
       "desc":"选填,请填写说明",
       "required":false,
       "hasDefaultValue":false,
       "inputType": "input",
       "limit":"maxLength",
-      "limitParam":"500",
+      "limitParam":"200",
       "limitErrInfo":"说明不能超过500位",
       "show": false
+    },
+    {
+      "code":"required",
+      "cnCode":"必填",
+      "desc":"必填,请选择是否必填",
+      "required":true,
+      "hasDefaultValue":false,
+      "inputType": "select",
+      "selectValue":"Y,N",
+      "selectValueName":"是,否",
+      "limit":"",
+      "limitParam":"",
+      "limitErrInfo":"模板格式错误",
+      "show": true
+    },
+    {
+      "code":"specShow",
+      "cnCode":"展示",
+      "desc":"必填,请选择是否添加编辑时展示",
+      "required":true,
+      "hasDefaultValue":false,
+      "inputType": "select",
+      "selectValue":"Y,N",
+      "selectValueName":"是,否",
+      "limit":"",
+      "limitParam":"",
+      "limitErrInfo":"模板格式错误",
+      "show": true
+    },
+    {
+      "code":"specValueType",
+      "cnCode":"值类型",
+      "desc":"必填,请选择值类型",
+      "required":true,
+      "hasDefaultValue":false,
+      "inputType": "select",
+      "selectValue":"1001,2002,3003",
+      "selectValueName":"字符串,整数,金额",
+      "limit":"num",
+      "limitParam":"",
+      "limitErrInfo":"值类型格式错误",
+      "show": true
+    },
+    {
+      "code":"specType",
+      "cnCode":"规格类型",
+      "desc":"必填,请选择规格类型",
+      "required":true,
+      "hasDefaultValue":false,
+      "inputType": "select",
+      "selectValue":"2233,3344",
+      "selectValueName":"input,select",
+      "limit":"num",
+      "limitParam":"",
+      "limitErrInfo":"规格类型错误",
+      "show": true
+    }
+  ,
+    {
+      "code":"listShow",
+      "cnCode":"查询显示",
+      "desc":"必填,请选择查询显示",
+      "required":true,
+      "hasDefaultValue":false,
+      "inputType": "select",
+      "selectValue":"Y,N",
+      "selectValueName":"是,否",
+      "limit":"",
+      "limitParam":"",
+      "limitErrInfo":"规格类型错误",
+      "show": true
     }
   ]
 }

+ 71 - 0
java110-generator/src/main/resources/web/template_wechatSmsTemplate.json

@@ -0,0 +1,71 @@
+{
+  "templateName":"微信模板",
+  "directories": "property",
+  "templateCode":"wechatSmsTemplate",
+  "templateKey":"templateId",
+  "templateKeyName":"ID",
+  "searchCode": "templateId",
+  "searchName": "ID",
+  "conditions": [
+    {
+      "name": "微信模板ID",
+      "inputType": "input",
+      "code": "smsTemplateId",
+      "whereCondition": "equal"
+    },
+    {
+      "name": "模板类型",
+      "inputType": "select",
+      "selectValue":"10001,10002,10003",
+      "selectValueName":"欠费催缴,停电通知,停水通知",
+      "code": "templateType",
+      "whereCondition": "equal"
+    },
+    {
+      "name": "模板编码",
+      "inputType": "input",
+      "code": "templateId",
+      "whereCondition": "equal"
+    }
+  ],
+  "columns":[
+    {
+      "code":"templateType",
+      "cnCode":"模板类型",
+      "desc":"必填,请填写模板类型",
+      "required":true,
+      "hasDefaultValue":false,
+      "inputType": "select",
+      "selectValue":"10001,10002,10003",
+      "selectValueName":"欠费催缴,停电通知,停水通知",
+      "limit":"num",
+      "limitParam":"",
+      "limitErrInfo":"模板格式错误",
+      "show": true
+    },
+    {
+      "code": "smsTemplateId",
+      "cnCode":"微信模板ID",
+      "desc":"必填,请填写微信模板ID",
+      "required":true,
+      "hasDefaultValue":false,
+      "inputType": "input",
+      "limit":"maxLength",
+      "limitParam":"64",
+      "limitErrInfo":"微信模板ID太长",
+      "show": true
+    },
+    {
+      "code": "remark",
+      "cnCode":"说明",
+      "desc":"选填,请填写说明",
+      "required":false,
+      "hasDefaultValue":false,
+      "inputType": "input",
+      "limit":"maxLength",
+      "limitParam":"500",
+      "limitErrInfo":"说明不能超过500位",
+      "show": false
+    }
+  ]
+}

+ 1 - 1
service-common/src/main/java/com/java110/common/api/AttrSpecApi.java

@@ -113,7 +113,7 @@ public class AttrSpecApi {
      * @path /app/attrSpec/queryAttrSpec
      */
     @RequestMapping(value = "/queryAttrSpec", method = RequestMethod.GET)
-    public ResponseEntity<String> queryAttrSpec(@RequestParam(value = "tableName") String tableName) {
+    public ResponseEntity<String> queryAttrSpec(@RequestParam(value = "tableName",required = false) String tableName) {
         AttrSpecDto attrSpecDto = new AttrSpecDto();
         attrSpecDto.setTableName(tableName);
         return getAttrSpecBMOImpl.get(attrSpecDto);