Sfoglia il codice sorgente

保存小区单元时 因为remark字段影响 故 重新new一个FloorDto 对象 不做对象转换方式

wuxw 7 anni fa
parent
commit
5adbf31cec

+ 4 - 1
Api/src/main/java/com/java110/api/listener/unit/SaveUnitListener.java

@@ -127,8 +127,11 @@ public class SaveUnitListener extends AbstractServiceApiDataFlowListener {
             throw new IllegalArgumentException("是否有电梯 传入数据错误");
         }
 
+        FloorDto floorDto = new FloorDto();
+        floorDto.setCommunityId(reqJson.getString("communityId"));
+        floorDto.setFloorId(reqJson.getString("floorId"));
         //校验小区楼ID和小区是否有对应关系
-        int total = floorInnerServiceSMOImpl.queryFloorsCount(BeanConvertUtil.covertBean(reqJson, FloorDto.class));
+        int total = floorInnerServiceSMOImpl.queryFloorsCount(floorDto);
 
         if (total < 1) {
             throw new IllegalArgumentException("传入小区楼ID不是该小区的楼");

+ 2 - 2
WebService/src/main/resources/components/add-unit/addUnit.js

@@ -37,7 +37,7 @@
                                 {
                                     limit:"required",
                                     param:"",
-                                    errInfo:"单元不能为空"
+                                    errInfo:"单元编号不能为空"
                                 },
                                 {
                                     limit:"maxLength",
@@ -75,7 +75,7 @@
                         });
              },
             addUnit:function(){
-                if(!vc.component.addStaffValidate()){
+                if(!vc.component.addUnitValidate()){
                     vc.message(vc.validate.errInfo);
                     return ;
                 }