| New file |
| | |
| | | package com.java110.dto.feeReceipt; |
| | | |
| | | import com.java110.dto.PageDto; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @ClassName FloorDto |
| | | * @Description 收据数据层封装 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 8:52 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | public class FeeReceiptDto extends PageDto implements Serializable { |
| | | |
| | | private String amount; |
| | | private String objId; |
| | | private String remark; |
| | | private String objName; |
| | | private String communityId; |
| | | private String receiptId; |
| | | private String objType; |
| | | |
| | | |
| | | private Date createTime; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | |
| | | public String getAmount() { |
| | | return amount; |
| | | } |
| | | public void setAmount(String amount) { |
| | | this.amount = amount; |
| | | } |
| | | public String getObjId() { |
| | | return objId; |
| | | } |
| | | public void setObjId(String objId) { |
| | | this.objId = objId; |
| | | } |
| | | public String getRemark() { |
| | | return remark; |
| | | } |
| | | public void setRemark(String remark) { |
| | | this.remark = remark; |
| | | } |
| | | public String getObjName() { |
| | | return objName; |
| | | } |
| | | public void setObjName(String objName) { |
| | | this.objName = objName; |
| | | } |
| | | public String getCommunityId() { |
| | | return communityId; |
| | | } |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | public String getReceiptId() { |
| | | return receiptId; |
| | | } |
| | | public void setReceiptId(String receiptId) { |
| | | this.receiptId = receiptId; |
| | | } |
| | | public String getObjType() { |
| | | return objType; |
| | | } |
| | | public void setObjType(String objType) { |
| | | this.objType = objType; |
| | | } |
| | | |
| | | |
| | | 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.feeReceiptDetail; |
| | | |
| | | import com.java110.dto.PageDto; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @ClassName FloorDto |
| | | * @Description 收据明细数据层封装 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 8:52 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | public class FeeReceiptDetailDto extends PageDto implements Serializable { |
| | | |
| | | private String area; |
| | | private String amount; |
| | | private String feeName; |
| | | private String detailId; |
| | | private String startTime; |
| | | private String endTime; |
| | | private String communityId; |
| | | private String receiptId; |
| | | private String feeId; |
| | | private String cycle; |
| | | |
| | | |
| | | private Date createTime; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | |
| | | public String getArea() { |
| | | return area; |
| | | } |
| | | public void setArea(String area) { |
| | | this.area = area; |
| | | } |
| | | public String getAmount() { |
| | | return amount; |
| | | } |
| | | public void setAmount(String amount) { |
| | | this.amount = amount; |
| | | } |
| | | public String getFeeName() { |
| | | return feeName; |
| | | } |
| | | public void setFeeName(String feeName) { |
| | | this.feeName = feeName; |
| | | } |
| | | public String getDetailId() { |
| | | return detailId; |
| | | } |
| | | public void setDetailId(String detailId) { |
| | | this.detailId = detailId; |
| | | } |
| | | 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 getReceiptId() { |
| | | return receiptId; |
| | | } |
| | | public void setReceiptId(String receiptId) { |
| | | this.receiptId = receiptId; |
| | | } |
| | | public String getFeeId() { |
| | | return feeId; |
| | | } |
| | | public void setFeeId(String feeId) { |
| | | this.feeId = feeId; |
| | | } |
| | | public String getCycle() { |
| | | return cycle; |
| | | } |
| | | public void setCycle(String cycle) { |
| | | this.cycle = cycle; |
| | | } |
| | | |
| | | |
| | | 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.po.feeReceipt; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | public class FeeReceiptPo implements Serializable { |
| | | |
| | | private String amount; |
| | | private String objId; |
| | | private String remark; |
| | | private String statusCd = "0"; |
| | | private String objName; |
| | | private String communityId; |
| | | private String receiptId; |
| | | private String objType; |
| | | public String getAmount() { |
| | | return amount; |
| | | } |
| | | public void setAmount(String amount) { |
| | | this.amount = amount; |
| | | } |
| | | public String getObjId() { |
| | | return objId; |
| | | } |
| | | public void setObjId(String objId) { |
| | | this.objId = objId; |
| | | } |
| | | public String getRemark() { |
| | | return remark; |
| | | } |
| | | public void setRemark(String remark) { |
| | | this.remark = remark; |
| | | } |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | | } |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | public String getObjName() { |
| | | return objName; |
| | | } |
| | | public void setObjName(String objName) { |
| | | this.objName = objName; |
| | | } |
| | | public String getCommunityId() { |
| | | return communityId; |
| | | } |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | public String getReceiptId() { |
| | | return receiptId; |
| | | } |
| | | public void setReceiptId(String receiptId) { |
| | | this.receiptId = receiptId; |
| | | } |
| | | public String getObjType() { |
| | | return objType; |
| | | } |
| | | public void setObjType(String objType) { |
| | | this.objType = objType; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.po.feeReceiptDetail; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | public class FeeReceiptDetailPo implements Serializable { |
| | | |
| | | private String area; |
| | | private String amount; |
| | | private String feeName; |
| | | private String detailId; |
| | | private String startTime; |
| | | private String statusCd = "0"; |
| | | private String endTime; |
| | | private String communityId; |
| | | private String receiptId; |
| | | private String feeId; |
| | | private String cycle; |
| | | public String getArea() { |
| | | return area; |
| | | } |
| | | public void setArea(String area) { |
| | | this.area = area; |
| | | } |
| | | public String getAmount() { |
| | | return amount; |
| | | } |
| | | public void setAmount(String amount) { |
| | | this.amount = amount; |
| | | } |
| | | public String getFeeName() { |
| | | return feeName; |
| | | } |
| | | public void setFeeName(String feeName) { |
| | | this.feeName = feeName; |
| | | } |
| | | public String getDetailId() { |
| | | return detailId; |
| | | } |
| | | public void setDetailId(String detailId) { |
| | | this.detailId = detailId; |
| | | } |
| | | public String getStartTime() { |
| | | return startTime; |
| | | } |
| | | public void setStartTime(String startTime) { |
| | | this.startTime = startTime; |
| | | } |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | | } |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | 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 getReceiptId() { |
| | | return receiptId; |
| | | } |
| | | public void setReceiptId(String receiptId) { |
| | | this.receiptId = receiptId; |
| | | } |
| | | public String getFeeId() { |
| | | return feeId; |
| | | } |
| | | public void setFeeId(String feeId) { |
| | | this.feeId = feeId; |
| | | } |
| | | public String getCycle() { |
| | | return cycle; |
| | | } |
| | | public void setCycle(String cycle) { |
| | | this.cycle = cycle; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | public static final String CODE_PREFIX_loginId = "82"; |
| | | public static final String CODE_PREFIX_templateId = "82"; |
| | | public static final String CODE_PREFIX_printId = "83"; |
| | | public static final String CODE_PREFIX_receiptId = "83"; |
| | | |
| | | |
| | | |
| 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="feeReceiptDetailServiceDaoImpl"> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 保存收据明细信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveFeeReceiptDetailInfo" parameterType="Map"> |
| | | insert into fee_receipt_detail( |
| | | area,amount,fee_name,detail_id,start_time,end_time,community_id,receipt_id,fee_id,cycle |
| | | ) values ( |
| | | #{area},#{amount},#{feeName},#{detailId},#{startTime},#{endTime},#{communityId},#{receiptId},#{feeId},#{cycle} |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | |
| | | <!-- 查询收据明细信息 add by wuxw 2018-07-03 --> |
| | | <select id="getFeeReceiptDetailInfo" parameterType="Map" resultType="Map"> |
| | | select t.area,t.amount,t.fee_name,t.fee_name feeName,t.detail_id,t.detail_id detailId,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.receipt_id,t.receipt_id receiptId,t.fee_id,t.fee_id feeId,t.cycle |
| | | from fee_receipt_detail t |
| | | where 1 =1 |
| | | <if test="area !=null and area != ''"> |
| | | and t.area= #{area} |
| | | </if> |
| | | <if test="amount !=null and amount != ''"> |
| | | and t.amount= #{amount} |
| | | </if> |
| | | <if test="feeName !=null and feeName != ''"> |
| | | and t.fee_name= #{feeName} |
| | | </if> |
| | | <if test="detailId !=null and detailId != ''"> |
| | | and t.detail_id= #{detailId} |
| | | </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="receiptId !=null and receiptId != ''"> |
| | | and t.receipt_id= #{receiptId} |
| | | </if> |
| | | <if test="feeId !=null and feeId != ''"> |
| | | and t.fee_id= #{feeId} |
| | | </if> |
| | | <if test="cycle !=null and cycle != ''"> |
| | | and t.cycle= #{cycle} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 修改收据明细信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateFeeReceiptDetailInfo" parameterType="Map"> |
| | | update fee_receipt_detail t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="area !=null and area != ''"> |
| | | , t.area= #{area} |
| | | </if> |
| | | <if test="amount !=null and amount != ''"> |
| | | , t.amount= #{amount} |
| | | </if> |
| | | <if test="feeName !=null and feeName != ''"> |
| | | , t.fee_name= #{feeName} |
| | | </if> |
| | | <if test="detailId !=null and detailId != ''"> |
| | | , t.detail_id= #{detailId} |
| | | </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="feeId !=null and feeId != ''"> |
| | | , t.fee_id= #{feeId} |
| | | </if> |
| | | <if test="cycle !=null and cycle != ''"> |
| | | , t.cycle= #{cycle} |
| | | </if> |
| | | where 1=1 <if test="receiptId !=null and receiptId != ''"> |
| | | and t.receipt_id= #{receiptId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询收据明细数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryFeeReceiptDetailsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from fee_receipt_detail t |
| | | where 1 =1 |
| | | <if test="area !=null and area != ''"> |
| | | and t.area= #{area} |
| | | </if> |
| | | <if test="amount !=null and amount != ''"> |
| | | and t.amount= #{amount} |
| | | </if> |
| | | <if test="feeName !=null and feeName != ''"> |
| | | and t.fee_name= #{feeName} |
| | | </if> |
| | | <if test="detailId !=null and detailId != ''"> |
| | | and t.detail_id= #{detailId} |
| | | </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="receiptId !=null and receiptId != ''"> |
| | | and t.receipt_id= #{receiptId} |
| | | </if> |
| | | <if test="feeId !=null and feeId != ''"> |
| | | and t.fee_id= #{feeId} |
| | | </if> |
| | | <if test="cycle !=null and cycle != ''"> |
| | | and t.cycle= #{cycle} |
| | | </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="feeReceiptServiceDaoImpl"> |
| | | |
| | | |
| | | <!-- 保存收据信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveFeeReceiptInfo" parameterType="Map"> |
| | | insert into fee_receipt( |
| | | amount,obj_id,remark,obj_name,community_id,receipt_id,obj_type |
| | | ) values ( |
| | | #{amount},#{objId},#{remark},#{objName},#{communityId},#{receiptId},#{objType} |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询收据信息 add by wuxw 2018-07-03 --> |
| | | <select id="getFeeReceiptInfo" parameterType="Map" resultType="Map"> |
| | | select t.amount,t.obj_id,t.obj_id objId,t.remark,t.status_cd,t.status_cd statusCd,t.obj_name,t.obj_name |
| | | objName,t.community_id,t.community_id communityId,t.receipt_id,t.receipt_id receiptId,t.obj_type,t.obj_type |
| | | objType |
| | | from fee_receipt t |
| | | where 1 =1 |
| | | <if test="amount !=null and amount != ''"> |
| | | and t.amount= #{amount} |
| | | </if> |
| | | <if test="objId !=null and objId != ''"> |
| | | and t.obj_id= #{objId} |
| | | </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="objName !=null and objName != ''"> |
| | | and t.obj_name= #{objName} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="receiptId !=null and receiptId != ''"> |
| | | and t.receipt_id= #{receiptId} |
| | | </if> |
| | | <if test="objType !=null and objType != ''"> |
| | | and t.obj_type= #{objType} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改收据信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateFeeReceiptInfo" parameterType="Map"> |
| | | update fee_receipt 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="objId !=null and objId != ''"> |
| | | , t.obj_id= #{objId} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | , t.remark= #{remark} |
| | | </if> |
| | | <if test="objName !=null and objName != ''"> |
| | | , t.obj_name= #{objName} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | , t.community_id= #{communityId} |
| | | </if> |
| | | <if test="objType !=null and objType != ''"> |
| | | , t.obj_type= #{objType} |
| | | </if> |
| | | where 1=1 |
| | | <if test="receiptId !=null and receiptId != ''"> |
| | | and t.receipt_id= #{receiptId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询收据数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryFeeReceiptsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from fee_receipt t |
| | | where 1 =1 |
| | | <if test="amount !=null and amount != ''"> |
| | | and t.amount= #{amount} |
| | | </if> |
| | | <if test="objId !=null and objId != ''"> |
| | | and t.obj_id= #{objId} |
| | | </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="objName !=null and objName != ''"> |
| | | and t.obj_name= #{objName} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="receiptId !=null and receiptId != ''"> |
| | | and t.receipt_id= #{receiptId} |
| | | </if> |
| | | <if test="objType !=null and objType != ''"> |
| | | and t.obj_type= #{objType} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | { |
| | | "autoMove": true, |
| | | "id": "printId", |
| | | "name": "feePrintSpec", |
| | | "desc": "打印说明", |
| | | "id": "receiptId", |
| | | "name": "feeReceiptDetail", |
| | | "desc": "收据明细", |
| | | "shareParam": "communityId", |
| | | "shareColumn": "community_id", |
| | | "shareName": "fee", |
| | | "tableName": "fee_print_spec", |
| | | "tableName": "fee_receipt_detail", |
| | | "param": { |
| | | "printId": "print_id", |
| | | "receiptId": "receipt_id", |
| | | "communityId": "community_id", |
| | | "specCd": "spec_cd", |
| | | "context": "content", |
| | | "qrImg": "qr_img", |
| | | "detailId": "detail_id", |
| | | "feeId": "fee_id", |
| | | "feeName": "fee_name", |
| | | "area": "area", |
| | | "startTime": "start_time", |
| | | "endTime": "end_time", |
| | | "amount": "amount", |
| | | "cycle": "cycle", |
| | | "statusCd": "status_cd" |
| | | }, |
| | | "required": [ |
| | |
| | | "msg": "小区不能为空" |
| | | }, |
| | | { |
| | | "code": "content", |
| | | "msg": "内容不能为空" |
| | | "code": "amount", |
| | | "msg": "费用金额不能为空" |
| | | }, |
| | | { |
| | | "code": "specCd", |
| | | "msg": "规格不能为空" |
| | | "code": "feeName", |
| | | "msg": "费用名称不能为空" |
| | | } |
| | | ] |
| | | } |
| New file |
| | |
| | | { |
| | | "autoMove": true, |
| | | "id": "receiptId", |
| | | "name": "feeReceipt", |
| | | "desc": "收据", |
| | | "shareParam": "communityId", |
| | | "shareColumn": "community_id", |
| | | "shareName": "fee", |
| | | "tableName": "fee_receipt", |
| | | "param": { |
| | | "receiptId": "receipt_id", |
| | | "communityId": "community_id", |
| | | "objType": "obj_type", |
| | | "objId": "obj_id", |
| | | "objName": "obj_name", |
| | | "amount": "amount", |
| | | "remark": "remark", |
| | | "statusCd": "status_cd" |
| | | }, |
| | | "required": [ |
| | | { |
| | | "code": "communityId", |
| | | "msg": "小区不能为空" |
| | | }, |
| | | { |
| | | "code": "amount", |
| | | "msg": "金额不能为空" |
| | | }, |
| | | { |
| | | "code": "objName", |
| | | "msg": "名称不能为空" |
| | | } |
| | | ] |
| | | } |
| | | |
| New file |
| | |
| | | package com.java110.intf; |
| | | |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.feeReceiptDetail.FeeReceiptDetailDto; |
| | | import com.java110.po.feeReceiptDetail.FeeReceiptDetailPo; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName IFeeReceiptDetailInnerServiceSMO |
| | | * @Description 收据明细接口类 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 9:04 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | @FeignClient(name = "user-service", configuration = {FeignConfiguration.class}) |
| | | @RequestMapping("/feeReceiptDetailApi") |
| | | public interface IFeeReceiptDetailInnerServiceSMO { |
| | | |
| | | |
| | | @RequestMapping(value = "/saveFeeReceiptDetail", method = RequestMethod.POST) |
| | | public int saveFeeReceiptDetail(@RequestBody FeeReceiptDetailPo feeReceiptDetailPo); |
| | | |
| | | @RequestMapping(value = "/updateFeeReceiptDetail", method = RequestMethod.POST) |
| | | public int updateFeeReceiptDetail(@RequestBody FeeReceiptDetailPo feeReceiptDetailPo); |
| | | |
| | | @RequestMapping(value = "/deleteFeeReceiptDetail", method = RequestMethod.POST) |
| | | public int deleteFeeReceiptDetail(@RequestBody FeeReceiptDetailPo feeReceiptDetailPo); |
| | | |
| | | /** |
| | | * <p>查询小区楼信息</p> |
| | | * |
| | | * |
| | | * @param feeReceiptDetailDto 数据对象分享 |
| | | * @return FeeReceiptDetailDto 对象数据 |
| | | */ |
| | | @RequestMapping(value = "/queryFeeReceiptDetails", method = RequestMethod.POST) |
| | | List<FeeReceiptDetailDto> queryFeeReceiptDetails(@RequestBody FeeReceiptDetailDto feeReceiptDetailDto); |
| | | |
| | | /** |
| | | * 查询<p>小区楼</p>总记录数 |
| | | * |
| | | * @param feeReceiptDetailDto 数据对象分享 |
| | | * @return 小区下的小区楼记录数 |
| | | */ |
| | | @RequestMapping(value = "/queryFeeReceiptDetailsCount", method = RequestMethod.POST) |
| | | int queryFeeReceiptDetailsCount(@RequestBody FeeReceiptDetailDto feeReceiptDetailDto); |
| | | } |
| New file |
| | |
| | | package com.java110.intf.fee; |
| | | |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.feeReceipt.FeeReceiptDto; |
| | | import com.java110.po.feeReceipt.FeeReceiptPo; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName IFeeReceiptInnerServiceSMO |
| | | * @Description 收据接口类 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 9:04 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | @FeignClient(name = "user-service", configuration = {FeignConfiguration.class}) |
| | | @RequestMapping("/feeReceiptApi") |
| | | public interface IFeeReceiptInnerServiceSMO { |
| | | |
| | | |
| | | @RequestMapping(value = "/saveFeeReceipt", method = RequestMethod.POST) |
| | | public int saveFeeReceipt(@RequestBody FeeReceiptPo feeReceiptPo); |
| | | |
| | | @RequestMapping(value = "/updateFeeReceipt", method = RequestMethod.POST) |
| | | public int updateFeeReceipt(@RequestBody FeeReceiptPo feeReceiptPo); |
| | | |
| | | @RequestMapping(value = "/deleteFeeReceipt", method = RequestMethod.POST) |
| | | public int deleteFeeReceipt(@RequestBody FeeReceiptPo feeReceiptPo); |
| | | |
| | | /** |
| | | * <p>查询小区楼信息</p> |
| | | * |
| | | * |
| | | * @param feeReceiptDto 数据对象分享 |
| | | * @return FeeReceiptDto 对象数据 |
| | | */ |
| | | @RequestMapping(value = "/queryFeeReceipts", method = RequestMethod.POST) |
| | | List<FeeReceiptDto> queryFeeReceipts(@RequestBody FeeReceiptDto feeReceiptDto); |
| | | |
| | | /** |
| | | * 查询<p>小区楼</p>总记录数 |
| | | * |
| | | * @param feeReceiptDto 数据对象分享 |
| | | * @return 小区下的小区楼记录数 |
| | | */ |
| | | @RequestMapping(value = "/queryFeeReceiptsCount", method = RequestMethod.POST) |
| | | int queryFeeReceiptsCount(@RequestBody FeeReceiptDto feeReceiptDto); |
| | | } |
| | |
| | | import com.java110.dto.owner.OwnerCarDto; |
| | | import com.java110.po.fee.PayFeeDetailPo; |
| | | import com.java110.po.fee.PayFeePo; |
| | | import com.java110.po.feeReceipt.FeeReceiptPo; |
| | | import com.java110.po.feeReceiptDetail.FeeReceiptDetailPo; |
| | | |
| | | /** |
| | | * @ClassName IFeeBMO |
| | |
| | | * @param dataFlowContext 数据上下文 |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | public JSONObject addFeeDetail(JSONObject paramInJson, DataFlowContext dataFlowContext); |
| | | public JSONObject addFeeDetail(JSONObject paramInJson, DataFlowContext dataFlowContext, FeeReceiptDetailPo feeReceiptDetailPo, FeeReceiptPo feeReceiptPo); |
| | | |
| | | /** |
| | | * 添加费用明细信息 |
| | |
| | | import com.java110.api.bmo.ApiBaseBMO; |
| | | import com.java110.api.bmo.fee.IFeeBMO; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.RoomDto; |
| | | import com.java110.dto.fee.FeeConfigDto; |
| | | import com.java110.dto.fee.FeeDto; |
| | |
| | | import com.java110.intf.community.IRoomInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeConfigInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerCarInnerServiceSMO; |
| | | import com.java110.po.car.CarInoutPo; |
| | | import com.java110.po.fee.PayFeeConfigPo; |
| | | import com.java110.po.fee.PayFeeDetailPo; |
| | | import com.java110.po.fee.PayFeePo; |
| | | import com.java110.po.feeReceipt.FeeReceiptPo; |
| | | import com.java110.po.feeReceiptDetail.FeeReceiptDetailPo; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.CommonConstant; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | |
| | | |
| | | @Autowired |
| | | private ICarInoutInnerServiceSMO carInoutInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOwnerCarInnerServiceSMO ownerCarInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFeeConfigInnerServiceSMO feeConfigInnerServiceSMOImpl; |
| | |
| | | * @param dataFlowContext 数据上下文 |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | public JSONObject addFeeDetail(JSONObject paramInJson, DataFlowContext dataFlowContext) { |
| | | public JSONObject addFeeDetail(JSONObject paramInJson, DataFlowContext dataFlowContext, FeeReceiptDetailPo feeReceiptDetailPo, FeeReceiptPo feeReceiptPo) { |
| | | |
| | | |
| | | JSONObject business = JSONObject.parseObject("{\"datas\":{}}"); |
| | |
| | | |
| | | if ("3333".equals(feeDto.getPayerObjType())) { //房屋相关 |
| | | String computingFormula = feeDto.getComputingFormula(); |
| | | RoomDto roomDto = new RoomDto(); |
| | | roomDto.setRoomId(feeDto.getPayerObjId()); |
| | | roomDto.setCommunityId(feeDto.getCommunityId()); |
| | | List<RoomDto> roomDtos = roomInnerServiceSMOImpl.queryRooms(roomDto); |
| | | if (roomDtos == null || roomDtos.size() != 1) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_ERROR, "未查到房屋信息,查询多条数据"); |
| | | } |
| | | roomDto = roomDtos.get(0); |
| | | feeReceiptPo.setObjName(roomDto.getFloorNum() + "栋" + roomDto.getUnitNum() + "单元" + roomDto.getRoomNum()); |
| | | |
| | | if ("1001".equals(computingFormula)) { //面积*单价+附加费 |
| | | RoomDto roomDto = new RoomDto(); |
| | | roomDto.setRoomId(feeDto.getPayerObjId()); |
| | | roomDto.setCommunityId(feeDto.getCommunityId()); |
| | | List<RoomDto> roomDtos = roomInnerServiceSMOImpl.queryRooms(roomDto); |
| | | if (roomDtos == null || roomDtos.size() != 1) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_ERROR, "未查到房屋信息,查询多条数据"); |
| | | } |
| | | roomDto = roomDtos.get(0); |
| | | //feePrice = Double.parseDouble(feeDto.getSquarePrice()) * Double.parseDouble(roomDtos.get(0).getBuiltUpArea()) + Double.parseDouble(feeDto.getAdditionalAmount()); |
| | | BigDecimal squarePrice = new BigDecimal(Double.parseDouble(feeDto.getSquarePrice())); |
| | | BigDecimal builtUpArea = new BigDecimal(Double.parseDouble(roomDtos.get(0).getBuiltUpArea())); |
| | | BigDecimal additionalAmount = new BigDecimal(Double.parseDouble(feeDto.getAdditionalAmount())); |
| | | feePrice = squarePrice.multiply(builtUpArea).add(additionalAmount).setScale(2, BigDecimal.ROUND_HALF_EVEN); |
| | | feeReceiptDetailPo.setArea(roomDtos.get(0).getBuiltUpArea()); |
| | | } else if ("2002".equals(computingFormula)) { // 固定费用 |
| | | //feePrice = Double.parseDouble(feeDto.getAdditionalAmount()); |
| | | BigDecimal additionalAmount = new BigDecimal(Double.parseDouble(feeDto.getAdditionalAmount())); |
| | |
| | | feePrice = sub.multiply(squarePrice) |
| | | .add(additionalAmount) |
| | | .setScale(2, BigDecimal.ROUND_HALF_EVEN); |
| | | feeReceiptDetailPo.setArea(sub.setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue() + ""); |
| | | |
| | | } |
| | | } else { |
| | | throw new IllegalArgumentException("暂不支持该类公式"); |
| | | } |
| | | } else if ("6666".equals(feeDto.getPayerObjType())) {//车位相关 |
| | | String computingFormula = feeDto.getComputingFormula(); |
| | | |
| | | OwnerCarDto ownerCarDto = new OwnerCarDto(); |
| | | ownerCarDto.setCommunityId(feeDto.getCommunityId()); |
| | | ownerCarDto.setCarId(feeDto.getPayerObjId()); |
| | | List<OwnerCarDto> ownerCarDtos = ownerCarInnerServiceSMOImpl.queryOwnerCars(ownerCarDto); |
| | | |
| | | if (ownerCarDtos != null && ownerCarDtos.size() > 0) { |
| | | feeReceiptPo.setObjName(ownerCarDtos.get(0).getCarNum()); |
| | | } |
| | | if ("1001".equals(computingFormula)) { //面积*单价+附加费 |
| | | ParkingSpaceDto parkingSpaceDto = new ParkingSpaceDto(); |
| | | parkingSpaceDto.setCommunityId(feeDto.getCommunityId()); |
| | | parkingSpaceDto.setPsId(feeDto.getPayerObjId()); |
| | | parkingSpaceDto.setPsId(ownerCarDtos.get(0).getPsId()); |
| | | List<ParkingSpaceDto> parkingSpaceDtos = parkingSpaceInnerServiceSMOImpl.queryParkingSpaces(parkingSpaceDto); |
| | | |
| | | if (parkingSpaceDtos == null || parkingSpaceDtos.size() < 1) { //数据有问题 |
| | |
| | | BigDecimal builtUpArea = new BigDecimal(Double.parseDouble(parkingSpaceDtos.get(0).getArea())); |
| | | BigDecimal additionalAmount = new BigDecimal(Double.parseDouble(feeDto.getAdditionalAmount())); |
| | | feePrice = squarePrice.multiply(builtUpArea).add(additionalAmount).setScale(2, BigDecimal.ROUND_HALF_EVEN); |
| | | feeReceiptDetailPo.setArea(parkingSpaceDtos.get(0).getArea()); |
| | | |
| | | } else if ("2002".equals(computingFormula)) { // 固定费用 |
| | | //feePrice = Double.parseDouble(feeDto.getAdditionalAmount()); |
| | | BigDecimal additionalAmount = new BigDecimal(Double.parseDouble(feeDto.getAdditionalAmount())); |
| | |
| | | feePrice = sub.multiply(squarePrice) |
| | | .add(additionalAmount) |
| | | .setScale(2, BigDecimal.ROUND_HALF_EVEN); |
| | | feeReceiptDetailPo.setArea(sub.setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue() + ""); |
| | | } |
| | | } else { |
| | | throw new IllegalArgumentException("暂不支持该类公式"); |
| | |
| | | |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put(PayFeeDetailPo.class.getSimpleName(), businessFeeDetail); |
| | | |
| | | feeReceiptDetailPo.setAmount(businessFeeDetail.getString("receivableAmount")); |
| | | feeReceiptDetailPo.setCommunityId(feeDto.getCommunityId()); |
| | | feeReceiptDetailPo.setCycle(businessFeeDetail.getString("cycles")); |
| | | feeReceiptDetailPo.setDetailId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_detailId)); |
| | | feeReceiptDetailPo.setEndTime(businessFeeDetail.getString("endTime")); |
| | | feeReceiptDetailPo.setFeeId(feeDto.getFeeId()); |
| | | feeReceiptDetailPo.setFeeName(StringUtil.isEmpty(feeDto.getImportFeeName()) ? feeDto.getFeeName() : feeDto.getImportFeeName()); |
| | | feeReceiptDetailPo.setStartTime(businessFeeDetail.getString("startTime")); |
| | | feeReceiptDetailPo.setReceiptId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_receiptId)); |
| | | feeReceiptPo.setAmount(feeReceiptDetailPo.getAmount()); |
| | | feeReceiptPo.setCommunityId(feeReceiptDetailPo.getCommunityId()); |
| | | feeReceiptPo.setReceiptId(feeReceiptDetailPo.getReceiptId()); |
| | | feeReceiptPo.setObjType(feeDto.getPayerObjType()); |
| | | feeReceiptPo.setObjId(feeDto.getPayerObjId()); |
| | | return business; |
| | | } |
| | | |
| | |
| | | paramInJson.put("carPayerObjType", feeInfo.getPayerObjType()); |
| | | paramInJson.put("carPayerObjId", feeInfo.getPayerObjId()); |
| | | |
| | | |
| | | return business; |
| | | } |
| | | |
| | |
| | | import com.java110.dto.owner.OwnerCarDto; |
| | | import com.java110.dto.repair.RepairDto; |
| | | import com.java110.entity.center.AppService; |
| | | import com.java110.intf.IFeeReceiptDetailInnerServiceSMO; |
| | | import com.java110.intf.community.IParkingSpaceInnerServiceSMO; |
| | | import com.java110.intf.community.IRoomInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeAttrInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeConfigInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeReceiptInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerCarInnerServiceSMO; |
| | | import com.java110.po.car.OwnerCarPo; |
| | | import com.java110.po.feeReceipt.FeeReceiptPo; |
| | | import com.java110.po.feeReceiptDetail.FeeReceiptDetailPo; |
| | | import com.java110.po.owner.RepairPoolPo; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.CommonConstant; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpHeaders; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | import java.util.Date; |
| | |
| | | @Autowired |
| | | private IOwnerCarInnerServiceSMO ownerCarInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFeeReceiptInnerServiceSMO feeReceiptInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFeeReceiptDetailInnerServiceSMO feeReceiptDetailInnerServiceSMOImpl; |
| | | |
| | | |
| | | @Override |
| | | public String getServiceCode() { |
| | |
| | | JSONArray businesses = new JSONArray(); |
| | | |
| | | //添加单元信息 |
| | | businesses.add(feeBMOImpl.addFeeDetail(paramObj, dataFlowContext)); |
| | | FeeReceiptPo feeReceiptPo = new FeeReceiptPo(); |
| | | FeeReceiptDetailPo feeReceiptDetailPo = new FeeReceiptDetailPo(); |
| | | businesses.add(feeBMOImpl.addFeeDetail(paramObj, dataFlowContext, feeReceiptDetailPo, feeReceiptPo)); |
| | | businesses.add(feeBMOImpl.modifyFee(paramObj, dataFlowContext)); |
| | | |
| | | |
| | |
| | | businesses.add(business); |
| | | } |
| | | |
| | | |
| | | ResponseEntity<String> responseEntity = feeBMOImpl.callService(dataFlowContext, service.getServiceCode(), businesses); |
| | | |
| | | dataFlowContext.setResponseEntity(responseEntity); |
| | | |
| | | if (responseEntity.getStatusCode() != HttpStatus.OK) { |
| | | return; |
| | | } |
| | | |
| | | //这里只是写入 收据表,暂不考虑 事务一致性问题,就算写入失败 也只是影响 收据打印,如果 贵公司对 收据要求 比较高,不能有失败的情况 请加入事务管理 |
| | | feeReceiptDetailInnerServiceSMOImpl.saveFeeReceiptDetail(feeReceiptDetailPo); |
| | | feeReceiptInnerServiceSMOImpl.saveFeeReceipt(feeReceiptPo); |
| | | } |
| | | |
| | | /** |
| New file |
| | |
| | | package com.java110.fee.api; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.dto.feeReceipt.FeeReceiptDto; |
| | | import com.java110.dto.feeReceiptDetail.FeeReceiptDetailDto; |
| | | import com.java110.fee.bmo.feeReceipt.IDeleteFeeReceiptBMO; |
| | | import com.java110.fee.bmo.feeReceipt.IGetFeeReceiptBMO; |
| | | import com.java110.fee.bmo.feeReceipt.ISaveFeeReceiptBMO; |
| | | import com.java110.fee.bmo.feeReceipt.IUpdateFeeReceiptBMO; |
| | | import com.java110.fee.bmo.feeReceiptDetail.IDeleteFeeReceiptDetailBMO; |
| | | import com.java110.fee.bmo.feeReceiptDetail.IGetFeeReceiptDetailBMO; |
| | | import com.java110.fee.bmo.feeReceiptDetail.ISaveFeeReceiptDetailBMO; |
| | | import com.java110.fee.bmo.feeReceiptDetail.IUpdateFeeReceiptDetailBMO; |
| | | import com.java110.po.feeReceipt.FeeReceiptPo; |
| | | import com.java110.po.feeReceiptDetail.FeeReceiptDetailPo; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @RestController |
| | | @RequestMapping(value = "/feeReceipt") |
| | | public class FeeReceiptApi { |
| | | |
| | | @Autowired |
| | | private ISaveFeeReceiptBMO saveFeeReceiptBMOImpl; |
| | | @Autowired |
| | | private IUpdateFeeReceiptBMO updateFeeReceiptBMOImpl; |
| | | @Autowired |
| | | private IDeleteFeeReceiptBMO deleteFeeReceiptBMOImpl; |
| | | |
| | | @Autowired |
| | | private IGetFeeReceiptBMO getFeeReceiptBMOImpl; |
| | | |
| | | @Autowired |
| | | private ISaveFeeReceiptDetailBMO saveFeeReceiptDetailBMOImpl; |
| | | @Autowired |
| | | private IUpdateFeeReceiptDetailBMO updateFeeReceiptDetailBMOImpl; |
| | | @Autowired |
| | | private IDeleteFeeReceiptDetailBMO deleteFeeReceiptDetailBMOImpl; |
| | | |
| | | @Autowired |
| | | private IGetFeeReceiptDetailBMO getFeeReceiptDetailBMOImpl; |
| | | |
| | | /** |
| | | * 微信保存消息模板 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /feeReceipt/saveFeeReceipt |
| | | * @path /app/feeReceipt/saveFeeReceipt |
| | | */ |
| | | @RequestMapping(value = "/saveFeeReceipt", method = RequestMethod.POST) |
| | | public ResponseEntity<String> saveFeeReceipt(@RequestBody JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId"); |
| | | Assert.hasKeyAndValue(reqJson, "amount", "请求报文中未包含amount"); |
| | | Assert.hasKeyAndValue(reqJson, "objName", "请求报文中未包含objName"); |
| | | |
| | | |
| | | FeeReceiptPo feeReceiptPo = BeanConvertUtil.covertBean(reqJson, FeeReceiptPo.class); |
| | | return saveFeeReceiptBMOImpl.save(feeReceiptPo); |
| | | } |
| | | |
| | | /** |
| | | * 微信修改消息模板 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /feeReceipt/updateFeeReceipt |
| | | * @path /app/feeReceipt/updateFeeReceipt |
| | | */ |
| | | @RequestMapping(value = "/updateFeeReceipt", method = RequestMethod.POST) |
| | | public ResponseEntity<String> updateFeeReceipt(@RequestBody JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId"); |
| | | Assert.hasKeyAndValue(reqJson, "amount", "请求报文中未包含amount"); |
| | | Assert.hasKeyAndValue(reqJson, "objName", "请求报文中未包含objName"); |
| | | Assert.hasKeyAndValue(reqJson, "receiptId", "receiptId不能为空"); |
| | | |
| | | |
| | | FeeReceiptPo feeReceiptPo = BeanConvertUtil.covertBean(reqJson, FeeReceiptPo.class); |
| | | return updateFeeReceiptBMOImpl.update(feeReceiptPo); |
| | | } |
| | | |
| | | /** |
| | | * 微信删除消息模板 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /feeReceipt/deleteFeeReceipt |
| | | * @path /app/feeReceipt/deleteFeeReceipt |
| | | */ |
| | | @RequestMapping(value = "/deleteFeeReceipt", method = RequestMethod.POST) |
| | | public ResponseEntity<String> deleteFeeReceipt(@RequestBody JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "小区ID不能为空"); |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "receiptId", "receiptId不能为空"); |
| | | |
| | | |
| | | FeeReceiptPo feeReceiptPo = BeanConvertUtil.covertBean(reqJson, FeeReceiptPo.class); |
| | | return deleteFeeReceiptBMOImpl.delete(feeReceiptPo); |
| | | } |
| | | |
| | | /** |
| | | * 微信删除消息模板 |
| | | * |
| | | * @param communityId 小区ID |
| | | * @return |
| | | * @serviceCode /feeReceipt/queryFeeReceipt |
| | | * @path /app/feeReceipt/queryFeeReceipt |
| | | */ |
| | | @RequestMapping(value = "/queryFeeReceipt", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryFeeReceipt(@RequestParam(value = "communityId") String communityId, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | FeeReceiptDto feeReceiptDto = new FeeReceiptDto(); |
| | | feeReceiptDto.setPage(page); |
| | | feeReceiptDto.setRow(row); |
| | | feeReceiptDto.setCommunityId(communityId); |
| | | return getFeeReceiptBMOImpl.get(feeReceiptDto); |
| | | } |
| | | |
| | | /** |
| | | * 微信保存消息模板 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /feeReceipt/saveFeeReceiptDetail |
| | | * @path /app/feeReceipt/saveFeeReceiptDetail |
| | | */ |
| | | @RequestMapping(value = "/saveFeeReceiptDetail", method = RequestMethod.POST) |
| | | public ResponseEntity<String> saveFeeReceiptDetail(@RequestBody JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId"); |
| | | Assert.hasKeyAndValue(reqJson, "amount", "请求报文中未包含amount"); |
| | | Assert.hasKeyAndValue(reqJson, "feeName", "请求报文中未包含feeName"); |
| | | |
| | | |
| | | FeeReceiptDetailPo feeReceiptDetailPo = BeanConvertUtil.covertBean(reqJson, FeeReceiptDetailPo.class); |
| | | return saveFeeReceiptDetailBMOImpl.save(feeReceiptDetailPo); |
| | | } |
| | | |
| | | /** |
| | | * 微信修改消息模板 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /feeReceipt/updateFeeReceiptDetail |
| | | * @path /app/feeReceipt/updateFeeReceiptDetail |
| | | */ |
| | | @RequestMapping(value = "/updateFeeReceiptDetail", method = RequestMethod.POST) |
| | | public ResponseEntity<String> updateFeeReceiptDetail(@RequestBody JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId"); |
| | | Assert.hasKeyAndValue(reqJson, "amount", "请求报文中未包含amount"); |
| | | Assert.hasKeyAndValue(reqJson, "feeName", "请求报文中未包含feeName"); |
| | | Assert.hasKeyAndValue(reqJson, "receiptId", "receiptId不能为空"); |
| | | |
| | | |
| | | FeeReceiptDetailPo feeReceiptDetailPo = BeanConvertUtil.covertBean(reqJson, FeeReceiptDetailPo.class); |
| | | return updateFeeReceiptDetailBMOImpl.update(feeReceiptDetailPo); |
| | | } |
| | | |
| | | /** |
| | | * 微信删除消息模板 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /feeReceipt/deleteFeeReceiptDetail |
| | | * @path /app/feeReceipt/deleteFeeReceiptDetail |
| | | */ |
| | | @RequestMapping(value = "/deleteFeeReceiptDetail", method = RequestMethod.POST) |
| | | public ResponseEntity<String> deleteFeeReceiptDetail(@RequestBody JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "小区ID不能为空"); |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "receiptId", "receiptId不能为空"); |
| | | |
| | | |
| | | FeeReceiptDetailPo feeReceiptDetailPo = BeanConvertUtil.covertBean(reqJson, FeeReceiptDetailPo.class); |
| | | return deleteFeeReceiptDetailBMOImpl.delete(feeReceiptDetailPo); |
| | | } |
| | | |
| | | /** |
| | | * 微信删除消息模板 |
| | | * |
| | | * @param communityId 小区ID |
| | | * @return |
| | | * @serviceCode /feeReceipt/queryFeeReceiptDetail |
| | | * @path /app/feeReceipt/queryFeeReceiptDetail |
| | | */ |
| | | @RequestMapping(value = "/queryFeeReceiptDetail", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryFeeReceiptDetail(@RequestParam(value = "communityId") String communityId, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | FeeReceiptDetailDto feeReceiptDetailDto = new FeeReceiptDetailDto(); |
| | | feeReceiptDetailDto.setPage(page); |
| | | feeReceiptDetailDto.setRow(row); |
| | | feeReceiptDetailDto.setCommunityId(communityId); |
| | | return getFeeReceiptDetailBMOImpl.get(feeReceiptDetailDto); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.fee.bmo.feeReceipt; |
| | | |
| | | import com.java110.po.feeReceipt.FeeReceiptPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | public interface IDeleteFeeReceiptBMO { |
| | | |
| | | |
| | | /** |
| | | * 修改收据 |
| | | * add by wuxw |
| | | * |
| | | * @param feeReceiptPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> delete(FeeReceiptPo feeReceiptPo); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.bmo.feeReceipt; |
| | | |
| | | import com.java110.dto.feeReceipt.FeeReceiptDto; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | public interface IGetFeeReceiptBMO { |
| | | |
| | | |
| | | /** |
| | | * 查询收据 |
| | | * add by wuxw |
| | | * |
| | | * @param feeReceiptDto |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> get(FeeReceiptDto feeReceiptDto); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.bmo.feeReceipt; |
| | | |
| | | import com.java110.po.feeReceipt.FeeReceiptPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | public interface ISaveFeeReceiptBMO { |
| | | |
| | | |
| | | /** |
| | | * 添加收据 |
| | | * add by wuxw |
| | | * |
| | | * @param feeReceiptPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> save(FeeReceiptPo feeReceiptPo); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.bmo.feeReceipt; |
| | | import com.java110.po.feeReceipt.FeeReceiptPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | public interface IUpdateFeeReceiptBMO { |
| | | |
| | | |
| | | /** |
| | | * 修改收据 |
| | | * add by wuxw |
| | | * @param feeReceiptPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> update(FeeReceiptPo feeReceiptPo); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.bmo.feeReceipt.impl; |
| | | |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.fee.bmo.feeReceipt.IDeleteFeeReceiptBMO; |
| | | import com.java110.intf.fee.IFeeReceiptInnerServiceSMO; |
| | | import com.java110.po.feeReceipt.FeeReceiptPo; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("deleteFeeReceiptBMOImpl") |
| | | public class DeleteFeeReceiptBMOImpl implements IDeleteFeeReceiptBMO { |
| | | |
| | | @Autowired |
| | | private IFeeReceiptInnerServiceSMO feeReceiptInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param feeReceiptPo 数据 |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> delete(FeeReceiptPo feeReceiptPo) { |
| | | |
| | | int flag = feeReceiptInnerServiceSMOImpl.deleteFeeReceipt(feeReceiptPo); |
| | | |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.bmo.feeReceipt.impl; |
| | | |
| | | import com.java110.dto.feeReceipt.FeeReceiptDto; |
| | | import com.java110.fee.bmo.feeReceipt.IGetFeeReceiptBMO; |
| | | import com.java110.intf.fee.IFeeReceiptInnerServiceSMO; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Service("getFeeReceiptBMOImpl") |
| | | public class GetFeeReceiptBMOImpl implements IGetFeeReceiptBMO { |
| | | |
| | | @Autowired |
| | | private IFeeReceiptInnerServiceSMO feeReceiptInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param feeReceiptDto |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | public ResponseEntity<String> get(FeeReceiptDto feeReceiptDto) { |
| | | |
| | | |
| | | int count = feeReceiptInnerServiceSMOImpl.queryFeeReceiptsCount(feeReceiptDto); |
| | | |
| | | List<FeeReceiptDto> feeReceiptDtos = null; |
| | | if (count > 0) { |
| | | feeReceiptDtos = feeReceiptInnerServiceSMOImpl.queryFeeReceipts(feeReceiptDto); |
| | | } else { |
| | | feeReceiptDtos = new ArrayList<>(); |
| | | } |
| | | |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) feeReceiptDto.getRow()), count, feeReceiptDtos); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | |
| | | return responseEntity; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.bmo.feeReceipt.impl; |
| | | |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.fee.bmo.feeReceipt.ISaveFeeReceiptBMO; |
| | | import com.java110.intf.fee.IFeeReceiptInnerServiceSMO; |
| | | import com.java110.po.feeReceipt.FeeReceiptPo; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("saveFeeReceiptBMOImpl") |
| | | public class SaveFeeReceiptBMOImpl implements ISaveFeeReceiptBMO { |
| | | |
| | | @Autowired |
| | | private IFeeReceiptInnerServiceSMO feeReceiptInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * 添加小区信息 |
| | | * |
| | | * @param feeReceiptPo |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> save(FeeReceiptPo feeReceiptPo) { |
| | | |
| | | feeReceiptPo.setReceiptId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_receiptId)); |
| | | int flag = feeReceiptInnerServiceSMOImpl.saveFeeReceipt(feeReceiptPo); |
| | | |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.bmo.feeReceipt.impl; |
| | | |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.fee.bmo.feeReceipt.IUpdateFeeReceiptBMO; |
| | | import com.java110.intf.fee.IFeeReceiptInnerServiceSMO; |
| | | import com.java110.po.feeReceipt.FeeReceiptPo; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("updateFeeReceiptBMOImpl") |
| | | public class UpdateFeeReceiptBMOImpl implements IUpdateFeeReceiptBMO { |
| | | |
| | | @Autowired |
| | | private IFeeReceiptInnerServiceSMO feeReceiptInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param feeReceiptPo |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> update(FeeReceiptPo feeReceiptPo) { |
| | | |
| | | int flag = feeReceiptInnerServiceSMOImpl.updateFeeReceipt(feeReceiptPo); |
| | | |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.bmo.feeReceiptDetail; |
| | | import com.java110.po.feeReceiptDetail.FeeReceiptDetailPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | public interface IDeleteFeeReceiptDetailBMO { |
| | | |
| | | |
| | | /** |
| | | * 修改收据明细 |
| | | * add by wuxw |
| | | * @param feeReceiptDetailPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> delete(FeeReceiptDetailPo feeReceiptDetailPo); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.bmo.feeReceiptDetail; |
| | | import com.java110.dto.feeReceiptDetail.FeeReceiptDetailDto; |
| | | import org.springframework.http.ResponseEntity; |
| | | public interface IGetFeeReceiptDetailBMO { |
| | | |
| | | |
| | | /** |
| | | * 查询收据明细 |
| | | * add by wuxw |
| | | * @param feeReceiptDetailDto |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> get(FeeReceiptDetailDto feeReceiptDetailDto); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.bmo.feeReceiptDetail; |
| | | |
| | | import com.java110.po.feeReceiptDetail.FeeReceiptDetailPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | public interface ISaveFeeReceiptDetailBMO { |
| | | |
| | | |
| | | /** |
| | | * 添加收据明细 |
| | | * add by wuxw |
| | | * @param feeReceiptDetailPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> save(FeeReceiptDetailPo feeReceiptDetailPo); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.bmo.feeReceiptDetail; |
| | | import com.java110.po.feeReceiptDetail.FeeReceiptDetailPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | public interface IUpdateFeeReceiptDetailBMO { |
| | | |
| | | |
| | | /** |
| | | * 修改收据明细 |
| | | * add by wuxw |
| | | * @param feeReceiptDetailPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> update(FeeReceiptDetailPo feeReceiptDetailPo); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.bmo.feeReceiptDetail.impl; |
| | | |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.fee.bmo.feeReceiptDetail.IDeleteFeeReceiptDetailBMO; |
| | | import com.java110.intf.IFeeReceiptDetailInnerServiceSMO; |
| | | import com.java110.po.feeReceiptDetail.FeeReceiptDetailPo; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("deleteFeeReceiptDetailBMOImpl") |
| | | public class DeleteFeeReceiptDetailBMOImpl implements IDeleteFeeReceiptDetailBMO { |
| | | |
| | | @Autowired |
| | | private IFeeReceiptDetailInnerServiceSMO feeReceiptDetailInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param feeReceiptDetailPo 数据 |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> delete(FeeReceiptDetailPo feeReceiptDetailPo) { |
| | | |
| | | int flag = feeReceiptDetailInnerServiceSMOImpl.deleteFeeReceiptDetail(feeReceiptDetailPo); |
| | | |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.bmo.feeReceiptDetail.impl; |
| | | |
| | | import com.java110.dto.feeReceiptDetail.FeeReceiptDetailDto; |
| | | import com.java110.fee.bmo.feeReceiptDetail.IGetFeeReceiptDetailBMO; |
| | | import com.java110.intf.IFeeReceiptDetailInnerServiceSMO; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Service("getFeeReceiptDetailBMOImpl") |
| | | public class GetFeeReceiptDetailBMOImpl implements IGetFeeReceiptDetailBMO { |
| | | |
| | | @Autowired |
| | | private IFeeReceiptDetailInnerServiceSMO feeReceiptDetailInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param feeReceiptDetailDto |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | public ResponseEntity<String> get(FeeReceiptDetailDto feeReceiptDetailDto) { |
| | | |
| | | |
| | | int count = feeReceiptDetailInnerServiceSMOImpl.queryFeeReceiptDetailsCount(feeReceiptDetailDto); |
| | | |
| | | List<FeeReceiptDetailDto> feeReceiptDetailDtos = null; |
| | | if (count > 0) { |
| | | feeReceiptDetailDtos = feeReceiptDetailInnerServiceSMOImpl.queryFeeReceiptDetails(feeReceiptDetailDto); |
| | | } else { |
| | | feeReceiptDetailDtos = new ArrayList<>(); |
| | | } |
| | | |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) feeReceiptDetailDto.getRow()), count, feeReceiptDetailDtos); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | |
| | | return responseEntity; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.bmo.feeReceiptDetail.impl; |
| | | |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.fee.bmo.feeReceiptDetail.ISaveFeeReceiptDetailBMO; |
| | | import com.java110.intf.IFeeReceiptDetailInnerServiceSMO; |
| | | import com.java110.po.feeReceiptDetail.FeeReceiptDetailPo; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("saveFeeReceiptDetailBMOImpl") |
| | | public class SaveFeeReceiptDetailBMOImpl implements ISaveFeeReceiptDetailBMO { |
| | | |
| | | @Autowired |
| | | private IFeeReceiptDetailInnerServiceSMO feeReceiptDetailInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * 添加小区信息 |
| | | * |
| | | * @param feeReceiptDetailPo |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> save(FeeReceiptDetailPo feeReceiptDetailPo) { |
| | | |
| | | feeReceiptDetailPo.setReceiptId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_receiptId)); |
| | | int flag = feeReceiptDetailInnerServiceSMOImpl.saveFeeReceiptDetail(feeReceiptDetailPo); |
| | | |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.bmo.feeReceiptDetail.impl; |
| | | |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.fee.bmo.feeReceiptDetail.IUpdateFeeReceiptDetailBMO; |
| | | import com.java110.intf.IFeeReceiptDetailInnerServiceSMO; |
| | | import com.java110.po.feeReceiptDetail.FeeReceiptDetailPo; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("updateFeeReceiptDetailBMOImpl") |
| | | public class UpdateFeeReceiptDetailBMOImpl implements IUpdateFeeReceiptDetailBMO { |
| | | |
| | | @Autowired |
| | | private IFeeReceiptDetailInnerServiceSMO feeReceiptDetailInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param feeReceiptDetailPo |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> update(FeeReceiptDetailPo feeReceiptDetailPo) { |
| | | |
| | | int flag = feeReceiptDetailInnerServiceSMOImpl.updateFeeReceiptDetail(feeReceiptDetailPo); |
| | | |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.RoomDto; |
| | | import com.java110.dto.fee.BillDto; |
| | | import com.java110.dto.fee.BillOweFeeDto; |
| | | import com.java110.dto.fee.FeeAttrDto; |
| | | import com.java110.dto.fee.FeeConfigDto; |
| | | import com.java110.dto.fee.FeeDto; |
| | | import com.java110.dto.fee.*; |
| | | import com.java110.dto.owner.OwnerCarDto; |
| | | import com.java110.dto.parking.ParkingSpaceDto; |
| | | import com.java110.dto.repair.RepairDto; |
| | | import com.java110.fee.bmo.IPayOweFee; |
| | | import com.java110.fee.listener.fee.UpdateFeeInfoListener; |
| | | import com.java110.intf.IFeeReceiptDetailInnerServiceSMO; |
| | | import com.java110.intf.community.IParkingSpaceInnerServiceSMO; |
| | | import com.java110.intf.community.IRepairInnerServiceSMO; |
| | | import com.java110.intf.community.IRoomInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeAttrInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeConfigInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeDetailInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeInnerServiceSMO; |
| | | import com.java110.intf.fee.*; |
| | | import com.java110.intf.user.IOwnerCarInnerServiceSMO; |
| | | import com.java110.po.fee.PayFeeDetailPo; |
| | | import com.java110.po.fee.PayFeePo; |
| | | import com.java110.po.feeReceipt.FeeReceiptPo; |
| | | import com.java110.po.feeReceiptDetail.FeeReceiptDetailPo; |
| | | import com.java110.po.owner.RepairPoolPo; |
| | | import com.java110.utils.constant.FeeFlagTypeConstant; |
| | | import com.java110.utils.constant.FeeStateConstant; |
| | |
| | | import com.java110.utils.lock.DistributedLock; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | @Autowired |
| | | private IParkingSpaceInnerServiceSMO parkingSpaceInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFeeReceiptDetailInnerServiceSMO feeReceiptDetailInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFeeReceiptInnerServiceSMO feeReceiptInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOwnerCarInnerServiceSMO ownerCarInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * 欠费缴费 |
| | | * |
| | |
| | | JSONArray fees = reqJson.getJSONArray("fees"); |
| | | |
| | | JSONObject feeObj = null; |
| | | |
| | | FeeReceiptPo feeReceiptPo = new FeeReceiptPo(); |
| | | feeReceiptPo.setReceiptId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_receiptId)); |
| | | feeReceiptPo.setAmount("0.0"); |
| | | for (int feeIndex = 0; feeIndex < fees.size(); feeIndex++) { |
| | | feeObj = fees.getJSONObject(feeIndex); |
| | | Assert.hasKeyAndValue(feeObj, "feeId", "未包含费用项ID"); |
| | | Assert.hasKeyAndValue(feeObj, "feePrice", "未包含缴费金额"); |
| | | |
| | | feeObj.put("communityId", communityId); |
| | | doPayOweFee(feeObj); |
| | | doPayOweFee(feeObj, feeReceiptPo); |
| | | } |
| | | if (fees.size() > 0) { |
| | | feeReceiptInnerServiceSMOImpl.saveFeeReceipt(feeReceiptPo); |
| | | } |
| | | return ResultVo.success(); |
| | | } |
| | | |
| | | private void doPayOweFee(JSONObject feeObj) { |
| | | private void doPayOweFee(JSONObject feeObj, FeeReceiptPo feeReceiptPo) { |
| | | //开启全局锁 |
| | | String requestId = DistributedLock.getLockUUID(); |
| | | String key = this.getClass().getSimpleName() + feeObj.get("feeId"); |
| | | try { |
| | | DistributedLock.waitGetDistributedLock(key, requestId); |
| | | |
| | | addFeeDetail(feeObj); |
| | | addFeeDetail(feeObj, feeReceiptPo); |
| | | |
| | | modifyFee(feeObj); |
| | | |
| | |
| | | * |
| | | * @param paramInJson |
| | | */ |
| | | private void addFeeDetail(JSONObject paramInJson) { |
| | | private void addFeeDetail(JSONObject paramInJson, FeeReceiptPo feeReceiptPo) { |
| | | |
| | | PayFeeDetailPo payFeeDetailPo = new PayFeeDetailPo(); |
| | | payFeeDetailPo.setDetailId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_detailId)); |
| | | |
| | | payFeeDetailPo.setPrimeRate("1.00"); |
| | | //计算 应收金额 |
| | | FeeDto feeDto = new FeeDto(); |
| | |
| | | |
| | | if ("3333".equals(feeDto.getPayerObjType())) { //房屋相关 |
| | | String computingFormula = feeDto.getComputingFormula(); |
| | | RoomDto roomDto = new RoomDto(); |
| | | roomDto.setRoomId(feeDto.getPayerObjId()); |
| | | roomDto.setCommunityId(feeDto.getCommunityId()); |
| | | List<RoomDto> roomDtos = roomInnerServiceSMOImpl.queryRooms(roomDto); |
| | | if (roomDtos == null || roomDtos.size() != 1) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_ERROR, "未查到房屋信息,查询多条数据"); |
| | | } |
| | | roomDto = roomDtos.get(0); |
| | | feeReceiptPo.setObjName(roomDto.getFloorNum() + "栋" + roomDto.getUnitNum() + "单元" + roomDto.getRoomNum()); |
| | | if ("1001".equals(computingFormula)) { //面积*单价+附加费 |
| | | RoomDto roomDto = new RoomDto(); |
| | | roomDto.setRoomId(feeDto.getPayerObjId()); |
| | | roomDto.setCommunityId(feeDto.getCommunityId()); |
| | | List<RoomDto> roomDtos = roomInnerServiceSMOImpl.queryRooms(roomDto); |
| | | if (roomDtos == null || roomDtos.size() != 1) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_ERROR, "未查到房屋信息,查询多条数据"); |
| | | } |
| | | |
| | | //feePrice = Double.parseDouble(feeDto.getSquarePrice()) * Double.parseDouble(roomDtos.get(0).getBuiltUpArea()) + Double.parseDouble(feeDto.getAdditionalAmount()); |
| | | BigDecimal squarePrice = new BigDecimal(Double.parseDouble(feeDto.getSquarePrice())); |
| | | BigDecimal builtUpArea = new BigDecimal(Double.parseDouble(roomDtos.get(0).getBuiltUpArea())); |
| | |
| | | } |
| | | } else if ("6666".equals(feeDto.getPayerObjType())) {//车位相关 |
| | | String computingFormula = feeDto.getComputingFormula(); |
| | | OwnerCarDto ownerCarDto = new OwnerCarDto(); |
| | | ownerCarDto.setCommunityId(feeDto.getCommunityId()); |
| | | ownerCarDto.setCarId(feeDto.getPayerObjId()); |
| | | List<OwnerCarDto> ownerCarDtos = ownerCarInnerServiceSMOImpl.queryOwnerCars(ownerCarDto); |
| | | |
| | | if (ownerCarDtos != null && ownerCarDtos.size() > 0) { |
| | | feeReceiptPo.setObjName(ownerCarDtos.get(0).getCarNum()); |
| | | } |
| | | if ("1001".equals(computingFormula)) { //面积*单价+附加费 |
| | | ParkingSpaceDto parkingSpaceDto = new ParkingSpaceDto(); |
| | | parkingSpaceDto.setCommunityId(feeDto.getCommunityId()); |
| | |
| | | if (saveFeeDetail < 1) { |
| | | throw new IllegalArgumentException("保存费用详情失败" + payFeeDetailPo.toString()); |
| | | } |
| | | FeeReceiptDetailPo feeReceiptDetailPo = new FeeReceiptDetailPo(); |
| | | feeReceiptDetailPo.setAmount(payFeeDetailPo.getReceivableAmount()); |
| | | feeReceiptDetailPo.setCommunityId(feeDto.getCommunityId()); |
| | | feeReceiptDetailPo.setCycle(payFeeDetailPo.getCycles()); |
| | | feeReceiptDetailPo.setDetailId(payFeeDetailPo.getDetailId()); |
| | | feeReceiptDetailPo.setEndTime(payFeeDetailPo.getEndTime()); |
| | | feeReceiptDetailPo.setFeeId(feeDto.getFeeId()); |
| | | feeReceiptDetailPo.setFeeName(StringUtil.isEmpty(feeDto.getImportFeeName()) ? feeDto.getFeeName() : feeDto.getImportFeeName()); |
| | | feeReceiptDetailPo.setStartTime(payFeeDetailPo.getStartTime()); |
| | | feeReceiptDetailPo.setReceiptId(feeReceiptPo.getReceiptId()); |
| | | feeReceiptDetailInnerServiceSMOImpl.saveFeeReceiptDetail(feeReceiptDetailPo); |
| | | |
| | | BigDecimal amount = new BigDecimal(Double.parseDouble(feeReceiptPo.getAmount())); |
| | | amount = amount.add(receivedAmount); |
| | | feeReceiptPo.setAmount(amount.setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue() + ""); |
| | | feeReceiptPo.setCommunityId(feeReceiptDetailPo.getCommunityId()); |
| | | feeReceiptPo.setObjType(feeDto.getPayerObjType()); |
| | | feeReceiptPo.setObjId(feeDto.getPayerObjId()); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.fee.dao; |
| | | |
| | | |
| | | import com.java110.utils.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 IFeeReceiptDetailServiceDao { |
| | | |
| | | |
| | | /** |
| | | * 保存 收据明细信息 |
| | | * @param info |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void saveFeeReceiptDetailInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询收据明细信息(instance过程) |
| | | * 根据bId 查询收据明细信息 |
| | | * @param info bId 信息 |
| | | * @return 收据明细信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | List<Map> getFeeReceiptDetailInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 修改收据明细信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void updateFeeReceiptDetailInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 查询收据明细总数 |
| | | * |
| | | * @param info 收据明细信息 |
| | | * @return 收据明细数量 |
| | | */ |
| | | int queryFeeReceiptDetailsCount(Map info); |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.dao; |
| | | |
| | | |
| | | import com.java110.utils.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 IFeeReceiptServiceDao { |
| | | |
| | | |
| | | /** |
| | | * 保存 收据信息 |
| | | * @param info |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void saveFeeReceiptInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询收据信息(instance过程) |
| | | * 根据bId 查询收据信息 |
| | | * @param info bId 信息 |
| | | * @return 收据信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | List<Map> getFeeReceiptInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 修改收据信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void updateFeeReceiptInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 查询收据总数 |
| | | * |
| | | * @param info 收据信息 |
| | | * @return 收据数量 |
| | | */ |
| | | int queryFeeReceiptsCount(Map info); |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.dao.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.exception.DAOException; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.core.base.dao.BaseServiceDao; |
| | | import com.java110.fee.dao.IFeeReceiptDetailServiceDao; |
| | | 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("feeReceiptDetailServiceDaoImpl") |
| | | //@Transactional |
| | | public class FeeReceiptDetailServiceDaoImpl extends BaseServiceDao implements IFeeReceiptDetailServiceDao { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(FeeReceiptDetailServiceDaoImpl.class); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 保存收据明细信息 到 instance |
| | | * @param info bId 信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void saveFeeReceiptDetailInfo(Map info) throws DAOException { |
| | | logger.debug("保存收据明细信息Instance 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("feeReceiptDetailServiceDaoImpl.saveFeeReceiptDetailInfo",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> getFeeReceiptDetailInfo(Map info) throws DAOException { |
| | | logger.debug("查询收据明细信息 入参 info : {}",info); |
| | | |
| | | List<Map> businessFeeReceiptDetailInfos = sqlSessionTemplate.selectList("feeReceiptDetailServiceDaoImpl.getFeeReceiptDetailInfo",info); |
| | | |
| | | return businessFeeReceiptDetailInfos; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改收据明细信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void updateFeeReceiptDetailInfo(Map info) throws DAOException { |
| | | logger.debug("修改收据明细信息Instance 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("feeReceiptDetailServiceDaoImpl.updateFeeReceiptDetailInfo",info); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改收据明细信息Instance数据失败:"+ JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询收据明细数量 |
| | | * @param info 收据明细信息 |
| | | * @return 收据明细数量 |
| | | */ |
| | | @Override |
| | | public int queryFeeReceiptDetailsCount(Map info) { |
| | | logger.debug("查询收据明细数据 入参 info : {}",info); |
| | | |
| | | List<Map> businessFeeReceiptDetailInfos = sqlSessionTemplate.selectList("feeReceiptDetailServiceDaoImpl.queryFeeReceiptDetailsCount", info); |
| | | if (businessFeeReceiptDetailInfos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(businessFeeReceiptDetailInfos.get(0).get("count").toString()); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.dao.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.exception.DAOException; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.core.base.dao.BaseServiceDao; |
| | | import com.java110.fee.dao.IFeeReceiptServiceDao; |
| | | 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("feeReceiptServiceDaoImpl") |
| | | //@Transactional |
| | | public class FeeReceiptServiceDaoImpl extends BaseServiceDao implements IFeeReceiptServiceDao { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(FeeReceiptServiceDaoImpl.class); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 保存收据信息 到 instance |
| | | * @param info bId 信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void saveFeeReceiptInfo(Map info) throws DAOException { |
| | | logger.debug("保存收据信息Instance 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("feeReceiptServiceDaoImpl.saveFeeReceiptInfo",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> getFeeReceiptInfo(Map info) throws DAOException { |
| | | logger.debug("查询收据信息 入参 info : {}",info); |
| | | |
| | | List<Map> businessFeeReceiptInfos = sqlSessionTemplate.selectList("feeReceiptServiceDaoImpl.getFeeReceiptInfo",info); |
| | | |
| | | return businessFeeReceiptInfos; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改收据信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void updateFeeReceiptInfo(Map info) throws DAOException { |
| | | logger.debug("修改收据信息Instance 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("feeReceiptServiceDaoImpl.updateFeeReceiptInfo",info); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改收据信息Instance数据失败:"+ JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询收据数量 |
| | | * @param info 收据信息 |
| | | * @return 收据数量 |
| | | */ |
| | | @Override |
| | | public int queryFeeReceiptsCount(Map info) { |
| | | logger.debug("查询收据数据 入参 info : {}",info); |
| | | |
| | | List<Map> businessFeeReceiptInfos = sqlSessionTemplate.selectList("feeReceiptServiceDaoImpl.queryFeeReceiptsCount", info); |
| | | if (businessFeeReceiptInfos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(businessFeeReceiptInfos.get(0).get("count").toString()); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.smo.impl; |
| | | |
| | | |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.dto.feeReceiptDetail.FeeReceiptDetailDto; |
| | | import com.java110.fee.dao.IFeeReceiptDetailServiceDao; |
| | | import com.java110.intf.IFeeReceiptDetailInnerServiceSMO; |
| | | import com.java110.po.feeReceiptDetail.FeeReceiptDetailPo; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName FloorInnerServiceSMOImpl |
| | | * @Description 收据明细内部服务实现类 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 9:20 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | @RestController |
| | | public class FeeReceiptDetailInnerServiceSMOImpl extends BaseServiceSMO implements IFeeReceiptDetailInnerServiceSMO { |
| | | |
| | | @Autowired |
| | | private IFeeReceiptDetailServiceDao feeReceiptDetailServiceDaoImpl; |
| | | |
| | | |
| | | @Override |
| | | public int saveFeeReceiptDetail(@RequestBody FeeReceiptDetailPo feeReceiptDetailPo) { |
| | | int saveFlag = 1; |
| | | feeReceiptDetailServiceDaoImpl.saveFeeReceiptDetailInfo(BeanConvertUtil.beanCovertMap(feeReceiptDetailPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int updateFeeReceiptDetail(@RequestBody FeeReceiptDetailPo feeReceiptDetailPo) { |
| | | int saveFlag = 1; |
| | | feeReceiptDetailServiceDaoImpl.updateFeeReceiptDetailInfo(BeanConvertUtil.beanCovertMap(feeReceiptDetailPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int deleteFeeReceiptDetail(@RequestBody FeeReceiptDetailPo feeReceiptDetailPo) { |
| | | int saveFlag = 1; |
| | | feeReceiptDetailPo.setStatusCd("1"); |
| | | feeReceiptDetailServiceDaoImpl.updateFeeReceiptDetailInfo(BeanConvertUtil.beanCovertMap(feeReceiptDetailPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public List<FeeReceiptDetailDto> queryFeeReceiptDetails(@RequestBody FeeReceiptDetailDto feeReceiptDetailDto) { |
| | | |
| | | //校验是否传了 分页信息 |
| | | |
| | | int page = feeReceiptDetailDto.getPage(); |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | feeReceiptDetailDto.setPage((page - 1) * feeReceiptDetailDto.getRow()); |
| | | } |
| | | |
| | | List<FeeReceiptDetailDto> feeReceiptDetails = BeanConvertUtil.covertBeanList(feeReceiptDetailServiceDaoImpl.getFeeReceiptDetailInfo(BeanConvertUtil.beanCovertMap(feeReceiptDetailDto)), FeeReceiptDetailDto.class); |
| | | |
| | | return feeReceiptDetails; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int queryFeeReceiptDetailsCount(@RequestBody FeeReceiptDetailDto feeReceiptDetailDto) { |
| | | return feeReceiptDetailServiceDaoImpl.queryFeeReceiptDetailsCount(BeanConvertUtil.beanCovertMap(feeReceiptDetailDto)); |
| | | } |
| | | |
| | | public IFeeReceiptDetailServiceDao getFeeReceiptDetailServiceDaoImpl() { |
| | | return feeReceiptDetailServiceDaoImpl; |
| | | } |
| | | |
| | | public void setFeeReceiptDetailServiceDaoImpl(IFeeReceiptDetailServiceDao feeReceiptDetailServiceDaoImpl) { |
| | | this.feeReceiptDetailServiceDaoImpl = feeReceiptDetailServiceDaoImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.fee.smo.impl; |
| | | |
| | | |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.dto.feeReceipt.FeeReceiptDto; |
| | | import com.java110.fee.dao.IFeeReceiptServiceDao; |
| | | import com.java110.intf.fee.IFeeReceiptInnerServiceSMO; |
| | | import com.java110.po.feeReceipt.FeeReceiptPo; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName FloorInnerServiceSMOImpl |
| | | * @Description 收据内部服务实现类 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 9:20 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | @RestController |
| | | public class FeeReceiptInnerServiceSMOImpl extends BaseServiceSMO implements IFeeReceiptInnerServiceSMO { |
| | | |
| | | @Autowired |
| | | private IFeeReceiptServiceDao feeReceiptServiceDaoImpl; |
| | | |
| | | |
| | | @Override |
| | | public int saveFeeReceipt(@RequestBody FeeReceiptPo feeReceiptPo) { |
| | | int saveFlag = 1; |
| | | feeReceiptServiceDaoImpl.saveFeeReceiptInfo(BeanConvertUtil.beanCovertMap(feeReceiptPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int updateFeeReceipt(@RequestBody FeeReceiptPo feeReceiptPo) { |
| | | int saveFlag = 1; |
| | | feeReceiptServiceDaoImpl.updateFeeReceiptInfo(BeanConvertUtil.beanCovertMap(feeReceiptPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int deleteFeeReceipt(@RequestBody FeeReceiptPo feeReceiptPo) { |
| | | int saveFlag = 1; |
| | | feeReceiptPo.setStatusCd("1"); |
| | | feeReceiptServiceDaoImpl.updateFeeReceiptInfo(BeanConvertUtil.beanCovertMap(feeReceiptPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public List<FeeReceiptDto> queryFeeReceipts(@RequestBody FeeReceiptDto feeReceiptDto) { |
| | | |
| | | //校验是否传了 分页信息 |
| | | |
| | | int page = feeReceiptDto.getPage(); |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | feeReceiptDto.setPage((page - 1) * feeReceiptDto.getRow()); |
| | | } |
| | | |
| | | List<FeeReceiptDto> feeReceipts = BeanConvertUtil.covertBeanList(feeReceiptServiceDaoImpl.getFeeReceiptInfo(BeanConvertUtil.beanCovertMap(feeReceiptDto)), FeeReceiptDto.class); |
| | | |
| | | return feeReceipts; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int queryFeeReceiptsCount(@RequestBody FeeReceiptDto feeReceiptDto) { |
| | | return feeReceiptServiceDaoImpl.queryFeeReceiptsCount(BeanConvertUtil.beanCovertMap(feeReceiptDto)); |
| | | } |
| | | |
| | | public IFeeReceiptServiceDao getFeeReceiptServiceDaoImpl() { |
| | | return feeReceiptServiceDaoImpl; |
| | | } |
| | | |
| | | public void setFeeReceiptServiceDaoImpl(IFeeReceiptServiceDao feeReceiptServiceDaoImpl) { |
| | | this.feeReceiptServiceDaoImpl = feeReceiptServiceDaoImpl; |
| | | } |
| | | } |