Merge remote-tracking branch 'origin/xinghong-dev'
| | |
| | | private String objType; |
| | | private String partId; |
| | | private String hasMoney; // 1 标识有 |
| | | |
| | | private String link; |
| | | private String idCard; |
| | | |
| | | private Date createTime; |
| | | |
| | |
| | | public void setHasMoney(String hasMoney) { |
| | | this.hasMoney = hasMoney; |
| | | } |
| | | |
| | | public String getLink() { |
| | | return link; |
| | | } |
| | | |
| | | public void setLink(String link) { |
| | | this.link = link; |
| | | } |
| | | |
| | | public String getIdCard() { |
| | | return idCard; |
| | | } |
| | | |
| | | public void setIdCard(String idCard) { |
| | | this.idCard = idCard; |
| | | } |
| | | } |
| | |
| | | private Date createTime; |
| | | |
| | | private String bId; |
| | | private String feeId; |
| | | private String returnWay; |
| | | private String returnAmount; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | |
| | | public void setbId(String bId) { |
| | | this.bId = bId; |
| | | } |
| | | |
| | | public String getFeeId() { |
| | | return feeId; |
| | | } |
| | | |
| | | public void setFeeId(String feeId) { |
| | | this.feeId = feeId; |
| | | } |
| | | |
| | | public String getReturnWay() { |
| | | return returnWay; |
| | | } |
| | | |
| | | public void setReturnWay(String returnWay) { |
| | | this.returnWay = returnWay; |
| | | } |
| | | |
| | | public String getReturnAmount() { |
| | | return returnAmount; |
| | | } |
| | | |
| | | public void setReturnAmount(String returnAmount) { |
| | | this.returnAmount = returnAmount; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.dto.communitySetting; |
| | | |
| | | import com.java110.dto.PageDto; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @ClassName FloorDto |
| | | * @Description 小区相关设置数据层封装 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 8:52 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | public class CommunitySettingDto extends PageDto implements Serializable { |
| | | |
| | | private String csId; |
| | | private String settingValue; |
| | | private String remark; |
| | | private String communityId; |
| | | private String settingKey; |
| | | private String settingType; |
| | | private String settingTypeName; |
| | | private String settingName; |
| | | |
| | | private Date createTime; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | public String getCsId() { |
| | | return csId; |
| | | } |
| | | |
| | | public void setCsId(String csId) { |
| | | this.csId = csId; |
| | | } |
| | | |
| | | public String getSettingValue() { |
| | | return settingValue; |
| | | } |
| | | |
| | | public void setSettingValue(String settingValue) { |
| | | this.settingValue = settingValue; |
| | | } |
| | | |
| | | public String getRemark() { |
| | | return remark; |
| | | } |
| | | |
| | | public void setRemark(String remark) { |
| | | this.remark = remark; |
| | | } |
| | | |
| | | public String getCommunityId() { |
| | | return communityId; |
| | | } |
| | | |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | |
| | | public String getSettingKey() { |
| | | return settingKey; |
| | | } |
| | | |
| | | public void setSettingKey(String settingKey) { |
| | | this.settingKey = settingKey; |
| | | } |
| | | |
| | | public String getSettingType() { |
| | | return settingType; |
| | | } |
| | | |
| | | public void setSettingType(String settingType) { |
| | | this.settingType = settingType; |
| | | } |
| | | |
| | | public String getSettingName() { |
| | | return settingName; |
| | | } |
| | | |
| | | public void setSettingName(String settingName) { |
| | | this.settingName = settingName; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | | } |
| | | |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | |
| | | public String getSettingTypeName() { |
| | | return settingTypeName; |
| | | } |
| | | |
| | | public void setSettingTypeName(String settingTypeName) { |
| | | this.settingTypeName = settingTypeName; |
| | | } |
| | | } |
| | |
| | | private String ruleId; |
| | | private String beanImpl; |
| | | private String discountType; |
| | | private String discountSmallType; |
| | | |
| | | private List<FeeDiscountRuleSpecDto> feeDiscountRuleSpecs; |
| | | |
| | |
| | | public void setDiscountType(String discountType) { |
| | | this.discountType = discountType; |
| | | } |
| | | |
| | | public String getDiscountSmallType() { |
| | | return discountSmallType; |
| | | } |
| | | |
| | | public void setDiscountSmallType(String discountSmallType) { |
| | | this.discountSmallType = discountSmallType; |
| | | } |
| | | } |
| | |
| | | private String contractCode; |
| | | private String payerObjType; |
| | | private String ownerName; |
| | | private String detailId; |
| | | |
| | | private String objCount; |
| | | private String normalCount; |
| | |
| | | public void setCurOweAmount(String curOweAmount) { |
| | | this.curOweAmount = curOweAmount; |
| | | } |
| | | |
| | | public String getDetailId() { |
| | | return detailId; |
| | | } |
| | | |
| | | public void setDetailId(String detailId) { |
| | | this.detailId = detailId; |
| | | } |
| | | } |
| | |
| | | private String personTel; |
| | | //当前用户id |
| | | private String userId; |
| | | private String isPostpone; |
| | | private String postponeTime; |
| | | private String renovationCompany; |
| | | private String personMain; |
| | | private String personMainTel; |
| | | |
| | | |
| | | private Date createTime; |
| | |
| | | public void setUserId(String userId) { |
| | | this.userId = userId; |
| | | } |
| | | |
| | | public String getIsPostpone() { |
| | | return isPostpone; |
| | | } |
| | | |
| | | public void setIsPostpone(String isPostpone) { |
| | | this.isPostpone = isPostpone; |
| | | } |
| | | |
| | | public String getPostponeTime() { |
| | | return postponeTime; |
| | | } |
| | | |
| | | public void setPostponeTime(String postponeTime) { |
| | | this.postponeTime = postponeTime; |
| | | } |
| | | |
| | | public String getRenovationCompany() { |
| | | return renovationCompany; |
| | | } |
| | | |
| | | public void setRenovationCompany(String renovationCompany) { |
| | | this.renovationCompany = renovationCompany; |
| | | } |
| | | |
| | | public String getPersonMain() { |
| | | return personMain; |
| | | } |
| | | |
| | | public void setPersonMain(String personMain) { |
| | | this.personMain = personMain; |
| | | } |
| | | |
| | | public String getPersonMainTel() { |
| | | return personMainTel; |
| | | } |
| | | |
| | | public void setPersonMainTel(String personMainTel) { |
| | | this.personMainTel = personMainTel; |
| | | } |
| | | } |
| | |
| | | private String state; |
| | | private String communityId; |
| | | private String discountId; |
| | | private String feeId; |
| | | private String returnWay; |
| | | private String returnAmount; |
| | | |
| | | //是否可用状态 |
| | | private String inUse; |
| | |
| | | public void setbId(String bId) { |
| | | this.bId = bId; |
| | | } |
| | | |
| | | public String getFeeId() { |
| | | return feeId; |
| | | } |
| | | |
| | | public void setFeeId(String feeId) { |
| | | this.feeId = feeId; |
| | | } |
| | | |
| | | public String getReturnWay() { |
| | | return returnWay; |
| | | } |
| | | |
| | | public void setReturnWay(String returnWay) { |
| | | this.returnWay = returnWay; |
| | | } |
| | | |
| | | public String getReturnAmount() { |
| | | return returnAmount; |
| | | } |
| | | |
| | | public void setReturnAmount(String returnAmount) { |
| | | this.returnAmount = returnAmount; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.po.communitySetting; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | public class CommunitySettingPo implements Serializable { |
| | | |
| | | private String csId; |
| | | private String settingValue; |
| | | private String remark; |
| | | private String statusCd = "0"; |
| | | private String communityId; |
| | | private String settingKey; |
| | | private String settingType; |
| | | private String settingName; |
| | | |
| | | public String getCsId() { |
| | | return csId; |
| | | } |
| | | |
| | | public void setCsId(String csId) { |
| | | this.csId = csId; |
| | | } |
| | | |
| | | public String getSettingValue() { |
| | | return settingValue; |
| | | } |
| | | |
| | | public void setSettingValue(String settingValue) { |
| | | this.settingValue = settingValue; |
| | | } |
| | | |
| | | public String getRemark() { |
| | | return remark; |
| | | } |
| | | |
| | | public void setRemark(String remark) { |
| | | this.remark = remark; |
| | | } |
| | | |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | | } |
| | | |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | |
| | | public String getCommunityId() { |
| | | return communityId; |
| | | } |
| | | |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | |
| | | public String getSettingKey() { |
| | | return settingKey; |
| | | } |
| | | |
| | | public void setSettingKey(String settingKey) { |
| | | this.settingKey = settingKey; |
| | | } |
| | | |
| | | public String getSettingType() { |
| | | return settingType; |
| | | } |
| | | |
| | | public void setSettingType(String settingType) { |
| | | this.settingType = settingType; |
| | | } |
| | | |
| | | public String getSettingName() { |
| | | return settingName; |
| | | } |
| | | |
| | | public void setSettingName(String settingName) { |
| | | this.settingName = settingName; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | private String state; |
| | | private String configId; |
| | | private String payerObjType; |
| | | private String statusCd; |
| | | private String statusCd = "0"; |
| | | private String createTime; |
| | | private String batchId; |
| | | |
| | |
| | | private String videoName; |
| | | private String isTrue; |
| | | private String isTrueName; |
| | | private String isPostpone; |
| | | private String postponeTime; |
| | | private String renovationCompany; |
| | | private String personMain; |
| | | private String personMainTel; |
| | | |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | |
| | | public void setIsTrueName(String isTrueName) { |
| | | this.isTrueName = isTrueName; |
| | | } |
| | | |
| | | public String getIsPostpone() { |
| | | return isPostpone; |
| | | } |
| | | |
| | | public void setIsPostpone(String isPostpone) { |
| | | this.isPostpone = isPostpone; |
| | | } |
| | | |
| | | public String getPostponeTime() { |
| | | return postponeTime; |
| | | } |
| | | |
| | | public void setPostponeTime(String postponeTime) { |
| | | this.postponeTime = postponeTime; |
| | | } |
| | | |
| | | public String getRenovationCompany() { |
| | | return renovationCompany; |
| | | } |
| | | |
| | | public void setRenovationCompany(String renovationCompany) { |
| | | this.renovationCompany = renovationCompany; |
| | | } |
| | | |
| | | public String getPersonMain() { |
| | | return personMain; |
| | | } |
| | | |
| | | public void setPersonMain(String personMain) { |
| | | this.personMain = personMain; |
| | | } |
| | | |
| | | public String getPersonMainTel() { |
| | | return personMainTel; |
| | | } |
| | | |
| | | public void setPersonMainTel(String personMainTel) { |
| | | this.personMainTel = personMainTel; |
| | | } |
| | | } |
| | |
| | | public static final String CODE_PREFIX_rssId = "33"; |
| | | public static final String CODE_PREFIX_pfId = "34"; |
| | | public static final String CODE_PREFIX_ARDRID = "35"; |
| | | public static final String CODE_PREFIX_csId = "36"; |
| | | public static final String CODE_PREFIX_bankId = "74"; |
| | | public static final String CODE_PREFIX_bondId = "76"; |
| | | public static final String CODE_PREFIX_bobjId = "77"; |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="communitySettingServiceDaoImpl"> |
| | | |
| | | |
| | | <!-- 保存小区相关设置信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveCommunitySettingInfo" parameterType="Map"> |
| | | insert into community_setting( |
| | | cs_id,setting_value,remark,community_id,setting_key,setting_type,setting_name |
| | | ) values ( |
| | | #{csId},#{settingValue},#{remark},#{communityId},#{settingKey},#{settingType},#{settingName} |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询小区相关设置信息 add by wuxw 2018-07-03 --> |
| | | <select id="getCommunitySettingInfo" parameterType="Map" resultType="Map"> |
| | | select t.cs_id,t.cs_id csId,t.setting_value,t.setting_value settingValue,t.remark,t.status_cd,t.status_cd |
| | | statusCd,t.community_id,t.community_id communityId,t.setting_key,t.setting_key |
| | | settingKey,t.setting_type,t.setting_type settingType,t.setting_name,t.setting_name settingName, |
| | | td.name settingTypeName |
| | | from community_setting t |
| | | left join t_dict td on t.setting_type = td.status_cd and td.table_name = 'community_setting' and |
| | | td.table_columns = 'setting_type' |
| | | where 1 = 1 |
| | | <if test="csId !=null and csId != ''"> |
| | | and t.cs_id= #{csId} |
| | | </if> |
| | | <if test="settingValue !=null and settingValue != ''"> |
| | | and t.setting_value= #{settingValue} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="settingKey !=null and settingKey != ''"> |
| | | and t.setting_key= #{settingKey} |
| | | </if> |
| | | <if test="settingType !=null and settingType != ''"> |
| | | and t.setting_type= #{settingType} |
| | | </if> |
| | | <if test="settingName !=null and settingName != ''"> |
| | | and t.setting_name= #{settingName} |
| | | </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="updateCommunitySettingInfo" parameterType="Map"> |
| | | update community_setting t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="settingValue !=null and settingValue != ''"> |
| | | , t.setting_value= #{settingValue} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | , t.remark= #{remark} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | , t.community_id= #{communityId} |
| | | </if> |
| | | <if test="settingKey !=null and settingKey != ''"> |
| | | , t.setting_key= #{settingKey} |
| | | </if> |
| | | <if test="settingType !=null and settingType != ''"> |
| | | , t.setting_type= #{settingType} |
| | | </if> |
| | | <if test="settingName !=null and settingName != ''"> |
| | | , t.setting_name= #{settingName} |
| | | </if> |
| | | where 1=1 |
| | | <if test="csId !=null and csId != ''"> |
| | | and t.cs_id= #{csId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询小区相关设置数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryCommunitySettingsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from community_setting t |
| | | where 1 =1 |
| | | <if test="csId !=null and csId != ''"> |
| | | and t.cs_id= #{csId} |
| | | </if> |
| | | <if test="settingValue !=null and settingValue != ''"> |
| | | and t.setting_value= #{settingValue} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="settingKey !=null and settingKey != ''"> |
| | | and t.setting_key= #{settingKey} |
| | | </if> |
| | | <if test="settingType !=null and settingType != ''"> |
| | | and t.setting_type= #{settingType} |
| | | </if> |
| | | <if test="settingName !=null and settingName != ''"> |
| | | and t.setting_name= #{settingName} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <!-- 保存装修申请信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveRoomRenovationInfo" parameterType="Map"> |
| | | insert into room_renovation( |
| | | remark,is_violation,r_id,room_id,room_name,person_name,violation_desc,start_time,end_time,state,community_id,person_tel |
| | | remark,is_violation,r_id,room_id,room_name,person_name,violation_desc,start_time,end_time,state,community_id,person_tel,is_postpone,postpone_time,renovation_company,person_main,person_main_tel |
| | | ) values ( |
| | | #{remark},#{isViolation},#{rId},#{roomId},#{roomName},#{personName},#{violationDesc},#{startTime},#{endTime},#{state},#{communityId},#{personTel} |
| | | #{remark},#{isViolation},#{rId},#{roomId},#{roomName},#{personName},#{violationDesc},#{startTime},#{endTime},#{state},#{communityId},#{personTel},#{isPostpone},#{postponeTime},#{renovationCompany},#{personMain},#{personMainTel} |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | rId,t.room_id,t.room_id roomId,t.room_name,t.room_name roomName,t.person_name,t.person_name |
| | | personName,t.violation_desc,t.violation_desc violationDesc,t.start_time,t.start_time |
| | | startTime,t.end_time,t.end_time endTime,t.state,td.name stateName,t.community_id,t.community_id |
| | | communityId,t.person_tel,t.person_tel personTel,t.create_time createTime |
| | | communityId,t.person_tel,t.person_tel personTel,t.create_time createTime,t.is_postpone,t.is_postpone isPostpone,t.postpone_time,t.postpone_time postponeTime, |
| | | t.renovation_company,t.renovation_company renovationCompany,t.person_main,t.person_main personMain,t.person_main_tel,t.person_main_tel personMainTel |
| | | from room_renovation t |
| | | left join t_dict td on td.table_name='room_renovation' and td.table_columns='state' |
| | | and t.state=td.status_cd |
| | |
| | | </if> |
| | | <if test="isViolation !=null and isViolation != ''"> |
| | | and t.is_violation= #{isViolation} |
| | | </if> |
| | | <if test="isPostpone !=null and isPostpone != ''"> |
| | | and t.is_postpone= #{isPostpone} |
| | | </if> |
| | | <if test="rId !=null and rId != ''"> |
| | | and t.r_id= #{rId} |
| | |
| | | <if test="examineRemark != null and examineRemark != ''"> |
| | | , t.examineRemark = #{examineRemark} |
| | | </if> |
| | | <if test="isPostpone != null and isPostpone != ''"> |
| | | , t.is_postpone = #{isPostpone} |
| | | </if> |
| | | <if test="postponeTime != null and postponeTime != ''"> |
| | | , t.postpone_time = #{postponeTime} |
| | | </if> |
| | | <if test="renovationCompany != null and renovationCompany != ''"> |
| | | , t.renovation_company = #{renovationCompany} |
| | | </if> |
| | | <if test="personMain != null and personMain != ''"> |
| | | , t.person_main = #{personMain} |
| | | </if> |
| | | <if test="personMainTel != null and personMainTel != ''"> |
| | | , t.person_main_tel = #{personMainTel} |
| | | </if> |
| | | where 1=1 |
| | | <if test="rId !=null and rId != ''"> |
| | | and t.r_id= #{rId} |
| | |
| | | <if test="personTel !=null and personTel != ''"> |
| | | and t.person_tel= #{personTel} |
| | | </if> |
| | | <if test="isPostpone != null and isPostpone != ''"> |
| | | and t.is_postpone = #{isPostpone} |
| | | </if> |
| | | <if test="postponeTime != null and postponeTime != ''"> |
| | | and t.postpone_time = #{postponeTime} |
| | | </if> |
| | | <if test="renovationCompany != null and renovationCompany != ''"> |
| | | and t.renovation_company = #{renovationCompany} |
| | | </if> |
| | | <if test="personMain != null and personMain != ''"> |
| | | and t.person_main = #{personMain} |
| | | </if> |
| | | <if test="personMainTel != null and personMainTel != ''"> |
| | | and t.person_main_tel = #{personMainTel} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <!-- 保存房屋折扣申请信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveApplyRoomDiscountInfo" parameterType="Map"> |
| | | insert into apply_room_discount( |
| | | apply_type,ard_id,create_user_name,create_user_tel,create_remark,check_user_id,check_remark,room_id,room_name,review_user_id,review_remark,start_time,end_time,state,community_id,discount_id,in_use |
| | | apply_type,ard_id,create_user_name,create_user_tel,create_remark,check_user_id,check_remark,room_id,room_name,review_user_id,review_remark,start_time,end_time,state,community_id,discount_id,in_use,fee_id,return_way,return_amount |
| | | ) values ( |
| | | #{applyType},#{ardId},#{createUserName},#{createUserTel},#{createRemark},#{checkUserId},#{checkRemark},#{roomId},#{roomName},#{reviewUserId},#{reviewRemark},#{startTime},#{endTime},#{state}, |
| | | #{communityId},#{discountId},#{inUse} |
| | | #{communityId},#{discountId},#{inUse},#{feeId},#{returnWay},#{returnAmount} |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | statusCd,t.check_remark,t.check_remark checkRemark,t.room_id,t.room_id roomId,t.room_name,t.room_name |
| | | roomName,t.review_user_id,t.review_user_id reviewUserId,t.review_remark,t.review_remark |
| | | reviewRemark,t.start_time,t.start_time startTime,t.end_time,t.end_time |
| | | endTime,t.state,td.name stateName,t.community_id,t.community_id communityId,t.discount_id,t.discount_id discountId,t.in_use,t.in_use inUse,t.create_time,t.create_time createTime, |
| | | endTime,t.state,td.name stateName,t.community_id,t.community_id communityId,t.discount_id,t.discount_id |
| | | discountId,t.in_use,t.in_use inUse,t.fee_id,t.fee_id feeId,t.return_way,t.return_way returnWay,t.return_amount,t.return_amount returnAmount,t.create_time,t.create_time createTime, |
| | | ardt.type_name applyTypeName,fd.discount_name discountName |
| | | from apply_room_discount t |
| | | left join t_dict td on t.state = td.status_cd and td.table_name='apply_room_discount' and td.table_columns ='state' |
| | | left join apply_room_discount_type ardt on t.apply_type = ardt.apply_type and t.community_id = ardt.community_id and ardt.status_cd = '0' |
| | | left join t_dict td on t.state = td.status_cd and td.table_name='apply_room_discount' and td.table_columns |
| | | ='state' |
| | | left join apply_room_discount_type ardt on t.apply_type = ardt.apply_type and t.community_id = ardt.community_id |
| | | and ardt.status_cd = '0' |
| | | left join fee_discount fd on t.discount_id=fd.discount_id |
| | | where t.status_cd = '0' |
| | | <if test="applyType !=null and applyType != ''"> |
| | |
| | | </if> |
| | | <if test="inUse !=null and inUse != ''"> |
| | | and t.in_use= #{inUse} |
| | | </if> |
| | | <if test="feeId !=null and feeId != ''"> |
| | | and t.fee_id= #{feeId} |
| | | </if> |
| | | <if test="returnWay !=null and returnWay != ''"> |
| | | and t.return_way= #{returnWay} |
| | | </if> |
| | | <if test="returnAmount !=null and returnAmount != ''"> |
| | | and t.return_amount= #{returnAmount} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | |
| | | <if test="inUse !=null and inUse != ''"> |
| | | and t.in_use= #{inUse} |
| | | </if> |
| | | <if test="returnWay !=null and returnWay != ''"> |
| | | and t.return_way= #{returnWay} |
| | | </if> |
| | | <if test="returnAmount !=null and returnAmount != ''"> |
| | | and t.return_amount= #{returnAmount} |
| | | </if> |
| | | <if test="feeId !=null and feeId != ''"> |
| | | and t.fee_id= #{feeId} |
| | | </if> |
| | | order by t.create_time desc limit 0,1 |
| | | </select> |
| | | |
| | |
| | | </if> |
| | | <if test="inUse !=null and inUse != ''"> |
| | | , t.in_use= #{inUse} |
| | | </if> |
| | | <if test="feeId !=null and feeId != ''"> |
| | | , t.fee_id= #{feeId} |
| | | </if> |
| | | <if test="returnWay !=null and returnWay != ''"> |
| | | , t.return_way= #{returnWay} |
| | | </if> |
| | | <if test="returnAmount !=null and returnAmount != ''"> |
| | | , t.return_amount= #{returnAmount} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | , t.b_id= #{bId} |
| | |
| | | <if test="inUse !=null and inUse != ''"> |
| | | and t.in_use= #{inUse} |
| | | </if> |
| | | <if test="returnWay !=null and returnWay != ''"> |
| | | and t.return_way= #{returnWay} |
| | | </if> |
| | | <if test="returnAmount !=null and returnAmount != ''"> |
| | | and t.return_amount= #{returnAmount} |
| | | </if> |
| | | <if test="feeId !=null and feeId != ''"> |
| | | and t.fee_id= #{feeId} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <!-- 查询费用折扣规则信息 add by wuxw 2018-07-03 --> |
| | | <select id="getFeeDiscountRuleInfo" parameterType="Map" resultType="Map"> |
| | | select t.rule_name,t.rule_name ruleName,t.remark,t.status_cd,t.status_cd statusCd,t.rule_id,t.rule_id |
| | | ruleId,t.bean_impl,t.bean_impl beanImpl,t.discount_type discountType |
| | | ruleId,t.bean_impl,t.bean_impl beanImpl,t.discount_type discountType,t.discount_small_type , |
| | | t.discount_small_type discountSmallType |
| | | from fee_discount_rule t |
| | | where 1 =1 |
| | | where 1 = 1 |
| | | <if test="ruleName !=null and ruleName != ''"> |
| | | and t.rule_name= #{ruleName} |
| | | </if> |
| | |
| | | <if test="discountType !=null and discountType != ''"> |
| | | and t.discount_type= #{discountType} |
| | | </if> |
| | | <if test="discountSmallType !=null and discountSmallType != ''"> |
| | | and t.discount_small_type= #{discountSmallType} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | |
| | | t.receivable_amount receivableAmount,t.received_amount receivedAmount,pfa.`value` |
| | | importFeeName,t.prime_rate,d.name primeRate,fdr.discount_small_type discountSmallType,fdr.rule_name |
| | | ruleName,pfdd.discount_price discountPrice,co.contract_code contractCode,pfo.`value` ownerName,cb.o_id oId, |
| | | d2.name feeTypeCdName,pfc.fee_type_cd feeTypeCd,t.state,d3.name stateName,t.fee_id feeId,pft.`value` repairId |
| | | d2.name feeTypeCdName,pfc.fee_type_cd feeTypeCd,t.state,d3.name stateName,t.fee_id feeId,pft.`value` repairId, |
| | | t.detail_id,t.detail_id detailId |
| | | from pay_fee_detail t |
| | | INNER JOIN pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | inner join pay_fee_config pfc on pf.config_id = pfc.config_id and pfc.status_cd = '0' |
| | |
| | | <if test="configId !=null and configId != ''"> |
| | | and t.config_id= #{configId} |
| | | </if> |
| | | <if test='hasOweFee !=null and hasOweFee == "Y"'> |
| | | and t.amount_owed > 0 |
| | | </if> |
| | | <if test="configIds !=null"> |
| | | and t.config_id in |
| | | <foreach collection="configIds" item="item" index="index" open="(" close=")" separator=","> |
| | |
| | | <if test="configId !=null and configId != ''"> |
| | | and t.config_id= #{configId} |
| | | </if> |
| | | <if test='hasOweFee !=null and hasOweFee == "Y"'> |
| | | and t.amount_owed > 0 |
| | | </if> |
| | | <if test="configIds !=null"> |
| | | and t.config_id in |
| | | <foreach collection="configIds" item="item" index="index" open="(" close=")" separator=","> |
| | |
| | | <if test="configId !=null and configId != ''"> |
| | | and t.config_id= #{configId} |
| | | </if> |
| | | <if test='hasOweFee !=null and hasOweFee == "Y"'> |
| | | and t.amount_owed > 0 |
| | | </if> |
| | | <if test="configIds !=null"> |
| | | and t.config_id in |
| | | <foreach collection="configIds" item="item" index="index" open="(" close=")" separator=","> |
| New file |
| | |
| | | { |
| | | "autoMove": true, |
| | | "id": "csId", |
| | | "name": "communitySetting", |
| | | "desc": "小区相关设置", |
| | | "shareParam": "communityId", |
| | | "shareColumn": "community_id", |
| | | "shareName": "community", |
| | | "tableName": "community_setting", |
| | | "param": { |
| | | "csId": "cs_id", |
| | | "communityId": "community_id", |
| | | "settingName": "setting_name", |
| | | "settingType": "setting_type", |
| | | "settingKey": "setting_key", |
| | | "settingValue": "setting_value", |
| | | "remark": "remark", |
| | | "statusCd": "status_cd" |
| | | }, |
| | | "required": [ |
| | | { |
| | | "code": "communityId", |
| | | "msg": "小区ID不能为空" |
| | | }, |
| | | { |
| | | "code": "settingType", |
| | | "msg": "设置类型不能为空" |
| | | }, |
| | | { |
| | | "code": "settingKey", |
| | | "msg": "设置key不能为空" |
| | | } |
| | | ] |
| | | } |
| | | |
| New file |
| | |
| | | { |
| | | "templateName": "小区设置", |
| | | "templateCode": "communitySetting", |
| | | "templateKey": "csId", |
| | | "templateKeyName": "小区设置ID", |
| | | "searchCode": "csId", |
| | | "searchName": "小区设置ID", |
| | | "directories": "property", |
| | | "conditions": [ |
| | | { |
| | | "name": "配置类型", |
| | | "inputType": "select", |
| | | "selectValue":"1001,2002", |
| | | "selectValueName":"装修,其他", |
| | | "code": "settingType", |
| | | "whereCondition": "equal" |
| | | }, |
| | | { |
| | | "name": "配置名称", |
| | | "inputType": "input", |
| | | "code": "settingName", |
| | | "whereCondition": "equal" |
| | | }, |
| | | { |
| | | "name": "配置键名称", |
| | | "inputType": "input", |
| | | "code": "settingKey", |
| | | "whereCondition": "equal" |
| | | } |
| | | ], |
| | | "columns": [ |
| | | { |
| | | "code": "settingType", |
| | | "cnCode": "配置类型", |
| | | "desc": "必填,请填写配置类型", |
| | | "required": true, |
| | | "hasDefaultValue": false, |
| | | "inputType": "select", |
| | | "selectValue":"1001", |
| | | "selectValueName":"装修", |
| | | "limit": "maxLength", |
| | | "limitParam": "12", |
| | | "limitErrInfo": "配置类型不能为空", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code": "settingName", |
| | | "cnCode": "配置名称", |
| | | "desc": "必填,请填配置名称", |
| | | "required": true, |
| | | "hasDefaultValue": false, |
| | | "inputType": "input", |
| | | "limit": "maxLength", |
| | | "limitParam": "64", |
| | | "limitErrInfo": "流配置名称超过64位", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code": "settingKey", |
| | | "cnCode": "配置KEY", |
| | | "desc": "必填,请填配置取值", |
| | | "required": true, |
| | | "hasDefaultValue": false, |
| | | "inputType": "input", |
| | | "limit": "maxLength", |
| | | "limitParam": "200", |
| | | "limitErrInfo": "配置取值超过200位", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code": "settingValue", |
| | | "cnCode": "配置取值", |
| | | "desc": "必填,请填配置取值", |
| | | "required": true, |
| | | "hasDefaultValue": false, |
| | | "inputType": "input", |
| | | "limit": "maxLength", |
| | | "limitParam": "200", |
| | | "limitErrInfo": "配置取值超过200位", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code": "remark", |
| | | "cnCode": "备注", |
| | | "desc": "可填,请填写备注", |
| | | "required": false, |
| | | "hasDefaultValue": false, |
| | | "defaultValue": "", |
| | | "inputType": "input", |
| | | "limit": "maxLength", |
| | | "limitParam": "200", |
| | | "limitErrInfo": "备注内容不能超过200", |
| | | "show": false |
| | | } |
| | | ] |
| | | } |
| New file |
| | |
| | | package com.java110.intf.community; |
| | | |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.communitySetting.CommunitySettingDto; |
| | | import com.java110.po.communitySetting.CommunitySettingPo; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName ICommunitySettingInnerServiceSMO |
| | | * @Description 小区相关设置接口类 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 9:04 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | @FeignClient(name = "community-service", configuration = {FeignConfiguration.class}) |
| | | @RequestMapping("/communitySettingApi") |
| | | public interface ICommunitySettingInnerServiceSMO { |
| | | |
| | | |
| | | @RequestMapping(value = "/saveCommunitySetting", method = RequestMethod.POST) |
| | | public int saveCommunitySetting(@RequestBody CommunitySettingPo communitySettingPo); |
| | | |
| | | @RequestMapping(value = "/updateCommunitySetting", method = RequestMethod.POST) |
| | | public int updateCommunitySetting(@RequestBody CommunitySettingPo communitySettingPo); |
| | | |
| | | @RequestMapping(value = "/deleteCommunitySetting", method = RequestMethod.POST) |
| | | public int deleteCommunitySetting(@RequestBody CommunitySettingPo communitySettingPo); |
| | | |
| | | /** |
| | | * <p>查询小区楼信息</p> |
| | | * |
| | | * @param communitySettingDto 数据对象分享 |
| | | * @return CommunitySettingDto 对象数据 |
| | | */ |
| | | @RequestMapping(value = "/queryCommunitySettings", method = RequestMethod.POST) |
| | | List<CommunitySettingDto> queryCommunitySettings(@RequestBody CommunitySettingDto communitySettingDto); |
| | | |
| | | /** |
| | | * 查询<p>小区楼</p>总记录数 |
| | | * |
| | | * @param communitySettingDto 数据对象分享 |
| | | * @return 小区下的小区楼记录数 |
| | | */ |
| | | @RequestMapping(value = "/queryCommunitySettingsCount", method = RequestMethod.POST) |
| | | int queryCommunitySettingsCount(@RequestBody CommunitySettingDto communitySettingDto); |
| | | } |
| | |
| | | @RequestParam(value = "ownerId", required = false) String ownerId, |
| | | @RequestParam(value = "ownerName", required = false) String ownerName, |
| | | @RequestParam(value = "feeId", required = false) String feeId, |
| | | @RequestParam(value = "tel", required = false) String tel, |
| | | @RequestParam(value = "link", required = false) String link, |
| | | @RequestParam(value = "idCard", required = false) String idCard, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | |
| | | OwnerDto ownerDto = new OwnerDto(); |
| | | ownerDto.setOwnerId(ownerId); |
| | | ownerDto.setCommunityId(communityId); |
| | | ownerDto.setLink(tel); |
| | | ownerDto.setLink(link); |
| | | ownerDto.setIdCard(idCard); |
| | | return getAccountBMOImpl.queryOwnerAccount(accountDto, ownerDto); |
| | | } |
| | |
| | | |
| | | /** |
| | | * 查询业主账号 |
| | | * |
| | | * @param accountDto |
| | | * @param ownerDto |
| | | * @return |
| | |
| | | public ResponseEntity<String> queryOwnerAccount(AccountDto accountDto, OwnerDto ownerDto) { |
| | | |
| | | List<OwnerDto> ownerDtos = null; |
| | | if(!StringUtil.isEmpty(ownerDto.getLink()) || !StringUtil.isEmpty(ownerDto.getIdCard())) { |
| | | if (!StringUtil.isEmpty(ownerDto.getLink()) || !StringUtil.isEmpty(ownerDto.getIdCard())) { |
| | | //先查询业主 |
| | | ownerDtos = ownerInnerServiceSMOImpl.queryOwners(ownerDto); |
| | | } |
| | | |
| | | if(ownerDtos != null && ownerDtos.size()> 0){ |
| | | if (ownerDtos != null && ownerDtos.size() > 0) { |
| | | accountDto.setAcctName(""); |
| | | accountDto.setObjId(ownerDtos.get(0).getMemberId()); |
| | | } |
| | |
| | | package com.java110.api.bmo.account; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.bmo.IApiBaseBMO; |
| | | import com.java110.core.context.DataFlowContext; |
| | |
| | | * @param paramObj |
| | | * @param dataFlowContext |
| | | */ |
| | | void dealAccount(JSONObject paramObj, DataFlowContext dataFlowContext); |
| | | void dealAccount(JSONObject paramObj, DataFlowContext dataFlowContext, JSONArray businesses); |
| | | } |
| | |
| | | package com.java110.api.bmo.account.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.bmo.ApiBaseBMO; |
| | | import com.java110.api.bmo.account.IAccountDetailBMO; |
| | |
| | | import com.java110.dto.accountDetail.AccountDetailDto; |
| | | import com.java110.intf.acct.IAccountDetailInnerServiceSMO; |
| | | import com.java110.intf.acct.IAccountInnerServiceSMO; |
| | | import com.java110.po.account.AccountPo; |
| | | import com.java110.po.accountDetail.AccountDetailPo; |
| | | import com.java110.po.fee.PayFeePo; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.CommonConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | @Service("accountDetailBMOImpl") |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void dealAccount(JSONObject paramObj, DataFlowContext dataFlowContext) { |
| | | if(!paramObj.containsKey("deductionAmount")){ |
| | | return ; |
| | | } |
| | | //账户金额 |
| | | double deductionAmount = paramObj.getDouble("deductionAmount"); //抵扣金额 |
| | | double redepositAmount = paramObj.getDouble("redepositAmount"); //转存金额 |
| | | public void dealAccount(JSONObject paramObj, DataFlowContext dataFlowContext, JSONArray businesses) { |
| | | //判断选择的账号 |
| | | JSONArray jsonArray = paramObj.getJSONArray("selectUserAccount"); |
| | | if (jsonArray != null) { |
| | | //应收款 totalFeePrice |
| | | BigDecimal totalFeePrice = new BigDecimal(paramObj.getString("totalFeePrice")); //应收款 |
| | | //实收款 receivedAmount |
| | | BigDecimal receivedAmount = new BigDecimal(paramObj.getString("receivedAmount")); //实收款(扣款金额) |
| | | |
| | | if (deductionAmount == 0 || redepositAmount == 0) { //抵扣金额 |
| | | return; |
| | | } |
| | | String acctId = paramObj.getString("acctId"); |
| | | if (StringUtil.isEmpty(acctId)) { |
| | | throw new IllegalArgumentException("账户id为空!"); |
| | | } |
| | | AccountDto accountDto = new AccountDto(); |
| | | accountDto.setAcctId(acctId); |
| | | //查询账户金额 |
| | | List<AccountDto> accountDtos = accountInnerServiceSMOImpl.queryAccounts(accountDto); |
| | | Assert.listOnlyOne(accountDtos, "查询账户金额错误!"); |
| | | //获取金额 |
| | | double amount = Double.parseDouble(accountDtos.get(0).getAmount()); |
| | | BigDecimal redepositAmount = new BigDecimal("0.00");//抵扣金额 |
| | | for (int columnIndex = 0; columnIndex < jsonArray.size(); columnIndex++) { |
| | | JSONObject param = jsonArray.getJSONObject(columnIndex); |
| | | //账户金额 |
| | | BigDecimal amount = new BigDecimal(param.getString("amount")); //账户金额 |
| | | int flag = amount.compareTo(receivedAmount); |
| | | if (flag == -1) {//账户金额小于实收款 |
| | | receivedAmount = receivedAmount.subtract(amount); |
| | | redepositAmount = amount;//抵扣金额 |
| | | } else { |
| | | redepositAmount = receivedAmount;//抵扣金额 |
| | | } |
| | | //剩余金额 |
| | | amount.compareTo(receivedAmount); |
| | | String acctId = param.getString("acctId"); |
| | | if (StringUtil.isEmpty(acctId)) { |
| | | throw new IllegalArgumentException("账户id为空!"); |
| | | } |
| | | AccountDto accountDto = new AccountDto(); |
| | | accountDto.setAcctId(acctId); |
| | | //查询账户金额 |
| | | List<AccountDto> accountDtos = accountInnerServiceSMOImpl.queryAccounts(accountDto); |
| | | Assert.listOnlyOne(accountDtos, "查询账户金额错误!"); |
| | | if (accountDtos != null && accountDtos.size() > 0) { |
| | | AccountDto accountDto1 = accountDtos.get(0); |
| | | BigDecimal accountDto1Amount = new BigDecimal(accountDto1.getAmount()); |
| | | if (accountDto1Amount.compareTo(redepositAmount) == -1) { |
| | | throw new UnsupportedOperationException("账户金额抵扣不足,请您确认账户金额!"); |
| | | } |
| | | } |
| | | |
| | | if (amount < deductionAmount && deductionAmount > 0) { |
| | | throw new IllegalArgumentException("余额不足"); |
| | | |
| | | AccountDetailPo accountDetailPo = new AccountDetailPo(); |
| | | accountDetailPo.setDetailId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_detailId)); |
| | | int flag1 = redepositAmount.compareTo(BigDecimal.ZERO); |
| | | if (flag1 == 1) { |
| | | accountDetailPo.setAmount(redepositAmount + ""); |
| | | accountDetailPo.setDetailType(AccountDetailDto.DETAIL_TYPE_OUT); |
| | | accountDetailPo.setRemark("前台缴费扣款"); |
| | | } |
| | | accountDetailPo.setOrderId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_orderId)); |
| | | accountDetailPo.setObjType(accountDtos.get(0).getObjType()); |
| | | accountDetailPo.setObjId(accountDtos.get(0).getObjId()); |
| | | accountDetailPo.setAcctId(accountDtos.get(0).getAcctId()); |
| | | accountDetailPo.setRelAcctId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_detailId)); |
| | | |
| | | JSONObject business = JSONObject.parseObject("{\"datas\":{}}"); |
| | | business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_SAVE_ACCT_DETAIL); |
| | | business.put(CommonConstant.HTTP_SEQ, DEFAULT_SEQ + 1); |
| | | business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S); |
| | | |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put(accountDetailPo.getClass().getSimpleName(), BeanConvertUtil.beanCovertMap(accountDetailPo)); |
| | | businesses.add(business); |
| | | } |
| | | |
| | | } |
| | | |
| | | AccountDetailPo accountDetailPo = new AccountDetailPo(); |
| | | accountDetailPo.setDetailId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_detailId)); |
| | | if (deductionAmount > 0) { |
| | | //accountDetailPo.setAmount((deductionAmount * -1) + ""); |
| | | accountDetailPo.setAmount(deductionAmount + ""); |
| | | accountDetailPo.setDetailType(AccountDetailDto.DETAIL_TYPE_OUT); |
| | | accountDetailPo.setRemark("前台缴费扣款"); |
| | | } else { |
| | | accountDetailPo.setAmount(redepositAmount + ""); |
| | | accountDetailPo.setDetailType(AccountDetailDto.DETAIL_TYPE_IN); |
| | | accountDetailPo.setRemark("前台缴费预存"); |
| | | } |
| | | accountDetailPo.setOrderId("-1"); |
| | | accountDetailPo.setObjType(accountDtos.get(0).getObjType()); |
| | | accountDetailPo.setObjId(accountDtos.get(0).getObjId()); |
| | | accountDetailPo.setAcctId(accountDtos.get(0).getAcctId()); |
| | | accountDetailPo.setRelAcctId("-1"); |
| | | super.insert(dataFlowContext, accountDetailPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_ACCT_DETAIL); |
| | | |
| | | } |
| | | |
| | |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.text.DecimalFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | return; |
| | | } |
| | | String computingFormula = feeDto.getComputingFormula(); |
| | | double feePrice = 0.00; |
| | | DecimalFormat df = new DecimalFormat("0.00"); |
| | | Map feePriceAll = computeFeeSMOImpl.getFeePrice(feeDto); |
| | | feeDto.setFeePrice(Double.parseDouble(feePriceAll.get("feePrice").toString())); |
| | | BigDecimal curFeePrice = new BigDecimal(feeDto.getFeePrice()); |
| | | curFeePrice = curFeePrice.multiply(new BigDecimal(oweMonth)); |
| | | feeDto.setAmountOwed(curFeePrice.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue() + ""); |
| | | feeDto.setAmountOwed(df.format(curFeePrice)); |
| | | //动态费用 |
| | | if ("4004".equals(computingFormula) |
| | | && FeeDto.FEE_FLAG_ONCE.equals(feeDto.getFeeFlag()) |
| | | && !FeeDto.STATE_FINISH.equals(feeDto.getState())) { |
| | | feeDto.setAmountOwed(feeDto.getFeePrice() + ""); |
| | | feeDto.setAmountOwed(df.format(curFeePrice)); |
| | | feeDto.setDeadlineTime(DateUtil.getCurrentDate()); |
| | | } |
| | | } |
| | |
| | | */ |
| | | private void computeFeePriceByRoom(FeeDto feeDto, double oweMonth) { |
| | | String computingFormula = feeDto.getComputingFormula(); |
| | | double feePrice = 0.00; |
| | | DecimalFormat df = new DecimalFormat("0.00"); |
| | | Map feePriceAll = computeFeeSMOImpl.getFeePrice(feeDto); |
| | | feeDto.setFeePrice(Double.parseDouble(feePriceAll.get("feePrice").toString())); |
| | | BigDecimal curFeePrice = new BigDecimal(feeDto.getFeePrice()); |
| | | curFeePrice = curFeePrice.multiply(new BigDecimal(oweMonth)); |
| | | feeDto.setAmountOwed(curFeePrice.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue() + ""); |
| | | feeDto.setAmountOwed((df.format(curFeePrice))); |
| | | //动态费用 |
| | | if ("4004".equals(computingFormula) |
| | | && FeeDto.FEE_FLAG_ONCE.equals(feeDto.getFeeFlag()) |
| | | && !FeeDto.STATE_FINISH.equals(feeDto.getState())) { |
| | | feeDto.setAmountOwed(feeDto.getFeePrice() + ""); |
| | | feeDto.setAmountOwed(df.format(curFeePrice) + ""); |
| | | feeDto.setDeadlineTime(DateUtil.getCurrentDate()); |
| | | } |
| | | } |
| | |
| | | */ |
| | | private void computeFeePriceByContract(FeeDto feeDto, double oweMonth) { |
| | | String computingFormula = feeDto.getComputingFormula(); |
| | | double feePrice = 0.00; |
| | | DecimalFormat df = new DecimalFormat("0.00"); |
| | | Map feePriceAll = computeFeeSMOImpl.getFeePrice(feeDto); |
| | | feeDto.setFeePrice(Double.parseDouble(feePriceAll.get("feePrice").toString())); |
| | | BigDecimal curFeePrice = new BigDecimal(feeDto.getFeePrice()); |
| | | curFeePrice = curFeePrice.multiply(new BigDecimal(oweMonth)); |
| | | feeDto.setAmountOwed(curFeePrice.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue() + ""); |
| | | feeDto.setAmountOwed(df.format(curFeePrice)); |
| | | //动态费用 |
| | | if ("4004".equals(computingFormula) |
| | | && FeeDto.FEE_FLAG_ONCE.equals(feeDto.getFeeFlag()) |
| | | && !FeeDto.STATE_FINISH.equals(feeDto.getState())) { |
| | | feeDto.setAmountOwed(feeDto.getFeePrice() + ""); |
| | | feeDto.setAmountOwed(df.format(curFeePrice) + ""); |
| | | feeDto.setDeadlineTime(DateUtil.getCurrentDate()); |
| | | } |
| | | } |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.bmo.account.IAccountBMO; |
| | | import com.java110.api.bmo.account.IAccountDetailBMO; |
| | | import com.java110.api.bmo.fee.IFeeBMO; |
| | | import com.java110.api.bmo.payFeeDetailDiscount.IPayFeeDetailDiscountBMO; |
| | |
| | | import com.java110.dto.repair.RepairDto; |
| | | import com.java110.dto.repair.RepairUserDto; |
| | | import com.java110.entity.center.AppService; |
| | | import com.java110.intf.acct.IAccountInnerServiceSMO; |
| | | import com.java110.intf.community.IParkingSpaceInnerServiceSMO; |
| | | import com.java110.intf.community.IRepairInnerServiceSMO; |
| | | import com.java110.intf.community.IRepairUserInnerServiceSMO; |
| | |
| | | private IPayFeeDetailDiscountBMO payFeeDetailDiscountBMOImpl; |
| | | |
| | | @Autowired |
| | | private IAccountBMO accountBMOImpl; |
| | | |
| | | @Autowired |
| | | private IFeeReceiptDetailInnerServiceSMO feeReceiptDetailInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | |
| | | |
| | | @Autowired |
| | | private IAccountDetailBMO accountDetailBMOImpl; |
| | | |
| | | |
| | | |
| | | @Override |
| | | public String getServiceCode() { |
| | |
| | | FeeReceiptDetailPo feeReceiptDetailPo = new FeeReceiptDetailPo(); |
| | | businesses.add(feeBMOImpl.addFeeDetail(paramObj, dataFlowContext, feeReceiptDetailPo, feeReceiptPo)); |
| | | businesses.add(feeBMOImpl.modifyFee(paramObj, dataFlowContext)); |
| | | |
| | | //账户处理 |
| | | accountDetailBMOImpl.dealAccount(paramObj, dataFlowContext); |
| | | |
| | | |
| | | accountDetailBMOImpl.dealAccount(paramObj, dataFlowContext,businesses); |
| | | //折扣管理 |
| | | if (paramObj.containsKey("selectDiscount")) { |
| | | JSONObject discountBusiness = null; |
| | |
| | | row.createCell(7).setCellValue("--"); |
| | | } |
| | | row.createCell(8).setCellValue(dataObj.getString("stock") + dataObj.getString("unitCodeName")); |
| | | row.createCell(9).setCellValue(dataObj.getString("stock") + dataObj.getString("unitCodeName") + "=" + dataObj.getString("miniUnitStock") + dataObj.getString("miniUnitCodeName")); |
| | | row.createCell(9).setCellValue("1" + dataObj.getString("unitCodeName") + "=" + dataObj.getString("miniUnitStock") + dataObj.getString("miniUnitCodeName")); |
| | | row.createCell(10).setCellValue(dataObj.getString("miniStock") + dataObj.getString("miniUnitCodeName")); |
| | | row.createCell(11).setCellValue(dataObj.getString("averagePrice")); |
| | | if (!StringUtil.isEmpty(dataObj.getString("stock")) && !StringUtil.isEmpty(dataObj.getString("averagePrice"))) { |
| New file |
| | |
| | | package com.java110.community.api; |
| | | |
| | | import com.java110.community.bmo.communitySetting.IDeleteCommunitySettingBMO; |
| | | import com.java110.community.bmo.communitySetting.IGetCommunitySettingBMO; |
| | | import com.java110.community.bmo.communitySetting.ISaveCommunitySettingBMO; |
| | | import com.java110.community.bmo.communitySetting.IUpdateCommunitySettingBMO; |
| | | import com.java110.dto.communitySetting.CommunitySettingDto; |
| | | import com.java110.po.communitySetting.CommunitySettingPo; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @RestController |
| | | @RequestMapping(value = "/communitySetting") |
| | | public class CommunitySettingApi { |
| | | |
| | | @Autowired |
| | | private ISaveCommunitySettingBMO saveCommunitySettingBMOImpl; |
| | | @Autowired |
| | | private IUpdateCommunitySettingBMO updateCommunitySettingBMOImpl; |
| | | @Autowired |
| | | private IDeleteCommunitySettingBMO deleteCommunitySettingBMOImpl; |
| | | |
| | | @Autowired |
| | | private IGetCommunitySettingBMO getCommunitySettingBMOImpl; |
| | | |
| | | /** |
| | | * 微信保存消息模板 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /communitySetting/saveCommunitySetting |
| | | * @path /app/communitySetting/saveCommunitySetting |
| | | */ |
| | | @RequestMapping(value = "/saveCommunitySetting", method = RequestMethod.POST) |
| | | public ResponseEntity<String> saveCommunitySetting(@RequestBody JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId"); |
| | | Assert.hasKeyAndValue(reqJson, "settingType", "请求报文中未包含settingType"); |
| | | Assert.hasKeyAndValue(reqJson, "settingKey", "请求报文中未包含settingKey"); |
| | | |
| | | |
| | | CommunitySettingPo communitySettingPo = BeanConvertUtil.covertBean(reqJson, CommunitySettingPo.class); |
| | | return saveCommunitySettingBMOImpl.save(communitySettingPo); |
| | | } |
| | | |
| | | /** |
| | | * 微信修改消息模板 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /communitySetting/updateCommunitySetting |
| | | * @path /app/communitySetting/updateCommunitySetting |
| | | */ |
| | | @RequestMapping(value = "/updateCommunitySetting", method = RequestMethod.POST) |
| | | public ResponseEntity<String> updateCommunitySetting(@RequestBody JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId"); |
| | | Assert.hasKeyAndValue(reqJson, "settingType", "请求报文中未包含settingType"); |
| | | Assert.hasKeyAndValue(reqJson, "settingKey", "请求报文中未包含settingKey"); |
| | | Assert.hasKeyAndValue(reqJson, "csId", "csId不能为空"); |
| | | |
| | | |
| | | CommunitySettingPo communitySettingPo = BeanConvertUtil.covertBean(reqJson, CommunitySettingPo.class); |
| | | return updateCommunitySettingBMOImpl.update(communitySettingPo); |
| | | } |
| | | |
| | | /** |
| | | * 微信删除消息模板 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /communitySetting/deleteCommunitySetting |
| | | * @path /app/communitySetting/deleteCommunitySetting |
| | | */ |
| | | @RequestMapping(value = "/deleteCommunitySetting", method = RequestMethod.POST) |
| | | public ResponseEntity<String> deleteCommunitySetting(@RequestBody JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "小区ID不能为空"); |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "csId", "csId不能为空"); |
| | | |
| | | |
| | | CommunitySettingPo communitySettingPo = BeanConvertUtil.covertBean(reqJson, CommunitySettingPo.class); |
| | | return deleteCommunitySettingBMOImpl.delete(communitySettingPo); |
| | | } |
| | | |
| | | /** |
| | | * 微信删除消息模板 |
| | | * |
| | | * @param communityId 小区ID |
| | | * @return |
| | | * @serviceCode /communitySetting/queryCommunitySetting |
| | | * @path /app/communitySetting/queryCommunitySetting |
| | | */ |
| | | @RequestMapping(value = "/queryCommunitySetting", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryCommunitySetting(@RequestParam(value = "communityId") String communityId, |
| | | @RequestParam(value = "settingType", required = false) String settingType, |
| | | @RequestParam(value = "settingName", required = false) String settingName, |
| | | @RequestParam(value = "settingKey", required = false) String settingKey, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | CommunitySettingDto communitySettingDto = new CommunitySettingDto(); |
| | | communitySettingDto.setSettingKey(settingKey); |
| | | communitySettingDto.setSettingName(settingName); |
| | | communitySettingDto.setSettingType(settingType); |
| | | communitySettingDto.setPage(page); |
| | | communitySettingDto.setRow(row); |
| | | communitySettingDto.setCommunityId(communityId); |
| | | return getCommunitySettingBMOImpl.get(communitySettingDto); |
| | | } |
| | | } |
| | |
| | | import com.java110.community.bmo.roomRenovationRecord.ISaveRoomRenovationRecordBMO; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.RoomDto; |
| | | import com.java110.dto.communitySetting.CommunitySettingDto; |
| | | import com.java110.dto.fee.FeeAttrDto; |
| | | 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.owner.OwnerRoomRelDto; |
| | | import com.java110.dto.roomRenovation.RoomRenovationDto; |
| | | import com.java110.dto.roomRenovationDetail.RoomRenovationDetailDto; |
| | | import com.java110.dto.user.UserDto; |
| | | import com.java110.intf.IRoomRenovationInnerServiceSMO; |
| | | import com.java110.intf.common.IFileInnerServiceSMO; |
| | | import com.java110.intf.common.IFileRelInnerServiceSMO; |
| | | import com.java110.intf.community.ICommunitySettingInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeAttrInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeConfigInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerRoomRelInnerServiceSMO; |
| | | import com.java110.intf.user.IUserInnerServiceSMO; |
| | | import com.java110.po.fee.FeeAttrPo; |
| | | import com.java110.po.fee.PayFeePo; |
| | | import com.java110.po.file.FileRelPo; |
| | | import com.java110.po.roomRenovation.RoomRenovationPo; |
| | | import com.java110.po.roomRenovationDetail.RoomRenovationDetailPo; |
| | |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | @Autowired |
| | | private IDeleteRoomRenovationRecordBMO deleteRoomRenovationRecordBMOImpl; |
| | | |
| | | @Autowired |
| | | private ICommunitySettingInnerServiceSMO communitySettingInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFeeConfigInnerServiceSMO feeConfigInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFeeInnerServiceSMO feeInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFeeAttrInnerServiceSMO feeAttrInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOwnerRoomRelInnerServiceSMO ownerRoomRelInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * 微信保存消息模板 |
| | | * |
| | |
| | | * @path /app/roomRenovation/saveRoomRenovation |
| | | */ |
| | | @RequestMapping(value = "/saveRoomRenovation", method = RequestMethod.POST) |
| | | public ResponseEntity<String> saveRoomRenovation(@RequestBody JSONObject reqJson) { |
| | | public ResponseEntity<String> saveRoomRenovation(@RequestBody JSONObject reqJson, |
| | | @RequestHeader(value = "store-id") String storeId, |
| | | @RequestHeader(value = "user-id") String userId) throws ParseException { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "roomId", "请求报文中未包含roomId"); |
| | | Assert.hasKeyAndValue(reqJson, "roomName", "请求报文中未包含roomName"); |
| | |
| | | Assert.hasKeyAndValue(reqJson, "personTel", "请求报文中未包含personTel"); |
| | | //Assert.hasKeyAndValue(reqJson, "isViolation", "请求报文中未包含isViolation"); |
| | | |
| | | //获取开始时间 |
| | | String startTime = reqJson.getString("startTime") + " 00:00:00"; |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | Date timeOne = format.parse(startTime); |
| | | Calendar now = Calendar.getInstance(); |
| | | String newTime = now.get(Calendar.YEAR) + "-" + (now.get(Calendar.MONTH) + 1) + "-" + now.get(Calendar.DAY_OF_MONTH) + " 00:00:00"; |
| | | Date timeTwo = format.parse(newTime); |
| | | if (timeOne.getTime() < timeTwo.getTime()) { |
| | | return ResultVo.error("装修时间不能小于当前时间!"); |
| | | } |
| | | RoomRenovationPo roomRenovationPo = BeanConvertUtil.covertBean(reqJson, RoomRenovationPo.class); |
| | | |
| | | //判断是否已经存在该房屋的装修记录了 |
| | |
| | | roomRenovationPo.setIsViolation("N"); |
| | | roomRenovationPo.setStartTime(reqJson.getString("startTime") + " 00:00:00"); |
| | | roomRenovationPo.setEndTime(reqJson.getString("endTime") + " 23:59:59"); |
| | | //生成装修费用 |
| | | CommunitySettingDto communitySettingDto = new CommunitySettingDto(); |
| | | communitySettingDto.setSettingKey("REPAIR_CONFIG_FEE"); |
| | | communitySettingDto.setCommunityId(reqJson.getString("communityId")); |
| | | //查询小区配置 |
| | | List<CommunitySettingDto> communitySettingDtos = communitySettingInnerServiceSMOImpl.queryCommunitySettings(communitySettingDto); |
| | | String settingValue = null; |
| | | if (communitySettingDtos != null && communitySettingDtos.size() > 0) { |
| | | //获取小区设置值 |
| | | settingValue = communitySettingDtos.get(0).getSettingValue(); |
| | | } |
| | | //获取房屋id |
| | | String roomId = reqJson.getString("roomId"); |
| | | OwnerRoomRelDto ownerRoomRelDto = new OwnerRoomRelDto(); |
| | | ownerRoomRelDto.setRoomId(roomId); |
| | | //查询业主房屋关系表 |
| | | List<OwnerRoomRelDto> ownerRoomRelDtos = ownerRoomRelInnerServiceSMOImpl.queryOwnerRoomRels(ownerRoomRelDto); |
| | | Assert.listOnlyOne(ownerRoomRelDtos, "查询业主房屋关系表错误!"); |
| | | //获取业主id |
| | | String ownerId = ownerRoomRelDtos.get(0).getOwnerId(); |
| | | if (!StringUtil.isEmpty(settingValue)) { |
| | | String[] settingValues = settingValue.split(","); |
| | | List<PayFeePo> payFeePos = new ArrayList<>(); |
| | | List<FeeAttrPo> feeAttrOwnerIdPos = new ArrayList<>(); |
| | | List<FeeAttrPo> feeAttrOwnerNamePos = new ArrayList<>(); |
| | | List<FeeAttrPo> feeAttrOwnerLinkPos = new ArrayList<>(); |
| | | List<FeeAttrPo> feeAttrOwnerTimePos = new ArrayList<>(); |
| | | for (int i = 0; i < settingValues.length; i++) { |
| | | String configId = settingValues[i]; |
| | | FeeConfigDto feeConfigDto = new FeeConfigDto(); |
| | | feeConfigDto.setConfigId(configId); |
| | | //查询费用项 |
| | | List<FeeConfigDto> feeConfigDtos = feeConfigInnerServiceSMOImpl.queryFeeConfigs(feeConfigDto); |
| | | Assert.listOnlyOne(feeConfigDtos, "查询费用项错误!"); |
| | | PayFeePo payFeePo = new PayFeePo(); |
| | | payFeePo.setAmount(feeConfigDtos.get(0).getAdditionalAmount()); |
| | | if (!StringUtil.isEmpty(storeId)) { |
| | | payFeePo.setIncomeObjId(storeId); |
| | | } else { |
| | | payFeePo.setIncomeObjId(reqJson.getString("storeId")); |
| | | } |
| | | payFeePo.setFeeTypeCd(feeConfigDtos.get(0).getFeeTypeCd()); |
| | | payFeePo.setStartTime(newTime); |
| | | payFeePo.setEndTime(format.format(System.currentTimeMillis())); |
| | | payFeePo.setCommunityId(reqJson.getString("communityId")); |
| | | payFeePo.setFeeId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_feeId)); |
| | | payFeePo.setUserId(userId); |
| | | payFeePo.setPayerObjId(reqJson.getString("roomId")); |
| | | payFeePo.setFeeFlag(feeConfigDtos.get(0).getFeeFlag()); |
| | | payFeePo.setState(FeeDto.STATE_DOING); |
| | | payFeePo.setConfigId(configId); |
| | | payFeePo.setPayerObjType(FeeDto.PAYER_OBJ_TYPE_ROOM); |
| | | payFeePos.add(payFeePo); |
| | | FeeAttrPo feeAttrPo1 = new FeeAttrPo(); |
| | | feeAttrPo1.setFeeId(payFeePo.getFeeId()); |
| | | feeAttrPo1.setCommunityId(reqJson.getString("communityId")); |
| | | feeAttrPo1.setAttrId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_attrId)); |
| | | feeAttrPo1.setSpecCd(FeeAttrDto.SPEC_CD_OWNER_ID); //业主id |
| | | feeAttrPo1.setValue(ownerId); |
| | | feeAttrOwnerIdPos.add(feeAttrPo1); |
| | | FeeAttrPo feeAttrPo2 = new FeeAttrPo(); |
| | | feeAttrPo2.setFeeId(payFeePo.getFeeId()); |
| | | feeAttrPo2.setCommunityId(reqJson.getString("communityId")); |
| | | feeAttrPo2.setAttrId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_attrId)); |
| | | feeAttrPo2.setSpecCd(FeeAttrDto.SPEC_CD_OWNER_NAME); //业主名称 |
| | | feeAttrPo2.setValue(reqJson.getString("personName")); |
| | | feeAttrOwnerNamePos.add(feeAttrPo2); |
| | | FeeAttrPo feeAttrPo3 = new FeeAttrPo(); |
| | | feeAttrPo3.setFeeId(payFeePo.getFeeId()); |
| | | feeAttrPo3.setCommunityId(reqJson.getString("communityId")); |
| | | feeAttrPo3.setAttrId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_attrId)); |
| | | feeAttrPo3.setSpecCd(FeeAttrDto.SPEC_CD_OWNER_LINK); //联系方式 |
| | | feeAttrPo3.setValue(reqJson.getString("personTel")); |
| | | feeAttrOwnerLinkPos.add(feeAttrPo3); |
| | | if (FeeDto.FEE_FLAG_ONCE.equals(feeConfigDtos.get(0).getFeeFlag())) {//一次性费用 |
| | | FeeAttrPo feeAttrPo4 = new FeeAttrPo(); |
| | | feeAttrPo4.setFeeId(payFeePo.getFeeId()); |
| | | feeAttrPo4.setCommunityId(reqJson.getString("communityId")); |
| | | feeAttrPo4.setAttrId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_attrId)); |
| | | feeAttrPo4.setSpecCd(FeeAttrDto.SPEC_CD_ONCE_FEE_DEADLINE_TIME); //结束时间 |
| | | feeAttrPo4.setValue(reqJson.getString("startTime")); |
| | | feeAttrOwnerTimePos.add(feeAttrPo4); |
| | | } |
| | | } |
| | | //生成费用 |
| | | feeInnerServiceSMOImpl.saveFee(payFeePos); |
| | | //插入费用属性(业主id) |
| | | feeAttrInnerServiceSMOImpl.saveFeeAttrs(feeAttrOwnerIdPos); |
| | | //插入费用属性(业主姓名) |
| | | feeAttrInnerServiceSMOImpl.saveFeeAttrs(feeAttrOwnerNamePos); |
| | | //插入费用属性(业主联系方式) |
| | | feeAttrInnerServiceSMOImpl.saveFeeAttrs(feeAttrOwnerLinkPos); |
| | | //插入费用属性(费用截止时间) |
| | | feeAttrInnerServiceSMOImpl.saveFeeAttrs(feeAttrOwnerTimePos); |
| | | } |
| | | return saveRoomRenovationBMOImpl.save(roomRenovationPo); |
| | | } |
| | | |
| | |
| | | @RequestParam(value = "personName", required = false) String personName, |
| | | @RequestParam(value = "personTel", required = false) String personTel, |
| | | @RequestParam(value = "state", required = false) String state, |
| | | @RequestParam(value = "isPostpone", required = false) String isPostpone, |
| | | @RequestHeader(value = "user-id") String userId, |
| | | @RequestParam(value = "page", required = false) int page, |
| | | @RequestParam(value = "row", required = false) int row) { |
| | |
| | | roomRenovationDto.setPersonTel(personTel); |
| | | roomRenovationDto.setState(state); |
| | | roomRenovationDto.setUserId(userId); |
| | | roomRenovationDto.setIsPostpone(isPostpone); |
| | | return getRoomRenovationBMOImpl.get(roomRenovationDto); |
| | | } |
| | | |
| New file |
| | |
| | | package com.java110.community.bmo.communitySetting; |
| | | import com.java110.po.communitySetting.CommunitySettingPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | public interface IDeleteCommunitySettingBMO { |
| | | |
| | | |
| | | /** |
| | | * 修改小区相关设置 |
| | | * add by wuxw |
| | | * @param communitySettingPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> delete(CommunitySettingPo communitySettingPo); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.community.bmo.communitySetting; |
| | | import com.java110.dto.communitySetting.CommunitySettingDto; |
| | | import org.springframework.http.ResponseEntity; |
| | | public interface IGetCommunitySettingBMO { |
| | | |
| | | |
| | | /** |
| | | * 查询小区相关设置 |
| | | * add by wuxw |
| | | * @param communitySettingDto |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> get(CommunitySettingDto communitySettingDto); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.community.bmo.communitySetting; |
| | | |
| | | import com.java110.po.communitySetting.CommunitySettingPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | public interface ISaveCommunitySettingBMO { |
| | | |
| | | |
| | | /** |
| | | * 添加小区相关设置 |
| | | * add by wuxw |
| | | * @param communitySettingPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> save(CommunitySettingPo communitySettingPo); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.community.bmo.communitySetting; |
| | | import com.java110.po.communitySetting.CommunitySettingPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | public interface IUpdateCommunitySettingBMO { |
| | | |
| | | |
| | | /** |
| | | * 修改小区相关设置 |
| | | * add by wuxw |
| | | * @param communitySettingPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> update(CommunitySettingPo communitySettingPo); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.community.bmo.communitySetting.impl; |
| | | |
| | | import com.java110.community.bmo.communitySetting.IDeleteCommunitySettingBMO; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.intf.community.ICommunitySettingInnerServiceSMO; |
| | | import com.java110.po.communitySetting.CommunitySettingPo; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("deleteCommunitySettingBMOImpl") |
| | | public class DeleteCommunitySettingBMOImpl implements IDeleteCommunitySettingBMO { |
| | | |
| | | @Autowired |
| | | private ICommunitySettingInnerServiceSMO communitySettingInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param communitySettingPo 数据 |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> delete(CommunitySettingPo communitySettingPo) { |
| | | |
| | | int flag = communitySettingInnerServiceSMOImpl.deleteCommunitySetting(communitySettingPo); |
| | | |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.community.bmo.communitySetting.impl; |
| | | |
| | | |
| | | import com.java110.community.bmo.communitySetting.IGetCommunitySettingBMO; |
| | | import com.java110.intf.community.ICommunitySettingInnerServiceSMO; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | import com.java110.dto.communitySetting.CommunitySettingDto; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Service("getCommunitySettingBMOImpl") |
| | | public class GetCommunitySettingBMOImpl implements IGetCommunitySettingBMO { |
| | | |
| | | @Autowired |
| | | private ICommunitySettingInnerServiceSMO communitySettingInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * |
| | | * |
| | | * @param communitySettingDto |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | public ResponseEntity<String> get(CommunitySettingDto communitySettingDto) { |
| | | |
| | | |
| | | int count = communitySettingInnerServiceSMOImpl.queryCommunitySettingsCount(communitySettingDto); |
| | | |
| | | List<CommunitySettingDto> communitySettingDtos = null; |
| | | if (count > 0) { |
| | | communitySettingDtos = communitySettingInnerServiceSMOImpl.queryCommunitySettings(communitySettingDto); |
| | | } else { |
| | | communitySettingDtos = new ArrayList<>(); |
| | | } |
| | | |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) communitySettingDto.getRow()), count, communitySettingDtos); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | |
| | | return responseEntity; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.community.bmo.communitySetting.impl; |
| | | |
| | | import com.java110.community.bmo.communitySetting.ISaveCommunitySettingBMO; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.intf.community.ICommunitySettingInnerServiceSMO; |
| | | import com.java110.po.communitySetting.CommunitySettingPo; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | |
| | | @Service("saveCommunitySettingBMOImpl") |
| | | public class SaveCommunitySettingBMOImpl implements ISaveCommunitySettingBMO { |
| | | |
| | | @Autowired |
| | | private ICommunitySettingInnerServiceSMO communitySettingInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * 添加小区信息 |
| | | * |
| | | * @param communitySettingPo |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> save(CommunitySettingPo communitySettingPo) { |
| | | |
| | | communitySettingPo.setCsId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_csId)); |
| | | int flag = communitySettingInnerServiceSMOImpl.saveCommunitySetting(communitySettingPo); |
| | | |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.community.bmo.communitySetting.impl; |
| | | |
| | | import com.java110.community.bmo.communitySetting.IUpdateCommunitySettingBMO; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.intf.community.ICommunitySettingInnerServiceSMO; |
| | | import com.java110.po.communitySetting.CommunitySettingPo; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("updateCommunitySettingBMOImpl") |
| | | public class UpdateCommunitySettingBMOImpl implements IUpdateCommunitySettingBMO { |
| | | |
| | | @Autowired |
| | | private ICommunitySettingInnerServiceSMO communitySettingInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * |
| | | * |
| | | * @param communitySettingPo |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> update(CommunitySettingPo communitySettingPo) { |
| | | |
| | | int flag = communitySettingInnerServiceSMOImpl.updateCommunitySetting(communitySettingPo); |
| | | |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.community.dao; |
| | | |
| | | |
| | | import com.java110.utils.exception.DAOException; |
| | | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 小区相关设置组件内部之间使用,没有给外围系统提供服务能力 |
| | | * 小区相关设置服务接口类,要求全部以字符串传输,方便微服务化 |
| | | * 新建客户,修改客户,删除客户,查询客户等功能 |
| | | * <p> |
| | | * Created by wuxw on 2016/12/27. |
| | | */ |
| | | public interface ICommunitySettingServiceDao { |
| | | |
| | | |
| | | /** |
| | | * 保存 小区相关设置信息 |
| | | * |
| | | * @param info |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void saveCommunitySettingInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 查询小区相关设置信息(instance过程) |
| | | * 根据bId 查询小区相关设置信息 |
| | | * |
| | | * @param info bId 信息 |
| | | * @return 小区相关设置信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | List<Map> getCommunitySettingInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 修改小区相关设置信息 |
| | | * |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void updateCommunitySettingInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 查询小区相关设置总数 |
| | | * |
| | | * @param info 小区相关设置信息 |
| | | * @return 小区相关设置数量 |
| | | */ |
| | | int queryCommunitySettingsCount(Map info); |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.community.dao.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.exception.DAOException; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.core.base.dao.BaseServiceDao; |
| | | import com.java110.community.dao.ICommunitySettingServiceDao; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 小区相关设置服务 与数据库交互 |
| | | * Created by wuxw on 2017/4/5. |
| | | */ |
| | | @Service("communitySettingServiceDaoImpl") |
| | | //@Transactional |
| | | public class CommunitySettingServiceDaoImpl extends BaseServiceDao implements ICommunitySettingServiceDao { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(CommunitySettingServiceDaoImpl.class); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 保存小区相关设置信息 到 instance |
| | | * @param info bId 信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void saveCommunitySettingInfo(Map info) throws DAOException { |
| | | logger.debug("保存小区相关设置信息Instance 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("communitySettingServiceDaoImpl.saveCommunitySettingInfo",info); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存小区相关设置信息Instance数据失败:"+ JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询小区相关设置信息(instance) |
| | | * @param info bId 信息 |
| | | * @return List<Map> |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public List<Map> getCommunitySettingInfo(Map info) throws DAOException { |
| | | logger.debug("查询小区相关设置信息 入参 info : {}",info); |
| | | |
| | | List<Map> businessCommunitySettingInfos = sqlSessionTemplate.selectList("communitySettingServiceDaoImpl.getCommunitySettingInfo",info); |
| | | |
| | | return businessCommunitySettingInfos; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改小区相关设置信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void updateCommunitySettingInfo(Map info) throws DAOException { |
| | | logger.debug("修改小区相关设置信息Instance 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("communitySettingServiceDaoImpl.updateCommunitySettingInfo",info); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改小区相关设置信息Instance数据失败:"+ JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询小区相关设置数量 |
| | | * @param info 小区相关设置信息 |
| | | * @return 小区相关设置数量 |
| | | */ |
| | | @Override |
| | | public int queryCommunitySettingsCount(Map info) { |
| | | logger.debug("查询小区相关设置数据 入参 info : {}",info); |
| | | |
| | | List<Map> businessCommunitySettingInfos = sqlSessionTemplate.selectList("communitySettingServiceDaoImpl.queryCommunitySettingsCount", info); |
| | | if (businessCommunitySettingInfos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(businessCommunitySettingInfos.get(0).get("count").toString()); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.community.smo.impl; |
| | | |
| | | |
| | | import com.java110.community.dao.ICommunitySettingServiceDao; |
| | | import com.java110.dto.communitySetting.CommunitySettingDto; |
| | | import com.java110.intf.community.ICommunitySettingInnerServiceSMO; |
| | | import com.java110.po.communitySetting.CommunitySettingPo; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.dto.PageDto; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName FloorInnerServiceSMOImpl |
| | | * @Description 小区相关设置内部服务实现类 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 9:20 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | @RestController |
| | | public class CommunitySettingInnerServiceSMOImpl extends BaseServiceSMO implements ICommunitySettingInnerServiceSMO { |
| | | |
| | | @Autowired |
| | | private ICommunitySettingServiceDao communitySettingServiceDaoImpl; |
| | | |
| | | |
| | | @Override |
| | | public int saveCommunitySetting(@RequestBody CommunitySettingPo communitySettingPo) { |
| | | int saveFlag = 1; |
| | | communitySettingServiceDaoImpl.saveCommunitySettingInfo(BeanConvertUtil.beanCovertMap(communitySettingPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int updateCommunitySetting(@RequestBody CommunitySettingPo communitySettingPo) { |
| | | int saveFlag = 1; |
| | | communitySettingServiceDaoImpl.updateCommunitySettingInfo(BeanConvertUtil.beanCovertMap(communitySettingPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int deleteCommunitySetting(@RequestBody CommunitySettingPo communitySettingPo) { |
| | | int saveFlag = 1; |
| | | communitySettingPo.setStatusCd("1"); |
| | | communitySettingServiceDaoImpl.updateCommunitySettingInfo(BeanConvertUtil.beanCovertMap(communitySettingPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public List<CommunitySettingDto> queryCommunitySettings(@RequestBody CommunitySettingDto communitySettingDto) { |
| | | |
| | | //校验是否传了 分页信息 |
| | | |
| | | int page = communitySettingDto.getPage(); |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | communitySettingDto.setPage((page - 1) * communitySettingDto.getRow()); |
| | | } |
| | | |
| | | List<CommunitySettingDto> communitySettings = BeanConvertUtil.covertBeanList(communitySettingServiceDaoImpl.getCommunitySettingInfo(BeanConvertUtil.beanCovertMap(communitySettingDto)), CommunitySettingDto.class); |
| | | |
| | | return communitySettings; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int queryCommunitySettingsCount(@RequestBody CommunitySettingDto communitySettingDto) { |
| | | return communitySettingServiceDaoImpl.queryCommunitySettingsCount(BeanConvertUtil.beanCovertMap(communitySettingDto)); |
| | | } |
| | | |
| | | public ICommunitySettingServiceDao getCommunitySettingServiceDaoImpl() { |
| | | return communitySettingServiceDaoImpl; |
| | | } |
| | | |
| | | public void setCommunitySettingServiceDaoImpl(ICommunitySettingServiceDao communitySettingServiceDaoImpl) { |
| | | this.communitySettingServiceDaoImpl = communitySettingServiceDaoImpl; |
| | | } |
| | | } |
| | |
| | | package com.java110.fee.api; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.account.AccountDto; |
| | | import com.java110.dto.accountDetail.AccountDetailDto; |
| | | import com.java110.dto.applyRoomDiscount.ApplyRoomDiscountDto; |
| | | import com.java110.dto.applyRoomDiscountType.ApplyRoomDiscountTypeDto; |
| | | import com.java110.dto.fee.FeeDetailDto; |
| | | import com.java110.dto.feeDiscount.FeeDiscountRuleDto; |
| | | import com.java110.dto.owner.OwnerRoomRelDto; |
| | | import com.java110.fee.bmo.account.ISaveAccountBMO; |
| | | import com.java110.fee.bmo.account.IUpdateAccountBMO; |
| | | import com.java110.fee.bmo.applyRoomDiscount.IAuditApplyRoomDiscountBMO; |
| | | import com.java110.fee.bmo.applyRoomDiscount.IDeleteApplyRoomDiscountBMO; |
| | | import com.java110.fee.bmo.applyRoomDiscount.IGetApplyRoomDiscountBMO; |
| | |
| | | import com.java110.fee.bmo.applyRoomDiscountType.IGetApplyRoomDiscountTypeBMO; |
| | | import com.java110.fee.bmo.applyRoomDiscountType.ISaveApplyRoomDiscountTypeBMO; |
| | | import com.java110.fee.bmo.applyRoomDiscountType.IUpdateApplyRoomDiscountTypeBMO; |
| | | import com.java110.intf.acct.IAccountInnerServiceSMO; |
| | | import com.java110.intf.fee.IApplyRoomDiscountInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeDetailInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeDiscountRuleInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerRoomRelInnerServiceSMO; |
| | | import com.java110.po.applyRoomDiscount.ApplyRoomDiscountPo; |
| | | import com.java110.po.applyRoomDiscountType.ApplyRoomDiscountTypePo; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.text.DecimalFormat; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | |
| | | |
| | | @Autowired |
| | | private IApplyRoomDiscountInnerServiceSMO applyRoomDiscountInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFeeDiscountRuleInnerServiceSMO feeDiscountRuleInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFeeDetailInnerServiceSMO feeDetailInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOwnerRoomRelInnerServiceSMO ownerRoomRelInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IAccountInnerServiceSMO accountInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private ISaveAccountBMO saveAccountBMOImpl; |
| | | |
| | | @Autowired |
| | | private IUpdateAccountBMO updateAccountBMOImpl; |
| | | |
| | | /** |
| | | * 优惠申请 |
| | |
| | | * @path /app/applyRoomDiscount/updateReviewApplyRoomDiscount |
| | | */ |
| | | @RequestMapping(value = "/updateReviewApplyRoomDiscount", method = RequestMethod.POST) |
| | | public ResponseEntity<String> updateReviewApplyRoomDiscount(@RequestBody JSONObject reqJson, @RequestHeader(value = "user-id") String userId) { |
| | | @Java110Transactional |
| | | public ResponseEntity<String> updateReviewApplyRoomDiscount(@RequestBody JSONObject reqJson, @RequestHeader(value = "user-id") String userId, DataFlowContext dataFlowContext) { |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId"); |
| | | Assert.hasKeyAndValue(reqJson, "state", "请求报文中未包含验房状态"); |
| | | Assert.hasKeyAndValue(reqJson, "startTime", "请求报文中未包含开始时间"); |
| | | Assert.hasKeyAndValue(reqJson, "endTime", "请求报文中未包含结束时间"); |
| | | Assert.hasKeyAndValue(reqJson, "reviewRemark", "请求报文中未包含验房说明"); |
| | | // Assert.hasKeyAndValue(reqJson, "discountId", "请求报文中未包含折扣"); |
| | | Assert.hasKeyAndValue(reqJson, "ardId", "ardId不能为空"); |
| | | ApplyRoomDiscountDto applyRoomDiscountDto = new ApplyRoomDiscountDto(); |
| | | applyRoomDiscountDto.setArdId(reqJson.getString("ardId")); |
| | |
| | | Assert.listOnlyOne(applyRoomDiscountDtos, "查询房屋优惠信息错误!"); |
| | | //获取房屋优惠审核状态 |
| | | String state = applyRoomDiscountDtos.get(0).getState(); |
| | | if (!StringUtil.isEmpty(state) && !state.equals("2")) { |
| | | String stateNow = reqJson.getString("state"); |
| | | String returnWay = reqJson.getString("returnWay"); |
| | | if (!StringUtil.isEmpty(state) && state.equals("4")) { |
| | | throw new IllegalArgumentException("该房屋已审核过,无法再次进行审核!"); |
| | | } |
| | | if (reqJson.containsKey("selectedFees") && !StringUtil.isEmpty(reqJson.getString("selectedFees")) && stateNow.equals("4") && "1002".equals(returnWay)) { |
| | | //获取前端传来的缴费历史 |
| | | String selectedFees = reqJson.getString("selectedFees"); |
| | | JSONArray feeDetailIds = JSON.parseArray(selectedFees); |
| | | //获取优惠 |
| | | JSONArray discounts = reqJson.getJSONArray("discounts"); |
| | | BigDecimal cashBackAmount = new BigDecimal("0.00");//返现总金额 |
| | | for (int i = 0; i < discounts.size(); i++) { |
| | | JSONObject discountObject = discounts.getJSONObject(i); |
| | | JSONArray feeDiscountSpecs = discountObject.getJSONArray("feeDiscountSpecs"); |
| | | //获取规则id |
| | | String ruleId = discounts.getJSONObject(i).getString("ruleId"); |
| | | FeeDiscountRuleDto feeDiscountRuleDto = new FeeDiscountRuleDto(); |
| | | feeDiscountRuleDto.setRuleId(ruleId); |
| | | List<FeeDiscountRuleDto> feeDiscountRuleDtos = feeDiscountRuleInnerServiceSMOImpl.queryFeeDiscountRules(feeDiscountRuleDto); |
| | | Assert.listOnlyOne(feeDiscountRuleDtos, "查询折扣规则错误!"); |
| | | //获取折扣类型(1: 打折 2:减免 3:滞纳金 4:空置房打折 5:空置房减免) |
| | | String discountSmallType = feeDiscountRuleDtos.get(0).getDiscountSmallType(); |
| | | //获取规则 |
| | | String specValue = feeDiscountSpecs.getJSONObject(1).getString("specValue"); |
| | | if (!StringUtil.isEmpty(discountSmallType) && (discountSmallType.equals("1") || discountSmallType.equals("4"))) { //打折 |
| | | for (int index = 0; index < feeDetailIds.size(); index++) { |
| | | String feeDetailId = String.valueOf(feeDetailIds.get(index)); |
| | | FeeDetailDto feeDetailDto = new FeeDetailDto(); |
| | | feeDetailDto.setDetailId(feeDetailId); |
| | | List<FeeDetailDto> feeDetailDtos = feeDetailInnerServiceSMOImpl.queryFeeDetails(feeDetailDto); |
| | | Assert.listOnlyOne(feeDetailDtos, "查询费用明细表错误!"); |
| | | |
| | | BigDecimal receivedAmount = new BigDecimal(feeDetailDtos.get(0).getReceivedAmount());//获取实收金额 |
| | | BigDecimal spec = new BigDecimal(specValue);//折扣 |
| | | //计算打折后的实收金额 |
| | | BigDecimal money = receivedAmount.multiply(spec); |
| | | cashBackAmount = cashBackAmount.add(receivedAmount.subtract(money)); //计算优惠的金额 |
| | | } |
| | | } else if (!StringUtil.isEmpty(discountSmallType) && (discountSmallType.equals("2") || discountSmallType.equals("5"))) { //减免 |
| | | for (int index = 0; index < feeDetailIds.size(); index++) { |
| | | String feeDetailId = String.valueOf(feeDetailIds.get(index)); |
| | | FeeDetailDto feeDetailDto = new FeeDetailDto(); |
| | | feeDetailDto.setDetailId(feeDetailId); |
| | | List<FeeDetailDto> feeDetailDtos = feeDetailInnerServiceSMOImpl.queryFeeDetails(feeDetailDto); |
| | | Assert.listOnlyOne(feeDetailDtos, "查询费用明细表错误!"); |
| | | |
| | | BigDecimal spec = new BigDecimal(specValue);//减免金額 |
| | | cashBackAmount = cashBackAmount.add(spec); //计算优惠的金额 |
| | | } |
| | | } |
| | | DecimalFormat df = new DecimalFormat("0.00"); |
| | | reqJson.put("cashBackAmount", df.format(cashBackAmount)); |
| | | //处理账户返现 |
| | | JSONArray businesses = new JSONArray(); |
| | | updateAccountBMOImpl.cashBackAccount(reqJson, dataFlowContext, businesses); |
| | | reqJson.put("inUse", 1); |
| | | reqJson.put("returnAmount", df.format(cashBackAmount)); |
| | | } |
| | | } else { |
| | | reqJson.put("inUse", 0); |
| | | } |
| | | reqJson.put("reviewUserId", userId); |
| | | ApplyRoomDiscountPo applyRoomDiscountPo = BeanConvertUtil.covertBean(reqJson, ApplyRoomDiscountPo.class); |
| | | return updateApplyRoomDiscountBMOImpl.update(applyRoomDiscountPo); |
| New file |
| | |
| | | package com.java110.fee.bmo; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.core.factory.DataFlowFactory; |
| | | import com.java110.entity.center.AppService; |
| | | import com.java110.utils.constant.CommonConstant; |
| | | import com.java110.utils.constant.ServiceCodeConstant; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.*; |
| | | import org.springframework.web.client.HttpStatusCodeException; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import java.util.Map; |
| | | |
| | | public class ApiBaseBMO implements IApiBaseBMO { |
| | | |
| | | protected static final int DEFAULT_ORDER = 1; |
| | | //默认序列 |
| | | protected static final int DEFAULT_SEQ = 1; |
| | | |
| | | |
| | | @Autowired |
| | | private RestTemplate restTemplate; |
| | | |
| | | @Autowired |
| | | private RestTemplate outRestTemplate; |
| | | |
| | | /** |
| | | * 调用下游服务 |
| | | * |
| | | * @param event |
| | | * @return |
| | | */ |
| | | public ResponseEntity<String> callService(ServiceDataFlowEvent event) { |
| | | |
| | | DataFlowContext dataFlowContext = event.getDataFlowContext(); |
| | | AppService service = event.getAppService(); |
| | | return callService(dataFlowContext, service, dataFlowContext.getReqJson()); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 调用下游服务 |
| | | * |
| | | * @param context |
| | | * @param serviceCode 下游服务 |
| | | * @return |
| | | */ |
| | | public ResponseEntity<String> callService(DataFlowContext context, String serviceCode,JSONArray businesses) { |
| | | context.getRequestCurrentHeaders().put(CommonConstant.HTTP_ORDER_TYPE_CD, "D"); |
| | | JSONObject paramInObj = restToCenterProtocol(businesses, context.getRequestCurrentHeaders()); |
| | | return callService(context,serviceCode,paramInObj); |
| | | } |
| | | |
| | | /** |
| | | * 调用下游服务 |
| | | * |
| | | * @param context |
| | | * @param serviceCode 下游服务 |
| | | * @return |
| | | */ |
| | | public ResponseEntity<String> callService(DataFlowContext context, String serviceCode,JSONObject paramInObj) { |
| | | |
| | | //将 rest header 信息传递到下层服务中去 |
| | | HttpHeaders header = new HttpHeaders(); |
| | | |
| | | freshHttpHeader(header, context.getRequestCurrentHeaders()); |
| | | |
| | | ResponseEntity responseEntity = null; |
| | | AppService appService = DataFlowFactory.getService(context.getAppId(), serviceCode); |
| | | if (appService == null) { |
| | | responseEntity = new ResponseEntity<String>("当前没有权限访问" + ServiceCodeConstant.SERVICE_CODE_QUERY_STORE_USERS, HttpStatus.UNAUTHORIZED); |
| | | context.setResponseEntity(responseEntity); |
| | | return responseEntity; |
| | | } |
| | | return callService(context, appService, paramInObj); |
| | | } |
| | | |
| | | /** |
| | | * 调用下游服务 |
| | | * |
| | | * @param context |
| | | * @param appService 下游服务 |
| | | * @return |
| | | */ |
| | | public ResponseEntity<String> callService(DataFlowContext context, AppService appService, Map paramIn) { |
| | | |
| | | context.getRequestCurrentHeaders().put(CommonConstant.HTTP_ORDER_TYPE_CD, "D"); |
| | | |
| | | ResponseEntity responseEntity = null; |
| | | if (paramIn == null || paramIn.isEmpty()) { |
| | | paramIn = context.getReqJson(); |
| | | } |
| | | |
| | | |
| | | RestTemplate tmpRestTemplate = appService.getServiceCode().startsWith("out.") ? outRestTemplate : restTemplate; |
| | | |
| | | String serviceUrl = appService.getUrl(); |
| | | HttpEntity<String> httpEntity = null; |
| | | HttpHeaders header = new HttpHeaders(); |
| | | for (String key : context.getRequestCurrentHeaders().keySet()) { |
| | | if (CommonConstant.HTTP_SERVICE.toLowerCase().equals(key.toLowerCase())) { |
| | | continue; |
| | | } |
| | | header.add(key, context.getRequestCurrentHeaders().get(key)); |
| | | } |
| | | header.add(CommonConstant.HTTP_SERVICE.toLowerCase(), appService.getServiceCode()); |
| | | try { |
| | | if (CommonConstant.HTTP_METHOD_GET.equals(appService.getMethod())) { |
| | | serviceUrl += "?"; |
| | | for (Object key : paramIn.keySet()) { |
| | | serviceUrl += (key + "=" + paramIn.get(key) + "&"); |
| | | } |
| | | |
| | | if (serviceUrl.endsWith("&")) { |
| | | serviceUrl = serviceUrl.substring(0, serviceUrl.lastIndexOf("&")); |
| | | } |
| | | httpEntity = new HttpEntity<String>("", header); |
| | | responseEntity = tmpRestTemplate.exchange(serviceUrl, HttpMethod.GET, httpEntity, String.class); |
| | | } else if (CommonConstant.HTTP_METHOD_PUT.equals(appService.getMethod())) { |
| | | httpEntity = new HttpEntity<String>(JSONObject.toJSONString(paramIn), header); |
| | | responseEntity = tmpRestTemplate.exchange(serviceUrl, HttpMethod.PUT, httpEntity, String.class); |
| | | } else if (CommonConstant.HTTP_METHOD_DELETE.equals(appService.getMethod())) { |
| | | httpEntity = new HttpEntity<String>(JSONObject.toJSONString(paramIn), header); |
| | | responseEntity = tmpRestTemplate.exchange(serviceUrl, HttpMethod.DELETE, httpEntity, String.class); |
| | | } else { |
| | | httpEntity = new HttpEntity<String>(JSONObject.toJSONString(paramIn), header); |
| | | responseEntity = tmpRestTemplate.exchange(serviceUrl, HttpMethod.POST, httpEntity, String.class); |
| | | } |
| | | } catch (HttpStatusCodeException e) { //这里spring 框架 在4XX 或 5XX 时抛出 HttpServerErrorException 异常,需要重新封装一下 |
| | | responseEntity = new ResponseEntity<String>( e.getResponseBodyAsString(), e.getStatusCode()); |
| | | } |
| | | return responseEntity; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 将rest 协议转为 订单协议 |
| | | * |
| | | * @param businesses 多个业务 |
| | | * @param headers 订单头信息 |
| | | * @return |
| | | */ |
| | | public JSONObject restToCenterProtocol(JSONArray businesses, Map<String, String> headers) { |
| | | |
| | | JSONObject centerProtocol = JSONObject.parseObject("{\"orders\":{},\"business\":[]}"); |
| | | freshOrderProtocol(centerProtocol.getJSONObject("orders"), headers); |
| | | centerProtocol.put("business", businesses); |
| | | return centerProtocol; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 将rest 协议转为 订单协议 |
| | | * |
| | | * @param business |
| | | * @return |
| | | */ |
| | | public JSONObject restToCenterProtocol(JSONObject business, Map<String, String> headers) { |
| | | |
| | | JSONObject centerProtocol = JSONObject.parseObject("{\"orders\":{},\"business\":[]}"); |
| | | freshOrderProtocol(centerProtocol.getJSONObject("orders"), headers); |
| | | centerProtocol.getJSONArray("business").add(business); |
| | | return centerProtocol; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 刷入order信息 |
| | | * |
| | | * @param orders 订单信息 |
| | | * @param headers 头部信息 |
| | | */ |
| | | public void freshOrderProtocol(JSONObject orders, Map<String, String> headers) { |
| | | for (String key : headers.keySet()) { |
| | | |
| | | if (CommonConstant.HTTP_APP_ID.equals(key)) { |
| | | orders.put("appId", headers.get(key)); |
| | | } |
| | | if (CommonConstant.HTTP_TRANSACTION_ID.equals(key)) { |
| | | orders.put("transactionId", headers.get(key)); |
| | | } |
| | | if (CommonConstant.HTTP_SIGN.equals(key)) { |
| | | orders.put("sign", headers.get(key)); |
| | | } |
| | | |
| | | if (CommonConstant.HTTP_REQ_TIME.equals(key)) { |
| | | orders.put("requestTime", headers.get(key)); |
| | | } |
| | | if (CommonConstant.HTTP_ORDER_TYPE_CD.equals(key)) { |
| | | orders.put("orderTypeCd", headers.get(key)); |
| | | } |
| | | if (CommonConstant.HTTP_USER_ID.equals(key)) { |
| | | orders.put("userId", headers.get(key)); |
| | | } |
| | | |
| | | if(CommonConstant.ORDER_PROCESS.equals(key)){ |
| | | orders.put("orderProcess", headers.get(CommonConstant.ORDER_PROCESS)); |
| | | } |
| | | |
| | | if(CommonConstant.O_ID.equals(key)){ |
| | | orders.put("oId", headers.get(CommonConstant.O_ID)); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 刷入order信息 |
| | | * |
| | | * @param httpHeaders http 头信息 |
| | | * @param headers 头部信息 |
| | | */ |
| | | public void freshHttpHeader(HttpHeaders httpHeaders, Map<String, String> headers) { |
| | | for (String key : headers.keySet()) { |
| | | |
| | | if (CommonConstant.HTTP_APP_ID.equals(key)) { |
| | | httpHeaders.add("app_id", headers.get(key)); |
| | | } |
| | | if (CommonConstant.HTTP_TRANSACTION_ID.equals(key)) { |
| | | httpHeaders.add("transaction_id", headers.get(key)); |
| | | } |
| | | |
| | | if (CommonConstant.HTTP_REQ_TIME.equals(key)) { |
| | | httpHeaders.add("req_time", headers.get(key)); |
| | | } |
| | | |
| | | if (CommonConstant.HTTP_USER_ID.equals(key)) { |
| | | httpHeaders.add("user_id", headers.get(key)); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 新增数据方法 |
| | | * |
| | | * @param context 上下文对象 |
| | | * @param param po对象 |
| | | */ |
| | | public void insert(DataFlowContext context, Object param, String businessType) { |
| | | JSONObject business = JSONObject.parseObject("{\"datas\":{}}"); |
| | | business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, businessType); |
| | | business.put(CommonConstant.HTTP_SEQ, DEFAULT_SEQ); |
| | | business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S); |
| | | JSONObject businessObj = new JSONObject(); |
| | | businessObj = JSONObject.parseObject(JSONObject.toJSONString(BeanConvertUtil.beanCovertMap(param))); |
| | | JSONArray businessArr = new JSONArray(); |
| | | businessArr.add(businessObj); |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put(param.getClass().getSimpleName(), businessArr); |
| | | context.addServiceBusiness(business); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据方法 |
| | | * |
| | | * { |
| | | * HTTP_BUSINESS_TYPE_CD:''. |
| | | * HTTP_SEQ:1, |
| | | * HTTP_INVOKE_MODEL:'s', |
| | | * data:[{ |
| | | * ps:Id |
| | | * xxxxx |
| | | * xxxx |
| | | * |
| | | * }] |
| | | * } |
| | | * |
| | | * @param context 上下文对象 |
| | | * @param param po对象 |
| | | */ |
| | | public void update(DataFlowContext context, Object param, String businessType) { |
| | | JSONObject business = JSONObject.parseObject("{\"datas\":{}}"); |
| | | business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, businessType); |
| | | business.put(CommonConstant.HTTP_SEQ, DEFAULT_SEQ); |
| | | business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S); |
| | | JSONObject businessObj = new JSONObject(); |
| | | businessObj = JSONObject.parseObject(JSONObject.toJSONString(BeanConvertUtil.beanCovertMap(param))); |
| | | JSONArray businessArr = new JSONArray(); |
| | | businessArr.add(businessObj); |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put(param.getClass().getSimpleName(), businessArr); |
| | | context.addServiceBusiness(business); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据方法 |
| | | * |
| | | * @param context 上下文对象 |
| | | * @param param po对象 |
| | | */ |
| | | public void delete(DataFlowContext context, Object param, String businessType) { |
| | | JSONObject business = JSONObject.parseObject("{\"datas\":{}}"); |
| | | business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, businessType); |
| | | business.put(CommonConstant.HTTP_SEQ, DEFAULT_SEQ); |
| | | business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S); |
| | | JSONObject businessObj = new JSONObject(); |
| | | businessObj = JSONObject.parseObject(JSONObject.toJSONString(BeanConvertUtil.beanCovertMap(param))); |
| | | JSONArray businessArr = new JSONArray(); |
| | | businessArr.add(businessObj); |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put(param.getClass().getSimpleName(), businessArr); |
| | | context.addServiceBusiness(business); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.fee.bmo; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.entity.center.AppService; |
| | | import org.springframework.http.HttpHeaders; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | import java.util.Map; |
| | | |
| | | public interface IApiBaseBMO { |
| | | |
| | | /** |
| | | * 调用下游服务 |
| | | * |
| | | * @param event |
| | | * @return |
| | | */ |
| | | public ResponseEntity<String> callService(ServiceDataFlowEvent event); |
| | | /** |
| | | * 调用下游服务 |
| | | * |
| | | * @param context |
| | | * @param serviceCode 下游服务 |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> callService(DataFlowContext context, String serviceCode, JSONArray businesses); |
| | | |
| | | /** |
| | | * 调用下游服务 |
| | | * |
| | | * @param context |
| | | * @param serviceCode 下游服务 |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> callService(DataFlowContext context, String serviceCode, JSONObject businesses); |
| | | |
| | | /** |
| | | * 调用下游服务 |
| | | * |
| | | * @param context |
| | | * @param appService 下游服务 |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> callService(DataFlowContext context, AppService appService, Map paramIn); |
| | | |
| | | /** |
| | | * 将rest 协议转为 订单协议 |
| | | * |
| | | * @param businesses 多个业务 |
| | | * @param headers 订单头信息 |
| | | * @return |
| | | */ |
| | | JSONObject restToCenterProtocol(JSONObject businesses, Map<String, String> headers); |
| | | /** |
| | | * 将rest 协议转为 订单协议 |
| | | * |
| | | * @param businesses 多个业务 |
| | | * @param headers 订单头信息 |
| | | * @return |
| | | */ |
| | | JSONObject restToCenterProtocol(JSONArray businesses, Map<String, String> headers); |
| | | |
| | | public void freshOrderProtocol(JSONObject orders, Map<String, String> headers); |
| | | |
| | | /** |
| | | * 刷入order信息 |
| | | * |
| | | * @param httpHeaders http 头信息 |
| | | * @param headers 头部信息 |
| | | */ |
| | | public void freshHttpHeader(HttpHeaders httpHeaders, Map<String, String> headers); |
| | | } |
| New file |
| | |
| | | package com.java110.fee.bmo.account; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.fee.bmo.IApiBaseBMO; |
| | | |
| | | public interface ISaveAccountBMO extends IApiBaseBMO { |
| | | |
| | | /** |
| | | * 添加账户余额 |
| | | * add by fqz |
| | | * |
| | | * @param paramInJson 接口调用放传入入参 |
| | | * @param dataFlowContext 数据上下文 |
| | | * @return |
| | | */ |
| | | void save(JSONObject paramInJson, DataFlowContext dataFlowContext); |
| | | |
| | | /** |
| | | * 添加账户余额明细 |
| | | * add by fqz |
| | | * |
| | | * @param paramInJson 接口调用放传入入参 |
| | | * @param dataFlowContext 数据上下文 |
| | | * @return |
| | | */ |
| | | void saveDetail(JSONObject paramInJson, DataFlowContext dataFlowContext); |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.bmo.account; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.account.AccountDto; |
| | | import com.java110.dto.accountDetail.AccountDetailDto; |
| | | import com.java110.fee.bmo.IApiBaseBMO; |
| | | import com.java110.po.accountDetail.AccountDetailPo; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.CommonConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | public interface IUpdateAccountBMO extends IApiBaseBMO { |
| | | |
| | | /** |
| | | * 修改账户余额 |
| | | * add by fqz |
| | | * |
| | | * @param paramInJson 接口调用放传入入参 |
| | | * @param dataFlowContext 数据上下文 |
| | | * @return |
| | | */ |
| | | void update(JSONObject paramInJson, DataFlowContext dataFlowContext); |
| | | |
| | | /** |
| | | * 账户处理 |
| | | * @param paramObj |
| | | * @param dataFlowContext |
| | | */ |
| | | void cashBackAccount(JSONObject paramObj, DataFlowContext dataFlowContext, JSONArray businesses); |
| | | } |
| New file |
| | |
| | | package com.java110.fee.bmo.account.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.fee.bmo.ApiBaseBMO; |
| | | import com.java110.fee.bmo.account.ISaveAccountBMO; |
| | | import com.java110.po.account.AccountPo; |
| | | import com.java110.po.accountDetail.AccountDetailPo; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("saveAccountBMOImpl") |
| | | public class SaveAccountBMOImpl extends ApiBaseBMO implements ISaveAccountBMO { |
| | | |
| | | /** |
| | | * 添加账户余额 |
| | | * |
| | | * @author fqz |
| | | * @date 2021-09-09 |
| | | */ |
| | | @Override |
| | | public void save(JSONObject paramInJson, DataFlowContext dataFlowContext) { |
| | | AccountPo accountPo = BeanConvertUtil.covertBean(paramInJson, AccountPo.class); |
| | | super.insert(dataFlowContext, accountPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_ACCT); |
| | | } |
| | | |
| | | /** |
| | | * 添加账户明细 |
| | | * |
| | | * @author fqz |
| | | * @date 2021-09-09 |
| | | */ |
| | | @Override |
| | | public void saveDetail(JSONObject paramInJson, DataFlowContext dataFlowContext) { |
| | | AccountDetailPo accountDetailPo = BeanConvertUtil.covertBean(paramInJson, AccountDetailPo.class); |
| | | super.insert(dataFlowContext, accountDetailPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_ACCT_DETAIL); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.bmo.account.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.account.AccountDto; |
| | | import com.java110.dto.accountDetail.AccountDetailDto; |
| | | import com.java110.dto.owner.OwnerDto; |
| | | import com.java110.dto.owner.OwnerRoomRelDto; |
| | | import com.java110.fee.bmo.ApiBaseBMO; |
| | | import com.java110.fee.bmo.account.IUpdateAccountBMO; |
| | | import com.java110.intf.acct.IAccountDetailInnerServiceSMO; |
| | | import com.java110.intf.acct.IAccountInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerRoomRelInnerServiceSMO; |
| | | import com.java110.po.account.AccountPo; |
| | | import com.java110.po.accountDetail.AccountDetailPo; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.CommonConstant; |
| | | 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.stereotype.Service; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 修改账户余额 |
| | | * |
| | | * @author fqz |
| | | * @date 2021-09-09 |
| | | */ |
| | | @Service("updateAccountBMOImpl") |
| | | public class UpdateAccountBMOImpl extends ApiBaseBMO implements IUpdateAccountBMO { |
| | | |
| | | |
| | | @Autowired |
| | | private IAccountInnerServiceSMO accountInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOwnerRoomRelInnerServiceSMO ownerRoomRelInnerServiceSMOImpl; |
| | | |
| | | |
| | | @Autowired |
| | | private IAccountDetailInnerServiceSMO accountDetailInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOwnerInnerServiceSMO ownerInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public void update(JSONObject paramInJson, DataFlowContext dataFlowContext) { |
| | | AccountPo accountPo = BeanConvertUtil.covertBean(paramInJson, AccountPo.class); |
| | | super.update(dataFlowContext, accountPo, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_ACCT); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void cashBackAccount(JSONObject paramObj, DataFlowContext dataFlowContext, JSONArray businesses) { |
| | | //判断返现金额是否大于0 |
| | | BigDecimal cashBackAmount = new BigDecimal(paramObj.getString("cashBackAmount")); |
| | | if (cashBackAmount != null && cashBackAmount.compareTo(BigDecimal.ZERO) == 1) { |
| | | String roomId = paramObj.getString("roomId"); |
| | | OwnerRoomRelDto ownerRoomRelDto = new OwnerRoomRelDto(); |
| | | ownerRoomRelDto.setRoomId(roomId); |
| | | //查询业主房屋关系表 |
| | | List<OwnerRoomRelDto> ownerRoomRelDtos = ownerRoomRelInnerServiceSMOImpl.queryOwnerRoomRels(ownerRoomRelDto); |
| | | Assert.listOnlyOne(ownerRoomRelDtos, "查询业主房屋关系表错误!"); |
| | | //获取业主id |
| | | String ownerId = ownerRoomRelDtos.get(0).getOwnerId(); |
| | | paramObj.put("ownerId", ownerId); |
| | | //根据业主id去查这个业主的账户余额 |
| | | AccountDto accountDto = new AccountDto(); |
| | | accountDto.setObjId(ownerId); |
| | | accountDto.setPartId(paramObj.getString("communityId")); |
| | | accountDto.setObjType(AccountDto.OBJ_TYPE_PERSON); |
| | | accountDto.setAcctType(AccountDto.ACCT_TYPE_CASH); |
| | | List<AccountDto> accountDtos = accountInnerServiceSMOImpl.queryAccounts(accountDto); |
| | | if (accountDtos != null && accountDtos.size() != 0) {//存在业主账号 |
| | | AccountDetailPo accountDetailPo = new AccountDetailPo(); |
| | | accountDetailPo.setDetailId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_detailId)); |
| | | int flag1 = cashBackAmount.compareTo(BigDecimal.ZERO); |
| | | if (flag1 == 1) { |
| | | accountDetailPo.setAmount(cashBackAmount + ""); |
| | | accountDetailPo.setDetailType(AccountDetailDto.DETAIL_TYPE_IN); |
| | | accountDetailPo.setRemark("优惠申请返还"); |
| | | } |
| | | accountDetailPo.setOrderId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_orderId)); |
| | | accountDetailPo.setObjType(accountDtos.get(0).getObjType()); |
| | | accountDetailPo.setObjId(accountDtos.get(0).getObjId()); |
| | | accountDetailPo.setAcctId(accountDtos.get(0).getAcctId()); |
| | | accountDetailPo.setRelAcctId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_detailId)); |
| | | |
| | | accountInnerServiceSMOImpl.prestoreAccount(accountDetailPo); |
| | | } else { |
| | | accountDto = addAccountDto(paramObj); |
| | | //保存交易明细 |
| | | AccountDetailPo accountDetail = new AccountDetailPo(); |
| | | accountDetail.setOrderId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_orderId)); |
| | | accountDetail.setAcctId(accountDto.getAcctId()); |
| | | accountDetail.setAmount(cashBackAmount + ""); |
| | | accountDetail.setObjType(AccountDetailDto.ORDER_TYPE_USER); |
| | | accountDetail.setDetailType(AccountDetailDto.DETAIL_TYPE_IN); |
| | | accountDetail.setObjId(accountDto.getObjId()); |
| | | accountDetail.setRemark("优惠申请返还"); |
| | | accountDetail.setDetailId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_detailId)); |
| | | if (StringUtil.isEmpty(accountDetail.getRelAcctId())) { |
| | | accountDetail.setRelAcctId("-1"); |
| | | } |
| | | accountDetailInnerServiceSMOImpl.saveAccountDetails(accountDetail); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | private AccountDto addAccountDto(JSONObject reqJson) { |
| | | AccountPo accountPo = new AccountPo(); |
| | | accountPo.setAmount(reqJson.getString("cashBackAmount")); |
| | | accountPo.setAcctId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_acctId)); |
| | | accountPo.setObjId(reqJson.getString("ownerId")); |
| | | accountPo.setObjType(AccountDto.OBJ_TYPE_PERSON); |
| | | accountPo.setAcctType(AccountDto.ACCT_TYPE_CASH); |
| | | OwnerDto ownerDto = new OwnerDto(); |
| | | ownerDto.setMemberId(reqJson.getString("ownerId")); |
| | | ownerDto.setCommunityId(reqJson.getString("communityId")); |
| | | List<OwnerDto> ownerDtos = ownerInnerServiceSMOImpl.queryOwners(ownerDto); |
| | | accountPo.setAcctName(ownerDtos.get(0).getName()); |
| | | accountPo.setPartId(reqJson.getString("communityId")); |
| | | accountInnerServiceSMOImpl.saveAccount(accountPo); |
| | | return BeanConvertUtil.covertBean(accountPo, AccountDto.class); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public int saveFeeAttrs(List<FeeAttrPo> feeAttrPos) { |
| | | public int saveFeeAttrs(@RequestBody List<FeeAttrPo> feeAttrPos) { |
| | | |
| | | List<Map> feeAttrs = new ArrayList<>(); |
| | | for (FeeAttrPo feeAttrPo : feeAttrPos) { |
| | |
| | | c.add(Calendar.DAY_OF_MONTH, -5);//这里根据设置时间荣誉5天 |
| | | Date endTime = c.getTime(); |
| | | applyRoomDiscountDto.setEndTime(simpleDateFormat.format(endTime)); |
| | | applyRoomDiscountDto.setFeeId(feeDetailDto.getFeeId()); |
| | | //查询折扣申请表 |
| | | List<ApplyRoomDiscountDto> applyRoomDiscountDtos = applyRoomDiscountInnerServiceSMOImpl.queryApplyRoomDiscounts(applyRoomDiscountDto); |
| | | //判断查询的折扣申请表是否有数据 |
| | |
| | | import com.java110.utils.cache.MappingCache; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | private static String sendMsgUrl = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="; |
| | | |
| | | @Override |
| | | public void execute(Business business, List<Business> businesses) { |
| | | public void execute(Business business, List<Business> businesses) throws ParseException { |
| | | JSONObject data = business.getData(); |
| | | //获取开始时间 |
| | | String beginTime = data.getString("startTime") + " 00:00:00"; |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | Date timeOne = format.parse(beginTime); |
| | | Calendar now = Calendar.getInstance(); |
| | | String newTime = now.get(Calendar.YEAR) + "-" + (now.get(Calendar.MONTH) + 1) + "-" + now.get(Calendar.DAY_OF_MONTH) + " 00:00:00"; |
| | | Date timeTwo = format.parse(newTime); |
| | | if (timeOne.getTime() < timeTwo.getTime()) { |
| | | logger.info("装修时间不能小于当前时间!"); |
| | | return; |
| | | } |
| | | //查询小区信息 |
| | | CommunityDto communityDto = new CommunityDto(); |
| | | communityDto.setCommunityId(data.getString("communityId")); |
| | |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.text.DecimalFormat; |
| | | import java.text.ParseException; |
| | | import java.util.*; |
| | | |
| | |
| | | List<ReportOweFeeItemDto> itemDtos = reportOweFeeDo.getItems(); |
| | | String oweUrl = ""; |
| | | for (ReportOweFeeItemDto itemDto : itemDtos) { |
| | | BigDecimal amountOwed = new BigDecimal(itemDto.getAmountOwed()); |
| | | oweUrl = FeeDto.PAYER_OBJ_TYPE_ROOM.equals(reportOweFeeDo.getPayerObjType()) ? oweRoomUrl : oweCarUrl; |
| | | for (OwnerAppUserDto appUserDto : ownerAppUserDtos) { |
| | | try { |
| | | //获取用户缴费到期时间 |
| | | Date endTime = itemDto.getEndTime(); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(endTime); |
| | | calendar.add(Calendar.DATE, -1); |
| | | endTime = calendar.getTime(); |
| | | |
| | | Data data = new Data(); |
| | | PropertyFeeTemplateMessage templateMessage = new PropertyFeeTemplateMessage(); |
| | | templateMessage.setTemplate_id(templateId); |
| | | templateMessage.setTouser(appUserDto.getOpenId()); |
| | | data.setFirst(new Content(itemDto.getFeeName() + "提醒")); |
| | | data.setKeyword1(new Content(itemDto.getPayerObjName())); |
| | | data.setKeyword2(new Content(itemDto.getAmountOwed())); |
| | | data.setKeyword3(new Content( |
| | | DateUtil.getFormatTimeString(itemDto.getStartTime(), DateUtil.DATE_FORMATE_STRING_B) |
| | | + "至" |
| | | + DateUtil.getFormatTimeString(endTime, DateUtil.DATE_FORMATE_STRING_B))); |
| | | data.setRemark(new Content("请您及时缴费,如有疑问请联系相关物业人员")); |
| | | |
| | | if (!StringUtil.isEmpty(oweUrl)) { |
| | | if (miniprogram == null) { |
| | | templateMessage.setUrl(oweUrl + itemDto.getPayerObjId() + "&wAppId=" + weChatDto.getAppId()); |
| | | } else { |
| | | miniprogram.setPagepath(oweUrl.split("@@")[1] + itemDto.getPayerObjId() + "&wAppId=" + weChatDto.getAppId()); |
| | | templateMessage.setMiniprogram(miniprogram); |
| | | } |
| | | } |
| | | templateMessage.setData(data); |
| | | logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage)); |
| | | ResponseEntity<String> responseEntity = outRestTemplate.postForEntity(url, JSON.toJSONString(templateMessage), String.class); |
| | | logger.info("微信模板返回内容:{}", responseEntity); |
| | | } catch (Exception e) { |
| | | LogSystemErrorPo logSystemErrorPo = new LogSystemErrorPo(); |
| | | logSystemErrorPo.setErrId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_errId)); |
| | | logSystemErrorPo.setErrType(LogSystemErrorDto.ERR_TYPE_OWE_FEE); |
| | | logSystemErrorPo.setMsg(ExceptionUtil.getStackTrace(e)); |
| | | saveSystemErrorSMOImpl.saveLog(logSystemErrorPo); |
| | | logger.error("欠费推送失败" + feeCollectionOrderDto.getCollectionName(), e); |
| | | } |
| | | String[] roomName = new String[]{}; |
| | | if ("3333".equals(reportOweFeeDo.getPayerObjType())) { |
| | | roomName = itemDto.getPayerObjName().split("-"); |
| | | } |
| | | for (OwnerAppUserDto appUserDto : ownerAppUserDtos) { |
| | | try { |
| | | //获取用户缴费到期时间 |
| | | Date endTime = itemDto.getEndTime(); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(endTime); |
| | | calendar.add(Calendar.DATE, -1); |
| | | endTime = calendar.getTime(); |
| | | |
| | | Data data = new Data(); |
| | | PropertyFeeTemplateMessage templateMessage = new PropertyFeeTemplateMessage(); |
| | | templateMessage.setTemplate_id(templateId); |
| | | templateMessage.setTouser(appUserDto.getOpenId()); |
| | | data.setFirst(new Content(itemDto.getFeeName() + "提醒")); |
| | | if ("3333".equals(reportOweFeeDo.getPayerObjType())) { |
| | | data.setKeyword1(new Content(roomName[0] + "栋" + roomName[1] + "单元" + roomName[2] + "室")); |
| | | } else { |
| | | data.setKeyword1(new Content(itemDto.getPayerObjName())); |
| | | } |
| | | DecimalFormat df = new DecimalFormat("0.00"); |
| | | data.setKeyword2(new Content(df.format(amountOwed) + "元")); |
| | | data.setKeyword3(new Content( |
| | | DateUtil.getFormatTimeString(itemDto.getStartTime(), DateUtil.DATE_FORMATE_STRING_B) |
| | | + "至" |
| | | + DateUtil.getFormatTimeString(endTime, DateUtil.DATE_FORMATE_STRING_B))); |
| | | data.setRemark(new Content("请您及时缴费,如有疑问请联系相关物业人员!")); |
| | | |
| | | if (!StringUtil.isEmpty(oweUrl)) { |
| | | if (miniprogram == null) { |
| | | templateMessage.setUrl(oweUrl + itemDto.getPayerObjId() + "&wAppId=" + weChatDto.getAppId()); |
| | | } else { |
| | | miniprogram.setPagepath(oweUrl.split("@@")[1] + itemDto.getPayerObjId() + "&wAppId=" + weChatDto.getAppId()); |
| | | templateMessage.setMiniprogram(miniprogram); |
| | | } |
| | | } |
| | | templateMessage.setData(data); |
| | | logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage)); |
| | | ResponseEntity<String> responseEntity = outRestTemplate.postForEntity(url, JSON.toJSONString(templateMessage), String.class); |
| | | logger.info("微信模板返回内容:{}", responseEntity); |
| | | } catch (Exception e) { |
| | | LogSystemErrorPo logSystemErrorPo = new LogSystemErrorPo(); |
| | | logSystemErrorPo.setErrId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_errId)); |
| | | logSystemErrorPo.setErrType(LogSystemErrorDto.ERR_TYPE_OWE_FEE); |
| | | logSystemErrorPo.setMsg(ExceptionUtil.getStackTrace(e)); |
| | | saveSystemErrorSMOImpl.saveLog(logSystemErrorPo); |
| | | logger.error("欠费推送失败" + feeCollectionOrderDto.getCollectionName(), e); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return new ResultVo(ResultVo.CODE_OK, ResultVo.MSG_OK); |
| | |
| | | } |
| | | ReportOweFeeDto reportOweFeeDto = new ReportOweFeeDto(); |
| | | reportOweFeeDto.setPayerObjIds(payObjIds.toArray(new String[payObjIds.size()])); |
| | | reportOweFeeDto.setHasOweFee("Y"); |
| | | List<ReportOweFeeDto> allReportOweFeeDtos = reportOweFeeInnerServiceSMOImpl.queryReportAllOweFees(reportOweFeeDto); |
| | | List<ReportOweFeeDto> reportOweFeeDtos = new ArrayList<>(); |
| | | for (ReportOweFeeDto reportOweFee : allReportOweFeeDtos) { |
| | | ReportOweFeeDto reportOwe = new ReportOweFeeDto(); |
| | | reportOwe.setOweId(reportOweFee.getOweId()); |
| | | reportOwe.setHasOweFee("Y"); |
| | | reportOweFee.setPayerObjType(reportOweFee.getPayerObjType()); |
| | | if (reportOweFee.getPayerObjType().equals("3333")) { |
| | | List<ReportOweFeeDto> reportOweFees = reportOweFeeInnerServiceSMOImpl.queryReportAllOweFeesByRoom(reportOwe); |
| | |
| | | for (ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto1 : reportFeeMonthStatisticsDtos) { |
| | | // reportFeeMonthStatisticsDto1.setAllReceivableAmount(tmpReportFeeMonthStatisticsDto.getAllReceivableAmount()); |
| | | // reportFeeMonthStatisticsDto1.setAllReceivedAmount(tmpReportFeeMonthStatisticsDto.getAllReceivedAmount()); |
| | | reportFeeMonthStatisticsDto1.setAllOweAmount(tmpReportFeeMonthStatisticsDto.getAllOweAmount()); |
| | | reportFeeMonthStatisticsDto1.setAllOweAmount(tmpReportFeeMonthStatisticsDto.getOweAmount()); |
| | | } |
| | | } |
| | | freshReportOweDay(reportFeeMonthStatisticsDtos); |
| | |
| | | // List<CommunityDto> communityDtos = BeanConvertUtil.covertBeanList( |
| | | // reportCommunityServiceDaoImpl.getCommunitys(BeanConvertUtil.beanCovertMap(communityDto)), CommunityDto.class); |
| | | |
| | | List<CommunityDto> communityDtos =communityInnerServiceSMOImpl.queryCommunitys(communityDto); |
| | | List<CommunityDto> communityDtos = communityInnerServiceSMOImpl.queryCommunitys(communityDto); |
| | | |
| | | for (CommunityDto tmpCommunityDto : communityDtos) { |
| | | reportFeeMonthStatisticsPo.setCommunityId(tmpCommunityDto.getCommunityId()); |