Procházet zdrojové kódy

优化购买月卡

wuxw před 1 rokem
rodič
revize
4e60facc19

+ 20 - 0
java110-bean/src/main/java/com/java110/dto/inspection/InspectionDto.java

@@ -46,6 +46,10 @@ public class InspectionDto extends PageDto implements Serializable {
     private String itemName;
     private String nfcCode;
 
+    private String lng;
+
+    private String lat;
+
 
     public String getInspectionId() {
         return inspectionId;
@@ -248,4 +252,20 @@ public class InspectionDto extends PageDto implements Serializable {
     public void setItemName(String itemName) {
         this.itemName = itemName;
     }
+
+    public String getLng() {
+        return lng;
+    }
+
+    public void setLng(String lng) {
+        this.lng = lng;
+    }
+
+    public String getLat() {
+        return lat;
+    }
+
+    public void setLat(String lat) {
+        this.lat = lat;
+    }
 }

+ 10 - 0
java110-bean/src/main/java/com/java110/dto/inspection/InspectionRouteDto.java

@@ -17,6 +17,8 @@ public class InspectionRouteDto extends PageDto implements Serializable {
 
     private String inspectionRouteId;
     private String routeName;
+
+    private String inspectionId;
     private int seq;
     private String remark;
 
@@ -91,4 +93,12 @@ public class InspectionRouteDto extends PageDto implements Serializable {
     public void setCommunityId(String communityId) {
         this.communityId = communityId;
     }
+
+    public String getInspectionId() {
+        return inspectionId;
+    }
+
+    public void setInspectionId(String inspectionId) {
+        this.inspectionId = inspectionId;
+    }
 }

+ 20 - 0
java110-bean/src/main/java/com/java110/po/inspection/InspectionPointPo.java

@@ -22,6 +22,10 @@ public class InspectionPointPo implements Serializable {
     private String itemId;
     private String nfcCode;
 
+    private String lng;
+
+    private String lat;
+
     public String statusCd="0";
 
     public String getInspectionId() {
@@ -105,4 +109,20 @@ public class InspectionPointPo implements Serializable {
     public void setStatusCd(String statusCd) {
         this.statusCd = statusCd;
     }
+
+    public String getLng() {
+        return lng;
+    }
+
+    public void setLng(String lng) {
+        this.lng = lng;
+    }
+
+    public String getLat() {
+        return lat;
+    }
+
+    public void setLat(String lat) {
+        this.lat = lat;
+    }
 }

+ 20 - 0
java110-bean/src/main/java/com/java110/vo/api/inspectionPoint/ApiInspectionPointDataVo.java

@@ -28,6 +28,10 @@ public class ApiInspectionPointDataVo implements Serializable {
     private String itemName;
     private String nfcCode;
 
+    private String lng;
+
+    private String lat;
+
     private String url;
 
     public String getInspectionId() {
@@ -221,4 +225,20 @@ public class ApiInspectionPointDataVo implements Serializable {
     public void setUrl(String url) {
         this.url = url;
     }
+
+    public String getLng() {
+        return lng;
+    }
+
+    public void setLng(String lng) {
+        this.lng = lng;
+    }
+
+    public String getLat() {
+        return lat;
+    }
+
+    public void setLat(String lat) {
+        this.lat = lat;
+    }
 }

+ 120 - 113
java110-db/src/main/resources/mapper/community/InspectionPointV1ServiceDaoImplMapper.xml

@@ -5,138 +5,145 @@
 <mapper namespace="inspectionPointV1ServiceDaoImpl">
 
 
-
-
-
     <!-- 保存巡检点信息 add by wuxw 2018-07-03 -->
     <insert id="saveInspectionPointInfo" parameterType="Map">
         insert into inspection_point(
-point_obj_name,item_id,inspection_id,point_obj_id,nfc_code,point_obj_type,remark,inspection_name,community_id
-) values (
-#{pointObjName},#{itemId},#{inspectionId},#{pointObjId},#{nfcCode},#{pointObjType},#{remark},#{inspectionName},#{communityId}
-)
+        point_obj_name,item_id,inspection_id,point_obj_id,nfc_code,point_obj_type,remark,inspection_name,community_id,
+        lng,lat
+        ) values (
+        #{pointObjName},#{itemId},#{inspectionId},#{pointObjId},#{nfcCode},#{pointObjType},#{remark},#{inspectionName},#{communityId},
+        #{lng},#{lat}
+        )
     </insert>
 
 
-
     <!-- 查询巡检点信息 add by wuxw 2018-07-03 -->
     <select id="getInspectionPointInfo" parameterType="Map" resultType="Map">
-        select  t.point_obj_name,t.point_obj_name pointObjName,t.item_id,t.item_id itemId,t.inspection_id,t.inspection_id inspectionId,t.point_obj_id,t.point_obj_id pointObjId,t.nfc_code,t.nfc_code nfcCode,t.point_obj_type,t.point_obj_type pointObjType,t.remark,t.status_cd,t.status_cd statusCd,t.inspection_name,t.inspection_name inspectionName,t.community_id,t.community_id communityId 
-from inspection_point t 
-where 1 =1 
-<if test="pointObjName !=null and pointObjName != ''">
-   and t.point_obj_name= #{pointObjName}
-</if> 
-<if test="itemId !=null and itemId != ''">
-   and t.item_id= #{itemId}
-</if> 
-<if test="inspectionId !=null and inspectionId != ''">
-   and t.inspection_id= #{inspectionId}
-</if> 
-<if test="pointObjId !=null and pointObjId != ''">
-   and t.point_obj_id= #{pointObjId}
-</if> 
-<if test="nfcCode !=null and nfcCode != ''">
-   and t.nfc_code= #{nfcCode}
-</if> 
-<if test="pointObjType !=null and pointObjType != ''">
-   and t.point_obj_type= #{pointObjType}
-</if> 
-<if test="remark !=null and remark != ''">
-   and t.remark= #{remark}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="inspectionName !=null and inspectionName != ''">
-   and t.inspection_name= #{inspectionName}
-</if> 
-<if test="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
-order by t.create_time desc
-<if test="page != -1 and page != null ">
-   limit #{page}, #{row}
-</if> 
+        select t.point_obj_name,t.point_obj_name pointObjName,t.item_id,t.item_id itemId,t.inspection_id,t.inspection_id
+        inspectionId,t.point_obj_id,t.point_obj_id pointObjId,t.nfc_code,t.nfc_code
+        nfcCode,t.point_obj_type,t.point_obj_type pointObjType,t.remark,t.status_cd,t.status_cd
+        statusCd,t.inspection_name,t.inspection_name inspectionName,t.community_id,t.community_id communityId,
+        t.lng,t.lat
+        from inspection_point t
+        where 1 =1
+        <if test="pointObjName !=null and pointObjName != ''">
+            and t.point_obj_name= #{pointObjName}
+        </if>
+        <if test="itemId !=null and itemId != ''">
+            and t.item_id= #{itemId}
+        </if>
+        <if test="inspectionId !=null and inspectionId != ''">
+            and t.inspection_id= #{inspectionId}
+        </if>
+        <if test="pointObjId !=null and pointObjId != ''">
+            and t.point_obj_id= #{pointObjId}
+        </if>
+        <if test="nfcCode !=null and nfcCode != ''">
+            and t.nfc_code= #{nfcCode}
+        </if>
+        <if test="pointObjType !=null and pointObjType != ''">
+            and t.point_obj_type= #{pointObjType}
+        </if>
+        <if test="remark !=null and remark != ''">
+            and t.remark= #{remark}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="inspectionName !=null and inspectionName != ''">
+            and t.inspection_name= #{inspectionName}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        order by t.create_time desc
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
 
     </select>
 
 
-
-
     <!-- 修改巡检点信息 add by wuxw 2018-07-03 -->
     <update id="updateInspectionPointInfo" parameterType="Map">
-        update  inspection_point t set t.status_cd = #{statusCd}
-<if test="newBId != null and newBId != ''">
-,t.b_id = #{newBId}
-</if> 
-<if test="pointObjName !=null and pointObjName != ''">
-, t.point_obj_name= #{pointObjName}
-</if> 
-<if test="itemId !=null and itemId != ''">
-, t.item_id= #{itemId}
-</if> 
-<if test="pointObjId !=null and pointObjId != ''">
-, t.point_obj_id= #{pointObjId}
-</if> 
-<if test="nfcCode !=null and nfcCode != ''">
-, t.nfc_code= #{nfcCode}
-</if> 
-<if test="pointObjType !=null and pointObjType != ''">
-, t.point_obj_type= #{pointObjType}
-</if> 
-<if test="remark !=null and remark != ''">
-, t.remark= #{remark}
-</if> 
-<if test="inspectionName !=null and inspectionName != ''">
-, t.inspection_name= #{inspectionName}
-</if> 
-<if test="communityId !=null and communityId != ''">
-, t.community_id= #{communityId}
-</if> 
- where 1=1 <if test="inspectionId !=null and inspectionId != ''">
-and t.inspection_id= #{inspectionId}
-</if> 
+        update inspection_point t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="pointObjName !=null and pointObjName != ''">
+            , t.point_obj_name= #{pointObjName}
+        </if>
+        <if test="itemId !=null and itemId != ''">
+            , t.item_id= #{itemId}
+        </if>
+        <if test="pointObjId !=null and pointObjId != ''">
+            , t.point_obj_id= #{pointObjId}
+        </if>
+        <if test="nfcCode !=null and nfcCode != ''">
+            , t.nfc_code= #{nfcCode}
+        </if>
+        <if test="pointObjType !=null and pointObjType != ''">
+            , t.point_obj_type= #{pointObjType}
+        </if>
+        <if test="remark !=null and remark != ''">
+            , t.remark= #{remark}
+        </if>
+        <if test="inspectionName !=null and inspectionName != ''">
+            , t.inspection_name= #{inspectionName}
+        </if>
+        <if test="lng !=null and lng != ''">
+            , t.lng= #{lng}
+        </if>
+        <if test="lat !=null and lat != ''">
+            , t.lat= #{lat}
+        </if>
+        where 1=1
+        <if test="inspectionId !=null and inspectionId != ''">
+            and t.inspection_id= #{inspectionId}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
 
     </update>
 
     <!-- 查询巡检点数量 add by wuxw 2018-07-03 -->
-     <select id="queryInspectionPointsCount" parameterType="Map" resultType="Map">
-        select  count(1) count 
-from inspection_point t 
-where 1 =1 
-<if test="pointObjName !=null and pointObjName != ''">
-   and t.point_obj_name= #{pointObjName}
-</if> 
-<if test="itemId !=null and itemId != ''">
-   and t.item_id= #{itemId}
-</if> 
-<if test="inspectionId !=null and inspectionId != ''">
-   and t.inspection_id= #{inspectionId}
-</if> 
-<if test="pointObjId !=null and pointObjId != ''">
-   and t.point_obj_id= #{pointObjId}
-</if> 
-<if test="nfcCode !=null and nfcCode != ''">
-   and t.nfc_code= #{nfcCode}
-</if> 
-<if test="pointObjType !=null and pointObjType != ''">
-   and t.point_obj_type= #{pointObjType}
-</if> 
-<if test="remark !=null and remark != ''">
-   and t.remark= #{remark}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="inspectionName !=null and inspectionName != ''">
-   and t.inspection_name= #{inspectionName}
-</if> 
-<if test="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
+    <select id="queryInspectionPointsCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from inspection_point t
+        where 1 =1
+        <if test="pointObjName !=null and pointObjName != ''">
+            and t.point_obj_name= #{pointObjName}
+        </if>
+        <if test="itemId !=null and itemId != ''">
+            and t.item_id= #{itemId}
+        </if>
+        <if test="inspectionId !=null and inspectionId != ''">
+            and t.inspection_id= #{inspectionId}
+        </if>
+        <if test="pointObjId !=null and pointObjId != ''">
+            and t.point_obj_id= #{pointObjId}
+        </if>
+        <if test="nfcCode !=null and nfcCode != ''">
+            and t.nfc_code= #{nfcCode}
+        </if>
+        <if test="pointObjType !=null and pointObjType != ''">
+            and t.point_obj_type= #{pointObjType}
+        </if>
+        <if test="remark !=null and remark != ''">
+            and t.remark= #{remark}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="inspectionName !=null and inspectionName != ''">
+            and t.inspection_name= #{inspectionName}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
 
 
-     </select>
+    </select>
 
 </mapper>

+ 3 - 1
java110-db/src/main/resources/mapper/community/InspectionServiceDaoImplMapper.xml

@@ -74,7 +74,9 @@
         t.inspection_name,t.inspection_name inspectionName,t.community_id,
         t.community_id communityId,t.b_id,t.b_id bId,
         t.point_obj_type,t.point_obj_type pointObjType,td.name pointTypeName,t.point_obj_id,
-        t.point_obj_id pointObjId,t.point_obj_name,t.point_obj_name pointObjName,t.item_id ,t.item_id itemId,t.nfc_code,t.nfc_code nfcCode,ii.item_name itemName
+        t.point_obj_id pointObjId,t.point_obj_name,t.point_obj_name pointObjName,t.item_id ,
+        t.item_id itemId,t.nfc_code,t.nfc_code nfcCode,ii.item_name itemName,
+        t.lng,t.lat
         from inspection_point t
         LEFT JOIN inspection_item ii on t.item_id = ii.item_id and ii.status_cd = '0'
         <if test="inspectionRouteId != null  and  inspectionRouteId != ''">

+ 0 - 1
java110-utils/src/main/java/com/java110/utils/util/CodeMapUtil.java

@@ -3,7 +3,6 @@
  * <p>
  * 版本信息:
  * 日期:2017-3-1
- * Copyright 亚信联创 Corporation 2017
  * 版权所有
  */
 package com.java110.utils.util;

+ 0 - 1
java110-utils/src/main/java/com/java110/utils/util/ServiceBusinessUtil.java

@@ -3,7 +3,6 @@
  * <p>
  * 版本信息:
  * 日期:2017-3-1
- * Copyright 亚信联创 Corporation 2017
  * 版权所有
  */
 package com.java110.utils.util;

+ 3 - 2
service-acct/src/main/java/com/java110/acct/payment/business/monthCard/BuyCarMonthCardPaymentBusiness.java

@@ -11,6 +11,7 @@ import com.java110.dto.IotDataDto;
 import com.java110.dto.community.CommunityMemberDto;
 import com.java110.dto.fee.FeeAttrDto;
 import com.java110.dto.fee.FeeConfigDto;
+import com.java110.dto.fee.FeeDetailDto;
 import com.java110.dto.fee.FeeDto;
 import com.java110.dto.owner.OwnerCarDto;
 import com.java110.dto.owner.OwnerDto;
@@ -244,7 +245,7 @@ public class BuyCarMonthCardPaymentBusiness implements IPaymentBusiness {
         payFeeDetailPo.setReceivedAmount(reqJson.getString("receivedAmount"));
         payFeeDetailPo.setReceivableAmount(reqJson.getString("receivedAmount"));
         payFeeDetailPo.setCycles("1");
-        payFeeDetailPo.setPrimeRate(reqJson.getString("primeRate"));
+        payFeeDetailPo.setPrimeRate(FeeDetailDto.PRIME_REATE_WECHAT);
         payFeeDetailPo.setFeeId(payFeePo.getFeeId());
         payFeeDetailPo.setStartTime(payFeePo.getStartTime());
         payFeeDetailPo.setEndTime(DateUtil.getPreSecTime(payFeePo.getEndTime()));
@@ -275,7 +276,7 @@ public class BuyCarMonthCardPaymentBusiness implements IPaymentBusiness {
         paramIn.put("cardId", reqJson.getString("cardId"));
         paramIn.put("carNum", reqJson.getString("carNum"));
         paramIn.put("communityId", reqJson.getString("communityId"));
-        paramIn.put("primeRate", reqJson.getString("primeRate"));
+        paramIn.put("primeRate", payFeeDetailPo.getPrimeRate());
         paramIn.put("receivedAmount", reqJson.getString("receivedAmount"));
         paramIn.put("endTime", endTime);
         paramIn.put("cashierId", userId);

+ 2 - 0
service-community/src/main/java/com/java110/community/cmd/inspectionPoint/SaveInspectionPointCmd.java

@@ -25,6 +25,8 @@ public class SaveInspectionPointCmd extends Cmd {
         Assert.hasKeyAndValue(reqJson, "pointObjId", "必填,请填写位置信息");
         Assert.hasKeyAndValue(reqJson, "pointObjType", "必填,请填写巡检类型");
         Assert.hasKeyAndValue(reqJson, "pointObjName", "必填,请填写位置信息");
+        Assert.hasKeyAndValue(reqJson, "lng", "必填,请填写经度");
+        Assert.hasKeyAndValue(reqJson, "lat", "必填,请填写纬度");
     }
 
     @Override

+ 5 - 5
service-community/src/main/java/com/java110/community/dao/impl/InspectionPointV1ServiceDaoImpl.java

@@ -71,9 +71,9 @@ public class InspectionPointV1ServiceDaoImpl extends BaseServiceDao implements I
     public List<Map> getInspectionPointInfo(Map info) throws DAOException {
         logger.debug("查询 getInspectionPointInfo 入参 info : {}",info);
 
-        List<Map> businessInspectionPointInfos = sqlSessionTemplate.selectList("inspectionPointV1ServiceDaoImpl.getInspectionPointInfo",info);
+        List<Map> infos = sqlSessionTemplate.selectList("inspectionPointV1ServiceDaoImpl.getInspectionPointInfo",info);
 
-        return businessInspectionPointInfos;
+        return infos;
     }
 
 
@@ -100,12 +100,12 @@ public class InspectionPointV1ServiceDaoImpl extends BaseServiceDao implements I
     public int queryInspectionPointsCount(Map info) {
         logger.debug("查询 queryInspectionPointsCount 入参 info : {}",info);
 
-        List<Map> businessInspectionPointInfos = sqlSessionTemplate.selectList("inspectionPointV1ServiceDaoImpl.queryInspectionPointsCount", info);
-        if (businessInspectionPointInfos.size() < 1) {
+        List<Map> infos = sqlSessionTemplate.selectList("inspectionPointV1ServiceDaoImpl.queryInspectionPointsCount", info);
+        if (infos.size() < 1) {
             return 0;
         }
 
-        return Integer.parseInt(businessInspectionPointInfos.get(0).get("count").toString());
+        return Integer.parseInt(infos.get(0).get("count").toString());
     }
 
 

+ 3 - 3
service-community/src/main/java/com/java110/community/dao/impl/InspectionRouteServiceDaoImpl.java

@@ -118,12 +118,12 @@ public class InspectionRouteServiceDaoImpl extends BaseServiceDao implements IIn
     public int queryInspectionRoutesCount(Map info) {
         logger.debug("查询巡检路线数据 入参 info : {}",info);
 
-        List<Map> businessInspectionRouteInfos = sqlSessionTemplate.selectList("inspectionRouteServiceDaoImpl.queryInspectionRoutesCount", info);
-        if (businessInspectionRouteInfos.size() < 1) {
+        List<Map> infos = sqlSessionTemplate.selectList("inspectionRouteServiceDaoImpl.queryInspectionRoutesCount", info);
+        if (infos.size() < 1) {
             return 0;
         }
 
-        return Integer.parseInt(businessInspectionRouteInfos.get(0).get("count").toString());
+        return Integer.parseInt(infos.get(0).get("count").toString());
     }