1、优化图片异步上传2、bug修复3、合同bug修复4、车场相关问题
| | |
| | | private String cycles; |
| | | private String remark; |
| | | private String receivedAmount; |
| | | private String payableAmount; |
| | | private String communityId; |
| | | private String feeId; |
| | | private String bId; |
| | |
| | | public void setFeeId(String feeId) { |
| | | this.feeId = feeId; |
| | | } |
| | | |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | |
| | | public void setPayFeeDetailDiscountDtoList(List<PayFeeDetailDiscountDto> payFeeDetailDiscountDtoList) { |
| | | this.payFeeDetailDiscountDtoList = payFeeDetailDiscountDtoList; |
| | | } |
| | | |
| | | public String getPayableAmount() { |
| | | return payableAmount; |
| | | } |
| | | |
| | | public void setPayableAmount(String payableAmount) { |
| | | this.payableAmount = payableAmount; |
| | | } |
| | | } |
| | |
| | | public static final String LEASE_TYPE_SALE = "S"; // 出售车 |
| | | public static final String LEASE_TYPE_INNER = "I"; //内部车 |
| | | public static final String LEASE_TYPE_NO_MONEY = "NM"; //免费车 |
| | | public static final String LEASE_TYPE_RESERVE = "R"; //预约车 |
| | | |
| | | public static final String LEASE_TYPE_TEMP = "T";//临时车 |
| | | |
| | |
| | | |
| | | private String bId; |
| | | private String carTypeCd; |
| | | private String carTypeCdName; |
| | | private String[] carTypeCds; |
| | | private String memberId; |
| | | private String unitId; |
| | |
| | | public void setCarId(String carId) { |
| | | this.carId = carId; |
| | | } |
| | | |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | |
| | | public void setPaIds(String[] paIds) { |
| | | this.paIds = paIds; |
| | | } |
| | | public String getCarTypeCdName() { |
| | | return carTypeCdName; |
| | | } |
| | | |
| | | public void setCarTypeCdName(String carTypeCdName) { |
| | | this.carTypeCdName = carTypeCdName; |
| | | } |
| | | } |
| | |
| | | |
| | | private List<String> urls; |
| | | |
| | | private String url; |
| | | |
| | | public String getSex() { |
| | | return sex; |
| | | } |
| | |
| | | public void setUrls(List<String> urls) { |
| | | this.urls = urls; |
| | | } |
| | | |
| | | public String getUrl() { |
| | | return url; |
| | | } |
| | | |
| | | public void setUrl(String url) { |
| | | this.url = url; |
| | | } |
| | | } |
| | |
| | | private String objName; |
| | | private String objNameNum; |
| | | private String receivedAmount; |
| | | private String payableAmount; |
| | | private String feeYear; |
| | | private String feeMonth; |
| | | private String feeId; |
| | |
| | | public void setGiftAmount(String giftAmount) { |
| | | this.giftAmount = giftAmount; |
| | | } |
| | | |
| | | public String getPayableAmount() { |
| | | return payableAmount; |
| | | } |
| | | |
| | | public void setPayableAmount(String payableAmount) { |
| | | this.payableAmount = payableAmount; |
| | | } |
| | | } |
| | |
| | | private String cycles; |
| | | private String receivableAmount; |
| | | private String receivedAmount; |
| | | private String payableAmount; |
| | | private String primeRate; |
| | | private String remark; |
| | | private String startTime; |
| | |
| | | public void setbId(String bId) { |
| | | this.bId = bId; |
| | | } |
| | | |
| | | public String getPayableAmount() { |
| | | return payableAmount; |
| | | } |
| | | |
| | | public void setPayableAmount(String payableAmount) { |
| | | this.payableAmount = payableAmount; |
| | | } |
| | | } |
| | |
| | | private String taskType; |
| | | |
| | | private String state; |
| | | private String statusCd; |
| | | private String statusCd = "0"; |
| | | |
| | | public String getTaskId() { |
| | | return taskId; |
| | |
| | | |
| | | private List<String> urls; |
| | | |
| | | private String url; |
| | | |
| | | public String getOwnerId() { |
| | | return ownerId; |
| | | } |
| | |
| | | public void setUrls(List<String> urls) { |
| | | this.urls = urls; |
| | | } |
| | | |
| | | public String getUrl() { |
| | | return url; |
| | | } |
| | | |
| | | public void setUrl(String url) { |
| | | this.url = url; |
| | | } |
| | | } |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="noticeV1ServiceDaoImpl"> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 保存通知信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveNoticeInfo" parameterType="Map"> |
| | | insert into n_notice( |
| | | notice_type_cd,context,obj_id,start_time,end_time,state,title,community_id,user_id,obj_type,notice_id |
| | | ) values ( |
| | | #{noticeTypeCd},#{context},#{objId},#{startTime},#{endTime},#{state},#{title},#{communityId},#{userId},#{objType},#{noticeId} |
| | | ) |
| | | insert into n_notice(notice_type_cd, context, obj_id, start_time, end_time, state, title, community_id, user_id, |
| | | obj_type, notice_id) |
| | | values (#{noticeTypeCd}, #{context}, #{objId}, #{startTime}, #{endTime}, #{state}, #{title}, #{communityId}, |
| | | #{userId}, #{objType}, #{noticeId}) |
| | | </insert> |
| | | |
| | | |
| | | |
| | | <!-- 查询通知信息 add by wuxw 2018-07-03 --> |
| | | <select id="getNoticeInfo" parameterType="Map" resultType="Map"> |
| | | select t.notice_type_cd,t.notice_type_cd noticeTypeCd,t.context,t.obj_id,t.obj_id objId,t.start_time,t.start_time startTime,t.status_cd,t.status_cd statusCd,t.end_time,t.end_time endTime,t.state,t.title,t.community_id,t.community_id communityId,t.user_id,t.user_id userId,t.obj_type,t.obj_type objType,t.notice_id,t.notice_id noticeId |
| | | from n_notice t |
| | | where 1 =1 |
| | | <if test="noticeTypeCd !=null and noticeTypeCd != ''"> |
| | | and t.notice_type_cd= #{noticeTypeCd} |
| | | </if> |
| | | <if test="context !=null and context != ''"> |
| | | and t.context= #{context} |
| | | </if> |
| | | <if test="objId !=null and objId != ''"> |
| | | and t.obj_id= #{objId} |
| | | </if> |
| | | <if test="startTime !=null and startTime != ''"> |
| | | and t.start_time= #{startTime} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="endTime !=null and endTime != ''"> |
| | | and t.end_time= #{endTime} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="title !=null and title != ''"> |
| | | and t.title= #{title} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | and t.user_id= #{userId} |
| | | </if> |
| | | <if test="objType !=null and objType != ''"> |
| | | and t.obj_type= #{objType} |
| | | </if> |
| | | <if test="noticeId !=null and noticeId != ''"> |
| | | and t.notice_id= #{noticeId} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | select t.notice_type_cd,t.notice_type_cd noticeTypeCd,t.context,t.obj_id,t.obj_id |
| | | objId,t.start_time,t.start_time startTime,t.status_cd,t.status_cd statusCd,t.end_time,t.end_time |
| | | endTime,t.state,t.title,t.community_id,t.community_id communityId,t.user_id,t.user_id |
| | | userId,t.obj_type,t.obj_type objType,t.notice_id,t.notice_id noticeId |
| | | from n_notice t |
| | | where 1 =1 |
| | | <if test="noticeTypeCd !=null and noticeTypeCd != ''"> |
| | | and t.notice_type_cd= #{noticeTypeCd} |
| | | </if> |
| | | <if test="context !=null and context != ''"> |
| | | and t.context= #{context} |
| | | </if> |
| | | <if test="objId !=null and objId != ''"> |
| | | and t.obj_id= #{objId} |
| | | </if> |
| | | <if test="startTime !=null and startTime != ''"> |
| | | and t.start_time= #{startTime} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="endTime !=null and endTime != ''"> |
| | | and t.end_time= #{endTime} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="title !=null and title != ''"> |
| | | and t.title= #{title} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | and t.user_id= #{userId} |
| | | </if> |
| | | <if test="objType !=null and objType != ''"> |
| | | and t.obj_type= #{objType} |
| | | </if> |
| | | <if test="noticeId !=null and noticeId != ''"> |
| | | and t.notice_id= #{noticeId} |
| | | </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="updateNoticeInfo" parameterType="Map"> |
| | | update n_notice t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="noticeTypeCd !=null and noticeTypeCd != ''"> |
| | | , t.notice_type_cd= #{noticeTypeCd} |
| | | </if> |
| | | <if test="context !=null and context != ''"> |
| | | , t.context= #{context} |
| | | </if> |
| | | <if test="objId !=null and objId != ''"> |
| | | , t.obj_id= #{objId} |
| | | </if> |
| | | <if test="startTime !=null and startTime != ''"> |
| | | , t.start_time= #{startTime} |
| | | </if> |
| | | <if test="endTime !=null and endTime != ''"> |
| | | , t.end_time= #{endTime} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | , t.state= #{state} |
| | | </if> |
| | | <if test="title !=null and title != ''"> |
| | | , t.title= #{title} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | , t.community_id= #{communityId} |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | , t.user_id= #{userId} |
| | | </if> |
| | | <if test="objType !=null and objType != ''"> |
| | | , t.obj_type= #{objType} |
| | | </if> |
| | | where 1=1 <if test="noticeId !=null and noticeId != ''"> |
| | | and t.notice_id= #{noticeId} |
| | | </if> |
| | | |
| | | update n_notice t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="noticeTypeCd !=null and noticeTypeCd != ''"> |
| | | , t.notice_type_cd= #{noticeTypeCd} |
| | | </if> |
| | | <if test="context !=null and context != ''"> |
| | | , t.context= #{context} |
| | | </if> |
| | | <if test="objId !=null and objId != ''"> |
| | | , t.obj_id= #{objId} |
| | | </if> |
| | | <if test="startTime !=null and startTime != ''"> |
| | | , t.start_time= #{startTime} |
| | | </if> |
| | | <if test="endTime !=null and endTime != ''"> |
| | | , t.end_time= #{endTime} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | , t.state= #{state} |
| | | </if> |
| | | <if test="title !=null and title != ''"> |
| | | , t.title= #{title} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | , t.community_id= #{communityId} |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | , t.user_id= #{userId} |
| | | </if> |
| | | <if test="objType !=null and objType != ''"> |
| | | , t.obj_type= #{objType} |
| | | </if> |
| | | where 1=1 |
| | | <if test="noticeId !=null and noticeId != ''"> |
| | | and t.notice_id= #{noticeId} |
| | | </if> |
| | | </update> |
| | | |
| | | <!-- 查询通知数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryNoticesCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from n_notice t |
| | | where 1 =1 |
| | | <if test="noticeTypeCd !=null and noticeTypeCd != ''"> |
| | | and t.notice_type_cd= #{noticeTypeCd} |
| | | </if> |
| | | <if test="context !=null and context != ''"> |
| | | and t.context= #{context} |
| | | </if> |
| | | <if test="objId !=null and objId != ''"> |
| | | and t.obj_id= #{objId} |
| | | </if> |
| | | <if test="startTime !=null and startTime != ''"> |
| | | and t.start_time= #{startTime} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="endTime !=null and endTime != ''"> |
| | | and t.end_time= #{endTime} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="title !=null and title != ''"> |
| | | and t.title= #{title} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | and t.user_id= #{userId} |
| | | </if> |
| | | <if test="objType !=null and objType != ''"> |
| | | and t.obj_type= #{objType} |
| | | </if> |
| | | <if test="noticeId !=null and noticeId != ''"> |
| | | and t.notice_id= #{noticeId} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | <select id="queryNoticesCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from n_notice t |
| | | where 1 =1 |
| | | <if test="noticeTypeCd !=null and noticeTypeCd != ''"> |
| | | and t.notice_type_cd= #{noticeTypeCd} |
| | | </if> |
| | | <if test="context !=null and context != ''"> |
| | | and t.context= #{context} |
| | | </if> |
| | | <if test="objId !=null and objId != ''"> |
| | | and t.obj_id= #{objId} |
| | | </if> |
| | | <if test="startTime !=null and startTime != ''"> |
| | | and t.start_time= #{startTime} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="endTime !=null and endTime != ''"> |
| | | and t.end_time= #{endTime} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="title !=null and title != ''"> |
| | | and t.title= #{title} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | and t.user_id= #{userId} |
| | | </if> |
| | | <if test="objType !=null and objType != ''"> |
| | | and t.obj_type= #{objType} |
| | | </if> |
| | | <if test="noticeId !=null and noticeId != ''"> |
| | | and t.notice_id= #{noticeId} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="parkingBoxAreaV1ServiceDaoImpl"> |
| | | |
| | | |
| | | <!-- 保存停车场岗亭信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveParkingBoxAreaInfo" parameterType="Map"> |
| | | insert into parking_box_area( |
| | | default_area,ba_id,pa_id,remark,community_id,box_id |
| | | ) values ( |
| | | #{defaultArea},#{baId},#{paId},#{remark},#{communityId},#{boxId} |
| | | ) |
| | | insert into parking_box_area(default_area, ba_id, pa_id, remark, community_id, box_id) |
| | | values (#{defaultArea}, #{baId}, #{paId}, #{remark}, #{communityId}, #{boxId}) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询停车场岗亭信息 add by wuxw 2018-07-03 --> |
| | | <select id="getParkingBoxAreaInfo" parameterType="Map" resultType="Map"> |
| | | select t.default_area,t.default_area defaultArea,t.ba_id,t.ba_id baId,t.pa_id,t.pa_id |
| | | paId,t.remark,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,t.box_id,t.box_id boxId, |
| | | paId,t.remark,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,t.box_id,t.box_id |
| | | boxId, |
| | | pa.num paNum,t.create_time createTime |
| | | from parking_box_area t |
| | | left join parking_area pa on t.pa_id = pa.pa_id and t.community_id = pa.community_id and pa.status_cd = '0' |
| | |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改停车场岗亭信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateParkingBoxAreaInfo" parameterType="Map"> |
| | |
| | | <if test="remark !=null and remark != ''"> |
| | | , t.remark= #{remark} |
| | | </if> |
| | | |
| | | where 1=1 |
| | | <if test="baId !=null and baId != ''"> |
| | | and t.ba_id= #{baId} |
| | |
| | | <if test="boxId !=null and boxId != ''"> |
| | | and t.box_id= #{boxId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询停车场岗亭数量 add by wuxw 2018-07-03 --> |
| | |
| | | <if test="boxId !=null and boxId != ''"> |
| | | and t.box_id= #{boxId} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <select id="queryParkingBoxsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from parking_box t |
| | | left join parking_box_area pba on t.box_id = pba.box_id and pba.default_area = 'T' and pba.status_cd ='0' |
| | | left join parking_area pa on pba.pa_id = pa.pa_id and pa.community_id = t.community_id and pa.status_cd = '0' |
| | | where 1 =1 |
| | | <if test="yelowCarIn !=null and yelowCarIn != ''"> |
| | | and t.yelow_car_in= #{yelowCarIn} |
| | |
| | | <if test="boxId !=null and boxId != ''"> |
| | | and t.box_id= #{boxId} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="feeDetailServiceDaoImpl"> |
| | | |
| | | <!-- 保存费用明细信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveBusinessFeeDetailInfo" parameterType="Map"> |
| | | insert into |
| | | business_pay_fee_detail( |
| | | operate,prime_rate,detail_id, |
| | | receivable_amount,cycles,remark, |
| | | received_amount,community_id,b_id,fee_id,state,start_time,end_time |
| | | received_amount,community_id,b_id,fee_id,state,start_time,end_time,payable_amount |
| | | <if test="createTime != null"> |
| | | ,create_time |
| | | </if> |
| | | ) values ( |
| | | #{operate},#{primeRate},#{detailId},#{receivableAmount}, |
| | | #{cycles},#{remark},#{receivedAmount},#{communityId},#{bId},#{feeId},#{state},#{startTime},#{endTime} |
| | | #{cycles},#{remark},#{receivedAmount},#{communityId},#{bId},#{feeId},#{state},#{startTime},#{endTime},#{payableAmount} |
| | | <if test="createTime != null"> |
| | | ,#{createTime} |
| | | </if> |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询费用明细信息(Business) add by wuxw 2018-07-03 --> |
| | | <select id="getBusinessFeeDetailInfo" parameterType="Map" resultType="Map"> |
| | |
| | | t.receivable_amount receivableAmount,t.cycles, |
| | | t.remark,t.received_amount,t.received_amount receivedAmount, |
| | | t.community_id,t.community_id communityId,t.b_id,t.b_id bId, |
| | | t.fee_id,t.fee_id feeId,t.state,t.start_time,t.end_time,t.start_time startTime,t.end_time endTime |
| | | t.fee_id,t.fee_id feeId,t.state,t.start_time,t.end_time,t.start_time startTime,t.end_time endTime, |
| | | t.payable_amount,t.payable_amount payableAmount |
| | | from business_pay_fee_detail t |
| | | where 1 =1 |
| | | <if test="operate !=null and operate != ''"> |
| | |
| | | </if> |
| | | <if test="receivableAmount !=null and receivableAmount != ''"> |
| | | and t.receivable_amount= #{receivableAmount} |
| | | </if> |
| | | <if test="payableAmount !=null and payableAmount != ''"> |
| | | and t.payable_amount= #{payableAmount} |
| | | </if> |
| | | <if test="cycles !=null and cycles != ''"> |
| | | and t.cycles= #{cycles} |
| | |
| | | <if test="feeId !=null and feeId != ''"> |
| | | and t.fee_id= #{feeId} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 保存费用明细信息至 instance表中 add by wuxw 2018-07-03 --> |
| | | <insert id="saveFeeDetailInfoInstance" parameterType="Map"> |
| | | insert into |
| | | pay_fee_detail( |
| | | prime_rate,detail_id,receivable_amount,cycles,remark,status_cd,received_amount,community_id,b_id,fee_id,state,start_time,end_time,create_time) |
| | | prime_rate,detail_id,receivable_amount,cycles,remark,status_cd,received_amount,community_id,b_id,fee_id,state,start_time,end_time,create_time,payable_amount) |
| | | select |
| | | t.prime_rate,t.detail_id,t.receivable_amount,t.cycles,t.remark,'0',t.received_amount,t.community_id,t.b_id,t.fee_id,state,t.start_time,t.end_time,t.create_time |
| | | t.prime_rate,t.detail_id,t.receivable_amount,t.cycles,t.remark,'0',t.received_amount,t.community_id,t.b_id,t.fee_id,state,t.start_time,t.end_time, |
| | | t.create_time,t.payable_amount |
| | | from business_pay_fee_detail t where 1=1 |
| | | and t.operate= 'ADD' |
| | | <if test="primeRate !=null and primeRate != ''"> |
| | |
| | | <if test="receivedAmount !=null and receivedAmount != ''"> |
| | | and t.received_amount= #{receivedAmount} |
| | | </if> |
| | | <if test="payableAmount !=null and payableAmount != ''"> |
| | | and t.payable_amount= #{payableAmount} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | |
| | | <if test="feeId !=null and feeId != ''"> |
| | | and t.fee_id= #{feeId} |
| | | </if> |
| | | |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询费用明细信息 add by wuxw 2018-07-03 --> |
| | | <select id="getFeeDetailInfo" parameterType="Map" resultType="Map"> |
| | |
| | | t.receivable_amount,t.receivable_amount receivableAmount, |
| | | t.cycles,t.remark,t.status_cd,t.status_cd statusCd,t.received_amount,t.received_amount receivedAmount, |
| | | t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.fee_id,t.fee_id feeId ,t.create_time createTime, |
| | | t.state,d.name stateName,t.start_time,t.end_time,t.start_time startTime,t.end_time endTime,pfa.`value` importFeeName,pfc.fee_name feeName, |
| | | mw.cur_degrees curDegrees,mw.pre_degrees preDegrees, mw.pre_reading_time preReadingTime,mw.cur_reading_time curReadingTime |
| | | t.state,d.name stateName,t.start_time,t.end_time,t.start_time startTime,t.end_time endTime,pfa.`value` |
| | | importFeeName,pfc.fee_name feeName,t.payable_amount,t.payable_amount payableAmount, |
| | | mw.cur_degrees curDegrees,mw.pre_degrees preDegrees, mw.pre_reading_time preReadingTime,mw.cur_reading_time |
| | | curReadingTime |
| | | from pay_fee_detail t |
| | | left join pay_fee_attrs pfa on t.fee_id = pfa.fee_id and pfa.spec_cd = '390002' |
| | | left join pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | |
| | | and pf.payer_obj_id = #{payerObjId} |
| | | </if> |
| | | <if test="ownerId != null and ownerId != ''"> |
| | | and pfao.value = #{ownerId} |
| | | and pfao.value = #{ownerId} |
| | | </if> |
| | | <if test="primeRate !=null and primeRate != ''"> |
| | | and t.prime_rate= #{primeRate} |
| | |
| | | </if> |
| | | <if test="receivedAmount !=null and receivedAmount != ''"> |
| | | and t.received_amount= #{receivedAmount} |
| | | </if> |
| | | <if test="payableAmount !=null and payableAmount != ''"> |
| | | and t.payable_amount= #{payableAmount} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改费用明细信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateFeeDetailInfoInstance" parameterType="Map"> |
| | | update pay_fee_detail t set t.status_cd = #{statusCd} |
| | |
| | | <if test="receivedAmount !=null and receivedAmount != ''"> |
| | | , t.received_amount= #{receivedAmount} |
| | | </if> |
| | | <if test="payableAmount !=null and payableAmount != ''"> |
| | | , t.payable_amount= #{payableAmount} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | , t.community_id= #{communityId} |
| | | </if> |
| | |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询费用明细数量 add by wuxw 2018-07-03 --> |
| | |
| | | and pf.payer_obj_id = #{payerObjId} |
| | | </if> |
| | | <if test="ownerId != null and ownerId != ''"> |
| | | and pfa.value = #{ownerId} |
| | | and pfa.value = #{ownerId} |
| | | </if> |
| | | <if test="primeRate !=null and primeRate != ''"> |
| | | and t.prime_rate= #{primeRate} |
| | |
| | | <if test="receivedAmount !=null and receivedAmount != ''"> |
| | | and t.received_amount= #{receivedAmount} |
| | | </if> |
| | | <if test="payableAmount !=null and payableAmount != ''"> |
| | | and t.payable_amount= #{payableAmount} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | |
| | | <if test="curYear != null and curYear != ''"> |
| | | and DATE_FORMAT(DATE_SUB(t.end_time,INTERVAL 1 DAY),'%Y') = #{curYear} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | <!-- 保存费用明细信息至 instance表中 add by wuxw 2018-07-03 --> |
| | | <insert id="saveFeeDetail" parameterType="Map"> |
| | | insert into |
| | | pay_fee_detail( |
| | | prime_rate,detail_id,receivable_amount,cycles,remark,status_cd,received_amount,community_id,b_id,fee_id,state,start_time,end_time |
| | | prime_rate,detail_id,receivable_amount,cycles,remark,status_cd,received_amount,community_id,b_id,fee_id,state,start_time,end_time,payable_amount |
| | | <if test="createTime != null and createTime != ''"> |
| | | ,create_time |
| | | </if> |
| | | |
| | | ) |
| | | values(#{primeRate},#{detailId},#{receivableAmount},#{cycles},#{remark},'0',#{receivedAmount},#{communityId},'-1',#{feeId},#{state}, |
| | | #{startTime},#{endTime} |
| | | #{startTime},#{endTime},#{payableAmount} |
| | | <if test="createTime != null and createTime != ''"> |
| | | ,#{createTime} |
| | | </if> |
| | | ) |
| | | |
| | | </insert> |
| | | |
| | | </mapper> |
| | |
| | | <!-- 保存费用明细信息 add by wuxw 2018-07-03 --> |
| | | <insert id="savePayFeeDetailNewInfo" parameterType="Map"> |
| | | insert into pay_fee_detail( |
| | | prime_rate,detail_id,receivable_amount,cycles,remark,start_time,received_amount,state,end_time,community_id,fee_id,b_id |
| | | prime_rate,detail_id,receivable_amount,cycles,remark,start_time,received_amount,state,end_time,community_id,fee_id,b_id,payable_amount |
| | | <if test="createTime != null"> |
| | | ,create_time |
| | | </if> |
| | | ) values ( |
| | | #{primeRate},#{detailId},#{receivableAmount},#{cycles},#{remark},#{startTime},#{receivedAmount},#{state},#{endTime},#{communityId},#{feeId},#{bId} |
| | | #{primeRate},#{detailId},#{receivableAmount},#{cycles},#{remark},#{startTime},#{receivedAmount},#{state},#{endTime},#{communityId},#{feeId},#{bId},#{payableAmount} |
| | | <if test="createTime != null"> |
| | | ,#{createTime} |
| | | </if> |
| | |
| | | detailId,t.receivable_amount,t.receivable_amount receivableAmount,t.cycles,t.remark,t.status_cd,t.status_cd |
| | | statusCd,t.start_time,t.start_time startTime,t.received_amount,t.received_amount |
| | | receivedAmount,t.state,t.end_time,t.end_time endTime,t.community_id,t.community_id communityId,t.fee_id,t.fee_id |
| | | feeId |
| | | feeId,t.payable_amount,t.payable_amount payableAmount |
| | | from pay_fee_detail t |
| | | where 1 =1 |
| | | <if test="primeRate !=null and primeRate != ''"> |
| | |
| | | </if> |
| | | <if test="receivedAmount !=null and receivedAmount != ''"> |
| | | and t.received_amount= #{receivedAmount} |
| | | </if> |
| | | <if test="payableAmount !=null and payableAmount != ''"> |
| | | and t.payable_amount= #{payableAmount} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | |
| | | </if> |
| | | <if test="receivedAmount !=null and receivedAmount != ''"> |
| | | , t.received_amount= #{receivedAmount} |
| | | </if> |
| | | <if test="payableAmount !=null and payableAmount != ''"> |
| | | , t.payable_amount= #{payableAmount} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | , t.state= #{state} |
| | |
| | | <if test="receivedAmount !=null and receivedAmount != ''"> |
| | | and t.received_amount= #{receivedAmount} |
| | | </if> |
| | | <if test="payableAmount !=null and payableAmount != ''"> |
| | | and t.payable_amount= #{payableAmount} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | |
| | | select count(1) count |
| | | from wechat_menu t |
| | | where 1 =1 |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="pagepath !=null and pagepath != ''"> |
| | | and t.pagepath= #{pagepath} |
| | | </if> |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="orgServiceDaoImpl"> |
| | | |
| | |
| | | <if test="allowOperation !=null and allowOperation != ''"> |
| | | and t.allow_operation= #{allowOperation} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 保存组织信息至 instance表中 add by wuxw 2018-07-03 --> |
| | | <insert id="saveOrgInfoInstance" parameterType="Map"> |
| | |
| | | <if test="allowOperation !=null and allowOperation != ''"> |
| | | and t.allow_operation= #{allowOperation} |
| | | </if> |
| | | |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询组织信息 add by wuxw 2018-07-03 --> |
| | | <select id="getOrgInfo" parameterType="Map" resultType="Map"> |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改组织信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateOrgInfoInstance" parameterType="Map"> |
| | | update u_org t set t.status_cd = #{statusCd} |
| | |
| | | <if test="orgId !=null and orgId != ''"> |
| | | and t.org_id= #{orgId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询组织数量 add by wuxw 2018-07-03 --> |
| | |
| | | <if test="allowOperation !=null and allowOperation != ''"> |
| | | and t.allow_operation= #{allowOperation} |
| | | </if> |
| | | <if test="orgId !=null and orgId != ''"> |
| | | and t.org_id= #{orgId} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | <!-- 查询上级组织信息 --> |
| | | <select id="getParentOrgInfo" parameterType="Map" resultType="Map"> |
| | | <![CDATA[ |
| | |
| | | AND o.`store_id` = #{storeId} |
| | | ]]> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | createTime,t.community_id communityId,bow.name ownerName,bow.id_card idCard,bow.link,t2.name stateName, |
| | | t.start_time,t.start_time startTime,t.end_time,t.end_time endTime,t.state, |
| | | t.car_type_cd,t.car_type_cd carTypeCd,t.member_id,t.member_id memberId,ps.num,pa.num areaNum,t.lease_type leaseType, |
| | | t3.name leaseTypeName |
| | | t3.name leaseTypeName,t4.name carTypeCdName |
| | | from owner_car t |
| | | left join t_dict t1 on t.car_type=t1.status_cd and t1.table_name='owner_car' and t1.table_columns = 'car_type' |
| | | left join t_dict t2 on t.state=t2.status_cd and t2.table_name='owner_car' and t2.table_columns = 'state' |
| | | left join t_dict t4 on t.car_type_cd=t4.status_cd and t4.table_name='owner_car' and t4.table_columns = 'car_type_cd' |
| | | left join building_owner bow on t.owner_id = bow.member_id and bow.status_cd = '0' and bow.community_id = |
| | | t.community_id |
| | | left join parking_space ps on t.ps_id = ps.ps_id and ps.status_cd = '0' |
| | |
| | | t.create_time createTime, |
| | | t.room_id roomId |
| | | FROM |
| | | business_building_owner_room_rel t |
| | | building_owner_room_rel t |
| | | INNER JOIN building_owner bo ON t.owner_id = bo.owner_id AND bo.status_cd = '0' AND bo.community_id = |
| | | #{communityId} |
| | | WHERE |
| | | t.operate = 'ADD' |
| | | bo.owner_type_cd = '1001' |
| | | AND t.room_id = #{roomId} |
| | | ORDER BY |
| | | t.create_time DESC |
| | |
| | | |
| | | <select id="queryOwnerLogsCountByRoom" parameterType="Map" resultType="Map"> |
| | | select COUNT(1) count |
| | | from business_building_owner_room_rel t |
| | | inner join building_owner bo |
| | | from building_owner_room_rel t |
| | | inner join building_owner bo |
| | | on t.owner_id = bo.owner_id and bo.status_cd = '0' and bo.community_id = #{communityId} |
| | | where t.operate = 'ADD' |
| | | and t.room_id = #{roomId} |
| | | order by t.create_time desc |
| | | where bo.owner_type_cd = '1001' |
| | | and t.room_id = #{roomId} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | |
| | | <!-- 查询用户权限数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryStaffsNoRoleCount" parameterType="Map" resultType="Map"> |
| | | <if test="orgIds != null and orgIds.length > 0"> |
| | | select count(*) count from ( |
| | | </if> |
| | | select count(1) count |
| | | from u_user t |
| | | inner join s_store_user su on t.user_id = su.user_id and su.status_cd = '0' |
| | |
| | | <if test="userName !=null and userName != ''"> |
| | | and t.name like concat('%', #{userName},'%') |
| | | </if> |
| | | and su.store_id = #{storeId} |
| | | <if test="orgIds != null and orgIds.length > 0"> |
| | | and uosr.org_id in |
| | | <foreach collection="orgIds" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | AND uosr.status_cd = '0' |
| | | group by t.user_id |
| | | </if> |
| | | and su.store_id = #{storeId} |
| | | <if test="orgIds != null and orgIds.length > 0"> |
| | | )a |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- 查询用户权限信息 add by wuxw 2018-07-03 --> |
| | |
| | | <if test="userName !=null and userName != ''"> |
| | | and t.name like concat('%', #{userName},'%') |
| | | </if> |
| | | and su.store_id = #{storeId} |
| | | <if test="orgIds != null and orgIds.length > 0"> |
| | | and uosr.org_id in |
| | | <foreach collection="orgIds" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | AND uosr.status_cd = '0' |
| | | group by t.user_id |
| | | </if> |
| | | and su.store_id = #{storeId} |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | |
| | | |
| | | <!-- 查询员工总量 --> |
| | | <select id="getStaffCount" parameterType="Map" resultType="Map"> |
| | | select count(*) count from(select count(1) count |
| | | <if test="orgIds != null and orgIds.length > 0"> |
| | | select count(*) count from( |
| | | </if> |
| | | select count(1) count |
| | | from u_user u |
| | | inner join s_store_user su on su.user_id = u.user_id |
| | | <if test="(orgId !=null and orgId != '')||(orgIds != null and orgIds.length > 0)"> |
| | |
| | | </foreach> |
| | | and uosr.status_cd =0 |
| | | GROUP BY u.user_id |
| | | </if>)a |
| | | </if> |
| | | <if test="orgIds != null and orgIds.length > 0"> |
| | | )a |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- 查询员工总量 --> |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.smo.DefaultAbstractComponentSMO; |
| | | import com.java110.core.component.AbstractComponentSMO; |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.entity.component.ComponentValidateResult; |
| | | import com.java110.api.smo.fee.IListFeeSummarySMO; |
| | | import com.java110.utils.constant.ServiceConstant; |
| | | import com.java110.utils.exception.SMOException; |
| | | import com.java110.utils.util.Assert; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | @Override |
| | | protected void validate(IPageData pd, JSONObject paramIn) { |
| | | |
| | | super.validatePageInfo(pd); |
| | | Assert.hasKeyAndValue(paramIn, "communityId", "未包含小区信息"); |
| | | Assert.hasKeyAndValue(paramIn, "feeSummaryType", "未包含小区信息"); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | protected ResponseEntity<String> doBusinessProcess(IPageData pd, JSONObject paramIn) { |
| | | ComponentValidateResult result = super.validateStoreStaffCommunityRelationship(pd, restTemplate); |
| | | |
| | | int page = paramIn.getInteger("page"); |
| | | int row = paramIn.getInteger("row"); |
| | | paramIn.put("page", (page - 1) * row); |
| | | paramIn.put("row", page * row); |
| | | |
| | | paramIn.put("row", row); |
| | | if ("1001".equals(paramIn.getString("feeSummaryType"))) {//日 |
| | | paramIn.put("formatStr", "%Y-%m-%d"); |
| | | } else if ("1101".equals(paramIn.getString("feeSummaryType"))) { |
| | |
| | | } else { |
| | | paramIn.put("formatStr", "%Y"); |
| | | } |
| | | |
| | | String apiUrl = ""; |
| | | apiUrl = "api.queryFeeSummary" + mapToUrlParam(paramIn); |
| | | |
| | | |
| | | ResponseEntity<String> responseEntity = this.callCenterService(restTemplate, pd, "", |
| | | apiUrl, |
| | | HttpMethod.GET); |
| | | |
| | | apiUrl, HttpMethod.GET); |
| | | return responseEntity; |
| | | } |
| | | |
| | |
| | | public ResponseEntity<String> savePhotoFile(IPageData pd) { |
| | | |
| | | String images = pd.getReqData(); |
| | | JSONObject imageObj=JSONObject.parseObject(images); |
| | | JSONObject paramIn = new JSONObject(); |
| | | paramIn.put("context", images); |
| | | paramIn.put("context", imageObj.getString("uploadFile")); |
| | | paramIn.put("fileName", "upload.jpg"); |
| | | |
| | | FileDto fileDto = BeanConvertUtil.covertBean(paramIn, FileDto.class); |
| | |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.inspectionItemTitle.InspectionItemTitleDto; |
| | | import com.java110.dto.inspectionItemTitleValue.InspectionItemTitleValueDto; |
| | | import com.java110.intf.community.IInspectionItemTitleV1InnerServiceSMO; |
| | | import com.java110.intf.community.IInspectionItemTitleValueV1InnerServiceSMO; |
| | | import com.java110.po.inspectionItemTitle.InspectionItemTitlePo; |
| | |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 类表述:更新 |
| | |
| | | public class UpdateInspectionItemTitleCmd extends Cmd { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(UpdateInspectionItemTitleCmd.class); |
| | | |
| | | |
| | | @Autowired |
| | | private IInspectionItemTitleV1InnerServiceSMO inspectionItemTitleV1InnerServiceSMOImpl; |
| | |
| | | @Override |
| | | @Java110Transactional |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | |
| | | InspectionItemTitlePo inspectionItemTitlePo = BeanConvertUtil.covertBean(reqJson, InspectionItemTitlePo.class); |
| | | int flag = inspectionItemTitleV1InnerServiceSMOImpl.updateInspectionItemTitle(inspectionItemTitlePo); |
| | | |
| | |
| | | cmdDataFlowContext.setResponseEntity(ResultVo.success()); |
| | | return; |
| | | } |
| | | InspectionItemTitleValuePo deleteInspectionItemTitleValuePo = new InspectionItemTitleValuePo(); |
| | | deleteInspectionItemTitleValuePo.setTitleId(inspectionItemTitlePo.getTitleId()); |
| | | flag = inspectionItemTitleValueV1InnerServiceSMOImpl.deleteInspectionItemTitleValue(deleteInspectionItemTitleValuePo); |
| | | if (flag < 1) { |
| | | throw new CmdException("更新数据失败"); |
| | | InspectionItemTitleValueDto inspectionItemTitleValueDto = new InspectionItemTitleValueDto(); |
| | | inspectionItemTitleValueDto.setTitleId(reqJson.getString("titleId")); |
| | | List<InspectionItemTitleValueDto> inspectionItemTitleValueDtos = inspectionItemTitleValueV1InnerServiceSMOImpl.queryInspectionItemTitleValues(inspectionItemTitleValueDto); |
| | | if (inspectionItemTitleValueDtos != null && inspectionItemTitleValueDtos.size() > 0) { |
| | | InspectionItemTitleValuePo deleteInspectionItemTitleValuePo = new InspectionItemTitleValuePo(); |
| | | deleteInspectionItemTitleValuePo.setTitleId(inspectionItemTitlePo.getTitleId()); |
| | | flag = inspectionItemTitleValueV1InnerServiceSMOImpl.deleteInspectionItemTitleValue(deleteInspectionItemTitleValuePo); |
| | | if (flag < 1) { |
| | | throw new CmdException("更新数据失败"); |
| | | } |
| | | } |
| | | |
| | | JSONArray titleValues = reqJson.getJSONArray("titleValues"); |
| | | InspectionItemTitleValuePo reportInfoSettingTitleValuePo = null; |
| | | for (int titleValueIndex = 0; titleValueIndex < titleValues.size(); titleValueIndex++) { |
| | |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.dto.inspectionPlan.InspectionTaskDto; |
| | | import com.java110.intf.community.IInspectionTaskInnerServiceSMO; |
| | | import com.java110.intf.community.IInspectionTaskV1InnerServiceSMO; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import com.java110.vo.api.inspectionTask.ApiInspectionTaskDataVo; |
| | | import com.java110.vo.api.inspectionTask.ApiInspectionTaskVo; |
| | | import org.slf4j.Logger; |
| | |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * 类表述:查询 |
| | |
| | | public class ListInspectionTaskCmd extends Cmd { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(ListInspectionTaskCmd.class); |
| | | |
| | | @Autowired |
| | | private IInspectionTaskInnerServiceSMO inspectionTaskInnerServiceSMOImpl; |
| | | |
| | |
| | | @Override |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException { |
| | | InspectionTaskDetailDto inspectionTaskDetailDto = BeanConvertUtil.covertBean(reqJson, InspectionTaskDetailDto.class); |
| | | |
| | | int count = inspectionTaskDetailInnerServiceSMOImpl.queryInspectionTaskDetailsCount(inspectionTaskDetailDto); |
| | | |
| | | List<ApiInspectionTaskDetailDataVo> inspectionTaskDetails = null; |
| | | |
| | | if (count > 0) { |
| | | inspectionTaskDetails = BeanConvertUtil.covertBeanList(inspectionTaskDetailInnerServiceSMOImpl.queryInspectionTaskDetails(inspectionTaskDetailDto), ApiInspectionTaskDetailDataVo.class); |
| | | refreshPhotos(inspectionTaskDetails); |
| | | } else { |
| | | inspectionTaskDetails = new ArrayList<>(); |
| | | } |
| | | |
| | | ApiInspectionTaskDetailVo apiInspectionTaskDetailVo = new ApiInspectionTaskDetailVo(); |
| | | |
| | | apiInspectionTaskDetailVo.setTotal(count); |
| | | apiInspectionTaskDetailVo.setRecords((int) Math.ceil((double) count / (double) reqJson.getInteger("row"))); |
| | | apiInspectionTaskDetailVo.setInspectionTaskDetails(inspectionTaskDetails); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(JSONObject.toJSONString(apiInspectionTaskDetailVo), HttpStatus.OK); |
| | | |
| | | context.setResponseEntity(responseEntity); |
| | | |
| | | } |
| | | |
| | | private void refreshPhotos(List<ApiInspectionTaskDetailDataVo> inspectionTaskDetails) { |
| | |
| | | photoVos = new ArrayList<>(); |
| | | for (FileRelDto tmpFileRelDto : fileRelDtos) { |
| | | photoVo = new PhotoVo(); |
| | | photoVo.setUrl("/callComponent/download/getFile/file?fileId=" + tmpFileRelDto.getFileRealName() + "&communityId=" + inspectionTaskDetail.getCommunityId()); |
| | | photoVo.setUrl(tmpFileRelDto.getFileRealName()); |
| | | photoVos.add(photoVo); |
| | | } |
| | | |
| | | inspectionTaskDetail.setPhotos(photoVos); |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.core.log.LoggerFactory; |
| | | import com.java110.dto.file.FileDto; |
| | | import com.java110.dto.inspectionPlan.InspectionTaskDetailDto; |
| | | import com.java110.dto.inspectionPlan.InspectionTaskDto; |
| | | import com.java110.intf.common.IFileInnerServiceSMO; |
| | | import com.java110.intf.common.IFileRelInnerServiceSMO; |
| | | import com.java110.intf.community.IInspectionTaskDetailInnerServiceSMO; |
| | | import com.java110.intf.community.IInspectionTaskDetailV1InnerServiceSMO; |
| | |
| | | |
| | | @Java110Cmd(serviceCode = "inspectionTaskDetail.updateInspectionTaskDetail") |
| | | public class UpdateInspectionTaskDetailCmd extends Cmd { |
| | | private static Logger logger = LoggerFactory.getLogger(UpdateInspectionTaskDetailCmd.class); |
| | | |
| | | @Autowired |
| | | private IFileInnerServiceSMO fileInnerServiceSMOImpl; |
| | | private static Logger logger = LoggerFactory.getLogger(UpdateInspectionTaskDetailCmd.class); |
| | | |
| | | @Autowired |
| | | private IFileRelInnerServiceSMO fileRelInnerServiceSMOImpl; |
| | |
| | | |
| | | private void dealPhotos(JSONObject reqJson) { |
| | | JSONArray photos = reqJson.getJSONArray("photos"); |
| | | JSONObject photo = null; |
| | | for (int photoIndex = 0; photoIndex < photos.size(); photoIndex++) { |
| | | photo = photos.getJSONObject(photoIndex); |
| | | FileDto fileDto = new FileDto(); |
| | | fileDto.setFileId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_file_id)); |
| | | fileDto.setFileName(fileDto.getFileId()); |
| | | fileDto.setContext(photo.getString("photo")); |
| | | fileDto.setSuffix("jpeg"); |
| | | fileDto.setCommunityId(reqJson.getString("communityId")); |
| | | String fileName = fileInnerServiceSMOImpl.saveFile(fileDto); |
| | | reqJson.put("photoId", fileDto.getFileId()); |
| | | reqJson.put("fileSaveName", fileName); |
| | | |
| | | Object photo = photos.get(photoIndex); |
| | | reqJson.put("fileName", photo.toString()); |
| | | addPhoto(reqJson); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 添加物业费用 |
| | | * 添加图片 |
| | | * |
| | | * @param paramInJson 接口调用放传入入参 |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | public void addPhoto(JSONObject paramInJson) { |
| | | |
| | | JSONObject businessUnit = new JSONObject(); |
| | | businessUnit.put("fileRelId", "-1"); |
| | | businessUnit.put("relTypeCd", "90000"); |
| | | businessUnit.put("saveWay", "ftp"); |
| | | businessUnit.put("objId", paramInJson.getString("taskDetailId")); |
| | | businessUnit.put("fileRealName", paramInJson.getString("photoId")); |
| | | businessUnit.put("fileSaveName", paramInJson.getString("fileSaveName")); |
| | | businessUnit.put("fileRealName", paramInJson.getString("fileName")); |
| | | businessUnit.put("fileSaveName", paramInJson.getString("fileName")); |
| | | FileRelPo fileRelPo = BeanConvertUtil.covertBean(businessUnit, FileRelPo.class); |
| | | int flag = fileRelInnerServiceSMOImpl.saveFileRel(fileRelPo); |
| | | if (flag < 1) { |
| | |
| | | Date date = new Date(); |
| | | SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd"); |
| | | String currentDate = sdf1.format(date); |
| | | System.out.println(currentDate); |
| | | |
| | | |
| | | //获取巡检点的巡检点时间限制 |
| | | String inspectionStartTime = ""; |
| | |
| | | int flag = inspectionTaskDetailV1InnerServiceSMOImpl.updateInspectionTaskDetail(inspectionTaskDetailPoPo); |
| | | |
| | | if (flag < 1) { |
| | | throw new CmdException("保存明细失败"); |
| | | throw new CmdException("更新任务明细失败"); |
| | | } |
| | | //巡检完成后更改巡检任务表状态 |
| | | InspectionTaskDto inspectionTask= new InspectionTaskDto(); |
| | | inspectionTask.setTaskId(inspectionTaskDetailPoPo.getTaskId()); |
| | | inspectionTask.setState(inspectionTaskDetailPoPo.getState()); |
| | | inspectionTaskInnerServiceSMOImpl.updateInspectionTask(inspectionTask); |
| | | } |
| | | |
| | | /** |
| | |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.community.CommunityDto; |
| | | import com.java110.dto.notice.NoticeDto; |
| | | import com.java110.dto.org.OrgCommunityDto; |
| | | import com.java110.dto.org.OrgDto; |
| | | import com.java110.dto.org.OrgStaffRelDto; |
| | | import com.java110.dto.roleCommunity.RoleCommunityDto; |
| | | import com.java110.dto.store.StoreDto; |
| | | import com.java110.dto.user.UserDto; |
| | |
| | | private ICommunityInnerServiceSMO communityInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOrgStaffRelInnerServiceSMO orgStaffRelInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOrgCommunityInnerServiceSMO orgCommunityInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOrgInnerServiceSMO orgInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private INoticeV1InnerServiceSMO noticeV1InnerServiceSMOImpl; |
| | | |
| | | |
| | | @Autowired |
| | | private IRoleCommunityV1InnerServiceSMO roleCommunityV1InnerServiceSMOImpl; |
| | | |
| | | |
| | | @Autowired |
| | | private IStoreV1InnerServiceSMO storeV1InnerServiceSMOImpl; |
| | |
| | | |
| | | reqJson.put("userId",userId); |
| | | reqJson.put("storeId",storeId); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | @Java110Transactional |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | |
| | | if (!reqJson.containsKey("isAll") || StringUtil.isEmpty(reqJson.getString("isAll")) || "N".equals(reqJson.getString("isAll"))) { |
| | | addNotice(reqJson); |
| | | return; |
| | | } |
| | | |
| | | String storeId = cmdDataFlowContext.getReqHeaders().get("store-id"); |
| | | reqJson.put("storeId", storeId); |
| | | |
| | | //查询当前员工 的小区 |
| | | |
| | | List<ApiCommunityDataVo> communitys = getStoreCommunity(reqJson); |
| | | /*List<ApiCommunityDataVo> communitys = null; |
| | | if (reqJson.containsKey("isAll") && !StringUtil.isEmpty(reqJson.getString("isAll")) && reqJson.getString("isAll").equals("N")) { |
| | | communitys = getStoreCommunity(reqJson); |
| | | } else if (reqJson.getString("isAll").equals("Y")) { |
| | | CommunityDto communityDto = new CommunityDto(); |
| | | List<CommunityDto> communityDtos = communityInnerServiceSMOImpl.queryCommunitys(communityDto); |
| | | communitys = BeanConvertUtil.covertBeanList(communityDtos, ApiCommunityDataVo.class); |
| | | } else { |
| | | communitys = new ArrayList<>(); |
| | | }*/ |
| | | for (ApiCommunityDataVo apiCommunityDataVo : communitys) { |
| | | reqJson.put("communityId", apiCommunityDataVo.getCommunityId()); |
| | | if (reqJson.containsKey("objType") && "001".equals(reqJson.getString("objType"))) { |
| | |
| | | } |
| | | addNotice(reqJson); |
| | | } |
| | | |
| | | |
| | | cmdDataFlowContext.setResponseEntity(ResultVo.success()); |
| | | } |
| | | |
| | |
| | | userDto.setPage(1); |
| | | userDto.setRow(1); |
| | | List<UserDto> userDtos = userV1InnerServiceSMOImpl.queryUsers(userDto); |
| | | |
| | | Assert.listOnlyOne(userDtos, "用户不存在"); |
| | | |
| | | //校验商户是否存在; |
| | | StoreDto storeDto = new StoreDto(); |
| | | storeDto.setStoreId(reqJson.getString("storeId")); |
| | | List<StoreDto> storeDtos = storeV1InnerServiceSMOImpl.queryStores(storeDto); |
| | | |
| | | Assert.listOnlyOne(storeDtos, "商户不存在"); |
| | | |
| | | int count = 0; |
| | | if (UserDto.LEVEL_CD_ADMIN.equals(userDtos.get(0).getLevelCd())) { |
| | | CommunityDto communityDto = new CommunityDto(); |
| | | communityDto.setMemberId(reqJson.getString("storeId")); |
| | | communityDto.setAuditStatusCd(StateConstant.AGREE_AUDIT); |
| | | communityDto.setState("1100"); //1000 待审核 1100 审核通过 1200 审核拒绝 |
| | | if (reqJson.containsKey("communityName")) { |
| | | communityDto.setName(reqJson.getString("communityName")); |
| | | } |
| | |
| | | } else { |
| | | communitys = new ArrayList<>(); |
| | | } |
| | | |
| | | } |
| | | return communitys; |
| | | } |
| | | |
| | | public void addNotice(JSONObject paramInJson) { |
| | | |
| | | JSONObject businessNotice = new JSONObject(); |
| | | businessNotice.putAll(paramInJson); |
| | | if (!paramInJson.containsKey("state")) { |
| | |
| | | import com.java110.intf.common.IFileRelInnerServiceSMO; |
| | | import com.java110.intf.community.IRepairInnerServiceSMO; |
| | | import com.java110.intf.community.IRepairUserInnerServiceSMO; |
| | | import com.java110.utils.cache.MappingCache; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | |
| | | List<PhotoVo> beforePhotos = null; //维修前图片 |
| | | List<PhotoVo> afterPhotos = null; //维修后图片 |
| | | PhotoVo photoVo = null; |
| | | String imgUrl = MappingCache.getValue("IMG_PATH"); |
| | | for (RepairDto repairDto : ownerRepairs) { |
| | | FileRelDto fileRelDto = new FileRelDto(); |
| | | fileRelDto.setObjId(repairDto.getRepairId()); |
| | |
| | | afterPhotos = new ArrayList<>(); |
| | | for (FileRelDto tmpFileRelDto : fileRelDtos) { |
| | | photoVo = new PhotoVo(); |
| | | //photoVo.setUrl("/callComponent/download/getFile/file?fileId=" + tmpFileRelDto.getFileRealName() + "&communityId=" + repairDto.getCommunityId()); |
| | | photoVo.setUrl(imgUrl + tmpFileRelDto.getFileRealName()); |
| | | photoVo.setUrl(tmpFileRelDto.getFileRealName()); |
| | | photoVo.setRelTypeCd(tmpFileRelDto.getRelTypeCd()); |
| | | photoVos.add(photoVo); |
| | | if (tmpFileRelDto.getRelTypeCd().equals(FileRelDto.REL_TYPE_CD_REPAIR)) { //维修图片 |
| | | photoVo = new PhotoVo(); |
| | | // photoVo.setUrl("/callComponent/download/getFile/file?fileId=" + tmpFileRelDto.getFileRealName() + "&communityId=" + repairDto.getCommunityId()); |
| | | photoVo.setUrl(imgUrl + tmpFileRelDto.getFileRealName()); |
| | | photoVo.setUrl(tmpFileRelDto.getFileRealName()); |
| | | photoVo.setRelTypeCd(tmpFileRelDto.getRelTypeCd()); |
| | | repairPhotos.add(photoVo); //维修图片 |
| | | } else if (tmpFileRelDto.getRelTypeCd().equals(FileRelDto.BEFORE_REPAIR_PHOTOS)) { //维修前图片 |
| | | photoVo = new PhotoVo(); |
| | | //photoVo.setUrl("/callComponent/download/getFile/file?fileId=" + tmpFileRelDto.getFileRealName() + "&communityId=" + repairDto.getCommunityId()); |
| | | photoVo.setUrl(imgUrl + tmpFileRelDto.getFileRealName()); |
| | | photoVo.setUrl(tmpFileRelDto.getFileRealName()); |
| | | photoVo.setRelTypeCd(tmpFileRelDto.getRelTypeCd()); |
| | | beforePhotos.add(photoVo); //维修前图片 |
| | | } else if (tmpFileRelDto.getRelTypeCd().equals(FileRelDto.AFTER_REPAIR_PHOTOS)) { //维修后图片 |
| | | photoVo = new PhotoVo(); |
| | | //photoVo.setUrl("/callComponent/download/getFile/file?fileId=" + tmpFileRelDto.getFileRealName() + "&communityId=" + repairDto.getCommunityId()); |
| | | photoVo.setUrl(imgUrl + tmpFileRelDto.getFileRealName()); |
| | | photoVo.setUrl(tmpFileRelDto.getFileRealName()); |
| | | photoVo.setRelTypeCd(tmpFileRelDto.getRelTypeCd()); |
| | | afterPhotos.add(photoVo); |
| | | } |
| | |
| | | repairDto.setBeforePhotos(beforePhotos); |
| | | repairDto.setAfterPhotos(afterPhotos); |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | @Autowired |
| | | private IRepairInnerServiceSMO repairInnerServiceSMOImpl; |
| | | |
| | | |
| | | @Autowired |
| | | private IRepairUserInnerServiceSMO repairUserInnerServiceSMOImpl; |
| | | |
| | |
| | | |
| | | int count = repairUserInnerServiceSMOImpl.queryRepairUsersCount(repairUserDto); |
| | | |
| | | |
| | | List<RepairUserDto> repairUserDtos = null; |
| | | if (count > 0) { |
| | | repairUserDtos = repairUserInnerServiceSMOImpl.queryRepairUsers(repairUserDto); |
| | |
| | | |
| | | ResponseEntity<String> responseEntity = ResultVo.createResponseEntity((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, repairUserDtos); |
| | | |
| | | |
| | | context.setResponseEntity(responseEntity); |
| | | |
| | | } |
| | | |
| | | private void refreshRepairUser(List<RepairUserDto> repairUserDtos) { |
| | |
| | | for (FileRelDto tmpFileRelDto : fileRelDtos) { |
| | | if (tmpFileRelDto.getRelTypeCd().equals("14000")) { //维修图片 |
| | | photoVo = new PhotoVo(); |
| | | photoVo.setUrl("/callComponent/download/getFile/file?fileId=" + tmpFileRelDto.getFileRealName() + "&communityId=" + repairUserDto.getCommunityId()); |
| | | photoVo.setUrl(tmpFileRelDto.getFileRealName()); |
| | | photoVo.setRelTypeCd(tmpFileRelDto.getRelTypeCd()); |
| | | photoVos.add(photoVo); |
| | | } else { |
| | |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.fee.FeeConfigDto; |
| | | import com.java110.dto.fee.FeeDto; |
| | | import com.java110.dto.file.FileDto; |
| | | import com.java110.dto.file.FileRelDto; |
| | | import com.java110.dto.repair.RepairDto; |
| | | import com.java110.dto.repair.RepairUserDto; |
| | | import com.java110.dto.user.UserDto; |
| | | import com.java110.intf.common.IFileInnerServiceSMO; |
| | | import com.java110.intf.common.IFileRelInnerServiceSMO; |
| | | import com.java110.intf.community.IRepairPoolV1InnerServiceSMO; |
| | | import com.java110.intf.community.IRepairUserV1InnerServiceSMO; |
| | |
| | | |
| | | @Java110Cmd(serviceCode = "ownerRepair.saveOwnerRepair") |
| | | public class SaveOwnerRepairCmd extends Cmd { |
| | | |
| | | @Autowired |
| | | private IFileInnerServiceSMO fileInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFeeConfigInnerServiceSMO feeConfigInnerServiceSMOImpl; |
| | |
| | | if (reqJson.containsKey("photos") && !StringUtils.isEmpty(reqJson.getString("photos"))) { |
| | | JSONArray photos = reqJson.getJSONArray("photos"); |
| | | for (int _photoIndex = 0; _photoIndex < photos.size(); _photoIndex++) { |
| | | FileDto fileDto = new FileDto(); |
| | | fileDto.setFileId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_file_id)); |
| | | fileDto.setFileName(fileDto.getFileId()); |
| | | fileDto.setContext(photos.getJSONObject(_photoIndex).getString("photo")); |
| | | fileDto.setSuffix("jpeg"); |
| | | fileDto.setCommunityId(reqJson.getString("communityId")); |
| | | String fileName = fileInnerServiceSMOImpl.saveFile(fileDto); |
| | | reqJson.put("ownerPhotoId", fileDto.getFileId()); |
| | | reqJson.put("fileSaveName", fileName); |
| | | Object _photo = photos.get(_photoIndex); |
| | | JSONObject businessUnit = new JSONObject(); |
| | | businessUnit.put("fileRelId", "-" + (_photoIndex + 1)); |
| | | businessUnit.put("relTypeCd", FileRelDto.REL_TYPE_CD_REPAIR); |
| | | businessUnit.put("saveWay", "ftp"); |
| | | businessUnit.put("objId", businessOwnerRepair.getString("repairId")); |
| | | businessUnit.put("fileRealName", fileName); |
| | | businessUnit.put("fileSaveName", fileName); |
| | | businessUnit.put("fileRealName", _photo.toString()); |
| | | businessUnit.put("fileSaveName", _photo.toString()); |
| | | FileRelPo fileRelPo = BeanConvertUtil.covertBean(businessUnit, FileRelPo.class); |
| | | flag = fileRelInnerServiceSMOImpl.saveFileRel(fileRelPo); |
| | | if (flag < 1) { |
| | |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.parking.ParkingAreaDto; |
| | | import com.java110.intf.community.IParkingAreaAttrV1InnerServiceSMO; |
| | | import com.java110.intf.community.IParkingAreaV1InnerServiceSMO; |
| | | import com.java110.po.parking.ParkingAreaPo; |
| | |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Java110Cmd(serviceCode = "parkingArea.saveParkingArea") |
| | | public class SaveParkingAreaCmd extends Cmd { |
| | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | //Assert.hasKeyAndValue(reqJson, "xxx", "xxx"); |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "num", "必填,请填写停车场编号"); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "必填,请填写小区信息"); |
| | | Assert.hasKeyAndValue(reqJson, "typeCd", "必填,请选择停车场类型"); |
| | | |
| | | //属性校验 |
| | | Assert.judgeAttrValue(reqJson); |
| | | } |
| | |
| | | @Java110Transactional |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | addParkingArea(reqJson); |
| | | |
| | | dealAttr(reqJson); |
| | | } |
| | | |
| | | public void addParkingArea(JSONObject paramInJson) { |
| | | |
| | | ParkingAreaDto parkingAreaDto = new ParkingAreaDto(); |
| | | parkingAreaDto.setNum(paramInJson.getString("num")); |
| | | parkingAreaDto.setCommunityId(paramInJson.getString("communityId")); |
| | | List<ParkingAreaDto> parkingAreaDtos = parkingAreaV1InnerServiceSMOImpl.queryParkingAreas(parkingAreaDto); |
| | | Assert.listIsNull(parkingAreaDtos, "停车场编号重复,请重新添加!"); |
| | | JSONObject businessParkingArea = new JSONObject(); |
| | | businessParkingArea.putAll(paramInJson); |
| | | businessParkingArea.put("paId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_paId)); |
| | |
| | | if (attrs.size() < 1) { |
| | | return; |
| | | } |
| | | |
| | | |
| | | JSONObject attr = null; |
| | | int flag = 0; |
| | |
| | | */ |
| | | @Java110Cmd(serviceCode = "parkingBoxArea.deleteParkingBoxArea") |
| | | public class DeleteParkingBoxAreaCmd extends Cmd { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(DeleteParkingBoxAreaCmd.class); |
| | | |
| | | @Autowired |
| | |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "baId", "baId不能为空"); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空"); |
| | | |
| | | |
| | | } |
| | | |
| | | @Override |
| | |
| | | parkingBoxAreaDto.setBaId(reqJson.getString("baId")); |
| | | parkingBoxAreaDto.setCommunityId(reqJson.getString("communityId")); |
| | | List<ParkingBoxAreaDto> parkingBoxAreaDtos = parkingBoxAreaV1InnerServiceSMOImpl.queryParkingBoxAreas(parkingBoxAreaDto); |
| | | |
| | | Assert.listOnlyOne(parkingBoxAreaDtos, "数据不存在"); |
| | | if (ParkingBoxAreaDto.DEFAULT_AREA_TRUE.equals(parkingBoxAreaDtos.get(0).getDefaultArea())) { |
| | | throw new CmdException("默认停车场不能删除"); |
| | | } |
| | | ParkingBoxAreaPo parkingBoxAreaPo = BeanConvertUtil.covertBean(reqJson, ParkingBoxAreaPo.class); |
| | | int flag = parkingBoxAreaV1InnerServiceSMOImpl.deleteParkingBoxArea(parkingBoxAreaPo); |
| | | |
| | | if (flag < 1) { |
| | | throw new CmdException("删除数据失败"); |
| | | } |
| | | |
| | | ParkingBoxPo parkingBoxPo = new ParkingBoxPo(); |
| | | parkingBoxPo.setBoxId(reqJson.getString("boxId")); |
| | | parkingBoxV1InnerServiceSMOImpl.updateParkingBox(parkingBoxPo); |
| | | |
| | | cmdDataFlowContext.setResponseEntity(ResultVo.success()); |
| | | } |
| | | } |
| | |
| | | @Java110Transactional |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | |
| | | ParkingBoxAreaDto parkingBoxAreaDto = new ParkingBoxAreaDto(); |
| | | parkingBoxAreaDto.setPaId(reqJson.getString("paId")); |
| | | parkingBoxAreaDto.setBoxId(reqJson.getString("boxId")); |
| | | List<ParkingBoxAreaDto> parkingBoxAreaDtos = parkingBoxAreaV1InnerServiceSMOImpl.queryParkingBoxAreas(parkingBoxAreaDto); |
| | | Assert.listIsNull(parkingBoxAreaDtos, "停车场重复,请重新添加!"); |
| | | String defaultArea = reqJson.getString("defaultArea"); |
| | | if (ParkingBoxAreaDto.DEFAULT_AREA_TRUE.equals(defaultArea)) { |
| | | ParkingBoxAreaPo tmpParkingBoxAreaPo = new ParkingBoxAreaPo(); |
| | | tmpParkingBoxAreaPo.setBoxId(reqJson.getString("boxId")); |
| | | tmpParkingBoxAreaPo.setDefaultArea(ParkingBoxAreaDto.DEFAULT_AREA_FALSE); |
| | | parkingBoxAreaV1InnerServiceSMOImpl.updateParkingBoxArea(tmpParkingBoxAreaPo); |
| | | ParkingBoxAreaDto parkingBoxArea = new ParkingBoxAreaDto(); |
| | | parkingBoxArea.setBoxId(reqJson.getString("boxId")); |
| | | parkingBoxArea.setDefaultArea(ParkingBoxAreaDto.DEFAULT_AREA_FALSE); |
| | | List<ParkingBoxAreaDto> parkingBoxAreas = parkingBoxAreaV1InnerServiceSMOImpl.queryParkingBoxAreas(parkingBoxArea); |
| | | if (parkingBoxAreas != null && parkingBoxAreas.size() > 0) { |
| | | for (ParkingBoxAreaDto parkingBox : parkingBoxAreas) { |
| | | ParkingBoxAreaPo tmpParkingBoxAreaPo = new ParkingBoxAreaPo(); |
| | | tmpParkingBoxAreaPo.setBaId(parkingBox.getBaId()); |
| | | tmpParkingBoxAreaPo.setBoxId(reqJson.getString("boxId")); |
| | | tmpParkingBoxAreaPo.setDefaultArea(ParkingBoxAreaDto.DEFAULT_AREA_FALSE); |
| | | parkingBoxAreaV1InnerServiceSMOImpl.updateParkingBoxArea(tmpParkingBoxAreaPo); |
| | | } |
| | | } |
| | | } |
| | | ParkingBoxAreaPo parkingBoxAreaPo = BeanConvertUtil.covertBean(reqJson, ParkingBoxAreaPo.class); |
| | | parkingBoxAreaPo.setBaId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID)); |
| | |
| | | import com.java110.core.log.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 类表述:更新 |
| | | * 服务编码:parkingBoxArea.updateParkingBoxArea |
| | |
| | | if (flag < 1) { |
| | | throw new CmdException("更新数据失败"); |
| | | } |
| | | ParkingBoxAreaDto parkingBoxAreaDto = new ParkingBoxAreaDto(); |
| | | parkingBoxAreaDto.setBoxId(reqJson.getString("boxId")); |
| | | List<ParkingBoxAreaDto> parkingBoxAreaDtos = parkingBoxAreaV1InnerServiceSMOImpl.queryParkingBoxAreas(parkingBoxAreaDto); |
| | | if (parkingBoxAreaDtos != null && parkingBoxAreaDtos.size() > 0) { |
| | | for (ParkingBoxAreaDto parkingBoxArea : parkingBoxAreaDtos) { |
| | | if (!parkingBoxArea.getBaId().equals(reqJson.getString("baId"))) { |
| | | ParkingBoxAreaPo parkingBoxAre = new ParkingBoxAreaPo(); |
| | | parkingBoxAre.setBaId(parkingBoxArea.getBaId()); |
| | | parkingBoxAre.setDefaultArea(ParkingBoxAreaDto.DEFAULT_AREA_FALSE); |
| | | parkingBoxAreaV1InnerServiceSMOImpl.updateParkingBoxArea(parkingBoxAre); |
| | | } |
| | | } |
| | | } |
| | | ParkingBoxPo parkingBoxPo = new ParkingBoxPo(); |
| | | parkingBoxPo.setBoxId(reqJson.getString("boxId")); |
| | | parkingBoxV1InnerServiceSMOImpl.updateParkingBox(parkingBoxPo); |
| | |
| | | Map initAddVisitParameter = new HashMap(); |
| | | initAddVisitParameter.put("freeTime", freeTime); |
| | | initAddVisitParameter.put("freeTimes", number); |
| | | //业主端获取访客登记相关配置参数 |
| | | responseEntity = new ResponseEntity<String>(JSONObject.toJSONString(initAddVisitParameter), HttpStatus.OK); |
| | | } else { |
| | | VisitDto visitDto = BeanConvertUtil.covertBean(reqJson, VisitDto.class); |
| | | if (reqJson.containsKey("channel") && !StringUtil.isEmpty(reqJson.getString("channel")) |
| | | && "PC".equals(reqJson.getString("channel"))) { |
| | | visitDto.setUserId(""); |
| | | } |
| | | int count = visitInnerServiceSMOImpl.queryVisitsCount(visitDto); |
| | | List<ApiVisitDataVo> visits = new ArrayList<>(); |
| | | if (count > 0) { |
| | |
| | | ownerCarPo.setState(OwnerCarDto.STATE_NORMAL); //1001 正常状态,2002 车位释放欠费状态 3003 车位释放 |
| | | ownerCarPo.setCarTypeCd(OwnerCarDto.CAR_TYPE_TEMP); //1001 业主车辆 1002 成员车辆 1003 临时车 |
| | | ownerCarPo.setMemberId(reqJson.getString("ownerId")); |
| | | ownerCarPo.setLeaseType(OwnerCarDto.LEASE_TYPE_RESERVE); //H 月租车 S 出售车 I 内部车 NM 免费车 R 预约车 |
| | | ownerCarV1InnerServiceSMOImpl.saveOwnerCar(ownerCarPo); |
| | | //添加车辆属性 |
| | | OwnerCarAttrPo ownerCarAttrPo = new OwnerCarAttrPo(); |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | @Autowired |
| | | private IOwnerCarInnerServiceSMO ownerCarInnerServiceSMOImpl; |
| | | |
| | | |
| | | @Autowired |
| | | private IVisitV1InnerServiceSMO visitV1InnerServiceSMOImpl; |
| | | |
| | |
| | | //键 |
| | | public static final String ASCRIPTION_CAR_AREA_ID = "ASCRIPTION_CAR_AREA_ID"; |
| | | |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException { |
| | | Assert.hasKeyAndValue(reqJson, "vId", "访客记录ID不能为空"); |
| | |
| | | Assert.hasKeyAndValue(reqJson, "visitGender", "必填,请填写访客姓名"); |
| | | Assert.hasKeyAndValue(reqJson, "phoneNumber", "必填,请填写访客联系方式"); |
| | | Assert.hasKeyAndValue(reqJson, "visitTime", "必填,请填写访客拜访时间"); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException { |
| | | |
| | | |
| | | String userId = context.getReqHeaders().get("user-id"); |
| | | |
| | | //是否有空闲车位 |
| | | //是否有空闲车位 |
| | | boolean freeSpace = false; |
| | | //是否存在车辆 |
| | | boolean existCar = false; |
| | |
| | | newTime.setTime(time); |
| | | newTime.add(Calendar.MINUTE, Integer.parseInt(freeTime));//日期加上分钟 |
| | | Date newDate = newTime.getTime(); |
| | | String finishFreeTime = DateUtil.getFormatTimeString(newDate,DateUtil.DATE_FORMATE_STRING_A); |
| | | String finishFreeTime = DateUtil.getFormatTimeString(newDate, DateUtil.DATE_FORMATE_STRING_A); |
| | | reqJson.put("freeTime", finishFreeTime); |
| | | |
| | | //获取小区配置里配置的停车场id |
| | | String parkingAreaId = CommunitySettingFactory.getValue(reqJson.getString("communityId"), ASCRIPTION_CAR_AREA_ID); |
| | | if (StringUtil.isEmpty(parkingAreaId)) { //如果没有配置停车场id,就随便分配该小区下一个空闲车位 |
| | |
| | | ownerCarPo.setState(OwnerCarDto.STATE_NORMAL); //1001 正常状态,2002 车位释放欠费状态 3003 车位释放 |
| | | ownerCarPo.setCarTypeCd(OwnerCarDto.CAR_TYPE_TEMP); //1001 业主车辆 1002 成员车辆 1003 临时车 |
| | | ownerCarPo.setMemberId(reqJson.getString("ownerId")); |
| | | ownerCarPo.setLeaseType("R"); //H 月租车 S 出售车 I 内部车 NM 免费车 R 预约车 |
| | | ownerCarV1InnerServiceSMOImpl.saveOwnerCar(ownerCarPo); |
| | | //添加车辆属性 |
| | | OwnerCarAttrPo ownerCarAttrPo = new OwnerCarAttrPo(); |
| | |
| | | /** |
| | | * 添加小区信息 |
| | | * |
| | | * @param paramInJson 接口调用放传入入参 |
| | | * @param paramInJson 接口调用放传入入参 |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | public void updateVisit(JSONObject paramInJson) { |
| | |
| | | businessVisit.putAll(paramInJson); |
| | | |
| | | VisitPo visitPo = BeanConvertUtil.covertBean(businessVisit, VisitPo.class); |
| | | int flag =visitV1InnerServiceSMOImpl.updateVisit(visitPo); |
| | | if(flag <1){ |
| | | int flag = visitV1InnerServiceSMOImpl.updateVisit(visitPo); |
| | | if (flag < 1) { |
| | | throw new CmdException("修改访客失败"); |
| | | } |
| | | } |
| | |
| | | |
| | | @Java110Cmd(serviceCode = "app.deleteApp") |
| | | public class DeleteAppCmd extends Cmd { |
| | | |
| | | @Autowired |
| | | private IAppInnerServiceSMO appInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | //Assert.hasKeyAndValue(reqJson, "xxx", "xxx"); |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "appId", "应用Id不能为空"); |
| | | } |
| | | |
| | | @Override |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | AppDto appDto = BeanConvertUtil.covertBean(reqJson, AppDto.class); |
| | | |
| | | appDto.setStatusCd(StatusConstant.STATUS_CD_INVALID); |
| | | |
| | | int count = appInnerServiceSMOImpl.deleteApp(appDto); |
| | | |
| | | |
| | | |
| | | if (count < 1) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_ERROR, "删除数据失败"); |
| | | } |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>("", HttpStatus.OK); |
| | | |
| | | cmdDataFlowContext.setResponseEntity(responseEntity); |
| | | } |
| | | } |
| | |
| | | BigDecimal cashBackAmount = new BigDecimal("0.00");//返现总金额 |
| | | for (int i = 0; i < discounts.size(); i++) { |
| | | JSONObject discountObject = discounts.getJSONObject(i); |
| | | if (!reqJson.getString("discountId").equals(discountObject.getString("discountId"))) { |
| | | continue; |
| | | } |
| | | JSONArray feeDiscountSpecs = discountObject.getJSONArray("feeDiscountSpecs"); |
| | | //获取规则id |
| | | String ruleId = discounts.getJSONObject(i).getString("ruleId"); |
| | |
| | | import com.java110.dto.UnitDto; |
| | | import com.java110.dto.fee.FeeDto; |
| | | import com.java110.dto.owner.OwnerCarDto; |
| | | import com.java110.dto.owner.OwnerRoomRelDto; |
| | | import com.java110.dto.parking.ParkingSpaceDto; |
| | | import com.java110.intf.community.IFloorInnerServiceSMO; |
| | | import com.java110.intf.community.IParkingSpaceInnerServiceSMO; |
| | |
| | | import com.java110.intf.fee.IFeeConfigInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerCarInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerRoomRelV1InnerServiceSMO; |
| | | import com.java110.utils.cache.MappingCache; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | |
| | | @Autowired |
| | | private IRoomInnerServiceSMO roomInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOwnerRoomRelV1InnerServiceSMO ownerRoomRelV1InnerServiceSMOImpl; |
| | | |
| | | //域 |
| | | public static final String DOMAIN_COMMON = "DOMAIN.COMMON"; |
| | | |
| | |
| | | @Override |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | if (reqJson.containsKey("roomNum") && !StringUtil.isEmpty(reqJson.getString("roomNum"))) { |
| | | String[] roomNums = reqJson.getString("roomNum").split("-",3); |
| | | String[] roomNums = reqJson.getString("roomNum").split("-", 3); |
| | | if (roomNums == null || roomNums.length != 3) { |
| | | throw new IllegalArgumentException("房屋编号格式错误!"); |
| | | } |
| | |
| | | } |
| | | |
| | | FeeDto feeDto = BeanConvertUtil.covertBean(reqJson, FeeDto.class); |
| | | |
| | | int count = feeInnerServiceSMOImpl.queryFeesCount(feeDto); |
| | | |
| | | List<ApiFeeDataVo> fees = new ArrayList<>(); |
| | | |
| | | if (reqJson.containsKey("ownerId") && !StringUtil.isEmpty(reqJson.getString("ownerId"))) { |
| | | OwnerRoomRelDto ownerRoomRelDto = new OwnerRoomRelDto(); |
| | | ownerRoomRelDto.setRoomId(reqJson.getString("payerObjId")); |
| | | ownerRoomRelDto.setOwnerId(reqJson.getString("ownerId")); |
| | | List<OwnerRoomRelDto> ownerRoomRelDtos = ownerRoomRelV1InnerServiceSMOImpl.queryOwnerRoomRels(ownerRoomRelDto); |
| | | if (ownerRoomRelDtos == null || ownerRoomRelDtos.size() < 1) { |
| | | ApiFeeVo apiFeeVo = new ApiFeeVo(); |
| | | apiFeeVo.setTotal(0); |
| | | apiFeeVo.setRecords((int) Math.ceil((double) 0 / (double) reqJson.getInteger("row"))); |
| | | apiFeeVo.setFees(fees); |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(JSONObject.toJSONString(apiFeeVo), HttpStatus.OK); |
| | | cmdDataFlowContext.setResponseEntity(responseEntity); |
| | | } |
| | | } |
| | | int count = feeInnerServiceSMOImpl.queryFeesCount(feeDto); |
| | | if (count > 0) { |
| | | List<FeeDto> feeDtos = feeInnerServiceSMOImpl.queryFees(feeDto);//查询费用项目 |
| | | computeFeePrice(feeDtos);//计算费用 |
| | |
| | | |
| | | @Autowired |
| | | private IQueryOweFee queryOweFeeImpl; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException { |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "未包含小区信息"); |
| | |
| | | if (reqJson.containsKey("custEndTime") && !StringUtil.isEmpty(reqJson.getString("custEndTime"))) { |
| | | feeDto.setCustEndTime(reqJson.getString("custEndTime")); |
| | | } |
| | | ResponseEntity<String> result = queryOweFeeImpl.listFeeObj(feeDto); |
| | | ResponseEntity<String> result = queryOweFeeImpl.listFeeObj(feeDto); |
| | | context.setResponseEntity(result); |
| | | } |
| | | } |
| | |
| | | @Override |
| | | @Java110Transactional |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject paramObj) throws CmdException { |
| | | |
| | | logger.debug("paramObj : {}", paramObj); |
| | | PayFeePo payFeePo = null; |
| | | String requestId = DistributedLock.getLockUUID(); |
| | |
| | | try { |
| | | DistributedLock.waitGetDistributedLock(key, requestId); |
| | | JSONObject feeDetail = addFeeDetail(paramObj); |
| | | feeDetail.put("payableAmount", feeDetail.getString("receivableAmount")); |
| | | JSONObject fee = modifyFee(paramObj); |
| | | payFeePo = BeanConvertUtil.covertBean(fee, PayFeePo.class); |
| | | PayFeeDetailPo payFeeDetailPo = BeanConvertUtil.covertBean(feeDetail, PayFeeDetailPo.class); |
| | | payFeeDetailPo.setReceivableAmount(feeDetail.getString("totalFeePrice")); |
| | | //判断是否有赠送规则 |
| | | hasDiscount(paramObj, payFeePo, payFeeDetailPo); |
| | | //判断选择的账号 |
| | |
| | | |
| | | /** |
| | | * 改造赠送逻辑 if 嵌套有点多 优化 |
| | | * |
| | | * @param paramObj |
| | | * @param payFeePo |
| | | * @param payFeeDetailPo |
| | |
| | | cycles = new BigDecimal(Double.parseDouble(paramInJson.getString("cycles"))); |
| | | double tmpReceivableAmount = cycles.multiply(feePrice).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue(); |
| | | businessFeeDetail.put("receivableAmount", tmpReceivableAmount); |
| | | |
| | | //出租递增问题处理 |
| | | if (FeeConfigDto.COMPUTING_FORMULA_RANT_RATE.equals(feeDto.getComputingFormula())) { |
| | | computeFeeSMOImpl.dealRentRateCycle(feeDto, cycles.doubleValue()); |
| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Cmd; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.RoomDto; |
| | | import com.java110.dto.parking.ParkingSpaceDto; |
| | | import com.java110.intf.community.IParkingSpaceInnerServiceSMO; |
| | | import com.java110.intf.community.IRoomInnerServiceSMO; |
| | | import com.java110.intf.fee.IMeterWaterInnerServiceSMO; |
| | | import com.java110.intf.fee.IMeterWaterV1InnerServiceSMO; |
| | | import com.java110.po.meterWater.MeterWaterPo; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.java110.dto.meterWater.MeterWaterDto; |
| | | |
| | | import java.util.List; |
| | | import java.util.ArrayList; |
| | | |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | |
| | | |
| | | /** |
| | | * 类表述:查询 |
| | |
| | | @Java110Cmd(serviceCode = "meterWater.listMeterWaters") |
| | | public class ListMeterWaterCmd extends Cmd { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(ListMeterWaterCmd.class); |
| | | private static Logger logger = LoggerFactory.getLogger(ListMeterWaterCmd.class); |
| | | |
| | | @Autowired |
| | | private IMeterWaterV1InnerServiceSMO meterWaterV1InnerServiceSMOImpl; |
| | | |
| | |
| | | |
| | | @Override |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException { |
| | | |
| | | MeterWaterDto meterWaterDto = BeanConvertUtil.covertBean(reqJson, MeterWaterDto.class); |
| | | ResultVo resultVo = null; |
| | | if (!freshFeeDtoParam(meterWaterDto, reqJson)) { |
| | |
| | | } |
| | | |
| | | if (MeterWaterDto.PAYER_OBJ_TYPE_ROOM.equals(meterWaterDto.getObjType())) { |
| | | String[] nums = roomNum.split("-",3); |
| | | String[] nums = roomNum.split("-", 3); |
| | | if (nums.length != 3) { |
| | | return false; |
| | | } |
| | |
| | | meterWaterDto.setObjId(roomDtos.get(0).getRoomId()); |
| | | |
| | | } else { |
| | | String[] nums = roomNum.split("-",2); |
| | | String[] nums = roomNum.split("-", 2); |
| | | if (nums.length != 2) { |
| | | return false; |
| | | } |
| | |
| | | returnPayFeePo.setCycles((reqJson.getDouble("cycles") * -1)+""); |
| | | returnPayFeePo.setReceivableAmount((reqJson.getDouble("receivableAmount") * -1)+""); |
| | | returnPayFeePo.setReceivedAmount((reqJson.getDouble("receivedAmount") * -1)+""); |
| | | returnPayFeePo.setPrimeRate("7"); //退费默认方式为转账 |
| | | int flag = returnPayFeeV1InnerServiceSMOImpl.saveReturnPayFee(returnPayFeePo); |
| | | |
| | | if (flag < 1) { |
| | |
| | | * Created by wuxw on 2018/7/4. |
| | | */ |
| | | public abstract class AbstractFeeDetailBusinessServiceDataFlowListener extends AbstractBusinessServiceDataFlowListener { |
| | | private static Logger logger = LoggerFactory.getLogger(AbstractFeeDetailBusinessServiceDataFlowListener.class); |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(AbstractFeeDetailBusinessServiceDataFlowListener.class); |
| | | |
| | | /** |
| | | * 获取 DAO工具类 |
| | |
| | | businessFeeDetailInfo.put("cycles", businessFeeDetailInfo.get("cycles")); |
| | | businessFeeDetailInfo.put("remark", businessFeeDetailInfo.get("remark")); |
| | | businessFeeDetailInfo.put("receivedAmount", businessFeeDetailInfo.get("received_amount")); |
| | | businessFeeDetailInfo.put("payableAmount", businessFeeDetailInfo.get("payable_amount")); |
| | | businessFeeDetailInfo.put("communityId", businessFeeDetailInfo.get("community_id")); |
| | | businessFeeDetailInfo.put("feeId", businessFeeDetailInfo.get("fee_id")); |
| | | businessFeeDetailInfo.put("startTime", businessFeeDetailInfo.get("start_time")); |
| | |
| | | * @param businessFeeDetail 费用明细信息 |
| | | */ |
| | | protected void autoSaveDelBusinessFeeDetail(Business business, JSONObject businessFeeDetail) { |
| | | //自动插入DEL |
| | | //自动插入DEL |
| | | Map info = new HashMap(); |
| | | info.put("detailId", businessFeeDetail.getString("detailId")); |
| | | info.put("statusCd", StatusConstant.STATUS_CD_VALID); |
| | |
| | | if (currentFeeDetailInfos == null || currentFeeDetailInfos.size() != 1) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR, "未找到需要修改数据信息,入参错误或数据有问题,请检查" + info); |
| | | } |
| | | |
| | | Map currentFeeDetailInfo = currentFeeDetailInfos.get(0); |
| | | |
| | | currentFeeDetailInfo.put("bId", business.getbId()); |
| | | |
| | | currentFeeDetailInfo.put("operate", currentFeeDetailInfo.get("operate")); |
| | | currentFeeDetailInfo.put("primeRate", currentFeeDetailInfo.get("prime_rate")); |
| | | currentFeeDetailInfo.put("detailId", currentFeeDetailInfo.get("detail_id")); |
| | |
| | | currentFeeDetailInfo.put("cycles", currentFeeDetailInfo.get("cycles")); |
| | | currentFeeDetailInfo.put("remark", currentFeeDetailInfo.get("remark")); |
| | | currentFeeDetailInfo.put("receivedAmount", currentFeeDetailInfo.get("received_amount")); |
| | | currentFeeDetailInfo.put("payableAmount", currentFeeDetailInfo.get("payable_amount")); |
| | | currentFeeDetailInfo.put("communityId", currentFeeDetailInfo.get("community_id")); |
| | | currentFeeDetailInfo.put("feeId", currentFeeDetailInfo.get("fee_id")); |
| | | currentFeeDetailInfo.put("startTime", currentFeeDetailInfo.get("start_time")); |
| | | currentFeeDetailInfo.put("endTime", currentFeeDetailInfo.get("end_time")); |
| | | |
| | | |
| | | currentFeeDetailInfo.put("operate", StatusConstant.OPERATE_DEL); |
| | | getFeeDetailServiceDaoImpl().saveBusinessFeeDetailInfo(currentFeeDetailInfo); |
| | | |
| | | for (Object key : currentFeeDetailInfo.keySet()) { |
| | | if (businessFeeDetail.get(key) == null) { |
| | | businessFeeDetail.put(key.toString(), currentFeeDetailInfo.get(key)); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | } else { |
| | | businessVisits = (JSONArray) bObj; |
| | | } |
| | | }else { |
| | | } else { |
| | | if (data instanceof JSONObject) { |
| | | businessVisits.add(data); |
| | | } |
| | |
| | | } else { |
| | | businessVisits = (JSONArray) bObj; |
| | | } |
| | | }else { |
| | | } else { |
| | | if (data instanceof JSONObject) { |
| | | businessVisits.add(data); |
| | | } |
| | | } |
| | | |
| | | for (int bVisitIndex = 0; bVisitIndex < businessVisits.size(); bVisitIndex++) { |
| | | JSONObject businessVisit = businessVisits.getJSONObject(bVisitIndex); |
| | | if (!StringUtil.isEmpty(businessVisit.getString("flag")) && businessVisit.getString("flag").equals("1")) { |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Calendar; |
| | | import java.util.List; |
| | | import java.util.Locale; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 巡检签到状态修改定时任务 |
| | |
| | | List<CommunityDto> communityDtos = getAllCommunity(); |
| | | for (CommunityDto communityDto : communityDtos) { |
| | | try { |
| | | //签到状态修改 |
| | | generatorTask(taskDto, communityDto); |
| | | //当天巡检任务状态修改 |
| | | changeToadyTask(taskDto, communityDto); |
| | | } catch (Exception e) { |
| | | logger.error("推送消息失败", e); |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | private void changeToadyTask(TaskDto taskDto, CommunityDto communityDto) throws ParseException { |
| | | //取出今天的日期 |
| | | Calendar cal = Calendar.getInstance(Locale.CHINA); |
| | | String today = new SimpleDateFormat("yyyy-MM-dd").format(cal.getTime()); |
| | | String toadyStartTime = today + " 00:00:00"; |
| | | String todayEndTime = today + " 23:59:59"; |
| | | InspectionTaskDetailDto inspectionTaskDetailDto = new InspectionTaskDetailDto(); |
| | | inspectionTaskDetailDto.setCommunityId(communityDto.getCommunityId()); |
| | | inspectionTaskDetailDto.setQrCodeTime(toadyStartTime); |
| | | inspectionTaskDetailDto.setNowTime(todayEndTime); |
| | | inspectionTaskDetailDto.setInspectionTimeFlag("1"); |
| | | List<InspectionTaskDetailDto> inspectionTaskDetailDtos = iInspectionTaskDetailInnerServiceSMOImpl.queryInspectionTaskDetails(inspectionTaskDetailDto); |
| | | if (inspectionTaskDetailDtos != null && inspectionTaskDetailDtos.size() > 0) { |
| | | String taskId = ""; |
| | | for (InspectionTaskDetailDto inspectionTaskDetail : inspectionTaskDetailDtos) { |
| | | InspectionTaskDto inspectionTaskDto = new InspectionTaskDto(); |
| | | if (!StringUtil.isEmpty(inspectionTaskDetail.getState()) && !inspectionTaskDetail.getState().equals("20200407")) { //不是巡检完成状态 |
| | | //获取当前时间 |
| | | Date date = new Date(); |
| | | if (!StringUtil.isEmpty(inspectionTaskDetail.getPlanInsTime()) && !StringUtil.isEmpty(inspectionTaskDetail.getPlanEndTime())) { |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | //获取巡检计划开始时间 |
| | | Date planInsTime = sdf.parse(inspectionTaskDetail.getPlanInsTime()); |
| | | //获取巡检计划结束时间 |
| | | Date planEndTime = sdf.parse(inspectionTaskDetail.getPlanEndTime()); |
| | | if (date.before(planInsTime)) { //如果当前时间在计划开始时间之前,任务状态就为未开始 |
| | | inspectionTaskDetail.setState("20200405"); // 20200405 未开始 20200406 巡检中 20200407 巡检完成 20200408 巡检未完成 |
| | | inspectionTaskDto.setState("20200405"); //20200405 未开始 20200406 巡检中 20200407 巡检完成 20200408 已超时 20200409 缺勤 |
| | | } else if (date.after(planEndTime)) { //如果当前时间在计划结束时间之后,任务状态为巡检未完成 |
| | | inspectionTaskDetail.setState("20200408"); |
| | | inspectionTaskDto.setState("20200408"); |
| | | } else { |
| | | inspectionTaskDetail.setState("20200406"); |
| | | inspectionTaskDto.setState("20200406"); |
| | | } |
| | | } else { |
| | | inspectionTaskDetail.setState("20200405"); |
| | | inspectionTaskDto.setState("20200405"); |
| | | } |
| | | iInspectionTaskDetailInnerServiceSMOImpl.updateInspectionTaskDetail(inspectionTaskDetail); |
| | | } |
| | | if (!taskId.equals(inspectionTaskDetail.getTaskId())) { |
| | | //获取巡检任务id |
| | | taskId = inspectionTaskDetail.getTaskId(); |
| | | inspectionTaskDto.setTaskId(taskId); |
| | | iInspectionTaskInnerServiceSMOImpl.updateInspectionTask(inspectionTaskDto); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | import com.java110.report.bmo.reportInfoBackCity.IUpdateReportInfoBackCityBMO; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Calendar; |
| | | |
| | | |
| | | @RestController |
| | |
| | | */ |
| | | @RequestMapping(value = "/saveReportInfoBackCity", method = RequestMethod.POST) |
| | | public ResponseEntity<String> saveReportInfoBackCity(@RequestBody JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId"); |
| | | |
| | | |
| | | ReportInfoBackCityPo reportInfoBackCityPo = BeanConvertUtil.covertBean(reqJson, ReportInfoBackCityPo.class); |
| | | return saveReportInfoBackCityBMOImpl.save(reportInfoBackCityPo); |
| | | /*//正则匹配身份证号是否是正确的,15位或者17位数字+数字/x/X |
| | | if (reqJson.containsKey("idCard") && !StringUtil.isEmpty(reqJson.getString("idCard"))) { |
| | | if (reqJson.getString("idCard").matches("^\\d{15}|\\d{17}[\\dxX]$")) { |
| | | ReportInfoBackCityPo reportInfoBackCityPo = BeanConvertUtil.covertBean(reqJson, ReportInfoBackCityPo.class); |
| | | return saveReportInfoBackCityBMOImpl.save(reportInfoBackCityPo); |
| | | } else { |
| | | throw new IllegalArgumentException("身份证号格式不对!"); |
| | | } |
| | | } else { |
| | | ReportInfoBackCityPo reportInfoBackCityPo = BeanConvertUtil.covertBean(reqJson, ReportInfoBackCityPo.class); |
| | | return saveReportInfoBackCityBMOImpl.save(reportInfoBackCityPo); |
| | | }*/ |
| | | } |
| | | |
| | | /** |
| | |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.dto.RoomDto; |
| | | import com.java110.dto.fee.FeeConfigDto; |
| | | import com.java110.dto.fee.FeeDetailDto; |
| | | import com.java110.dto.fee.FeeDto; |
| | | import com.java110.dto.owner.OwnerDto; |
| | | import com.java110.dto.owner.OwnerRoomRelDto; |
| | |
| | | import com.java110.dto.reportFeeMonthStatistics.ReportFeeMonthStatisticsTotalDto; |
| | | import com.java110.intf.community.IRepairInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeConfigInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeDetailInnerServiceSMO; |
| | | import com.java110.intf.report.IReportFeeMonthStatisticsInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerRoomRelInnerServiceSMO; |
| | |
| | | |
| | | private static final Logger logger = LoggerFactory.getLogger(GetReportFeeMonthStatisticsBMOImpl.class); |
| | | |
| | | |
| | | private int MAX_ROWS = 500; // 最大行数 |
| | | |
| | | @Autowired |
| | |
| | | @Autowired |
| | | private IComputeFeeSMO computeFeeSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFeeDetailInnerServiceSMO feeDetailInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param reportFeeMonthStatisticsDto |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | public ResponseEntity<String> get(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) { |
| | | |
| | | |
| | | int count = reportFeeMonthStatisticsInnerServiceSMOImpl.queryReportFeeMonthStatisticssCount(reportFeeMonthStatisticsDto); |
| | | |
| | |
| | | Double totalLateFee = 0.0; |
| | | List<String> ownerIds = new ArrayList<>(); |
| | | for (ReportFeeMonthStatisticsDto reportFeeMonthStatistics : reportFeeMonthStatisticsDtos) { |
| | | FeeDetailDto feeDetailDto = new FeeDetailDto(); |
| | | feeDetailDto.setDetailId(reportFeeMonthStatistics.getDetailId()); |
| | | List<FeeDetailDto> feeDetailDtos = feeDetailInnerServiceSMOImpl.queryFeeDetails(feeDetailDto); |
| | | Assert.listOnlyOne(feeDetailDtos, "查询费用明细表错误"); |
| | | reportFeeMonthStatistics.setReceivableAmount(feeDetailDtos.get(0).getReceivableAmount()); |
| | | reportFeeMonthStatistics.setPayableAmount(feeDetailDtos.get(0).getPayableAmount()); |
| | | //应收金额 |
| | | Double receivableAmount = Double.valueOf(reportFeeMonthStatistics.getReceivableAmount()); |
| | | //实收金额 |
| | |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> save(ReportInfoBackCityPo reportInfoBackCityPo) { |
| | | |
| | | if(StringUtil.isEmpty(reportInfoBackCityPo.getUserId())){ |
| | | reportInfoBackCityPo.setUserId("-1"); |
| | | } |
| | | |
| | | reportInfoBackCityPo.setBackId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_backId)); |
| | | int flag = reportInfoBackCityInnerServiceSMOImpl.saveReportInfoBackCity(reportInfoBackCityPo); |
| | | |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | |
| | | * @path /app/contract/queryContractTypeSpec |
| | | */ |
| | | @RequestMapping(value = "/queryContractTypeSpec", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryContractTypeSpec(@RequestHeader(value = "store-id") String storeId, |
| | | public ResponseEntity<String> queryContractTypeSpec(@RequestParam(value = "specName", required = false) String specName, |
| | | @RequestParam(value = "specShow", required = false) String specShow, |
| | | @RequestParam(value = "specCd", required = false) String specCd, |
| | | @RequestHeader(value = "store-id") String storeId, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row, |
| | | @RequestParam(value = "contractTypeId") String contractTypeId) { |
| | |
| | | contractTypeSpecDto.setRow(row); |
| | | contractTypeSpecDto.setStoreId(storeId); |
| | | contractTypeSpecDto.setContractTypeId(contractTypeId); |
| | | contractTypeSpecDto.setSpecName(specName); |
| | | contractTypeSpecDto.setSpecShow(specShow); |
| | | contractTypeSpecDto.setSpecCd(specCd); |
| | | return getContractTypeSpecBMOImpl.get(contractTypeSpecDto); |
| | | } |
| | | |
| | |
| | | import java.util.List; |
| | | |
| | | @Java110Cmd(serviceCode = "complaint.listComplaints") |
| | | public class ListComplaintsCmd extends Cmd{ |
| | | public class ListComplaintsCmd extends Cmd { |
| | | |
| | | @Autowired |
| | | private IComplaintInnerServiceSMO complaintInnerServiceSMOImpl; |
| | |
| | | |
| | | @Autowired |
| | | private IComplaintUserInnerServiceSMO complaintUserInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFileRelInnerServiceSMO fileRelInnerServiceSMOImpl; |
| | | |
| | |
| | | @Override |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException { |
| | | ComplaintDto complaintDto = BeanConvertUtil.covertBean(reqJson, ComplaintDto.class); |
| | | |
| | | String roomId = reqJson.getString("roomId"); |
| | | if (!StringUtil.isEmpty(roomId) && roomId.contains("-")) { |
| | | String[] values = roomId.split("-",3); |
| | | String[] values = roomId.split("-", 3); |
| | | if (values.length == 3) { |
| | | RoomDto roomDto = new RoomDto(); |
| | | roomDto.setFloorNum(values[0]); |
| | |
| | | complaintDto.setRoomId(roomDtos.get(0).getRoomId()); |
| | | } |
| | | } |
| | | |
| | | int count = complaintInnerServiceSMOImpl.queryComplaintsCount(complaintDto); |
| | | |
| | | List<ApiComplaintDataVo> complaints = null; |
| | | |
| | | if (count > 0) { |
| | | List<ComplaintDto> complaintDtos = complaintInnerServiceSMOImpl.queryComplaints(complaintDto); |
| | | complaintDtos = freshCurrentUser(complaintDtos); |
| | |
| | | } else { |
| | | complaints = new ArrayList<>(); |
| | | } |
| | | |
| | | ApiComplaintVo apiComplaintVo = new ApiComplaintVo(); |
| | | |
| | | apiComplaintVo.setTotal(count); |
| | | apiComplaintVo.setRecords((int) Math.ceil((double) count / (double) reqJson.getInteger("row"))); |
| | | apiComplaintVo.setComplaints(complaints); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(JSONObject.toJSONString(apiComplaintVo), HttpStatus.OK); |
| | | |
| | | context.setResponseEntity(responseEntity); |
| | | |
| | | } |
| | | |
| | | private List<ComplaintDto> freshCurrentUser(List<ComplaintDto> complaintDtos) { |
| | |
| | | complaintDto = complaintUserInnerServiceSMOImpl.getTaskCurrentUser(complaintDto); |
| | | tmpComplaintDtos.add(complaintDto); |
| | | } |
| | | |
| | | return tmpComplaintDtos; |
| | | } |
| | | |
| | |
| | | List<PhotoVo> photoVos = null; |
| | | PhotoVo photoVo = null; |
| | | for (ApiComplaintDataVo complaintDataVo : complaints) { |
| | | |
| | | FileRelDto fileRelDto = new FileRelDto(); |
| | | fileRelDto.setObjId(complaintDataVo.getComplaintId()); |
| | | fileRelDto.setRelTypeCd("13000"); |
| | |
| | | photoVos = new ArrayList<>(); |
| | | for (FileRelDto tmpFileRelDto : fileRelDtos) { |
| | | photoVo = new PhotoVo(); |
| | | photoVo.setUrl("/callComponent/download/getFile/file?fileId=" + tmpFileRelDto.getFileRealName() + "&communityId=" + complaintDataVo.getCommunityId()); |
| | | photoVo.setUrl(tmpFileRelDto.getFileRealName()); |
| | | photoVos.add(photoVo); |
| | | } |
| | | complaintDataVo.setPhotos(photoVos); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | if (reqJson.containsKey("photos") && reqJson.getJSONArray("photos").size() > 0) { |
| | | JSONArray photos = reqJson.getJSONArray("photos"); |
| | | for (int photoIndex = 0; photoIndex < photos.size(); photoIndex++) { |
| | | |
| | | JSONObject photoObj = photos.getJSONObject(photoIndex); |
| | | FileDto fileDto = new FileDto(); |
| | | fileDto.setFileId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_file_id)); |
| | | fileDto.setFileName(fileDto.getFileId()); |
| | | fileDto.setContext(photoObj.getString("photo")); |
| | | fileDto.setSuffix("jpeg"); |
| | | fileDto.setCommunityId(reqJson.getString("communityId")); |
| | | String fileName = fileInnerServiceSMOImpl.saveFile(fileDto); |
| | | reqJson.put("ownerPhotoId", fileDto.getFileId()); |
| | | reqJson.put("fileSaveName", fileName); |
| | | |
| | | Object photoObj = photos.get(photoIndex); |
| | | JSONObject businessUnit = new JSONObject(); |
| | | businessUnit.put("fileRelId", "-1"); |
| | | businessUnit.put("relTypeCd", "13000"); |
| | | businessUnit.put("saveWay", "table"); |
| | | businessUnit.put("objId", reqJson.getString("complaintId")); |
| | | businessUnit.put("fileRealName", fileDto.getFileId()); |
| | | businessUnit.put("fileSaveName", fileName); |
| | | businessUnit.put("fileRealName", photoObj.toString()); |
| | | businessUnit.put("fileSaveName", photoObj.toString()); |
| | | FileRelPo fileRelPo = BeanConvertUtil.covertBean(businessUnit, FileRelPo.class); |
| | | fileRelInnerServiceSMOImpl.saveFileRel(fileRelPo); |
| | | } |
| | |
| | | @Override |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | int row = reqJson.getInteger("row"); |
| | | |
| | | if (reqJson.containsKey("num") && !StringUtil.isEmpty(reqJson.getString("num"))) { |
| | | ParkingSpaceDto parkingSpaceDto = new ParkingSpaceDto(); |
| | | parkingSpaceDto.setAreaNum(reqJson.getString("areaNum")); |
| | |
| | | cmdDataFlowContext.setResponseEntity(responseEntity); |
| | | return; |
| | | } |
| | | |
| | | reqJson.put("psId", parkingSpaceDtos.get(0).getPsId()); |
| | | } |
| | | OwnerCarDto ownerCarDto = BeanConvertUtil.covertBean(reqJson, OwnerCarDto.class); |
| | |
| | | ownerCarDto.setCarTypeCd(""); |
| | | ownerCarDto.setCarTypeCds(reqJson.getString("carTypeCds").split(",")); |
| | | } |
| | | |
| | | //查询总记录数 |
| | | int total = ownerCarInnerServiceSMOImpl.queryOwnerCarsCount(ownerCarDto); |
| | | // int count = 0; |
| | | List<OwnerCarDto> ownerCarDtoList = null; |
| | | |
| | | if (total > 0) { |
| | | ownerCarDtoList = ownerCarInnerServiceSMOImpl.queryOwnerCars(ownerCarDto); |
| | | |
| | | //小区20条时刷房屋和车位信息 |
| | | if (row < 20) { |
| | | freshPs(ownerCarDtoList); |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | ResponseEntity<String> responseEntity = ResultVo.createResponseEntity((int) Math.ceil((double) total / (double) row), total, ownerCarDtoList); |
| | | cmdDataFlowContext.setResponseEntity(responseEntity); |
| | | } |
| | | |
| | | private void freshPs(List<OwnerCarDto> ownerCarDtoList) { |
| | | |
| | | if (ownerCarDtoList == null || ownerCarDtoList.size() < 1) { |
| | | return; |
| | | } |
| | | |
| | | List<String> psIds = new ArrayList<>(); |
| | | for (OwnerCarDto ownerCarDto : ownerCarDtoList) { |
| | | if (StringUtil.isEmpty(ownerCarDto.getPsId())) { |
| | |
| | | } |
| | | psIds.add(ownerCarDto.getPsId()); |
| | | } |
| | | |
| | | ParkingSpaceDto parkingSpaceDto = new ParkingSpaceDto(); |
| | | parkingSpaceDto.setCommunityId(ownerCarDtoList.get(0).getCommunityId()); |
| | | parkingSpaceDto.setPsIds(psIds.toArray(new String[psIds.size()])); |
| | | List<ParkingSpaceDto> parkingSpaceDtos = parkingSpaceInnerServiceSMOImpl.queryParkingSpaces(parkingSpaceDto); |
| | | |
| | | for (ParkingSpaceDto tmpParkingSpaceDto : parkingSpaceDtos) { |
| | | for (OwnerCarDto ownerCarDto : ownerCarDtoList) { |
| | | if (tmpParkingSpaceDto.getPsId().equals(ownerCarDto.getPsId())) { |
| | |
| | | * @param ownerCarDtos |
| | | */ |
| | | private void freshRoomInfo(List<OwnerCarDto> ownerCarDtos) { |
| | | |
| | | for (OwnerCarDto ownerCarDto : ownerCarDtos) { |
| | | |
| | | doFreshRoomInfo(ownerCarDto); |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | private void doFreshRoomInfo(OwnerCarDto ownerCarDto) { |
| | | OwnerRoomRelDto ownerRoomRelDto = new OwnerRoomRelDto(); |
| | | ownerRoomRelDto.setOwnerId(ownerCarDto.getOwnerId()); |
| | | |
| | | List<OwnerRoomRelDto> ownerRoomRelDtos = ownerRoomRelInnerServiceSMOImpl.queryOwnerRoomRels(ownerRoomRelDto); |
| | | if (ownerRoomRelDtos == null || ownerRoomRelDtos.size() < 1) { |
| | | ownerCarDto.setRoomName("-"); |
| | | return; |
| | | } |
| | | |
| | | List<String> roomIds = new ArrayList<>(); |
| | | for (OwnerRoomRelDto tOwnerRoomRelDto : ownerRoomRelDtos) { |
| | | roomIds.add(tOwnerRoomRelDto.getRoomId()); |
| | | } |
| | | |
| | | RoomDto roomDto = new RoomDto(); |
| | | roomDto.setCommunityId(ownerCarDto.getCommunityId()); |
| | | roomDto.setRoomIds(roomIds.toArray(new String[roomIds.size()])); |
| | |
| | | for (RoomDto tRoomDto : roomDtos) { |
| | | roomName += (tRoomDto.getFloorNum() + "栋" + tRoomDto.getUnitNum() + "单元" + tRoomDto.getRoomNum() + "室" + "/"); |
| | | } |
| | | |
| | | roomName = roomName.endsWith("/") ? roomName.substring(0, roomName.length() - 1) : roomName; |
| | | ownerCarDto.setRoomName(roomName); |
| | | } |
| | |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.dto.basePrivilege.BasePrivilegeDto; |
| | | import com.java110.dto.file.FileRelDto; |
| | | import com.java110.dto.owner.OwnerDto; |
| | | import com.java110.intf.common.IFileRelInnerServiceSMO; |
| | | import com.java110.intf.community.IMenuInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerInnerServiceSMO; |
| | | import com.java110.utils.exception.CmdException; |
| | |
| | | |
| | | @Autowired |
| | | private IMenuInnerServiceSMO menuInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFileRelInnerServiceSMO fileRelInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException { |
| | |
| | | } |
| | | } |
| | | } |
| | | for (OwnerDto ownerdto : ownerDtoList) { |
| | | FileRelDto fileRelDto = new FileRelDto(); |
| | | fileRelDto.setObjId(ownerdto.getMemberId()); |
| | | List<FileRelDto> fileRelDtos = fileRelInnerServiceSMOImpl.queryFileRels(fileRelDto); |
| | | if(fileRelDtos != null && fileRelDtos.size() > 0){ |
| | | ownerdto.setUrl(fileRelDtos.get(0).getFileSaveName()); |
| | | } |
| | | } |
| | | ApiOwnerVo apiOwnerVo = new ApiOwnerVo(); |
| | | apiOwnerVo.setOwners(BeanConvertUtil.covertBeanList(ownerDtoList, ApiOwnerDataVo.class)); |
| | | apiOwnerVo.setTotal(ownerDtoList.size()); |
| | |
| | | Assert.jsonObjectHaveKey(reqJson, "carColor", "未包含carColor"); |
| | | Assert.jsonObjectHaveKey(reqJson, "psId", "未包含psId"); |
| | | Assert.jsonObjectHaveKey(reqJson, "storeId", "未包含storeId"); |
| | | |
| | | Assert.hasLength(reqJson.getString("communityId"), "小区ID不能为空"); |
| | | Assert.hasLength(reqJson.getString("ownerId"), "ownerId不能为空"); |
| | | Assert.hasLength(reqJson.getString("psId"), "psId不能为空"); |
| | | |
| | | //检查车位是否是空闲状态 |
| | | ParkingSpaceDto parkingSpaceDto = new ParkingSpaceDto(); |
| | | parkingSpaceDto.setPsId(reqJson.getString("psId")); |
| | | List<ParkingSpaceDto> parkingSpaceDtos = parkingSpaceInnerServiceSMOImpl.queryParkingSpaces(parkingSpaceDto); |
| | | Assert.listOnlyOne(parkingSpaceDtos, "查询车位错误!"); |
| | | //获取车位状态 |
| | | String state = parkingSpaceDtos.get(0).getState(); |
| | | if (StringUtil.isEmpty(state) || !state.equals("F")) { |
| | | throw new IllegalArgumentException("该车位不是空闲状态!"); |
| | | } |
| | | |
| | | //校验车牌号是否存在 |
| | | OwnerCarDto ownerCarDto = new OwnerCarDto(); |
| | |
| | | JSONObject businessParkingSpace = new JSONObject(); |
| | | |
| | | businessParkingSpace.putAll(BeanConvertUtil.beanCovertMap(parkingSpaceDto)); |
| | | businessParkingSpace.put("state", reqJson.getString("carNumType")); |
| | | ParkingSpacePo parkingSpacePo = BeanConvertUtil.covertBean(businessParkingSpace, ParkingSpacePo.class); |
| | | parkingSpacePo.setState("H"); //S 出售 H 出租 F 空闲 |
| | | flag = parkingSpaceV1InnerServiceSMOImpl.updateParkingSpace(parkingSpacePo); |
| | | if (flag < 1) { |
| | | throw new CmdException("修改车位状态失败"); |
| | |
| | | @Autowired |
| | | private IOrgV1InnerServiceSMO orgV1InnerServiceSMOImpl; |
| | | |
| | | |
| | | @Autowired |
| | | private IRoleCommunityV1InnerServiceSMO roleCommunityV1InnerServiceSMOImpl; |
| | | |
| | |
| | | @Autowired |
| | | private IOrgStaffRelInnerServiceSMO iOrgStaffRelInnerServiceSMO; |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException { |
| | | Assert.hasKeyAndValue(reqJson, "page", "请求报文中未包含page节点"); |
| | |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException { |
| | | UserDto userDto = BeanConvertUtil.covertBean(reqJson, UserDto.class); |
| | | String userId = context.getReqHeaders().get("user-id"); |
| | | |
| | | |
| | | // 判断是不是管理员,管理员反馈 物业 的所角色 |
| | | UserDto userDto1 = new UserDto(); |
| | | userDto1.setUserId(userId); |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | int count = userInnerServiceSMOImpl.getStaffCount(userDto); |
| | | |
| | | List<ApiStaffDataVo> staffs = new ArrayList<>(); |
| | | |
| | | if (count > 0) { |
| | | List<ApiStaffDataVo> staffList = BeanConvertUtil.covertBeanList(userInnerServiceSMOImpl.getStaffs(userDto), ApiStaffDataVo.class); |
| | | for (ApiStaffDataVo apiStaffDataVo : staffList) { |
| | |
| | | } else { |
| | | staffs = new ArrayList<>(); |
| | | } |
| | | |
| | | ApiStaffVo apiStaffVo = new ApiStaffVo(); |
| | | |
| | | apiStaffVo.setTotal(count); |
| | | apiStaffVo.setRecords((int) Math.ceil((double) count / (double) reqJson.getInteger("row"))); |
| | | apiStaffVo.setStaffs(staffs); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(JSONObject.toJSONString(apiStaffVo), HttpStatus.OK); |
| | | |
| | | context.setResponseEntity(responseEntity); |
| | | } |
| | | |
| | |
| | | if (staffs == null || staffs.size() < 1) { |
| | | return; |
| | | } |
| | | |
| | | List<String> staffIds = new ArrayList<>(); |
| | | for (ApiStaffDataVo apiStaffDataVo : staffs) { |
| | | staffIds.add(apiStaffDataVo.getUserId()); |
| | | } |
| | | |
| | | OrgDto orgDto = new OrgDto(); |
| | | orgDto.setStoreId(storeId); |
| | | List<OrgDto> orgDtos = orgV1InnerServiceSMOImpl.queryOrgs(orgDto); |
| | |
| | | orgStaffRelDto.setStaffIds(staffIds.toArray(new String[staffIds.size()])); |
| | | orgStaffRelDto.setStoreId(storeId); |
| | | List<OrgStaffRelDto> orgStaffRels = orgStaffRelV1InnerServiceSMOImpl.queryOrgStaffRels(orgStaffRelDto); |
| | | |
| | | if (orgStaffRels == null || orgStaffRels.size() < 1) { |
| | | return; |
| | | } |
| | | |
| | | for (ApiStaffDataVo apiStaffDataVo : staffs) { |
| | | for (OrgStaffRelDto tmpOrgStaffRelDto : orgStaffRels) { |
| | | if (!apiStaffDataVo.getUserId().equals(tmpOrgStaffRelDto.getStaffId())) { |
| | |
| | | apiStaffDataVo.setParentTwoOrgId(orgs.get(0).getParentOrgId()); |
| | | } |
| | | } |
| | | |
| | | for (ApiStaffDataVo apiStaffDataVo : staffs) { |
| | | if (StringUtil.isEmpty(apiStaffDataVo.getOrgId())) { |
| | | continue; |
| | | } |
| | | apiStaffDataVo.setParentOrgId(apiStaffDataVo.getOrgId()); |
| | | |
| | | findParents(apiStaffDataVo, orgDtos, null, 0); |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | private void findParents(ApiStaffDataVo apiStaffDataVo, List<OrgDto> orgDtos, OrgDto curOrgDto, int orgDeep) { |
| | | for (OrgDto orgDto : orgDtos) { |
| | |
| | | if (!apiStaffDataVo.getParentOrgId().equals(orgDto.getOrgId())) { // 他自己跳过 |
| | | continue; |
| | | } |
| | | |
| | | //如果到一级 就结束 |
| | | if (OrgDto.ORG_LEVEL_STORE.equals(apiStaffDataVo.getOrgLevel())) { |
| | | continue; |
| | | } |
| | | |
| | | apiStaffDataVo.setParentOrgId(orgDto.getParentOrgId()); |
| | | |
| | | if (StringUtil.isEmpty(apiStaffDataVo.getOrgName())) { |
| | | apiStaffDataVo.setOrgName(orgDto.getOrgName()); |
| | | continue; |
| | |
| | | apiStaffDataVo.setOrgName(orgDto.getOrgName() + " / " + apiStaffDataVo.getOrgName()); |
| | | apiStaffDataVo.setOrgLevel(orgDto.getOrgLevel()); |
| | | } |
| | | |
| | | if (curOrgDto != null && OrgDto.ORG_LEVEL_STORE.equals(curOrgDto.getOrgLevel())) { |
| | | return; |
| | | } |
| | | |
| | | if (curOrgDto != null && curOrgDto.getParentOrgId().equals(curOrgDto.getOrgId())) { |
| | | return; |
| | | } |
| | | |
| | | if (curOrgDto != null && "-1".equals(curOrgDto.getParentOrgId())) { |
| | | return; |
| | | } |
| | | |
| | | orgDeep += 1; |
| | | |
| | | if (orgDeep > 20) { |
| | | return; |
| | | } |
| | | |
| | | findParents(apiStaffDataVo, orgDtos, curOrgDto, orgDeep); |
| | | } |
| | | |
| | |
| | | * @param staffs |
| | | */ |
| | | private void refreshInitials(List<ApiStaffDataVo> staffs) { |
| | | |
| | | for (ApiStaffDataVo staffDataVo : staffs) { |
| | | if (StringUtil.isEmpty(staffDataVo.getName())) { |
| | | continue; |
| | |
| | | orgDto1.setOrgId(orgDto.getParentOrgId()); |
| | | List<OrgDto> orgDtoList1 = orgV1InnerServiceSMOImpl.queryOrgs(orgDto1); |
| | | findCompany(haveOrgList, orgDtoList1); |
| | | |
| | | //下一个级别 |
| | | if (!"2".equals(orgDto.getOrgLevel())) { |
| | | OrgDto orgDto3 = new OrgDto(); |
| | |
| | | haveOrgList.add(orgDto4.getOrgId()); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | @Java110Cmd(serviceCode = "user.staff.modify") |
| | | public class UserStaffModifyCmd extends Cmd { |
| | | |
| | | @Autowired |
| | | private IFileInnerServiceSMO fileInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFileRelInnerServiceSMO fileRelInnerServiceSMOImpl; |
| | | |