java110-bean/src/main/java/com/java110/dto/feeCollectionDetail/FeeCollectionDetailDto.java
New file @@ -0,0 +1,139 @@ package com.java110.dto.feeCollectionDetail; 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 FeeCollectionDetailDto extends PageDto implements Serializable { private String orderId; private String detailId; private String ownerId; private String collectionName; private String payerObjName; private String ownerName; private String feeName; private String oweAmount; private String state; private String communityId; private String payerObjType; private String collectionWay; private String remarks; private String payerObjId; private Date createTime; private String statusCd = "0"; public String getOrderId() { return orderId; } public void setOrderId(String orderId) { this.orderId = orderId; } public String getDetailId() { return detailId; } public void setDetailId(String detailId) { this.detailId = detailId; } public String getOwnerId() { return ownerId; } public void setOwnerId(String ownerId) { this.ownerId = ownerId; } public String getCollectionName() { return collectionName; } public void setCollectionName(String collectionName) { this.collectionName = collectionName; } public String getPayerObjName() { return payerObjName; } public void setPayerObjName(String payerObjName) { this.payerObjName = payerObjName; } public String getOwnerName() { return ownerName; } public void setOwnerName(String ownerName) { this.ownerName = ownerName; } public String getFeeName() { return feeName; } public void setFeeName(String feeName) { this.feeName = feeName; } public String getOweAmount() { return oweAmount; } public void setOweAmount(String oweAmount) { this.oweAmount = oweAmount; } public String getState() { return state; } public void setState(String state) { this.state = state; } public String getCommunityId() { return communityId; } public void setCommunityId(String communityId) { this.communityId = communityId; } public String getPayerObjType() { return payerObjType; } public void setPayerObjType(String payerObjType) { this.payerObjType = payerObjType; } public String getCollectionWay() { return collectionWay; } public void setCollectionWay(String collectionWay) { this.collectionWay = collectionWay; } public String getRemarks() { return remarks; } public void setRemarks(String remarks) { this.remarks = remarks; } 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; } } java110-bean/src/main/java/com/java110/po/feeCollectionDetail/FeeCollectionDetailPo.java
New file @@ -0,0 +1,116 @@ package com.java110.po.feeCollectionDetail; import java.io.Serializable; import java.util.Date; public class FeeCollectionDetailPo implements Serializable { private String orderId; private String detailId; private String statusCd = "0"; private String ownerId; private String collectionName; private String payerObjName; private String ownerName; private String feeName; private String oweAmount; private String state; private String communityId; private String payerObjType; private String collectionWay; private String remarks; private String payerObjId; public String getOrderId() { return orderId; } public void setOrderId(String orderId) { this.orderId = orderId; } public String getDetailId() { return detailId; } public void setDetailId(String detailId) { this.detailId = detailId; } public String getStatusCd() { return statusCd; } public void setStatusCd(String statusCd) { this.statusCd = statusCd; } public String getOwnerId() { return ownerId; } public void setOwnerId(String ownerId) { this.ownerId = ownerId; } public String getCollectionName() { return collectionName; } public void setCollectionName(String collectionName) { this.collectionName = collectionName; } public String getPayerObjName() { return payerObjName; } public void setPayerObjName(String payerObjName) { this.payerObjName = payerObjName; } public String getOwnerName() { return ownerName; } public void setOwnerName(String ownerName) { this.ownerName = ownerName; } public String getFeeName() { return feeName; } public void setFeeName(String feeName) { this.feeName = feeName; } public String getOweAmount() { return oweAmount; } public void setOweAmount(String oweAmount) { this.oweAmount = oweAmount; } public String getState() { return state; } public void setState(String state) { this.state = state; } public String getCommunityId() { return communityId; } public void setCommunityId(String communityId) { this.communityId = communityId; } public String getPayerObjType() { return payerObjType; } public void setPayerObjType(String payerObjType) { this.payerObjType = payerObjType; } public String getCollectionWay() { return collectionWay; } public void setCollectionWay(String collectionWay) { this.collectionWay = collectionWay; } public String getRemarks() { return remarks; } public void setRemarks(String remarks) { this.remarks = remarks; } public String getPayerObjId() { return payerObjId; } public void setPayerObjId(String payerObjId) { this.payerObjId = payerObjId; } } java110-db/src/main/resources/mapper/fee/FeeCollectionDetailServiceDaoImplMapper.xml
New file @@ -0,0 +1,187 @@ <?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="feeCollectionDetailServiceDaoImpl"> <!-- 保存催缴单信息 add by wuxw 2018-07-03 --> <insert id="saveFeeCollectionDetailInfo" parameterType="Map"> insert into fee_collection_detail( order_id,detail_id,owner_id,collection_name,payer_obj_name,owner_name,fee_name,owe_amount,state,community_id,payer_obj_type,collection_way,remarks,payer_obj_id ) values ( #{orderId},#{detailId},#{ownerId},#{collectionName},#{payerObjName},#{ownerName},#{feeName},#{oweAmount},#{state},#{communityId},#{payerObjType},#{collectionWay},#{remarks},#{payerObjId} ) </insert> <!-- 查询催缴单信息 add by wuxw 2018-07-03 --> <select id="getFeeCollectionDetailInfo" parameterType="Map" resultType="Map"> select t.order_id,t.order_id orderId,t.detail_id,t.detail_id detailId,t.status_cd,t.status_cd statusCd,t.owner_id,t.owner_id ownerId,t.collection_name,t.collection_name collectionName,t.payer_obj_name,t.payer_obj_name payerObjName,t.owner_name,t.owner_name ownerName,t.fee_name,t.fee_name feeName,t.owe_amount,t.owe_amount oweAmount,t.state,t.community_id,t.community_id communityId,t.payer_obj_type,t.payer_obj_type payerObjType,t.collection_way,t.collection_way collectionWay,t.remarks,t.payer_obj_id,t.payer_obj_id payerObjId from fee_collection_detail t where 1 =1 <if test="orderId !=null and orderId != ''"> and t.order_id= #{orderId} </if> <if test="detailId !=null and detailId != ''"> and t.detail_id= #{detailId} </if> <if test="statusCd !=null and statusCd != ''"> and t.status_cd= #{statusCd} </if> <if test="ownerId !=null and ownerId != ''"> and t.owner_id= #{ownerId} </if> <if test="collectionName !=null and collectionName != ''"> and t.collection_name= #{collectionName} </if> <if test="payerObjName !=null and payerObjName != ''"> and t.payer_obj_name= #{payerObjName} </if> <if test="ownerName !=null and ownerName != ''"> and t.owner_name= #{ownerName} </if> <if test="feeName !=null and feeName != ''"> and t.fee_name= #{feeName} </if> <if test="oweAmount !=null and oweAmount != ''"> and t.owe_amount= #{oweAmount} </if> <if test="state !=null and state != ''"> and t.state= #{state} </if> <if test="communityId !=null and communityId != ''"> and t.community_id= #{communityId} </if> <if test="payerObjType !=null and payerObjType != ''"> and t.payer_obj_type= #{payerObjType} </if> <if test="collectionWay !=null and collectionWay != ''"> and t.collection_way= #{collectionWay} </if> <if test="remarks !=null and remarks != ''"> and t.remarks= #{remarks} </if> <if test="payerObjId !=null and payerObjId != ''"> and t.payer_obj_id= #{payerObjId} </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="updateFeeCollectionDetailInfo" parameterType="Map"> update fee_collection_detail t set t.status_cd = #{statusCd} <if test="newBId != null and newBId != ''"> ,t.b_id = #{newBId} </if> <if test="orderId !=null and orderId != ''"> , t.order_id= #{orderId} </if> <if test="ownerId !=null and ownerId != ''"> , t.owner_id= #{ownerId} </if> <if test="collectionName !=null and collectionName != ''"> , t.collection_name= #{collectionName} </if> <if test="payerObjName !=null and payerObjName != ''"> , t.payer_obj_name= #{payerObjName} </if> <if test="ownerName !=null and ownerName != ''"> , t.owner_name= #{ownerName} </if> <if test="feeName !=null and feeName != ''"> , t.fee_name= #{feeName} </if> <if test="oweAmount !=null and oweAmount != ''"> , t.owe_amount= #{oweAmount} </if> <if test="state !=null and state != ''"> , t.state= #{state} </if> <if test="communityId !=null and communityId != ''"> , t.community_id= #{communityId} </if> <if test="payerObjType !=null and payerObjType != ''"> , t.payer_obj_type= #{payerObjType} </if> <if test="collectionWay !=null and collectionWay != ''"> , t.collection_way= #{collectionWay} </if> <if test="remarks !=null and remarks != ''"> , t.remarks= #{remarks} </if> <if test="payerObjId !=null and payerObjId != ''"> , t.payer_obj_id= #{payerObjId} </if> where 1=1 <if test="detailId !=null and detailId != ''"> and t.detail_id= #{detailId} </if> </update> <!-- 查询催缴单数量 add by wuxw 2018-07-03 --> <select id="queryFeeCollectionDetailsCount" parameterType="Map" resultType="Map"> select count(1) count from fee_collection_detail t where 1 =1 <if test="orderId !=null and orderId != ''"> and t.order_id= #{orderId} </if> <if test="detailId !=null and detailId != ''"> and t.detail_id= #{detailId} </if> <if test="statusCd !=null and statusCd != ''"> and t.status_cd= #{statusCd} </if> <if test="ownerId !=null and ownerId != ''"> and t.owner_id= #{ownerId} </if> <if test="collectionName !=null and collectionName != ''"> and t.collection_name= #{collectionName} </if> <if test="payerObjName !=null and payerObjName != ''"> and t.payer_obj_name= #{payerObjName} </if> <if test="ownerName !=null and ownerName != ''"> and t.owner_name= #{ownerName} </if> <if test="feeName !=null and feeName != ''"> and t.fee_name= #{feeName} </if> <if test="oweAmount !=null and oweAmount != ''"> and t.owe_amount= #{oweAmount} </if> <if test="state !=null and state != ''"> and t.state= #{state} </if> <if test="communityId !=null and communityId != ''"> and t.community_id= #{communityId} </if> <if test="payerObjType !=null and payerObjType != ''"> and t.payer_obj_type= #{payerObjType} </if> <if test="collectionWay !=null and collectionWay != ''"> and t.collection_way= #{collectionWay} </if> <if test="remarks !=null and remarks != ''"> and t.remarks= #{remarks} </if> <if test="payerObjId !=null and payerObjId != ''"> and t.payer_obj_id= #{payerObjId} </if> </select> </mapper> java110-generator/src/main/resources/newBack/template_1.json
@@ -1,19 +1,25 @@ { "autoMove": true, "id": "orderId", "name": "feeCollectionOrder", "id": "detailId", "name": "feeCollectionDetail", "desc": "催缴单", "shareParam": "communityId", "shareColumn": "community_id", "shareName": "fee", "tableName": "fee_collection_order", "tableName": "fee_collection_detail", "param": { "detailId": "detail_id", "orderId": "order_id", "collectionName": "collection_name", "staffId": "staff_id", "staffName": "staff_name", "ownerId": "owner_id", "ownerName": "owner_name", "feeName": "fee_name", "payerObjId": "payer_obj_id", "payerObjName": "payer_obj_name", "payerObjType": "payer_obj_type", "communityId": "community_id", "collectionWay": "collection_way", "oweAmount": "owe_amount", "state": "state", "remarks": "remarks", "statusCd": "status_cd" @@ -26,6 +32,10 @@ { "code": "collectionWay", "msg": "催缴方式不能为空" }, { "code": "oweAmount", "msg": "欠费金额不能为空" } ] } java110-interface/src/main/java/com/java110/intf/fee/IFeeCollectionDetailInnerServiceSMO.java
New file @@ -0,0 +1,53 @@ package com.java110.intf; import com.java110.config.feign.FeignConfiguration; import com.java110.dto.feeCollectionDetail.FeeCollectionDetailDto; import com.java110.po.feeCollectionDetail.FeeCollectionDetailPo; 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 IFeeCollectionDetailInnerServiceSMO * @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("/feeCollectionDetailApi") public interface IFeeCollectionDetailInnerServiceSMO { @RequestMapping(value = "/saveFeeCollectionDetail", method = RequestMethod.POST) public int saveFeeCollectionDetail(@RequestBody FeeCollectionDetailPo feeCollectionDetailPo); @RequestMapping(value = "/updateFeeCollectionDetail", method = RequestMethod.POST) public int updateFeeCollectionDetail(@RequestBody FeeCollectionDetailPo feeCollectionDetailPo); @RequestMapping(value = "/deleteFeeCollectionDetail", method = RequestMethod.POST) public int deleteFeeCollectionDetail(@RequestBody FeeCollectionDetailPo feeCollectionDetailPo); /** * <p>查询小区楼信息</p> * * * @param feeCollectionDetailDto 数据对象分享 * @return FeeCollectionDetailDto 对象数据 */ @RequestMapping(value = "/queryFeeCollectionDetails", method = RequestMethod.POST) List<FeeCollectionDetailDto> queryFeeCollectionDetails(@RequestBody FeeCollectionDetailDto feeCollectionDetailDto); /** * 查询<p>小区楼</p>总记录数 * * @param feeCollectionDetailDto 数据对象分享 * @return 小区下的小区楼记录数 */ @RequestMapping(value = "/queryFeeCollectionDetailsCount", method = RequestMethod.POST) int queryFeeCollectionDetailsCount(@RequestBody FeeCollectionDetailDto feeCollectionDetailDto); } service-fee/src/main/java/com/java110/fee/api/FeeCollectionDetailApi.java
New file @@ -0,0 +1,108 @@ package com.java110.fee.api; import com.alibaba.fastjson.JSONObject; import com.java110.dto.feeCollectionDetail.FeeCollectionDetailDto; import com.java110.fee.bmo.feeCollectionDetail.IDeleteFeeCollectionDetailBMO; import com.java110.fee.bmo.feeCollectionDetail.IGetFeeCollectionDetailBMO; import com.java110.fee.bmo.feeCollectionDetail.ISaveFeeCollectionDetailBMO; import com.java110.fee.bmo.feeCollectionDetail.IUpdateFeeCollectionDetailBMO; import com.java110.po.feeCollectionDetail.FeeCollectionDetailPo; 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 = "/feeCollectionDetail") public class FeeCollectionDetailApi { @Autowired private ISaveFeeCollectionDetailBMO saveFeeCollectionDetailBMOImpl; @Autowired private IUpdateFeeCollectionDetailBMO updateFeeCollectionDetailBMOImpl; @Autowired private IDeleteFeeCollectionDetailBMO deleteFeeCollectionDetailBMOImpl; @Autowired private IGetFeeCollectionDetailBMO getFeeCollectionDetailBMOImpl; /** * 微信保存消息模板 * * @param reqJson * @return * @serviceCode /feeCollectionDetail/saveFeeCollectionDetail * @path /app/feeCollectionDetail/saveFeeCollectionDetail */ @RequestMapping(value = "/saveFeeCollectionDetail", method = RequestMethod.POST) public ResponseEntity<String> saveFeeCollectionDetail(@RequestBody JSONObject reqJson) { Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId"); Assert.hasKeyAndValue(reqJson, "collectionWay", "请求报文中未包含collectionWay"); Assert.hasKeyAndValue(reqJson, "oweAmount", "请求报文中未包含oweAmount"); FeeCollectionDetailPo feeCollectionDetailPo = BeanConvertUtil.covertBean(reqJson, FeeCollectionDetailPo.class); return saveFeeCollectionDetailBMOImpl.save(feeCollectionDetailPo); } /** * 微信修改消息模板 * * @param reqJson * @return * @serviceCode /feeCollectionDetail/updateFeeCollectionDetail * @path /app/feeCollectionDetail/updateFeeCollectionDetail */ @RequestMapping(value = "/updateFeeCollectionDetail", method = RequestMethod.POST) public ResponseEntity<String> updateFeeCollectionDetail(@RequestBody JSONObject reqJson) { Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId"); Assert.hasKeyAndValue(reqJson, "collectionWay", "请求报文中未包含collectionWay"); Assert.hasKeyAndValue(reqJson, "oweAmount", "请求报文中未包含oweAmount"); Assert.hasKeyAndValue(reqJson, "detailId", "detailId不能为空"); FeeCollectionDetailPo feeCollectionDetailPo = BeanConvertUtil.covertBean(reqJson, FeeCollectionDetailPo.class); return updateFeeCollectionDetailBMOImpl.update(feeCollectionDetailPo); } /** * 微信删除消息模板 * * @param reqJson * @return * @serviceCode /feeCollectionDetail/deleteFeeCollectionDetail * @path /app/feeCollectionDetail/deleteFeeCollectionDetail */ @RequestMapping(value = "/deleteFeeCollectionDetail", method = RequestMethod.POST) public ResponseEntity<String> deleteFeeCollectionDetail(@RequestBody JSONObject reqJson) { Assert.hasKeyAndValue(reqJson, "communityId", "小区ID不能为空"); Assert.hasKeyAndValue(reqJson, "detailId", "detailId不能为空"); FeeCollectionDetailPo feeCollectionDetailPo = BeanConvertUtil.covertBean(reqJson, FeeCollectionDetailPo.class); return deleteFeeCollectionDetailBMOImpl.delete(feeCollectionDetailPo); } /** * 微信删除消息模板 * * @param communityId 小区ID * @return * @serviceCode /feeCollectionDetail/queryFeeCollectionDetail * @path /app/feeCollectionDetail/queryFeeCollectionDetail */ @RequestMapping(value = "/queryFeeCollectionDetail", method = RequestMethod.GET) public ResponseEntity<String> queryFeeCollectionDetail(@RequestParam(value = "communityId") String communityId, @RequestParam(value = "page") int page, @RequestParam(value = "row") int row) { FeeCollectionDetailDto feeCollectionDetailDto = new FeeCollectionDetailDto(); feeCollectionDetailDto.setPage(page); feeCollectionDetailDto.setRow(row); feeCollectionDetailDto.setCommunityId(communityId); return getFeeCollectionDetailBMOImpl.get(feeCollectionDetailDto); } } service-fee/src/main/java/com/java110/fee/bmo/feeCollectionDetail/IDeleteFeeCollectionDetailBMO.java
New file @@ -0,0 +1,17 @@ package com.java110.fee.bmo.feeCollectionDetail; import com.java110.po.feeCollectionDetail.FeeCollectionDetailPo; import org.springframework.http.ResponseEntity; public interface IDeleteFeeCollectionDetailBMO { /** * 修改催缴单 * add by wuxw * @param feeCollectionDetailPo * @return */ ResponseEntity<String> delete(FeeCollectionDetailPo feeCollectionDetailPo); } service-fee/src/main/java/com/java110/fee/bmo/feeCollectionDetail/IGetFeeCollectionDetailBMO.java
New file @@ -0,0 +1,16 @@ package com.java110.fee.bmo.feeCollectionDetail; import com.java110.dto.feeCollectionDetail.FeeCollectionDetailDto; import org.springframework.http.ResponseEntity; public interface IGetFeeCollectionDetailBMO { /** * 查询催缴单 * add by wuxw * @param feeCollectionDetailDto * @return */ ResponseEntity<String> get(FeeCollectionDetailDto feeCollectionDetailDto); } service-fee/src/main/java/com/java110/fee/bmo/feeCollectionDetail/ISaveFeeCollectionDetailBMO.java
New file @@ -0,0 +1,17 @@ package com.java110.fee.bmo.feeCollectionDetail; import com.java110.po.feeCollectionDetail.FeeCollectionDetailPo; import org.springframework.http.ResponseEntity; public interface ISaveFeeCollectionDetailBMO { /** * 添加催缴单 * add by wuxw * @param feeCollectionDetailPo * @return */ ResponseEntity<String> save(FeeCollectionDetailPo feeCollectionDetailPo); } service-fee/src/main/java/com/java110/fee/bmo/feeCollectionDetail/IUpdateFeeCollectionDetailBMO.java
New file @@ -0,0 +1,17 @@ package com.java110.fee.bmo.feeCollectionDetail; import com.java110.po.feeCollectionDetail.FeeCollectionDetailPo; import org.springframework.http.ResponseEntity; public interface IUpdateFeeCollectionDetailBMO { /** * 修改催缴单 * add by wuxw * @param feeCollectionDetailPo * @return */ ResponseEntity<String> update(FeeCollectionDetailPo feeCollectionDetailPo); } service-fee/src/main/java/com/java110/fee/bmo/feeCollectionDetail/impl/DeleteFeeCollectionDetailBMOImpl.java
New file @@ -0,0 +1,34 @@ package com.java110.fee.bmo.feeCollectionDetail.impl; import com.java110.core.annotation.Java110Transactional; import com.java110.fee.bmo.feeCollectionDetail.IDeleteFeeCollectionDetailBMO; import com.java110.intf.IFeeCollectionDetailInnerServiceSMO; import com.java110.po.feeCollectionDetail.FeeCollectionDetailPo; import com.java110.vo.ResultVo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; @Service("deleteFeeCollectionDetailBMOImpl") public class DeleteFeeCollectionDetailBMOImpl implements IDeleteFeeCollectionDetailBMO { @Autowired private IFeeCollectionDetailInnerServiceSMO feeCollectionDetailInnerServiceSMOImpl; /** * @param feeCollectionDetailPo 数据 * @return 订单服务能够接受的报文 */ @Java110Transactional public ResponseEntity<String> delete(FeeCollectionDetailPo feeCollectionDetailPo) { int flag = feeCollectionDetailInnerServiceSMOImpl.deleteFeeCollectionDetail(feeCollectionDetailPo); if (flag > 0) { return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); } return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); } } service-fee/src/main/java/com/java110/fee/bmo/feeCollectionDetail/impl/GetFeeCollectionDetailBMOImpl.java
New file @@ -0,0 +1,44 @@ package com.java110.fee.bmo.feeCollectionDetail.impl; import com.java110.dto.feeCollectionDetail.FeeCollectionDetailDto; import com.java110.fee.bmo.feeCollectionDetail.IGetFeeCollectionDetailBMO; import com.java110.intf.IFeeCollectionDetailInnerServiceSMO; 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("getFeeCollectionDetailBMOImpl") public class GetFeeCollectionDetailBMOImpl implements IGetFeeCollectionDetailBMO { @Autowired private IFeeCollectionDetailInnerServiceSMO feeCollectionDetailInnerServiceSMOImpl; /** * @param feeCollectionDetailDto * @return 订单服务能够接受的报文 */ public ResponseEntity<String> get(FeeCollectionDetailDto feeCollectionDetailDto) { int count = feeCollectionDetailInnerServiceSMOImpl.queryFeeCollectionDetailsCount(feeCollectionDetailDto); List<FeeCollectionDetailDto> feeCollectionDetailDtos = null; if (count > 0) { feeCollectionDetailDtos = feeCollectionDetailInnerServiceSMOImpl.queryFeeCollectionDetails(feeCollectionDetailDto); } else { feeCollectionDetailDtos = new ArrayList<>(); } ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) feeCollectionDetailDto.getRow()), count, feeCollectionDetailDtos); ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); return responseEntity; } } service-fee/src/main/java/com/java110/fee/bmo/feeCollectionDetail/impl/SaveFeeCollectionDetailBMOImpl.java
New file @@ -0,0 +1,38 @@ package com.java110.fee.bmo.feeCollectionDetail.impl; import com.java110.core.annotation.Java110Transactional; import com.java110.core.factory.GenerateCodeFactory; import com.java110.fee.bmo.feeCollectionDetail.ISaveFeeCollectionDetailBMO; import com.java110.intf.IFeeCollectionDetailInnerServiceSMO; import com.java110.po.feeCollectionDetail.FeeCollectionDetailPo; import com.java110.vo.ResultVo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; @Service("saveFeeCollectionDetailBMOImpl") public class SaveFeeCollectionDetailBMOImpl implements ISaveFeeCollectionDetailBMO { @Autowired private IFeeCollectionDetailInnerServiceSMO feeCollectionDetailInnerServiceSMOImpl; /** * 添加小区信息 * * @param feeCollectionDetailPo * @return 订单服务能够接受的报文 */ @Java110Transactional public ResponseEntity<String> save(FeeCollectionDetailPo feeCollectionDetailPo) { feeCollectionDetailPo.setDetailId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_detailId)); int flag = feeCollectionDetailInnerServiceSMOImpl.saveFeeCollectionDetail(feeCollectionDetailPo); if (flag > 0) { return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); } return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); } } service-fee/src/main/java/com/java110/fee/bmo/feeCollectionDetail/impl/UpdateFeeCollectionDetailBMOImpl.java
New file @@ -0,0 +1,34 @@ package com.java110.fee.bmo.feeCollectionDetail.impl; import com.java110.core.annotation.Java110Transactional; import com.java110.fee.bmo.feeCollectionDetail.IUpdateFeeCollectionDetailBMO; import com.java110.intf.IFeeCollectionDetailInnerServiceSMO; import com.java110.po.feeCollectionDetail.FeeCollectionDetailPo; import com.java110.vo.ResultVo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; @Service("updateFeeCollectionDetailBMOImpl") public class UpdateFeeCollectionDetailBMOImpl implements IUpdateFeeCollectionDetailBMO { @Autowired private IFeeCollectionDetailInnerServiceSMO feeCollectionDetailInnerServiceSMOImpl; /** * @param feeCollectionDetailPo * @return 订单服务能够接受的报文 */ @Java110Transactional public ResponseEntity<String> update(FeeCollectionDetailPo feeCollectionDetailPo) { int flag = feeCollectionDetailInnerServiceSMOImpl.updateFeeCollectionDetail(feeCollectionDetailPo); if (flag > 0) { return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); } return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); } } service-fee/src/main/java/com/java110/fee/dao/IFeeCollectionDetailServiceDao.java
New file @@ -0,0 +1,61 @@ 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 IFeeCollectionDetailServiceDao { /** * 保存 催缴单信息 * @param info * @throws DAOException DAO异常 */ void saveFeeCollectionDetailInfo(Map info) throws DAOException; /** * 查询催缴单信息(instance过程) * 根据bId 查询催缴单信息 * @param info bId 信息 * @return 催缴单信息 * @throws DAOException DAO异常 */ List<Map> getFeeCollectionDetailInfo(Map info) throws DAOException; /** * 修改催缴单信息 * @param info 修改信息 * @throws DAOException DAO异常 */ void updateFeeCollectionDetailInfo(Map info) throws DAOException; /** * 查询催缴单总数 * * @param info 催缴单信息 * @return 催缴单数量 */ int queryFeeCollectionDetailsCount(Map info); } service-fee/src/main/java/com/java110/fee/dao/impl/FeeCollectionDetailServiceDaoImpl.java
New file @@ -0,0 +1,98 @@ 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.IFeeCollectionDetailServiceDao; 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("feeCollectionDetailServiceDaoImpl") //@Transactional public class FeeCollectionDetailServiceDaoImpl extends BaseServiceDao implements IFeeCollectionDetailServiceDao { private static Logger logger = LoggerFactory.getLogger(FeeCollectionDetailServiceDaoImpl.class); /** * 保存催缴单信息 到 instance * @param info bId 信息 * @throws DAOException DAO异常 */ @Override public void saveFeeCollectionDetailInfo(Map info) throws DAOException { logger.debug("保存催缴单信息Instance 入参 info : {}",info); int saveFlag = sqlSessionTemplate.insert("feeCollectionDetailServiceDaoImpl.saveFeeCollectionDetailInfo",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> getFeeCollectionDetailInfo(Map info) throws DAOException { logger.debug("查询催缴单信息 入参 info : {}",info); List<Map> businessFeeCollectionDetailInfos = sqlSessionTemplate.selectList("feeCollectionDetailServiceDaoImpl.getFeeCollectionDetailInfo",info); return businessFeeCollectionDetailInfos; } /** * 修改催缴单信息 * @param info 修改信息 * @throws DAOException DAO异常 */ @Override public void updateFeeCollectionDetailInfo(Map info) throws DAOException { logger.debug("修改催缴单信息Instance 入参 info : {}",info); int saveFlag = sqlSessionTemplate.update("feeCollectionDetailServiceDaoImpl.updateFeeCollectionDetailInfo",info); if(saveFlag < 1){ throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改催缴单信息Instance数据失败:"+ JSONObject.toJSONString(info)); } } /** * 查询催缴单数量 * @param info 催缴单信息 * @return 催缴单数量 */ @Override public int queryFeeCollectionDetailsCount(Map info) { logger.debug("查询催缴单数据 入参 info : {}",info); List<Map> businessFeeCollectionDetailInfos = sqlSessionTemplate.selectList("feeCollectionDetailServiceDaoImpl.queryFeeCollectionDetailsCount", info); if (businessFeeCollectionDetailInfos.size() < 1) { return 0; } return Integer.parseInt(businessFeeCollectionDetailInfos.get(0).get("count").toString()); } } service-fee/src/main/java/com/java110/fee/smo/impl/FeeCollectionDetailInnerServiceSMOImpl.java
New file @@ -0,0 +1,83 @@ package com.java110.fee.smo.impl; import com.java110.core.base.smo.BaseServiceSMO; import com.java110.dto.PageDto; import com.java110.dto.feeCollectionDetail.FeeCollectionDetailDto; import com.java110.fee.dao.IFeeCollectionDetailServiceDao; import com.java110.intf.IFeeCollectionDetailInnerServiceSMO; import com.java110.po.feeCollectionDetail.FeeCollectionDetailPo; 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 FeeCollectionDetailInnerServiceSMOImpl extends BaseServiceSMO implements IFeeCollectionDetailInnerServiceSMO { @Autowired private IFeeCollectionDetailServiceDao feeCollectionDetailServiceDaoImpl; @Override public int saveFeeCollectionDetail(@RequestBody FeeCollectionDetailPo feeCollectionDetailPo) { int saveFlag = 1; feeCollectionDetailServiceDaoImpl.saveFeeCollectionDetailInfo(BeanConvertUtil.beanCovertMap(feeCollectionDetailPo)); return saveFlag; } @Override public int updateFeeCollectionDetail(@RequestBody FeeCollectionDetailPo feeCollectionDetailPo) { int saveFlag = 1; feeCollectionDetailServiceDaoImpl.updateFeeCollectionDetailInfo(BeanConvertUtil.beanCovertMap(feeCollectionDetailPo)); return saveFlag; } @Override public int deleteFeeCollectionDetail(@RequestBody FeeCollectionDetailPo feeCollectionDetailPo) { int saveFlag = 1; feeCollectionDetailPo.setStatusCd("1"); feeCollectionDetailServiceDaoImpl.updateFeeCollectionDetailInfo(BeanConvertUtil.beanCovertMap(feeCollectionDetailPo)); return saveFlag; } @Override public List<FeeCollectionDetailDto> queryFeeCollectionDetails(@RequestBody FeeCollectionDetailDto feeCollectionDetailDto) { //校验是否传了 分页信息 int page = feeCollectionDetailDto.getPage(); if (page != PageDto.DEFAULT_PAGE) { feeCollectionDetailDto.setPage((page - 1) * feeCollectionDetailDto.getRow()); } List<FeeCollectionDetailDto> feeCollectionDetails = BeanConvertUtil.covertBeanList(feeCollectionDetailServiceDaoImpl.getFeeCollectionDetailInfo(BeanConvertUtil.beanCovertMap(feeCollectionDetailDto)), FeeCollectionDetailDto.class); return feeCollectionDetails; } @Override public int queryFeeCollectionDetailsCount(@RequestBody FeeCollectionDetailDto feeCollectionDetailDto) { return feeCollectionDetailServiceDaoImpl.queryFeeCollectionDetailsCount(BeanConvertUtil.beanCovertMap(feeCollectionDetailDto)); } public IFeeCollectionDetailServiceDao getFeeCollectionDetailServiceDaoImpl() { return feeCollectionDetailServiceDaoImpl; } public void setFeeCollectionDetailServiceDaoImpl(IFeeCollectionDetailServiceDao feeCollectionDetailServiceDaoImpl) { this.feeCollectionDetailServiceDaoImpl = feeCollectionDetailServiceDaoImpl; } }