| New file |
| | |
| | | package com.java110.dto.rentingAppointment; |
| | | |
| | | 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 RentingAppointmentDto extends PageDto implements Serializable { |
| | | |
| | | private String msg; |
| | | private String tenantTel; |
| | | private String tenantName; |
| | | private String appointmentTime; |
| | | private String appointmentRoomId; |
| | | private String appointmentId; |
| | | private String remark; |
| | | private String state; |
| | | private String tenantSex; |
| | | private String storeId; |
| | | private String roomId; |
| | | |
| | | |
| | | private Date createTime; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | public void setMsg(String msg) { |
| | | this.msg = msg; |
| | | } |
| | | public String getTenantTel() { |
| | | return tenantTel; |
| | | } |
| | | public void setTenantTel(String tenantTel) { |
| | | this.tenantTel = tenantTel; |
| | | } |
| | | public String getTenantName() { |
| | | return tenantName; |
| | | } |
| | | public void setTenantName(String tenantName) { |
| | | this.tenantName = tenantName; |
| | | } |
| | | public String getAppointmentTime() { |
| | | return appointmentTime; |
| | | } |
| | | public void setAppointmentTime(String appointmentTime) { |
| | | this.appointmentTime = appointmentTime; |
| | | } |
| | | public String getAppointmentRoomId() { |
| | | return appointmentRoomId; |
| | | } |
| | | public void setAppointmentRoomId(String appointmentRoomId) { |
| | | this.appointmentRoomId = appointmentRoomId; |
| | | } |
| | | public String getAppointmentId() { |
| | | return appointmentId; |
| | | } |
| | | public void setAppointmentId(String appointmentId) { |
| | | this.appointmentId = appointmentId; |
| | | } |
| | | public String getRemark() { |
| | | return remark; |
| | | } |
| | | public void setRemark(String remark) { |
| | | this.remark = remark; |
| | | } |
| | | public String getState() { |
| | | return state; |
| | | } |
| | | public void setState(String state) { |
| | | this.state = state; |
| | | } |
| | | public String getTenantSex() { |
| | | return tenantSex; |
| | | } |
| | | public void setTenantSex(String tenantSex) { |
| | | this.tenantSex = tenantSex; |
| | | } |
| | | public String getStoreId() { |
| | | return storeId; |
| | | } |
| | | public void setStoreId(String storeId) { |
| | | this.storeId = storeId; |
| | | } |
| | | public String getRoomId() { |
| | | return roomId; |
| | | } |
| | | public void setRoomId(String roomId) { |
| | | this.roomId = roomId; |
| | | } |
| | | |
| | | |
| | | 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.rentingAppointment; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | public class RentingAppointmentPo implements Serializable { |
| | | |
| | | private String msg; |
| | | private String tenantTel; |
| | | private String tenantName; |
| | | private String appointmentTime; |
| | | private String appointmentRoomId; |
| | | private String appointmentId; |
| | | private String remark; |
| | | private String statusCd = "0"; |
| | | private String state; |
| | | private String tenantSex; |
| | | private String storeId; |
| | | private String roomId; |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | public void setMsg(String msg) { |
| | | this.msg = msg; |
| | | } |
| | | public String getTenantTel() { |
| | | return tenantTel; |
| | | } |
| | | public void setTenantTel(String tenantTel) { |
| | | this.tenantTel = tenantTel; |
| | | } |
| | | public String getTenantName() { |
| | | return tenantName; |
| | | } |
| | | public void setTenantName(String tenantName) { |
| | | this.tenantName = tenantName; |
| | | } |
| | | public String getAppointmentTime() { |
| | | return appointmentTime; |
| | | } |
| | | public void setAppointmentTime(String appointmentTime) { |
| | | this.appointmentTime = appointmentTime; |
| | | } |
| | | public String getAppointmentRoomId() { |
| | | return appointmentRoomId; |
| | | } |
| | | public void setAppointmentRoomId(String appointmentRoomId) { |
| | | this.appointmentRoomId = appointmentRoomId; |
| | | } |
| | | public String getAppointmentId() { |
| | | return appointmentId; |
| | | } |
| | | public void setAppointmentId(String appointmentId) { |
| | | this.appointmentId = appointmentId; |
| | | } |
| | | 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 getState() { |
| | | return state; |
| | | } |
| | | public void setState(String state) { |
| | | this.state = state; |
| | | } |
| | | public String getTenantSex() { |
| | | return tenantSex; |
| | | } |
| | | public void setTenantSex(String tenantSex) { |
| | | this.tenantSex = tenantSex; |
| | | } |
| | | public String getStoreId() { |
| | | return storeId; |
| | | } |
| | | public void setStoreId(String storeId) { |
| | | this.storeId = storeId; |
| | | } |
| | | public String getRoomId() { |
| | | return roomId; |
| | | } |
| | | public void setRoomId(String roomId) { |
| | | this.roomId = roomId; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | public static final String CODE_PREFIX_appraiseId = "80"; |
| | | public static final String CODE_PREFIX_rentingConfigId = "81"; |
| | | public static final String CODE_PREFIX_rentingId = "81"; |
| | | public static final String CODE_PREFIX_appointmentId = "81"; |
| | | |
| | | |
| | | |
| 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="rentingAppointmentServiceDaoImpl"> |
| | | |
| | | |
| | | <!-- 保存租赁预约信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveRentingAppointmentInfo" parameterType="Map"> |
| | | insert into renting_appointment( |
| | | msg,tenant_tel,tenant_name,appointment_time,appointment_room_id,appointment_id,remark,state,tenant_sex,store_id,room_id |
| | | ) values ( |
| | | #{msg},#{tenantTel},#{tenantName},#{appointmentTime},#{appointmentRoomId},#{appointmentId},#{remark},#{state},#{tenantSex},#{storeId},#{roomId} |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询租赁预约信息 add by wuxw 2018-07-03 --> |
| | | <select id="getRentingAppointmentInfo" parameterType="Map" resultType="Map"> |
| | | select t.msg,t.tenant_tel,t.tenant_tel tenantTel,t.tenant_name,t.tenant_name |
| | | tenantName,t.appointment_time,t.appointment_time appointmentTime,t.appointment_room_id,t.appointment_room_id |
| | | appointmentRoomId,t.appointment_id,t.appointment_id appointmentId,t.remark,t.status_cd,t.status_cd |
| | | statusCd,t.state,t.tenant_sex,t.tenant_sex tenantSex,t.store_id,t.store_id storeId,t.room_id,t.room_id roomId |
| | | from renting_appointment t |
| | | where 1 =1 |
| | | <if test="msg !=null and msg != ''"> |
| | | and t.msg= #{msg} |
| | | </if> |
| | | <if test="tenantTel !=null and tenantTel != ''"> |
| | | and t.tenant_tel= #{tenantTel} |
| | | </if> |
| | | <if test="tenantName !=null and tenantName != ''"> |
| | | and t.tenant_name= #{tenantName} |
| | | </if> |
| | | <if test="appointmentTime !=null and appointmentTime != ''"> |
| | | and t.appointment_time= #{appointmentTime} |
| | | </if> |
| | | <if test="appointmentRoomId !=null and appointmentRoomId != ''"> |
| | | and t.appointment_room_id= #{appointmentRoomId} |
| | | </if> |
| | | <if test="appointmentId !=null and appointmentId != ''"> |
| | | and t.appointment_id= #{appointmentId} |
| | | </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="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="tenantSex !=null and tenantSex != ''"> |
| | | and t.tenant_sex= #{tenantSex} |
| | | </if> |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | <if test="roomId !=null and roomId != ''"> |
| | | and t.room_id= #{roomId} |
| | | </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="updateRentingAppointmentInfo" parameterType="Map"> |
| | | update renting_appointment t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="msg !=null and msg != ''"> |
| | | , t.msg= #{msg} |
| | | </if> |
| | | <if test="tenantTel !=null and tenantTel != ''"> |
| | | , t.tenant_tel= #{tenantTel} |
| | | </if> |
| | | <if test="tenantName !=null and tenantName != ''"> |
| | | , t.tenant_name= #{tenantName} |
| | | </if> |
| | | <if test="appointmentTime !=null and appointmentTime != ''"> |
| | | , t.appointment_time= #{appointmentTime} |
| | | </if> |
| | | <if test="appointmentRoomId !=null and appointmentRoomId != ''"> |
| | | , t.appointment_room_id= #{appointmentRoomId} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | , t.remark= #{remark} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | , t.state= #{state} |
| | | </if> |
| | | <if test="tenantSex !=null and tenantSex != ''"> |
| | | , t.tenant_sex= #{tenantSex} |
| | | </if> |
| | | <if test="storeId !=null and storeId != ''"> |
| | | , t.store_id= #{storeId} |
| | | </if> |
| | | <if test="roomId !=null and roomId != ''"> |
| | | , t.room_id= #{roomId} |
| | | </if> |
| | | where 1=1 |
| | | <if test="appointmentId !=null and appointmentId != ''"> |
| | | and t.appointment_id= #{appointmentId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询租赁预约数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryRentingAppointmentsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from renting_appointment t |
| | | where 1 =1 |
| | | <if test="msg !=null and msg != ''"> |
| | | and t.msg= #{msg} |
| | | </if> |
| | | <if test="tenantTel !=null and tenantTel != ''"> |
| | | and t.tenant_tel= #{tenantTel} |
| | | </if> |
| | | <if test="tenantName !=null and tenantName != ''"> |
| | | and t.tenant_name= #{tenantName} |
| | | </if> |
| | | <if test="appointmentTime !=null and appointmentTime != ''"> |
| | | and t.appointment_time= #{appointmentTime} |
| | | </if> |
| | | <if test="appointmentRoomId !=null and appointmentRoomId != ''"> |
| | | and t.appointment_room_id= #{appointmentRoomId} |
| | | </if> |
| | | <if test="appointmentId !=null and appointmentId != ''"> |
| | | and t.appointment_id= #{appointmentId} |
| | | </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="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="tenantSex !=null and tenantSex != ''"> |
| | | and t.tenant_sex= #{tenantSex} |
| | | </if> |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | <if test="roomId !=null and roomId != ''"> |
| | | and t.room_id= #{roomId} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | { |
| | | "autoMove": true, |
| | | "id": "flowId", |
| | | "name": "rentingPoolFlow", |
| | | "desc": "出租流程", |
| | | "shareParam": "communityId", |
| | | "shareColumn": "community_id", |
| | | "id": "appointmentId", |
| | | "name": "rentingAppointment", |
| | | "desc": "租赁预约", |
| | | "shareParam": "storeId", |
| | | "shareColumn": "store_id", |
| | | "shareName": "user", |
| | | "tableName": "renting_pool_flow", |
| | | "tableName": "renting_appointment", |
| | | "param": { |
| | | "flowId": "flow_id", |
| | | "rentingId": "renting_id", |
| | | "useName": "user_name", |
| | | "userTel": "user_tel", |
| | | "dealTime": "deal_time", |
| | | "appointmentId": "appointment_id", |
| | | "tenantName": "tenant_name", |
| | | "tenantSex": "tenant_sex", |
| | | "tenantTel": "tenant_tel", |
| | | "appointmentTime": "appointment_time", |
| | | "appointmentRoomId": "appointment_room_id", |
| | | "roomId": "room_id", |
| | | "storeId": "store_id", |
| | | "state": "state", |
| | | "userRole": "user_role", |
| | | "context": "context", |
| | | "communityId": "community_id", |
| | | "msg": "msg", |
| | | "remark": "remark", |
| | | "statusCd": "status_cd" |
| | | }, |
| | | "required": [ |
| | | { |
| | | "code": "rentingId", |
| | | "msg": "出租不能为空" |
| | | "code": "tenantName", |
| | | "msg": "租客名称不能为空" |
| | | }, |
| | | { |
| | | "code": "useName", |
| | | "msg": "处理人不能为空" |
| | | "code": "tenantSex", |
| | | "msg": "租客性别不能为空" |
| | | }, |
| | | { |
| | | "code": "useTel", |
| | | "msg": "处理人电话不能为空" |
| | | "code": "tenantTel", |
| | | "msg": "租客电话不能为空" |
| | | }, |
| | | { |
| | | "code": "dealTime", |
| | | "msg": "处理时间不能为空" |
| | | }, |
| | | { |
| | | "code": "userRole", |
| | | "msg": "处理人角色不能为空" |
| | | }, |
| | | { |
| | | "code": "communityId", |
| | | "msg": "小区不能为空" |
| | | "code": "appointmentTime", |
| | | "msg": "预约时间不能为空" |
| | | } |
| | | ] |
| | | } |
| New file |
| | |
| | | { |
| | | "autoMove": true, |
| | | "id": "flowId", |
| | | "name": "rentingPoolFlow", |
| | | "desc": "出租流程", |
| | | "shareParam": "communityId", |
| | | "shareColumn": "community_id", |
| | | "shareName": "user", |
| | | "tableName": "renting_pool_flow", |
| | | "param": { |
| | | "flowId": "flow_id", |
| | | "rentingId": "renting_id", |
| | | "useName": "user_name", |
| | | "userTel": "user_tel", |
| | | "dealTime": "deal_time", |
| | | "state": "state", |
| | | "userRole": "user_role", |
| | | "context": "context", |
| | | "communityId": "community_id", |
| | | "statusCd": "status_cd" |
| | | }, |
| | | "required": [ |
| | | { |
| | | "code": "rentingId", |
| | | "msg": "出租不能为空" |
| | | }, |
| | | { |
| | | "code": "useName", |
| | | "msg": "处理人不能为空" |
| | | }, |
| | | { |
| | | "code": "useTel", |
| | | "msg": "处理人电话不能为空" |
| | | }, |
| | | { |
| | | "code": "dealTime", |
| | | "msg": "处理时间不能为空" |
| | | }, |
| | | { |
| | | "code": "userRole", |
| | | "msg": "处理人角色不能为空" |
| | | }, |
| | | { |
| | | "code": "communityId", |
| | | "msg": "小区不能为空" |
| | | } |
| | | ] |
| | | } |
| | |
| | | { |
| | | "templateName":"公摊公式", |
| | | "directories": "property", |
| | | "templateCode":"feeFormula", |
| | | "templateKey":"formulaId", |
| | | "templateKeyName":"公式ID", |
| | | "searchCode": "formulaId", |
| | | "searchName": "公式ID", |
| | | "templateName":"租赁预约", |
| | | "directories": "admin", |
| | | "templateCode":"rentingAppointment", |
| | | "templateKey":"appointmentId", |
| | | "templateKeyName":"预约ID", |
| | | "searchCode": "appointmentId", |
| | | "searchName": "预约ID", |
| | | "conditions": [ |
| | | { |
| | | "name": "公式ID", |
| | | "name": "租客名称", |
| | | "inputType": "input", |
| | | "code": "formulaId", |
| | | "code": "tenantName", |
| | | "whereCondition": "equal" |
| | | }, |
| | | { |
| | | "name": "租客手机号", |
| | | "inputType": "input", |
| | | "code": "tenantTel", |
| | | "whereCondition": "equal" |
| | | }, |
| | | { |
| | | "name": "预约房屋编号", |
| | | "inputType": "input", |
| | | "code": "appointmentRoomId", |
| | | "whereCondition": "equal" |
| | | } |
| | | ], |
| | | "columns":[ |
| | | { |
| | | "code": "formulaValue", |
| | | "cnCode":"公式", |
| | | "desc":"必填,请填写公式", |
| | | "code": "tenantName", |
| | | "cnCode":"租客名称", |
| | | "desc":"必填,请填写租客名称", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType": "input", |
| | | "limit":"maxLength", |
| | | "limitParam":"200", |
| | | "limitErrInfo":"公式太复杂", |
| | | "limitParam":"64", |
| | | "limitErrInfo":"租客名称不能超过64位", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code": "formulaDesc", |
| | | "cnCode":"描述", |
| | | "desc":"选填,请填写本期度数", |
| | | "code": "tenantSex", |
| | | "cnCode":"租客性别", |
| | | "desc":"选填,请选择租客性别", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType": "select", |
| | | "selectValue":"0,1", |
| | | "selectValueName":"男,女", |
| | | "limit":"num", |
| | | "limitParam":"", |
| | | "limitErrInfo":"年龄格式错误", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code": "tenantTel", |
| | | "cnCode":"租客电话", |
| | | "desc":"必填,请填写租客电话", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType": "input", |
| | | "limit":"phone", |
| | | "limitParam":"", |
| | | "limitErrInfo":"手机号格式错误", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code": "appointmentTime", |
| | | "cnCode":"预约时间", |
| | | "desc":"必填,请填写预约时间", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType": "input", |
| | | "limit":"datetime", |
| | | "limitParam":"", |
| | | "limitErrInfo":"预约时间格式错误", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code": "appointmentRoomId", |
| | | "cnCode":"预约房屋", |
| | | "desc":"选填,请填写预约房屋", |
| | | "required":false, |
| | | "hasDefaultValue":false, |
| | | "inputType": "input", |
| | | "limit":"num", |
| | | "limitParam":"", |
| | | "limitErrInfo":"预约房屋格式错误", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code": "remark", |
| | | "cnCode":"备注", |
| | | "desc":"选填,请填写备注", |
| | | "required":false, |
| | | "hasDefaultValue":false, |
| | | "inputType": "input", |
| | | "limit":"maxLength", |
| | | "limitParam":"200", |
| | | "limitErrInfo":"描述太长", |
| | | "limitParam":"500", |
| | | "limitErrInfo":"备注不能超过500字", |
| | | "show": true |
| | | } |
| | | |
| | | ] |
| | | } |
| New file |
| | |
| | | { |
| | | "templateName":"公摊公式", |
| | | "directories": "property", |
| | | "templateCode":"feeFormula", |
| | | "templateKey":"formulaId", |
| | | "templateKeyName":"公式ID", |
| | | "searchCode": "formulaId", |
| | | "searchName": "公式ID", |
| | | "conditions": [ |
| | | { |
| | | "name": "公式ID", |
| | | "inputType": "input", |
| | | "code": "formulaId", |
| | | "whereCondition": "equal" |
| | | } |
| | | ], |
| | | "columns":[ |
| | | { |
| | | "code": "formulaValue", |
| | | "cnCode":"公式", |
| | | "desc":"必填,请填写公式", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType": "input", |
| | | "limit":"maxLength", |
| | | "limitParam":"200", |
| | | "limitErrInfo":"公式太复杂", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code": "formulaDesc", |
| | | "cnCode":"描述", |
| | | "desc":"选填,请填写本期度数", |
| | | "required":false, |
| | | "hasDefaultValue":false, |
| | | "inputType": "input", |
| | | "limit":"maxLength", |
| | | "limitParam":"200", |
| | | "limitErrInfo":"描述太长", |
| | | "show": true |
| | | } |
| | | ] |
| | | } |
| New file |
| | |
| | | package com.java110.intf; |
| | | |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.rentingAppointment.RentingAppointmentDto; |
| | | import com.java110.po.rentingAppointment.RentingAppointmentPo; |
| | | 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 IRentingAppointmentInnerServiceSMO |
| | | * @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("/rentingAppointmentApi") |
| | | public interface IRentingAppointmentInnerServiceSMO { |
| | | |
| | | |
| | | @RequestMapping(value = "/saveRentingAppointment", method = RequestMethod.POST) |
| | | public int saveRentingAppointment(@RequestBody RentingAppointmentPo rentingAppointmentPo); |
| | | |
| | | @RequestMapping(value = "/updateRentingAppointment", method = RequestMethod.POST) |
| | | public int updateRentingAppointment(@RequestBody RentingAppointmentPo rentingAppointmentPo); |
| | | |
| | | @RequestMapping(value = "/deleteRentingAppointment", method = RequestMethod.POST) |
| | | public int deleteRentingAppointment(@RequestBody RentingAppointmentPo rentingAppointmentPo); |
| | | |
| | | /** |
| | | * <p>查询小区楼信息</p> |
| | | * |
| | | * @param rentingAppointmentDto 数据对象分享 |
| | | * @return RentingAppointmentDto 对象数据 |
| | | */ |
| | | @RequestMapping(value = "/queryRentingAppointments", method = RequestMethod.POST) |
| | | List<RentingAppointmentDto> queryRentingAppointments(@RequestBody RentingAppointmentDto rentingAppointmentDto); |
| | | |
| | | /** |
| | | * 查询<p>小区楼</p>总记录数 |
| | | * |
| | | * @param rentingAppointmentDto 数据对象分享 |
| | | * @return 小区下的小区楼记录数 |
| | | */ |
| | | @RequestMapping(value = "/queryRentingAppointmentsCount", method = RequestMethod.POST) |
| | | int queryRentingAppointmentsCount(@RequestBody RentingAppointmentDto rentingAppointmentDto); |
| | | } |
| New file |
| | |
| | | package com.java110.user.api; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.dto.rentingAppointment.RentingAppointmentDto; |
| | | import com.java110.po.rentingAppointment.RentingAppointmentPo; |
| | | import com.java110.user.bmo.rentingAppointment.IDeleteRentingAppointmentBMO; |
| | | import com.java110.user.bmo.rentingAppointment.IGetRentingAppointmentBMO; |
| | | import com.java110.user.bmo.rentingAppointment.ISaveRentingAppointmentBMO; |
| | | import com.java110.user.bmo.rentingAppointment.IUpdateRentingAppointmentBMO; |
| | | 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.*; |
| | | |
| | | /** |
| | | * 租赁 预约接口类 controller |
| | | * |
| | | * add by 吴学文 |
| | | * |
| | | */ |
| | | @RestController |
| | | @RequestMapping(value = "/rentingAppointment") |
| | | public class RentingAppointmentApi { |
| | | |
| | | @Autowired |
| | | private ISaveRentingAppointmentBMO saveRentingAppointmentBMOImpl; |
| | | @Autowired |
| | | private IUpdateRentingAppointmentBMO updateRentingAppointmentBMOImpl; |
| | | @Autowired |
| | | private IDeleteRentingAppointmentBMO deleteRentingAppointmentBMOImpl; |
| | | |
| | | @Autowired |
| | | private IGetRentingAppointmentBMO getRentingAppointmentBMOImpl; |
| | | |
| | | /** |
| | | * 微信保存消息模板 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /rentingAppointment/saveRentingAppointment |
| | | * @path /app/rentingAppointment/saveRentingAppointment |
| | | */ |
| | | @RequestMapping(value = "/saveRentingAppointment", method = RequestMethod.POST) |
| | | public ResponseEntity<String> saveRentingAppointment(@RequestBody JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "tenantName", "请求报文中未包含tenantName"); |
| | | Assert.hasKeyAndValue(reqJson, "tenantSex", "请求报文中未包含tenantSex"); |
| | | Assert.hasKeyAndValue(reqJson, "tenantTel", "请求报文中未包含tenantTel"); |
| | | Assert.hasKeyAndValue(reqJson, "appointmentTime", "请求报文中未包含appointmentTime"); |
| | | |
| | | |
| | | RentingAppointmentPo rentingAppointmentPo = BeanConvertUtil.covertBean(reqJson, RentingAppointmentPo.class); |
| | | return saveRentingAppointmentBMOImpl.save(rentingAppointmentPo); |
| | | } |
| | | |
| | | /** |
| | | * 微信修改消息模板 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /rentingAppointment/updateRentingAppointment |
| | | * @path /app/rentingAppointment/updateRentingAppointment |
| | | */ |
| | | @RequestMapping(value = "/updateRentingAppointment", method = RequestMethod.POST) |
| | | public ResponseEntity<String> updateRentingAppointment(@RequestBody JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "tenantName", "请求报文中未包含tenantName"); |
| | | Assert.hasKeyAndValue(reqJson, "tenantSex", "请求报文中未包含tenantSex"); |
| | | Assert.hasKeyAndValue(reqJson, "tenantTel", "请求报文中未包含tenantTel"); |
| | | Assert.hasKeyAndValue(reqJson, "appointmentTime", "请求报文中未包含appointmentTime"); |
| | | Assert.hasKeyAndValue(reqJson, "appointmentId", "appointmentId不能为空"); |
| | | |
| | | |
| | | RentingAppointmentPo rentingAppointmentPo = BeanConvertUtil.covertBean(reqJson, RentingAppointmentPo.class); |
| | | return updateRentingAppointmentBMOImpl.update(rentingAppointmentPo); |
| | | } |
| | | |
| | | /** |
| | | * 微信删除消息模板 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /rentingAppointment/deleteRentingAppointment |
| | | * @path /app/rentingAppointment/deleteRentingAppointment |
| | | */ |
| | | @RequestMapping(value = "/deleteRentingAppointment", method = RequestMethod.POST) |
| | | public ResponseEntity<String> deleteRentingAppointment(@RequestBody JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "小区ID不能为空"); |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "appointmentId", "appointmentId不能为空"); |
| | | |
| | | |
| | | RentingAppointmentPo rentingAppointmentPo = BeanConvertUtil.covertBean(reqJson, RentingAppointmentPo.class); |
| | | return deleteRentingAppointmentBMOImpl.delete(rentingAppointmentPo); |
| | | } |
| | | |
| | | /** |
| | | * 微信删除消息模板 |
| | | * |
| | | * @param storeId 商户ID |
| | | * @return |
| | | * @serviceCode /rentingAppointment/queryRentingAppointment |
| | | * @path /app/rentingAppointment/queryRentingAppointment |
| | | */ |
| | | @RequestMapping(value = "/queryRentingAppointment", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryRentingAppointment(@RequestHeader(value = "store-id") String storeId, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | RentingAppointmentDto rentingAppointmentDto = new RentingAppointmentDto(); |
| | | rentingAppointmentDto.setPage(page); |
| | | rentingAppointmentDto.setRow(row); |
| | | rentingAppointmentDto.setStoreId(storeId); |
| | | return getRentingAppointmentBMOImpl.get(rentingAppointmentDto); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.user.bmo.rentingAppointment; |
| | | |
| | | import com.java110.po.rentingAppointment.RentingAppointmentPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | public interface IDeleteRentingAppointmentBMO { |
| | | |
| | | |
| | | /** |
| | | * 修改租赁预约 |
| | | * add by wuxw |
| | | * |
| | | * @param rentingAppointmentPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> delete(RentingAppointmentPo rentingAppointmentPo); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.user.bmo.rentingAppointment; |
| | | import com.java110.dto.rentingAppointment.RentingAppointmentDto; |
| | | import org.springframework.http.ResponseEntity; |
| | | public interface IGetRentingAppointmentBMO { |
| | | |
| | | |
| | | /** |
| | | * 查询租赁预约 |
| | | * add by wuxw |
| | | * @param rentingAppointmentDto |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> get(RentingAppointmentDto rentingAppointmentDto); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.user.bmo.rentingAppointment; |
| | | |
| | | import com.java110.po.rentingAppointment.RentingAppointmentPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | public interface ISaveRentingAppointmentBMO { |
| | | |
| | | |
| | | /** |
| | | * 添加租赁预约 |
| | | * add by wuxw |
| | | * @param rentingAppointmentPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> save(RentingAppointmentPo rentingAppointmentPo); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.user.bmo.rentingAppointment; |
| | | import com.java110.po.rentingAppointment.RentingAppointmentPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | public interface IUpdateRentingAppointmentBMO { |
| | | |
| | | |
| | | /** |
| | | * 修改租赁预约 |
| | | * add by wuxw |
| | | * @param rentingAppointmentPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> update(RentingAppointmentPo rentingAppointmentPo); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.user.bmo.rentingAppointment.impl; |
| | | |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.intf.IRentingAppointmentInnerServiceSMO; |
| | | import com.java110.po.rentingAppointment.RentingAppointmentPo; |
| | | import com.java110.user.bmo.rentingAppointment.IDeleteRentingAppointmentBMO; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("deleteRentingAppointmentBMOImpl") |
| | | public class DeleteRentingAppointmentBMOImpl implements IDeleteRentingAppointmentBMO { |
| | | |
| | | @Autowired |
| | | private IRentingAppointmentInnerServiceSMO rentingAppointmentInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param rentingAppointmentPo 数据 |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> delete(RentingAppointmentPo rentingAppointmentPo) { |
| | | |
| | | int flag = rentingAppointmentInnerServiceSMOImpl.deleteRentingAppointment(rentingAppointmentPo); |
| | | |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.user.bmo.rentingAppointment.impl; |
| | | |
| | | import com.java110.dto.rentingAppointment.RentingAppointmentDto; |
| | | import com.java110.intf.IRentingAppointmentInnerServiceSMO; |
| | | import com.java110.user.bmo.rentingAppointment.IGetRentingAppointmentBMO; |
| | | 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("getRentingAppointmentBMOImpl") |
| | | public class GetRentingAppointmentBMOImpl implements IGetRentingAppointmentBMO { |
| | | |
| | | @Autowired |
| | | private IRentingAppointmentInnerServiceSMO rentingAppointmentInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param rentingAppointmentDto |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | public ResponseEntity<String> get(RentingAppointmentDto rentingAppointmentDto) { |
| | | |
| | | |
| | | int count = rentingAppointmentInnerServiceSMOImpl.queryRentingAppointmentsCount(rentingAppointmentDto); |
| | | |
| | | List<RentingAppointmentDto> rentingAppointmentDtos = null; |
| | | if (count > 0) { |
| | | rentingAppointmentDtos = rentingAppointmentInnerServiceSMOImpl.queryRentingAppointments(rentingAppointmentDto); |
| | | } else { |
| | | rentingAppointmentDtos = new ArrayList<>(); |
| | | } |
| | | |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) rentingAppointmentDto.getRow()), count, rentingAppointmentDtos); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | |
| | | return responseEntity; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.user.bmo.rentingAppointment.impl; |
| | | |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.intf.IRentingAppointmentInnerServiceSMO; |
| | | import com.java110.po.rentingAppointment.RentingAppointmentPo; |
| | | import com.java110.user.bmo.rentingAppointment.ISaveRentingAppointmentBMO; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("saveRentingAppointmentBMOImpl") |
| | | public class SaveRentingAppointmentBMOImpl implements ISaveRentingAppointmentBMO { |
| | | |
| | | @Autowired |
| | | private IRentingAppointmentInnerServiceSMO rentingAppointmentInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * 添加小区信息 |
| | | * |
| | | * @param rentingAppointmentPo |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> save(RentingAppointmentPo rentingAppointmentPo) { |
| | | |
| | | rentingAppointmentPo.setAppointmentId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_appointmentId)); |
| | | int flag = rentingAppointmentInnerServiceSMOImpl.saveRentingAppointment(rentingAppointmentPo); |
| | | |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.user.bmo.rentingAppointment.impl; |
| | | |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.intf.IRentingAppointmentInnerServiceSMO; |
| | | import com.java110.po.rentingAppointment.RentingAppointmentPo; |
| | | import com.java110.user.bmo.rentingAppointment.IUpdateRentingAppointmentBMO; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("updateRentingAppointmentBMOImpl") |
| | | public class UpdateRentingAppointmentBMOImpl implements IUpdateRentingAppointmentBMO { |
| | | |
| | | @Autowired |
| | | private IRentingAppointmentInnerServiceSMO rentingAppointmentInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param rentingAppointmentPo |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> update(RentingAppointmentPo rentingAppointmentPo) { |
| | | |
| | | int flag = rentingAppointmentInnerServiceSMOImpl.updateRentingAppointment(rentingAppointmentPo); |
| | | |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.user.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 IRentingAppointmentServiceDao { |
| | | |
| | | |
| | | /** |
| | | * 保存 租赁预约信息 |
| | | * @param info |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void saveRentingAppointmentInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询租赁预约信息(instance过程) |
| | | * 根据bId 查询租赁预约信息 |
| | | * @param info bId 信息 |
| | | * @return 租赁预约信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | List<Map> getRentingAppointmentInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 修改租赁预约信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void updateRentingAppointmentInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 查询租赁预约总数 |
| | | * |
| | | * @param info 租赁预约信息 |
| | | * @return 租赁预约数量 |
| | | */ |
| | | int queryRentingAppointmentsCount(Map info); |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.user.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.user.dao.IRentingAppointmentServiceDao; |
| | | 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("rentingAppointmentServiceDaoImpl") |
| | | //@Transactional |
| | | public class RentingAppointmentServiceDaoImpl extends BaseServiceDao implements IRentingAppointmentServiceDao { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(RentingAppointmentServiceDaoImpl.class); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 保存租赁预约信息 到 instance |
| | | * @param info bId 信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void saveRentingAppointmentInfo(Map info) throws DAOException { |
| | | logger.debug("保存租赁预约信息Instance 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("rentingAppointmentServiceDaoImpl.saveRentingAppointmentInfo",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> getRentingAppointmentInfo(Map info) throws DAOException { |
| | | logger.debug("查询租赁预约信息 入参 info : {}",info); |
| | | |
| | | List<Map> businessRentingAppointmentInfos = sqlSessionTemplate.selectList("rentingAppointmentServiceDaoImpl.getRentingAppointmentInfo",info); |
| | | |
| | | return businessRentingAppointmentInfos; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改租赁预约信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void updateRentingAppointmentInfo(Map info) throws DAOException { |
| | | logger.debug("修改租赁预约信息Instance 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("rentingAppointmentServiceDaoImpl.updateRentingAppointmentInfo",info); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改租赁预约信息Instance数据失败:"+ JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询租赁预约数量 |
| | | * @param info 租赁预约信息 |
| | | * @return 租赁预约数量 |
| | | */ |
| | | @Override |
| | | public int queryRentingAppointmentsCount(Map info) { |
| | | logger.debug("查询租赁预约数据 入参 info : {}",info); |
| | | |
| | | List<Map> businessRentingAppointmentInfos = sqlSessionTemplate.selectList("rentingAppointmentServiceDaoImpl.queryRentingAppointmentsCount", info); |
| | | if (businessRentingAppointmentInfos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(businessRentingAppointmentInfos.get(0).get("count").toString()); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.user.smo.impl; |
| | | |
| | | |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.dto.rentingAppointment.RentingAppointmentDto; |
| | | import com.java110.intf.IRentingAppointmentInnerServiceSMO; |
| | | import com.java110.po.rentingAppointment.RentingAppointmentPo; |
| | | import com.java110.user.dao.IRentingAppointmentServiceDao; |
| | | 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 RentingAppointmentInnerServiceSMOImpl extends BaseServiceSMO implements IRentingAppointmentInnerServiceSMO { |
| | | |
| | | @Autowired |
| | | private IRentingAppointmentServiceDao rentingAppointmentServiceDaoImpl; |
| | | |
| | | |
| | | @Override |
| | | public int saveRentingAppointment(@RequestBody RentingAppointmentPo rentingAppointmentPo) { |
| | | int saveFlag = 1; |
| | | rentingAppointmentServiceDaoImpl.saveRentingAppointmentInfo(BeanConvertUtil.beanCovertMap(rentingAppointmentPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int updateRentingAppointment(@RequestBody RentingAppointmentPo rentingAppointmentPo) { |
| | | int saveFlag = 1; |
| | | rentingAppointmentServiceDaoImpl.updateRentingAppointmentInfo(BeanConvertUtil.beanCovertMap(rentingAppointmentPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int deleteRentingAppointment(@RequestBody RentingAppointmentPo rentingAppointmentPo) { |
| | | int saveFlag = 1; |
| | | rentingAppointmentPo.setStatusCd("1"); |
| | | rentingAppointmentServiceDaoImpl.updateRentingAppointmentInfo(BeanConvertUtil.beanCovertMap(rentingAppointmentPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public List<RentingAppointmentDto> queryRentingAppointments(@RequestBody RentingAppointmentDto rentingAppointmentDto) { |
| | | |
| | | //校验是否传了 分页信息 |
| | | |
| | | int page = rentingAppointmentDto.getPage(); |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | rentingAppointmentDto.setPage((page - 1) * rentingAppointmentDto.getRow()); |
| | | } |
| | | |
| | | List<RentingAppointmentDto> rentingAppointments = BeanConvertUtil.covertBeanList(rentingAppointmentServiceDaoImpl.getRentingAppointmentInfo(BeanConvertUtil.beanCovertMap(rentingAppointmentDto)), RentingAppointmentDto.class); |
| | | |
| | | return rentingAppointments; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int queryRentingAppointmentsCount(@RequestBody RentingAppointmentDto rentingAppointmentDto) { |
| | | return rentingAppointmentServiceDaoImpl.queryRentingAppointmentsCount(BeanConvertUtil.beanCovertMap(rentingAppointmentDto)); |
| | | } |
| | | |
| | | public IRentingAppointmentServiceDao getRentingAppointmentServiceDaoImpl() { |
| | | return rentingAppointmentServiceDaoImpl; |
| | | } |
| | | |
| | | public void setRentingAppointmentServiceDaoImpl(IRentingAppointmentServiceDao rentingAppointmentServiceDaoImpl) { |
| | | this.rentingAppointmentServiceDaoImpl = rentingAppointmentServiceDaoImpl; |
| | | } |
| | | } |