java110 5 роки тому
батько
коміт
362a984716

+ 31 - 35
java110-generator/src/main/resources/web/template_1.json

@@ -1,70 +1,66 @@
 {
-  "templateName": "仓库",
-  "directories": "property",
-  "templateCode": "storehouse",
-  "templateKey": "shId",
-  "templateKeyName": "仓库编号",
-  "searchCode": "shId",
-  "searchName": "仓库编号",
+  "templateName": "合同甲方",
+  "directories": "admin",
+  "templateCode": "contractPartya",
+  "templateKey": "partyaId",
+  "templateKeyName": "甲方编号",
+  "searchCode": "partyaId",
+  "searchName": "甲方编号",
   "conditions": [
     {
-      "name": "仓库名称",
+      "name": "甲方",
       "inputType": "input",
-      "code": "shName",
+      "code": "partyA",
       "whereCondition": "equal"
     },
     {
-      "name": "仓库类型",
-      "inputType": "select",
-      "selectValue": "2806,2807",
-      "selectValueName": "集团仓库,小区仓库",
-      "code": "shType",
+      "name": "甲方联系人",
+      "inputType": "input",
+      "code": "aContacts",
       "whereCondition": "equal"
     },
     {
-      "name": "仓库编号",
+      "name": "联系电话",
       "inputType": "input",
-      "code": "shId",
+      "code": "aLink",
       "whereCondition": "equal"
     }
   ],
   "columns": [
     {
-      "code": "shName",
-      "cnCode": "仓库名称",
-      "desc": "必填,请填写仓库名称",
+      "code": "partyA",
+      "cnCode": "甲方",
+      "desc": "必填,请填写甲方",
       "required": true,
       "hasDefaultValue": false,
       "inputType": "input",
       "limit": "maxLength",
-      "limitParam": "64",
-      "limitErrInfo": "仓库名称太长",
+      "limitParam": "200",
+      "limitErrInfo": "甲方太长",
       "show": true
     },
     {
-      "code": "shType",
-      "cnCode": "仓库类型",
-      "desc": "必填,请选择仓库类型",
+      "code": "aContacts",
+      "cnCode": "甲方联系人",
+      "desc": "必填,请填写甲方联系人",
       "required": true,
       "hasDefaultValue": false,
-      "inputType": "select",
-      "selectValue": "2806,2807",
-      "selectValueName": "集团仓库,小区仓库",
-      "limit": "num",
-      "limitParam": "",
+      "inputType": "input",
+      "limit": "maxLength",
+      "limitParam": "64",
       "limitErrInfo": "仓库类型格式错误",
       "show": true
     },
     {
-      "code": "shDesc",
-      "cnCode": "描述",
-      "desc": "必填,请填写描述",
+      "code": "aLink",
+      "cnCode": "联系电话",
+      "desc": "必填,请填写联系电话",
       "required": true,
       "hasDefaultValue": false,
       "inputType": "input",
-      "limit": "maxLength",
-      "limitParam": "512",
-      "limitErrInfo": "描述太长",
+      "limit": "phone",
+      "limitParam": "",
+      "limitErrInfo": "联系电话格式错误",
       "show": true
     }
   ]

+ 11 - 3
service-store/src/main/java/com/java110/store/api/ContractPartyaApi.java

@@ -36,7 +36,8 @@ public class ContractPartyaApi {
      * @path /app/contractPartya/saveContractPartya
      */
     @RequestMapping(value = "/saveContractPartya", method = RequestMethod.POST)
-    public ResponseEntity<String> saveContractPartya(@RequestBody JSONObject reqJson) {
+    public ResponseEntity<String> saveContractPartya(@RequestHeader(value = "store-id") String storeId,
+                                                     @RequestBody JSONObject reqJson) {
 
         Assert.hasKeyAndValue(reqJson, "partyA", "请求报文中未包含partyA");
         Assert.hasKeyAndValue(reqJson, "aContacts", "请求报文中未包含aContacts");
@@ -44,6 +45,8 @@ public class ContractPartyaApi {
 
 
         ContractPartyaPo contractPartyaPo = BeanConvertUtil.covertBean(reqJson, ContractPartyaPo.class);
+        contractPartyaPo.setStoreId(storeId);
+
         return saveContractPartyaBMOImpl.save(contractPartyaPo);
     }
 
@@ -56,7 +59,8 @@ public class ContractPartyaApi {
      * @path /app/contractPartya/updateContractPartya
      */
     @RequestMapping(value = "/updateContractPartya", method = RequestMethod.POST)
-    public ResponseEntity<String> updateContractPartya(@RequestBody JSONObject reqJson) {
+    public ResponseEntity<String> updateContractPartya(@RequestHeader(value = "store-id") String storeId,
+                                                       @RequestBody JSONObject reqJson) {
 
         Assert.hasKeyAndValue(reqJson, "partyA", "请求报文中未包含partyA");
         Assert.hasKeyAndValue(reqJson, "aContacts", "请求报文中未包含aContacts");
@@ -65,6 +69,8 @@ public class ContractPartyaApi {
 
 
         ContractPartyaPo contractPartyaPo = BeanConvertUtil.covertBean(reqJson, ContractPartyaPo.class);
+        contractPartyaPo.setStoreId(storeId);
+
         return updateContractPartyaBMOImpl.update(contractPartyaPo);
     }
 
@@ -77,13 +83,15 @@ public class ContractPartyaApi {
      * @path /app/contractPartya/deleteContractPartya
      */
     @RequestMapping(value = "/deleteContractPartya", method = RequestMethod.POST)
-    public ResponseEntity<String> deleteContractPartya(@RequestBody JSONObject reqJson) {
+    public ResponseEntity<String> deleteContractPartya(@RequestHeader(value = "store-id") String storeId,
+                                                       @RequestBody JSONObject reqJson) {
         Assert.hasKeyAndValue(reqJson, "communityId", "小区ID不能为空");
 
         Assert.hasKeyAndValue(reqJson, "partyaId", "partyaId不能为空");
 
 
         ContractPartyaPo contractPartyaPo = BeanConvertUtil.covertBean(reqJson, ContractPartyaPo.class);
+        contractPartyaPo.setStoreId(storeId);
         return deleteContractPartyaBMOImpl.delete(contractPartyaPo);
     }