Переглянути джерело

Merge branch 'master' of http://git.homecommunity.cn/supervip/MicroCommunity

java110 4 роки тому
батько
коміт
6f51fa826e
15 змінених файлів з 269 додано та 159 видалено
  1. 0 16
      java110-bean/src/main/java/com/java110/dto/RoomDto.java
  2. 0 17
      java110-bean/src/main/java/com/java110/po/room/RoomPo.java
  3. 21 93
      java110-db/src/main/resources/mapper/community/RoomServiceDaoImplMapper.xml
  4. 5 3
      service-api/src/main/java/com/java110/api/listener/fee/SaveParkingSpaceCreateFeeListener.java
  5. 4 2
      service-api/src/main/java/com/java110/api/listener/ownerRepair/ListStaffFinishRepairsListener.java
  6. 2 1
      service-api/src/main/java/com/java110/api/listener/ownerRepair/SaveOwnerRepairListener.java
  7. 3 22
      service-api/src/main/java/com/java110/api/listener/returnPayFee/ListReturnPayFeesListener.java
  8. 10 1
      service-api/src/main/java/com/java110/api/listener/returnPayFee/UpdateReturnPayFeeListener.java
  9. 0 4
      service-community/src/main/java/com/java110/community/listener/room/AbstractRoomBusinessServiceDataFlowListener.java
  10. 13 0
      service-job/src/main/java/com/java110/job/adapt/hcGov/HcGovConstant.java
  11. 1 0
      service-job/src/main/java/com/java110/job/adapt/hcGov/asyn/BaseHcGovSendAsyn.java
  12. 1 0
      service-job/src/main/java/com/java110/job/adapt/hcGov/asyn/impl/BaseHcGovSendAsynImpl.java
  13. 4 0
      service-job/src/main/java/com/java110/job/adapt/hcGov/room/AddRoomToHcGovAdapt.java
  14. 1 0
      service-job/src/main/java/com/java110/job/adapt/hcGov/room/EditRoomToHcGovAdapt.java
  15. 204 0
      service-job/src/main/java/com/java110/job/adapt/hcGov/staff/AddStaffToHcGovAdapt.java

+ 0 - 16
java110-bean/src/main/java/com/java110/dto/RoomDto.java

@@ -71,8 +71,6 @@ public class RoomDto extends PageDto implements Serializable {
 
     private Date createTime;
 
-    private String startTime;
-    private String endTime;
 
     private String statusCd = "0";
 
@@ -366,19 +364,5 @@ public class RoomDto extends PageDto implements Serializable {
         this.roomSubTypeName = roomSubTypeName;
     }
 
-    public String getStartTime() {
-        return startTime;
-    }
-
-    public void setStartTime(String startTime) {
-        this.startTime = startTime;
-    }
 
-    public String getEndTime() {
-        return endTime;
-    }
-
-    public void setEndTime(String endTime) {
-        this.endTime = endTime;
-    }
 }

+ 0 - 17
java110-bean/src/main/java/com/java110/po/room/RoomPo.java

@@ -30,8 +30,6 @@ public class RoomPo implements Serializable {
     private String roomSubType;
     private String roomRent;
     private String roomArea;
-    private String startTime;
-    private String endTime;
 
     public String getRoomId() {
         return roomId;
@@ -169,19 +167,4 @@ public class RoomPo implements Serializable {
         this.roomArea = roomArea;
     }
 
-    public String getStartTime() {
-        return startTime;
-    }
-
-    public void setStartTime(String startTime) {
-        this.startTime = startTime;
-    }
-
-    public String getEndTime() {
-        return endTime;
-    }
-
-    public void setEndTime(String endTime) {
-        this.endTime = endTime;
-    }
 }

+ 21 - 93
java110-db/src/main/resources/mapper/community/RoomServiceDaoImplMapper.xml

@@ -8,10 +8,10 @@
     <insert id="saveBusinessRoomInfo" parameterType="Map">
         insert into business_building_room(
         fee_coefficient,section,remark,user_id,room_id,layer,built_up_area,operate,room_num,unit_id,b_id,apartment,state,community_id,
-        room_type,room_sub_type,room_rent,room_area,start_time,end_time
+        room_type,room_sub_type,room_rent,room_area
         ) values (
         #{feeCoefficient},#{section},#{remark},#{userId},#{roomId},#{layer},#{builtUpArea},#{operate},#{roomNum},#{unitId},#{bId},#{apartment},#{state},
-        #{communityId},#{roomType},#{roomSubType},#{roomRent},#{roomArea},#{startTime},#{endTime}
+        #{communityId},#{roomType},#{roomSubType},#{roomRent},#{roomArea}
         )
     </insert>
 
@@ -24,7 +24,7 @@
         roomNum,t.unit_id,t.unit_id unitId,t.b_id,t.b_id bId,t.apartment,t.state,t.community_id,t.community_id
         communityId,t.room_type,t.room_type roomType,t.room_sub_type,t.room_rent,t.room_area,t.room_sub_type
         roomSubType,
-        t.room_rent roomRent,t.room_area roomArea,t.start_time,t.start_time startTime,t.end_time,t.end_time endTime
+        t.room_rent roomRent,t.room_area roomArea
         from business_building_room t
         where 1 =1
         <if test="feeCoefficient !=null and feeCoefficient != ''">
@@ -75,12 +75,7 @@
         <if test="communityId !=null and communityId != ''">
             and t.community_id= #{communityId}
         </if>
-        <if test="startTime !=null">
-            and t.start_time= #{startTime}
-        </if>
-        <if test="endTime !=null">
-            and t.end_time= #{endTime}
-        </if>
+
     </select>
 
 
@@ -88,10 +83,10 @@
     <insert id="saveRoomInfoInstance" parameterType="Map">
         insert into building_room(
         fee_coefficient,section,status_cd,remark,user_id,room_id,layer,built_up_area,room_num,unit_id,b_id,apartment,state,community_id,
-        room_type,room_sub_type,room_rent,room_area,start_time,end_time
+        room_type,room_sub_type,room_rent,room_area
         ) select
         t.fee_coefficient,t.section,'0',t.remark,t.user_id,t.room_id,t.layer,t.built_up_area,t.room_num,t.unit_id,t.b_id,t.apartment,t.state,t.community_id,
-        t.room_type,t.room_sub_type,t.room_rent,t.room_area,t.start_time,t.end_time
+        t.room_type,t.room_sub_type,t.room_rent,t.room_area
         from business_building_room t where 1=1
         <if test="feeCoefficient !=null and feeCoefficient != ''">
             and t.fee_coefficient= #{feeCoefficient}
@@ -139,12 +134,6 @@
         <if test="communityId !=null and communityId != ''">
             and t.community_id= #{communityId}
         </if>
-        <if test="startTime !=null">
-            and t.start_time= #{startTime}
-        </if>
-        <if test="endTime !=null">
-            and t.end_time= #{endTime}
-        </if>
     </insert>
 
     <!-- 查询小区房屋信息 add by wuxw 2018-07-03 -->
@@ -153,8 +142,7 @@
         statusCd,t.remark,t.user_id,t.user_id userId,t.room_id,t.room_id roomId,t.layer,t.built_up_area,t.built_up_area
         builtUpArea,t.room_num,t.room_num roomNum,t.unit_id,t.unit_id unitId,t.b_id,t.b_id
         bId,t.apartment,t.state,t.community_id,t.community_id communityId,t.room_type,t.room_type roomType,
-        t.room_sub_type,t.room_rent,t.room_area,t.room_sub_type roomSubType,t.room_rent roomRent,t.room_area roomArea,
-        t.start_time,t.start_time startTime,t.end_time,t.end_time endTime
+        t.room_sub_type,t.room_rent,t.room_area,t.room_sub_type roomSubType,t.room_rent roomRent,t.room_area roomArea
         from building_room t
         where 1 =1
         <if test="feeCoefficient !=null and feeCoefficient != ''">
@@ -211,12 +199,7 @@
         <if test="communityId !=null and communityId != ''">
             and t.community_id= #{communityId}
         </if>
-        <if test="startTime !=null">
-            and t.start_time= #{startTime}
-        </if>
-        <if test="endTime !=null">
-            and t.end_time= #{endTime}
-        </if>
+
         order by t.create_time desc
         <if test="page != -1 and page != null">
             limit #{page},#{row}
@@ -268,12 +251,6 @@
         <if test="roomArea !=null and roomArea != ''">
             , t.room_area= #{roomArea}
         </if>
-        <if test="startTime !=null">
-            , t.start_time= #{startTime}
-        </if>
-        <if test="endTime !=null">
-            , t.end_time= #{endTime}
-        </if>
         where 1=1
         <if test="roomId !=null and roomId != ''">
             and t.room_id= #{roomId}
@@ -339,12 +316,7 @@
         <if test="roomSubType !=null and roomSubType != ''">
             and t.room_sub_type= #{roomSubType}
         </if>
-        <if test="startTime !=null">
-            and t.start_time= #{startTime}
-        </if>
-        <if test="endTime !=null">
-            and t.end_time= #{endTime}
-        </if>
+        
     </select>
 
     <!-- 查询小区房屋数量 add by wuxw 2018-07-03 -->
@@ -418,12 +390,7 @@
         <if test="unitNum !=null and unitNum != ''">
             and u.unit_num= #{unitNum}
         </if>
-        <if test="startTime !=null">
-            and t.start_time= #{startTime}
-        </if>
-        <if test="endTime !=null">
-            and t.end_time= #{endTime}
-        </if>
+      
     </select>
 
     <!-- 查询小区房屋数量 add by wuxw 2018-07-03 -->
@@ -489,12 +456,6 @@
         <if test="communityId !=null and communityId != ''">
             and t.community_id= #{communityId}
         </if>
-        <if test="startTime !=null">
-            and t.start_time= #{startTime}
-        </if>
-        <if test="endTime !=null">
-            and t.end_time= #{endTime}
-        </if>
         and borr.`room_id` is null
     </select>
 
@@ -561,12 +522,6 @@
         <if test="communityId !=null and communityId != ''">
             and t.community_id= #{communityId}
         </if>
-        <if test="startTime !=null">
-            and t.start_time= #{startTime}
-        </if>
-        <if test="endTime !=null">
-            and t.end_time= #{endTime}
-        </if>
         AND borr.`room_id` is not null
     </select>
 
@@ -578,7 +533,7 @@
         t.room_num roomNum,t.unit_id,t.unit_id unitId,t.b_id,t.b_id bId,t.apartment,t.state,u.`unit_num`
         unitNum,f.floor_num floorNum
         ,t.room_type roomType,t.room_type,t.room_sub_type,t.room_rent,t.room_area,t.room_sub_type
-        roomSubType,t.room_rent roomRent,t.room_area roomArea,t.start_time,t.start_time startTime,t.end_time,t.end_time endTime
+        roomSubType,t.room_rent roomRent,t.room_area roomArea
         FROM
         building_room t
         INNER JOIN building_unit u on t.`unit_id` = u.`unit_id` and u.`status_cd` = '0'
@@ -638,12 +593,7 @@
         <if test="communityId !=null and communityId != ''">
             and t.community_id= #{communityId}
         </if>
-        <if test="startTime !=null">
-            and t.start_time= #{startTime}
-        </if>
-        <if test="endTime !=null">
-            and t.end_time= #{endTime}
-        </if>
+        
         and borr.`room_id` is null
         <if test="page != -1 and page != null">
             limit #{page},#{row}
@@ -657,7 +607,7 @@
         t.user_id userId,t.room_id,t.room_id roomId,t.layer,t.built_up_area,t.built_up_area builtUpArea,t.room_num,
         t.room_num roomNum,t.unit_id,t.unit_id unitId,t.b_id,t.b_id bId,t.apartment,t.state,u.`unit_num` unitNum,
         t.room_type roomType,t.room_type,t.room_sub_type,t.room_rent,t.room_area,t.room_sub_type roomSubType,t.room_rent
-        roomRent,t.room_area roomArea,t.start_time,t.start_time startTime,t.end_time,t.end_time endTime
+        roomRent,t.room_area roomArea
         FROM
         building_room t
         INNER JOIN building_unit u on t.`unit_id` = u.`unit_id` and u.`status_cd` = '0'
@@ -717,12 +667,6 @@
         <if test="communityId !=null and communityId != ''">
             and t.community_id= #{communityId}
         </if>
-        <if test="startTime !=null">
-            and t.start_time= #{startTime}
-        </if>
-        <if test="endTime !=null">
-            and t.end_time= #{endTime}
-        </if>
         AND borr.`room_id` is not null
         <if test="page != -1 and page != null">
             limit #{page},#{row}
@@ -737,8 +681,8 @@
         t.room_num roomNum,t.unit_id,t.unit_id unitId,t.b_id,t.b_id bId,t.apartment,t.state,u.`unit_num` unitNum,
         u.unit_id unitId,f.floor_id floorId,f.floor_num floorNum,f.floor_area floorArea,u.unit_area unitArea,td.name
         stateName,t.room_type roomType,t.room_type,t.`community_id` communityId,td1.`name` roomSubTypeName
-        ,t.room_sub_type,t.room_rent,t.room_area,t.room_sub_type roomSubType,t.room_rent roomRent,t.room_area roomArea,
-        t.start_time,t.start_time startTime,t.end_time,t.end_time endTime
+        ,t.room_sub_type,t.room_rent,t.room_area,t.room_sub_type roomSubType,t.room_rent roomRent,t.room_area roomArea
+
         FROM building_room t
         inner join building_unit u on t.`unit_id` = u.`unit_id` and u.`status_cd` = '0'
         inner JOIN f_floor f on u.`floor_id` = f.`floor_id` AND f.`community_id` = t.`community_id` AND f.`status_cd` =
@@ -822,12 +766,7 @@
         <if test="communityId !=null and communityId != ''">
             and t.community_id= #{communityId}
         </if>
-        <if test="startTime !=null">
-            and t.start_time= #{startTime}
-        </if>
-        <if test="endTime !=null">
-            and t.end_time= #{endTime}
-        </if>
+
         order by f.floor_num ,u.unit_num,t.room_num
         <if test="page != -1 and page != null">
             limit #{page},#{row}
@@ -842,8 +781,8 @@
         t.user_id userId,t.room_id,t.room_id roomId,t.layer,t.built_up_area,t.built_up_area builtUpArea,t.room_num,
         t.room_num roomNum,t.unit_id,t.unit_id unitId,t.b_id,t.b_id bId,t.apartment,t.state,u.`unit_num`
         unitNum,f.`floor_num` floorNum,t.room_type roomType,t.room_type,f.floor_id floorId
-        ,t.room_sub_type,t.room_rent,t.room_area,t.room_sub_type roomSubType,t.room_rent roomRent,t.room_area roomArea,
-        t.start_time,t.start_time startTime,t.end_time ,t.end_time endTime
+        ,t.room_sub_type,t.room_rent,t.room_area,t.room_sub_type roomSubType,t.room_rent roomRent,t.room_area roomArea
+
         FROM
         building_owner bo,building_room t,building_owner_room_rel borr,building_unit u,f_floor f
         WHERE
@@ -898,12 +837,7 @@
         <if test="ownerTypeCd !=null and ownerTypeCd != ''">
             and bo.owner_type_cd= #{ownerTypeCd}
         </if>
-        <if test="startTime !=null">
-            and t.start_time= #{startTime}
-        </if>
-        <if test="endTime !=null">
-            and t.end_time= #{endTime}
-        </if>
+
     </select>
 
     <!-- 查询小区房屋信息 add by wuxw 2018-07-03 -->
@@ -913,8 +847,8 @@
         t.user_id userId,t.room_id,t.room_id roomId,t.layer,t.built_up_area,t.built_up_area builtUpArea,t.room_num,
         t.room_num roomNum,t.unit_id,t.unit_id unitId,t.b_id,t.b_id bId,t.apartment,t.state,u.`unit_num` unitNum,
         t.room_type roomType,t.room_type,f.floor_num floorNum
-        ,t.room_sub_type,t.room_rent,t.room_area,t.room_sub_type roomSubType,t.room_rent roomRent,t.room_area roomArea,
-        t.start_time,t.start_time startTime,t.end_time,t.end_time endTime
+        ,t.room_sub_type,t.room_rent,t.room_area,t.room_sub_type roomSubType,t.room_rent roomRent,t.room_area roomArea
+
         FROM
         building_room t
         INNER JOIN building_unit u on t.`unit_id` = u.`unit_id` and u.`status_cd` = '0'
@@ -957,12 +891,6 @@
         <if test="communityId !=null and communityId != ''">
             and t.community_id= #{communityId}
         </if>
-        <if test="startTime !=null">
-            and t.start_time= #{startTime}
-        </if>
-        <if test="endTime !=null">
-            and t.end_time= #{endTime}
-        </if>
         <if test="page != -1 and page != null">
             limit #{page},#{row}
         </if>

+ 5 - 3
service-api/src/main/java/com/java110/api/listener/fee/SaveParkingSpaceCreateFeeListener.java

@@ -113,9 +113,11 @@ public class SaveParkingSpaceCreateFeeListener extends AbstractServiceApiListene
         OwnerCarDto ownerCarDto = new OwnerCarDto();
 
         if ("1000".equals(reqJson.getString("locationTypeCd"))) {//小区
-            ownerCarDto.setCommunityId(reqJson.getString("communityId"));
-            ownerCarDto.setValid("1");
-            ownerCarDtos = ownerCarInnerServiceSMOImpl.queryOwnerCars(ownerCarDto);
+//            ownerCarDto.setCommunityId(reqJson.getString("communityId"));
+//            ownerCarDto.setValid("1");
+//            ownerCarDtos = ownerCarInnerServiceSMOImpl.queryOwnerCars(ownerCarDto);
+            reqJson.put("locationObjId","");//刷成空
+            ownerCarDtos = getOwnerCarByParkingArea(reqJson);
         } else if ("2000".equals(reqJson.getString("locationTypeCd"))) {//车辆
             //ParkingSpaceDto parkingSpaceDto = new ParkingSpaceDto();
             ownerCarDto.setCarTypeCd("1001"); //1001 业主车辆   1002 成员车辆

+ 4 - 2
service-api/src/main/java/com/java110/api/listener/ownerRepair/ListStaffFinishRepairsListener.java

@@ -78,12 +78,14 @@ public class ListStaffFinishRepairsListener extends AbstractServiceApiListener {
         String userId = reqJson.getString("userId");
         String viewListStaffRepairs = MappingCache.getValue("viewListStaffRepairs");
         List<Map> privileges = null;
-//        if("ON".equals(viewListStaffRepairs)) {//是否让管理员看到所有工单
+        //这里加开关 其实让管理员看到所有单子这么做,不太优雅,建议 单独开发页面功能
+        // 不要影响已办功能,add by 吴学文 2021-09-09
+        if("ON".equals(viewListStaffRepairs)) {//是否让管理员看到所有工单
             BasePrivilegeDto basePrivilegeDto = new BasePrivilegeDto();
             basePrivilegeDto.setResource("/listStaffFinishRepairs");
             basePrivilegeDto.setUserId(userId);
             privileges = menuInnerServiceSMOImpl.checkUserHasResource(basePrivilegeDto);
-//        }
+        }
         if (privileges == null || privileges.size()==0) {
             ownerRepairDto.setStaffId(reqJson.getString("userId"));
         }

+ 2 - 1
service-api/src/main/java/com/java110/api/listener/ownerRepair/SaveOwnerRepairListener.java

@@ -26,6 +26,7 @@ import com.java110.utils.constant.ServiceCodeOwnerRepairConstant;
 import com.java110.utils.util.Assert;
 import com.java110.utils.util.BeanConvertUtil;
 import com.java110.utils.util.DateUtil;
+import com.java110.utils.util.StringUtil;
 import com.java110.vo.ResultVo;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -95,7 +96,7 @@ public class SaveOwnerRepairListener extends AbstractServiceApiPlusListener {
         List<FeeDto> feeDtos = feeInnerServiceSMOImpl.queryFees(feeDto);
         //取出开关映射的值(维修师傅未处理最大单数)
         String repairFeeNumber = MappingCache.getValue(DOMAIN_COMMON, REPAIR_FEE_NUMBER);
-        if (feeDtos != null && feeDtos.size() >= Integer.parseInt(repairFeeNumber)) {
+        if (feeDtos != null && StringUtil.isInteger(repairFeeNumber) && feeDtos.size() >= Integer.parseInt(repairFeeNumber)) {
             ResponseEntity<String> responseEntity = ResultVo.createResponseEntity(ResultVo.CODE_BUSINESS_VERIFICATION, "该房屋存在" + Integer.parseInt(repairFeeNumber) + "条未处理的费用,请缴费后再进行报修!");
             context.setResponseEntity(responseEntity);
             return;

+ 3 - 22
service-api/src/main/java/com/java110/api/listener/returnPayFee/ListReturnPayFeesListener.java

@@ -70,28 +70,9 @@ public class ListReturnPayFeesListener extends AbstractServiceApiListener {
         List<ApiReturnPayFeeDataVo> returnPayFees = new ArrayList<>();
 
         if (count > 0) {
-            List<ApiReturnPayFeeDataVo> apiReturnPayFeeDataVos = BeanConvertUtil.covertBeanList(returnPayFeeInnerServiceSMOImpl.queryReturnPayFees(returnPayFeeDto), ApiReturnPayFeeDataVo.class);
-            for (ApiReturnPayFeeDataVo apiReturnPayFeeDataVo : apiReturnPayFeeDataVos) {
-                //获取周期
-                String cycles = apiReturnPayFeeDataVo.getCycles();
-                if (!StringUtil.isEmpty(cycles) && cycles.contains("-")) {
-                    String substring = cycles.substring(1);
-                    apiReturnPayFeeDataVo.setCycles(substring);
-                }
-                //获取应收金额
-                String receivableAmount = apiReturnPayFeeDataVo.getReceivableAmount();
-                if (!StringUtil.isEmpty(receivableAmount) && receivableAmount.contains("-")) {
-                    String substring = receivableAmount.substring(1);
-                    apiReturnPayFeeDataVo.setReceivableAmount(substring);
-                }
-                //获取实收金额
-                String receivedAmount = apiReturnPayFeeDataVo.getReceivedAmount();
-                if (!StringUtil.isEmpty(receivedAmount) && receivedAmount.contains("-")) {
-                    String substring = receivedAmount.substring(1);
-                    apiReturnPayFeeDataVo.setReceivedAmount(substring);
-                }
-                returnPayFees.add(apiReturnPayFeeDataVo);
-            }
+            //注意这里处理 记得测试退费逻辑
+
+            returnPayFees = BeanConvertUtil.covertBeanList(returnPayFeeInnerServiceSMOImpl.queryReturnPayFees(returnPayFeeDto), ApiReturnPayFeeDataVo.class);
         } else {
             returnPayFees = new ArrayList<>();
         }

+ 10 - 1
service-api/src/main/java/com/java110/api/listener/returnPayFee/UpdateReturnPayFeeListener.java

@@ -17,6 +17,7 @@ import com.java110.intf.fee.IPayFeeDetailDiscountInnerServiceSMO;
 import com.java110.utils.constant.ServiceCodeReturnPayFeeConstant;
 import com.java110.utils.util.Assert;
 import com.java110.utils.util.DateUtil;
+import com.java110.utils.util.StringUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpMethod;
 
@@ -54,6 +55,13 @@ public class UpdateReturnPayFeeListener extends AbstractServiceApiPlusListener {
         Assert.hasKeyAndValue(reqJson, "state", "state不能为空");
         Assert.hasKeyAndValue(reqJson, "feeId", "feeId不能为空");
 
+        if(reqJson.containsKey("cycles")){
+            String cycles = reqJson.getString("cycles");
+            if(!cycles.startsWith("-")){
+                throw new IllegalArgumentException("退费周期必须负数");// 这里必须传入负数,否则费用自动相加不会退费
+            }
+        }
+
         FeeDetailDto feeDetailDto = new FeeDetailDto();
         feeDetailDto.setDetailId(reqJson.getString("detailId"));
         feeDetailDto.setFeeId(reqJson.getString("feeId"));
@@ -71,13 +79,14 @@ public class UpdateReturnPayFeeListener extends AbstractServiceApiPlusListener {
 
         //退费审核通过
         if ("1100".equals(reqJson.getString("state"))) {
+            //判断退费周期是否为负数如果不是 抛出异常
+            String cycles = reqJson.getString("cycles");
             reqJson.put("state", "1300");
             reqJson.put("startTime", DateUtil.getFormatTimeString(feeDetailDto.getStartTime(), DateUtil.DATE_FORMATE_STRING_A));
             reqJson.put("endTime", DateUtil.getFormatTimeString(feeDetailDto.getEndTime(), DateUtil.DATE_FORMATE_STRING_A));
             returnPayFeeBMOImpl.addFeeDetail(reqJson, context);
 
             reqJson.put("state", "1100");
-            String cycles = (String) reqJson.get("cycles");
             String receivableAmount = (String) reqJson.get("receivableAmount");
             String receivedAmount = (String) reqJson.get("receivedAmount");
             reqJson.put("cycles", unum(cycles));

+ 0 - 4
service-community/src/main/java/com/java110/community/listener/room/AbstractRoomBusinessServiceDataFlowListener.java

@@ -54,8 +54,6 @@ public abstract class AbstractRoomBusinessServiceDataFlowListener extends Abstra
         businessRoomInfo.put("roomSubType", businessRoomInfo.get("room_sub_type"));
         businessRoomInfo.put("roomRent", businessRoomInfo.get("room_rent"));
         businessRoomInfo.put("roomArea", businessRoomInfo.get("room_area"));
-        businessRoomInfo.put("startTime", businessRoomInfo.get("start_time"));
-        businessRoomInfo.put("endTime", businessRoomInfo.get("end_time"));
         businessRoomInfo.remove("bId");
         businessRoomInfo.put("statusCd", statusCd);
     }
@@ -97,8 +95,6 @@ public abstract class AbstractRoomBusinessServiceDataFlowListener extends Abstra
         currentRoomInfo.put("roomSubType", currentRoomInfo.get("room_sub_type"));
         currentRoomInfo.put("roomRent", currentRoomInfo.get("room_rent"));
         currentRoomInfo.put("roomArea", currentRoomInfo.get("room_area"));
-        currentRoomInfo.put("startTime", currentRoomInfo.get("start_time"));
-        currentRoomInfo.put("endTime", currentRoomInfo.get("end_time"));
 
         currentRoomInfo.put("operate", StatusConstant.OPERATE_DEL);
         getRoomServiceDaoImpl().saveBusinessRoomInfo(currentRoomInfo);

+ 13 - 0
service-job/src/main/java/com/java110/job/adapt/hcGov/HcGovConstant.java

@@ -53,6 +53,13 @@ public class HcGovConstant {
     //修改业主
     public static final String EDIT_OWNER_ACTION = "EDIT_OWNER";
 
+    //添加员工
+    public static final String ADD_STAFF_ACTION = "ADD_STAFF";
+    //修改员工
+    public static final String EDIT_STAFF_ACTION = "EDIT_STAFF";
+    //添加商户company
+    public static final String ADD_COMPANY_ACTION = "ADD_COMPANY";
+
     //添加位置
     public static final String ADD_LOCATION_ACTION = "ADD_LOCATION";
     //修改位置
@@ -67,4 +74,10 @@ public class HcGovConstant {
         header.put("sign",newSign);
     }
 
+    //商户属性编码
+    public static final String STORE_ATTR_ARTIFICIALPERSON = "100201903001"; //企业法人
+    public static final String STORE_ATTR_REGISTERTIME = "100201903003"; //成立日期
+    public static final String STORE_ATTR_IDCARD = "100201903004"; //营业执照
+
+
 }

+ 1 - 0
service-job/src/main/java/com/java110/job/adapt/hcGov/asyn/BaseHcGovSendAsyn.java

@@ -1,5 +1,6 @@
 package com.java110.job.adapt.hcGov.asyn;
 
+import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 
 public interface BaseHcGovSendAsyn {

+ 1 - 0
service-job/src/main/java/com/java110/job/adapt/hcGov/asyn/impl/BaseHcGovSendAsynImpl.java

@@ -1,5 +1,6 @@
 package com.java110.job.adapt.hcGov.asyn.impl;
 
+import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.java110.core.factory.GenerateCodeFactory;
 import com.java110.dto.reportData.ReportDataHeaderDto;

+ 4 - 0
service-job/src/main/java/com/java110/job/adapt/hcGov/room/AddRoomToHcGovAdapt.java

@@ -32,6 +32,7 @@ import com.java110.job.adapt.DatabusAdaptImpl;
 import com.java110.job.adapt.hcGov.HcGovConstant;
 import com.java110.job.adapt.hcGov.asyn.BaseHcGovSendAsyn;
 import com.java110.po.floor.FloorPo;
+import com.java110.po.owner.OwnerPo;
 import com.java110.po.room.RoomPo;
 import com.java110.utils.cache.MappingCache;
 import com.java110.utils.util.Assert;
@@ -99,16 +100,19 @@ public class AddRoomToHcGovAdapt extends DatabusAdaptImpl {
         roomDto.setCommunityId( roomPo.getCommunityId() );
         List<RoomDto>  roomDtos = roomInnerServiceSMOImpl.queryRooms( roomDto );
         Assert.listNotNull(roomDtos, "未查询到房屋信息");
+        roomPo = BeanConvertUtil.covertBean(roomDtos.get(0), RoomPo.class);
 
         CommunityDto communityDto = new CommunityDto();
         communityDto.setCommunityId(roomPo.getCommunityId());
         List<CommunityDto> communityDtos = communityInnerServiceSMOImpl.queryCommunitys(communityDto);
         Assert.listNotNull(communityDtos, "未包含小区信息");
+
         UnitDto unitDto = new UnitDto();
         unitDto.setUnitId( roomPo.getUnitId() );
         unitDto.setCommunityId( roomPo.getCommunityId() );
         List<UnitDto>  unitDtos = unitInnerServiceSMOImpl.queryUnits( unitDto );
         Assert.listNotNull(unitDtos, "未包含单元信息");
+
         unitDto = new UnitDto();
         unitDto.setCommunityId( unitDtos.get( 0 ).getCommunityId() );
         unitDto.setFloorId( unitDtos.get( 0 ).getFloorId() );

+ 1 - 0
service-job/src/main/java/com/java110/job/adapt/hcGov/room/EditRoomToHcGovAdapt.java

@@ -108,6 +108,7 @@ public class EditRoomToHcGovAdapt extends DatabusAdaptImpl {
         unitDto.setCommunityId( roomPo.getCommunityId() );
         List<UnitDto>  unitDtos = unitInnerServiceSMOImpl.queryUnits( unitDto );
         Assert.listNotNull(unitDtos, "未包含单元信息");
+
         unitDto = new UnitDto();
         unitDto.setCommunityId( unitDtos.get( 0 ).getCommunityId() );
         unitDto.setFloorId( unitDtos.get( 0 ).getFloorId() );

+ 204 - 0
service-job/src/main/java/com/java110/job/adapt/hcGov/staff/AddStaffToHcGovAdapt.java

@@ -0,0 +1,204 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.job.adapt.hcGov.staff;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.java110.dto.CommunityMemberDto;
+import com.java110.dto.community.CommunityAttrDto;
+import com.java110.dto.community.CommunityDto;
+import com.java110.dto.org.OrgDto;
+import com.java110.dto.org.OrgStaffRelDto;
+import com.java110.dto.store.StoreAttrDto;
+import com.java110.dto.store.StoreUserDto;
+import com.java110.entity.order.Business;
+import com.java110.intf.community.ICommunityInnerServiceSMO;
+import com.java110.intf.store.IStoreAttrInnerServiceSMO;
+import com.java110.intf.store.IStoreInnerServiceSMO;
+import com.java110.intf.user.IOrgInnerServiceSMO;
+import com.java110.intf.user.IOrgStaffRelInnerServiceSMO;
+import com.java110.job.adapt.DatabusAdaptImpl;
+import com.java110.job.adapt.hcGov.HcGovConstant;
+import com.java110.job.adapt.hcGov.asyn.BaseHcGovSendAsyn;
+import com.java110.po.user.UserPo;
+import com.java110.utils.util.BeanConvertUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+/**
+ * 新增业主信息同步HC政务接口
+ * <p>
+ * 接口协议地址: https://gitee.com/java110/microCommunityInformation/tree/master/info-doc#1%E6%A5%BC%E6%A0%8B%E4%B8%8A%E4%BC%A0
+ *
+ * @desc add by 吴学文 16:20
+ */
+@Component(value = "addStaffToHcGovAdapt")
+public class AddStaffToHcGovAdapt extends DatabusAdaptImpl {
+
+    @Autowired
+    private ICommunityInnerServiceSMO communityInnerServiceSMOImpl;
+    @Autowired
+    private BaseHcGovSendAsyn baseHcGovSendAsynImpl;
+    @Autowired
+    private IStoreInnerServiceSMO storeInnerServiceSMOImpl;
+    @Autowired
+    private IStoreAttrInnerServiceSMO storeAttrInnerServiceSMOImpl;
+    @Autowired
+    private IOrgStaffRelInnerServiceSMO orgStaffRelInnerServiceSMOImpl;
+    @Autowired
+    private IOrgInnerServiceSMO orgInnerServiceSMOImpl;
+
+    /**
+     * @param business   当前处理业务
+     * @param businesses 所有业务信息
+     */
+    @Override
+    public void execute(Business business, List<Business> businesses) {
+        JSONObject data = business.getData();
+        if (data.containsKey(UserPo.class.getSimpleName())) {
+            Object bObj = data.get(UserPo.class.getSimpleName());
+            JSONArray businessUserPo = null;
+            if (bObj instanceof JSONObject) {
+                businessUserPo = new JSONArray();
+                businessUserPo.add(bObj);
+            } else if (bObj instanceof List) {
+                businessUserPo = JSONArray.parseArray(JSONObject.toJSONString(bObj));
+            } else {
+                businessUserPo = (JSONArray) bObj;
+            }
+            //JSONObject businessOwnerCar = data.getJSONObject("businessOwnerCar");
+            for (int bUserIndex = 0; bUserIndex < businessUserPo.size(); bUserIndex++) {
+                JSONObject businessUserCar = businessUserPo.getJSONObject(bUserIndex);
+                doAddUser(business, businessUserCar);
+
+            }
+        }
+    }
+
+    private void doAddUser(Business business, JSONObject businessUserCar) {
+
+        UserPo userPo = BeanConvertUtil.covertBean(businessUserCar, UserPo.class);
+        StoreUserDto storeUserDto = new StoreUserDto();
+        storeUserDto.setUserId(userPo.getUserId());
+        List<StoreUserDto> storeUserDtos = storeInnerServiceSMOImpl.getStoreUserInfo(storeUserDto);
+        if (storeUserDtos == null || storeUserDtos.size() < 1) {
+            return;
+        }
+        storeUserDto = storeUserDtos.get(0);
+        String artificialPerson = "";
+        String registerTime = "";
+        String idCard = "";
+        String SoreId = storeUserDto.getStoreId();
+        JSONObject companyInfo = new JSONObject();
+        JSONObject staffInfo = new JSONObject();
+        //查询商户属性 企业法人
+        StoreAttrDto storeAttrDto = new StoreAttrDto();
+        storeAttrDto.setStoreId(SoreId);
+        storeAttrDto.setSpecCd(HcGovConstant.STORE_ATTR_ARTIFICIALPERSON);
+        List<StoreAttrDto> storeAttrDtos = storeAttrInnerServiceSMOImpl.queryStoreAttrs(storeAttrDto);
+        if (storeAttrDtos != null && storeAttrDtos.size() > 0) {
+            artificialPerson = storeAttrDtos.get(0).getValue();
+        }
+        //查询商户属性 成立日期
+        storeAttrDto.setStoreId(SoreId);
+        storeAttrDto.setSpecCd(HcGovConstant.STORE_ATTR_REGISTERTIME);
+        storeAttrDtos = storeAttrInnerServiceSMOImpl.queryStoreAttrs(storeAttrDto);
+        if (storeAttrDtos != null && storeAttrDtos.size() > 0) {
+            registerTime = storeAttrDtos.get(0).getValue();
+        }
+        //查询商户属性 营业执照
+        storeAttrDto.setStoreId(SoreId);
+        storeAttrDto.setSpecCd(HcGovConstant.STORE_ATTR_IDCARD);
+        storeAttrDtos = storeAttrInnerServiceSMOImpl.queryStoreAttrs(storeAttrDto);
+        if (storeAttrDtos != null && storeAttrDtos.size() > 0) {
+            idCard = storeAttrDtos.get(0).getValue();
+        }
+        companyInfo.put("companyName", storeUserDto.getName());
+        companyInfo.put("companyType", "2002");
+        companyInfo.put("idCard", idCard);
+        companyInfo.put("artificialPerson", artificialPerson);
+        companyInfo.put("companyAddress", storeUserDto.getAddress());
+        companyInfo.put("registerTime", registerTime);
+        companyInfo.put("personName", artificialPerson);
+        companyInfo.put("personTel", storeUserDto.getTel());
+        companyInfo.put("personIdCard", idCard);
+
+        CommunityMemberDto communityMemberDto = new CommunityMemberDto();
+        communityMemberDto.setMemberId(SoreId);
+        List<CommunityMemberDto> communityMemberDtos = communityInnerServiceSMOImpl.getCommunityMembers(communityMemberDto);
+        JSONArray extCommunityId = new JSONArray();
+        //
+        getCommunityExtId(communityMemberDtos, extCommunityId);
+
+        if (extCommunityId == null || extCommunityId.size() < 1) {
+            return;
+        }
+        String orgName = "";
+        String relCd = "";
+        JSONObject body = new JSONObject();
+        staffInfo.put("PersonName", userPo.getName());
+        staffInfo.put("PersonTel", userPo.getTel());
+        staffInfo.put("PersonSex", userPo.getSex());
+        staffInfo.put("prePersonName", userPo.getName());
+
+        OrgStaffRelDto orgStaffRelDto = new OrgStaffRelDto();
+        orgStaffRelDto.setStaffId(userPo.getUserId());
+        List<OrgStaffRelDto> orgStaffRelDtos = orgStaffRelInnerServiceSMOImpl.queryOrgStaffRels(orgStaffRelDto);
+        if (orgStaffRelDtos != null || orgStaffRelDtos.size() > 0) {
+            OrgDto orgDto = new OrgDto();
+            orgDto.setOrgId(orgStaffRelDtos.get(0).getOrgId());
+            List<OrgDto> orgDtos = orgInnerServiceSMOImpl.queryOrgs(orgDto);
+            if (orgDtos != null || orgDtos.size() > 0) {
+                orgName = orgDtos.get(0).getOrgName();
+            }
+            relCd = orgStaffRelDtos.get(0).getRelCd();
+        }
+        staffInfo.put("govOrgName", orgName);
+        staffInfo.put("relCd", relCd);
+        body.put("companyInfo",companyInfo);
+        body.put("staffInfo",staffInfo);
+        JSONObject kafkaData = baseHcGovSendAsynImpl.createHeadersOrBody(body, extCommunityId.getString(0), HcGovConstant.ADD_OWNER_ACTION, HcGovConstant.COMMUNITY_SECURE);
+        baseHcGovSendAsynImpl.sendKafka(HcGovConstant.GOV_TOPIC, kafkaData, extCommunityId.getString(0), SoreId, HcGovConstant.COMMUNITY_SECURE);
+    }
+
+    public void getCommunityExtId(List<CommunityMemberDto> communityMemberDtos, JSONArray extCommunityId) {
+        if (communityMemberDtos == null || communityMemberDtos.size() == 0) {
+            return;
+        }
+        for (CommunityMemberDto communityMember : communityMemberDtos) {
+            CommunityDto communityDto = new CommunityDto();
+            communityDto.setCommunityId(communityMember.getCommunityId());
+            List<CommunityDto> communityDtos = communityInnerServiceSMOImpl.queryCommunitys(communityDto);
+            if (communityDtos == null || communityDtos.size() == 0) {
+                continue;
+            }
+            extracted(extCommunityId, communityDtos);
+        }
+    }
+
+    private void extracted(JSONArray extCommunityId, List<CommunityDto> communityDtos) {
+        for (CommunityDto community : communityDtos) {
+            for (CommunityAttrDto communityAttrDto : community.getCommunityAttrDtos()) {
+                if (HcGovConstant.EXT_COMMUNITY_ID.equals(communityAttrDto.getSpecCd())) {
+                    extCommunityId.add(communityAttrDto.getValue());
+                }
+            }
+        }
+    }
+
+}