费用管理 包括物业费停车费等服务端功能开发完成待测试
| New file |
| | |
| | | package com.java110.fee.dao; |
| | | |
| | | |
| | | import com.java110.common.exception.DAOException; |
| | | import com.java110.entity.merchant.BoMerchant; |
| | | import com.java110.entity.merchant.BoMerchantAttr; |
| | | import com.java110.entity.merchant.Merchant; |
| | | import com.java110.entity.merchant.MerchantAttr; |
| | | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 费用属性组件内部之间使用,没有给外围系统提供服务能力 |
| | | * 费用属性服务接口类,要求全部以字符串传输,方便微服务化 |
| | | * 新建客户,修改客户,删除客户,查询客户等功能 |
| | | * |
| | | * Created by wuxw on 2016/12/27. |
| | | */ |
| | | public interface IFeeAttrServiceDao { |
| | | |
| | | /** |
| | | * 保存 费用属性信息 |
| | | * @param businessFeeAttrInfo 费用属性信息 封装 |
| | | * @throws DAOException 操作数据库异常 |
| | | */ |
| | | void saveBusinessFeeAttrInfo(Map businessFeeAttrInfo) throws DAOException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询费用属性信息(business过程) |
| | | * 根据bId 查询费用属性信息 |
| | | * @param info bId 信息 |
| | | * @return 费用属性信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | List<Map> getBusinessFeeAttrInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 保存 费用属性信息 Business数据到 Instance中 |
| | | * @param info |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void saveFeeAttrInfoInstance(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询费用属性信息(instance过程) |
| | | * 根据bId 查询费用属性信息 |
| | | * @param info bId 信息 |
| | | * @return 费用属性信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | List<Map> getFeeAttrInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 修改费用属性信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void updateFeeAttrInfoInstance(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 查询费用属性总数 |
| | | * |
| | | * @param info 费用属性信息 |
| | | * @return 费用属性数量 |
| | | */ |
| | | int queryFeeAttrsCount(Map info); |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.dao; |
| | | |
| | | |
| | | import com.java110.common.exception.DAOException; |
| | | import com.java110.entity.merchant.BoMerchant; |
| | | import com.java110.entity.merchant.BoMerchantAttr; |
| | | import com.java110.entity.merchant.Merchant; |
| | | import com.java110.entity.merchant.MerchantAttr; |
| | | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 费用配置组件内部之间使用,没有给外围系统提供服务能力 |
| | | * 费用配置服务接口类,要求全部以字符串传输,方便微服务化 |
| | | * 新建客户,修改客户,删除客户,查询客户等功能 |
| | | * |
| | | * Created by wuxw on 2016/12/27. |
| | | */ |
| | | public interface IFeeConfigServiceDao { |
| | | |
| | | /** |
| | | * 保存 费用配置信息 |
| | | * @param businessFeeConfigInfo 费用配置信息 封装 |
| | | * @throws DAOException 操作数据库异常 |
| | | */ |
| | | void saveBusinessFeeConfigInfo(Map businessFeeConfigInfo) throws DAOException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询费用配置信息(business过程) |
| | | * 根据bId 查询费用配置信息 |
| | | * @param info bId 信息 |
| | | * @return 费用配置信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | List<Map> getBusinessFeeConfigInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 保存 费用配置信息 Business数据到 Instance中 |
| | | * @param info |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void saveFeeConfigInfoInstance(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询费用配置信息(instance过程) |
| | | * 根据bId 查询费用配置信息 |
| | | * @param info bId 信息 |
| | | * @return 费用配置信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | List<Map> getFeeConfigInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 修改费用配置信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void updateFeeConfigInfoInstance(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 查询费用配置总数 |
| | | * |
| | | * @param info 费用配置信息 |
| | | * @return 费用配置数量 |
| | | */ |
| | | int queryFeeConfigsCount(Map info); |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.dao; |
| | | |
| | | |
| | | import com.java110.common.exception.DAOException; |
| | | import com.java110.entity.merchant.BoMerchant; |
| | | import com.java110.entity.merchant.BoMerchantAttr; |
| | | import com.java110.entity.merchant.Merchant; |
| | | import com.java110.entity.merchant.MerchantAttr; |
| | | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 费用明细组件内部之间使用,没有给外围系统提供服务能力 |
| | | * 费用明细服务接口类,要求全部以字符串传输,方便微服务化 |
| | | * 新建客户,修改客户,删除客户,查询客户等功能 |
| | | * |
| | | * Created by wuxw on 2016/12/27. |
| | | */ |
| | | public interface IFeeDetailServiceDao { |
| | | |
| | | /** |
| | | * 保存 费用明细信息 |
| | | * @param businessFeeDetailInfo 费用明细信息 封装 |
| | | * @throws DAOException 操作数据库异常 |
| | | */ |
| | | void saveBusinessFeeDetailInfo(Map businessFeeDetailInfo) throws DAOException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询费用明细信息(business过程) |
| | | * 根据bId 查询费用明细信息 |
| | | * @param info bId 信息 |
| | | * @return 费用明细信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | List<Map> getBusinessFeeDetailInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 保存 费用明细信息 Business数据到 Instance中 |
| | | * @param info |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void saveFeeDetailInfoInstance(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询费用明细信息(instance过程) |
| | | * 根据bId 查询费用明细信息 |
| | | * @param info bId 信息 |
| | | * @return 费用明细信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | List<Map> getFeeDetailInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 修改费用明细信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void updateFeeDetailInfoInstance(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 查询费用明细总数 |
| | | * |
| | | * @param info 费用明细信息 |
| | | * @return 费用明细数量 |
| | | */ |
| | | int queryFeeDetailsCount(Map info); |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | import com.java110.common.exception.DAOException; |
| | | import com.java110.entity.merchant.BoMerchant; |
| | | import com.java110.entity.merchant.BoMerchantAttr; |
| | | import com.java110.entity.merchant.Merchant; |
| | | import com.java110.entity.merchant.MerchantAttr; |
| | | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 小区组件内部之间使用,没有给外围系统提供服务能力 |
| | | * 小区服务接口类,要求全部以字符串传输,方便微服务化 |
| | | * 费用组件内部之间使用,没有给外围系统提供服务能力 |
| | | * 费用服务接口类,要求全部以字符串传输,方便微服务化 |
| | | * 新建客户,修改客户,删除客户,查询客户等功能 |
| | | * |
| | | * Created by wuxw on 2016/12/27. |
| | |
| | | public interface IFeeServiceDao { |
| | | |
| | | /** |
| | | * 保存 小区信息 |
| | | * @param businessFeeInfo 小区信息 封装 |
| | | * 保存 费用信息 |
| | | * @param businessFeeInfo 费用信息 封装 |
| | | * @throws DAOException 操作数据库异常 |
| | | */ |
| | | void saveBusinessFeeInfo(Map businessFeeInfo) throws DAOException; |
| | | void saveBusinessFeeInfo(Map businessFeeInfo) throws DAOException; |
| | | |
| | | /** |
| | | * 保存小区属性 |
| | | * @param businessFeeAttr 小区属性信息封装 |
| | | * @throws DAOException 操作数据库异常 |
| | | */ |
| | | void saveBusinessFeeAttr(Map businessFeeAttr) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 保存小区照片信息 |
| | | * @param businessFeePhoto 小区照片 |
| | | * @throws DAOException 操作数据库异常 |
| | | */ |
| | | void saveBusinessFeePhoto(Map businessFeePhoto) throws DAOException; |
| | | |
| | | /** |
| | | * 保存小区证件信息 |
| | | * @param businessFeeCerdentials 小区证件 |
| | | * @throws DAOException 操作数据库异常 |
| | | */ |
| | | void saveBusinessFeeCerdentials(Map businessFeeCerdentials) throws DAOException; |
| | | |
| | | /** |
| | | * 查询小区信息(business过程) |
| | | * 根据bId 查询小区信息 |
| | | * 查询费用信息(business过程) |
| | | * 根据bId 查询费用信息 |
| | | * @param info bId 信息 |
| | | * @return 小区信息 |
| | | * @throws DAOException |
| | | * @return 费用信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | Map getBusinessFeeInfo(Map info) throws DAOException; |
| | | List<Map> getBusinessFeeInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询小区属性信息(business过程) |
| | | * @param info bId 信息 |
| | | * @return 小区属性 |
| | | * @throws DAOException |
| | | */ |
| | | List<Map> getBusinessFeeAttrs(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 查询小区照片 |
| | | * @param info bId 信息 |
| | | * @return 小区照片 |
| | | * @throws DAOException |
| | | */ |
| | | List<Map> getBusinessFeePhoto(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 查询小区证件信息 |
| | | * @param info bId 信息 |
| | | * @return 小区照片 |
| | | * @throws DAOException |
| | | */ |
| | | List<Map> getBusinessFeeCerdentials(Map info) throws DAOException; |
| | | |
| | | /** |
| | | * 保存 小区信息 Business数据到 Instance中 |
| | | * 保存 费用信息 Business数据到 Instance中 |
| | | * @param info |
| | | * @throws DAOException |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void saveFeeInfoInstance(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 保存 小区属性信息 Business数据到 Instance中 |
| | | * @param info |
| | | * @throws DAOException |
| | | */ |
| | | void saveFeeAttrsInstance(Map info) throws DAOException; |
| | | |
| | | /** |
| | | * 保存 小区照片信息 Business数据到 Instance中 |
| | | * @param info |
| | | * @throws DAOException |
| | | */ |
| | | void saveFeePhotoInstance(Map info) throws DAOException; |
| | | |
| | | |
| | | void saveFeeInfoInstance(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询小区信息(instance过程) |
| | | * 根据bId 查询小区信息 |
| | | * 查询费用信息(instance过程) |
| | | * 根据bId 查询费用信息 |
| | | * @param info bId 信息 |
| | | * @return 小区信息 |
| | | * @throws DAOException |
| | | * @return 费用信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | Map getFeeInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 查询小区属性信息(instance过程) |
| | | * @param info bId 信息 |
| | | * @return 小区属性 |
| | | * @throws DAOException |
| | | */ |
| | | List<Map> getFeeAttrs(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 查询小区照片(instance 过程) |
| | | * @param info bId 信息 |
| | | * @return 小区照片 |
| | | * @throws DAOException |
| | | */ |
| | | List<Map> getFeePhoto(Map info) throws DAOException; |
| | | List<Map> getFeeInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 修改小区信息 |
| | | * 修改费用信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void updateFeeInfoInstance(Map info) throws DAOException; |
| | | void updateFeeInfoInstance(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 修改小区属性信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException |
| | | * 查询费用总数 |
| | | * |
| | | * @param info 费用信息 |
| | | * @return 费用数量 |
| | | */ |
| | | void updateFeeAttrInstance(Map info) throws DAOException; |
| | | int queryFeesCount(Map info); |
| | | |
| | | |
| | | /** |
| | | * 修改小区照片信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException |
| | | */ |
| | | void updateFeePhotoInstance(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 小区成员加入信息 |
| | | * @param businessFeeMember 小区成员信息 封装 |
| | | * @throws DAOException 操作数据库异常 |
| | | */ |
| | | void saveBusinessFeeMember(Map businessFeeMember) throws DAOException; |
| | | |
| | | /** |
| | | * 成员加入 保存信息至instance |
| | | * @param info |
| | | * @throws DAOException |
| | | */ |
| | | void saveFeeMemberInstance(Map info) throws DAOException; |
| | | |
| | | /** |
| | | * 查询小区成员加入信息(business过程) |
| | | * 根据bId 查询小区信息 |
| | | * @param info bId 信息 |
| | | * @return 小区信息 |
| | | * @throws DAOException |
| | | */ |
| | | Map getBusinessFeeMember(Map info) throws DAOException; |
| | | |
| | | /** |
| | | * 查询小区成员加入信息(instance过程) |
| | | * 根据bId 查询小区信息 |
| | | * @param info bId 信息 |
| | | * @return 小区信息 |
| | | * @throws DAOException |
| | | */ |
| | | Map getFeeMember(Map info) throws DAOException; |
| | | |
| | | /** |
| | | * 修改小区成员加入信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException |
| | | */ |
| | | void updateFeeMemberInstance(Map info) throws DAOException; |
| | | |
| | | /** |
| | | * 查询小区成员加入信息(instance过程) |
| | | * 根据bId 查询小区信息 |
| | | * @param info bId 信息 |
| | | * @return 小区信息 |
| | | * @throws DAOException |
| | | */ |
| | | List<Map> getFeeMembers(Map info) throws DAOException; |
| | | |
| | | /** |
| | | * 查询小区成员个数 |
| | | * 根据bId 查询小区信息 |
| | | * @param info bId 信息 |
| | | * @return 小区信息 |
| | | * @throws DAOException |
| | | */ |
| | | int getFeeMemberCount(Map info); |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.fee.dao.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.common.constant.ResponseConstant; |
| | | import com.java110.common.exception.DAOException; |
| | | import com.java110.common.util.DateUtil; |
| | | import com.java110.core.base.dao.BaseServiceDao; |
| | | import com.java110.fee.dao.IFeeAttrServiceDao; |
| | | 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("feeAttrServiceDaoImpl") |
| | | //@Transactional |
| | | public class FeeAttrServiceDaoImpl extends BaseServiceDao implements IFeeAttrServiceDao { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(FeeAttrServiceDaoImpl.class); |
| | | |
| | | /** |
| | | * 费用属性信息封装 |
| | | * @param businessFeeAttrInfo 费用属性信息 封装 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void saveBusinessFeeAttrInfo(Map businessFeeAttrInfo) throws DAOException { |
| | | businessFeeAttrInfo.put("month", DateUtil.getCurrentMonth()); |
| | | // 查询business_user 数据是否已经存在 |
| | | logger.debug("保存费用属性信息 入参 businessFeeAttrInfo : {}",businessFeeAttrInfo); |
| | | int saveFlag = sqlSessionTemplate.insert("feeAttrServiceDaoImpl.saveBusinessFeeAttrInfo",businessFeeAttrInfo); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存费用属性数据失败:"+ JSONObject.toJSONString(businessFeeAttrInfo)); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询费用属性信息 |
| | | * @param info bId 信息 |
| | | * @return 费用属性信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public List<Map> getBusinessFeeAttrInfo(Map info) throws DAOException { |
| | | |
| | | logger.debug("查询费用属性信息 入参 info : {}",info); |
| | | |
| | | List<Map> businessFeeAttrInfos = sqlSessionTemplate.selectList("feeAttrServiceDaoImpl.getBusinessFeeAttrInfo",info); |
| | | |
| | | return businessFeeAttrInfos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 保存费用属性信息 到 instance |
| | | * @param info bId 信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void saveFeeAttrInfoInstance(Map info) throws DAOException { |
| | | logger.debug("保存费用属性信息Instance 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("feeAttrServiceDaoImpl.saveFeeAttrInfoInstance",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> getFeeAttrInfo(Map info) throws DAOException { |
| | | logger.debug("查询费用属性信息 入参 info : {}",info); |
| | | |
| | | List<Map> businessFeeAttrInfos = sqlSessionTemplate.selectList("feeAttrServiceDaoImpl.getFeeAttrInfo",info); |
| | | |
| | | return businessFeeAttrInfos; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改费用属性信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void updateFeeAttrInfoInstance(Map info) throws DAOException { |
| | | logger.debug("修改费用属性信息Instance 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("feeAttrServiceDaoImpl.updateFeeAttrInfoInstance",info); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改费用属性信息Instance数据失败:"+ JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询费用属性数量 |
| | | * @param info 费用属性信息 |
| | | * @return 费用属性数量 |
| | | */ |
| | | @Override |
| | | public int queryFeeAttrsCount(Map info) { |
| | | logger.debug("查询费用属性数据 入参 info : {}",info); |
| | | |
| | | List<Map> businessFeeAttrInfos = sqlSessionTemplate.selectList("feeAttrServiceDaoImpl.queryFeeAttrsCount", info); |
| | | if (businessFeeAttrInfos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(businessFeeAttrInfos.get(0).get("count").toString()); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.dao.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.common.constant.ResponseConstant; |
| | | import com.java110.common.exception.DAOException; |
| | | import com.java110.common.util.DateUtil; |
| | | import com.java110.core.base.dao.BaseServiceDao; |
| | | import com.java110.fee.dao.IFeeConfigServiceDao; |
| | | 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("feeConfigServiceDaoImpl") |
| | | //@Transactional |
| | | public class FeeConfigServiceDaoImpl extends BaseServiceDao implements IFeeConfigServiceDao { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(FeeConfigServiceDaoImpl.class); |
| | | |
| | | /** |
| | | * 费用配置信息封装 |
| | | * @param businessFeeConfigInfo 费用配置信息 封装 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void saveBusinessFeeConfigInfo(Map businessFeeConfigInfo) throws DAOException { |
| | | businessFeeConfigInfo.put("month", DateUtil.getCurrentMonth()); |
| | | // 查询business_user 数据是否已经存在 |
| | | logger.debug("保存费用配置信息 入参 businessFeeConfigInfo : {}",businessFeeConfigInfo); |
| | | int saveFlag = sqlSessionTemplate.insert("feeConfigServiceDaoImpl.saveBusinessFeeConfigInfo",businessFeeConfigInfo); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存费用配置数据失败:"+ JSONObject.toJSONString(businessFeeConfigInfo)); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询费用配置信息 |
| | | * @param info bId 信息 |
| | | * @return 费用配置信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public List<Map> getBusinessFeeConfigInfo(Map info) throws DAOException { |
| | | |
| | | logger.debug("查询费用配置信息 入参 info : {}",info); |
| | | |
| | | List<Map> businessFeeConfigInfos = sqlSessionTemplate.selectList("feeConfigServiceDaoImpl.getBusinessFeeConfigInfo",info); |
| | | |
| | | return businessFeeConfigInfos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 保存费用配置信息 到 instance |
| | | * @param info bId 信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void saveFeeConfigInfoInstance(Map info) throws DAOException { |
| | | logger.debug("保存费用配置信息Instance 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("feeConfigServiceDaoImpl.saveFeeConfigInfoInstance",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> getFeeConfigInfo(Map info) throws DAOException { |
| | | logger.debug("查询费用配置信息 入参 info : {}",info); |
| | | |
| | | List<Map> businessFeeConfigInfos = sqlSessionTemplate.selectList("feeConfigServiceDaoImpl.getFeeConfigInfo",info); |
| | | |
| | | return businessFeeConfigInfos; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改费用配置信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void updateFeeConfigInfoInstance(Map info) throws DAOException { |
| | | logger.debug("修改费用配置信息Instance 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("feeConfigServiceDaoImpl.updateFeeConfigInfoInstance",info); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改费用配置信息Instance数据失败:"+ JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询费用配置数量 |
| | | * @param info 费用配置信息 |
| | | * @return 费用配置数量 |
| | | */ |
| | | @Override |
| | | public int queryFeeConfigsCount(Map info) { |
| | | logger.debug("查询费用配置数据 入参 info : {}",info); |
| | | |
| | | List<Map> businessFeeConfigInfos = sqlSessionTemplate.selectList("feeConfigServiceDaoImpl.queryFeeConfigsCount", info); |
| | | if (businessFeeConfigInfos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(businessFeeConfigInfos.get(0).get("count").toString()); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.dao.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.common.constant.ResponseConstant; |
| | | import com.java110.common.exception.DAOException; |
| | | import com.java110.common.util.DateUtil; |
| | | import com.java110.core.base.dao.BaseServiceDao; |
| | | import com.java110.fee.dao.IFeeDetailServiceDao; |
| | | 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("feeDetailServiceDaoImpl") |
| | | //@Transactional |
| | | public class FeeDetailServiceDaoImpl extends BaseServiceDao implements IFeeDetailServiceDao { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(FeeDetailServiceDaoImpl.class); |
| | | |
| | | /** |
| | | * 费用明细信息封装 |
| | | * @param businessFeeDetailInfo 费用明细信息 封装 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void saveBusinessFeeDetailInfo(Map businessFeeDetailInfo) throws DAOException { |
| | | businessFeeDetailInfo.put("month", DateUtil.getCurrentMonth()); |
| | | // 查询business_user 数据是否已经存在 |
| | | logger.debug("保存费用明细信息 入参 businessFeeDetailInfo : {}",businessFeeDetailInfo); |
| | | int saveFlag = sqlSessionTemplate.insert("feeDetailServiceDaoImpl.saveBusinessFeeDetailInfo",businessFeeDetailInfo); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存费用明细数据失败:"+ JSONObject.toJSONString(businessFeeDetailInfo)); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询费用明细信息 |
| | | * @param info bId 信息 |
| | | * @return 费用明细信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public List<Map> getBusinessFeeDetailInfo(Map info) throws DAOException { |
| | | |
| | | logger.debug("查询费用明细信息 入参 info : {}",info); |
| | | |
| | | List<Map> businessFeeDetailInfos = sqlSessionTemplate.selectList("feeDetailServiceDaoImpl.getBusinessFeeDetailInfo",info); |
| | | |
| | | return businessFeeDetailInfos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 保存费用明细信息 到 instance |
| | | * @param info bId 信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void saveFeeDetailInfoInstance(Map info) throws DAOException { |
| | | logger.debug("保存费用明细信息Instance 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("feeDetailServiceDaoImpl.saveFeeDetailInfoInstance",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> getFeeDetailInfo(Map info) throws DAOException { |
| | | logger.debug("查询费用明细信息 入参 info : {}",info); |
| | | |
| | | List<Map> businessFeeDetailInfos = sqlSessionTemplate.selectList("feeDetailServiceDaoImpl.getFeeDetailInfo",info); |
| | | |
| | | return businessFeeDetailInfos; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改费用明细信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void updateFeeDetailInfoInstance(Map info) throws DAOException { |
| | | logger.debug("修改费用明细信息Instance 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("feeDetailServiceDaoImpl.updateFeeDetailInfoInstance",info); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改费用明细信息Instance数据失败:"+ JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询费用明细数量 |
| | | * @param info 费用明细信息 |
| | | * @return 费用明细数量 |
| | | */ |
| | | @Override |
| | | public int queryFeeDetailsCount(Map info) { |
| | | logger.debug("查询费用明细数据 入参 info : {}",info); |
| | | |
| | | List<Map> businessFeeDetailInfos = sqlSessionTemplate.selectList("feeDetailServiceDaoImpl.queryFeeDetailsCount", info); |
| | | if (businessFeeDetailInfos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(businessFeeDetailInfos.get(0).get("count").toString()); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.java110.common.constant.ResponseConstant; |
| | | import com.java110.common.exception.DAOException; |
| | | import com.java110.common.util.DateUtil; |
| | | import com.java110.fee.dao.IFeeServiceDao; |
| | | import com.java110.core.base.dao.BaseServiceDao; |
| | | import com.java110.fee.dao.IFeeServiceDao; |
| | | 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("feeServiceDaoImpl") |
| | |
| | | private static Logger logger = LoggerFactory.getLogger(FeeServiceDaoImpl.class); |
| | | |
| | | /** |
| | | * 小区信息封装 |
| | | * |
| | | * @param businessFeeInfo 小区信息 封装 |
| | | * @throws DAOException |
| | | * 费用信息封装 |
| | | * @param businessFeeInfo 费用信息 封装 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void saveBusinessFeeInfo(Map businessFeeInfo) throws DAOException { |
| | | businessFeeInfo.put("month", DateUtil.getCurrentMonth()); |
| | | // 查询business_user 数据是否已经存在 |
| | | logger.debug("保存小区信息 入参 businessFeeInfo : {}", businessFeeInfo); |
| | | int saveFlag = sqlSessionTemplate.insert("feeServiceDaoImpl.saveBusinessFeeInfo", businessFeeInfo); |
| | | logger.debug("保存费用信息 入参 businessFeeInfo : {}",businessFeeInfo); |
| | | int saveFlag = sqlSessionTemplate.insert("feeServiceDaoImpl.saveBusinessFeeInfo",businessFeeInfo); |
| | | |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存小区数据失败:" + JSONObject.toJSONString(businessFeeInfo)); |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存费用数据失败:"+ JSONObject.toJSONString(businessFeeInfo)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 小区属性信息分装 |
| | | * |
| | | * @param businessFeeAttr 小区属性信息封装 |
| | | * @throws DAOException |
| | | */ |
| | | @Override |
| | | public void saveBusinessFeeAttr(Map businessFeeAttr) throws DAOException { |
| | | businessFeeAttr.put("month", DateUtil.getCurrentMonth()); |
| | | // 查询business_user 数据是否已经存在 |
| | | logger.debug("保存小区属性信息 入参 businessFeeAttr : {}", businessFeeAttr); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("feeServiceDaoImpl.saveBusinessFeeAttr", businessFeeAttr); |
| | | |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存小区属性数据失败:" + JSONObject.toJSONString(businessFeeAttr)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 保存小区照片信息 |
| | | * |
| | | * @param businessFeePhoto 小区照片 |
| | | * @throws DAOException |
| | | */ |
| | | @Override |
| | | public void saveBusinessFeePhoto(Map businessFeePhoto) throws DAOException { |
| | | businessFeePhoto.put("month", DateUtil.getCurrentMonth()); |
| | | logger.debug("保存小区照片信息 入参 businessFeePhoto : {}", businessFeePhoto); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("feeServiceDaoImpl.saveBusinessFeePhoto", businessFeePhoto); |
| | | |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存小区照片数据失败:" + JSONObject.toJSONString(businessFeePhoto)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 保存小区证件信息 |
| | | * |
| | | * @param businessFeeCerdentials 小区证件 |
| | | * @throws DAOException |
| | | */ |
| | | @Override |
| | | public void saveBusinessFeeCerdentials(Map businessFeeCerdentials) throws DAOException { |
| | | businessFeeCerdentials.put("month", DateUtil.getCurrentMonth()); |
| | | logger.debug("保存小区证件信息 入参 businessFeeCerdentials : {}", businessFeeCerdentials); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("feeServiceDaoImpl.saveBusinessFeeCerdentials", businessFeeCerdentials); |
| | | |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存小区证件数据失败:" + JSONObject.toJSONString(businessFeeCerdentials)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询小区信息 |
| | | * |
| | | * 查询费用信息 |
| | | * @param info bId 信息 |
| | | * @return 小区信息 |
| | | * @throws DAOException |
| | | * @return 费用信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public Map getBusinessFeeInfo(Map info) throws DAOException { |
| | | public List<Map> getBusinessFeeInfo(Map info) throws DAOException { |
| | | |
| | | logger.debug("查询小区信息 入参 info : {}", info); |
| | | logger.debug("查询费用信息 入参 info : {}",info); |
| | | |
| | | List<Map> businessFeeInfos = sqlSessionTemplate.selectList("feeServiceDaoImpl.getBusinessFeeInfo", info); |
| | | if (businessFeeInfos == null) { |
| | | return null; |
| | | } |
| | | if (businessFeeInfos.size() > 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "根据条件查询有多条数据,数据异常,请检查:businessFeeInfos," + JSONObject.toJSONString(info)); |
| | | } |
| | | List<Map> businessFeeInfos = sqlSessionTemplate.selectList("feeServiceDaoImpl.getBusinessFeeInfo",info); |
| | | |
| | | return businessFeeInfos.get(0); |
| | | return businessFeeInfos; |
| | | } |
| | | |
| | | /** |
| | | * 查询小区属性 |
| | | * |
| | | * @param info bId 信息 |
| | | * @return 小区属性 |
| | | * @throws DAOException |
| | | */ |
| | | @Override |
| | | public List<Map> getBusinessFeeAttrs(Map info) throws DAOException { |
| | | logger.debug("查询小区属性信息 入参 info : {}", info); |
| | | |
| | | List<Map> businessFeeAttrs = sqlSessionTemplate.selectList("feeServiceDaoImpl.getBusinessFeeAttrs", info); |
| | | |
| | | return businessFeeAttrs; |
| | | } |
| | | |
| | | /** |
| | | * 查询小区照片 |
| | | * |
| | | * @param info bId 信息 |
| | | * @return |
| | | * @throws DAOException |
| | | */ |
| | | @Override |
| | | public List<Map> getBusinessFeePhoto(Map info) throws DAOException { |
| | | logger.debug("查询小区照片信息 入参 info : {}", info); |
| | | |
| | | List<Map> businessFeePhotos = sqlSessionTemplate.selectList("feeServiceDaoImpl.getBusinessFeePhoto", info); |
| | | |
| | | return businessFeePhotos; |
| | | } |
| | | |
| | | /** |
| | | * 查询小区证件 |
| | | * |
| | | * @param info bId 信息 |
| | | * @return |
| | | * @throws DAOException |
| | | */ |
| | | @Override |
| | | public List<Map> getBusinessFeeCerdentials(Map info) throws DAOException { |
| | | logger.debug("查询小区证件信息 入参 info : {}", info); |
| | | |
| | | List<Map> businessFeeCerdentialses = sqlSessionTemplate.selectList("feeServiceDaoImpl.getBusinessFeeCerdentials", info); |
| | | |
| | | return businessFeeCerdentialses; |
| | | } |
| | | |
| | | /** |
| | | * 保存小区信息 到 instance |
| | | * |
| | | * @param info bId 信息 |
| | | * @throws DAOException |
| | | * 保存费用信息 到 instance |
| | | * @param info bId 信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void saveFeeInfoInstance(Map info) throws DAOException { |
| | | logger.debug("保存小区信息Instance 入参 info : {}", info); |
| | | logger.debug("保存费用信息Instance 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("feeServiceDaoImpl.saveFeeInfoInstance", info); |
| | | int saveFlag = sqlSessionTemplate.insert("feeServiceDaoImpl.saveFeeInfoInstance",info); |
| | | |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存小区信息Instance数据失败:" + JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void saveFeeAttrsInstance(Map info) throws DAOException { |
| | | logger.debug("保存小区属性信息Instance 入参 info : {}", info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("feeServiceDaoImpl.saveFeeAttrsInstance", info); |
| | | |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存小区属性信息Instance数据失败:" + JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void saveFeePhotoInstance(Map info) throws DAOException { |
| | | logger.debug("保存小区照片信息Instance 入参 info : {}", info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("feeServiceDaoImpl.saveFeePhotoInstance", info); |
| | | |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存小区照片信息Instance数据失败:" + JSONObject.toJSONString(info)); |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存费用信息Instance数据失败:"+ JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询小区信息(instance) |
| | | * |
| | | * 查询费用信息(instance) |
| | | * @param info bId 信息 |
| | | * @return |
| | | * @throws DAOException |
| | | * @return List<Map> |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public Map getFeeInfo(Map info) throws DAOException { |
| | | logger.debug("查询小区信息 入参 info : {}", info); |
| | | public List<Map> getFeeInfo(Map info) throws DAOException { |
| | | logger.debug("查询费用信息 入参 info : {}",info); |
| | | |
| | | List<Map> businessFeeInfos = sqlSessionTemplate.selectList("feeServiceDaoImpl.getFeeInfo", info); |
| | | if (businessFeeInfos == null || businessFeeInfos.size() == 0) { |
| | | return null; |
| | | } |
| | | if (businessFeeInfos.size() > 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "根据条件查询有多条数据,数据异常,请检查:getFeeInfo," + JSONObject.toJSONString(info)); |
| | | } |
| | | List<Map> businessFeeInfos = sqlSessionTemplate.selectList("feeServiceDaoImpl.getFeeInfo",info); |
| | | |
| | | return businessFeeInfos.get(0); |
| | | } |
| | | |
| | | /** |
| | | * 小区属性查询(instance) |
| | | * |
| | | * @param info bId 信息 |
| | | * @return |
| | | * @throws DAOException |
| | | */ |
| | | @Override |
| | | public List<Map> getFeeAttrs(Map info) throws DAOException { |
| | | logger.debug("查询小区属性信息 入参 info : {}", info); |
| | | |
| | | List<Map> feeAttrs = sqlSessionTemplate.selectList("feeServiceDaoImpl.getFeeAttrs", info); |
| | | |
| | | return feeAttrs; |
| | | } |
| | | |
| | | /** |
| | | * 小区照片查询(instance) |
| | | * |
| | | * @param info bId 信息 |
| | | * @return |
| | | * @throws DAOException |
| | | */ |
| | | @Override |
| | | public List<Map> getFeePhoto(Map info) throws DAOException { |
| | | logger.debug("查询小区照片信息 入参 info : {}", info); |
| | | |
| | | List<Map> feePhotos = sqlSessionTemplate.selectList("feeServiceDaoImpl.getFeePhoto", info); |
| | | |
| | | return feePhotos; |
| | | return businessFeeInfos; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改小区信息 |
| | | * |
| | | * 修改费用信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void updateFeeInfoInstance(Map info) throws DAOException { |
| | | logger.debug("修改小区信息Instance 入参 info : {}", info); |
| | | logger.debug("修改费用信息Instance 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("feeServiceDaoImpl.updateFeeInfoInstance", info); |
| | | int saveFlag = sqlSessionTemplate.update("feeServiceDaoImpl.updateFeeInfoInstance",info); |
| | | |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "修改小区信息Instance数据失败:" + JSONObject.toJSONString(info)); |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改费用信息Instance数据失败:"+ JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 修改小区属性信息(instance) |
| | | * |
| | | * @param info 修改信息 |
| | | * @throws DAOException |
| | | /** |
| | | * 查询费用数量 |
| | | * @param info 费用信息 |
| | | * @return 费用数量 |
| | | */ |
| | | @Override |
| | | public void updateFeeAttrInstance(Map info) throws DAOException { |
| | | logger.debug("修改小区属性信息Instance 入参 info : {}", info); |
| | | public int queryFeesCount(Map info) { |
| | | logger.debug("查询费用数据 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("feeServiceDaoImpl.updateFeeAttrInstance", info); |
| | | |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "修改小区属性信息Instance数据失败:" + JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 修改 小区照片信息 |
| | | * |
| | | * @param info 修改信息 |
| | | * @throws DAOException |
| | | */ |
| | | @Override |
| | | public void updateFeePhotoInstance(Map info) throws DAOException { |
| | | logger.debug("修改小区照片信息Instance 入参 info : {}", info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("feeServiceDaoImpl.updateFeePhotoInstance", info); |
| | | |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "修改小区照片信息Instance数据失败:" + JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 小区成员加入信息 |
| | | * |
| | | * @param businessFeeMember 小区成员信息 封装 |
| | | * @throws DAOException 操作数据库异常 |
| | | */ |
| | | public void saveBusinessFeeMember(Map businessFeeMember) throws DAOException { |
| | | logger.debug("小区成员加入 入参 businessFeeMember : {}", businessFeeMember); |
| | | businessFeeMember.put("month", DateUtil.getCurrentMonth()); |
| | | int saveFlag = sqlSessionTemplate.insert("feeServiceDaoImpl.saveBusinessFeeMember", businessFeeMember); |
| | | |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "小区成员加入失败:" + JSONObject.toJSONString(businessFeeMember)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 成员加入 保存信息至instance |
| | | * |
| | | * @param info |
| | | * @throws DAOException |
| | | */ |
| | | @Override |
| | | public void saveFeeMemberInstance(Map info) throws DAOException { |
| | | logger.debug("小区成员加入Instance 入参 info : {}", info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("feeServiceDaoImpl.saveFeeMemberInstance", info); |
| | | |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存小区照片信息Instance数据失败:" + JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询小区成员加入信息(business过程) |
| | | * 根据bId 查询小区信息 |
| | | * |
| | | * @param info bId 信息 |
| | | * @return 小区信息 |
| | | * @throws DAOException |
| | | */ |
| | | public Map getBusinessFeeMember(Map info) throws DAOException { |
| | | logger.debug("查询小区成员加入信息 入参 info : {}", info); |
| | | |
| | | List<Map> businessFeeMembers = sqlSessionTemplate.selectList("feeServiceDaoImpl.getBusinessFeeMember", info); |
| | | if (businessFeeMembers == null || businessFeeMembers.size() == 0) { |
| | | return null; |
| | | } |
| | | if (businessFeeMembers.size() > 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "根据条件查询有多条数据,数据异常,请检查:businessFeeMember," + JSONObject.toJSONString(info)); |
| | | } |
| | | |
| | | return businessFeeMembers.get(0); |
| | | } |
| | | |
| | | /** |
| | | * 查询小区成员加入信息(instance过程) |
| | | * 根据bId 查询小区信息 |
| | | * |
| | | * @param info bId 信息 |
| | | * @return 小区信息 |
| | | * @throws DAOException |
| | | */ |
| | | public Map getFeeMember(Map info) throws DAOException { |
| | | logger.debug("查询小区成员加入信息 入参 info : {}", info); |
| | | |
| | | List<Map> memberFees = sqlSessionTemplate.selectList("feeServiceDaoImpl.getFeeMember", info); |
| | | if (memberFees == null || memberFees.size() == 0) { |
| | | return null; |
| | | } |
| | | if (memberFees.size() > 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "根据条件查询有多条数据,数据异常,请检查:getFeeMember," + JSONObject.toJSONString(info)); |
| | | } |
| | | |
| | | return memberFees.get(0); |
| | | } |
| | | |
| | | /** |
| | | * 修改小区成员加入信息 |
| | | * |
| | | * @param info 修改信息 |
| | | * @throws DAOException |
| | | */ |
| | | public void updateFeeMemberInstance(Map info) throws DAOException { |
| | | logger.debug("修改小区成员加入信息Instance 入参 info : {}", info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("feeServiceDaoImpl.updateFeeMemberInstance", info); |
| | | |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "修改小区成员加入信息Instance数据失败:" + JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @param info bId 信息 |
| | | * @return |
| | | * @throws DAOException |
| | | */ |
| | | @Override |
| | | public List<Map> getFeeMembers(Map info) throws DAOException { |
| | | logger.debug("查询小区成员加入信息 入参 info : {}", info); |
| | | |
| | | List<Map> memberFees = sqlSessionTemplate.selectList("feeServiceDaoImpl.getFeeMember", info); |
| | | |
| | | return memberFees; |
| | | } |
| | | |
| | | @Override |
| | | public int getFeeMemberCount(Map info) { |
| | | logger.debug("查询小区成员加入信息 入参 info : {}", info); |
| | | |
| | | List<Map> memberFees = sqlSessionTemplate.selectList("feeServiceDaoImpl.getFeeMemberCount", info); |
| | | |
| | | if (memberFees.size() < 1) { |
| | | List<Map> businessFeeInfos = sqlSessionTemplate.selectList("feeServiceDaoImpl.queryFeesCount", info); |
| | | if (businessFeeInfos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(memberFees.get(0).get("count").toString()); |
| | | return Integer.parseInt(businessFeeInfos.get(0).get("count").toString()); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.listener.attrs; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.common.constant.ResponseConstant; |
| | | import com.java110.common.constant.StatusConstant; |
| | | import com.java110.common.exception.ListenerExecuteException; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.entity.center.Business; |
| | | import com.java110.event.service.AbstractBusinessServiceDataFlowListener; |
| | | import com.java110.fee.dao.IFeeAttrServiceDao; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * |
| | | * 费用属性 服务侦听 父类 |
| | | * Created by wuxw on 2018/7/4. |
| | | */ |
| | | public abstract class AbstractFeeAttrBusinessServiceDataFlowListener extends AbstractBusinessServiceDataFlowListener{ |
| | | private static Logger logger = LoggerFactory.getLogger(AbstractFeeAttrBusinessServiceDataFlowListener.class); |
| | | |
| | | |
| | | /** |
| | | * 获取 DAO工具类 |
| | | * @return |
| | | */ |
| | | public abstract IFeeAttrServiceDao getFeeAttrServiceDaoImpl(); |
| | | |
| | | /** |
| | | * 刷新 businessFeeAttrInfo 数据 |
| | | * 主要将 数据库 中字段和 接口传递字段建立关系 |
| | | * @param businessFeeAttrInfo |
| | | */ |
| | | protected void flushBusinessFeeAttrInfo(Map businessFeeAttrInfo,String statusCd){ |
| | | businessFeeAttrInfo.put("newBId", businessFeeAttrInfo.get("b_id")); |
| | | businessFeeAttrInfo.put("attrId",businessFeeAttrInfo.get("attr_id")); |
| | | businessFeeAttrInfo.put("operate",businessFeeAttrInfo.get("operate")); |
| | | businessFeeAttrInfo.put("specCd",businessFeeAttrInfo.get("spec_cd")); |
| | | businessFeeAttrInfo.put("communityId",businessFeeAttrInfo.get("community_id")); |
| | | businessFeeAttrInfo.put("feeId",businessFeeAttrInfo.get("fee_id")); |
| | | businessFeeAttrInfo.put("value",businessFeeAttrInfo.get("value")); |
| | | businessFeeAttrInfo.remove("bId"); |
| | | businessFeeAttrInfo.put("statusCd", statusCd); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 当修改数据时,查询instance表中的数据 自动保存删除数据到business中 |
| | | * @param businessFeeAttr 费用属性信息 |
| | | */ |
| | | protected void autoSaveDelBusinessFeeAttr(Business business, JSONObject businessFeeAttr){ |
| | | //自动插入DEL |
| | | Map info = new HashMap(); |
| | | info.put("attrId",businessFeeAttr.getString("attrId")); |
| | | info.put("statusCd",StatusConstant.STATUS_CD_VALID); |
| | | List<Map> currentFeeAttrInfos = getFeeAttrServiceDaoImpl().getFeeAttrInfo(info); |
| | | if(currentFeeAttrInfos == null || currentFeeAttrInfos.size() != 1){ |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"未找到需要修改数据信息,入参错误或数据有问题,请检查"+info); |
| | | } |
| | | |
| | | Map currentFeeAttrInfo = currentFeeAttrInfos.get(0); |
| | | |
| | | currentFeeAttrInfo.put("bId",business.getbId()); |
| | | |
| | | currentFeeAttrInfo.put("attrId",currentFeeAttrInfo.get("attr_id")); |
| | | currentFeeAttrInfo.put("operate",currentFeeAttrInfo.get("operate")); |
| | | currentFeeAttrInfo.put("specCd",currentFeeAttrInfo.get("spec_cd")); |
| | | currentFeeAttrInfo.put("communityId",currentFeeAttrInfo.get("community_id")); |
| | | currentFeeAttrInfo.put("feeId",currentFeeAttrInfo.get("fee_id")); |
| | | currentFeeAttrInfo.put("value",currentFeeAttrInfo.get("value")); |
| | | |
| | | |
| | | currentFeeAttrInfo.put("operate",StatusConstant.OPERATE_DEL); |
| | | getFeeAttrServiceDaoImpl().saveBusinessFeeAttrInfo(currentFeeAttrInfo); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.listener.attrs; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.common.constant.BusinessTypeConstant; |
| | | import com.java110.common.constant.ResponseConstant; |
| | | import com.java110.common.constant.StatusConstant; |
| | | import com.java110.common.exception.ListenerExecuteException; |
| | | import com.java110.common.util.Assert; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.entity.center.Business; |
| | | import com.java110.fee.dao.IFeeAttrServiceDao; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 删除费用属性信息 侦听 |
| | | * |
| | | * 处理节点 |
| | | * 1、businessFeeAttr:{} 费用属性基本信息节点 |
| | | * 2、businessFeeAttrAttr:[{}] 费用属性属性信息节点 |
| | | * 3、businessFeeAttrPhoto:[{}] 费用属性照片信息节点 |
| | | * 4、businessFeeAttrCerdentials:[{}] 费用属性证件信息节点 |
| | | * 协议地址 :https://github.com/java110/MicroCommunity/wiki/%E5%88%A0%E9%99%A4%E5%95%86%E6%88%B7%E4%BF%A1%E6%81%AF-%E5%8D%8F%E8%AE%AE |
| | | * Created by wuxw on 2018/5/18. |
| | | */ |
| | | @Java110Listener("deleteFeeAttrInfoListener") |
| | | @Transactional |
| | | public class DeleteFeeAttrInfoListener extends AbstractFeeAttrBusinessServiceDataFlowListener { |
| | | |
| | | private final static Logger logger = LoggerFactory.getLogger(DeleteFeeAttrInfoListener.class); |
| | | @Autowired |
| | | IFeeAttrServiceDao feeAttrServiceDaoImpl; |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return 4; |
| | | } |
| | | |
| | | @Override |
| | | public String getBusinessTypeCd() { |
| | | return BusinessTypeConstant.BUSINESS_TYPE_DELETE_FEE_INFO; |
| | | } |
| | | |
| | | /** |
| | | * 根据删除信息 查出Instance表中数据 保存至business表 (状态写DEL) 方便撤单时直接更新回去 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) { |
| | | JSONObject data = business.getDatas(); |
| | | |
| | | Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理"); |
| | | |
| | | //处理 businessFeeAttr 节点 |
| | | if(data.containsKey("businessFeeAttr")){ |
| | | //处理 businessFeeAttr 节点 |
| | | if(data.containsKey("businessFeeAttr")){ |
| | | Object _obj = data.get("businessFeeAttr"); |
| | | JSONArray businessFeeAttrs = null; |
| | | if(_obj instanceof JSONObject){ |
| | | businessFeeAttrs = new JSONArray(); |
| | | businessFeeAttrs.add(_obj); |
| | | }else { |
| | | businessFeeAttrs = (JSONArray)_obj; |
| | | } |
| | | //JSONObject businessFeeAttr = data.getJSONObject("businessFeeAttr"); |
| | | for (int _feeAttrIndex = 0; _feeAttrIndex < businessFeeAttrs.size();_feeAttrIndex++) { |
| | | JSONObject businessFeeAttr = businessFeeAttrs.getJSONObject(_feeAttrIndex); |
| | | doBusinessFeeAttr(business, businessFeeAttr); |
| | | if(_obj instanceof JSONObject) { |
| | | dataFlowContext.addParamOut("feeAttrId", businessFeeAttr.getString("feeAttrId")); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 删除 instance数据 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) { |
| | | String bId = business.getbId(); |
| | | //Assert.hasLength(bId,"请求报文中没有包含 bId"); |
| | | |
| | | //费用属性信息 |
| | | Map info = new HashMap(); |
| | | info.put("bId",business.getbId()); |
| | | info.put("operate",StatusConstant.OPERATE_DEL); |
| | | |
| | | //费用属性信息 |
| | | List<Map> businessFeeAttrInfos = feeAttrServiceDaoImpl.getBusinessFeeAttrInfo(info); |
| | | if( businessFeeAttrInfos != null && businessFeeAttrInfos.size() >0) { |
| | | for (int _feeAttrIndex = 0; _feeAttrIndex < businessFeeAttrInfos.size();_feeAttrIndex++) { |
| | | Map businessFeeAttrInfo = businessFeeAttrInfos.get(_feeAttrIndex); |
| | | flushBusinessFeeAttrInfo(businessFeeAttrInfo,StatusConstant.STATUS_CD_INVALID); |
| | | feeAttrServiceDaoImpl.updateFeeAttrInfoInstance(businessFeeAttrInfo); |
| | | dataFlowContext.addParamOut("feeAttrId",businessFeeAttrInfo.get("feeAttr_id")); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 撤单 |
| | | * 从business表中查询到DEL的数据 将instance中的数据更新回来 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doRecover(DataFlowContext dataFlowContext, Business business) { |
| | | String bId = business.getbId(); |
| | | //Assert.hasLength(bId,"请求报文中没有包含 bId"); |
| | | Map info = new HashMap(); |
| | | info.put("bId",bId); |
| | | info.put("statusCd",StatusConstant.STATUS_CD_INVALID); |
| | | |
| | | Map delInfo = new HashMap(); |
| | | delInfo.put("bId",business.getbId()); |
| | | delInfo.put("operate",StatusConstant.OPERATE_DEL); |
| | | //费用属性信息 |
| | | List<Map> feeAttrInfo = feeAttrServiceDaoImpl.getFeeAttrInfo(info); |
| | | if(feeAttrInfo != null && feeAttrInfo.size() > 0){ |
| | | |
| | | //费用属性信息 |
| | | List<Map> businessFeeAttrInfos = feeAttrServiceDaoImpl.getBusinessFeeAttrInfo(delInfo); |
| | | //除非程序出错了,这里不会为空 |
| | | if(businessFeeAttrInfos == null || businessFeeAttrInfos.size() == 0){ |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(feeAttr),程序内部异常,请检查! "+delInfo); |
| | | } |
| | | for (int _feeAttrIndex = 0; _feeAttrIndex < businessFeeAttrInfos.size();_feeAttrIndex++) { |
| | | Map businessFeeAttrInfo = businessFeeAttrInfos.get(_feeAttrIndex); |
| | | flushBusinessFeeAttrInfo(businessFeeAttrInfo,StatusConstant.STATUS_CD_VALID); |
| | | feeAttrServiceDaoImpl.updateFeeAttrInfoInstance(businessFeeAttrInfo); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 处理 businessFeeAttr 节点 |
| | | * @param business 总的数据节点 |
| | | * @param businessFeeAttr 费用属性节点 |
| | | */ |
| | | private void doBusinessFeeAttr(Business business,JSONObject businessFeeAttr){ |
| | | |
| | | Assert.jsonObjectHaveKey(businessFeeAttr,"feeAttrId","businessFeeAttr 节点下没有包含 feeAttrId 节点"); |
| | | |
| | | if(businessFeeAttr.getString("feeAttrId").startsWith("-")){ |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"feeAttrId 错误,不能自动生成(必须已经存在的feeAttrId)"+businessFeeAttr); |
| | | } |
| | | //自动插入DEL |
| | | autoSaveDelBusinessFeeAttr(business,businessFeeAttr); |
| | | } |
| | | |
| | | public IFeeAttrServiceDao getFeeAttrServiceDaoImpl() { |
| | | return feeAttrServiceDaoImpl; |
| | | } |
| | | |
| | | public void setFeeAttrServiceDaoImpl(IFeeAttrServiceDao feeAttrServiceDaoImpl) { |
| | | this.feeAttrServiceDaoImpl = feeAttrServiceDaoImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.fee.listener.attrs; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.common.constant.BusinessTypeConstant; |
| | | import com.java110.common.constant.StatusConstant; |
| | | import com.java110.common.util.Assert; |
| | | import com.java110.fee.dao.IFeeAttrServiceDao; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.entity.center.Business; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 保存 费用属性信息 侦听 |
| | | * Created by wuxw on 2018/5/18. |
| | | */ |
| | | @Java110Listener("saveFeeAttrInfoListener") |
| | | @Transactional |
| | | public class SaveFeeAttrInfoListener extends AbstractFeeAttrBusinessServiceDataFlowListener{ |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(SaveFeeAttrInfoListener.class); |
| | | |
| | | @Autowired |
| | | private IFeeAttrServiceDao feeAttrServiceDaoImpl; |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return 1; |
| | | } |
| | | |
| | | @Override |
| | | public String getBusinessTypeCd() { |
| | | return BusinessTypeConstant.BUSINESS_TYPE_SAVE_FEE_INFO; |
| | | } |
| | | |
| | | /** |
| | | * 保存费用属性信息 business 表中 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) { |
| | | JSONObject data = business.getDatas(); |
| | | Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理"); |
| | | |
| | | //处理 businessFeeAttr 节点 |
| | | if(data.containsKey("businessFeeAttr")){ |
| | | Object bObj = data.get("businessFeeAttr"); |
| | | JSONArray businessFeeAttrs = null; |
| | | if(bObj instanceof JSONObject){ |
| | | businessFeeAttrs = new JSONArray(); |
| | | businessFeeAttrs.add(bObj); |
| | | }else { |
| | | businessFeeAttrs = (JSONArray)bObj; |
| | | } |
| | | //JSONObject businessFeeAttr = data.getJSONObject("businessFeeAttr"); |
| | | for (int bFeeAttrIndex = 0; bFeeAttrIndex < businessFeeAttrs.size();bFeeAttrIndex++) { |
| | | JSONObject businessFeeAttr = businessFeeAttrs.getJSONObject(bFeeAttrIndex); |
| | | doBusinessFeeAttr(business, businessFeeAttr); |
| | | if(bObj instanceof JSONObject) { |
| | | dataFlowContext.addParamOut("attrId", businessFeeAttr.getString("attrId")); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * business 数据转移到 instance |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) { |
| | | JSONObject data = business.getDatas(); |
| | | |
| | | Map info = new HashMap(); |
| | | info.put("bId",business.getbId()); |
| | | info.put("operate",StatusConstant.OPERATE_ADD); |
| | | |
| | | //费用属性信息 |
| | | List<Map> businessFeeAttrInfo = feeAttrServiceDaoImpl.getBusinessFeeAttrInfo(info); |
| | | if( businessFeeAttrInfo != null && businessFeeAttrInfo.size() >0) { |
| | | reFreshShareColumn(info, businessFeeAttrInfo.get(0)); |
| | | feeAttrServiceDaoImpl.saveFeeAttrInfoInstance(info); |
| | | if(businessFeeAttrInfo.size() == 1) { |
| | | dataFlowContext.addParamOut("attrId", businessFeeAttrInfo.get(0).get("attr_id")); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 刷 分片字段 |
| | | * |
| | | * @param info 查询对象 |
| | | * @param businessInfo 小区ID |
| | | */ |
| | | private void reFreshShareColumn(Map info, Map businessInfo) { |
| | | |
| | | if (info.containsKey("communityId")) { |
| | | return; |
| | | } |
| | | |
| | | if (!businessInfo.containsKey("community_id")) { |
| | | return; |
| | | } |
| | | |
| | | info.put("communityId", businessInfo.get("community_id")); |
| | | } |
| | | /** |
| | | * 撤单 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doRecover(DataFlowContext dataFlowContext, Business business) { |
| | | String bId = business.getbId(); |
| | | //Assert.hasLength(bId,"请求报文中没有包含 bId"); |
| | | Map info = new HashMap(); |
| | | info.put("bId",bId); |
| | | info.put("statusCd",StatusConstant.STATUS_CD_VALID); |
| | | Map paramIn = new HashMap(); |
| | | paramIn.put("bId",bId); |
| | | paramIn.put("statusCd",StatusConstant.STATUS_CD_INVALID); |
| | | //费用属性信息 |
| | | List<Map> feeAttrInfo = feeAttrServiceDaoImpl.getFeeAttrInfo(info); |
| | | if(feeAttrInfo != null && feeAttrInfo.size() > 0){ |
| | | reFreshShareColumn(paramIn, feeAttrInfo.get(0)); |
| | | feeAttrServiceDaoImpl.updateFeeAttrInfoInstance(paramIn); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 处理 businessFeeAttr 节点 |
| | | * @param business 总的数据节点 |
| | | * @param businessFeeAttr 费用属性节点 |
| | | */ |
| | | private void doBusinessFeeAttr(Business business,JSONObject businessFeeAttr){ |
| | | |
| | | Assert.jsonObjectHaveKey(businessFeeAttr,"attrId","businessFeeAttr 节点下没有包含 attrId 节点"); |
| | | |
| | | if(businessFeeAttr.getString("attrId").startsWith("-")){ |
| | | //刷新缓存 |
| | | //flushFeeAttrId(business.getDatas()); |
| | | |
| | | businessFeeAttr.put("attrId",GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_attrId)); |
| | | |
| | | } |
| | | |
| | | businessFeeAttr.put("bId",business.getbId()); |
| | | businessFeeAttr.put("operate", StatusConstant.OPERATE_ADD); |
| | | //保存费用属性信息 |
| | | feeAttrServiceDaoImpl.saveBusinessFeeAttrInfo(businessFeeAttr); |
| | | |
| | | } |
| | | |
| | | public IFeeAttrServiceDao getFeeAttrServiceDaoImpl() { |
| | | return feeAttrServiceDaoImpl; |
| | | } |
| | | |
| | | public void setFeeAttrServiceDaoImpl(IFeeAttrServiceDao feeAttrServiceDaoImpl) { |
| | | this.feeAttrServiceDaoImpl = feeAttrServiceDaoImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.fee.listener.attrs; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.common.constant.BusinessTypeConstant; |
| | | import com.java110.common.constant.ResponseConstant; |
| | | import com.java110.common.constant.StatusConstant; |
| | | import com.java110.common.exception.ListenerExecuteException; |
| | | import com.java110.common.util.Assert; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.entity.center.Business; |
| | | import com.java110.fee.dao.IFeeAttrServiceDao; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 修改费用属性信息 侦听 |
| | | * |
| | | * 处理节点 |
| | | * 1、businessFeeAttr:{} 费用属性基本信息节点 |
| | | * 2、businessFeeAttrAttr:[{}] 费用属性属性信息节点 |
| | | * 3、businessFeeAttrPhoto:[{}] 费用属性照片信息节点 |
| | | * 4、businessFeeAttrCerdentials:[{}] 费用属性证件信息节点 |
| | | * 协议地址 :https://github.com/java110/MicroCommunity/wiki/%E4%BF%AE%E6%94%B9%E5%95%86%E6%88%B7%E4%BF%A1%E6%81%AF-%E5%8D%8F%E8%AE%AE |
| | | * Created by wuxw on 2018/5/18. |
| | | */ |
| | | @Java110Listener("updateFeeAttrInfoListener") |
| | | @Transactional |
| | | public class UpdateFeeAttrInfoListener extends AbstractFeeAttrBusinessServiceDataFlowListener { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(UpdateFeeAttrInfoListener.class); |
| | | @Autowired |
| | | private IFeeAttrServiceDao feeAttrServiceDaoImpl; |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return 3; |
| | | } |
| | | |
| | | @Override |
| | | public String getBusinessTypeCd() { |
| | | return BusinessTypeConstant.BUSINESS_TYPE_UPDATE_FEE_INFO; |
| | | } |
| | | |
| | | /** |
| | | * business过程 |
| | | * @param dataFlowContext 上下文对象 |
| | | * @param business 业务对象 |
| | | */ |
| | | @Override |
| | | protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) { |
| | | |
| | | JSONObject data = business.getDatas(); |
| | | |
| | | Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理"); |
| | | |
| | | //处理 businessFeeAttr 节点 |
| | | if(data.containsKey("businessFeeAttr")){ |
| | | //处理 businessFeeAttr 节点 |
| | | if(data.containsKey("businessFeeAttr")){ |
| | | Object _obj = data.get("businessFeeAttr"); |
| | | JSONArray businessFeeAttrs = null; |
| | | if(_obj instanceof JSONObject){ |
| | | businessFeeAttrs = new JSONArray(); |
| | | businessFeeAttrs.add(_obj); |
| | | }else { |
| | | businessFeeAttrs = (JSONArray)_obj; |
| | | } |
| | | //JSONObject businessFeeAttr = data.getJSONObject("businessFeeAttr"); |
| | | for (int _feeAttrIndex = 0; _feeAttrIndex < businessFeeAttrs.size();_feeAttrIndex++) { |
| | | JSONObject businessFeeAttr = businessFeeAttrs.getJSONObject(_feeAttrIndex); |
| | | doBusinessFeeAttr(business, businessFeeAttr); |
| | | if(_obj instanceof JSONObject) { |
| | | dataFlowContext.addParamOut("feeAttrId", businessFeeAttr.getString("feeAttrId")); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * business to instance 过程 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) { |
| | | |
| | | JSONObject data = business.getDatas(); |
| | | |
| | | Map info = new HashMap(); |
| | | info.put("bId",business.getbId()); |
| | | info.put("operate",StatusConstant.OPERATE_ADD); |
| | | |
| | | //费用属性信息 |
| | | List<Map> businessFeeAttrInfos = feeAttrServiceDaoImpl.getBusinessFeeAttrInfo(info); |
| | | if( businessFeeAttrInfos != null && businessFeeAttrInfos.size() >0) { |
| | | for (int _feeAttrIndex = 0; _feeAttrIndex < businessFeeAttrInfos.size();_feeAttrIndex++) { |
| | | Map businessFeeAttrInfo = businessFeeAttrInfos.get(_feeAttrIndex); |
| | | flushBusinessFeeAttrInfo(businessFeeAttrInfo,StatusConstant.STATUS_CD_VALID); |
| | | feeAttrServiceDaoImpl.updateFeeAttrInfoInstance(businessFeeAttrInfo); |
| | | if(businessFeeAttrInfo.size() == 1) { |
| | | dataFlowContext.addParamOut("feeAttrId", businessFeeAttrInfo.get("feeAttr_id")); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 撤单 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doRecover(DataFlowContext dataFlowContext, Business business) { |
| | | |
| | | String bId = business.getbId(); |
| | | //Assert.hasLength(bId,"请求报文中没有包含 bId"); |
| | | Map info = new HashMap(); |
| | | info.put("bId",bId); |
| | | info.put("statusCd",StatusConstant.STATUS_CD_VALID); |
| | | Map delInfo = new HashMap(); |
| | | delInfo.put("bId",business.getbId()); |
| | | delInfo.put("operate",StatusConstant.OPERATE_DEL); |
| | | //费用属性信息 |
| | | List<Map> feeAttrInfo = feeAttrServiceDaoImpl.getFeeAttrInfo(info); |
| | | if(feeAttrInfo != null && feeAttrInfo.size() > 0){ |
| | | |
| | | //费用属性信息 |
| | | List<Map> businessFeeAttrInfos = feeAttrServiceDaoImpl.getBusinessFeeAttrInfo(delInfo); |
| | | //除非程序出错了,这里不会为空 |
| | | if(businessFeeAttrInfos == null || businessFeeAttrInfos.size() == 0){ |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(feeAttr),程序内部异常,请检查! "+delInfo); |
| | | } |
| | | for (int _feeAttrIndex = 0; _feeAttrIndex < businessFeeAttrInfos.size();_feeAttrIndex++) { |
| | | Map businessFeeAttrInfo = businessFeeAttrInfos.get(_feeAttrIndex); |
| | | flushBusinessFeeAttrInfo(businessFeeAttrInfo,StatusConstant.STATUS_CD_VALID); |
| | | feeAttrServiceDaoImpl.updateFeeAttrInfoInstance(businessFeeAttrInfo); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 处理 businessFeeAttr 节点 |
| | | * @param business 总的数据节点 |
| | | * @param businessFeeAttr 费用属性节点 |
| | | */ |
| | | private void doBusinessFeeAttr(Business business,JSONObject businessFeeAttr){ |
| | | |
| | | Assert.jsonObjectHaveKey(businessFeeAttr,"feeAttrId","businessFeeAttr 节点下没有包含 feeAttrId 节点"); |
| | | |
| | | if(businessFeeAttr.getString("feeAttrId").startsWith("-")){ |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"feeAttrId 错误,不能自动生成(必须已经存在的feeAttrId)"+businessFeeAttr); |
| | | } |
| | | //自动保存DEL |
| | | autoSaveDelBusinessFeeAttr(business,businessFeeAttr); |
| | | |
| | | businessFeeAttr.put("bId",business.getbId()); |
| | | businessFeeAttr.put("operate", StatusConstant.OPERATE_ADD); |
| | | //保存费用属性信息 |
| | | feeAttrServiceDaoImpl.saveBusinessFeeAttrInfo(businessFeeAttr); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | public IFeeAttrServiceDao getFeeAttrServiceDaoImpl() { |
| | | return feeAttrServiceDaoImpl; |
| | | } |
| | | |
| | | public void setFeeAttrServiceDaoImpl(IFeeAttrServiceDao feeAttrServiceDaoImpl) { |
| | | this.feeAttrServiceDaoImpl = feeAttrServiceDaoImpl; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.listener.config; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.common.constant.ResponseConstant; |
| | | import com.java110.common.constant.StatusConstant; |
| | | import com.java110.common.exception.ListenerExecuteException; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.entity.center.Business; |
| | | import com.java110.event.service.AbstractBusinessServiceDataFlowListener; |
| | | import com.java110.fee.dao.IFeeConfigServiceDao; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * |
| | | * 费用配置 服务侦听 父类 |
| | | * Created by wuxw on 2018/7/4. |
| | | */ |
| | | public abstract class AbstractFeeConfigBusinessServiceDataFlowListener extends AbstractBusinessServiceDataFlowListener{ |
| | | private static Logger logger = LoggerFactory.getLogger(AbstractFeeConfigBusinessServiceDataFlowListener.class); |
| | | |
| | | |
| | | /** |
| | | * 获取 DAO工具类 |
| | | * @return |
| | | */ |
| | | public abstract IFeeConfigServiceDao getFeeConfigServiceDaoImpl(); |
| | | |
| | | /** |
| | | * 刷新 businessFeeConfigInfo 数据 |
| | | * 主要将 数据库 中字段和 接口传递字段建立关系 |
| | | * @param businessFeeConfigInfo |
| | | */ |
| | | protected void flushBusinessFeeConfigInfo(Map businessFeeConfigInfo,String statusCd){ |
| | | businessFeeConfigInfo.put("newBId", businessFeeConfigInfo.get("b_id")); |
| | | businessFeeConfigInfo.put("squarePrice",businessFeeConfigInfo.get("square_price")); |
| | | businessFeeConfigInfo.put("operate",businessFeeConfigInfo.get("operate")); |
| | | businessFeeConfigInfo.put("feeTypeCd",businessFeeConfigInfo.get("fee_type_cd")); |
| | | businessFeeConfigInfo.put("configId",businessFeeConfigInfo.get("config_id")); |
| | | businessFeeConfigInfo.put("additionalAmount",businessFeeConfigInfo.get("additional_amount")); |
| | | businessFeeConfigInfo.put("startTime",businessFeeConfigInfo.get("start_time")); |
| | | businessFeeConfigInfo.put("communityId",businessFeeConfigInfo.get("community_id")); |
| | | businessFeeConfigInfo.remove("bId"); |
| | | businessFeeConfigInfo.put("statusCd", statusCd); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 当修改数据时,查询instance表中的数据 自动保存删除数据到business中 |
| | | * @param businessFeeConfig 费用配置信息 |
| | | */ |
| | | protected void autoSaveDelBusinessFeeConfig(Business business, JSONObject businessFeeConfig){ |
| | | //自动插入DEL |
| | | Map info = new HashMap(); |
| | | info.put("configId",businessFeeConfig.getString("configId")); |
| | | info.put("statusCd",StatusConstant.STATUS_CD_VALID); |
| | | List<Map> currentFeeConfigInfos = getFeeConfigServiceDaoImpl().getFeeConfigInfo(info); |
| | | if(currentFeeConfigInfos == null || currentFeeConfigInfos.size() != 1){ |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"未找到需要修改数据信息,入参错误或数据有问题,请检查"+info); |
| | | } |
| | | |
| | | Map currentFeeConfigInfo = currentFeeConfigInfos.get(0); |
| | | |
| | | currentFeeConfigInfo.put("bId",business.getbId()); |
| | | |
| | | currentFeeConfigInfo.put("squarePrice",currentFeeConfigInfo.get("square_price")); |
| | | currentFeeConfigInfo.put("operate",currentFeeConfigInfo.get("operate")); |
| | | currentFeeConfigInfo.put("feeTypeCd",currentFeeConfigInfo.get("fee_type_cd")); |
| | | currentFeeConfigInfo.put("configId",currentFeeConfigInfo.get("config_id")); |
| | | currentFeeConfigInfo.put("additionalAmount",currentFeeConfigInfo.get("additional_amount")); |
| | | currentFeeConfigInfo.put("startTime",currentFeeConfigInfo.get("start_time")); |
| | | currentFeeConfigInfo.put("communityId",currentFeeConfigInfo.get("community_id")); |
| | | |
| | | |
| | | currentFeeConfigInfo.put("operate",StatusConstant.OPERATE_DEL); |
| | | getFeeConfigServiceDaoImpl().saveBusinessFeeConfigInfo(currentFeeConfigInfo); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.listener.config; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.common.constant.BusinessTypeConstant; |
| | | import com.java110.common.constant.ResponseConstant; |
| | | import com.java110.common.constant.StatusConstant; |
| | | import com.java110.common.exception.ListenerExecuteException; |
| | | import com.java110.common.util.Assert; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.entity.center.Business; |
| | | import com.java110.fee.dao.IFeeConfigServiceDao; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 删除费用配置信息 侦听 |
| | | * |
| | | * 处理节点 |
| | | * 1、businessFeeConfig:{} 费用配置基本信息节点 |
| | | * 2、businessFeeConfigAttr:[{}] 费用配置属性信息节点 |
| | | * 3、businessFeeConfigPhoto:[{}] 费用配置照片信息节点 |
| | | * 4、businessFeeConfigCerdentials:[{}] 费用配置证件信息节点 |
| | | * 协议地址 :https://github.com/java110/MicroCommunity/wiki/%E5%88%A0%E9%99%A4%E5%95%86%E6%88%B7%E4%BF%A1%E6%81%AF-%E5%8D%8F%E8%AE%AE |
| | | * Created by wuxw on 2018/5/18. |
| | | */ |
| | | @Java110Listener("deleteFeeConfigInfoListener") |
| | | @Transactional |
| | | public class DeleteFeeConfigInfoListener extends AbstractFeeConfigBusinessServiceDataFlowListener { |
| | | |
| | | private final static Logger logger = LoggerFactory.getLogger(DeleteFeeConfigInfoListener.class); |
| | | @Autowired |
| | | IFeeConfigServiceDao feeConfigServiceDaoImpl; |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return 3; |
| | | } |
| | | |
| | | @Override |
| | | public String getBusinessTypeCd() { |
| | | return BusinessTypeConstant.BUSINESS_TYPE_DELETE_FEE_CONFIG; |
| | | } |
| | | |
| | | /** |
| | | * 根据删除信息 查出Instance表中数据 保存至business表 (状态写DEL) 方便撤单时直接更新回去 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) { |
| | | JSONObject data = business.getDatas(); |
| | | |
| | | Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理"); |
| | | |
| | | //处理 businessFeeConfig 节点 |
| | | if(data.containsKey("businessFeeConfig")){ |
| | | //处理 businessFeeConfig 节点 |
| | | if(data.containsKey("businessFeeConfig")){ |
| | | Object _obj = data.get("businessFeeConfig"); |
| | | JSONArray businessFeeConfigs = null; |
| | | if(_obj instanceof JSONObject){ |
| | | businessFeeConfigs = new JSONArray(); |
| | | businessFeeConfigs.add(_obj); |
| | | }else { |
| | | businessFeeConfigs = (JSONArray)_obj; |
| | | } |
| | | //JSONObject businessFeeConfig = data.getJSONObject("businessFeeConfig"); |
| | | for (int _feeConfigIndex = 0; _feeConfigIndex < businessFeeConfigs.size();_feeConfigIndex++) { |
| | | JSONObject businessFeeConfig = businessFeeConfigs.getJSONObject(_feeConfigIndex); |
| | | doBusinessFeeConfig(business, businessFeeConfig); |
| | | if(_obj instanceof JSONObject) { |
| | | dataFlowContext.addParamOut("feeConfigId", businessFeeConfig.getString("feeConfigId")); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 删除 instance数据 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) { |
| | | String bId = business.getbId(); |
| | | //Assert.hasLength(bId,"请求报文中没有包含 bId"); |
| | | |
| | | //费用配置信息 |
| | | Map info = new HashMap(); |
| | | info.put("bId",business.getbId()); |
| | | info.put("operate",StatusConstant.OPERATE_DEL); |
| | | |
| | | //费用配置信息 |
| | | List<Map> businessFeeConfigInfos = feeConfigServiceDaoImpl.getBusinessFeeConfigInfo(info); |
| | | if( businessFeeConfigInfos != null && businessFeeConfigInfos.size() >0) { |
| | | for (int _feeConfigIndex = 0; _feeConfigIndex < businessFeeConfigInfos.size();_feeConfigIndex++) { |
| | | Map businessFeeConfigInfo = businessFeeConfigInfos.get(_feeConfigIndex); |
| | | flushBusinessFeeConfigInfo(businessFeeConfigInfo,StatusConstant.STATUS_CD_INVALID); |
| | | feeConfigServiceDaoImpl.updateFeeConfigInfoInstance(businessFeeConfigInfo); |
| | | dataFlowContext.addParamOut("feeConfigId",businessFeeConfigInfo.get("feeConfig_id")); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 撤单 |
| | | * 从business表中查询到DEL的数据 将instance中的数据更新回来 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doRecover(DataFlowContext dataFlowContext, Business business) { |
| | | String bId = business.getbId(); |
| | | //Assert.hasLength(bId,"请求报文中没有包含 bId"); |
| | | Map info = new HashMap(); |
| | | info.put("bId",bId); |
| | | info.put("statusCd",StatusConstant.STATUS_CD_INVALID); |
| | | |
| | | Map delInfo = new HashMap(); |
| | | delInfo.put("bId",business.getbId()); |
| | | delInfo.put("operate",StatusConstant.OPERATE_DEL); |
| | | //费用配置信息 |
| | | List<Map> feeConfigInfo = feeConfigServiceDaoImpl.getFeeConfigInfo(info); |
| | | if(feeConfigInfo != null && feeConfigInfo.size() > 0){ |
| | | |
| | | //费用配置信息 |
| | | List<Map> businessFeeConfigInfos = feeConfigServiceDaoImpl.getBusinessFeeConfigInfo(delInfo); |
| | | //除非程序出错了,这里不会为空 |
| | | if(businessFeeConfigInfos == null || businessFeeConfigInfos.size() == 0){ |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(feeConfig),程序内部异常,请检查! "+delInfo); |
| | | } |
| | | for (int _feeConfigIndex = 0; _feeConfigIndex < businessFeeConfigInfos.size();_feeConfigIndex++) { |
| | | Map businessFeeConfigInfo = businessFeeConfigInfos.get(_feeConfigIndex); |
| | | flushBusinessFeeConfigInfo(businessFeeConfigInfo,StatusConstant.STATUS_CD_VALID); |
| | | feeConfigServiceDaoImpl.updateFeeConfigInfoInstance(businessFeeConfigInfo); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 处理 businessFeeConfig 节点 |
| | | * @param business 总的数据节点 |
| | | * @param businessFeeConfig 费用配置节点 |
| | | */ |
| | | private void doBusinessFeeConfig(Business business,JSONObject businessFeeConfig){ |
| | | |
| | | Assert.jsonObjectHaveKey(businessFeeConfig,"feeConfigId","businessFeeConfig 节点下没有包含 feeConfigId 节点"); |
| | | |
| | | if(businessFeeConfig.getString("feeConfigId").startsWith("-")){ |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"feeConfigId 错误,不能自动生成(必须已经存在的feeConfigId)"+businessFeeConfig); |
| | | } |
| | | //自动插入DEL |
| | | autoSaveDelBusinessFeeConfig(business,businessFeeConfig); |
| | | } |
| | | |
| | | public IFeeConfigServiceDao getFeeConfigServiceDaoImpl() { |
| | | return feeConfigServiceDaoImpl; |
| | | } |
| | | |
| | | public void setFeeConfigServiceDaoImpl(IFeeConfigServiceDao feeConfigServiceDaoImpl) { |
| | | this.feeConfigServiceDaoImpl = feeConfigServiceDaoImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.fee.listener.config; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.common.constant.BusinessTypeConstant; |
| | | import com.java110.common.constant.StatusConstant; |
| | | import com.java110.common.util.Assert; |
| | | import com.java110.fee.dao.IFeeConfigServiceDao; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.entity.center.Business; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 保存 费用配置信息 侦听 |
| | | * Created by wuxw on 2018/5/18. |
| | | */ |
| | | @Java110Listener("saveFeeConfigInfoListener") |
| | | @Transactional |
| | | public class SaveFeeConfigInfoListener extends AbstractFeeConfigBusinessServiceDataFlowListener{ |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(SaveFeeConfigInfoListener.class); |
| | | |
| | | @Autowired |
| | | private IFeeConfigServiceDao feeConfigServiceDaoImpl; |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public String getBusinessTypeCd() { |
| | | return BusinessTypeConstant.BUSINESS_TYPE_SAVE_FEE_CONFIG; |
| | | } |
| | | |
| | | /** |
| | | * 保存费用配置信息 business 表中 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) { |
| | | JSONObject data = business.getDatas(); |
| | | Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理"); |
| | | |
| | | //处理 businessFeeConfig 节点 |
| | | if(data.containsKey("businessFeeConfig")){ |
| | | Object bObj = data.get("businessFeeConfig"); |
| | | JSONArray businessFeeConfigs = null; |
| | | if(bObj instanceof JSONObject){ |
| | | businessFeeConfigs = new JSONArray(); |
| | | businessFeeConfigs.add(bObj); |
| | | }else { |
| | | businessFeeConfigs = (JSONArray)bObj; |
| | | } |
| | | //JSONObject businessFeeConfig = data.getJSONObject("businessFeeConfig"); |
| | | for (int bFeeConfigIndex = 0; bFeeConfigIndex < businessFeeConfigs.size();bFeeConfigIndex++) { |
| | | JSONObject businessFeeConfig = businessFeeConfigs.getJSONObject(bFeeConfigIndex); |
| | | doBusinessFeeConfig(business, businessFeeConfig); |
| | | if(bObj instanceof JSONObject) { |
| | | dataFlowContext.addParamOut("configId", businessFeeConfig.getString("configId")); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * business 数据转移到 instance |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) { |
| | | JSONObject data = business.getDatas(); |
| | | |
| | | Map info = new HashMap(); |
| | | info.put("bId",business.getbId()); |
| | | info.put("operate",StatusConstant.OPERATE_ADD); |
| | | |
| | | //费用配置信息 |
| | | List<Map> businessFeeConfigInfo = feeConfigServiceDaoImpl.getBusinessFeeConfigInfo(info); |
| | | if( businessFeeConfigInfo != null && businessFeeConfigInfo.size() >0) { |
| | | reFreshShareColumn(info, businessFeeConfigInfo.get(0)); |
| | | feeConfigServiceDaoImpl.saveFeeConfigInfoInstance(info); |
| | | if(businessFeeConfigInfo.size() == 1) { |
| | | dataFlowContext.addParamOut("configId", businessFeeConfigInfo.get(0).get("config_id")); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 刷 分片字段 |
| | | * |
| | | * @param info 查询对象 |
| | | * @param businessInfo 小区ID |
| | | */ |
| | | private void reFreshShareColumn(Map info, Map businessInfo) { |
| | | |
| | | if (info.containsKey("communityId")) { |
| | | return; |
| | | } |
| | | |
| | | if (!businessInfo.containsKey("community_id")) { |
| | | return; |
| | | } |
| | | |
| | | info.put("communityId", businessInfo.get("community_id")); |
| | | } |
| | | /** |
| | | * 撤单 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doRecover(DataFlowContext dataFlowContext, Business business) { |
| | | String bId = business.getbId(); |
| | | //Assert.hasLength(bId,"请求报文中没有包含 bId"); |
| | | Map info = new HashMap(); |
| | | info.put("bId",bId); |
| | | info.put("statusCd",StatusConstant.STATUS_CD_VALID); |
| | | Map paramIn = new HashMap(); |
| | | paramIn.put("bId",bId); |
| | | paramIn.put("statusCd",StatusConstant.STATUS_CD_INVALID); |
| | | //费用配置信息 |
| | | List<Map> feeConfigInfo = feeConfigServiceDaoImpl.getFeeConfigInfo(info); |
| | | if(feeConfigInfo != null && feeConfigInfo.size() > 0){ |
| | | reFreshShareColumn(paramIn, feeConfigInfo.get(0)); |
| | | feeConfigServiceDaoImpl.updateFeeConfigInfoInstance(paramIn); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 处理 businessFeeConfig 节点 |
| | | * @param business 总的数据节点 |
| | | * @param businessFeeConfig 费用配置节点 |
| | | */ |
| | | private void doBusinessFeeConfig(Business business,JSONObject businessFeeConfig){ |
| | | |
| | | Assert.jsonObjectHaveKey(businessFeeConfig,"configId","businessFeeConfig 节点下没有包含 configId 节点"); |
| | | |
| | | if(businessFeeConfig.getString("configId").startsWith("-")){ |
| | | //刷新缓存 |
| | | //flushFeeConfigId(business.getDatas()); |
| | | |
| | | businessFeeConfig.put("configId",GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_configId)); |
| | | |
| | | } |
| | | |
| | | businessFeeConfig.put("bId",business.getbId()); |
| | | businessFeeConfig.put("operate", StatusConstant.OPERATE_ADD); |
| | | //保存费用配置信息 |
| | | feeConfigServiceDaoImpl.saveBusinessFeeConfigInfo(businessFeeConfig); |
| | | |
| | | } |
| | | |
| | | public IFeeConfigServiceDao getFeeConfigServiceDaoImpl() { |
| | | return feeConfigServiceDaoImpl; |
| | | } |
| | | |
| | | public void setFeeConfigServiceDaoImpl(IFeeConfigServiceDao feeConfigServiceDaoImpl) { |
| | | this.feeConfigServiceDaoImpl = feeConfigServiceDaoImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.fee.listener.config; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.common.constant.BusinessTypeConstant; |
| | | import com.java110.common.constant.ResponseConstant; |
| | | import com.java110.common.constant.StatusConstant; |
| | | import com.java110.common.exception.ListenerExecuteException; |
| | | import com.java110.common.util.Assert; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.entity.center.Business; |
| | | import com.java110.fee.dao.IFeeConfigServiceDao; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 修改费用配置信息 侦听 |
| | | * |
| | | * 处理节点 |
| | | * 1、businessFeeConfig:{} 费用配置基本信息节点 |
| | | * 2、businessFeeConfigAttr:[{}] 费用配置属性信息节点 |
| | | * 3、businessFeeConfigPhoto:[{}] 费用配置照片信息节点 |
| | | * 4、businessFeeConfigCerdentials:[{}] 费用配置证件信息节点 |
| | | * 协议地址 :https://github.com/java110/MicroCommunity/wiki/%E4%BF%AE%E6%94%B9%E5%95%86%E6%88%B7%E4%BF%A1%E6%81%AF-%E5%8D%8F%E8%AE%AE |
| | | * Created by wuxw on 2018/5/18. |
| | | */ |
| | | @Java110Listener("updateFeeConfigInfoListener") |
| | | @Transactional |
| | | public class UpdateFeeConfigInfoListener extends AbstractFeeConfigBusinessServiceDataFlowListener { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(UpdateFeeConfigInfoListener.class); |
| | | @Autowired |
| | | private IFeeConfigServiceDao feeConfigServiceDaoImpl; |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return 2; |
| | | } |
| | | |
| | | @Override |
| | | public String getBusinessTypeCd() { |
| | | return BusinessTypeConstant.BUSINESS_TYPE_UPDATE_FEE_CONFIG; |
| | | } |
| | | |
| | | /** |
| | | * business过程 |
| | | * @param dataFlowContext 上下文对象 |
| | | * @param business 业务对象 |
| | | */ |
| | | @Override |
| | | protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) { |
| | | |
| | | JSONObject data = business.getDatas(); |
| | | |
| | | Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理"); |
| | | |
| | | //处理 businessFeeConfig 节点 |
| | | if(data.containsKey("businessFeeConfig")){ |
| | | //处理 businessFeeConfig 节点 |
| | | if(data.containsKey("businessFeeConfig")){ |
| | | Object _obj = data.get("businessFeeConfig"); |
| | | JSONArray businessFeeConfigs = null; |
| | | if(_obj instanceof JSONObject){ |
| | | businessFeeConfigs = new JSONArray(); |
| | | businessFeeConfigs.add(_obj); |
| | | }else { |
| | | businessFeeConfigs = (JSONArray)_obj; |
| | | } |
| | | //JSONObject businessFeeConfig = data.getJSONObject("businessFeeConfig"); |
| | | for (int _feeConfigIndex = 0; _feeConfigIndex < businessFeeConfigs.size();_feeConfigIndex++) { |
| | | JSONObject businessFeeConfig = businessFeeConfigs.getJSONObject(_feeConfigIndex); |
| | | doBusinessFeeConfig(business, businessFeeConfig); |
| | | if(_obj instanceof JSONObject) { |
| | | dataFlowContext.addParamOut("feeConfigId", businessFeeConfig.getString("feeConfigId")); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * business to instance 过程 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) { |
| | | |
| | | JSONObject data = business.getDatas(); |
| | | |
| | | Map info = new HashMap(); |
| | | info.put("bId",business.getbId()); |
| | | info.put("operate",StatusConstant.OPERATE_ADD); |
| | | |
| | | //费用配置信息 |
| | | List<Map> businessFeeConfigInfos = feeConfigServiceDaoImpl.getBusinessFeeConfigInfo(info); |
| | | if( businessFeeConfigInfos != null && businessFeeConfigInfos.size() >0) { |
| | | for (int _feeConfigIndex = 0; _feeConfigIndex < businessFeeConfigInfos.size();_feeConfigIndex++) { |
| | | Map businessFeeConfigInfo = businessFeeConfigInfos.get(_feeConfigIndex); |
| | | flushBusinessFeeConfigInfo(businessFeeConfigInfo,StatusConstant.STATUS_CD_VALID); |
| | | feeConfigServiceDaoImpl.updateFeeConfigInfoInstance(businessFeeConfigInfo); |
| | | if(businessFeeConfigInfo.size() == 1) { |
| | | dataFlowContext.addParamOut("feeConfigId", businessFeeConfigInfo.get("feeConfig_id")); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 撤单 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doRecover(DataFlowContext dataFlowContext, Business business) { |
| | | |
| | | String bId = business.getbId(); |
| | | //Assert.hasLength(bId,"请求报文中没有包含 bId"); |
| | | Map info = new HashMap(); |
| | | info.put("bId",bId); |
| | | info.put("statusCd",StatusConstant.STATUS_CD_VALID); |
| | | Map delInfo = new HashMap(); |
| | | delInfo.put("bId",business.getbId()); |
| | | delInfo.put("operate",StatusConstant.OPERATE_DEL); |
| | | //费用配置信息 |
| | | List<Map> feeConfigInfo = feeConfigServiceDaoImpl.getFeeConfigInfo(info); |
| | | if(feeConfigInfo != null && feeConfigInfo.size() > 0){ |
| | | |
| | | //费用配置信息 |
| | | List<Map> businessFeeConfigInfos = feeConfigServiceDaoImpl.getBusinessFeeConfigInfo(delInfo); |
| | | //除非程序出错了,这里不会为空 |
| | | if(businessFeeConfigInfos == null || businessFeeConfigInfos.size() == 0){ |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(feeConfig),程序内部异常,请检查! "+delInfo); |
| | | } |
| | | for (int _feeConfigIndex = 0; _feeConfigIndex < businessFeeConfigInfos.size();_feeConfigIndex++) { |
| | | Map businessFeeConfigInfo = businessFeeConfigInfos.get(_feeConfigIndex); |
| | | flushBusinessFeeConfigInfo(businessFeeConfigInfo,StatusConstant.STATUS_CD_VALID); |
| | | feeConfigServiceDaoImpl.updateFeeConfigInfoInstance(businessFeeConfigInfo); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 处理 businessFeeConfig 节点 |
| | | * @param business 总的数据节点 |
| | | * @param businessFeeConfig 费用配置节点 |
| | | */ |
| | | private void doBusinessFeeConfig(Business business,JSONObject businessFeeConfig){ |
| | | |
| | | Assert.jsonObjectHaveKey(businessFeeConfig,"feeConfigId","businessFeeConfig 节点下没有包含 feeConfigId 节点"); |
| | | |
| | | if(businessFeeConfig.getString("feeConfigId").startsWith("-")){ |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"feeConfigId 错误,不能自动生成(必须已经存在的feeConfigId)"+businessFeeConfig); |
| | | } |
| | | //自动保存DEL |
| | | autoSaveDelBusinessFeeConfig(business,businessFeeConfig); |
| | | |
| | | businessFeeConfig.put("bId",business.getbId()); |
| | | businessFeeConfig.put("operate", StatusConstant.OPERATE_ADD); |
| | | //保存费用配置信息 |
| | | feeConfigServiceDaoImpl.saveBusinessFeeConfigInfo(businessFeeConfig); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | public IFeeConfigServiceDao getFeeConfigServiceDaoImpl() { |
| | | return feeConfigServiceDaoImpl; |
| | | } |
| | | |
| | | public void setFeeConfigServiceDaoImpl(IFeeConfigServiceDao feeConfigServiceDaoImpl) { |
| | | this.feeConfigServiceDaoImpl = feeConfigServiceDaoImpl; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.listener.detail; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.common.constant.ResponseConstant; |
| | | import com.java110.common.constant.StatusConstant; |
| | | import com.java110.common.exception.ListenerExecuteException; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.entity.center.Business; |
| | | import com.java110.event.service.AbstractBusinessServiceDataFlowListener; |
| | | import com.java110.fee.dao.IFeeDetailServiceDao; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * |
| | | * 费用明细 服务侦听 父类 |
| | | * Created by wuxw on 2018/7/4. |
| | | */ |
| | | public abstract class AbstractFeeDetailBusinessServiceDataFlowListener extends AbstractBusinessServiceDataFlowListener{ |
| | | private static Logger logger = LoggerFactory.getLogger(AbstractFeeDetailBusinessServiceDataFlowListener.class); |
| | | |
| | | |
| | | /** |
| | | * 获取 DAO工具类 |
| | | * @return |
| | | */ |
| | | public abstract IFeeDetailServiceDao getFeeDetailServiceDaoImpl(); |
| | | |
| | | /** |
| | | * 刷新 businessFeeDetailInfo 数据 |
| | | * 主要将 数据库 中字段和 接口传递字段建立关系 |
| | | * @param businessFeeDetailInfo |
| | | */ |
| | | protected void flushBusinessFeeDetailInfo(Map businessFeeDetailInfo,String statusCd){ |
| | | businessFeeDetailInfo.put("newBId", businessFeeDetailInfo.get("b_id")); |
| | | businessFeeDetailInfo.put("operate",businessFeeDetailInfo.get("operate")); |
| | | businessFeeDetailInfo.put("primeRate",businessFeeDetailInfo.get("prime_rate")); |
| | | businessFeeDetailInfo.put("detailId",businessFeeDetailInfo.get("detail_id")); |
| | | businessFeeDetailInfo.put("receivableAmount",businessFeeDetailInfo.get("receivable_amount")); |
| | | businessFeeDetailInfo.put("cycles",businessFeeDetailInfo.get("cycles")); |
| | | businessFeeDetailInfo.put("remark",businessFeeDetailInfo.get("remark")); |
| | | businessFeeDetailInfo.put("receivedAmount",businessFeeDetailInfo.get("received_amount")); |
| | | businessFeeDetailInfo.put("communityId",businessFeeDetailInfo.get("community_id")); |
| | | businessFeeDetailInfo.put("feeId",businessFeeDetailInfo.get("fee_id")); |
| | | businessFeeDetailInfo.remove("bId"); |
| | | businessFeeDetailInfo.put("statusCd", statusCd); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 当修改数据时,查询instance表中的数据 自动保存删除数据到business中 |
| | | * @param businessFeeDetail 费用明细信息 |
| | | */ |
| | | protected void autoSaveDelBusinessFeeDetail(Business business, JSONObject businessFeeDetail){ |
| | | //自动插入DEL |
| | | Map info = new HashMap(); |
| | | info.put("detailId",businessFeeDetail.getString("detailId")); |
| | | info.put("statusCd",StatusConstant.STATUS_CD_VALID); |
| | | List<Map> currentFeeDetailInfos = getFeeDetailServiceDaoImpl().getFeeDetailInfo(info); |
| | | if(currentFeeDetailInfos == null || currentFeeDetailInfos.size() != 1){ |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"未找到需要修改数据信息,入参错误或数据有问题,请检查"+info); |
| | | } |
| | | |
| | | Map currentFeeDetailInfo = currentFeeDetailInfos.get(0); |
| | | |
| | | currentFeeDetailInfo.put("bId",business.getbId()); |
| | | |
| | | currentFeeDetailInfo.put("operate",currentFeeDetailInfo.get("operate")); |
| | | currentFeeDetailInfo.put("primeRate",currentFeeDetailInfo.get("prime_rate")); |
| | | currentFeeDetailInfo.put("detailId",currentFeeDetailInfo.get("detail_id")); |
| | | currentFeeDetailInfo.put("receivableAmount",currentFeeDetailInfo.get("receivable_amount")); |
| | | currentFeeDetailInfo.put("cycles",currentFeeDetailInfo.get("cycles")); |
| | | currentFeeDetailInfo.put("remark",currentFeeDetailInfo.get("remark")); |
| | | currentFeeDetailInfo.put("receivedAmount",currentFeeDetailInfo.get("received_amount")); |
| | | currentFeeDetailInfo.put("communityId",currentFeeDetailInfo.get("community_id")); |
| | | currentFeeDetailInfo.put("feeId",currentFeeDetailInfo.get("fee_id")); |
| | | |
| | | |
| | | currentFeeDetailInfo.put("operate",StatusConstant.OPERATE_DEL); |
| | | getFeeDetailServiceDaoImpl().saveBusinessFeeDetailInfo(currentFeeDetailInfo); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.listener.detail; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.common.constant.BusinessTypeConstant; |
| | | import com.java110.common.constant.ResponseConstant; |
| | | import com.java110.common.constant.StatusConstant; |
| | | import com.java110.common.exception.ListenerExecuteException; |
| | | import com.java110.common.util.Assert; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.entity.center.Business; |
| | | import com.java110.fee.dao.IFeeDetailServiceDao; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 删除费用明细信息 侦听 |
| | | * |
| | | * 处理节点 |
| | | * 1、businessFeeDetail:{} 费用明细基本信息节点 |
| | | * 2、businessFeeDetailAttr:[{}] 费用明细属性信息节点 |
| | | * 3、businessFeeDetailPhoto:[{}] 费用明细照片信息节点 |
| | | * 4、businessFeeDetailCerdentials:[{}] 费用明细证件信息节点 |
| | | * 协议地址 :https://github.com/java110/MicroCommunity/wiki/%E5%88%A0%E9%99%A4%E5%95%86%E6%88%B7%E4%BF%A1%E6%81%AF-%E5%8D%8F%E8%AE%AE |
| | | * Created by wuxw on 2018/5/18. |
| | | */ |
| | | @Java110Listener("deleteFeeDetailInfoListener") |
| | | @Transactional |
| | | public class DeleteFeeDetailInfoListener extends AbstractFeeDetailBusinessServiceDataFlowListener { |
| | | |
| | | private final static Logger logger = LoggerFactory.getLogger(DeleteFeeDetailInfoListener.class); |
| | | @Autowired |
| | | IFeeDetailServiceDao feeDetailServiceDaoImpl; |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return 3; |
| | | } |
| | | |
| | | @Override |
| | | public String getBusinessTypeCd() { |
| | | return BusinessTypeConstant.BUSINESS_TYPE_DELETE_FEE_DETAIL; |
| | | } |
| | | |
| | | /** |
| | | * 根据删除信息 查出Instance表中数据 保存至business表 (状态写DEL) 方便撤单时直接更新回去 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) { |
| | | JSONObject data = business.getDatas(); |
| | | |
| | | Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理"); |
| | | |
| | | //处理 businessFeeDetail 节点 |
| | | if(data.containsKey("businessFeeDetail")){ |
| | | //处理 businessFeeDetail 节点 |
| | | if(data.containsKey("businessFeeDetail")){ |
| | | Object _obj = data.get("businessFeeDetail"); |
| | | JSONArray businessFeeDetails = null; |
| | | if(_obj instanceof JSONObject){ |
| | | businessFeeDetails = new JSONArray(); |
| | | businessFeeDetails.add(_obj); |
| | | }else { |
| | | businessFeeDetails = (JSONArray)_obj; |
| | | } |
| | | //JSONObject businessFeeDetail = data.getJSONObject("businessFeeDetail"); |
| | | for (int _feeDetailIndex = 0; _feeDetailIndex < businessFeeDetails.size();_feeDetailIndex++) { |
| | | JSONObject businessFeeDetail = businessFeeDetails.getJSONObject(_feeDetailIndex); |
| | | doBusinessFeeDetail(business, businessFeeDetail); |
| | | if(_obj instanceof JSONObject) { |
| | | dataFlowContext.addParamOut("feeDetailId", businessFeeDetail.getString("feeDetailId")); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 删除 instance数据 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) { |
| | | String bId = business.getbId(); |
| | | //Assert.hasLength(bId,"请求报文中没有包含 bId"); |
| | | |
| | | //费用明细信息 |
| | | Map info = new HashMap(); |
| | | info.put("bId",business.getbId()); |
| | | info.put("operate",StatusConstant.OPERATE_DEL); |
| | | |
| | | //费用明细信息 |
| | | List<Map> businessFeeDetailInfos = feeDetailServiceDaoImpl.getBusinessFeeDetailInfo(info); |
| | | if( businessFeeDetailInfos != null && businessFeeDetailInfos.size() >0) { |
| | | for (int _feeDetailIndex = 0; _feeDetailIndex < businessFeeDetailInfos.size();_feeDetailIndex++) { |
| | | Map businessFeeDetailInfo = businessFeeDetailInfos.get(_feeDetailIndex); |
| | | flushBusinessFeeDetailInfo(businessFeeDetailInfo,StatusConstant.STATUS_CD_INVALID); |
| | | feeDetailServiceDaoImpl.updateFeeDetailInfoInstance(businessFeeDetailInfo); |
| | | dataFlowContext.addParamOut("feeDetailId",businessFeeDetailInfo.get("feeDetail_id")); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 撤单 |
| | | * 从business表中查询到DEL的数据 将instance中的数据更新回来 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doRecover(DataFlowContext dataFlowContext, Business business) { |
| | | String bId = business.getbId(); |
| | | //Assert.hasLength(bId,"请求报文中没有包含 bId"); |
| | | Map info = new HashMap(); |
| | | info.put("bId",bId); |
| | | info.put("statusCd",StatusConstant.STATUS_CD_INVALID); |
| | | |
| | | Map delInfo = new HashMap(); |
| | | delInfo.put("bId",business.getbId()); |
| | | delInfo.put("operate",StatusConstant.OPERATE_DEL); |
| | | //费用明细信息 |
| | | List<Map> feeDetailInfo = feeDetailServiceDaoImpl.getFeeDetailInfo(info); |
| | | if(feeDetailInfo != null && feeDetailInfo.size() > 0){ |
| | | |
| | | //费用明细信息 |
| | | List<Map> businessFeeDetailInfos = feeDetailServiceDaoImpl.getBusinessFeeDetailInfo(delInfo); |
| | | //除非程序出错了,这里不会为空 |
| | | if(businessFeeDetailInfos == null || businessFeeDetailInfos.size() == 0){ |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(feeDetail),程序内部异常,请检查! "+delInfo); |
| | | } |
| | | for (int _feeDetailIndex = 0; _feeDetailIndex < businessFeeDetailInfos.size();_feeDetailIndex++) { |
| | | Map businessFeeDetailInfo = businessFeeDetailInfos.get(_feeDetailIndex); |
| | | flushBusinessFeeDetailInfo(businessFeeDetailInfo,StatusConstant.STATUS_CD_VALID); |
| | | feeDetailServiceDaoImpl.updateFeeDetailInfoInstance(businessFeeDetailInfo); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 处理 businessFeeDetail 节点 |
| | | * @param business 总的数据节点 |
| | | * @param businessFeeDetail 费用明细节点 |
| | | */ |
| | | private void doBusinessFeeDetail(Business business,JSONObject businessFeeDetail){ |
| | | |
| | | Assert.jsonObjectHaveKey(businessFeeDetail,"feeDetailId","businessFeeDetail 节点下没有包含 feeDetailId 节点"); |
| | | |
| | | if(businessFeeDetail.getString("feeDetailId").startsWith("-")){ |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"feeDetailId 错误,不能自动生成(必须已经存在的feeDetailId)"+businessFeeDetail); |
| | | } |
| | | //自动插入DEL |
| | | autoSaveDelBusinessFeeDetail(business,businessFeeDetail); |
| | | } |
| | | |
| | | public IFeeDetailServiceDao getFeeDetailServiceDaoImpl() { |
| | | return feeDetailServiceDaoImpl; |
| | | } |
| | | |
| | | public void setFeeDetailServiceDaoImpl(IFeeDetailServiceDao feeDetailServiceDaoImpl) { |
| | | this.feeDetailServiceDaoImpl = feeDetailServiceDaoImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.fee.listener.detail; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.common.constant.BusinessTypeConstant; |
| | | import com.java110.common.constant.StatusConstant; |
| | | import com.java110.common.util.Assert; |
| | | import com.java110.fee.dao.IFeeDetailServiceDao; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.entity.center.Business; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 保存 费用明细信息 侦听 |
| | | * Created by wuxw on 2018/5/18. |
| | | */ |
| | | @Java110Listener("saveFeeDetailInfoListener") |
| | | @Transactional |
| | | public class SaveFeeDetailInfoListener extends AbstractFeeDetailBusinessServiceDataFlowListener{ |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(SaveFeeDetailInfoListener.class); |
| | | |
| | | @Autowired |
| | | private IFeeDetailServiceDao feeDetailServiceDaoImpl; |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public String getBusinessTypeCd() { |
| | | return BusinessTypeConstant.BUSINESS_TYPE_SAVE_FEE_DETAIL; |
| | | } |
| | | |
| | | /** |
| | | * 保存费用明细信息 business 表中 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) { |
| | | JSONObject data = business.getDatas(); |
| | | Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理"); |
| | | |
| | | //处理 businessFeeDetail 节点 |
| | | if(data.containsKey("businessFeeDetail")){ |
| | | Object bObj = data.get("businessFeeDetail"); |
| | | JSONArray businessFeeDetails = null; |
| | | if(bObj instanceof JSONObject){ |
| | | businessFeeDetails = new JSONArray(); |
| | | businessFeeDetails.add(bObj); |
| | | }else { |
| | | businessFeeDetails = (JSONArray)bObj; |
| | | } |
| | | //JSONObject businessFeeDetail = data.getJSONObject("businessFeeDetail"); |
| | | for (int bFeeDetailIndex = 0; bFeeDetailIndex < businessFeeDetails.size();bFeeDetailIndex++) { |
| | | JSONObject businessFeeDetail = businessFeeDetails.getJSONObject(bFeeDetailIndex); |
| | | doBusinessFeeDetail(business, businessFeeDetail); |
| | | if(bObj instanceof JSONObject) { |
| | | dataFlowContext.addParamOut("detailId", businessFeeDetail.getString("detailId")); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * business 数据转移到 instance |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) { |
| | | JSONObject data = business.getDatas(); |
| | | |
| | | Map info = new HashMap(); |
| | | info.put("bId",business.getbId()); |
| | | info.put("operate",StatusConstant.OPERATE_ADD); |
| | | |
| | | //费用明细信息 |
| | | List<Map> businessFeeDetailInfo = feeDetailServiceDaoImpl.getBusinessFeeDetailInfo(info); |
| | | if( businessFeeDetailInfo != null && businessFeeDetailInfo.size() >0) { |
| | | reFreshShareColumn(info, businessFeeDetailInfo.get(0)); |
| | | feeDetailServiceDaoImpl.saveFeeDetailInfoInstance(info); |
| | | if(businessFeeDetailInfo.size() == 1) { |
| | | dataFlowContext.addParamOut("detailId", businessFeeDetailInfo.get(0).get("detail_id")); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 刷 分片字段 |
| | | * |
| | | * @param info 查询对象 |
| | | * @param businessInfo 小区ID |
| | | */ |
| | | private void reFreshShareColumn(Map info, Map businessInfo) { |
| | | |
| | | if (info.containsKey("communityId")) { |
| | | return; |
| | | } |
| | | |
| | | if (!businessInfo.containsKey("community_id")) { |
| | | return; |
| | | } |
| | | |
| | | info.put("communityId", businessInfo.get("community_id")); |
| | | } |
| | | /** |
| | | * 撤单 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doRecover(DataFlowContext dataFlowContext, Business business) { |
| | | String bId = business.getbId(); |
| | | //Assert.hasLength(bId,"请求报文中没有包含 bId"); |
| | | Map info = new HashMap(); |
| | | info.put("bId",bId); |
| | | info.put("statusCd",StatusConstant.STATUS_CD_VALID); |
| | | Map paramIn = new HashMap(); |
| | | paramIn.put("bId",bId); |
| | | paramIn.put("statusCd",StatusConstant.STATUS_CD_INVALID); |
| | | //费用明细信息 |
| | | List<Map> feeDetailInfo = feeDetailServiceDaoImpl.getFeeDetailInfo(info); |
| | | if(feeDetailInfo != null && feeDetailInfo.size() > 0){ |
| | | reFreshShareColumn(paramIn, feeDetailInfo.get(0)); |
| | | feeDetailServiceDaoImpl.updateFeeDetailInfoInstance(paramIn); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 处理 businessFeeDetail 节点 |
| | | * @param business 总的数据节点 |
| | | * @param businessFeeDetail 费用明细节点 |
| | | */ |
| | | private void doBusinessFeeDetail(Business business,JSONObject businessFeeDetail){ |
| | | |
| | | Assert.jsonObjectHaveKey(businessFeeDetail,"detailId","businessFeeDetail 节点下没有包含 detailId 节点"); |
| | | |
| | | if(businessFeeDetail.getString("detailId").startsWith("-")){ |
| | | //刷新缓存 |
| | | //flushFeeDetailId(business.getDatas()); |
| | | |
| | | businessFeeDetail.put("detailId",GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_detailId)); |
| | | |
| | | } |
| | | |
| | | businessFeeDetail.put("bId",business.getbId()); |
| | | businessFeeDetail.put("operate", StatusConstant.OPERATE_ADD); |
| | | //保存费用明细信息 |
| | | feeDetailServiceDaoImpl.saveBusinessFeeDetailInfo(businessFeeDetail); |
| | | |
| | | } |
| | | |
| | | public IFeeDetailServiceDao getFeeDetailServiceDaoImpl() { |
| | | return feeDetailServiceDaoImpl; |
| | | } |
| | | |
| | | public void setFeeDetailServiceDaoImpl(IFeeDetailServiceDao feeDetailServiceDaoImpl) { |
| | | this.feeDetailServiceDaoImpl = feeDetailServiceDaoImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.fee.listener.detail; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.common.constant.BusinessTypeConstant; |
| | | import com.java110.common.constant.ResponseConstant; |
| | | import com.java110.common.constant.StatusConstant; |
| | | import com.java110.common.exception.ListenerExecuteException; |
| | | import com.java110.common.util.Assert; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.entity.center.Business; |
| | | import com.java110.fee.dao.IFeeDetailServiceDao; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 修改费用明细信息 侦听 |
| | | * |
| | | * 处理节点 |
| | | * 1、businessFeeDetail:{} 费用明细基本信息节点 |
| | | * 2、businessFeeDetailAttr:[{}] 费用明细属性信息节点 |
| | | * 3、businessFeeDetailPhoto:[{}] 费用明细照片信息节点 |
| | | * 4、businessFeeDetailCerdentials:[{}] 费用明细证件信息节点 |
| | | * 协议地址 :https://github.com/java110/MicroCommunity/wiki/%E4%BF%AE%E6%94%B9%E5%95%86%E6%88%B7%E4%BF%A1%E6%81%AF-%E5%8D%8F%E8%AE%AE |
| | | * Created by wuxw on 2018/5/18. |
| | | */ |
| | | @Java110Listener("updateFeeDetailInfoListener") |
| | | @Transactional |
| | | public class UpdateFeeDetailInfoListener extends AbstractFeeDetailBusinessServiceDataFlowListener { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(UpdateFeeDetailInfoListener.class); |
| | | @Autowired |
| | | private IFeeDetailServiceDao feeDetailServiceDaoImpl; |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return 2; |
| | | } |
| | | |
| | | @Override |
| | | public String getBusinessTypeCd() { |
| | | return BusinessTypeConstant.BUSINESS_TYPE_UPDATE_FEE_DETAIL; |
| | | } |
| | | |
| | | /** |
| | | * business过程 |
| | | * @param dataFlowContext 上下文对象 |
| | | * @param business 业务对象 |
| | | */ |
| | | @Override |
| | | protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) { |
| | | |
| | | JSONObject data = business.getDatas(); |
| | | |
| | | Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理"); |
| | | |
| | | //处理 businessFeeDetail 节点 |
| | | if(data.containsKey("businessFeeDetail")){ |
| | | //处理 businessFeeDetail 节点 |
| | | if(data.containsKey("businessFeeDetail")){ |
| | | Object _obj = data.get("businessFeeDetail"); |
| | | JSONArray businessFeeDetails = null; |
| | | if(_obj instanceof JSONObject){ |
| | | businessFeeDetails = new JSONArray(); |
| | | businessFeeDetails.add(_obj); |
| | | }else { |
| | | businessFeeDetails = (JSONArray)_obj; |
| | | } |
| | | //JSONObject businessFeeDetail = data.getJSONObject("businessFeeDetail"); |
| | | for (int _feeDetailIndex = 0; _feeDetailIndex < businessFeeDetails.size();_feeDetailIndex++) { |
| | | JSONObject businessFeeDetail = businessFeeDetails.getJSONObject(_feeDetailIndex); |
| | | doBusinessFeeDetail(business, businessFeeDetail); |
| | | if(_obj instanceof JSONObject) { |
| | | dataFlowContext.addParamOut("feeDetailId", businessFeeDetail.getString("feeDetailId")); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * business to instance 过程 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) { |
| | | |
| | | JSONObject data = business.getDatas(); |
| | | |
| | | Map info = new HashMap(); |
| | | info.put("bId",business.getbId()); |
| | | info.put("operate",StatusConstant.OPERATE_ADD); |
| | | |
| | | //费用明细信息 |
| | | List<Map> businessFeeDetailInfos = feeDetailServiceDaoImpl.getBusinessFeeDetailInfo(info); |
| | | if( businessFeeDetailInfos != null && businessFeeDetailInfos.size() >0) { |
| | | for (int _feeDetailIndex = 0; _feeDetailIndex < businessFeeDetailInfos.size();_feeDetailIndex++) { |
| | | Map businessFeeDetailInfo = businessFeeDetailInfos.get(_feeDetailIndex); |
| | | flushBusinessFeeDetailInfo(businessFeeDetailInfo,StatusConstant.STATUS_CD_VALID); |
| | | feeDetailServiceDaoImpl.updateFeeDetailInfoInstance(businessFeeDetailInfo); |
| | | if(businessFeeDetailInfo.size() == 1) { |
| | | dataFlowContext.addParamOut("feeDetailId", businessFeeDetailInfo.get("feeDetail_id")); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 撤单 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doRecover(DataFlowContext dataFlowContext, Business business) { |
| | | |
| | | String bId = business.getbId(); |
| | | //Assert.hasLength(bId,"请求报文中没有包含 bId"); |
| | | Map info = new HashMap(); |
| | | info.put("bId",bId); |
| | | info.put("statusCd",StatusConstant.STATUS_CD_VALID); |
| | | Map delInfo = new HashMap(); |
| | | delInfo.put("bId",business.getbId()); |
| | | delInfo.put("operate",StatusConstant.OPERATE_DEL); |
| | | //费用明细信息 |
| | | List<Map> feeDetailInfo = feeDetailServiceDaoImpl.getFeeDetailInfo(info); |
| | | if(feeDetailInfo != null && feeDetailInfo.size() > 0){ |
| | | |
| | | //费用明细信息 |
| | | List<Map> businessFeeDetailInfos = feeDetailServiceDaoImpl.getBusinessFeeDetailInfo(delInfo); |
| | | //除非程序出错了,这里不会为空 |
| | | if(businessFeeDetailInfos == null || businessFeeDetailInfos.size() == 0){ |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(feeDetail),程序内部异常,请检查! "+delInfo); |
| | | } |
| | | for (int _feeDetailIndex = 0; _feeDetailIndex < businessFeeDetailInfos.size();_feeDetailIndex++) { |
| | | Map businessFeeDetailInfo = businessFeeDetailInfos.get(_feeDetailIndex); |
| | | flushBusinessFeeDetailInfo(businessFeeDetailInfo,StatusConstant.STATUS_CD_VALID); |
| | | feeDetailServiceDaoImpl.updateFeeDetailInfoInstance(businessFeeDetailInfo); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 处理 businessFeeDetail 节点 |
| | | * @param business 总的数据节点 |
| | | * @param businessFeeDetail 费用明细节点 |
| | | */ |
| | | private void doBusinessFeeDetail(Business business,JSONObject businessFeeDetail){ |
| | | |
| | | Assert.jsonObjectHaveKey(businessFeeDetail,"feeDetailId","businessFeeDetail 节点下没有包含 feeDetailId 节点"); |
| | | |
| | | if(businessFeeDetail.getString("feeDetailId").startsWith("-")){ |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"feeDetailId 错误,不能自动生成(必须已经存在的feeDetailId)"+businessFeeDetail); |
| | | } |
| | | //自动保存DEL |
| | | autoSaveDelBusinessFeeDetail(business,businessFeeDetail); |
| | | |
| | | businessFeeDetail.put("bId",business.getbId()); |
| | | businessFeeDetail.put("operate", StatusConstant.OPERATE_ADD); |
| | | //保存费用明细信息 |
| | | feeDetailServiceDaoImpl.saveBusinessFeeDetailInfo(businessFeeDetail); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | public IFeeDetailServiceDao getFeeDetailServiceDaoImpl() { |
| | | return feeDetailServiceDaoImpl; |
| | | } |
| | | |
| | | public void setFeeDetailServiceDaoImpl(IFeeDetailServiceDao feeDetailServiceDaoImpl) { |
| | | this.feeDetailServiceDaoImpl = feeDetailServiceDaoImpl; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.listener.fee; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.common.constant.ResponseConstant; |
| | | import com.java110.common.constant.StatusConstant; |
| | | import com.java110.common.exception.ListenerExecuteException; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.entity.center.Business; |
| | | import com.java110.event.service.AbstractBusinessServiceDataFlowListener; |
| | | import com.java110.fee.dao.IFeeServiceDao; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * |
| | | * 费用 服务侦听 父类 |
| | | * Created by wuxw on 2018/7/4. |
| | | */ |
| | | public abstract class AbstractFeeBusinessServiceDataFlowListener extends AbstractBusinessServiceDataFlowListener{ |
| | | private static Logger logger = LoggerFactory.getLogger(AbstractFeeBusinessServiceDataFlowListener.class); |
| | | |
| | | |
| | | /** |
| | | * 获取 DAO工具类 |
| | | * @return |
| | | */ |
| | | public abstract IFeeServiceDao getFeeServiceDaoImpl(); |
| | | |
| | | /** |
| | | * 刷新 businessFeeInfo 数据 |
| | | * 主要将 数据库 中字段和 接口传递字段建立关系 |
| | | * @param businessFeeInfo |
| | | */ |
| | | protected void flushBusinessFeeInfo(Map businessFeeInfo,String statusCd){ |
| | | businessFeeInfo.put("newBId", businessFeeInfo.get("b_id")); |
| | | businessFeeInfo.put("amount",businessFeeInfo.get("amount")); |
| | | businessFeeInfo.put("operate",businessFeeInfo.get("operate")); |
| | | businessFeeInfo.put("incomeObjId",businessFeeInfo.get("income_obj_id")); |
| | | businessFeeInfo.put("feeTypeCd",businessFeeInfo.get("fee_type_cd")); |
| | | businessFeeInfo.put("startTime",businessFeeInfo.get("start_time")); |
| | | businessFeeInfo.put("endTime",businessFeeInfo.get("end_time")); |
| | | businessFeeInfo.put("communityId",businessFeeInfo.get("community_id")); |
| | | businessFeeInfo.put("feeId",businessFeeInfo.get("fee_id")); |
| | | businessFeeInfo.put("userId",businessFeeInfo.get("user_id")); |
| | | businessFeeInfo.put("payerObjId",businessFeeInfo.get("payer_obj_id")); |
| | | businessFeeInfo.remove("bId"); |
| | | businessFeeInfo.put("statusCd", statusCd); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 当修改数据时,查询instance表中的数据 自动保存删除数据到business中 |
| | | * @param businessFee 费用信息 |
| | | */ |
| | | protected void autoSaveDelBusinessFee(Business business, JSONObject businessFee){ |
| | | //自动插入DEL |
| | | Map info = new HashMap(); |
| | | info.put("feeId",businessFee.getString("feeId")); |
| | | info.put("statusCd",StatusConstant.STATUS_CD_VALID); |
| | | List<Map> currentFeeInfos = getFeeServiceDaoImpl().getFeeInfo(info); |
| | | if(currentFeeInfos == null || currentFeeInfos.size() != 1){ |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"未找到需要修改数据信息,入参错误或数据有问题,请检查"+info); |
| | | } |
| | | |
| | | Map currentFeeInfo = currentFeeInfos.get(0); |
| | | |
| | | currentFeeInfo.put("bId",business.getbId()); |
| | | |
| | | currentFeeInfo.put("amount",currentFeeInfo.get("amount")); |
| | | currentFeeInfo.put("operate",currentFeeInfo.get("operate")); |
| | | currentFeeInfo.put("incomeObjId",currentFeeInfo.get("income_obj_id")); |
| | | currentFeeInfo.put("feeTypeCd",currentFeeInfo.get("fee_type_cd")); |
| | | currentFeeInfo.put("startTime",currentFeeInfo.get("start_time")); |
| | | currentFeeInfo.put("endTime",currentFeeInfo.get("end_time")); |
| | | currentFeeInfo.put("communityId",currentFeeInfo.get("community_id")); |
| | | currentFeeInfo.put("feeId",currentFeeInfo.get("fee_id")); |
| | | currentFeeInfo.put("userId",currentFeeInfo.get("user_id")); |
| | | currentFeeInfo.put("payerObjId",currentFeeInfo.get("payer_obj_id")); |
| | | |
| | | |
| | | currentFeeInfo.put("operate",StatusConstant.OPERATE_DEL); |
| | | getFeeServiceDaoImpl().saveBusinessFeeInfo(currentFeeInfo); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.listener.fee; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.common.constant.BusinessTypeConstant; |
| | | import com.java110.common.constant.ResponseConstant; |
| | | import com.java110.common.constant.StatusConstant; |
| | | import com.java110.common.exception.ListenerExecuteException; |
| | | import com.java110.common.util.Assert; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.entity.center.Business; |
| | | import com.java110.fee.dao.IFeeServiceDao; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 删除费用信息 侦听 |
| | | * |
| | | * 处理节点 |
| | | * 1、businessFee:{} 费用基本信息节点 |
| | | * 2、businessFeeAttr:[{}] 费用属性信息节点 |
| | | * 3、businessFeePhoto:[{}] 费用照片信息节点 |
| | | * 4、businessFeeCerdentials:[{}] 费用证件信息节点 |
| | | * 协议地址 :https://github.com/java110/MicroCommunity/wiki/%E5%88%A0%E9%99%A4%E5%95%86%E6%88%B7%E4%BF%A1%E6%81%AF-%E5%8D%8F%E8%AE%AE |
| | | * Created by wuxw on 2018/5/18. |
| | | */ |
| | | @Java110Listener("deleteFeeInfoListener") |
| | | @Transactional |
| | | public class DeleteFeeInfoListener extends AbstractFeeBusinessServiceDataFlowListener { |
| | | |
| | | private final static Logger logger = LoggerFactory.getLogger(DeleteFeeInfoListener.class); |
| | | @Autowired |
| | | IFeeServiceDao feeServiceDaoImpl; |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return 3; |
| | | } |
| | | |
| | | @Override |
| | | public String getBusinessTypeCd() { |
| | | return BusinessTypeConstant.BUSINESS_TYPE_DELETE_FEE_INFO; |
| | | } |
| | | |
| | | /** |
| | | * 根据删除信息 查出Instance表中数据 保存至business表 (状态写DEL) 方便撤单时直接更新回去 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) { |
| | | JSONObject data = business.getDatas(); |
| | | |
| | | Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理"); |
| | | |
| | | //处理 businessFee 节点 |
| | | if(data.containsKey("businessFee")){ |
| | | //处理 businessFee 节点 |
| | | if(data.containsKey("businessFee")){ |
| | | Object _obj = data.get("businessFee"); |
| | | JSONArray businessFees = null; |
| | | if(_obj instanceof JSONObject){ |
| | | businessFees = new JSONArray(); |
| | | businessFees.add(_obj); |
| | | }else { |
| | | businessFees = (JSONArray)_obj; |
| | | } |
| | | //JSONObject businessFee = data.getJSONObject("businessFee"); |
| | | for (int _feeIndex = 0; _feeIndex < businessFees.size();_feeIndex++) { |
| | | JSONObject businessFee = businessFees.getJSONObject(_feeIndex); |
| | | doBusinessFee(business, businessFee); |
| | | if(_obj instanceof JSONObject) { |
| | | dataFlowContext.addParamOut("feeId", businessFee.getString("feeId")); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 删除 instance数据 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) { |
| | | String bId = business.getbId(); |
| | | //Assert.hasLength(bId,"请求报文中没有包含 bId"); |
| | | |
| | | //费用信息 |
| | | Map info = new HashMap(); |
| | | info.put("bId",business.getbId()); |
| | | info.put("operate",StatusConstant.OPERATE_DEL); |
| | | |
| | | //费用信息 |
| | | List<Map> businessFeeInfos = feeServiceDaoImpl.getBusinessFeeInfo(info); |
| | | if( businessFeeInfos != null && businessFeeInfos.size() >0) { |
| | | for (int _feeIndex = 0; _feeIndex < businessFeeInfos.size();_feeIndex++) { |
| | | Map businessFeeInfo = businessFeeInfos.get(_feeIndex); |
| | | flushBusinessFeeInfo(businessFeeInfo,StatusConstant.STATUS_CD_INVALID); |
| | | feeServiceDaoImpl.updateFeeInfoInstance(businessFeeInfo); |
| | | dataFlowContext.addParamOut("feeId",businessFeeInfo.get("fee_id")); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 撤单 |
| | | * 从business表中查询到DEL的数据 将instance中的数据更新回来 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doRecover(DataFlowContext dataFlowContext, Business business) { |
| | | String bId = business.getbId(); |
| | | //Assert.hasLength(bId,"请求报文中没有包含 bId"); |
| | | Map info = new HashMap(); |
| | | info.put("bId",bId); |
| | | info.put("statusCd",StatusConstant.STATUS_CD_INVALID); |
| | | |
| | | Map delInfo = new HashMap(); |
| | | delInfo.put("bId",business.getbId()); |
| | | delInfo.put("operate",StatusConstant.OPERATE_DEL); |
| | | //费用信息 |
| | | List<Map> feeInfo = feeServiceDaoImpl.getFeeInfo(info); |
| | | if(feeInfo != null && feeInfo.size() > 0){ |
| | | |
| | | //费用信息 |
| | | List<Map> businessFeeInfos = feeServiceDaoImpl.getBusinessFeeInfo(delInfo); |
| | | //除非程序出错了,这里不会为空 |
| | | if(businessFeeInfos == null || businessFeeInfos.size() == 0){ |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(fee),程序内部异常,请检查! "+delInfo); |
| | | } |
| | | for (int _feeIndex = 0; _feeIndex < businessFeeInfos.size();_feeIndex++) { |
| | | Map businessFeeInfo = businessFeeInfos.get(_feeIndex); |
| | | flushBusinessFeeInfo(businessFeeInfo,StatusConstant.STATUS_CD_VALID); |
| | | feeServiceDaoImpl.updateFeeInfoInstance(businessFeeInfo); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 处理 businessFee 节点 |
| | | * @param business 总的数据节点 |
| | | * @param businessFee 费用节点 |
| | | */ |
| | | private void doBusinessFee(Business business,JSONObject businessFee){ |
| | | |
| | | Assert.jsonObjectHaveKey(businessFee,"feeId","businessFee 节点下没有包含 feeId 节点"); |
| | | |
| | | if(businessFee.getString("feeId").startsWith("-")){ |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"feeId 错误,不能自动生成(必须已经存在的feeId)"+businessFee); |
| | | } |
| | | //自动插入DEL |
| | | autoSaveDelBusinessFee(business,businessFee); |
| | | } |
| | | |
| | | public IFeeServiceDao getFeeServiceDaoImpl() { |
| | | return feeServiceDaoImpl; |
| | | } |
| | | |
| | | public void setFeeServiceDaoImpl(IFeeServiceDao feeServiceDaoImpl) { |
| | | this.feeServiceDaoImpl = feeServiceDaoImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.fee.listener.fee; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.common.constant.BusinessTypeConstant; |
| | | import com.java110.common.constant.StatusConstant; |
| | | import com.java110.common.util.Assert; |
| | | import com.java110.fee.dao.IFeeServiceDao; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.entity.center.Business; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 保存 费用信息 侦听 |
| | | * Created by wuxw on 2018/5/18. |
| | | */ |
| | | @Java110Listener("saveFeeInfoListener") |
| | | @Transactional |
| | | public class SaveFeeInfoListener extends AbstractFeeBusinessServiceDataFlowListener{ |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(SaveFeeInfoListener.class); |
| | | |
| | | @Autowired |
| | | private IFeeServiceDao feeServiceDaoImpl; |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public String getBusinessTypeCd() { |
| | | return BusinessTypeConstant.BUSINESS_TYPE_SAVE_FEE_INFO; |
| | | } |
| | | |
| | | /** |
| | | * 保存费用信息 business 表中 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) { |
| | | JSONObject data = business.getDatas(); |
| | | Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理"); |
| | | |
| | | //处理 businessFee 节点 |
| | | if(data.containsKey("businessFee")){ |
| | | Object bObj = data.get("businessFee"); |
| | | JSONArray businessFees = null; |
| | | if(bObj instanceof JSONObject){ |
| | | businessFees = new JSONArray(); |
| | | businessFees.add(bObj); |
| | | }else { |
| | | businessFees = (JSONArray)bObj; |
| | | } |
| | | //JSONObject businessFee = data.getJSONObject("businessFee"); |
| | | for (int bFeeIndex = 0; bFeeIndex < businessFees.size();bFeeIndex++) { |
| | | JSONObject businessFee = businessFees.getJSONObject(bFeeIndex); |
| | | doBusinessFee(business, businessFee); |
| | | if(bObj instanceof JSONObject) { |
| | | dataFlowContext.addParamOut("feeId", businessFee.getString("feeId")); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * business 数据转移到 instance |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) { |
| | | JSONObject data = business.getDatas(); |
| | | |
| | | Map info = new HashMap(); |
| | | info.put("bId",business.getbId()); |
| | | info.put("operate",StatusConstant.OPERATE_ADD); |
| | | |
| | | //费用信息 |
| | | List<Map> businessFeeInfo = feeServiceDaoImpl.getBusinessFeeInfo(info); |
| | | if( businessFeeInfo != null && businessFeeInfo.size() >0) { |
| | | reFreshShareColumn(info, businessFeeInfo.get(0)); |
| | | feeServiceDaoImpl.saveFeeInfoInstance(info); |
| | | if(businessFeeInfo.size() == 1) { |
| | | dataFlowContext.addParamOut("feeId", businessFeeInfo.get(0).get("fee_id")); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 刷 分片字段 |
| | | * |
| | | * @param info 查询对象 |
| | | * @param businessInfo 小区ID |
| | | */ |
| | | private void reFreshShareColumn(Map info, Map businessInfo) { |
| | | |
| | | if (info.containsKey("feeId")) { |
| | | return; |
| | | } |
| | | |
| | | if (!businessInfo.containsKey("fee_id")) { |
| | | return; |
| | | } |
| | | |
| | | info.put("feeId", businessInfo.get("fee_id")); |
| | | } |
| | | /** |
| | | * 撤单 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doRecover(DataFlowContext dataFlowContext, Business business) { |
| | | String bId = business.getbId(); |
| | | //Assert.hasLength(bId,"请求报文中没有包含 bId"); |
| | | Map info = new HashMap(); |
| | | info.put("bId",bId); |
| | | info.put("statusCd",StatusConstant.STATUS_CD_VALID); |
| | | Map paramIn = new HashMap(); |
| | | paramIn.put("bId",bId); |
| | | paramIn.put("statusCd",StatusConstant.STATUS_CD_INVALID); |
| | | //费用信息 |
| | | List<Map> feeInfo = feeServiceDaoImpl.getFeeInfo(info); |
| | | if(feeInfo != null && feeInfo.size() > 0){ |
| | | reFreshShareColumn(paramIn, feeInfo.get(0)); |
| | | feeServiceDaoImpl.updateFeeInfoInstance(paramIn); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 处理 businessFee 节点 |
| | | * @param business 总的数据节点 |
| | | * @param businessFee 费用节点 |
| | | */ |
| | | private void doBusinessFee(Business business,JSONObject businessFee){ |
| | | |
| | | Assert.jsonObjectHaveKey(businessFee,"feeId","businessFee 节点下没有包含 feeId 节点"); |
| | | |
| | | if(businessFee.getString("feeId").startsWith("-")){ |
| | | //刷新缓存 |
| | | flushFeeId(business.getDatas()); |
| | | |
| | | //businessFee.put("feeId",GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_feeId)); |
| | | |
| | | } |
| | | |
| | | businessFee.put("bId",business.getbId()); |
| | | businessFee.put("operate", StatusConstant.OPERATE_ADD); |
| | | //保存费用信息 |
| | | feeServiceDaoImpl.saveBusinessFeeInfo(businessFee); |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 刷新 小区ID |
| | | * |
| | | * @param data |
| | | */ |
| | | private void flushFeeId(JSONObject data) { |
| | | |
| | | String feeId = GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_feeId); |
| | | JSONObject businessFee = data.getJSONObject("businessFee"); |
| | | businessFee.put("feeId", feeId); |
| | | //刷费用属性 |
| | | if (data.containsKey("businessFeeAttr")) { |
| | | JSONArray businessFeeAttrs = data.getJSONArray("businessFeeAttr"); |
| | | for (int businessFeeAttrIndex = 0; businessFeeAttrIndex < businessFeeAttrs.size(); businessFeeAttrIndex++) { |
| | | JSONObject businessFeeAttr = businessFeeAttrs.getJSONObject(businessFeeAttrIndex); |
| | | businessFeeAttr.put("feeId", feeId); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | public IFeeServiceDao getFeeServiceDaoImpl() { |
| | | return feeServiceDaoImpl; |
| | | } |
| | | |
| | | public void setFeeServiceDaoImpl(IFeeServiceDao feeServiceDaoImpl) { |
| | | this.feeServiceDaoImpl = feeServiceDaoImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.fee.listener.fee; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.common.constant.BusinessTypeConstant; |
| | | import com.java110.common.constant.ResponseConstant; |
| | | import com.java110.common.constant.StatusConstant; |
| | | import com.java110.common.exception.ListenerExecuteException; |
| | | import com.java110.common.util.Assert; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.entity.center.Business; |
| | | import com.java110.fee.dao.IFeeServiceDao; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 修改费用信息 侦听 |
| | | * |
| | | * 处理节点 |
| | | * 1、businessFee:{} 费用基本信息节点 |
| | | * 2、businessFeeAttr:[{}] 费用属性信息节点 |
| | | * 3、businessFeePhoto:[{}] 费用照片信息节点 |
| | | * 4、businessFeeCerdentials:[{}] 费用证件信息节点 |
| | | * 协议地址 :https://github.com/java110/MicroCommunity/wiki/%E4%BF%AE%E6%94%B9%E5%95%86%E6%88%B7%E4%BF%A1%E6%81%AF-%E5%8D%8F%E8%AE%AE |
| | | * Created by wuxw on 2018/5/18. |
| | | */ |
| | | @Java110Listener("updateFeeInfoListener") |
| | | @Transactional |
| | | public class UpdateFeeInfoListener extends AbstractFeeBusinessServiceDataFlowListener { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(UpdateFeeInfoListener.class); |
| | | @Autowired |
| | | private IFeeServiceDao feeServiceDaoImpl; |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return 2; |
| | | } |
| | | |
| | | @Override |
| | | public String getBusinessTypeCd() { |
| | | return BusinessTypeConstant.BUSINESS_TYPE_UPDATE_FEE_INFO; |
| | | } |
| | | |
| | | /** |
| | | * business过程 |
| | | * @param dataFlowContext 上下文对象 |
| | | * @param business 业务对象 |
| | | */ |
| | | @Override |
| | | protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) { |
| | | |
| | | JSONObject data = business.getDatas(); |
| | | |
| | | Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理"); |
| | | |
| | | //处理 businessFee 节点 |
| | | if(data.containsKey("businessFee")){ |
| | | //处理 businessFee 节点 |
| | | if(data.containsKey("businessFee")){ |
| | | Object _obj = data.get("businessFee"); |
| | | JSONArray businessFees = null; |
| | | if(_obj instanceof JSONObject){ |
| | | businessFees = new JSONArray(); |
| | | businessFees.add(_obj); |
| | | }else { |
| | | businessFees = (JSONArray)_obj; |
| | | } |
| | | //JSONObject businessFee = data.getJSONObject("businessFee"); |
| | | for (int _feeIndex = 0; _feeIndex < businessFees.size();_feeIndex++) { |
| | | JSONObject businessFee = businessFees.getJSONObject(_feeIndex); |
| | | doBusinessFee(business, businessFee); |
| | | if(_obj instanceof JSONObject) { |
| | | dataFlowContext.addParamOut("feeId", businessFee.getString("feeId")); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * business to instance 过程 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) { |
| | | |
| | | JSONObject data = business.getDatas(); |
| | | |
| | | Map info = new HashMap(); |
| | | info.put("bId",business.getbId()); |
| | | info.put("operate",StatusConstant.OPERATE_ADD); |
| | | |
| | | //费用信息 |
| | | List<Map> businessFeeInfos = feeServiceDaoImpl.getBusinessFeeInfo(info); |
| | | if( businessFeeInfos != null && businessFeeInfos.size() >0) { |
| | | for (int _feeIndex = 0; _feeIndex < businessFeeInfos.size();_feeIndex++) { |
| | | Map businessFeeInfo = businessFeeInfos.get(_feeIndex); |
| | | flushBusinessFeeInfo(businessFeeInfo,StatusConstant.STATUS_CD_VALID); |
| | | feeServiceDaoImpl.updateFeeInfoInstance(businessFeeInfo); |
| | | if(businessFeeInfo.size() == 1) { |
| | | dataFlowContext.addParamOut("feeId", businessFeeInfo.get("fee_id")); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 撤单 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doRecover(DataFlowContext dataFlowContext, Business business) { |
| | | |
| | | String bId = business.getbId(); |
| | | //Assert.hasLength(bId,"请求报文中没有包含 bId"); |
| | | Map info = new HashMap(); |
| | | info.put("bId",bId); |
| | | info.put("statusCd",StatusConstant.STATUS_CD_VALID); |
| | | Map delInfo = new HashMap(); |
| | | delInfo.put("bId",business.getbId()); |
| | | delInfo.put("operate",StatusConstant.OPERATE_DEL); |
| | | //费用信息 |
| | | List<Map> feeInfo = feeServiceDaoImpl.getFeeInfo(info); |
| | | if(feeInfo != null && feeInfo.size() > 0){ |
| | | |
| | | //费用信息 |
| | | List<Map> businessFeeInfos = feeServiceDaoImpl.getBusinessFeeInfo(delInfo); |
| | | //除非程序出错了,这里不会为空 |
| | | if(businessFeeInfos == null || businessFeeInfos.size() == 0){ |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(fee),程序内部异常,请检查! "+delInfo); |
| | | } |
| | | for (int _feeIndex = 0; _feeIndex < businessFeeInfos.size();_feeIndex++) { |
| | | Map businessFeeInfo = businessFeeInfos.get(_feeIndex); |
| | | flushBusinessFeeInfo(businessFeeInfo,StatusConstant.STATUS_CD_VALID); |
| | | feeServiceDaoImpl.updateFeeInfoInstance(businessFeeInfo); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 处理 businessFee 节点 |
| | | * @param business 总的数据节点 |
| | | * @param businessFee 费用节点 |
| | | */ |
| | | private void doBusinessFee(Business business,JSONObject businessFee){ |
| | | |
| | | Assert.jsonObjectHaveKey(businessFee,"feeId","businessFee 节点下没有包含 feeId 节点"); |
| | | |
| | | if(businessFee.getString("feeId").startsWith("-")){ |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"feeId 错误,不能自动生成(必须已经存在的feeId)"+businessFee); |
| | | } |
| | | //自动保存DEL |
| | | autoSaveDelBusinessFee(business,businessFee); |
| | | |
| | | businessFee.put("bId",business.getbId()); |
| | | businessFee.put("operate", StatusConstant.OPERATE_ADD); |
| | | //保存费用信息 |
| | | feeServiceDaoImpl.saveBusinessFeeInfo(businessFee); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | public IFeeServiceDao getFeeServiceDaoImpl() { |
| | | return feeServiceDaoImpl; |
| | | } |
| | | |
| | | public void setFeeServiceDaoImpl(IFeeServiceDao feeServiceDaoImpl) { |
| | | this.feeServiceDaoImpl = feeServiceDaoImpl; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.smo.impl; |
| | | |
| | | |
| | | import com.java110.common.util.BeanConvertUtil; |
| | | import com.java110.fee.dao.IFeeAttrServiceDao; |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.core.smo.fee.IFeeAttrInnerServiceSMO; |
| | | import com.java110.core.smo.user.IUserInnerServiceSMO; |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.dto.FeeAttrDto; |
| | | import com.java110.dto.UserDto; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.ArrayList; |
| | | 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 FeeAttrInnerServiceSMOImpl extends BaseServiceSMO implements IFeeAttrInnerServiceSMO { |
| | | |
| | | @Autowired |
| | | private IFeeAttrServiceDao feeAttrServiceDaoImpl; |
| | | |
| | | @Autowired |
| | | private IUserInnerServiceSMO userInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public List<FeeAttrDto> queryFeeAttrs(@RequestBody FeeAttrDto feeAttrDto) { |
| | | |
| | | //校验是否传了 分页信息 |
| | | |
| | | int page = feeAttrDto.getPage(); |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | feeAttrDto.setPage((page - 1) * feeAttrDto.getRow()); |
| | | feeAttrDto.setRow(page * feeAttrDto.getRow()); |
| | | } |
| | | |
| | | List<FeeAttrDto> feeAttrs = BeanConvertUtil.covertBeanList(feeAttrServiceDaoImpl.getFeeAttrInfo(BeanConvertUtil.beanCovertMap(feeAttrDto)), FeeAttrDto.class); |
| | | |
| | | |
| | | |
| | | return feeAttrs; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int queryFeeAttrsCount(@RequestBody FeeAttrDto feeAttrDto) { |
| | | return feeAttrServiceDaoImpl.queryFeeAttrsCount(BeanConvertUtil.beanCovertMap(feeAttrDto)); } |
| | | |
| | | public IFeeAttrServiceDao getFeeAttrServiceDaoImpl() { |
| | | return feeAttrServiceDaoImpl; |
| | | } |
| | | |
| | | public void setFeeAttrServiceDaoImpl(IFeeAttrServiceDao feeAttrServiceDaoImpl) { |
| | | this.feeAttrServiceDaoImpl = feeAttrServiceDaoImpl; |
| | | } |
| | | |
| | | public IUserInnerServiceSMO getUserInnerServiceSMOImpl() { |
| | | return userInnerServiceSMOImpl; |
| | | } |
| | | |
| | | public void setUserInnerServiceSMOImpl(IUserInnerServiceSMO userInnerServiceSMOImpl) { |
| | | this.userInnerServiceSMOImpl = userInnerServiceSMOImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.fee.smo.impl; |
| | | |
| | | |
| | | import com.java110.common.util.BeanConvertUtil; |
| | | import com.java110.fee.dao.IFeeConfigServiceDao; |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.core.smo.fee.IFeeConfigInnerServiceSMO; |
| | | import com.java110.core.smo.user.IUserInnerServiceSMO; |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.dto.FeeConfigDto; |
| | | import com.java110.dto.UserDto; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.ArrayList; |
| | | 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 FeeConfigInnerServiceSMOImpl extends BaseServiceSMO implements IFeeConfigInnerServiceSMO { |
| | | |
| | | @Autowired |
| | | private IFeeConfigServiceDao feeConfigServiceDaoImpl; |
| | | |
| | | @Autowired |
| | | private IUserInnerServiceSMO userInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public List<FeeConfigDto> queryFeeConfigs(@RequestBody FeeConfigDto feeConfigDto) { |
| | | |
| | | //校验是否传了 分页信息 |
| | | |
| | | int page = feeConfigDto.getPage(); |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | feeConfigDto.setPage((page - 1) * feeConfigDto.getRow()); |
| | | feeConfigDto.setRow(page * feeConfigDto.getRow()); |
| | | } |
| | | |
| | | List<FeeConfigDto> feeConfigs = BeanConvertUtil.covertBeanList(feeConfigServiceDaoImpl.getFeeConfigInfo(BeanConvertUtil.beanCovertMap(feeConfigDto)), FeeConfigDto.class); |
| | | |
| | | |
| | | return feeConfigs; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public int queryFeeConfigsCount(@RequestBody FeeConfigDto feeConfigDto) { |
| | | return feeConfigServiceDaoImpl.queryFeeConfigsCount(BeanConvertUtil.beanCovertMap(feeConfigDto)); } |
| | | |
| | | public IFeeConfigServiceDao getFeeConfigServiceDaoImpl() { |
| | | return feeConfigServiceDaoImpl; |
| | | } |
| | | |
| | | public void setFeeConfigServiceDaoImpl(IFeeConfigServiceDao feeConfigServiceDaoImpl) { |
| | | this.feeConfigServiceDaoImpl = feeConfigServiceDaoImpl; |
| | | } |
| | | |
| | | public IUserInnerServiceSMO getUserInnerServiceSMOImpl() { |
| | | return userInnerServiceSMOImpl; |
| | | } |
| | | |
| | | public void setUserInnerServiceSMOImpl(IUserInnerServiceSMO userInnerServiceSMOImpl) { |
| | | this.userInnerServiceSMOImpl = userInnerServiceSMOImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.fee.smo.impl; |
| | | |
| | | |
| | | import com.java110.common.util.BeanConvertUtil; |
| | | import com.java110.fee.dao.IFeeDetailServiceDao; |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.core.smo.fee.IFeeDetailInnerServiceSMO; |
| | | import com.java110.core.smo.user.IUserInnerServiceSMO; |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.dto.FeeDetailDto; |
| | | import com.java110.dto.UserDto; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.ArrayList; |
| | | 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 FeeDetailInnerServiceSMOImpl extends BaseServiceSMO implements IFeeDetailInnerServiceSMO { |
| | | |
| | | @Autowired |
| | | private IFeeDetailServiceDao feeDetailServiceDaoImpl; |
| | | |
| | | @Autowired |
| | | private IUserInnerServiceSMO userInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public List<FeeDetailDto> queryFeeDetails(@RequestBody FeeDetailDto feeDetailDto) { |
| | | |
| | | //校验是否传了 分页信息 |
| | | |
| | | int page = feeDetailDto.getPage(); |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | feeDetailDto.setPage((page - 1) * feeDetailDto.getRow()); |
| | | feeDetailDto.setRow(page * feeDetailDto.getRow()); |
| | | } |
| | | |
| | | List<FeeDetailDto> feeDetails = BeanConvertUtil.covertBeanList(feeDetailServiceDaoImpl.getFeeDetailInfo(BeanConvertUtil.beanCovertMap(feeDetailDto)), FeeDetailDto.class); |
| | | |
| | | return feeDetails; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int queryFeeDetailsCount(@RequestBody FeeDetailDto feeDetailDto) { |
| | | return feeDetailServiceDaoImpl.queryFeeDetailsCount(BeanConvertUtil.beanCovertMap(feeDetailDto)); } |
| | | |
| | | public IFeeDetailServiceDao getFeeDetailServiceDaoImpl() { |
| | | return feeDetailServiceDaoImpl; |
| | | } |
| | | |
| | | public void setFeeDetailServiceDaoImpl(IFeeDetailServiceDao feeDetailServiceDaoImpl) { |
| | | this.feeDetailServiceDaoImpl = feeDetailServiceDaoImpl; |
| | | } |
| | | |
| | | public IUserInnerServiceSMO getUserInnerServiceSMOImpl() { |
| | | return userInnerServiceSMOImpl; |
| | | } |
| | | |
| | | public void setUserInnerServiceSMOImpl(IUserInnerServiceSMO userInnerServiceSMOImpl) { |
| | | this.userInnerServiceSMOImpl = userInnerServiceSMOImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.fee.smo.impl; |
| | | |
| | | |
| | | import com.java110.fee.dao.IFeeServiceDao; |
| | | import com.java110.common.util.BeanConvertUtil; |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.core.smo.fee.IFeeInnerServiceSMO; |
| | | import com.java110.core.smo.user.IUserInnerServiceSMO; |
| | | import com.java110.dto.FeeDto; |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.dto.UserDto; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.ArrayList; |
| | | 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 FeeInnerServiceSMOImpl extends BaseServiceSMO implements IFeeInnerServiceSMO { |
| | | |
| | | @Autowired |
| | | private IFeeServiceDao feeServiceDaoImpl; |
| | | |
| | | @Autowired |
| | | private IUserInnerServiceSMO userInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public List<FeeDto> queryFees(@RequestBody FeeDto feeDto) { |
| | | |
| | | //校验是否传了 分页信息 |
| | | |
| | | int page = feeDto.getPage(); |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | feeDto.setPage((page - 1) * feeDto.getRow()); |
| | | feeDto.setRow(page * feeDto.getRow()); |
| | | } |
| | | |
| | | List<FeeDto> fees = BeanConvertUtil.covertBeanList(feeServiceDaoImpl.getFeeInfo(BeanConvertUtil.beanCovertMap(feeDto)), FeeDto.class); |
| | | |
| | | if (fees == null || fees.size() == 0) { |
| | | return fees; |
| | | } |
| | | |
| | | String[] userIds = getUserIds(fees); |
| | | //根据 userId 查询用户信息 |
| | | List<UserDto> users = userInnerServiceSMOImpl.getUserInfo(userIds); |
| | | |
| | | for (FeeDto fee : fees) { |
| | | refreshFee(fee, users); |
| | | } |
| | | return fees; |
| | | } |
| | | |
| | | /** |
| | | * 从用户列表中查询用户,将用户中的信息 刷新到 floor对象中 |
| | | * |
| | | * @param fee 小区费用信息 |
| | | * @param users 用户列表 |
| | | */ |
| | | private void refreshFee(FeeDto fee, List<UserDto> users) { |
| | | for (UserDto user : users) { |
| | | if (fee.getUserId().equals(user.getUserId())) { |
| | | BeanConvertUtil.covertBean(user, fee); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取批量userId |
| | | * |
| | | * @param fees 小区楼信息 |
| | | * @return 批量userIds 信息 |
| | | */ |
| | | private String[] getUserIds(List<FeeDto> fees) { |
| | | List<String> userIds = new ArrayList<String>(); |
| | | for (FeeDto fee : fees) { |
| | | userIds.add(fee.getUserId()); |
| | | } |
| | | |
| | | return userIds.toArray(new String[userIds.size()]); |
| | | } |
| | | |
| | | @Override |
| | | public int queryFeesCount(@RequestBody FeeDto feeDto) { |
| | | return feeServiceDaoImpl.queryFeesCount(BeanConvertUtil.beanCovertMap(feeDto)); } |
| | | |
| | | public IFeeServiceDao getFeeServiceDaoImpl() { |
| | | return feeServiceDaoImpl; |
| | | } |
| | | |
| | | public void setFeeServiceDaoImpl(IFeeServiceDao feeServiceDaoImpl) { |
| | | this.feeServiceDaoImpl = feeServiceDaoImpl; |
| | | } |
| | | |
| | | public IUserInnerServiceSMO getUserInnerServiceSMOImpl() { |
| | | return userInnerServiceSMOImpl; |
| | | } |
| | | |
| | | public void setUserInnerServiceSMOImpl(IUserInnerServiceSMO userInnerServiceSMOImpl) { |
| | | this.userInnerServiceSMOImpl = userInnerServiceSMOImpl; |
| | | } |
| | | } |
| | |
| | | * [房屋售卖](services/owner/SaveOwnerRoomRelInfo.md) |
| | | * [修改业主](services/owner/UpdateOwnerRoomRelInfo.md) |
| | | * [删除业主](services/owner/DeleteOwnerRoomRelInfo.md) |
| | | * [保存费用](services/fee/SaveFeeInfo.md) |
| | | * [修改费用](services/fee/UpdateFeeInfo.md) |
| | | * [删除费用](services/fee/DeleteFeeInfo.md) |
| | | * [保存费用属性](services/fee/SaveFeeAttrInfo.md) |
| | | * [修改费用属性](services/fee/UpdateFeeAttrInfo.md) |
| | | * [删除费用属性](services/fee/DeleteFeeAttrInfo.md) |
| | | * [保存费用明细](services/fee/SaveFeeDetailInfo.md) |
| | | * [修改费用明细](services/fee/UpdateFeeDetailInfo.md) |
| | | * [删除费用明细](services/fee/DeleteFeeDetailInfo.md) |
| | | * [保存费用配置](services/fee/SaveFeeConfigInfo.md) |
| | | * [修改费用配置](services/fee/UpdateFeeConfigInfo.md) |
| | | * [删除费用配置](services/fee/DeleteFeeConfigInfo.md) |
| | | |
| | | * 工具类接口 |
| | | |
| New file |
| | |
| | | |
| | | |
| | | **1\. 删除费用属性** |
| | | ###### 接口功能 |
| | | > API服务做删除费用属性时调用该接口 |
| | | |
| | | ###### URL |
| | | > [http://fee-service/feeAttrApi/service](http://fee-service/feeAttrApi/service) |
| | | |
| | | ###### 支持格式 |
| | | > JSON |
| | | |
| | | ###### HTTP请求方式 |
| | | > POST |
| | | |
| | | ###### 协议接口 |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-:| |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |-|business|1|Array|-|业务节点|-| |
| | | |
| | | ###### orders |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |orders|appId|1|String|10|系统ID|由中心服务提供| |
| | | |orders|transactionId|1|String|30|交互流水|appId+'00'+YYYYMMDD+10位序列| |
| | | |orders|userId|1|String|30|用户ID|已有用户ID| |
| | | |orders|orderTypeCd|1|String|4|订单类型|查看订单类型说明| |
| | | |orders|requestTime|1|String|14|请求时间|YYYYMMDDhhmmss| |
| | | |orders|remark|1|String|200|备注|备注| |
| | | |orders|sign|?|String|64|签名|查看加密说明| |
| | | |orders|attrs|?|Array|-|订单属性|-| |
| | | |attrs|specCd|1|String|12|规格编码|由中心服务提供| |
| | | |attrs|value|1|String|50|属性值|-| |
| | | |orders|response|1|Object|-|返回结果节点|-| |
| | | |response|code|1|String|4|返回状态|查看状态说明| |
| | | |response|message|1|String|200|返回状态描述|-| |
| | | |
| | | ###### business |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|business|?|Array|-|业务节点|-| |
| | | |business|businessTypeCd|1|String|12|业务类型编码|500100030002| |
| | | |business|datas|1|Object|-|数据节点|不同的服务下的节点不一样| |
| | | |datas|businessFeeAttr|1|Object|-|小区成员|小区成员| |
| | | |businessFeeAttr|attrId|1|String|30|-|-| |
| | | |
| | | |
| | | ###### 返回协议 |
| | | |
| | | 当http返回状态不为200 时请求处理失败 body内容为失败的原因 |
| | | |
| | | 当http返回状态为200时请求处理成功,body内容为返回内容, |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | ###### 举例 |
| | | > 地址:[http://fee-service/feeAttrApi/service](http://fee-service/feeAttrApi/service) |
| | | |
| | | ``` javascript |
| | | 请求头信息: |
| | | Content-Type:application/json |
| | | |
| | | 请求报文: |
| | | |
| | | { |
| | | "orders": { |
| | | "appId": "外系统ID,分配得到", |
| | | "transactionId": "100000000020180409224736000001", |
| | | "userId": "用户ID", |
| | | "orderTypeCd": "订单类型,查询,受理", |
| | | "requestTime": "20180409224736", |
| | | "remark": "备注", |
| | | "sign": "这个服务是否要求MD5签名", |
| | | "businessType":"I", |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | }, |
| | | "business": { |
| | | "businessTypeCd": "600100050001", |
| | | "bId":"1234567892", |
| | | "remark": "备注", |
| | | "datas": { |
| | | "businessFeeAttr": { |
| | | "attrId":"填写存在的值" |
| | | } |
| | | }, |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | } |
| | | } |
| | | |
| | | 返回报文: |
| | | { |
| | | "orderTypeCd": "D", |
| | | "response": { |
| | | "code": "0000", |
| | | "message": "成功" |
| | | }, |
| | | "responseTime": "20190418102004", |
| | | "bId": "202019041810750003", |
| | | "businessType": "B", |
| | | "transactionId": "3a5a411ec65a4c3f895935638aa1d2bc", |
| | | "dataFlowId": "44fde86d39ce46f4b4aab5f6b14f3947" |
| | | } |
| | | |
| | | ``` |
| New file |
| | |
| | | |
| | | |
| | | **1\. 删除费用配置** |
| | | ###### 接口功能 |
| | | > API服务做删除费用配置时调用该接口 |
| | | |
| | | ###### URL |
| | | > [http://fee-service/feeConfigApi/service](http://fee-service/feeConfigApi/service) |
| | | |
| | | ###### 支持格式 |
| | | > JSON |
| | | |
| | | ###### HTTP请求方式 |
| | | > POST |
| | | |
| | | ###### 协议接口 |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-:| |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |-|business|1|Array|-|业务节点|-| |
| | | |
| | | ###### orders |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |orders|appId|1|String|10|系统ID|由中心服务提供| |
| | | |orders|transactionId|1|String|30|交互流水|appId+'00'+YYYYMMDD+10位序列| |
| | | |orders|userId|1|String|30|用户ID|已有用户ID| |
| | | |orders|orderTypeCd|1|String|4|订单类型|查看订单类型说明| |
| | | |orders|requestTime|1|String|14|请求时间|YYYYMMDDhhmmss| |
| | | |orders|remark|1|String|200|备注|备注| |
| | | |orders|sign|?|String|64|签名|查看加密说明| |
| | | |orders|attrs|?|Array|-|订单属性|-| |
| | | |attrs|specCd|1|String|12|规格编码|由中心服务提供| |
| | | |attrs|value|1|String|50|属性值|-| |
| | | |orders|response|1|Object|-|返回结果节点|-| |
| | | |response|code|1|String|4|返回状态|查看状态说明| |
| | | |response|message|1|String|200|返回状态描述|-| |
| | | |
| | | ###### business |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|business|?|Array|-|业务节点|-| |
| | | |business|businessTypeCd|1|String|12|业务类型编码|500100030002| |
| | | |business|datas|1|Object|-|数据节点|不同的服务下的节点不一样| |
| | | |datas|businessFeeConfig|1|Object|-|小区成员|小区成员| |
| | | |businessFeeConfig|configId|1|String|30|-|-| |
| | | |
| | | |
| | | ###### 返回协议 |
| | | |
| | | 当http返回状态不为200 时请求处理失败 body内容为失败的原因 |
| | | |
| | | 当http返回状态为200时请求处理成功,body内容为返回内容, |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | ###### 举例 |
| | | > 地址:[http://fee-service/feeConfigApi/service](http://fee-service/feeConfigApi/service) |
| | | |
| | | ``` javascript |
| | | 请求头信息: |
| | | Content-Type:application/json |
| | | |
| | | 请求报文: |
| | | |
| | | { |
| | | "orders": { |
| | | "appId": "外系统ID,分配得到", |
| | | "transactionId": "100000000020180409224736000001", |
| | | "userId": "用户ID", |
| | | "orderTypeCd": "订单类型,查询,受理", |
| | | "requestTime": "20180409224736", |
| | | "remark": "备注", |
| | | "sign": "这个服务是否要求MD5签名", |
| | | "businessType":"I", |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | }, |
| | | "business": { |
| | | "businessTypeCd": "620100050001", |
| | | "bId":"1234567892", |
| | | "remark": "备注", |
| | | "datas": { |
| | | "businessFeeConfig": { |
| | | "configId":"填写存在的值" |
| | | } |
| | | }, |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | } |
| | | } |
| | | |
| | | 返回报文: |
| | | { |
| | | "orderTypeCd": "D", |
| | | "response": { |
| | | "code": "0000", |
| | | "message": "成功" |
| | | }, |
| | | "responseTime": "20190418102004", |
| | | "bId": "202019041810750003", |
| | | "businessType": "B", |
| | | "transactionId": "3a5a411ec65a4c3f895935638aa1d2bc", |
| | | "dataFlowId": "44fde86d39ce46f4b4aab5f6b14f3947" |
| | | } |
| | | |
| | | ``` |
| New file |
| | |
| | | |
| | | |
| | | **1\. 删除费用明细** |
| | | ###### 接口功能 |
| | | > API服务做删除费用明细时调用该接口 |
| | | |
| | | ###### URL |
| | | > [http://fee-service/feeDetailApi/service](http://fee-service/feeDetailApi/service) |
| | | |
| | | ###### 支持格式 |
| | | > JSON |
| | | |
| | | ###### HTTP请求方式 |
| | | > POST |
| | | |
| | | ###### 协议接口 |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-:| |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |-|business|1|Array|-|业务节点|-| |
| | | |
| | | ###### orders |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |orders|appId|1|String|10|系统ID|由中心服务提供| |
| | | |orders|transactionId|1|String|30|交互流水|appId+'00'+YYYYMMDD+10位序列| |
| | | |orders|userId|1|String|30|用户ID|已有用户ID| |
| | | |orders|orderTypeCd|1|String|4|订单类型|查看订单类型说明| |
| | | |orders|requestTime|1|String|14|请求时间|YYYYMMDDhhmmss| |
| | | |orders|remark|1|String|200|备注|备注| |
| | | |orders|sign|?|String|64|签名|查看加密说明| |
| | | |orders|attrs|?|Array|-|订单属性|-| |
| | | |attrs|specCd|1|String|12|规格编码|由中心服务提供| |
| | | |attrs|value|1|String|50|属性值|-| |
| | | |orders|response|1|Object|-|返回结果节点|-| |
| | | |response|code|1|String|4|返回状态|查看状态说明| |
| | | |response|message|1|String|200|返回状态描述|-| |
| | | |
| | | ###### business |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|business|?|Array|-|业务节点|-| |
| | | |business|businessTypeCd|1|String|12|业务类型编码|500100030002| |
| | | |business|datas|1|Object|-|数据节点|不同的服务下的节点不一样| |
| | | |datas|businessFeeDetail|1|Object|-|小区成员|小区成员| |
| | | |businessFeeDetail|detailId|1|String|30|-|-| |
| | | |
| | | |
| | | ###### 返回协议 |
| | | |
| | | 当http返回状态不为200 时请求处理失败 body内容为失败的原因 |
| | | |
| | | 当http返回状态为200时请求处理成功,body内容为返回内容, |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | ###### 举例 |
| | | > 地址:[http://fee-service/feeDetailApi/service](http://fee-service/feeDetailApi/service) |
| | | |
| | | ``` javascript |
| | | 请求头信息: |
| | | Content-Type:application/json |
| | | |
| | | 请求报文: |
| | | |
| | | { |
| | | "orders": { |
| | | "appId": "外系统ID,分配得到", |
| | | "transactionId": "100000000020180409224736000001", |
| | | "userId": "用户ID", |
| | | "orderTypeCd": "订单类型,查询,受理", |
| | | "requestTime": "20180409224736", |
| | | "remark": "备注", |
| | | "sign": "这个服务是否要求MD5签名", |
| | | "businessType":"I", |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | }, |
| | | "business": { |
| | | "businessTypeCd": "610100050001", |
| | | "bId":"1234567892", |
| | | "remark": "备注", |
| | | "datas": { |
| | | "businessFeeDetail": { |
| | | "detailId":"填写存在的值" |
| | | } |
| | | }, |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | } |
| | | } |
| | | |
| | | 返回报文: |
| | | { |
| | | "orderTypeCd": "D", |
| | | "response": { |
| | | "code": "0000", |
| | | "message": "成功" |
| | | }, |
| | | "responseTime": "20190418102004", |
| | | "bId": "202019041810750003", |
| | | "businessType": "B", |
| | | "transactionId": "3a5a411ec65a4c3f895935638aa1d2bc", |
| | | "dataFlowId": "44fde86d39ce46f4b4aab5f6b14f3947" |
| | | } |
| | | |
| | | ``` |
| New file |
| | |
| | | |
| | | |
| | | **1\. 删除费用** |
| | | ###### 接口功能 |
| | | > API服务做删除费用时调用该接口 |
| | | |
| | | ###### URL |
| | | > [http://fee-service/feeApi/service](http://fee-service/feeApi/service) |
| | | |
| | | ###### 支持格式 |
| | | > JSON |
| | | |
| | | ###### HTTP请求方式 |
| | | > POST |
| | | |
| | | ###### 协议接口 |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-:| |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |-|business|1|Array|-|业务节点|-| |
| | | |
| | | ###### orders |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |orders|appId|1|String|10|系统ID|由中心服务提供| |
| | | |orders|transactionId|1|String|30|交互流水|appId+'00'+YYYYMMDD+10位序列| |
| | | |orders|userId|1|String|30|用户ID|已有用户ID| |
| | | |orders|orderTypeCd|1|String|4|订单类型|查看订单类型说明| |
| | | |orders|requestTime|1|String|14|请求时间|YYYYMMDDhhmmss| |
| | | |orders|remark|1|String|200|备注|备注| |
| | | |orders|sign|?|String|64|签名|查看加密说明| |
| | | |orders|attrs|?|Array|-|订单属性|-| |
| | | |attrs|specCd|1|String|12|规格编码|由中心服务提供| |
| | | |attrs|value|1|String|50|属性值|-| |
| | | |orders|response|1|Object|-|返回结果节点|-| |
| | | |response|code|1|String|4|返回状态|查看状态说明| |
| | | |response|message|1|String|200|返回状态描述|-| |
| | | |
| | | ###### business |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|business|?|Array|-|业务节点|-| |
| | | |business|businessTypeCd|1|String|12|业务类型编码|500100030002| |
| | | |business|datas|1|Object|-|数据节点|不同的服务下的节点不一样| |
| | | |datas|businessFeeInfo|1|Object|-|小区成员|小区成员| |
| | | |businessFeeInfo|feeId|1|String|30|-|-| |
| | | |
| | | |
| | | ###### 返回协议 |
| | | |
| | | 当http返回状态不为200 时请求处理失败 body内容为失败的原因 |
| | | |
| | | 当http返回状态为200时请求处理成功,body内容为返回内容, |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | ###### 举例 |
| | | > 地址:[http://fee-service/feeApi/service](http://fee-service/feeApi/service) |
| | | |
| | | ``` javascript |
| | | 请求头信息: |
| | | Content-Type:application/json |
| | | |
| | | 请求报文: |
| | | |
| | | { |
| | | "orders": { |
| | | "appId": "外系统ID,分配得到", |
| | | "transactionId": "100000000020180409224736000001", |
| | | "userId": "用户ID", |
| | | "orderTypeCd": "订单类型,查询,受理", |
| | | "requestTime": "20180409224736", |
| | | "remark": "备注", |
| | | "sign": "这个服务是否要求MD5签名", |
| | | "businessType":"I", |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | }, |
| | | "business": { |
| | | "businessTypeCd": "600100050001", |
| | | "bId":"1234567892", |
| | | "remark": "备注", |
| | | "datas": { |
| | | "businessFeeInfo": { |
| | | "feeId":"填写存在的值" |
| | | } |
| | | }, |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | } |
| | | } |
| | | |
| | | 返回报文: |
| | | { |
| | | "orderTypeCd": "D", |
| | | "response": { |
| | | "code": "0000", |
| | | "message": "成功" |
| | | }, |
| | | "responseTime": "20190418102004", |
| | | "bId": "202019041810750003", |
| | | "businessType": "B", |
| | | "transactionId": "3a5a411ec65a4c3f895935638aa1d2bc", |
| | | "dataFlowId": "44fde86d39ce46f4b4aab5f6b14f3947" |
| | | } |
| | | |
| | | ``` |
| New file |
| | |
| | | |
| | | |
| | | **1\. 保存费用属性** |
| | | ###### 接口功能 |
| | | > API服务做保存费用属性时调用该接口 |
| | | |
| | | ###### URL |
| | | > [http://fee-service/feeAttrApi/service](http://fee-service/feeAttrApi/service) |
| | | |
| | | ###### 支持格式 |
| | | > JSON |
| | | |
| | | ###### HTTP请求方式 |
| | | > POST |
| | | |
| | | ###### 协议接口 |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-:| |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |-|business|1|Array|-|业务节点|-| |
| | | |
| | | ###### orders |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |orders|appId|1|String|10|系统ID|由中心服务提供| |
| | | |orders|transactionId|1|String|30|交互流水|appId+'00'+YYYYMMDD+10位序列| |
| | | |orders|userId|1|String|30|用户ID|已有用户ID| |
| | | |orders|orderTypeCd|1|String|4|订单类型|查看订单类型说明| |
| | | |orders|requestTime|1|String|14|请求时间|YYYYMMDDhhmmss| |
| | | |orders|remark|1|String|200|备注|备注| |
| | | |orders|sign|?|String|64|签名|查看加密说明| |
| | | |orders|attrs|?|Array|-|订单属性|-| |
| | | |attrs|specCd|1|String|12|规格编码|由中心服务提供| |
| | | |attrs|value|1|String|50|属性值|-| |
| | | |orders|response|1|Object|-|返回结果节点|-| |
| | | |response|code|1|String|4|返回状态|查看状态说明| |
| | | |response|message|1|String|200|返回状态描述|-| |
| | | |
| | | ###### business |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|business|?|Array|-|业务节点|-| |
| | | |business|businessTypeCd|1|String|12|业务类型编码|500100030002| |
| | | |business|datas|1|Object|-|数据节点|不同的服务下的节点不一样| |
| | | |datas|businessFeeAttr|1|Object|-|小区成员|小区成员| |
| | | |businessFeeAttr|attrId|1|String|30|-|-| |
| | | |businessFeeAttr|specCd|1|String|30|-|-| |
| | | |businessFeeAttr|communityId|1|String|30|-|-| |
| | | |businessFeeAttr|feeId|1|String|30|-|-| |
| | | |businessFeeAttr|value|1|String|30|-|-| |
| | | |
| | | |
| | | ###### 返回协议 |
| | | |
| | | 当http返回状态不为200 时请求处理失败 body内容为失败的原因 |
| | | |
| | | 当http返回状态为200时请求处理成功,body内容为返回内容, |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | ###### 举例 |
| | | > 地址:[http://fee-service/feeAttrApi/service](http://fee-service/feeAttrApi/service) |
| | | |
| | | ``` javascript |
| | | 请求头信息: |
| | | Content-Type:application/json |
| | | |
| | | 请求报文: |
| | | |
| | | { |
| | | "orders": { |
| | | "appId": "外系统ID,分配得到", |
| | | "transactionId": "100000000020180409224736000001", |
| | | "userId": "用户ID", |
| | | "orderTypeCd": "订单类型,查询,受理", |
| | | "requestTime": "20180409224736", |
| | | "remark": "备注", |
| | | "sign": "这个服务是否要求MD5签名", |
| | | "businessType":"I", |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | }, |
| | | "business": { |
| | | "businessTypeCd": "600100030001", |
| | | "bId":"1234567892", |
| | | "remark": "备注", |
| | | "datas": { |
| | | "businessFeeAttr": { |
| | | "attrId":"填写具体值", |
| | | "specCd":"填写具体值", |
| | | "communityId":"填写具体值", |
| | | "feeId":"填写具体值", |
| | | "value":"填写具体值" |
| | | } |
| | | }, |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | } |
| | | } |
| | | |
| | | 返回报文: |
| | | { |
| | | "orderTypeCd": "D", |
| | | "response": { |
| | | "code": "0000", |
| | | "message": "成功" |
| | | }, |
| | | "responseTime": "20190418102004", |
| | | "bId": "202019041810750003", |
| | | "businessType": "B", |
| | | "transactionId": "3a5a411ec65a4c3f895935638aa1d2bc", |
| | | "dataFlowId": "44fde86d39ce46f4b4aab5f6b14f3947" |
| | | } |
| | | |
| | | ``` |
| New file |
| | |
| | | |
| | | |
| | | **1\. 保存费用配置** |
| | | ###### 接口功能 |
| | | > API服务做保存费用配置时调用该接口 |
| | | |
| | | ###### URL |
| | | > [http://fee-service/feeConfigApi/service](http://fee-service/feeConfigApi/service) |
| | | |
| | | ###### 支持格式 |
| | | > JSON |
| | | |
| | | ###### HTTP请求方式 |
| | | > POST |
| | | |
| | | ###### 协议接口 |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-:| |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |-|business|1|Array|-|业务节点|-| |
| | | |
| | | ###### orders |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |orders|appId|1|String|10|系统ID|由中心服务提供| |
| | | |orders|transactionId|1|String|30|交互流水|appId+'00'+YYYYMMDD+10位序列| |
| | | |orders|userId|1|String|30|用户ID|已有用户ID| |
| | | |orders|orderTypeCd|1|String|4|订单类型|查看订单类型说明| |
| | | |orders|requestTime|1|String|14|请求时间|YYYYMMDDhhmmss| |
| | | |orders|remark|1|String|200|备注|备注| |
| | | |orders|sign|?|String|64|签名|查看加密说明| |
| | | |orders|attrs|?|Array|-|订单属性|-| |
| | | |attrs|specCd|1|String|12|规格编码|由中心服务提供| |
| | | |attrs|value|1|String|50|属性值|-| |
| | | |orders|response|1|Object|-|返回结果节点|-| |
| | | |response|code|1|String|4|返回状态|查看状态说明| |
| | | |response|message|1|String|200|返回状态描述|-| |
| | | |
| | | ###### business |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|business|?|Array|-|业务节点|-| |
| | | |business|businessTypeCd|1|String|12|业务类型编码|500100030002| |
| | | |business|datas|1|Object|-|数据节点|不同的服务下的节点不一样| |
| | | |datas|businessFeeConfig|1|Object|-|小区成员|小区成员| |
| | | |businessFeeConfig|squarePrice|1|String|30|-|-| |
| | | |businessFeeConfig|feeTypeCd|1|String|30|-|-| |
| | | |businessFeeConfig|configId|1|String|30|-|-| |
| | | |businessFeeConfig|additionalAmount|1|String|30|-|-| |
| | | |businessFeeConfig|startTime|1|String|30|-|-| |
| | | |businessFeeConfig|communityId|1|String|30|-|-| |
| | | |
| | | |
| | | ###### 返回协议 |
| | | |
| | | 当http返回状态不为200 时请求处理失败 body内容为失败的原因 |
| | | |
| | | 当http返回状态为200时请求处理成功,body内容为返回内容, |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | ###### 举例 |
| | | > 地址:[http://fee-service/feeConfigApi/service](http://fee-service/feeConfigApi/service) |
| | | |
| | | ``` javascript |
| | | 请求头信息: |
| | | Content-Type:application/json |
| | | |
| | | 请求报文: |
| | | |
| | | { |
| | | "orders": { |
| | | "appId": "外系统ID,分配得到", |
| | | "transactionId": "100000000020180409224736000001", |
| | | "userId": "用户ID", |
| | | "orderTypeCd": "订单类型,查询,受理", |
| | | "requestTime": "20180409224736", |
| | | "remark": "备注", |
| | | "sign": "这个服务是否要求MD5签名", |
| | | "businessType":"I", |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | }, |
| | | "business": { |
| | | "businessTypeCd": "620100030001", |
| | | "bId":"1234567892", |
| | | "remark": "备注", |
| | | "datas": { |
| | | "businessFeeConfig": { |
| | | "squarePrice":"填写具体值", |
| | | "feeTypeCd":"填写具体值", |
| | | "configId":"填写具体值", |
| | | "additionalAmount":"填写具体值", |
| | | "startTime":"填写具体值", |
| | | "communityId":"填写具体值" |
| | | } |
| | | }, |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | } |
| | | } |
| | | |
| | | 返回报文: |
| | | { |
| | | "orderTypeCd": "D", |
| | | "response": { |
| | | "code": "0000", |
| | | "message": "成功" |
| | | }, |
| | | "responseTime": "20190418102004", |
| | | "bId": "202019041810750003", |
| | | "businessType": "B", |
| | | "transactionId": "3a5a411ec65a4c3f895935638aa1d2bc", |
| | | "dataFlowId": "44fde86d39ce46f4b4aab5f6b14f3947" |
| | | } |
| | | |
| | | ``` |
| New file |
| | |
| | | |
| | | |
| | | **1\. 保存费用明细** |
| | | ###### 接口功能 |
| | | > API服务做保存费用明细时调用该接口 |
| | | |
| | | ###### URL |
| | | > [http://fee-service/feeDetailApi/service](http://fee-service/feeDetailApi/service) |
| | | |
| | | ###### 支持格式 |
| | | > JSON |
| | | |
| | | ###### HTTP请求方式 |
| | | > POST |
| | | |
| | | ###### 协议接口 |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-:| |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |-|business|1|Array|-|业务节点|-| |
| | | |
| | | ###### orders |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |orders|appId|1|String|10|系统ID|由中心服务提供| |
| | | |orders|transactionId|1|String|30|交互流水|appId+'00'+YYYYMMDD+10位序列| |
| | | |orders|userId|1|String|30|用户ID|已有用户ID| |
| | | |orders|orderTypeCd|1|String|4|订单类型|查看订单类型说明| |
| | | |orders|requestTime|1|String|14|请求时间|YYYYMMDDhhmmss| |
| | | |orders|remark|1|String|200|备注|备注| |
| | | |orders|sign|?|String|64|签名|查看加密说明| |
| | | |orders|attrs|?|Array|-|订单属性|-| |
| | | |attrs|specCd|1|String|12|规格编码|由中心服务提供| |
| | | |attrs|value|1|String|50|属性值|-| |
| | | |orders|response|1|Object|-|返回结果节点|-| |
| | | |response|code|1|String|4|返回状态|查看状态说明| |
| | | |response|message|1|String|200|返回状态描述|-| |
| | | |
| | | ###### business |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|business|?|Array|-|业务节点|-| |
| | | |business|businessTypeCd|1|String|12|业务类型编码|500100030002| |
| | | |business|datas|1|Object|-|数据节点|不同的服务下的节点不一样| |
| | | |datas|businessFeeDetail|1|Object|-|小区成员|小区成员| |
| | | |businessFeeDetail|primeRate|1|String|30|-|-| |
| | | |businessFeeDetail|detailId|1|String|30|-|-| |
| | | |businessFeeDetail|receivableAmount|1|String|30|-|-| |
| | | |businessFeeDetail|cycles|1|String|30|-|-| |
| | | |businessFeeDetail|remark|1|String|30|-|-| |
| | | |businessFeeDetail|receivedAmount|1|String|30|-|-| |
| | | |businessFeeDetail|communityId|1|String|30|-|-| |
| | | |businessFeeDetail|feeId|1|String|30|-|-| |
| | | |
| | | |
| | | ###### 返回协议 |
| | | |
| | | 当http返回状态不为200 时请求处理失败 body内容为失败的原因 |
| | | |
| | | 当http返回状态为200时请求处理成功,body内容为返回内容, |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | ###### 举例 |
| | | > 地址:[http://fee-service/feeDetailApi/service](http://fee-service/feeDetailApi/service) |
| | | |
| | | ``` javascript |
| | | 请求头信息: |
| | | Content-Type:application/json |
| | | |
| | | 请求报文: |
| | | |
| | | { |
| | | "orders": { |
| | | "appId": "外系统ID,分配得到", |
| | | "transactionId": "100000000020180409224736000001", |
| | | "userId": "用户ID", |
| | | "orderTypeCd": "订单类型,查询,受理", |
| | | "requestTime": "20180409224736", |
| | | "remark": "备注", |
| | | "sign": "这个服务是否要求MD5签名", |
| | | "businessType":"I", |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | }, |
| | | "business": { |
| | | "businessTypeCd": "610100030001", |
| | | "bId":"1234567892", |
| | | "remark": "备注", |
| | | "datas": { |
| | | "businessFeeDetail": { |
| | | "primeRate":"填写具体值", |
| | | "detailId":"填写具体值", |
| | | "receivableAmount":"填写具体值", |
| | | "cycles":"填写具体值", |
| | | "remark":"填写具体值", |
| | | "receivedAmount":"填写具体值", |
| | | "communityId":"填写具体值", |
| | | "feeId":"填写具体值" |
| | | } |
| | | }, |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | } |
| | | } |
| | | |
| | | 返回报文: |
| | | { |
| | | "orderTypeCd": "D", |
| | | "response": { |
| | | "code": "0000", |
| | | "message": "成功" |
| | | }, |
| | | "responseTime": "20190418102004", |
| | | "bId": "202019041810750003", |
| | | "businessType": "B", |
| | | "transactionId": "3a5a411ec65a4c3f895935638aa1d2bc", |
| | | "dataFlowId": "44fde86d39ce46f4b4aab5f6b14f3947" |
| | | } |
| | | |
| | | ``` |
| New file |
| | |
| | | |
| | | |
| | | **1\. 保存费用** |
| | | ###### 接口功能 |
| | | > API服务做保存费用时调用该接口 |
| | | |
| | | ###### URL |
| | | > [http://fee-service/feeApi/service](http://fee-service/feeApi/service) |
| | | |
| | | ###### 支持格式 |
| | | > JSON |
| | | |
| | | ###### HTTP请求方式 |
| | | > POST |
| | | |
| | | ###### 协议接口 |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-:| |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |-|business|1|Array|-|业务节点|-| |
| | | |
| | | ###### orders |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |orders|appId|1|String|10|系统ID|由中心服务提供| |
| | | |orders|transactionId|1|String|30|交互流水|appId+'00'+YYYYMMDD+10位序列| |
| | | |orders|userId|1|String|30|用户ID|已有用户ID| |
| | | |orders|orderTypeCd|1|String|4|订单类型|查看订单类型说明| |
| | | |orders|requestTime|1|String|14|请求时间|YYYYMMDDhhmmss| |
| | | |orders|remark|1|String|200|备注|备注| |
| | | |orders|sign|?|String|64|签名|查看加密说明| |
| | | |orders|attrs|?|Array|-|订单属性|-| |
| | | |attrs|specCd|1|String|12|规格编码|由中心服务提供| |
| | | |attrs|value|1|String|50|属性值|-| |
| | | |orders|response|1|Object|-|返回结果节点|-| |
| | | |response|code|1|String|4|返回状态|查看状态说明| |
| | | |response|message|1|String|200|返回状态描述|-| |
| | | |
| | | ###### business |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|business|?|Array|-|业务节点|-| |
| | | |business|businessTypeCd|1|String|12|业务类型编码|500100030002| |
| | | |business|datas|1|Object|-|数据节点|不同的服务下的节点不一样| |
| | | |datas|businessFeeInfo|1|Object|-|小区成员|小区成员| |
| | | |businessFeeInfo|amount|1|String|30|-|-| |
| | | |businessFeeInfo|incomeObjId|1|String|30|-|-| |
| | | |businessFeeInfo|feeTypeCd|1|String|30|-|-| |
| | | |businessFeeInfo|startTime|1|String|30|-|-| |
| | | |businessFeeInfo|endTime|1|String|30|-|-| |
| | | |businessFeeInfo|communityId|1|String|30|-|-| |
| | | |businessFeeInfo|feeId|1|String|30|-|-| |
| | | |businessFeeInfo|userId|1|String|30|-|-| |
| | | |businessFeeInfo|payerObjId|1|String|30|-|-| |
| | | |
| | | |
| | | ###### 返回协议 |
| | | |
| | | 当http返回状态不为200 时请求处理失败 body内容为失败的原因 |
| | | |
| | | 当http返回状态为200时请求处理成功,body内容为返回内容, |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | ###### 举例 |
| | | > 地址:[http://fee-service/feeApi/service](http://fee-service/feeApi/service) |
| | | |
| | | ``` javascript |
| | | 请求头信息: |
| | | Content-Type:application/json |
| | | |
| | | 请求报文: |
| | | |
| | | { |
| | | "orders": { |
| | | "appId": "外系统ID,分配得到", |
| | | "transactionId": "100000000020180409224736000001", |
| | | "userId": "用户ID", |
| | | "orderTypeCd": "订单类型,查询,受理", |
| | | "requestTime": "20180409224736", |
| | | "remark": "备注", |
| | | "sign": "这个服务是否要求MD5签名", |
| | | "businessType":"I", |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | }, |
| | | "business": { |
| | | "businessTypeCd": "600100030001", |
| | | "bId":"1234567892", |
| | | "remark": "备注", |
| | | "datas": { |
| | | "businessFeeInfo": { |
| | | "amount":"填写具体值", |
| | | "incomeObjId":"填写具体值", |
| | | "feeTypeCd":"填写具体值", |
| | | "startTime":"填写具体值", |
| | | "endTime":"填写具体值", |
| | | "communityId":"填写具体值", |
| | | "feeId":"填写具体值", |
| | | "userId":"填写具体值", |
| | | "payerObjId":"填写具体值" |
| | | } |
| | | }, |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | } |
| | | } |
| | | |
| | | 返回报文: |
| | | { |
| | | "orderTypeCd": "D", |
| | | "response": { |
| | | "code": "0000", |
| | | "message": "成功" |
| | | }, |
| | | "responseTime": "20190418102004", |
| | | "bId": "202019041810750003", |
| | | "businessType": "B", |
| | | "transactionId": "3a5a411ec65a4c3f895935638aa1d2bc", |
| | | "dataFlowId": "44fde86d39ce46f4b4aab5f6b14f3947" |
| | | } |
| | | |
| | | ``` |
| New file |
| | |
| | | |
| | | |
| | | **1\. 修改费用属性** |
| | | ###### 接口功能 |
| | | > API服务做修改费用属性时调用该接口 |
| | | |
| | | ###### URL |
| | | > [http://fee-service/feeAttrApi/service](http://fee-service/feeAttrApi/service) |
| | | |
| | | ###### 支持格式 |
| | | > JSON |
| | | |
| | | ###### HTTP请求方式 |
| | | > POST |
| | | |
| | | ###### 协议接口 |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-:| |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |-|business|1|Array|-|业务节点|-| |
| | | |
| | | ###### orders |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |orders|appId|1|String|10|系统ID|由中心服务提供| |
| | | |orders|transactionId|1|String|30|交互流水|appId+'00'+YYYYMMDD+10位序列| |
| | | |orders|userId|1|String|30|用户ID|已有用户ID| |
| | | |orders|orderTypeCd|1|String|4|订单类型|查看订单类型说明| |
| | | |orders|requestTime|1|String|14|请求时间|YYYYMMDDhhmmss| |
| | | |orders|remark|1|String|200|备注|备注| |
| | | |orders|sign|?|String|64|签名|查看加密说明| |
| | | |orders|attrs|?|Array|-|订单属性|-| |
| | | |attrs|specCd|1|String|12|规格编码|由中心服务提供| |
| | | |attrs|value|1|String|50|属性值|-| |
| | | |orders|response|1|Object|-|返回结果节点|-| |
| | | |response|code|1|String|4|返回状态|查看状态说明| |
| | | |response|message|1|String|200|返回状态描述|-| |
| | | |
| | | ###### business |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|business|?|Array|-|业务节点|-| |
| | | |business|businessTypeCd|1|String|12|业务类型编码|500100030002| |
| | | |business|datas|1|Object|-|数据节点|不同的服务下的节点不一样| |
| | | |datas|businessFeeAttr|1|Object|-|小区成员|小区成员| |
| | | |businessFeeAttr|attrId|1|String|30|-|-| |
| | | |businessFeeAttr|specCd|1|String|30|-|-| |
| | | |businessFeeAttr|communityId|1|String|30|-|-| |
| | | |businessFeeAttr|feeId|1|String|30|-|-| |
| | | |businessFeeAttr|value|1|String|30|-|-| |
| | | |
| | | |
| | | ###### 返回协议 |
| | | |
| | | 当http返回状态不为200 时请求处理失败 body内容为失败的原因 |
| | | |
| | | 当http返回状态为200时请求处理成功,body内容为返回内容, |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | ###### 举例 |
| | | > 地址:[http://fee-service/feeAttrApi/service](http://fee-service/feeAttrApi/service) |
| | | |
| | | ``` javascript |
| | | 请求头信息: |
| | | Content-Type:application/json |
| | | |
| | | 请求报文: |
| | | |
| | | { |
| | | "orders": { |
| | | "appId": "外系统ID,分配得到", |
| | | "transactionId": "100000000020180409224736000001", |
| | | "userId": "用户ID", |
| | | "orderTypeCd": "订单类型,查询,受理", |
| | | "requestTime": "20180409224736", |
| | | "remark": "备注", |
| | | "sign": "这个服务是否要求MD5签名", |
| | | "businessType":"I", |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | }, |
| | | "business": { |
| | | "businessTypeCd": "600100040001", |
| | | "bId":"1234567892", |
| | | "remark": "备注", |
| | | "datas": { |
| | | "businessFeeAttr": { |
| | | "attrId":"填写具体值", |
| | | "specCd":"填写具体值", |
| | | "communityId":"填写具体值", |
| | | "feeId":"填写具体值", |
| | | "value":"填写具体值" |
| | | } |
| | | }, |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | } |
| | | } |
| | | |
| | | 返回报文: |
| | | { |
| | | "orderTypeCd": "D", |
| | | "response": { |
| | | "code": "0000", |
| | | "message": "成功" |
| | | }, |
| | | "responseTime": "20190418102004", |
| | | "bId": "202019041810750003", |
| | | "businessType": "B", |
| | | "transactionId": "3a5a411ec65a4c3f895935638aa1d2bc", |
| | | "dataFlowId": "44fde86d39ce46f4b4aab5f6b14f3947" |
| | | } |
| | | |
| | | ``` |
| New file |
| | |
| | | |
| | | |
| | | **1\. 修改费用配置** |
| | | ###### 接口功能 |
| | | > API服务做修改费用配置时调用该接口 |
| | | |
| | | ###### URL |
| | | > [http://fee-service/feeConfigApi/service](http://fee-service/feeConfigApi/service) |
| | | |
| | | ###### 支持格式 |
| | | > JSON |
| | | |
| | | ###### HTTP请求方式 |
| | | > POST |
| | | |
| | | ###### 协议接口 |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-:| |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |-|business|1|Array|-|业务节点|-| |
| | | |
| | | ###### orders |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |orders|appId|1|String|10|系统ID|由中心服务提供| |
| | | |orders|transactionId|1|String|30|交互流水|appId+'00'+YYYYMMDD+10位序列| |
| | | |orders|userId|1|String|30|用户ID|已有用户ID| |
| | | |orders|orderTypeCd|1|String|4|订单类型|查看订单类型说明| |
| | | |orders|requestTime|1|String|14|请求时间|YYYYMMDDhhmmss| |
| | | |orders|remark|1|String|200|备注|备注| |
| | | |orders|sign|?|String|64|签名|查看加密说明| |
| | | |orders|attrs|?|Array|-|订单属性|-| |
| | | |attrs|specCd|1|String|12|规格编码|由中心服务提供| |
| | | |attrs|value|1|String|50|属性值|-| |
| | | |orders|response|1|Object|-|返回结果节点|-| |
| | | |response|code|1|String|4|返回状态|查看状态说明| |
| | | |response|message|1|String|200|返回状态描述|-| |
| | | |
| | | ###### business |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|business|?|Array|-|业务节点|-| |
| | | |business|businessTypeCd|1|String|12|业务类型编码|500100030002| |
| | | |business|datas|1|Object|-|数据节点|不同的服务下的节点不一样| |
| | | |datas|businessFeeConfig|1|Object|-|小区成员|小区成员| |
| | | |businessFeeConfig|squarePrice|1|String|30|-|-| |
| | | |businessFeeConfig|feeTypeCd|1|String|30|-|-| |
| | | |businessFeeConfig|configId|1|String|30|-|-| |
| | | |businessFeeConfig|additionalAmount|1|String|30|-|-| |
| | | |businessFeeConfig|startTime|1|String|30|-|-| |
| | | |businessFeeConfig|communityId|1|String|30|-|-| |
| | | |
| | | |
| | | ###### 返回协议 |
| | | |
| | | 当http返回状态不为200 时请求处理失败 body内容为失败的原因 |
| | | |
| | | 当http返回状态为200时请求处理成功,body内容为返回内容, |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | ###### 举例 |
| | | > 地址:[http://fee-service/feeConfigApi/service](http://fee-service/feeConfigApi/service) |
| | | |
| | | ``` javascript |
| | | 请求头信息: |
| | | Content-Type:application/json |
| | | |
| | | 请求报文: |
| | | |
| | | { |
| | | "orders": { |
| | | "appId": "外系统ID,分配得到", |
| | | "transactionId": "100000000020180409224736000001", |
| | | "userId": "用户ID", |
| | | "orderTypeCd": "订单类型,查询,受理", |
| | | "requestTime": "20180409224736", |
| | | "remark": "备注", |
| | | "sign": "这个服务是否要求MD5签名", |
| | | "businessType":"I", |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | }, |
| | | "business": { |
| | | "businessTypeCd": "620100040001", |
| | | "bId":"1234567892", |
| | | "remark": "备注", |
| | | "datas": { |
| | | "businessFeeConfig": { |
| | | "squarePrice":"填写具体值", |
| | | "feeTypeCd":"填写具体值", |
| | | "configId":"填写具体值", |
| | | "additionalAmount":"填写具体值", |
| | | "startTime":"填写具体值", |
| | | "communityId":"填写具体值" |
| | | } |
| | | }, |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | } |
| | | } |
| | | |
| | | 返回报文: |
| | | { |
| | | "orderTypeCd": "D", |
| | | "response": { |
| | | "code": "0000", |
| | | "message": "成功" |
| | | }, |
| | | "responseTime": "20190418102004", |
| | | "bId": "202019041810750003", |
| | | "businessType": "B", |
| | | "transactionId": "3a5a411ec65a4c3f895935638aa1d2bc", |
| | | "dataFlowId": "44fde86d39ce46f4b4aab5f6b14f3947" |
| | | } |
| | | |
| | | ``` |
| New file |
| | |
| | | |
| | | |
| | | **1\. 修改费用明细** |
| | | ###### 接口功能 |
| | | > API服务做修改费用明细时调用该接口 |
| | | |
| | | ###### URL |
| | | > [http://fee-service/feeDetailApi/service](http://fee-service/feeDetailApi/service) |
| | | |
| | | ###### 支持格式 |
| | | > JSON |
| | | |
| | | ###### HTTP请求方式 |
| | | > POST |
| | | |
| | | ###### 协议接口 |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-:| |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |-|business|1|Array|-|业务节点|-| |
| | | |
| | | ###### orders |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |orders|appId|1|String|10|系统ID|由中心服务提供| |
| | | |orders|transactionId|1|String|30|交互流水|appId+'00'+YYYYMMDD+10位序列| |
| | | |orders|userId|1|String|30|用户ID|已有用户ID| |
| | | |orders|orderTypeCd|1|String|4|订单类型|查看订单类型说明| |
| | | |orders|requestTime|1|String|14|请求时间|YYYYMMDDhhmmss| |
| | | |orders|remark|1|String|200|备注|备注| |
| | | |orders|sign|?|String|64|签名|查看加密说明| |
| | | |orders|attrs|?|Array|-|订单属性|-| |
| | | |attrs|specCd|1|String|12|规格编码|由中心服务提供| |
| | | |attrs|value|1|String|50|属性值|-| |
| | | |orders|response|1|Object|-|返回结果节点|-| |
| | | |response|code|1|String|4|返回状态|查看状态说明| |
| | | |response|message|1|String|200|返回状态描述|-| |
| | | |
| | | ###### business |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|business|?|Array|-|业务节点|-| |
| | | |business|businessTypeCd|1|String|12|业务类型编码|500100030002| |
| | | |business|datas|1|Object|-|数据节点|不同的服务下的节点不一样| |
| | | |datas|businessFeeDetail|1|Object|-|小区成员|小区成员| |
| | | |businessFeeDetail|primeRate|1|String|30|-|-| |
| | | |businessFeeDetail|detailId|1|String|30|-|-| |
| | | |businessFeeDetail|receivableAmount|1|String|30|-|-| |
| | | |businessFeeDetail|cycles|1|String|30|-|-| |
| | | |businessFeeDetail|remark|1|String|30|-|-| |
| | | |businessFeeDetail|receivedAmount|1|String|30|-|-| |
| | | |businessFeeDetail|communityId|1|String|30|-|-| |
| | | |businessFeeDetail|feeId|1|String|30|-|-| |
| | | |
| | | |
| | | ###### 返回协议 |
| | | |
| | | 当http返回状态不为200 时请求处理失败 body内容为失败的原因 |
| | | |
| | | 当http返回状态为200时请求处理成功,body内容为返回内容, |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | ###### 举例 |
| | | > 地址:[http://fee-service/feeDetailApi/service](http://fee-service/feeDetailApi/service) |
| | | |
| | | ``` javascript |
| | | 请求头信息: |
| | | Content-Type:application/json |
| | | |
| | | 请求报文: |
| | | |
| | | { |
| | | "orders": { |
| | | "appId": "外系统ID,分配得到", |
| | | "transactionId": "100000000020180409224736000001", |
| | | "userId": "用户ID", |
| | | "orderTypeCd": "订单类型,查询,受理", |
| | | "requestTime": "20180409224736", |
| | | "remark": "备注", |
| | | "sign": "这个服务是否要求MD5签名", |
| | | "businessType":"I", |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | }, |
| | | "business": { |
| | | "businessTypeCd": "610100040001", |
| | | "bId":"1234567892", |
| | | "remark": "备注", |
| | | "datas": { |
| | | "businessFeeDetail": { |
| | | "primeRate":"填写具体值", |
| | | "detailId":"填写具体值", |
| | | "receivableAmount":"填写具体值", |
| | | "cycles":"填写具体值", |
| | | "remark":"填写具体值", |
| | | "receivedAmount":"填写具体值", |
| | | "communityId":"填写具体值", |
| | | "feeId":"填写具体值" |
| | | } |
| | | }, |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | } |
| | | } |
| | | |
| | | 返回报文: |
| | | { |
| | | "orderTypeCd": "D", |
| | | "response": { |
| | | "code": "0000", |
| | | "message": "成功" |
| | | }, |
| | | "responseTime": "20190418102004", |
| | | "bId": "202019041810750003", |
| | | "businessType": "B", |
| | | "transactionId": "3a5a411ec65a4c3f895935638aa1d2bc", |
| | | "dataFlowId": "44fde86d39ce46f4b4aab5f6b14f3947" |
| | | } |
| | | |
| | | ``` |
| New file |
| | |
| | | |
| | | |
| | | **1\. 修改费用** |
| | | ###### 接口功能 |
| | | > API服务做修改费用时调用该接口 |
| | | |
| | | ###### URL |
| | | > [http://fee-service/feeApi/service](http://fee-service/feeApi/service) |
| | | |
| | | ###### 支持格式 |
| | | > JSON |
| | | |
| | | ###### HTTP请求方式 |
| | | > POST |
| | | |
| | | ###### 协议接口 |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-:| |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |-|business|1|Array|-|业务节点|-| |
| | | |
| | | ###### orders |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |orders|appId|1|String|10|系统ID|由中心服务提供| |
| | | |orders|transactionId|1|String|30|交互流水|appId+'00'+YYYYMMDD+10位序列| |
| | | |orders|userId|1|String|30|用户ID|已有用户ID| |
| | | |orders|orderTypeCd|1|String|4|订单类型|查看订单类型说明| |
| | | |orders|requestTime|1|String|14|请求时间|YYYYMMDDhhmmss| |
| | | |orders|remark|1|String|200|备注|备注| |
| | | |orders|sign|?|String|64|签名|查看加密说明| |
| | | |orders|attrs|?|Array|-|订单属性|-| |
| | | |attrs|specCd|1|String|12|规格编码|由中心服务提供| |
| | | |attrs|value|1|String|50|属性值|-| |
| | | |orders|response|1|Object|-|返回结果节点|-| |
| | | |response|code|1|String|4|返回状态|查看状态说明| |
| | | |response|message|1|String|200|返回状态描述|-| |
| | | |
| | | ###### business |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|business|?|Array|-|业务节点|-| |
| | | |business|businessTypeCd|1|String|12|业务类型编码|500100030002| |
| | | |business|datas|1|Object|-|数据节点|不同的服务下的节点不一样| |
| | | |datas|businessFeeInfo|1|Object|-|小区成员|小区成员| |
| | | |businessFeeInfo|amount|1|String|30|-|-| |
| | | |businessFeeInfo|incomeObjId|1|String|30|-|-| |
| | | |businessFeeInfo|feeTypeCd|1|String|30|-|-| |
| | | |businessFeeInfo|startTime|1|String|30|-|-| |
| | | |businessFeeInfo|endTime|1|String|30|-|-| |
| | | |businessFeeInfo|communityId|1|String|30|-|-| |
| | | |businessFeeInfo|feeId|1|String|30|-|-| |
| | | |businessFeeInfo|userId|1|String|30|-|-| |
| | | |businessFeeInfo|payerObjId|1|String|30|-|-| |
| | | |
| | | |
| | | ###### 返回协议 |
| | | |
| | | 当http返回状态不为200 时请求处理失败 body内容为失败的原因 |
| | | |
| | | 当http返回状态为200时请求处理成功,body内容为返回内容, |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | ###### 举例 |
| | | > 地址:[http://fee-service/feeApi/service](http://fee-service/feeApi/service) |
| | | |
| | | ``` javascript |
| | | 请求头信息: |
| | | Content-Type:application/json |
| | | |
| | | 请求报文: |
| | | |
| | | { |
| | | "orders": { |
| | | "appId": "外系统ID,分配得到", |
| | | "transactionId": "100000000020180409224736000001", |
| | | "userId": "用户ID", |
| | | "orderTypeCd": "订单类型,查询,受理", |
| | | "requestTime": "20180409224736", |
| | | "remark": "备注", |
| | | "sign": "这个服务是否要求MD5签名", |
| | | "businessType":"I", |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | }, |
| | | "business": { |
| | | "businessTypeCd": "600100040001", |
| | | "bId":"1234567892", |
| | | "remark": "备注", |
| | | "datas": { |
| | | "businessFeeInfo": { |
| | | "amount":"填写具体值", |
| | | "incomeObjId":"填写具体值", |
| | | "feeTypeCd":"填写具体值", |
| | | "startTime":"填写具体值", |
| | | "endTime":"填写具体值", |
| | | "communityId":"填写具体值", |
| | | "feeId":"填写具体值", |
| | | "userId":"填写具体值", |
| | | "payerObjId":"填写具体值" |
| | | } |
| | | }, |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | } |
| | | } |
| | | |
| | | 返回报文: |
| | | { |
| | | "orderTypeCd": "D", |
| | | "response": { |
| | | "code": "0000", |
| | | "message": "成功" |
| | | }, |
| | | "responseTime": "20190418102004", |
| | | "bId": "202019041810750003", |
| | | "businessType": "B", |
| | | "transactionId": "3a5a411ec65a4c3f895935638aa1d2bc", |
| | | "dataFlowId": "44fde86d39ce46f4b4aab5f6b14f3947" |
| | | } |
| | | |
| | | ``` |
| New file |
| | |
| | | package com.java110.dto; |
| | | |
| | | 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 FeeAttrDto extends PageDto implements Serializable { |
| | | |
| | | private String attrId; |
| | | private String specCd; |
| | | private String communityId; |
| | | private String feeId; |
| | | private String value; |
| | | |
| | | |
| | | private Date createTime; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | |
| | | public String getAttrId() { |
| | | return attrId; |
| | | } |
| | | public void setAttrId(String attrId) { |
| | | this.attrId = attrId; |
| | | } |
| | | public String getSpecCd() { |
| | | return specCd; |
| | | } |
| | | public void setSpecCd(String specCd) { |
| | | this.specCd = specCd; |
| | | } |
| | | public String getCommunityId() { |
| | | return communityId; |
| | | } |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | public String getFeeId() { |
| | | return feeId; |
| | | } |
| | | public void setFeeId(String feeId) { |
| | | this.feeId = feeId; |
| | | } |
| | | public String getValue() { |
| | | return value; |
| | | } |
| | | public void setValue(String value) { |
| | | this.value = value; |
| | | } |
| | | |
| | | |
| | | 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; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.dto; |
| | | |
| | | 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 FeeConfigDto extends PageDto implements Serializable { |
| | | |
| | | private String squarePrice; |
| | | private String feeTypeCd; |
| | | private String configId; |
| | | private String additionalAmount; |
| | | private String startTime; |
| | | private String communityId; |
| | | |
| | | |
| | | private Date createTime; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | |
| | | public String getSquarePrice() { |
| | | return squarePrice; |
| | | } |
| | | public void setSquarePrice(String squarePrice) { |
| | | this.squarePrice = squarePrice; |
| | | } |
| | | public String getFeeTypeCd() { |
| | | return feeTypeCd; |
| | | } |
| | | public void setFeeTypeCd(String feeTypeCd) { |
| | | this.feeTypeCd = feeTypeCd; |
| | | } |
| | | public String getConfigId() { |
| | | return configId; |
| | | } |
| | | public void setConfigId(String configId) { |
| | | this.configId = configId; |
| | | } |
| | | public String getAdditionalAmount() { |
| | | return additionalAmount; |
| | | } |
| | | public void setAdditionalAmount(String additionalAmount) { |
| | | this.additionalAmount = additionalAmount; |
| | | } |
| | | public String getStartTime() { |
| | | return startTime; |
| | | } |
| | | public void setStartTime(String startTime) { |
| | | this.startTime = startTime; |
| | | } |
| | | public String getCommunityId() { |
| | | return communityId; |
| | | } |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | |
| | | |
| | | 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; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.dto; |
| | | |
| | | 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 FeeDetailDto extends PageDto implements Serializable { |
| | | |
| | | private String primeRate; |
| | | private String detailId; |
| | | private String receivableAmount; |
| | | private String cycles; |
| | | private String remark; |
| | | private String receivedAmount; |
| | | private String communityId; |
| | | private String feeId; |
| | | |
| | | |
| | | private Date createTime; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | |
| | | public String getPrimeRate() { |
| | | return primeRate; |
| | | } |
| | | public void setPrimeRate(String primeRate) { |
| | | this.primeRate = primeRate; |
| | | } |
| | | public String getDetailId() { |
| | | return detailId; |
| | | } |
| | | public void setDetailId(String detailId) { |
| | | this.detailId = detailId; |
| | | } |
| | | public String getReceivableAmount() { |
| | | return receivableAmount; |
| | | } |
| | | public void setReceivableAmount(String receivableAmount) { |
| | | this.receivableAmount = receivableAmount; |
| | | } |
| | | public String getCycles() { |
| | | return cycles; |
| | | } |
| | | public void setCycles(String cycles) { |
| | | this.cycles = cycles; |
| | | } |
| | | public String getRemark() { |
| | | return remark; |
| | | } |
| | | public void setRemark(String remark) { |
| | | this.remark = remark; |
| | | } |
| | | public String getReceivedAmount() { |
| | | return receivedAmount; |
| | | } |
| | | public void setReceivedAmount(String receivedAmount) { |
| | | this.receivedAmount = receivedAmount; |
| | | } |
| | | public String getCommunityId() { |
| | | return communityId; |
| | | } |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | public String getFeeId() { |
| | | return feeId; |
| | | } |
| | | public void setFeeId(String feeId) { |
| | | this.feeId = feeId; |
| | | } |
| | | |
| | | |
| | | 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; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.dto; |
| | | |
| | | 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 FeeDto extends PageDto implements Serializable { |
| | | |
| | | private String amount; |
| | | private String incomeObjId; |
| | | private String feeTypeCd; |
| | | private String startTime; |
| | | private String endTime; |
| | | private String communityId; |
| | | private String feeId; |
| | | private String userId; |
| | | private String payerObjId; |
| | | |
| | | |
| | | private Date createTime; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | |
| | | public String getAmount() { |
| | | return amount; |
| | | } |
| | | public void setAmount(String amount) { |
| | | this.amount = amount; |
| | | } |
| | | public String getIncomeObjId() { |
| | | return incomeObjId; |
| | | } |
| | | public void setIncomeObjId(String incomeObjId) { |
| | | this.incomeObjId = incomeObjId; |
| | | } |
| | | public String getFeeTypeCd() { |
| | | return feeTypeCd; |
| | | } |
| | | public void setFeeTypeCd(String feeTypeCd) { |
| | | this.feeTypeCd = feeTypeCd; |
| | | } |
| | | public String getStartTime() { |
| | | return startTime; |
| | | } |
| | | public void setStartTime(String startTime) { |
| | | this.startTime = startTime; |
| | | } |
| | | public String getEndTime() { |
| | | return endTime; |
| | | } |
| | | public void setEndTime(String endTime) { |
| | | this.endTime = endTime; |
| | | } |
| | | public String getCommunityId() { |
| | | return communityId; |
| | | } |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | public String getFeeId() { |
| | | return feeId; |
| | | } |
| | | public void setFeeId(String feeId) { |
| | | this.feeId = feeId; |
| | | } |
| | | public String getUserId() { |
| | | return userId; |
| | | } |
| | | public void setUserId(String userId) { |
| | | this.userId = userId; |
| | | } |
| | | public String getPayerObjId() { |
| | | return payerObjId; |
| | | } |
| | | public void setPayerObjId(String payerObjId) { |
| | | this.payerObjId = payerObjId; |
| | | } |
| | | |
| | | |
| | | 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; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110; |
| | | |
| | | |
| | | import com.java110.code.Data; |
| | | import com.java110.code.GeneratorAbstractBussiness; |
| | | import com.java110.code.GeneratorDeleteInfoListener; |
| | | import com.java110.code.GeneratorDtoBean; |
| | | import com.java110.code.GeneratorIInnerServiceSMO; |
| | | import com.java110.code.GeneratorIServiceDaoListener; |
| | | import com.java110.code.GeneratorInnerServiceSMOImpl; |
| | | import com.java110.code.GeneratorSaveInfoListener; |
| | | import com.java110.code.GeneratorServiceDaoImplListener; |
| | | import com.java110.code.GeneratorServiceDaoImplMapperListener; |
| | | import com.java110.code.GeneratorUpdateInfoListener; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * Hello world! |
| | | */ |
| | | public class PayFeeAttrGeneratorApplication { |
| | | |
| | | protected PayFeeAttrGeneratorApplication() { |
| | | // prevents calls from subclass |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | /** |
| | | * 代码生成器 入口方法 |
| | | * |
| | | * @param args 参数 |
| | | */ |
| | | public static void main(String[] args) { |
| | | Data data = new Data(); |
| | | data.setId("attrId"); |
| | | data.setName("feeAttr"); |
| | | data.setDesc("费用属性"); |
| | | data.setShareParam("communityId"); |
| | | data.setShareColumn("community_id"); |
| | | data.setNewBusinessTypeCd("BUSINESS_TYPE_SAVE_FEE_INFO"); |
| | | data.setUpdateBusinessTypeCd("BUSINESS_TYPE_UPDATE_FEE_INFO"); |
| | | data.setDeleteBusinessTypeCd("BUSINESS_TYPE_DELETE_FEE_INFO"); |
| | | data.setNewBusinessTypeCdValue("600100030001"); |
| | | data.setUpdateBusinessTypeCdValue("600100040001"); |
| | | data.setDeleteBusinessTypeCdValue("600100050001"); |
| | | data.setBusinessTableName("business_pay_fee_attrs"); |
| | | data.setTableName("pay_fee_attrs"); |
| | | Map<String, String> param = new HashMap<String, String>(); |
| | | param.put("feeId", "fee_id"); |
| | | param.put("communityId", "community_id"); |
| | | param.put("bId", "b_id"); |
| | | param.put("attrId", "attr_id"); |
| | | param.put("specCd", "spec_cd"); |
| | | param.put("value", "value"); |
| | | param.put("statusCd", "status_cd"); |
| | | param.put("operate", "operate"); |
| | | data.setParams(param); |
| | | GeneratorSaveInfoListener generatorSaveInfoListener = new GeneratorSaveInfoListener(); |
| | | generatorSaveInfoListener.generator(data); |
| | | |
| | | GeneratorAbstractBussiness generatorAbstractBussiness = new GeneratorAbstractBussiness(); |
| | | generatorAbstractBussiness.generator(data); |
| | | |
| | | GeneratorIServiceDaoListener generatorIServiceDaoListener = new GeneratorIServiceDaoListener(); |
| | | generatorIServiceDaoListener.generator(data); |
| | | |
| | | GeneratorServiceDaoImplListener generatorServiceDaoImplListener = new GeneratorServiceDaoImplListener(); |
| | | generatorServiceDaoImplListener.generator(data); |
| | | |
| | | GeneratorServiceDaoImplMapperListener generatorServiceDaoImplMapperListener = null; |
| | | generatorServiceDaoImplMapperListener = new GeneratorServiceDaoImplMapperListener(); |
| | | generatorServiceDaoImplMapperListener.generator(data); |
| | | |
| | | GeneratorUpdateInfoListener generatorUpdateInfoListener = new GeneratorUpdateInfoListener(); |
| | | generatorUpdateInfoListener.generator(data); |
| | | |
| | | GeneratorDeleteInfoListener generatorDeleteInfoListener = new GeneratorDeleteInfoListener(); |
| | | generatorDeleteInfoListener.generator(data); |
| | | |
| | | GeneratorInnerServiceSMOImpl generatorInnerServiceSMOImpl = new GeneratorInnerServiceSMOImpl(); |
| | | generatorInnerServiceSMOImpl.generator(data); |
| | | |
| | | GeneratorDtoBean generatorDtoBean = new GeneratorDtoBean(); |
| | | generatorDtoBean.generator(data); |
| | | |
| | | GeneratorIInnerServiceSMO generatorIInnerServiceSMO = new GeneratorIInnerServiceSMO(); |
| | | generatorIInnerServiceSMO.generator(data); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110; |
| | | |
| | | |
| | | import com.java110.code.Data; |
| | | import com.java110.code.GeneratorAbstractBussiness; |
| | | import com.java110.code.GeneratorDeleteInfoListener; |
| | | import com.java110.code.GeneratorDtoBean; |
| | | import com.java110.code.GeneratorIInnerServiceSMO; |
| | | import com.java110.code.GeneratorIServiceDaoListener; |
| | | import com.java110.code.GeneratorInnerServiceSMOImpl; |
| | | import com.java110.code.GeneratorSaveInfoListener; |
| | | import com.java110.code.GeneratorServiceDaoImplListener; |
| | | import com.java110.code.GeneratorServiceDaoImplMapperListener; |
| | | import com.java110.code.GeneratorUpdateInfoListener; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * Hello world! |
| | | */ |
| | | public class PayFeeConfigGeneratorApplication { |
| | | |
| | | protected PayFeeConfigGeneratorApplication() { |
| | | // prevents calls from subclass |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | /** |
| | | * 代码生成器 入口方法 |
| | | * |
| | | * @param args 参数 |
| | | */ |
| | | public static void main(String[] args) { |
| | | Data data = new Data(); |
| | | data.setId("configId"); |
| | | data.setName("feeConfig"); |
| | | data.setDesc("费用配置"); |
| | | data.setShareParam("communityId"); |
| | | data.setShareColumn("community_id"); |
| | | data.setNewBusinessTypeCd("BUSINESS_TYPE_SAVE_FEE_CONFIG"); |
| | | data.setUpdateBusinessTypeCd("BUSINESS_TYPE_UPDATE_FEE_CONFIG"); |
| | | data.setDeleteBusinessTypeCd("BUSINESS_TYPE_DELETE_FEE_CONFIG"); |
| | | data.setNewBusinessTypeCdValue("620100030001"); |
| | | data.setUpdateBusinessTypeCdValue("620100040001"); |
| | | data.setDeleteBusinessTypeCdValue("620100050001"); |
| | | data.setBusinessTableName("business_pay_fee_config"); |
| | | data.setTableName("pay_fee_config"); |
| | | Map<String, String> param = new HashMap<String, String>(); |
| | | param.put("configId", "config_id"); |
| | | param.put("communityId", "community_id"); |
| | | param.put("feeTypeCd", "fee_type_cd"); |
| | | param.put("bId", "b_id"); |
| | | param.put("squarePrice", "square_price"); |
| | | param.put("additionalAmount", "additional_amount"); |
| | | param.put("startTime", "start_time"); |
| | | param.put("statusCd", "status_cd"); |
| | | param.put("operate", "operate"); |
| | | data.setParams(param); |
| | | GeneratorSaveInfoListener generatorSaveInfoListener = new GeneratorSaveInfoListener(); |
| | | generatorSaveInfoListener.generator(data); |
| | | |
| | | GeneratorAbstractBussiness generatorAbstractBussiness = new GeneratorAbstractBussiness(); |
| | | generatorAbstractBussiness.generator(data); |
| | | |
| | | GeneratorIServiceDaoListener generatorIServiceDaoListener = new GeneratorIServiceDaoListener(); |
| | | generatorIServiceDaoListener.generator(data); |
| | | |
| | | GeneratorServiceDaoImplListener generatorServiceDaoImplListener = new GeneratorServiceDaoImplListener(); |
| | | generatorServiceDaoImplListener.generator(data); |
| | | |
| | | GeneratorServiceDaoImplMapperListener generatorServiceDaoImplMapperListener = null; |
| | | generatorServiceDaoImplMapperListener = new GeneratorServiceDaoImplMapperListener(); |
| | | generatorServiceDaoImplMapperListener.generator(data); |
| | | |
| | | GeneratorUpdateInfoListener generatorUpdateInfoListener = new GeneratorUpdateInfoListener(); |
| | | generatorUpdateInfoListener.generator(data); |
| | | |
| | | GeneratorDeleteInfoListener generatorDeleteInfoListener = new GeneratorDeleteInfoListener(); |
| | | generatorDeleteInfoListener.generator(data); |
| | | |
| | | GeneratorInnerServiceSMOImpl generatorInnerServiceSMOImpl = new GeneratorInnerServiceSMOImpl(); |
| | | generatorInnerServiceSMOImpl.generator(data); |
| | | |
| | | GeneratorDtoBean generatorDtoBean = new GeneratorDtoBean(); |
| | | generatorDtoBean.generator(data); |
| | | |
| | | GeneratorIInnerServiceSMO generatorIInnerServiceSMO = new GeneratorIInnerServiceSMO(); |
| | | generatorIInnerServiceSMO.generator(data); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110; |
| | | |
| | | |
| | | import com.java110.code.Data; |
| | | import com.java110.code.GeneratorAbstractBussiness; |
| | | import com.java110.code.GeneratorDeleteInfoListener; |
| | | import com.java110.code.GeneratorDtoBean; |
| | | import com.java110.code.GeneratorIInnerServiceSMO; |
| | | import com.java110.code.GeneratorIServiceDaoListener; |
| | | import com.java110.code.GeneratorInnerServiceSMOImpl; |
| | | import com.java110.code.GeneratorSaveInfoListener; |
| | | import com.java110.code.GeneratorServiceDaoImplListener; |
| | | import com.java110.code.GeneratorServiceDaoImplMapperListener; |
| | | import com.java110.code.GeneratorUpdateInfoListener; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * Hello world! |
| | | */ |
| | | public class PayFeeDetailGeneratorApplication { |
| | | |
| | | protected PayFeeDetailGeneratorApplication() { |
| | | // prevents calls from subclass |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | /** |
| | | * 代码生成器 入口方法 |
| | | * |
| | | * @param args 参数 |
| | | */ |
| | | public static void main(String[] args) { |
| | | Data data = new Data(); |
| | | data.setId("detailId"); |
| | | data.setName("feeDetail"); |
| | | data.setDesc("费用明细"); |
| | | data.setShareParam("communityId"); |
| | | data.setShareColumn("community_id"); |
| | | data.setNewBusinessTypeCd("BUSINESS_TYPE_SAVE_FEE_DETAIL"); |
| | | data.setUpdateBusinessTypeCd("BUSINESS_TYPE_UPDATE_FEE_DETAIL"); |
| | | data.setDeleteBusinessTypeCd("BUSINESS_TYPE_DELETE_FEE_DETAIL"); |
| | | data.setNewBusinessTypeCdValue("610100030001"); |
| | | data.setUpdateBusinessTypeCdValue("610100040001"); |
| | | data.setDeleteBusinessTypeCdValue("610100050001"); |
| | | data.setBusinessTableName("business_pay_fee_detail"); |
| | | data.setTableName("pay_fee_detail"); |
| | | Map<String, String> param = new HashMap<String, String>(); |
| | | param.put("detailId", "detail_id"); |
| | | param.put("feeId", "fee_id"); |
| | | param.put("communityId", "community_id"); |
| | | param.put("bId", "b_id"); |
| | | param.put("cycles", "cycles"); |
| | | param.put("receivableAmount", "receivable_amount"); |
| | | param.put("receivedAmount", "received_amount"); |
| | | param.put("primeRate", "prime_rate"); |
| | | param.put("remark", "remark"); |
| | | param.put("statusCd", "status_cd"); |
| | | param.put("operate", "operate"); |
| | | data.setParams(param); |
| | | GeneratorSaveInfoListener generatorSaveInfoListener = new GeneratorSaveInfoListener(); |
| | | generatorSaveInfoListener.generator(data); |
| | | |
| | | GeneratorAbstractBussiness generatorAbstractBussiness = new GeneratorAbstractBussiness(); |
| | | generatorAbstractBussiness.generator(data); |
| | | |
| | | GeneratorIServiceDaoListener generatorIServiceDaoListener = new GeneratorIServiceDaoListener(); |
| | | generatorIServiceDaoListener.generator(data); |
| | | |
| | | GeneratorServiceDaoImplListener generatorServiceDaoImplListener = new GeneratorServiceDaoImplListener(); |
| | | generatorServiceDaoImplListener.generator(data); |
| | | |
| | | GeneratorServiceDaoImplMapperListener generatorServiceDaoImplMapperListener = null; |
| | | generatorServiceDaoImplMapperListener = new GeneratorServiceDaoImplMapperListener(); |
| | | generatorServiceDaoImplMapperListener.generator(data); |
| | | |
| | | GeneratorUpdateInfoListener generatorUpdateInfoListener = new GeneratorUpdateInfoListener(); |
| | | generatorUpdateInfoListener.generator(data); |
| | | |
| | | GeneratorDeleteInfoListener generatorDeleteInfoListener = new GeneratorDeleteInfoListener(); |
| | | generatorDeleteInfoListener.generator(data); |
| | | |
| | | GeneratorInnerServiceSMOImpl generatorInnerServiceSMOImpl = new GeneratorInnerServiceSMOImpl(); |
| | | generatorInnerServiceSMOImpl.generator(data); |
| | | |
| | | GeneratorDtoBean generatorDtoBean = new GeneratorDtoBean(); |
| | | generatorDtoBean.generator(data); |
| | | |
| | | GeneratorIInnerServiceSMO generatorIInnerServiceSMO = new GeneratorIInnerServiceSMO(); |
| | | generatorIInnerServiceSMO.generator(data); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110; |
| | | |
| | | |
| | | import com.java110.code.Data; |
| | | import com.java110.code.GeneratorAbstractBussiness; |
| | | import com.java110.code.GeneratorDeleteInfoListener; |
| | | import com.java110.code.GeneratorDtoBean; |
| | | import com.java110.code.GeneratorIInnerServiceSMO; |
| | | import com.java110.code.GeneratorIServiceDaoListener; |
| | | import com.java110.code.GeneratorInnerServiceSMOImpl; |
| | | import com.java110.code.GeneratorSaveInfoListener; |
| | | import com.java110.code.GeneratorServiceDaoImplListener; |
| | | import com.java110.code.GeneratorServiceDaoImplMapperListener; |
| | | import com.java110.code.GeneratorUpdateInfoListener; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * Hello world! |
| | | */ |
| | | public class PayFeeGeneratorApplication { |
| | | |
| | | protected PayFeeGeneratorApplication() { |
| | | // prevents calls from subclass |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | /** |
| | | * 代码生成器 入口方法 |
| | | * |
| | | * @param args 参数 |
| | | */ |
| | | public static void main(String[] args) { |
| | | Data data = new Data(); |
| | | data.setId("feeId"); |
| | | data.setName("fee"); |
| | | data.setDesc("费用"); |
| | | data.setShareParam("communityId"); |
| | | data.setShareColumn("community_id"); |
| | | data.setNewBusinessTypeCd("BUSINESS_TYPE_SAVE_FEE_INFO"); |
| | | data.setUpdateBusinessTypeCd("BUSINESS_TYPE_UPDATE_FEE_INFO"); |
| | | data.setDeleteBusinessTypeCd("BUSINESS_TYPE_DELETE_FEE_INFO"); |
| | | data.setNewBusinessTypeCdValue("600100030001"); |
| | | data.setUpdateBusinessTypeCdValue("600100040001"); |
| | | data.setDeleteBusinessTypeCdValue("600100050001"); |
| | | data.setBusinessTableName("business_pay_fee"); |
| | | data.setTableName("pay_fee"); |
| | | Map<String, String> param = new HashMap<String, String>(); |
| | | param.put("feeId", "fee_id"); |
| | | param.put("communityId", "community_id"); |
| | | param.put("bId", "b_id"); |
| | | param.put("feeTypeCd", "fee_type_cd"); |
| | | param.put("payerObjId", "payer_obj_id"); |
| | | param.put("incomeObjId", "income_obj_id"); |
| | | param.put("startTime", "start_time"); |
| | | param.put("endTime", "end_time"); |
| | | param.put("amount", "amount"); |
| | | param.put("userId", "user_id"); |
| | | param.put("statusCd", "status_cd"); |
| | | param.put("operate", "operate"); |
| | | data.setParams(param); |
| | | GeneratorSaveInfoListener generatorSaveInfoListener = new GeneratorSaveInfoListener(); |
| | | generatorSaveInfoListener.generator(data); |
| | | |
| | | GeneratorAbstractBussiness generatorAbstractBussiness = new GeneratorAbstractBussiness(); |
| | | generatorAbstractBussiness.generator(data); |
| | | |
| | | GeneratorIServiceDaoListener generatorIServiceDaoListener = new GeneratorIServiceDaoListener(); |
| | | generatorIServiceDaoListener.generator(data); |
| | | |
| | | GeneratorServiceDaoImplListener generatorServiceDaoImplListener = new GeneratorServiceDaoImplListener(); |
| | | generatorServiceDaoImplListener.generator(data); |
| | | |
| | | GeneratorServiceDaoImplMapperListener generatorServiceDaoImplMapperListener = null; |
| | | generatorServiceDaoImplMapperListener = new GeneratorServiceDaoImplMapperListener(); |
| | | generatorServiceDaoImplMapperListener.generator(data); |
| | | |
| | | GeneratorUpdateInfoListener generatorUpdateInfoListener = new GeneratorUpdateInfoListener(); |
| | | generatorUpdateInfoListener.generator(data); |
| | | |
| | | GeneratorDeleteInfoListener generatorDeleteInfoListener = new GeneratorDeleteInfoListener(); |
| | | generatorDeleteInfoListener.generator(data); |
| | | |
| | | GeneratorInnerServiceSMOImpl generatorInnerServiceSMOImpl = new GeneratorInnerServiceSMOImpl(); |
| | | generatorInnerServiceSMOImpl.generator(data); |
| | | |
| | | GeneratorDtoBean generatorDtoBean = new GeneratorDtoBean(); |
| | | generatorDtoBean.generator(data); |
| | | |
| | | GeneratorIInnerServiceSMO generatorIInnerServiceSMO = new GeneratorIInnerServiceSMO(); |
| | | generatorIInnerServiceSMO.generator(data); |
| | | } |
| | | } |
| | |
| | | String fileContext = sb.toString(); |
| | | fileContext = fileContext.replace("store", toLowerCaseFirstOne(data.getName())) |
| | | .replace("Store", toUpperCaseFirstOne(data.getName())) |
| | | .replace("商户", data.getDesc()); |
| | | .replace("商户", data.getDesc()) |
| | | .replace(data.getName()+"Id", data.getId()) |
| | | .replace(data.getName()+"_id", data.getParams().get(data.getId()).toString()); |
| | | Map<String, String> param = data.getParams(); |
| | | String mappingContext = ""; |
| | | String autoMappingContext = ""; |
| | |
| | | .replace("商户", data.getDesc()) |
| | | .replace("BUSINESS_TYPE_SAVE_STORE_INFO", data.getNewBusinessTypeCd()) |
| | | .replace("stare_id", data.getShareColumn()) |
| | | .replace("shareId", data.getShareParam()); |
| | | .replace("shareId", data.getShareParam()) |
| | | .replace(data.getName()+"Id", data.getId()) |
| | | .replace(data.getName()+"_id", data.getParams().get(data.getId()).toString()); |
| | | System.out.println(this.getClass().getResource("/listener").getPath()); |
| | | String writePath = this.getClass().getResource("/listener").getPath() + "/Save" + toUpperCaseFirstOne(data.getName()) + "InfoListener.java"; |
| | | writeFile(writePath, |
| | |
| | | //商户信息 |
| | | List<Map> businessStoreInfo = storeServiceDaoImpl.getBusinessStoreInfo(info); |
| | | if( businessStoreInfo != null && businessStoreInfo.size() >0) { |
| | | reFresh(info, businessStoreInfo.get(0)); |
| | | reFreshShareColumn(info, businessStoreInfo.get(0)); |
| | | storeServiceDaoImpl.saveStoreInfoInstance(info); |
| | | if(businessStoreInfo.size() == 1) { |
| | | dataFlowContext.addParamOut("storeId", businessStoreInfo.get(0).get("store_id")); |
| | |
| | | //商户信息 |
| | | List<Map> storeInfo = storeServiceDaoImpl.getStoreInfo(info); |
| | | if(storeInfo != null && storeInfo.size() > 0){ |
| | | reFreshShareColumn(paramIn, roomInfo.get(0)); |
| | | reFreshShareColumn(paramIn, storeInfo.get(0)); |
| | | storeServiceDaoImpl.updateStoreInfoInstance(paramIn); |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | /** |
| | | * 保存物业信息 |
| | | * 保存费用信息 |
| | | */ |
| | | public static final String BUSINESS_TYPE_SAVE_PROPERTY_INFO = "600100030001"; |
| | | public static final String BUSINESS_TYPE_SAVE_FEE_INFO = "600100030001"; |
| | | /** |
| | | * 保存物业照片 |
| | | * 修改费用信息 |
| | | */ |
| | | public static final String BUSINESS_TYPE_SAVE_PROPERTY_PHOTO = "600100030002"; |
| | | public static final String BUSINESS_TYPE_UPDATE_FEE_INFO = "600100040001"; |
| | | /** |
| | | * 保存物业证件 |
| | | * 删除费用信息 |
| | | */ |
| | | public static final String BUSINESS_TYPE_SAVE_PROPERTY_CERDENTIALS = "600100030003"; |
| | | /** |
| | | * 保存物业员工 |
| | | */ |
| | | public static final String BUSINESS_TYPE_SAVE_PROPERTY_USER = "600100030004"; |
| | | /** |
| | | * 保存物业费用 |
| | | */ |
| | | public static final String BUSINESS_TYPE_SAVE_PROPERTY_FEE = "600100030005"; |
| | | /** |
| | | * 保存住户 |
| | | */ |
| | | public static final String BUSINESS_TYPE_SAVE_PROPERTY_HOUSE = "600100030006"; |
| | | /** |
| | | * 修改物业信息 |
| | | */ |
| | | public static final String BUSINESS_TYPE_UPDATE_PROPERTY_INFO = "600100040001"; |
| | | /** |
| | | * 修改物业照片 |
| | | */ |
| | | public static final String BUSINESS_TYPE_UPDATE_PROPERTY_PHOTO = "600100040002"; |
| | | /** |
| | | * 修改物业证件 |
| | | */ |
| | | public static final String BUSINESS_TYPE_UPDATE_PROPERTY_CERDENTIALS = "600100040003"; |
| | | /** |
| | | * 修改 费用信息 |
| | | */ |
| | | public static final String BUSINESS_TYPE_UPDATE_PROPERTY_FEE = "600100040004"; |
| | | public static final String BUSINESS_TYPE_DELETE_FEE_INFO = "600100050001"; |
| | | |
| | | /** |
| | | * 修改住户信息 |
| | | * 保存费用明细信息 |
| | | */ |
| | | public static final String BUSINESS_TYPE_UPDATE_PROPERTY_HOUSE = "600100040005"; |
| | | public static final String BUSINESS_TYPE_SAVE_FEE_DETAIL = "610100030001"; |
| | | /** |
| | | * 删除物业属性 |
| | | * 修改费用明细信息 |
| | | */ |
| | | public static final String BUSINESS_TYPE_DELETE_PROPERTY_ATTR = "600100050001"; |
| | | public static final String BUSINESS_TYPE_UPDATE_FEE_DETAIL = "610100040001"; |
| | | /** |
| | | * 删除物业照片 |
| | | * 删除费用明细信息 |
| | | */ |
| | | public static final String BUSINESS_TYPE_DELETE_PROPERTY_PHOTO = "600100050002"; |
| | | public static final String BUSINESS_TYPE_DELETE_FEE_DETAIL = "610100050001"; |
| | | |
| | | /** |
| | | * 删除 物业证件 |
| | | * 保存费用配置信息 |
| | | */ |
| | | public static final String BUSINESS_TYPE_DELETE_PROPERTY_CERDENTIALS = "600100050003"; |
| | | public static final String BUSINESS_TYPE_SAVE_FEE_CONFIG = "620100030001"; |
| | | /** |
| | | * 删除物业员工 |
| | | * 修改费用配置信息 |
| | | */ |
| | | public static final String BUSINESS_TYPE_DELETE_PROPERTY_USER = "600100050004"; |
| | | public static final String BUSINESS_TYPE_UPDATE_FEE_CONFIG = "620100040001"; |
| | | /** |
| | | * 删除费用配置信息 |
| | | */ |
| | | public static final String BUSINESS_TYPE_DELETE_FEE_CONFIG = "620100050001"; |
| | | |
| | | /** |
| | | * 删除住户 |
| | | */ |
| | |
| | | public static final String CODE_PREFIX_agentPhotoId = "81"; |
| | | public static final String CODE_PREFIX_agentCerdentialsId = "82"; |
| | | public static final String CODE_PREFIX_agentUserId = "83"; |
| | | public static final String CODE_PREFIX_propertyId = "90"; |
| | | public static final String CODE_PREFIX_propertyPhotoId = "91"; |
| | | public static final String CODE_PREFIX_propertyCerdentialsId = "92"; |
| | | public static final String CODE_PREFIX_feeId = "90"; |
| | | public static final String CODE_PREFIX_detailId = "91"; |
| | | public static final String CODE_PREFIX_configId = "92"; |
| | | public static final String CODE_PREFIX_propertyUserId = "93"; |
| | | public static final String CODE_PREFIX_propertyFeeId = "94"; |
| | | public static final String CODE_PREFIX_houseId = "95"; |
| New file |
| | |
| | | package com.java110.core.smo.fee; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.dto.FeeAttrDto; |
| | | import org.springframework.cloud.netflix.feign.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 IFeeAttrInnerServiceSMO |
| | | * @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("/feeAttrApi") |
| | | public interface IFeeAttrInnerServiceSMO { |
| | | |
| | | /** |
| | | * <p>查询小区楼信息</p> |
| | | * |
| | | * |
| | | * @param feeAttrDto 数据对象分享 |
| | | * @return FeeAttrDto 对象数据 |
| | | */ |
| | | @RequestMapping(value = "/queryFeeAttrs", method = RequestMethod.POST) |
| | | List<FeeAttrDto> queryFeeAttrs(@RequestBody FeeAttrDto feeAttrDto); |
| | | |
| | | /** |
| | | * 查询<p>小区楼</p>总记录数 |
| | | * |
| | | * @param feeAttrDto 数据对象分享 |
| | | * @return 小区下的小区楼记录数 |
| | | */ |
| | | @RequestMapping(value = "/queryFeeAttrsCount", method = RequestMethod.POST) |
| | | int queryFeeAttrsCount(@RequestBody FeeAttrDto feeAttrDto); |
| | | } |
| New file |
| | |
| | | package com.java110.core.smo.fee; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.dto.FeeConfigDto; |
| | | import org.springframework.cloud.netflix.feign.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 IFeeConfigInnerServiceSMO |
| | | * @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("/feeConfigApi") |
| | | public interface IFeeConfigInnerServiceSMO { |
| | | |
| | | /** |
| | | * <p>查询小区楼信息</p> |
| | | * |
| | | * |
| | | * @param feeConfigDto 数据对象分享 |
| | | * @return FeeConfigDto 对象数据 |
| | | */ |
| | | @RequestMapping(value = "/queryFeeConfigs", method = RequestMethod.POST) |
| | | List<FeeConfigDto> queryFeeConfigs(@RequestBody FeeConfigDto feeConfigDto); |
| | | |
| | | /** |
| | | * 查询<p>小区楼</p>总记录数 |
| | | * |
| | | * @param feeConfigDto 数据对象分享 |
| | | * @return 小区下的小区楼记录数 |
| | | */ |
| | | @RequestMapping(value = "/queryFeeConfigsCount", method = RequestMethod.POST) |
| | | int queryFeeConfigsCount(@RequestBody FeeConfigDto feeConfigDto); |
| | | } |
| New file |
| | |
| | | package com.java110.core.smo.fee; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.dto.FeeDetailDto; |
| | | import org.springframework.cloud.netflix.feign.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 IFeeDetailInnerServiceSMO |
| | | * @Description 费用明细接口类 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 9:04 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | @FeignClient(name = "fee-service", configuration = {FeignConfiguration.class}) |
| | | @RequestMapping("/feeDetailApi") |
| | | public interface IFeeDetailInnerServiceSMO { |
| | | |
| | | /** |
| | | * <p>查询小区楼信息</p> |
| | | * |
| | | * |
| | | * @param feeDetailDto 数据对象分享 |
| | | * @return FeeDetailDto 对象数据 |
| | | */ |
| | | @RequestMapping(value = "/queryFeeDetails", method = RequestMethod.POST) |
| | | List<FeeDetailDto> queryFeeDetails(@RequestBody FeeDetailDto feeDetailDto); |
| | | |
| | | /** |
| | | * 查询<p>小区楼</p>总记录数 |
| | | * |
| | | * @param feeDetailDto 数据对象分享 |
| | | * @return 小区下的小区楼记录数 |
| | | */ |
| | | @RequestMapping(value = "/queryFeeDetailsCount", method = RequestMethod.POST) |
| | | int queryFeeDetailsCount(@RequestBody FeeDetailDto feeDetailDto); |
| | | } |
| New file |
| | |
| | | package com.java110.core.smo.fee; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.dto.FeeDto; |
| | | import org.springframework.cloud.netflix.feign.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 IFeeInnerServiceSMO |
| | | * @Description 费用接口类 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 9:04 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | @FeignClient(name = "fee-service", configuration = {FeignConfiguration.class}) |
| | | @RequestMapping("/feeApi") |
| | | public interface IFeeInnerServiceSMO { |
| | | |
| | | /** |
| | | * <p>查询小区楼信息</p> |
| | | * |
| | | * |
| | | * @param feeDto 数据对象分享 |
| | | * @return FeeDto 对象数据 |
| | | */ |
| | | @RequestMapping(value = "/queryFees", method = RequestMethod.POST) |
| | | List<FeeDto> queryFees(@RequestBody FeeDto feeDto); |
| | | |
| | | /** |
| | | * 查询<p>小区楼</p>总记录数 |
| | | * |
| | | * @param feeDto 数据对象分享 |
| | | * @return 小区下的小区楼记录数 |
| | | */ |
| | | @RequestMapping(value = "/queryFeesCount", method = RequestMethod.POST) |
| | | int queryFeesCount(@RequestBody FeeDto feeDto); |
| | | } |
| 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="feeAttrServiceDaoImpl"> |
| | | |
| | | <!-- 保存费用属性信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveBusinessFeeAttrInfo" parameterType="Map"> |
| | | insert into business_pay_fee_attrs( |
| | | attr_id,operate,spec_cd,community_id,b_id,fee_id,value |
| | | ) values ( |
| | | #{attrId},#{operate},#{specCd},#{communityId},#{bId},#{feeId},#{value} |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询费用属性信息(Business) add by wuxw 2018-07-03 --> |
| | | <select id="getBusinessFeeAttrInfo" parameterType="Map" resultType="Map"> |
| | | select t.attr_id,t.attr_id attrId,t.operate,t.spec_cd,t.spec_cd specCd,t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.fee_id,t.fee_id feeId,t.value |
| | | from business_pay_fee_attrs t |
| | | where 1 =1 |
| | | <if test="attrId !=null and attrId != ''"> |
| | | and t.attr_id= #{attrId} |
| | | </if> |
| | | <if test="operate !=null and operate != ''"> |
| | | and t.operate= #{operate} |
| | | </if> |
| | | <if test="specCd !=null and specCd != ''"> |
| | | and t.spec_cd= #{specCd} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="feeId !=null and feeId != ''"> |
| | | and t.fee_id= #{feeId} |
| | | </if> |
| | | <if test="value !=null and value != ''"> |
| | | and t.value= #{value} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 保存费用属性信息至 instance表中 add by wuxw 2018-07-03 --> |
| | | <insert id="saveFeeAttrInfoInstance" parameterType="Map"> |
| | | insert into pay_fee_attrs( |
| | | attr_id,spec_cd,status_cd,community_id,b_id,fee_id,value |
| | | ) select t.attr_id,t.spec_cd,'0',t.community_id,t.b_id,t.fee_id,t.value from business_pay_fee_attrs t where 1=1 |
| | | <if test="attrId !=null and attrId != ''"> |
| | | and t.attr_id= #{attrId} |
| | | </if> |
| | | and t.operate= 'ADD' |
| | | <if test="specCd !=null and specCd != ''"> |
| | | and t.spec_cd= #{specCd} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="feeId !=null and feeId != ''"> |
| | | and t.fee_id= #{feeId} |
| | | </if> |
| | | <if test="value !=null and value != ''"> |
| | | and t.value= #{value} |
| | | </if> |
| | | |
| | | </insert> |
| | | |
| | | |
| | | |
| | | <!-- 查询费用属性信息 add by wuxw 2018-07-03 --> |
| | | <select id="getFeeAttrInfo" parameterType="Map" resultType="Map"> |
| | | select t.attr_id,t.attr_id attrId,t.spec_cd,t.spec_cd specCd,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.fee_id,t.fee_id feeId,t.value |
| | | from pay_fee_attrs t |
| | | where 1 =1 |
| | | <if test="attrId !=null and attrId != ''"> |
| | | and t.attr_id= #{attrId} |
| | | </if> |
| | | <if test="specCd !=null and specCd != ''"> |
| | | and t.spec_cd= #{specCd} |
| | | </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="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="feeId !=null and feeId != ''"> |
| | | and t.fee_id= #{feeId} |
| | | </if> |
| | | <if test="value !=null and value != ''"> |
| | | and t.value= #{value} |
| | | </if> |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 修改费用属性信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateFeeAttrInfoInstance" parameterType="Map"> |
| | | update pay_fee_attrs t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="specCd !=null and specCd != ''"> |
| | | , t.spec_cd= #{specCd} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | , t.community_id= #{communityId} |
| | | </if> |
| | | <if test="feeId !=null and feeId != ''"> |
| | | , t.fee_id= #{feeId} |
| | | </if> |
| | | <if test="value !=null and value != ''"> |
| | | , t.value= #{value} |
| | | </if> |
| | | where 1=1 <if test="attrId !=null and attrId != ''"> |
| | | and t.attr_id= #{attrId} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询费用属性数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryFeeAttrsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from pay_fee_attrs t |
| | | where 1 =1 |
| | | <if test="attrId !=null and attrId != ''"> |
| | | and t.attr_id= #{attrId} |
| | | </if> |
| | | <if test="specCd !=null and specCd != ''"> |
| | | and t.spec_cd= #{specCd} |
| | | </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="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="feeId !=null and feeId != ''"> |
| | | and t.fee_id= #{feeId} |
| | | </if> |
| | | <if test="value !=null and value != ''"> |
| | | and t.value= #{value} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| 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="feeConfigServiceDaoImpl"> |
| | | |
| | | <!-- 保存费用配置信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveBusinessFeeConfigInfo" parameterType="Map"> |
| | | insert into business_pay_fee_config( |
| | | square_price,operate,fee_type_cd,config_id,additional_amount,start_time,community_id,b_id |
| | | ) values ( |
| | | #{squarePrice},#{operate},#{feeTypeCd},#{configId},#{additionalAmount},#{startTime},#{communityId},#{bId} |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询费用配置信息(Business) add by wuxw 2018-07-03 --> |
| | | <select id="getBusinessFeeConfigInfo" parameterType="Map" resultType="Map"> |
| | | select t.square_price,t.square_price squarePrice,t.operate,t.fee_type_cd,t.fee_type_cd feeTypeCd,t.config_id,t.config_id configId,t.additional_amount,t.additional_amount additionalAmount,t.start_time,t.start_time startTime,t.community_id,t.community_id communityId,t.b_id,t.b_id bId |
| | | from business_pay_fee_config t |
| | | where 1 =1 |
| | | <if test="squarePrice !=null and squarePrice != ''"> |
| | | and t.square_price= #{squarePrice} |
| | | </if> |
| | | <if test="operate !=null and operate != ''"> |
| | | and t.operate= #{operate} |
| | | </if> |
| | | <if test="feeTypeCd !=null and feeTypeCd != ''"> |
| | | and t.fee_type_cd= #{feeTypeCd} |
| | | </if> |
| | | <if test="configId !=null and configId != ''"> |
| | | and t.config_id= #{configId} |
| | | </if> |
| | | <if test="additionalAmount !=null and additionalAmount != ''"> |
| | | and t.additional_amount= #{additionalAmount} |
| | | </if> |
| | | <if test="startTime !=null and startTime != ''"> |
| | | and t.start_time= #{startTime} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 保存费用配置信息至 instance表中 add by wuxw 2018-07-03 --> |
| | | <insert id="saveFeeConfigInfoInstance" parameterType="Map"> |
| | | insert into pay_fee_config( |
| | | square_price,fee_type_cd,config_id,additional_amount,start_time,status_cd,community_id,b_id |
| | | ) select t.square_price,t.fee_type_cd,t.config_id,t.additional_amount,t.start_time,'0',t.community_id,t.b_id from business_pay_fee_config t where 1=1 |
| | | <if test="squarePrice !=null and squarePrice != ''"> |
| | | and t.square_price= #{squarePrice} |
| | | </if> |
| | | and t.operate= 'ADD' |
| | | <if test="feeTypeCd !=null and feeTypeCd != ''"> |
| | | and t.fee_type_cd= #{feeTypeCd} |
| | | </if> |
| | | <if test="configId !=null and configId != ''"> |
| | | and t.config_id= #{configId} |
| | | </if> |
| | | <if test="additionalAmount !=null and additionalAmount != ''"> |
| | | and t.additional_amount= #{additionalAmount} |
| | | </if> |
| | | <if test="startTime !=null and startTime != ''"> |
| | | and t.start_time= #{startTime} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | |
| | | </insert> |
| | | |
| | | |
| | | |
| | | <!-- 查询费用配置信息 add by wuxw 2018-07-03 --> |
| | | <select id="getFeeConfigInfo" parameterType="Map" resultType="Map"> |
| | | select t.square_price,t.square_price squarePrice,t.fee_type_cd,t.fee_type_cd feeTypeCd,t.config_id,t.config_id configId,t.additional_amount,t.additional_amount additionalAmount,t.start_time,t.start_time startTime,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,t.b_id,t.b_id bId |
| | | from pay_fee_config t |
| | | where 1 =1 |
| | | <if test="squarePrice !=null and squarePrice != ''"> |
| | | and t.square_price= #{squarePrice} |
| | | </if> |
| | | <if test="feeTypeCd !=null and feeTypeCd != ''"> |
| | | and t.fee_type_cd= #{feeTypeCd} |
| | | </if> |
| | | <if test="configId !=null and configId != ''"> |
| | | and t.config_id= #{configId} |
| | | </if> |
| | | <if test="additionalAmount !=null and additionalAmount != ''"> |
| | | and t.additional_amount= #{additionalAmount} |
| | | </if> |
| | | <if test="startTime !=null and startTime != ''"> |
| | | and t.start_time= #{startTime} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 修改费用配置信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateFeeConfigInfoInstance" parameterType="Map"> |
| | | update pay_fee_config t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="squarePrice !=null and squarePrice != ''"> |
| | | , t.square_price= #{squarePrice} |
| | | </if> |
| | | <if test="feeTypeCd !=null and feeTypeCd != ''"> |
| | | , t.fee_type_cd= #{feeTypeCd} |
| | | </if> |
| | | <if test="additionalAmount !=null and additionalAmount != ''"> |
| | | , t.additional_amount= #{additionalAmount} |
| | | </if> |
| | | <if test="startTime !=null and startTime != ''"> |
| | | , t.start_time= #{startTime} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | , t.community_id= #{communityId} |
| | | </if> |
| | | where 1=1 <if test="configId !=null and configId != ''"> |
| | | and t.config_id= #{configId} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询费用配置数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryFeeConfigsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from pay_fee_config t |
| | | where 1 =1 |
| | | <if test="squarePrice !=null and squarePrice != ''"> |
| | | and t.square_price= #{squarePrice} |
| | | </if> |
| | | <if test="feeTypeCd !=null and feeTypeCd != ''"> |
| | | and t.fee_type_cd= #{feeTypeCd} |
| | | </if> |
| | | <if test="configId !=null and configId != ''"> |
| | | and t.config_id= #{configId} |
| | | </if> |
| | | <if test="additionalAmount !=null and additionalAmount != ''"> |
| | | and t.additional_amount= #{additionalAmount} |
| | | </if> |
| | | <if test="startTime !=null and startTime != ''"> |
| | | and t.start_time= #{startTime} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| 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="feeDetailServiceDaoImpl"> |
| | | |
| | | <!-- 保存费用明细信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveBusinessFeeDetailInfo" parameterType="Map"> |
| | | insert into business_pay_fee_detail( |
| | | operate,prime_rate,detail_id,receivable_amount,cycles,remark,received_amount,community_id,b_id,fee_id |
| | | ) values ( |
| | | #{operate},#{primeRate},#{detailId},#{receivableAmount},#{cycles},#{remark},#{receivedAmount},#{communityId},#{bId},#{feeId} |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询费用明细信息(Business) add by wuxw 2018-07-03 --> |
| | | <select id="getBusinessFeeDetailInfo" parameterType="Map" resultType="Map"> |
| | | select t.operate,t.prime_rate,t.prime_rate primeRate,t.detail_id,t.detail_id detailId,t.receivable_amount,t.receivable_amount receivableAmount,t.cycles,t.remark,t.received_amount,t.received_amount receivedAmount,t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.fee_id,t.fee_id feeId |
| | | from business_pay_fee_detail t |
| | | where 1 =1 |
| | | <if test="operate !=null and operate != ''"> |
| | | and t.operate= #{operate} |
| | | </if> |
| | | <if test="primeRate !=null and primeRate != ''"> |
| | | and t.prime_rate= #{primeRate} |
| | | </if> |
| | | <if test="detailId !=null and detailId != ''"> |
| | | and t.detail_id= #{detailId} |
| | | </if> |
| | | <if test="receivableAmount !=null and receivableAmount != ''"> |
| | | and t.receivable_amount= #{receivableAmount} |
| | | </if> |
| | | <if test="cycles !=null and cycles != ''"> |
| | | and t.cycles= #{cycles} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | <if test="receivedAmount !=null and receivedAmount != ''"> |
| | | and t.received_amount= #{receivedAmount} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="feeId !=null and feeId != ''"> |
| | | and t.fee_id= #{feeId} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 保存费用明细信息至 instance表中 add by wuxw 2018-07-03 --> |
| | | <insert id="saveFeeDetailInfoInstance" parameterType="Map"> |
| | | insert into pay_fee_detail( |
| | | prime_rate,detail_id,receivable_amount,cycles,remark,status_cd,received_amount,community_id,b_id,fee_id |
| | | ) select t.prime_rate,t.detail_id,t.receivable_amount,t.cycles,t.remark,'0',t.received_amount,t.community_id,t.b_id,t.fee_id from business_pay_fee_detail t where 1=1 |
| | | and t.operate= 'ADD' |
| | | <if test="primeRate !=null and primeRate != ''"> |
| | | and t.prime_rate= #{primeRate} |
| | | </if> |
| | | <if test="detailId !=null and detailId != ''"> |
| | | and t.detail_id= #{detailId} |
| | | </if> |
| | | <if test="receivableAmount !=null and receivableAmount != ''"> |
| | | and t.receivable_amount= #{receivableAmount} |
| | | </if> |
| | | <if test="cycles !=null and cycles != ''"> |
| | | and t.cycles= #{cycles} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | <if test="receivedAmount !=null and receivedAmount != ''"> |
| | | and t.received_amount= #{receivedAmount} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="feeId !=null and feeId != ''"> |
| | | and t.fee_id= #{feeId} |
| | | </if> |
| | | |
| | | </insert> |
| | | |
| | | |
| | | |
| | | <!-- 查询费用明细信息 add by wuxw 2018-07-03 --> |
| | | <select id="getFeeDetailInfo" parameterType="Map" resultType="Map"> |
| | | select t.prime_rate,t.prime_rate primeRate,t.detail_id,t.detail_id detailId,t.receivable_amount,t.receivable_amount receivableAmount,t.cycles,t.remark,t.status_cd,t.status_cd statusCd,t.received_amount,t.received_amount receivedAmount,t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.fee_id,t.fee_id feeId |
| | | from pay_fee_detail t |
| | | where 1 =1 |
| | | <if test="primeRate !=null and primeRate != ''"> |
| | | and t.prime_rate= #{primeRate} |
| | | </if> |
| | | <if test="detailId !=null and detailId != ''"> |
| | | and t.detail_id= #{detailId} |
| | | </if> |
| | | <if test="receivableAmount !=null and receivableAmount != ''"> |
| | | and t.receivable_amount= #{receivableAmount} |
| | | </if> |
| | | <if test="cycles !=null and cycles != ''"> |
| | | and t.cycles= #{cycles} |
| | | </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="receivedAmount !=null and receivedAmount != ''"> |
| | | and t.received_amount= #{receivedAmount} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="feeId !=null and feeId != ''"> |
| | | and t.fee_id= #{feeId} |
| | | </if> |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 修改费用明细信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateFeeDetailInfoInstance" parameterType="Map"> |
| | | update pay_fee_detail t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="primeRate !=null and primeRate != ''"> |
| | | , t.prime_rate= #{primeRate} |
| | | </if> |
| | | <if test="receivableAmount !=null and receivableAmount != ''"> |
| | | , t.receivable_amount= #{receivableAmount} |
| | | </if> |
| | | <if test="cycles !=null and cycles != ''"> |
| | | , t.cycles= #{cycles} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | , t.remark= #{remark} |
| | | </if> |
| | | <if test="receivedAmount !=null and receivedAmount != ''"> |
| | | , t.received_amount= #{receivedAmount} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | , t.community_id= #{communityId} |
| | | </if> |
| | | <if test="feeId !=null and feeId != ''"> |
| | | , t.fee_id= #{feeId} |
| | | </if> |
| | | where 1=1 <if test="detailId !=null and detailId != ''"> |
| | | and t.detail_id= #{detailId} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询费用明细数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryFeeDetailsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from pay_fee_detail t |
| | | where 1 =1 |
| | | <if test="primeRate !=null and primeRate != ''"> |
| | | and t.prime_rate= #{primeRate} |
| | | </if> |
| | | <if test="detailId !=null and detailId != ''"> |
| | | and t.detail_id= #{detailId} |
| | | </if> |
| | | <if test="receivableAmount !=null and receivableAmount != ''"> |
| | | and t.receivable_amount= #{receivableAmount} |
| | | </if> |
| | | <if test="cycles !=null and cycles != ''"> |
| | | and t.cycles= #{cycles} |
| | | </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="receivedAmount !=null and receivedAmount != ''"> |
| | | and t.received_amount= #{receivedAmount} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="feeId !=null and feeId != ''"> |
| | | and t.fee_id= #{feeId} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| 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="feeServiceDaoImpl"> |
| | | |
| | | <!-- 保存费用信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveBusinessFeeInfo" parameterType="Map"> |
| | | insert into business_pay_fee( |
| | | amount,operate,income_obj_id,fee_type_cd,start_time,end_time,community_id,b_id,fee_id,user_id,payer_obj_id |
| | | ) values ( |
| | | #{amount},#{operate},#{incomeObjId},#{feeTypeCd},#{startTime},#{endTime},#{communityId},#{bId},#{feeId},#{userId},#{payerObjId} |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询费用信息(Business) add by wuxw 2018-07-03 --> |
| | | <select id="getBusinessFeeInfo" parameterType="Map" resultType="Map"> |
| | | select t.amount,t.operate,t.income_obj_id,t.income_obj_id incomeObjId,t.fee_type_cd,t.fee_type_cd feeTypeCd,t.start_time,t.start_time startTime,t.end_time,t.end_time endTime,t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.fee_id,t.fee_id feeId,t.user_id,t.user_id userId,t.payer_obj_id,t.payer_obj_id payerObjId |
| | | from business_pay_fee t |
| | | where 1 =1 |
| | | <if test="amount !=null and amount != ''"> |
| | | and t.amount= #{amount} |
| | | </if> |
| | | <if test="operate !=null and operate != ''"> |
| | | and t.operate= #{operate} |
| | | </if> |
| | | <if test="incomeObjId !=null and incomeObjId != ''"> |
| | | and t.income_obj_id= #{incomeObjId} |
| | | </if> |
| | | <if test="feeTypeCd !=null and feeTypeCd != ''"> |
| | | and t.fee_type_cd= #{feeTypeCd} |
| | | </if> |
| | | <if test="startTime !=null and startTime != ''"> |
| | | and t.start_time= #{startTime} |
| | | </if> |
| | | <if test="endTime !=null and endTime != ''"> |
| | | and t.end_time= #{endTime} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="feeId !=null and feeId != ''"> |
| | | and t.fee_id= #{feeId} |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | and t.user_id= #{userId} |
| | | </if> |
| | | <if test="payerObjId !=null and payerObjId != ''"> |
| | | and t.payer_obj_id= #{payerObjId} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 保存费用信息至 instance表中 add by wuxw 2018-07-03 --> |
| | | <insert id="saveFeeInfoInstance" parameterType="Map"> |
| | | insert into pay_fee( |
| | | amount,income_obj_id,fee_type_cd,start_time,status_cd,end_time,community_id,b_id,fee_id,user_id,payer_obj_id |
| | | ) select t.amount,t.income_obj_id,t.fee_type_cd,t.start_time,'0',t.end_time,t.community_id,t.b_id,t.fee_id,t.user_id,t.payer_obj_id from business_pay_fee t where 1=1 |
| | | <if test="amount !=null and amount != ''"> |
| | | and t.amount= #{amount} |
| | | </if> |
| | | and t.operate= 'ADD' |
| | | <if test="incomeObjId !=null and incomeObjId != ''"> |
| | | and t.income_obj_id= #{incomeObjId} |
| | | </if> |
| | | <if test="feeTypeCd !=null and feeTypeCd != ''"> |
| | | and t.fee_type_cd= #{feeTypeCd} |
| | | </if> |
| | | <if test="startTime !=null and startTime != ''"> |
| | | and t.start_time= #{startTime} |
| | | </if> |
| | | <if test="endTime !=null and endTime != ''"> |
| | | and t.end_time= #{endTime} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="feeId !=null and feeId != ''"> |
| | | and t.fee_id= #{feeId} |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | and t.user_id= #{userId} |
| | | </if> |
| | | <if test="payerObjId !=null and payerObjId != ''"> |
| | | and t.payer_obj_id= #{payerObjId} |
| | | </if> |
| | | |
| | | </insert> |
| | | |
| | | |
| | | |
| | | <!-- 查询费用信息 add by wuxw 2018-07-03 --> |
| | | <select id="getFeeInfo" parameterType="Map" resultType="Map"> |
| | | select t.amount,t.income_obj_id,t.income_obj_id incomeObjId,t.fee_type_cd,t.fee_type_cd feeTypeCd,t.start_time,t.start_time startTime,t.status_cd,t.status_cd statusCd,t.end_time,t.end_time endTime,t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.fee_id,t.fee_id feeId,t.user_id,t.user_id userId,t.payer_obj_id,t.payer_obj_id payerObjId |
| | | from pay_fee t |
| | | where 1 =1 |
| | | <if test="amount !=null and amount != ''"> |
| | | and t.amount= #{amount} |
| | | </if> |
| | | <if test="incomeObjId !=null and incomeObjId != ''"> |
| | | and t.income_obj_id= #{incomeObjId} |
| | | </if> |
| | | <if test="feeTypeCd !=null and feeTypeCd != ''"> |
| | | and t.fee_type_cd= #{feeTypeCd} |
| | | </if> |
| | | <if test="startTime !=null and startTime != ''"> |
| | | and t.start_time= #{startTime} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="endTime !=null and endTime != ''"> |
| | | and t.end_time= #{endTime} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="feeId !=null and feeId != ''"> |
| | | and t.fee_id= #{feeId} |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | and t.user_id= #{userId} |
| | | </if> |
| | | <if test="payerObjId !=null and payerObjId != ''"> |
| | | and t.payer_obj_id= #{payerObjId} |
| | | </if> |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 修改费用信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateFeeInfoInstance" parameterType="Map"> |
| | | update pay_fee t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="amount !=null and amount != ''"> |
| | | , t.amount= #{amount} |
| | | </if> |
| | | <if test="incomeObjId !=null and incomeObjId != ''"> |
| | | , t.income_obj_id= #{incomeObjId} |
| | | </if> |
| | | <if test="feeTypeCd !=null and feeTypeCd != ''"> |
| | | , t.fee_type_cd= #{feeTypeCd} |
| | | </if> |
| | | <if test="startTime !=null and startTime != ''"> |
| | | , t.start_time= #{startTime} |
| | | </if> |
| | | <if test="endTime !=null and endTime != ''"> |
| | | , t.end_time= #{endTime} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | , t.community_id= #{communityId} |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | , t.user_id= #{userId} |
| | | </if> |
| | | <if test="payerObjId !=null and payerObjId != ''"> |
| | | , t.payer_obj_id= #{payerObjId} |
| | | </if> |
| | | where 1=1 <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="feeId !=null and feeId != ''"> |
| | | and t.fee_id= #{feeId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询费用数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryFeesCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from pay_fee t |
| | | where 1 =1 |
| | | <if test="amount !=null and amount != ''"> |
| | | and t.amount= #{amount} |
| | | </if> |
| | | <if test="incomeObjId !=null and incomeObjId != ''"> |
| | | and t.income_obj_id= #{incomeObjId} |
| | | </if> |
| | | <if test="feeTypeCd !=null and feeTypeCd != ''"> |
| | | and t.fee_type_cd= #{feeTypeCd} |
| | | </if> |
| | | <if test="startTime !=null and startTime != ''"> |
| | | and t.start_time= #{startTime} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="endTime !=null and endTime != ''"> |
| | | and t.end_time= #{endTime} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="feeId !=null and feeId != ''"> |
| | | and t.fee_id= #{feeId} |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | and t.user_id= #{userId} |
| | | </if> |
| | | <if test="payerObjId !=null and payerObjId != ''"> |
| | | and t.payer_obj_id= #{payerObjId} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |