访客登记页面修正拜访时间无法插入问题,将name字段修改为v_name
| | |
| | | import com.java110.common.util.DateUtil; |
| | | import com.java110.community.dao.IVisitServiceDao; |
| | | import com.java110.core.base.dao.BaseServiceDao; |
| | | |
| | | 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; |
| | |
| | | import com.java110.common.constant.StatusConstant; |
| | | import com.java110.common.exception.ListenerExecuteException; |
| | | import com.java110.community.dao.IVisitServiceDao; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.entity.center.Business; |
| | | import com.java110.event.service.AbstractBusinessServiceDataFlowListener; |
| | | |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | |
| | |
| | | protected void flushBusinessVisitInfo(Map businessVisitInfo, String statusCd) { |
| | | businessVisitInfo.put("newBId", businessVisitInfo.get("b_id")); |
| | | businessVisitInfo.put("departureTime", businessVisitInfo.get("departure_time")); |
| | | businessVisitInfo.put("vName", businessVisitInfo.get("v_name")); |
| | | businessVisitInfo.put("visitGender", businessVisitInfo.get("visit_gender")); |
| | | businessVisitInfo.put("ownerId", businessVisitInfo.get("owner_id")); |
| | | businessVisitInfo.put("userId", businessVisitInfo.get("user_id")); |
| | |
| | | businessVisitInfo.put("visitTime", businessVisitInfo.get("visit_time")); |
| | | businessVisitInfo.put("phoneNumber", businessVisitInfo.get("phone_number")); |
| | | businessVisitInfo.put("operate", businessVisitInfo.get("operate")); |
| | | businessVisitInfo.put("name", businessVisitInfo.get("name")); |
| | | businessVisitInfo.put("visitCase", businessVisitInfo.get("visit_case")); |
| | | businessVisitInfo.put("communityId", businessVisitInfo.get("community_id")); |
| | | businessVisitInfo.remove("bId"); |
| | |
| | | currentVisitInfo.put("bId", business.getbId()); |
| | | |
| | | currentVisitInfo.put("departureTime", currentVisitInfo.get("departure_time")); |
| | | currentVisitInfo.put("vName", currentVisitInfo.get("v_name")); |
| | | currentVisitInfo.put("visitGender", currentVisitInfo.get("visit_gender")); |
| | | currentVisitInfo.put("ownerId", currentVisitInfo.get("owner_id")); |
| | | currentVisitInfo.put("userId", currentVisitInfo.get("user_id")); |
| | |
| | | currentVisitInfo.put("visitTime", currentVisitInfo.get("visit_time")); |
| | | currentVisitInfo.put("phoneNumber", currentVisitInfo.get("phone_number")); |
| | | currentVisitInfo.put("operate", currentVisitInfo.get("operate")); |
| | | currentVisitInfo.put("name", currentVisitInfo.get("name")); |
| | | currentVisitInfo.put("visitCase", currentVisitInfo.get("visit_case")); |
| | | currentVisitInfo.put("communityId", currentVisitInfo.get("community_id")); |
| | | |
| | |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.entity.center.Business; |
| | | |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | |
| | | import com.java110.common.util.BeanConvertUtil; |
| | | |
| | | import com.java110.community.dao.IVisitServiceDao; |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.core.smo.visit.IVisitInnerServiceSMO; |
| | | import com.java110.core.smo.user.IUserInnerServiceSMO; |
| | | import com.java110.dto.PageDto; |
| | | |
| | | import com.java110.core.smo.user.IUserInnerServiceSMO; |
| | | import com.java110.core.smo.visit.IVisitInnerServiceSMO; |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.dto.UserDto; |
| | | import com.java110.dto.visit.VisitDto; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | public class VisitDto extends PageDto implements Serializable { |
| | | |
| | | private String departureTime; |
| | | private String vName; |
| | | private String visitGender; |
| | | private String ownerId; |
| | | private String userId; |
| | | private String vId; |
| | | private String visitTime; |
| | | private String phoneNumber; |
| | | private String name; |
| | | private String visitCase; |
| | | private String communityId; |
| | | |
| | |
| | | |
| | | public void setDepartureTime(String departureTime) { |
| | | this.departureTime = departureTime; |
| | | } |
| | | |
| | | public String getVName() { |
| | | return vName; |
| | | } |
| | | |
| | | public void setVName(String vName) { |
| | | this.vName = vName; |
| | | } |
| | | |
| | | public String getVisitGender() { |
| | |
| | | |
| | | public void setPhoneNumber(String phoneNumber) { |
| | | this.phoneNumber = phoneNumber; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getVisitCase() { |
| | |
| | | data.setTableName("s_visit_info"); |
| | | Map<String, String> param = new HashMap<String, String>(); |
| | | param.put("vId", "v_id"); //map的key为你自定义的字段名就是驼峰命名法的那个,value为数据库表的字段名 |
| | | param.put("name", "name"); |
| | | param.put("vName", "v_name"); |
| | | param.put("communityId", "community_id"); |
| | | param.put("visitGender", "visit_gender"); |
| | | param.put("phoneNumber", "phone_number"); |
| | |
| | | package com.java110.core.smo.visit; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | |
| | | |
| | | import com.java110.dto.visit.VisitDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | <!-- 保存访客信息信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveBusinessVisitInfo" parameterType="Map"> |
| | | insert into business_visit_info( |
| | | departure_time,visit_gender,owner_id,user_id,v_id,visit_time,phone_number,operate,name,visit_case,community_id,b_id |
| | | departure_time,v_name,visit_gender,owner_id,user_id,v_id,visit_time,phone_number,operate,visit_case,community_id,b_id |
| | | ) values ( |
| | | #{departureTime},#{visitGender},#{ownerId},#{userId},#{vId},NOW(),#{phoneNumber},#{operate},#{name},#{visitCase},#{communityId},#{bId} |
| | | #{departureTime},#{vName},#{visitGender},#{ownerId},#{userId},#{vId},NOW(),#{phoneNumber},#{operate},#{visitCase},#{communityId},#{bId} |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询访客信息信息(Business) add by wuxw 2018-07-03 --> |
| | | <select id="getBusinessVisitInfo" parameterType="Map" resultType="Map"> |
| | | select t.departure_time,t.departure_time departureTime,t.visit_gender,t.visit_gender visitGender,t.owner_id,t.owner_id ownerId,t.user_id,t.user_id userId,t.v_id,t.v_id vId,t.visit_time,t.visit_time visitTime,t.phone_number,t.phone_number phoneNumber,t.operate,t.name,t.visit_case,t.visit_case visitCase,t.community_id,t.community_id communityId,t.b_id,t.b_id bId |
| | | select t.departure_time,t.departure_time departureTime,t.v_name,t.v_name vName,t.visit_gender,t.visit_gender visitGender,t.owner_id,t.owner_id ownerId,t.user_id,t.user_id userId,t.v_id,t.v_id vId,t.visit_time,t.visit_time visitTime,t.phone_number,t.phone_number phoneNumber,t.operate,t.visit_case,t.visit_case visitCase,t.community_id,t.community_id communityId,t.b_id,t.b_id bId |
| | | from business_visit_info t |
| | | where 1 =1 |
| | | <if test="departureTime !=null and departureTime != ''"> |
| | | and t.departure_time= #{departureTime} |
| | | </if> |
| | | <if test="vName !=null and vName != ''"> |
| | | and t.v_name= #{vName} |
| | | </if> |
| | | <if test="visitGender !=null and visitGender != ''"> |
| | | and t.visit_gender= #{visitGender} |
| | |
| | | <if test="operate !=null and operate != ''"> |
| | | and t.operate= #{operate} |
| | | </if> |
| | | <if test="name !=null and name != ''"> |
| | | and t.name= #{name} |
| | | </if> |
| | | <if test="visitCase !=null and visitCase != ''"> |
| | | and t.visit_case= #{visitCase} |
| | | </if> |
| | |
| | | <!-- 保存访客信息信息至 instance表中 add by wuxw 2018-07-03 --> |
| | | <insert id="saveVisitInfoInstance" parameterType="Map"> |
| | | insert into s_visit_info( |
| | | departure_time,status_cd,visit_gender,owner_id,user_id,v_id,visit_time,phone_number,name,visit_case,community_id,b_id |
| | | ) select t.departure_time,'0',t.visit_gender,t.owner_id,t.user_id,t.v_id,t.visit_time,t.phone_number,t.name,t.visit_case,t.community_id,t.b_id from business_visit_info t where 1=1 |
| | | departure_time,v_name,status_cd,visit_gender,owner_id,user_id,v_id,visit_time,phone_number,visit_case,community_id,b_id |
| | | ) select t.departure_time,t.v_name,'0',t.visit_gender,t.owner_id,t.user_id,t.v_id,t.visit_time,t.phone_number,t.visit_case,t.community_id,t.b_id from business_visit_info t where 1=1 |
| | | <if test="departureTime !=null and departureTime != ''"> |
| | | and t.departure_time= #{departureTime} |
| | | </if> |
| | | <if test="vName !=null and vName != ''"> |
| | | and t.v_name= #{vName} |
| | | </if> |
| | | <if test="visitGender !=null and visitGender != ''"> |
| | | and t.visit_gender= #{visitGender} |
| | |
| | | and t.phone_number= #{phoneNumber} |
| | | </if> |
| | | and t.operate= 'ADD' |
| | | <if test="name !=null and name != ''"> |
| | | and t.name= #{name} |
| | | </if> |
| | | <if test="visitCase !=null and visitCase != ''"> |
| | | and t.visit_case= #{visitCase} |
| | | </if> |
| | |
| | | |
| | | <!-- 查询访客信息信息 add by wuxw 2018-07-03 --> |
| | | <select id="getVisitInfo" parameterType="Map" resultType="Map"> |
| | | select t.departure_time,t.departure_time departureTime,t.status_cd,t.status_cd statusCd,t.visit_gender,t.visit_gender visitGender,t.owner_id,t.owner_id ownerId,t.user_id,t.user_id userId,t.v_id,t.v_id vId,t.visit_time,t.visit_time visitTime,t.phone_number,t.phone_number phoneNumber,t.name,t.visit_case,t.visit_case visitCase,t.community_id,t.community_id communityId,t.b_id,t.b_id bId |
| | | select t.departure_time,t.departure_time departureTime,t.v_name,t.v_name vName,t.status_cd,t.status_cd statusCd,t.visit_gender,t.visit_gender visitGender,t.owner_id,t.owner_id ownerId,t.user_id,t.user_id userId,t.v_id,t.v_id vId,t.visit_time,t.visit_time visitTime,t.phone_number,t.phone_number phoneNumber,t.visit_case,t.visit_case visitCase,t.community_id,t.community_id communityId,t.b_id,t.b_id bId |
| | | from s_visit_info t |
| | | where 1 =1 |
| | | <if test="departureTime !=null and departureTime != ''"> |
| | | and t.departure_time= #{departureTime} |
| | | </if> |
| | | <if test="vName !=null and vName != ''"> |
| | | and t.v_name= #{vName} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | |
| | | </if> |
| | | <if test="phoneNumber !=null and phoneNumber != ''"> |
| | | and t.phone_number= #{phoneNumber} |
| | | </if> |
| | | <if test="name !=null and name != ''"> |
| | | and t.name= #{name} |
| | | </if> |
| | | <if test="visitCase !=null and visitCase != ''"> |
| | | and t.visit_case= #{visitCase} |
| | |
| | | <if test="departureTime !=null and departureTime != ''"> |
| | | , t.departure_time= #{departureTime} |
| | | </if> |
| | | <if test="vName !=null and vName != ''"> |
| | | , t.v_name= #{vName} |
| | | </if> |
| | | <if test="visitGender !=null and visitGender != ''"> |
| | | , t.visit_gender= #{visitGender} |
| | | </if> |
| | |
| | | </if> |
| | | <if test="phoneNumber !=null and phoneNumber != ''"> |
| | | , t.phone_number= #{phoneNumber} |
| | | </if> |
| | | <if test="name !=null and name != ''"> |
| | | , t.name= #{name} |
| | | </if> |
| | | <if test="visitCase !=null and visitCase != ''"> |
| | | , t.visit_case= #{visitCase} |
| | |
| | | <if test="departureTime !=null and departureTime != ''"> |
| | | and t.departure_time= #{departureTime} |
| | | </if> |
| | | <if test="vName !=null and vName != ''"> |
| | | and t.v_name= #{vName} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | |
| | | </if> |
| | | <if test="phoneNumber !=null and phoneNumber != ''"> |
| | | and t.phone_number= #{phoneNumber} |
| | | </if> |
| | | <if test="name !=null and name != ''"> |
| | | and t.name= #{name} |
| | | </if> |
| | | <if test="visitCase !=null and visitCase != ''"> |
| | | and t.visit_case= #{visitCase} |