| | |
| | | |
| | | <!-- 查询投诉信息 add by wuxw 2018-07-03 --> |
| | | <select id="getComplaintInfo" parameterType="Map" resultType="Map"> |
| | | select t.status_cd,t.status_cd statusCd,t.store_id,t.store_id storeId,t.owner_id,t.owner_id |
| | | ownerId,t.room_id,t.room_id roomId,t.room_name,t.room_name roomName,t.start_user_id,t.start_user_id |
| | | startUserId,t.complaint_id,t.complaint_id complaintId,t.type_cd,t.type_cd typeCd,t.owner_name,t.owner_name |
| | | ownerName,t.context,t.complaint_name,t.complaint_name complaintName,t.tel,t.state,t.community_id,t.community_id |
| | | communityId |
| | | select t.store_id storeId,t.owner_id ownerId,t.room_id roomId,t.room_name roomName,t.start_user_id |
| | | startUserId,t.complaint_id complaintId,t.type_cd typeCd,t.owner_name ownerName,t.context,t.complaint_name complaintName, |
| | | t.tel,t.state,t.community_id communityId,td.`name` stateName |
| | | from complaint t |
| | | left join t_dict td on t.state = td.status_cd and td.table_name = 'complaint' and td.table_columns = 'state' |
| | | where 1 =1 |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | |
| | | </if> |
| | | <if test="ownerName !=null and ownerName != ''"> |
| | | and t.owner_name= #{ownerName} |
| | | </if> |
| | | <if test="context !=null and context != ''"> |
| | | and t.context= #{context} |
| | | </if> |
| | | <if test="complaintName !=null and complaintName != ''"> |
| | | and t.complaint_name= #{complaintName} |
| | |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.dto.room.RoomDto; |
| | | import com.java110.dto.complaint.ComplaintDto; |
| | | import com.java110.dto.file.FileRelDto; |
| | | import com.java110.dto.owner.OwnerDto; |
| | | import com.java110.intf.common.IComplaintUserInnerServiceSMO; |
| | | import com.java110.intf.common.IFileRelInnerServiceSMO; |
| | | import com.java110.intf.community.IRoomInnerServiceSMO; |
| | | import com.java110.intf.store.IComplaintInnerServiceSMO; |
| | | import com.java110.intf.store.IComplaintV1InnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerV1InnerServiceSMO; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.api.complaint.ApiComplaintDataVo; |
| | | import com.java110.vo.api.complaint.ApiComplaintVo; |
| | | import com.java110.vo.api.junkRequirement.PhotoVo; |
| | |
| | | public class ListComplaintsCmd extends Cmd { |
| | | |
| | | @Autowired |
| | | private IComplaintInnerServiceSMO complaintInnerServiceSMOImpl; |
| | | private IComplaintV1InnerServiceSMO complaintV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IRoomInnerServiceSMO roomInnerServiceSMOImpl; |
| | |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException { |
| | | |
| | | ComplaintDto complaintDto = BeanConvertUtil.covertBean(reqJson, ComplaintDto.class); |
| | | int count = complaintInnerServiceSMOImpl.queryComplaintsCount(complaintDto); |
| | | int count = complaintV1InnerServiceSMOImpl.queryComplaintsCount(complaintDto); |
| | | List<ApiComplaintDataVo> complaints = null; |
| | | if (count > 0) { |
| | | List<ComplaintDto> complaintDtos = complaintInnerServiceSMOImpl.queryComplaints(complaintDto); |
| | | List<ComplaintDto> complaintDtos = complaintV1InnerServiceSMOImpl.queryComplaints(complaintDto); |
| | | complaints = BeanConvertUtil.covertBeanList(complaintDtos, ApiComplaintDataVo.class); |
| | | refreshPhotos(complaints); |
| | | } else { |
| | |
| | | public List<Map> getComplaintInfo(Map info) throws DAOException { |
| | | logger.debug("查询投诉建议信息 入参 info : {}", info); |
| | | |
| | | List<Map> businessComplaintInfos = sqlSessionTemplate.selectList("complaintServiceDaoImpl.getComplaintInfo", info); |
| | | List<Map> infos = sqlSessionTemplate.selectList("complaintServiceDaoImpl.getComplaintInfo", info); |
| | | |
| | | return businessComplaintInfos; |
| | | return infos; |
| | | } |
| | | |
| | | |
| | |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.core.base.dao.BaseServiceDao; |
| | | import com.java110.store.dao.IComplaintV1ServiceDao; |
| | | import com.java110.utils.util.ListUtil; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | public List<Map> getComplaintInfo(Map info) throws DAOException { |
| | | logger.debug("查询 getComplaintInfo 入参 info : {}",info); |
| | | |
| | | List<Map> businessComplaintInfos = sqlSessionTemplate.selectList("complaintV1ServiceDaoImpl.getComplaintInfo",info); |
| | | List<Map> infos = sqlSessionTemplate.selectList("complaintV1ServiceDaoImpl.getComplaintInfo",info); |
| | | |
| | | return businessComplaintInfos; |
| | | return infos; |
| | | } |
| | | |
| | | |
| | |
| | | public int queryComplaintsCount(Map info) { |
| | | logger.debug("查询 queryComplaintsCount 入参 info : {}",info); |
| | | |
| | | List<Map> businessComplaintInfos = sqlSessionTemplate.selectList("complaintV1ServiceDaoImpl.queryComplaintsCount", info); |
| | | if (businessComplaintInfos.size() < 1) { |
| | | List<Map> infos = sqlSessionTemplate.selectList("complaintV1ServiceDaoImpl.queryComplaintsCount", info); |
| | | if (ListUtil.isNull(infos)) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(businessComplaintInfos.get(0).get("count").toString()); |
| | | return Integer.parseInt(infos.get(0).get("count").toString()); |
| | | } |
| | | |
| | | @Override |