Jelajahi Sumber

Merge remote-tracking branch 'origin/master'

LIVE_YE 4 bulan lalu
induk
melakukan
83f16759de

+ 28 - 11
ruoyi-common/src/main/java/com/ruoyi/common/utils/IdCardUtil.java

@@ -8,6 +8,7 @@ package com.ruoyi.common.utils;
 
 import cn.hutool.http.HttpUtil;
 import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONArray;
 import com.alibaba.fastjson2.JSONObject;
 import com.ruoyi.common.core.domain.AjaxResult;
 import okhttp3.*;
@@ -719,17 +720,33 @@ public class IdCardUtil {
             Map<String, Object> map = new HashMap<>(11);
             if (StringUtils.isNotEmpty(wordsResult)) {
                 JSONObject jsonObjectWordsResult = JSON.parseObject(wordsResult);
-                String ownerName = JSON.parseObject(jsonObjectWordsResult.getString("权利人")).getString("words");
-                String location = JSON.parseObject(jsonObjectWordsResult.getString("坐落")).getString("words");
-                String rightType = JSON.parseObject(jsonObjectWordsResult.getString("权利类型")).getString("words");
-                String area = JSON.parseObject(jsonObjectWordsResult.getString("面积")).getString("words");
-                String documentNumber = JSON.parseObject(jsonObjectWordsResult.getString("字第号")).getString("words");
-                String propertyUnitNumber = JSON.parseObject(jsonObjectWordsResult.getString("不动产单元号")).getString("words");
-                String coOwnership = JSON.parseObject(jsonObjectWordsResult.getString("共有情况")).getString("words");
-                String usageType = JSON.parseObject(jsonObjectWordsResult.getString("用途")).getString("words");
-                String usagePeriod = JSON.parseObject(jsonObjectWordsResult.getString("使用期限")).getString("words");
-                String registrationDate = JSON.parseObject(jsonObjectWordsResult.getString("登记日期")).getString("words");
-                String coOwner = JSON.parseObject(jsonObjectWordsResult.getString("共有人")).getString("words");
+
+                JSONArray ownerNameArray = JSON.parseArray(jsonObjectWordsResult.getString("权利人"));
+                String ownerName ="";
+                if (ownerNameArray != null && ownerNameArray.size() > 0){
+                    for (Object ownerNameResult : ownerNameArray) {
+                        ownerName = JSONObject.parseObject(ownerNameResult.toString()).getString("word")+",";
+
+                    }
+                }
+                ownerName=  ownerName.substring(0,ownerName.length()-1);
+                String location = JSON.parseArray(jsonObjectWordsResult.getString("坐落")).getJSONObject(0).getString("word");
+                String rightType = JSON.parseArray(jsonObjectWordsResult.getString("权利类型")).getJSONObject(0).getString("word");
+                String area = JSON.parseArray(jsonObjectWordsResult.getString("面积")).getJSONObject(0).getString("word");
+                String documentNumber = JSON.parseArray(jsonObjectWordsResult.getString("字第号")).getJSONObject(0).getString("word");
+                String propertyUnitNumber = JSON.parseArray(jsonObjectWordsResult.getString("不动产单元号")).getJSONObject(0).getString("word");
+                String coOwnership = JSON.parseArray(jsonObjectWordsResult.getString("共有情况")).getJSONObject(0).getString("word");
+                String usageType = JSON.parseArray(jsonObjectWordsResult.getString("用途")).getJSONObject(0).getString("word");
+                String usagePeriod = JSON.parseArray(jsonObjectWordsResult.getString("使用期限")).getJSONObject(0).getString("word");
+                String registrationDate = JSON.parseArray(jsonObjectWordsResult.getString("登记日期")).getJSONObject(0).getString("word");
+                String coOwner = "";
+                JSONArray coOwnerArray = JSON.parseArray(jsonObjectWordsResult.getString("共有人"));
+                if (coOwnerArray != null && coOwnerArray.size() > 0){
+                    for (Object coOwnerNameResult : coOwnerArray) {
+                        coOwner = JSONObject.parseObject(coOwnerNameResult.toString()).getString("word")+",";
+                    }
+                }
+                coOwner=  coOwner.substring(0,coOwner.length()-1);
                 map.put("ownerName", ownerName);
                 map.put("location", location);
                 map.put("rightType", rightType);

+ 38 - 31
ruoyi-system/src/main/java/com/ruoyi/system/domain/checkPoint/CheckPointRecord.java

@@ -1,12 +1,11 @@
 package com.ruoyi.system.domain.checkPoint;
 
-import java.util.Date;
 import com.fasterxml.jackson.annotation.JsonFormat;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.core.domain.BaseEntity;
 
+import java.util.Date;
+
 /**
  * 巡更点记录对象 check_point_record
  * 
@@ -33,8 +32,8 @@ public class CheckPointRecord extends BaseEntity
     private String checkType;
 
     /** 巡更时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "巡更时间", width = 30, dateFormat = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "巡更时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date checkTime;
 
     /** 巡更路线 */
@@ -56,6 +55,10 @@ public class CheckPointRecord extends BaseEntity
     /** 巡更人id */
     @Excel(name = "巡更人id")
     private Long checkUseId;
+    /**
+     * 巡更人员工管理id
+     */
+    private Long checkStaffId;
 
     /** 巡更人手机号 */
     @Excel(name = "巡更人手机号")
@@ -74,15 +77,23 @@ public class CheckPointRecord extends BaseEntity
     private String checkResultPhoto;
 
     /** 巡更时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "巡更时间", width = 30, dateFormat = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "巡更时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date checkResultTime;
 
     /** 是否巡更 1:未巡更 2:已巡更 */
     @Excel(name = "是否巡更 1:未巡更 2:已巡更")
     private String checkStatus;
 
-    public void setCheckPointRecordId(Long checkPointRecordId) 
+    public Long getCheckStaffId() {
+        return checkStaffId;
+    }
+
+    public void setCheckStaffId(Long checkStaffId) {
+        this.checkStaffId = checkStaffId;
+    }
+
+    public void setCheckPointRecordId(Long checkPointRecordId)
     {
         this.checkPointRecordId = checkPointRecordId;
     }
@@ -229,28 +240,24 @@ public class CheckPointRecord extends BaseEntity
 
     @Override
     public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("checkPointRecordId", getCheckPointRecordId())
-            .append("checkPointManageId", getCheckPointManageId())
-            .append("dateTimeNum", getDateTimeNum())
-            .append("checkType", getCheckType())
-            .append("checkTime", getCheckTime())
-            .append("checkAddress", getCheckAddress())
-            .append("userName", getUserName())
-            .append("useId", getUseId())
-            .append("checkUserName", getCheckUserName())
-            .append("checkUseId", getCheckUseId())
-            .append("checkUsePhone", getCheckUsePhone())
-            .append("checkResult", getCheckResult())
-            .append("checkResultDetails", getCheckResultDetails())
-            .append("checkResultPhoto", getCheckResultPhoto())
-            .append("checkResultTime", getCheckResultTime())
-            .append("checkStatus", getCheckStatus())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .append("remark", getRemark())
-            .toString();
+        return "CheckPointRecord{" +
+                "checkPointRecordId=" + checkPointRecordId +
+                ", checkPointManageId=" + checkPointManageId +
+                ", dateTimeNum='" + dateTimeNum + '\'' +
+                ", checkType='" + checkType + '\'' +
+                ", checkTime=" + checkTime +
+                ", checkAddress='" + checkAddress + '\'' +
+                ", userName='" + userName + '\'' +
+                ", useId=" + useId +
+                ", checkUserName='" + checkUserName + '\'' +
+                ", checkUseId=" + checkUseId +
+                ", checkStaffId=" + checkStaffId +
+                ", checkUsePhone='" + checkUsePhone + '\'' +
+                ", checkResult='" + checkResult + '\'' +
+                ", checkResultDetails='" + checkResultDetails + '\'' +
+                ", checkResultPhoto='" + checkResultPhoto + '\'' +
+                ", checkResultTime=" + checkResultTime +
+                ", checkStatus='" + checkStatus + '\'' +
+                '}';
     }
 }

+ 9 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CheckPointRecordServiceImpl.java

@@ -1,7 +1,9 @@
 package com.ruoyi.system.service.impl;
 
 import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.StaffManage;
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.system.domain.checkPoint.CheckPointRecord;
 import com.ruoyi.system.mapper.CheckPointRecordMapper;
 import com.ruoyi.system.service.ICheckPointRecordService;
@@ -72,7 +74,14 @@ public class CheckPointRecordServiceImpl implements ICheckPointRecordService
     @Override
     public int updateCheckPointRecord(CheckPointRecord checkPointRecord)
     {
+        StaffManage staffManage = SecurityUtils.getLoginUser().getStaffManage();
         checkPointRecord.setUpdateTime(DateUtils.getNowDate());
+        if (staffManage != null){
+            checkPointRecord.setCheckUserName(staffManage.getStaffName());
+            checkPointRecord.setCheckUsePhone(staffManage.getPhoneNumber());
+            checkPointRecord.setCheckStaffId(staffManage.getStaffId());
+        }
+        checkPointRecord.setCheckUseId(SecurityUtils.getUserId());
         return checkPointRecordMapper.updateCheckPointRecord(checkPointRecord);
     }
 

+ 3 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PropertyRepairServiceImpl.java

@@ -109,6 +109,9 @@ public class PropertyRepairServiceImpl implements IPropertyRepairService
             staffManage.setStatus(TWO);
             staffManageMapper.updateStaffManage(staffManage);
         }
+        //指派后修改该物业报修表的状态的
+        propertyRepair.setRepairStatus(TWO);
+        propertyRepairMapper.updatePropertyRepair(propertyRepair);
         return AjaxResult.success();
     }
 

+ 5 - 1
ruoyi-system/src/main/resources/mapper/system/CheckPointRecordMapper.xml

@@ -15,6 +15,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="useId"    column="use_id"    />
         <result property="checkUserName"    column="check_user_name"    />
         <result property="checkUseId"    column="check_use_id"    />
+        <result property="checkStaffId"    column="check_staff_id"    />
         <result property="checkUsePhone"    column="check_use_phone"    />
         <result property="checkResult"    column="check_result"    />
         <result property="checkResultDetails"    column="check_result_details"    />
@@ -29,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectCheckPointRecordVo">
-        select check_point_record_id, check_point_manage_id, date_time_num, check_type, check_time, check_address, user_name, use_id, check_user_name, check_use_id, check_use_phone, check_result, check_result_details, check_result_photo, check_result_time, check_status, create_by, create_time, update_by, update_time, remark from check_point_record
+        select check_point_record_id, check_point_manage_id, date_time_num,check_staff_id, check_type, check_time, check_address, user_name, use_id, check_user_name, check_use_id, check_use_phone, check_result, check_result_details, check_result_photo, check_result_time, check_status, create_by, create_time, update_by, update_time, remark from check_point_record
     </sql>
 
     <select id="selectCheckPointRecordList" parameterType="CheckPointRecord" resultMap="CheckPointRecordResult">
@@ -70,6 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="useId != null">use_id,</if>
             <if test="checkUserName != null">check_user_name,</if>
             <if test="checkUseId != null">check_use_id,</if>
+            <if test="checkStaffId != null">check_staff_id,</if>
             <if test="checkUsePhone != null">check_use_phone,</if>
             <if test="checkResult != null">check_result,</if>
             <if test="checkResultDetails != null">check_result_details,</if>
@@ -92,6 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="useId != null">#{useId},</if>
             <if test="checkUserName != null">#{checkUserName},</if>
             <if test="checkUseId != null">#{checkUseId},</if>
+            <if test="checkStaffId != null">#{checkStaffId},</if>
             <if test="checkUsePhone != null">#{checkUsePhone},</if>
             <if test="checkResult != null">#{checkResult},</if>
             <if test="checkResultDetails != null">#{checkResultDetails},</if>
@@ -118,6 +121,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="useId != null">use_id = #{useId},</if>
             <if test="checkUserName != null">check_user_name = #{checkUserName},</if>
             <if test="checkUseId != null">check_use_id = #{checkUseId},</if>
+            <if test="checkStaffId != null">check_staff_id = #{checkStaffId},</if>
             <if test="checkUsePhone != null">check_use_phone = #{checkUsePhone},</if>
             <if test="checkResult != null">check_result = #{checkResult},</if>
             <if test="checkResultDetails != null">check_result_details = #{checkResultDetails},</if>