Просмотр исходного кода

1、新增报修报表2、优化业主手机号登陆 查询业主未传入用户类型问题

xiaogang лет назад: 5
Родитель
Сommit
ab75e76d9b
14 измененных файлов с 543 добавлено и 13 удалено
  1. 110 0
      java110-bean/src/main/java/com/java110/dto/repair/RepairUserDto.java
  2. 135 2
      java110-db/src/main/resources/mapper/report/ReportFeeMonthStatisticsServiceDaoImplMapper.xml
  3. 3 0
      java110-db/src/main/resources/mapper/user/UserServiceDaoImplMapper.xml
  4. 30 2
      java110-interface/src/main/java/com/java110/intf/report/IReportFeeMonthStatisticsInnerServiceSMO.java
  5. 1 1
      service-api/src/main/java/com/java110/api/listener/ownerRepair/RepairDispatchListener.java
  6. 4 0
      service-api/src/main/java/com/java110/api/listener/user/UserLoginListener.java
  7. 4 1
      service-front/src/main/java/com/java110/front/smo/impl/FrontFeeServiceSMOImpl.java
  8. 1 0
      service-front/src/main/java/com/java110/front/smo/login/impl/OwnerAppLoginSMOImpl.java
  9. 52 1
      service-report/src/main/java/com/java110/report/api/ReportFeeMonthStatisticsApi.java
  10. 14 0
      service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/IGetReportFeeMonthStatisticsBMO.java
  11. 100 6
      service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/GetReportFeeMonthStatisticsBMOImpl.java
  12. 24 0
      service-report/src/main/java/com/java110/report/dao/IReportFeeMonthStatisticsServiceDao.java
  13. 21 0
      service-report/src/main/java/com/java110/report/dao/impl/ReportFeeMonthStatisticsServiceDaoImpl.java
  14. 44 0
      service-report/src/main/java/com/java110/report/smo/impl/ReportFeeMonthStatisticsInnerServiceSMOImpl.java

+ 110 - 0
java110-bean/src/main/java/com/java110/dto/repair/RepairUserDto.java

@@ -4,6 +4,7 @@ import com.java110.dto.PageDto;
 
 import java.io.Serializable;
 import java.util.Date;
+import java.util.List;
 
 /**
  * @ClassName FloorDto
@@ -27,6 +28,7 @@ public class RepairUserDto extends PageDto implements Serializable {
     public static final String STATE_BACK = "10003";// 退单
     public static final String STATE_TRANSFER = "10004";// 转单
     public static final String STATE_SUBMIT = "10005";// 提交
+    public static final String STATE_DISPATCH = "10006";//派单
 
 
     private String context;
@@ -55,6 +57,25 @@ public class RepairUserDto extends PageDto implements Serializable {
 
     private String statusCd = "0";
 
+    //报修数量
+    private String amount;
+    //处理中的报修数量
+    private String dealAmount;
+    //结单的报修数量
+    private String statementAmount;
+    //退单的报修数量
+    private String chargebackAmount;
+    //转单的报修数量
+    private String transferOrderAmount;
+    //派单的报修数量
+    private String dispatchAmount;
+    private String beginStartTime;
+    private String beginEndTime;
+    private String finishStartTime;
+    private String finishEndTime;
+    //员工报修表员工信息
+    private List<RepairUserDto> repairList;
+
 
     public String getContext() {
         return context;
@@ -224,6 +245,7 @@ public class RepairUserDto extends PageDto implements Serializable {
     public void setPreRuId(String preRuId) {
         this.preRuId = preRuId;
     }
+
     public String getbId() {
         return bId;
     }
@@ -231,4 +253,92 @@ public class RepairUserDto extends PageDto implements Serializable {
     public void setbId(String bId) {
         this.bId = bId;
     }
+
+    public String getAmount() {
+        return amount;
+    }
+
+    public void setAmount(String amount) {
+        this.amount = amount;
+    }
+
+    public String getBeginStartTime() {
+        return beginStartTime;
+    }
+
+    public void setBeginStartTime(String beginStartTime) {
+        this.beginStartTime = beginStartTime;
+    }
+
+    public String getBeginEndTime() {
+        return beginEndTime;
+    }
+
+    public void setBeginEndTime(String beginEndTime) {
+        this.beginEndTime = beginEndTime;
+    }
+
+    public String getFinishStartTime() {
+        return finishStartTime;
+    }
+
+    public void setFinishStartTime(String finishStartTime) {
+        this.finishStartTime = finishStartTime;
+    }
+
+    public String getFinishEndTime() {
+        return finishEndTime;
+    }
+
+    public void setFinishEndTime(String finishEndTime) {
+        this.finishEndTime = finishEndTime;
+    }
+
+    public String getDealAmount() {
+        return dealAmount;
+    }
+
+    public void setDealAmount(String dealAmount) {
+        this.dealAmount = dealAmount;
+    }
+
+    public String getStatementAmount() {
+        return statementAmount;
+    }
+
+    public void setStatementAmount(String statementAmount) {
+        this.statementAmount = statementAmount;
+    }
+
+    public String getChargebackAmount() {
+        return chargebackAmount;
+    }
+
+    public void setChargebackAmount(String chargebackAmount) {
+        this.chargebackAmount = chargebackAmount;
+    }
+
+    public String getTransferOrderAmount() {
+        return transferOrderAmount;
+    }
+
+    public void setTransferOrderAmount(String transferOrderAmount) {
+        this.transferOrderAmount = transferOrderAmount;
+    }
+
+    public String getDispatchAmount() {
+        return dispatchAmount;
+    }
+
+    public void setDispatchAmount(String dispatchAmount) {
+        this.dispatchAmount = dispatchAmount;
+    }
+
+    public List<RepairUserDto> getRepairList() {
+        return repairList;
+    }
+
+    public void setRepairList(List<RepairUserDto> repairList) {
+        this.repairList = repairList;
+    }
 }

+ 135 - 2
java110-db/src/main/resources/mapper/report/ReportFeeMonthStatisticsServiceDaoImplMapper.xml

@@ -454,7 +454,8 @@
         left join building_room br on t.obj_id = br.room_id and t.obj_type = '3333' and br.status_cd = '0'
         left join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0'
         left join f_floor f on bu.floor_id = f.floor_id and f.status_cd = '0'
-        left join t_dict td on pfc.fee_type_cd = td.status_cd and td.table_name='pay_fee_config' and td.table_columns='fee_type_cd'
+        left join t_dict td on pfc.fee_type_cd = td.status_cd and td.table_name='pay_fee_config' and
+        td.table_columns='fee_type_cd'
         inner join pay_fee pf on t.fee_id = pf.fee_id and pf.community_id = t.community_id and pf.status_cd = '0'
 
         where t.status_cd = '0'
@@ -1037,7 +1038,8 @@
         select pfc.fee_name feeName,f.floor_num floorNum,bu.unit_num unitNum,br.room_num roomNum,oc.car_num carNum,
         pf.payer_obj_type payerObjType,t.start_time startTime,t.end_time endTime,t.create_time createTime,
         t.receivable_amount receivableAmount,t.received_amount receivedAmount,pfa.`value`
-        importFeeName,t.prime_rate,d.name primeRate,fdr.discount_small_type discountSmallType,fdr.rule_name ruleName,pfdd.discount_price,
+        importFeeName,t.prime_rate,d.name primeRate,fdr.discount_small_type discountSmallType,fdr.rule_name
+        ruleName,pfdd.discount_price,
         SUM(pfdd.discount_price) discountPrice
         from pay_fee_detail t
         INNER JOIN pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0'
@@ -1404,4 +1406,135 @@
         </if>
     </select>
 
+    <select id="getRepairInfo" parameterType="Map" resultType="Map">
+        select r.staff_id staffId,r.staff_name staffName,r.state, t.name stateName, count(*) amount from r_repair_user r
+        left join t_dict t on t.table_name="r_repair_user" and t.table_columns="state" and t.status_cd=r.state
+        where r.state != "10005" and r.status_cd = "0"
+        <if test="ruId != null and ruId != ''">
+            and r.ru_id = #{ruId}
+        </if>
+        <if test="repairId != null and repairId != ''">
+            and r.repair_id = #{repairId}
+        </if>
+        <if test="communityId != null and communityId !=''">
+            and r.community_id = #{communityId}
+        </if>
+        <if test="bId != null and bId !=''">
+            and r.b_id = #{bId}
+        </if>
+        <if test="state != null and state != ''">
+            and r.state = #{state}
+        </if>
+        <if test="context != null and context !=''">
+            and r.context = #{context}
+        </if>
+        <if test="statusCd != null and statusCd != ''">
+            and r.status_cd = #{statusCd}
+        </if>
+        <if test="staffId != null and staffId !=''">
+            and r.staff_id = #{staffId}
+        </if>
+        <if test="staffName != null and staffName !=''">
+            and r.staff_name = #{staffName}
+        </if>
+        <if test="preStaffId != null and preStaffId !=''">
+            and r.pre_staff_id = #{preStaffId}
+        </if>
+        <if test="preStaffName != null and preStaffName !=''">
+            and r.pre_staff_name = #{preStaffName}
+        </if>
+        <if test="beginStartTime != null and beginStartTime !=''">
+            and r.start_time &gt;= #{beginStartTime}
+        </if>
+        <if test="beginEndTime != null and beginEndTime !=''">
+            and r.start_time &lt;= #{beginEndTime}
+        </if>
+        <if test="finishStartTime != null and finishStartTime !=''">
+            and r.end_time &gt;= #{finishStartTime}
+        </if>
+        <if test="finishEndTime != null and finishEndTime !=''">
+            and r.end_time &lt;= #{finishEndTime}
+        </if>
+        <if test="createTime != null and createTime !=''">
+            and r.create_time = #{createTime}
+        </if>
+        group by r.staff_id,r.state
+        order by r.create_time desc
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
+    </select>
+
+    <select id="getRepairWithOutPage" parameterType="Map" resultType="Map">
+        select r.staff_id staffId,r.staff_name staffName,r.state, t.name stateName, count(*) amount from r_repair_user r
+        left join t_dict t on t.table_name="r_repair_user" and t.table_columns="state" and t.status_cd=r.state
+        where r.state != "10005" and r.status_cd = "0"
+        <if test="ruId != null and ruId != ''">
+            and r.ru_id = #{ruId}
+        </if>
+        <if test="repairId != null and repairId != ''">
+            and r.repair_id = #{repairId}
+        </if>
+        <if test="communityId != null and communityId !=''">
+            and r.community_id = #{communityId}
+        </if>
+        <if test="bId != null and bId !=''">
+            and r.b_id = #{bId}
+        </if>
+        <if test="state != null and state != ''">
+            and r.state = #{state}
+        </if>
+        <if test="context != null and context !=''">
+            and r.context = #{context}
+        </if>
+        <if test="statusCd != null and statusCd != ''">
+            and r.status_cd = #{statusCd}
+        </if>
+        <if test="staffId != null and staffId !=''">
+            and r.staff_id = #{staffId}
+        </if>
+        <if test="staffName != null and staffName !=''">
+            and r.staff_name = #{staffName}
+        </if>
+        <if test="preStaffId != null and preStaffId !=''">
+            and r.pre_staff_id = #{preStaffId}
+        </if>
+        <if test="preStaffName != null and preStaffName !=''">
+            and r.pre_staff_name = #{preStaffName}
+        </if>
+        <if test="beginStartTime != null and beginStartTime !=''">
+            and r.start_time &gt;= #{beginStartTime}
+        </if>
+        <if test="beginEndTime != null and beginEndTime !=''">
+            and r.start_time &lt;= #{beginEndTime}
+        </if>
+        <if test="finishStartTime != null and finishStartTime !=''">
+            and r.end_time &gt;= #{finishStartTime}
+        </if>
+        <if test="finishEndTime != null and finishEndTime !=''">
+            and r.end_time &lt;= #{finishEndTime}
+        </if>
+        <if test="createTime != null and createTime !=''">
+            and r.create_time = #{createTime}
+        </if>
+        group by r.staff_id,r.state
+        order by r.create_time desc
+    </select>
+
+    <select id="queryRepairForStaff" parameterType="Map" resultType="Map">
+        /*select r.staff_id staffId,r.staff_name staffName from r_repair_user r
+        where r.state != "10005" and r.status_cd = "0"*/
+        SELECT r.staff_id staffId,r.staff_name staffName FROM r_repair_user r
+        WHERE r.state!='10005' AND
+        (r.state!='10001' AND r.repair_event!='payUser') AND r.repair_event!="startUser"
+        <if test="communityId != null and communityId !=''">
+            and r.community_id = #{communityId}
+        </if>
+        <if test="staffId != null and staffId != ''">
+            and r.staff_id = #{staffId}
+        </if>
+        group by r.staff_id
+        order by r.create_time desc
+    </select>
+
 </mapper>

+ 3 - 0
java110-db/src/main/resources/mapper/user/UserServiceDaoImplMapper.xml

@@ -596,6 +596,9 @@
         <if test="tel !=null and tel != ''">
             and u.tel= #{tel}
         </if>
+        <if test="levelCd !=null and levelCd != ''">
+            and u.level_cd= #{levelCd}
+        </if>
         order by u.create_time desc
         <if test="page != -1 and page != null ">
             limit #{page}, #{row}

+ 30 - 2
java110-interface/src/main/java/com/java110/intf/report/IReportFeeMonthStatisticsInnerServiceSMO.java

@@ -3,6 +3,7 @@ package com.java110.intf.report;
 import com.alibaba.fastjson.JSONObject;
 import com.java110.config.feign.FeignConfiguration;
 import com.java110.dto.fee.FeeConfigDto;
+import com.java110.dto.repair.RepairUserDto;
 import com.java110.dto.reportFeeMonthStatistics.ReportFeeMonthStatisticsDto;
 import com.java110.po.reportFeeMonthStatistics.ReportFeeMonthStatisticsPo;
 import org.springframework.cloud.openfeign.FeignClient;
@@ -199,10 +200,11 @@ public interface IReportFeeMonthStatisticsInnerServiceSMO {
 
     /**
      * 查询(优惠、减免、滞纳金、空置房打折、空置房减免等)总金额
+     *
      * @param reportFeeMonthStatisticsDto
      * @return
      */
-    @RequestMapping(value = "/queryPayFeeDetailSum",method = RequestMethod.POST)
+    @RequestMapping(value = "/queryPayFeeDetailSum", method = RequestMethod.POST)
     List<ReportFeeMonthStatisticsDto> queryPayFeeDetailSum(@RequestBody ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto);
 
     /**
@@ -262,11 +264,37 @@ public interface IReportFeeMonthStatisticsInnerServiceSMO {
     /**
      * <p>查询小区楼信息</p>
      *
-     *
      * @param feeConfigDto 数据对象分享
      * @return FeeConfigDto 对象数据
      */
     @RequestMapping(value = "/queryFeeConfigs", method = RequestMethod.POST)
     List<FeeConfigDto> queryFeeConfigs(@RequestBody FeeConfigDto feeConfigDto);
 
+    /**
+     * 查询维修师傅报修信息
+     *
+     * @param repairUserDto
+     * @return
+     */
+    @RequestMapping(value = "/queryRepair", method = RequestMethod.POST)
+    List<RepairUserDto> queryRepair(@RequestBody RepairUserDto repairUserDto);
+
+    /**
+     * 查询报修信息
+     *
+     * @param repairUserDto
+     * @return
+     */
+    @RequestMapping(value = "/queryRepairWithOutPage", method = RequestMethod.POST)
+    List<RepairUserDto> queryRepairWithOutPage(@RequestBody RepairUserDto repairUserDto);
+
+    /**
+     * 查询员工报修表员工信息
+     *
+     * @param repairUserDto
+     * @return
+     */
+    @RequestMapping(value = "/queryRepairForStaff", method = RequestMethod.POST)
+    List<RepairUserDto> queryRepairForStaff(@RequestBody RepairUserDto repairUserDto);
+
 }

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

@@ -276,7 +276,7 @@ public class RepairDispatchListener extends AbstractServiceApiPlusListener {
                 repairUserPo.setRuId(ruId);
                 repairUserPo.setStartTime(DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A));
                 repairUserPo.setEndTime(DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A));
-                repairUserPo.setState(RepairUserDto.STATE_TRANSFER);
+                repairUserPo.setState(RepairUserDto.STATE_DISPATCH);
                 repairUserPo.setRepairId(reqJson.getString("repairId"));
                 repairUserPo.setStaffId(userId);
                 repairUserPo.setStaffName(userName);

+ 4 - 0
service-api/src/main/java/com/java110/api/listener/user/UserLoginListener.java

@@ -20,6 +20,7 @@ import com.java110.utils.constant.ServiceCodeConstant;
 import com.java110.utils.exception.SMOException;
 import com.java110.utils.util.Assert;
 import com.java110.utils.util.BeanConvertUtil;
+import com.java110.utils.util.StringUtil;
 import com.java110.utils.util.ValidatorUtil;
 import com.java110.vo.ResultVo;
 import org.slf4j.Logger;
@@ -80,6 +81,9 @@ public class UserLoginListener extends AbstractServiceApiPlusListener {
         //1.0 优先用 手机号登录
         UserDto userDto = new UserDto();
         String errorInfo = "";
+        if (reqJson.containsKey("levelCd")) {
+            userDto.setLevelCd(reqJson.getString("levelCd"));
+        }
         if (reqJson.containsKey("userName")) {
             if (ValidatorUtil.isMobile(reqJson.getString("userName"))) {//用户临时秘钥登录
                 userDto.setTel(reqJson.getString("userName"));

+ 4 - 1
service-front/src/main/java/com/java110/front/smo/impl/FrontFeeServiceSMOImpl.java

@@ -132,7 +132,10 @@ public class FrontFeeServiceSMOImpl extends BaseComponentSMO implements IFeeServ
 
         JSONObject paramIn = JSONObject.parseObject(pd.getReqData());
         String remark = paramIn.getString("remark");
-        paramIn.put("remark", "现场收银台支付-" + remark);
+        if(!StringUtil.isEmpty(remark)){
+            remark="-"+remark;
+        }
+        paramIn.put("remark", "现场收银台支付" + remark);
         String communityId = paramIn.getString("communityId");
         ResponseEntity responseEntity = super.getStoreInfo(pd, restTemplate);
         if (responseEntity.getStatusCode() != HttpStatus.OK) {

+ 1 - 0
service-front/src/main/java/com/java110/front/smo/login/impl/OwnerAppLoginSMOImpl.java

@@ -77,6 +77,7 @@ public class OwnerAppLoginSMOImpl extends AbstractFrontServiceSMO implements IOw
         userDto.setUserName(loginInfo.getString("username"));
         userDto.setPassword(loginInfo.getString("password"));
         userDto.setLoginByPhone(loginByPhone);
+        userDto.setLevelCd("02");
         userDto = super.postForApi(pd, userDto, ServiceCodeConstant.SERVICE_CODE_USER_LOGIN, UserDto.class);
 
         if (userDto == null) {

+ 52 - 1
service-report/src/main/java/com/java110/report/api/ReportFeeMonthStatisticsApi.java

@@ -1,6 +1,7 @@
 package com.java110.report.api;
 
 import com.alibaba.fastjson.JSONObject;
+import com.java110.dto.repair.RepairUserDto;
 import com.java110.dto.reportFeeMonthStatistics.ReportFeeMonthStatisticsDto;
 import com.java110.po.reportFeeMonthStatistics.ReportFeeMonthStatisticsPo;
 import com.java110.report.bmo.reportFeeMonthStatistics.IDeleteReportFeeMonthStatisticsBMO;
@@ -15,17 +16,20 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
 
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
 import java.util.Calendar;
 
-
 @RestController
 @RequestMapping(value = "/reportFeeMonthStatistics")
 public class ReportFeeMonthStatisticsApi {
 
     @Autowired
     private ISaveReportFeeMonthStatisticsBMO saveReportFeeMonthStatisticsBMOImpl;
+
     @Autowired
     private IUpdateReportFeeMonthStatisticsBMO updateReportFeeMonthStatisticsBMOImpl;
+
     @Autowired
     private IDeleteReportFeeMonthStatisticsBMO deleteReportFeeMonthStatisticsBMOImpl;
 
@@ -329,6 +333,53 @@ public class ReportFeeMonthStatisticsApi {
         return getReportFeeMonthStatisticsBMOImpl.queryPayFeeDetail(reportFeeMonthStatisticsDto);
     }
 
+    /**
+     * 报修统计表
+     *
+     * @param communityId 小区id
+     * @return
+     * @serviceCode /reportFeeMonthStatistics/queryRepair
+     * @path /app/reportFeeMonthStatistics/queryRepair
+     */
+    @RequestMapping(value = "/queryRepair", method = RequestMethod.GET)
+    public ResponseEntity<String> queryRepair(@RequestParam(value = "communityId") String communityId,
+                                              @RequestParam(value = "repairId", required = false) String repairId,
+                                              @RequestParam(value = "state", required = false) String state,
+                                              @RequestParam(value = "staffId", required = false) String staffId,
+                                              @RequestParam(value = "staffName", required = false) String staffName,
+                                              @RequestParam(value = "preStaffId", required = false) String preStaffId,
+                                              @RequestParam(value = "preStaffName", required = false) String preStaffName,
+                                              @RequestParam(value = "beginStartTime", required = false) String beginStartTime,
+                                              @RequestParam(value = "beginEndTime", required = false) String beginEndTime,
+                                              @RequestParam(value = "finishStartTime", required = false) String finishStartTime,
+                                              @RequestParam(value = "finishEndTime", required = false) String finishEndTime,
+                                              @RequestParam(value = "page") int page,
+                                              @RequestParam(value = "row") int row) {
+        RepairUserDto repairUserDto = new RepairUserDto();
+        repairUserDto.setCommunityId(communityId);
+        repairUserDto.setRepairId(repairId);
+        repairUserDto.setState(state);
+        repairUserDto.setStaffId(staffId);
+        repairUserDto.setStaffName(staffName);
+        repairUserDto.setPreStaffId(preStaffId);
+        repairUserDto.setPreStaffName(preStaffName);
+        if (!StringUtil.isEmpty(beginStartTime)) {
+            repairUserDto.setBeginStartTime(beginStartTime + " 00:00:00");
+        }
+        if (!StringUtil.isEmpty(beginEndTime)) {
+            repairUserDto.setBeginEndTime(beginEndTime + " 23:59:59");
+        }
+        if (!StringUtil.isEmpty(finishStartTime)) {
+            repairUserDto.setFinishStartTime(finishStartTime + " 00:00:00");
+        }
+        if (!StringUtil.isEmpty(finishEndTime)) {
+            repairUserDto.setFinishEndTime(finishEndTime + " 23:59:59");
+        }
+        repairUserDto.setPage(page);
+        repairUserDto.setRow(row);
+        return getReportFeeMonthStatisticsBMOImpl.queryRepair(repairUserDto);
+    }
+
     /**
      * 查询费用分项表
      *

+ 14 - 0
service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/IGetReportFeeMonthStatisticsBMO.java

@@ -1,5 +1,6 @@
 package com.java110.report.bmo.reportFeeMonthStatistics;
 
+import com.java110.dto.repair.RepairUserDto;
 import com.java110.dto.reportFeeMonthStatistics.ReportFeeMonthStatisticsDto;
 import org.springframework.http.ResponseEntity;
 
@@ -32,12 +33,25 @@ public interface IGetReportFeeMonthStatisticsBMO {
     ResponseEntity<String> queryFeeDetail(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto);
 
     ResponseEntity<String> queryOweFeeDetail(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto);
+
     ResponseEntity<String> queryPayFeeDetail(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto);
+
     ResponseEntity<String> queryDeadlineFee(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto);
 
     ResponseEntity<String> queryPrePaymentCount(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto);
+
     ResponseEntity<String> queryDeadlinePaymentCount(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto);
+
     ResponseEntity<String> queryPrePayment(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto);
+
     ResponseEntity<String> queryOwePaymentCount(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto);
 
+    /**
+     * 查询报修信息
+     *
+     * @param repairUserDto
+     * @return
+     */
+    ResponseEntity<String> queryRepair(RepairUserDto repairUserDto);
+
 }

+ 100 - 6
service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/GetReportFeeMonthStatisticsBMOImpl.java

@@ -3,6 +3,7 @@ package com.java110.report.bmo.reportFeeMonthStatistics.impl;
 import com.alibaba.fastjson.JSONObject;
 import com.java110.dto.fee.FeeConfigDto;
 import com.java110.dto.fee.FeeDto;
+import com.java110.dto.repair.RepairUserDto;
 import com.java110.dto.reportFeeMonthStatistics.ReportFeeMonthStatisticsDto;
 import com.java110.dto.reportFeeMonthStatistics.ReportFeeMonthStatisticsTotalDto;
 import com.java110.intf.report.IReportFeeMonthStatisticsInnerServiceSMO;
@@ -279,7 +280,7 @@ public class GetReportFeeMonthStatisticsBMOImpl implements IGetReportFeeMonthSta
                     totalPreferentialAmount = totalPreferentialAmount + discountPrice;
                     //优惠金额
                     reportFeeMonthStatistics.setPreferentialAmount(reportFeeMonthStatistics.getDiscountPrice());
-                }else{
+                } else {
                     reportFeeMonthStatistics.setPreferentialAmount("0");
 
                 }
@@ -290,17 +291,17 @@ public class GetReportFeeMonthStatisticsBMOImpl implements IGetReportFeeMonthSta
                     totalDeductionAmount = totalDeductionAmount + discountPrice;
                     //减免金额
                     reportFeeMonthStatistics.setDeductionAmount(reportFeeMonthStatistics.getDiscountPrice());
-                }else{
+                } else {
                     reportFeeMonthStatistics.setDeductionAmount("0");
                 }
                 //滞纳金
                 if (!StringUtil.isEmpty(reportFeeMonthStatistics.getDiscountSmallType()) && reportFeeMonthStatistics.getDiscountSmallType().equals("3")) {
                     //获取滞纳金金额
-                    Double discountPrice = (Double.valueOf(reportFeeMonthStatistics.getDiscountPrice()))*(-1);
+                    Double discountPrice = (Double.valueOf(reportFeeMonthStatistics.getDiscountPrice())) * (-1);
                     totalLateFee = totalLateFee + discountPrice;
                     //滞纳金
                     reportFeeMonthStatistics.setLateFee(reportFeeMonthStatistics.getDiscountPrice());
-                }else{
+                } else {
                     reportFeeMonthStatistics.setLateFee("0");
                 }
                 //空置房打折
@@ -310,7 +311,7 @@ public class GetReportFeeMonthStatisticsBMOImpl implements IGetReportFeeMonthSta
                     totalVacantHousingDiscount = totalVacantHousingDiscount + discountPrice;
                     //空置房打折
                     reportFeeMonthStatistics.setVacantHousingDiscount(reportFeeMonthStatistics.getDiscountPrice());
-                }else{
+                } else {
                     reportFeeMonthStatistics.setVacantHousingDiscount("0");
                 }
                 //空置房减免
@@ -320,7 +321,7 @@ public class GetReportFeeMonthStatisticsBMOImpl implements IGetReportFeeMonthSta
                     totalVacantHousingReduction = totalVacantHousingReduction + discountPrice;
                     //空置房减免
                     reportFeeMonthStatistics.setVacantHousingReduction(reportFeeMonthStatistics.getDiscountPrice());
-                }else{
+                } else {
                     reportFeeMonthStatistics.setVacantHousingReduction("0");
                 }
 
@@ -461,6 +462,99 @@ public class GetReportFeeMonthStatisticsBMOImpl implements IGetReportFeeMonthSta
         return responseEntity;
     }
 
+    /**
+     * 查询报修信息
+     *
+     * @param repairUserDto
+     * @return
+     */
+    @Override
+    public ResponseEntity<String> queryRepair(RepairUserDto repairUserDto) {
+        //查询员工报修表员工信息
+        List<RepairUserDto> repairUsers = reportFeeMonthStatisticsInnerServiceSMOImpl.queryRepairForStaff(repairUserDto);
+        int count = repairUsers.size();
+        //获取员工id和姓名集合
+        List<RepairUserDto> staffs;
+        if (StringUtil.isEmpty(repairUserDto.getStaffId())) {
+            staffs = reportFeeMonthStatisticsInnerServiceSMOImpl.queryRepairForStaff(repairUserDto);
+        } else {
+            repairUserDto.setStaffId(null);
+            staffs = reportFeeMonthStatisticsInnerServiceSMOImpl.queryRepairForStaff(repairUserDto);
+        }
+        List<RepairUserDto> repairUserList = new ArrayList<>();
+        if (count > 0) {
+            for (RepairUserDto repairUser : repairUsers) {
+                RepairUserDto repairUserInfo = new RepairUserDto();
+                //员工id
+                repairUserDto.setStaffId(repairUser.getStaffId());
+                List<RepairUserDto> repairUserDtoList = reportFeeMonthStatisticsInnerServiceSMOImpl.queryRepairWithOutPage(repairUserDto);
+                if (repairUserDtoList != null && repairUserDtoList.size() > 0) {
+                    //处理中数量
+                    int dealAmount = 0;
+                    //结单数量
+                    int statementAmount = 0;
+                    //退单数量
+                    int chargebackAmount = 0;
+                    //转单数量
+                    int transferOrderAmount = 0;
+                    //派单数量
+                    int dispatchAmount = 0;
+                    for (RepairUserDto repair : repairUserDtoList) {
+                        //处理中状态
+                        if (repair.getState().equals("10001")) {
+                            //获取数量
+                            int amount = Integer.parseInt(repair.getAmount());
+                            dealAmount = dealAmount + amount;
+                        } else if (repair.getState().equals("10002")) {  //结单状态
+                            //获取数量
+                            int amount = Integer.parseInt(repair.getAmount());
+                            statementAmount = statementAmount + amount;
+                        } else if (repair.getState().equals("10003")) {  //退单状态
+                            //获取数量
+                            int amount = Integer.parseInt(repair.getAmount());
+                            chargebackAmount = chargebackAmount + amount;
+                        } else if (repair.getState().equals("10004")) {  //转单状态
+                            //获取数量
+                            int amount = Integer.parseInt(repair.getAmount());
+                            transferOrderAmount = transferOrderAmount + amount;
+                        } else if (repair.getState().equals("10006")) {  //派单状态
+                            int amount = Integer.parseInt(repair.getAmount());
+                            dispatchAmount = dispatchAmount + amount;
+                        }
+                    }
+                    //员工id
+                    repairUserInfo.setStaffId(repairUser.getStaffId());
+                    //员工姓名
+                    repairUserInfo.setStaffName(repairUser.getStaffName());
+                    //处理中报修数量
+                    repairUserInfo.setDealAmount(Integer.toString(dealAmount));
+                    //结单报修数量
+                    repairUserInfo.setStatementAmount(Integer.toString(statementAmount));
+                    //退单报修数量
+                    repairUserInfo.setChargebackAmount(Integer.toString(chargebackAmount));
+                    //转单报修数量
+                    repairUserInfo.setTransferOrderAmount(Integer.toString(transferOrderAmount));
+                    //派单报修数量
+                    repairUserInfo.setDispatchAmount(Integer.toString(dispatchAmount));
+                    //员工id和姓名信息集合
+                    repairUserInfo.setRepairList(staffs);
+                    repairUserList.add(repairUserInfo);
+                } else {
+                    continue;
+                }
+            }
+        } else {
+            repairUserList = new ArrayList<>();
+        }
+
+        int size = repairUserList.size();
+        ResultVo resultVo = new ResultVo((int) Math.ceil((double) size / (double) repairUserDto.getRow()), size, repairUserList, staffs);
+
+        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+        return responseEntity;
+    }
+
     @Override
     public ResponseEntity<String> queryPrePayment(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) {
 

+ 24 - 0
service-report/src/main/java/com/java110/report/dao/IReportFeeMonthStatisticsServiceDao.java

@@ -249,4 +249,28 @@ public interface IReportFeeMonthStatisticsServiceDao {
      * @throws DAOException DAO异常
      */
     List<Map> getFeeConfigInfo(Map info) throws DAOException;
+
+    /**
+     * 查询维修师傅报修信息
+     *
+     * @param info
+     * @return
+     */
+    List<Map> getRepairUserInfo(Map info);
+
+    /**
+     * 查询报修信息
+     *
+     * @param info
+     * @return
+     */
+    List<Map> getRepairWithOutPage(Map info);
+
+    /**
+     * 获取报修员工表员工信息
+     *
+     * @param info
+     * @return
+     */
+    List<Map> getRepairStaff(Map info);
 }

+ 21 - 0
service-report/src/main/java/com/java110/report/dao/impl/ReportFeeMonthStatisticsServiceDaoImpl.java

@@ -359,4 +359,25 @@ public class ReportFeeMonthStatisticsServiceDaoImpl extends BaseServiceDao imple
         return businessFeeConfigInfos;
     }
 
+    @Override
+    public List<Map> getRepairUserInfo(Map info) {
+        logger.debug("查询报修配置信息 入参 info : {}", info);
+        List<Map> businessRepairUserInfos = sqlSessionTemplate.selectList("reportFeeMonthStatisticsServiceDaoImpl.getRepairInfo", info);
+        return businessRepairUserInfos;
+    }
+
+    @Override
+    public List<Map> getRepairWithOutPage(Map info) {
+        logger.debug("查询报修配置信息 入参 info : {}", info);
+        List<Map> businessRepairUserInfos = sqlSessionTemplate.selectList("reportFeeMonthStatisticsServiceDaoImpl.getRepairWithOutPage", info);
+        return businessRepairUserInfos;
+    }
+
+    @Override
+    public List<Map> getRepairStaff(Map info) {
+        logger.debug("查询报修配置信息 入参 info : {}", info);
+        List<Map> businessRepairUserInfos = sqlSessionTemplate.selectList("reportFeeMonthStatisticsServiceDaoImpl.queryRepairForStaff", info);
+        return businessRepairUserInfos;
+    }
+
 }

+ 44 - 0
service-report/src/main/java/com/java110/report/smo/impl/ReportFeeMonthStatisticsInnerServiceSMOImpl.java

@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.java110.core.base.smo.BaseServiceSMO;
 import com.java110.dto.PageDto;
 import com.java110.dto.fee.FeeConfigDto;
+import com.java110.dto.repair.RepairUserDto;
 import com.java110.dto.reportFeeMonthStatistics.ReportFeeMonthStatisticsDto;
 import com.java110.intf.report.IReportFeeMonthStatisticsInnerServiceSMO;
 import com.java110.po.reportFeeMonthStatistics.ReportFeeMonthStatisticsPo;
@@ -300,6 +301,49 @@ public class ReportFeeMonthStatisticsInnerServiceSMOImpl extends BaseServiceSMO
         return feeConfigs;
     }
 
+    /**
+     * 查询报修信息
+     *
+     * @param repairUserDto
+     * @return
+     */
+    @Override
+    public List<RepairUserDto> queryRepair(RepairUserDto repairUserDto) {
+        //校验是否传了 分页信息
+
+        int page = repairUserDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            repairUserDto.setPage((page - 1) * repairUserDto.getRow());
+        }
+        List<RepairUserDto> repairUserDtoList = BeanConvertUtil.covertBeanList(reportFeeMonthStatisticsServiceDaoImpl.getRepairUserInfo(BeanConvertUtil.beanCovertMap(repairUserDto)), RepairUserDto.class);
+        return repairUserDtoList;
+    }
+
+    /**
+     * 查询报修信息
+     *
+     * @param repairUserDto
+     * @return
+     */
+    @Override
+    public List<RepairUserDto> queryRepairWithOutPage(RepairUserDto repairUserDto) {
+        List<RepairUserDto> repairUserDtoList = BeanConvertUtil.covertBeanList(reportFeeMonthStatisticsServiceDaoImpl.getRepairWithOutPage(BeanConvertUtil.beanCovertMap(repairUserDto)), RepairUserDto.class);
+        return repairUserDtoList;
+    }
+
+    /**
+     * 查询员工报修表员工信息
+     *
+     * @param repairUserDto
+     * @return
+     */
+    @Override
+    public List<RepairUserDto> queryRepairForStaff(RepairUserDto repairUserDto) {
+        List<RepairUserDto> repairUserDtoList = BeanConvertUtil.covertBeanList(reportFeeMonthStatisticsServiceDaoImpl.getRepairStaff(BeanConvertUtil.beanCovertMap(repairUserDto)), RepairUserDto.class);
+        return repairUserDtoList;
+    }
+
 
     public IReportFeeMonthStatisticsServiceDao getReportFeeMonthStatisticsServiceDaoImpl() {
         return reportFeeMonthStatisticsServiceDaoImpl;