| New file |
| | |
| | | package com.java110.api.listener.complaint; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.listener.AbstractServiceApiListener; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.entity.center.AppService; |
| | | import com.java110.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.utils.constant.CommonConstant; |
| | | import com.java110.utils.constant.ServiceCodeConstant; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.utils.constant.ServiceCodeComplaintConstant; |
| | | import org.springframework.http.HttpHeaders; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | /** |
| | | * 保存小区侦听 |
| | | * add by wuxw 2019-06-30 |
| | | */ |
| | | @Java110Listener("deleteComplaintListener") |
| | | public class DeleteComplaintListener extends AbstractServiceApiListener { |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | | //Assert.hasKeyAndValue(reqJson, "xxx", "xxx"); |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "complaintId", "投诉ID不能为空"); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) { |
| | | |
| | | HttpHeaders header = new HttpHeaders(); |
| | | context.getRequestCurrentHeaders().put(CommonConstant.HTTP_ORDER_TYPE_CD, "D"); |
| | | JSONArray businesses = new JSONArray(); |
| | | |
| | | AppService service = event.getAppService(); |
| | | |
| | | //添加单元信息 |
| | | businesses.add(deleteComplaint(reqJson, context)); |
| | | |
| | | JSONObject paramInObj = super.restToCenterProtocol(businesses, context.getRequestCurrentHeaders()); |
| | | |
| | | //将 rest header 信息传递到下层服务中去 |
| | | super.freshHttpHeader(header, context.getRequestCurrentHeaders()); |
| | | |
| | | ResponseEntity<String> responseEntity = this.callService(context, service.getServiceCode(), paramInObj); |
| | | |
| | | context.setResponseEntity(responseEntity); |
| | | } |
| | | |
| | | @Override |
| | | public String getServiceCode() { |
| | | return ServiceCodeComplaintConstant.DELETE_COMPLAINT; |
| | | } |
| | | |
| | | @Override |
| | | public HttpMethod getHttpMethod() { |
| | | return HttpMethod.POST; |
| | | } |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return DEFAULT_ORDER; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 添加小区信息 |
| | | * |
| | | * @param paramInJson 接口调用放传入入参 |
| | | * @param dataFlowContext 数据上下文 |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | private JSONObject deleteComplaint(JSONObject paramInJson, DataFlowContext dataFlowContext) { |
| | | |
| | | |
| | | JSONObject business = JSONObject.parseObject("{\"datas\":{}}"); |
| | | business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_DELETE_COMPLAINT); |
| | | business.put(CommonConstant.HTTP_SEQ, DEFAULT_SEQ); |
| | | business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S); |
| | | JSONObject businessComplaint = new JSONObject(); |
| | | businessComplaint.putAll(paramInJson); |
| | | //计算 应收金额 |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessComplaint", businessComplaint); |
| | | return business; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.api.listener.complaint; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.listener.AbstractServiceApiListener; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.smo.complaint.IComplaintInnerServiceSMO; |
| | | import com.java110.dto.complaint.ComplaintDto; |
| | | import com.java110.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.utils.constant.ServiceCodeComplaintConstant; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.vo.api.complaint.ApiComplaintDataVo; |
| | | import com.java110.vo.api.complaint.ApiComplaintVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * 查询小区侦听类 |
| | | */ |
| | | @Java110Listener("listComplaintsListener") |
| | | public class ListComplaintsListener extends AbstractServiceApiListener { |
| | | |
| | | @Autowired |
| | | private IComplaintInnerServiceSMO complaintInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public String getServiceCode() { |
| | | return ServiceCodeComplaintConstant.LIST_COMPLAINTS; |
| | | } |
| | | |
| | | @Override |
| | | public HttpMethod getHttpMethod() { |
| | | return HttpMethod.GET; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return DEFAULT_ORDER; |
| | | } |
| | | |
| | | |
| | | public IComplaintInnerServiceSMO getComplaintInnerServiceSMOImpl() { |
| | | return complaintInnerServiceSMOImpl; |
| | | } |
| | | |
| | | public void setComplaintInnerServiceSMOImpl(IComplaintInnerServiceSMO complaintInnerServiceSMOImpl) { |
| | | this.complaintInnerServiceSMOImpl = complaintInnerServiceSMOImpl; |
| | | } |
| | | |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | | super.validatePageInfo(reqJson); |
| | | } |
| | | |
| | | @Override |
| | | protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) { |
| | | |
| | | ComplaintDto complaintDto = BeanConvertUtil.covertBean(reqJson, ComplaintDto.class); |
| | | |
| | | int count = complaintInnerServiceSMOImpl.queryComplaintsCount(complaintDto); |
| | | |
| | | List<ApiComplaintDataVo> complaints = null; |
| | | |
| | | if (count > 0) { |
| | | complaints = BeanConvertUtil.covertBeanList(complaintInnerServiceSMOImpl.queryComplaints(complaintDto), ApiComplaintDataVo.class); |
| | | } else { |
| | | complaints = new ArrayList<>(); |
| | | } |
| | | |
| | | ApiComplaintVo apiComplaintVo = new ApiComplaintVo(); |
| | | |
| | | apiComplaintVo.setTotal(count); |
| | | apiComplaintVo.setRecords((int) Math.ceil((double) count / (double) reqJson.getInteger("row"))); |
| | | apiComplaintVo.setComplaints(complaints); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(JSONObject.toJSONString(apiComplaintVo), HttpStatus.OK); |
| | | |
| | | context.setResponseEntity(responseEntity); |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.api.listener.complaint; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.listener.AbstractServiceApiListener; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.entity.center.AppService; |
| | | import com.java110.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.utils.constant.CommonConstant; |
| | | import com.java110.utils.constant.ServiceCodeConstant; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.ServiceCodeComplaintConstant; |
| | | |
| | | |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import org.springframework.http.HttpHeaders; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | /** |
| | | * 保存小区侦听 |
| | | * add by wuxw 2019-06-30 |
| | | */ |
| | | @Java110Listener("saveComplaintListener") |
| | | public class SaveComplaintListener extends AbstractServiceApiListener { |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | | //Assert.hasKeyAndValue(reqJson, "xxx", "xxx"); |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "storeId", "必填,请填写商户ID"); |
| | | Assert.hasKeyAndValue(reqJson, "typeCd", "必填,请选择投诉类型"); |
| | | Assert.hasKeyAndValue(reqJson, "roomId", "必填,请选择房屋编号"); |
| | | Assert.hasKeyAndValue(reqJson, "complaintName", "必填,请填写投诉人"); |
| | | Assert.hasKeyAndValue(reqJson, "tel", "必填,请填写投诉电话"); |
| | | Assert.hasKeyAndValue(reqJson, "state", "必填,请填写投诉状态"); |
| | | Assert.hasKeyAndValue(reqJson, "context", "必填,请填写投诉内容"); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) { |
| | | |
| | | HttpHeaders header = new HttpHeaders(); |
| | | context.getRequestCurrentHeaders().put(CommonConstant.HTTP_ORDER_TYPE_CD, "D"); |
| | | JSONArray businesses = new JSONArray(); |
| | | |
| | | AppService service = event.getAppService(); |
| | | |
| | | //添加单元信息 |
| | | businesses.add(addComplaint(reqJson, context)); |
| | | |
| | | JSONObject paramInObj = super.restToCenterProtocol(businesses, context.getRequestCurrentHeaders()); |
| | | |
| | | //将 rest header 信息传递到下层服务中去 |
| | | super.freshHttpHeader(header, context.getRequestCurrentHeaders()); |
| | | |
| | | ResponseEntity<String> responseEntity = this.callService(context, service.getServiceCode(), paramInObj); |
| | | |
| | | context.setResponseEntity(responseEntity); |
| | | } |
| | | |
| | | @Override |
| | | public String getServiceCode() { |
| | | return ServiceCodeComplaintConstant.ADD_COMPLAINT; |
| | | } |
| | | |
| | | @Override |
| | | public HttpMethod getHttpMethod() { |
| | | return HttpMethod.POST; |
| | | } |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return DEFAULT_ORDER; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 添加小区信息 |
| | | * |
| | | * @param paramInJson 接口调用放传入入参 |
| | | * @param dataFlowContext 数据上下文 |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | private JSONObject addComplaint(JSONObject paramInJson, DataFlowContext dataFlowContext) { |
| | | |
| | | |
| | | JSONObject business = JSONObject.parseObject("{\"datas\":{}}"); |
| | | business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_SAVE_COMPLAINT); |
| | | business.put(CommonConstant.HTTP_SEQ, DEFAULT_SEQ); |
| | | business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S); |
| | | JSONObject businessComplaint = new JSONObject(); |
| | | businessComplaint.putAll(paramInJson); |
| | | businessComplaint.put("complaintId", "-1"); |
| | | //计算 应收金额 |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessComplaint", businessComplaint); |
| | | return business; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.api.listener.complaint; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.listener.AbstractServiceApiListener; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.CommonConstant; |
| | | import com.java110.utils.constant.ServiceCodeConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.entity.center.AppService; |
| | | import com.java110.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.utils.constant.ServiceCodeComplaintConstant; |
| | | import org.springframework.http.HttpHeaders; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | /** |
| | | * 保存投诉建议侦听 |
| | | * add by wuxw 2019-06-30 |
| | | */ |
| | | @Java110Listener("updateComplaintListener") |
| | | public class UpdateComplaintListener extends AbstractServiceApiListener { |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "complaintId", "投诉ID不能为空"); |
| | | Assert.hasKeyAndValue(reqJson, "storeId", "必填,请填写商户ID"); |
| | | Assert.hasKeyAndValue(reqJson, "typeCd", "必填,请选择投诉类型"); |
| | | Assert.hasKeyAndValue(reqJson, "roomId", "必填,请选择房屋编号"); |
| | | Assert.hasKeyAndValue(reqJson, "complaintName", "必填,请填写投诉人"); |
| | | Assert.hasKeyAndValue(reqJson, "tel", "必填,请填写投诉电话"); |
| | | Assert.hasKeyAndValue(reqJson, "state", "必填,请填写投诉状态"); |
| | | Assert.hasKeyAndValue(reqJson, "context", "必填,请填写投诉内容"); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) { |
| | | |
| | | HttpHeaders header = new HttpHeaders(); |
| | | context.getRequestCurrentHeaders().put(CommonConstant.HTTP_ORDER_TYPE_CD, "D"); |
| | | JSONArray businesses = new JSONArray(); |
| | | |
| | | AppService service = event.getAppService(); |
| | | |
| | | //添加单元信息 |
| | | businesses.add(updateComplaint(reqJson, context)); |
| | | |
| | | JSONObject paramInObj = super.restToCenterProtocol(businesses, context.getRequestCurrentHeaders()); |
| | | |
| | | //将 rest header 信息传递到下层服务中去 |
| | | super.freshHttpHeader(header, context.getRequestCurrentHeaders()); |
| | | |
| | | ResponseEntity<String> responseEntity = this.callService(context, service.getServiceCode(), paramInObj); |
| | | |
| | | context.setResponseEntity(responseEntity); |
| | | } |
| | | |
| | | @Override |
| | | public String getServiceCode() { |
| | | return ServiceCodeComplaintConstant.UPDATE_COMPLAINT; |
| | | } |
| | | |
| | | @Override |
| | | public HttpMethod getHttpMethod() { |
| | | return HttpMethod.POST; |
| | | } |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return DEFAULT_ORDER; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 添加投诉建议信息 |
| | | * |
| | | * @param paramInJson 接口调用放传入入参 |
| | | * @param dataFlowContext 数据上下文 |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | private JSONObject updateComplaint(JSONObject paramInJson, DataFlowContext dataFlowContext) { |
| | | |
| | | |
| | | JSONObject business = JSONObject.parseObject("{\"datas\":{}}"); |
| | | business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_COMPLAINT); |
| | | business.put(CommonConstant.HTTP_SEQ, DEFAULT_SEQ); |
| | | business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S); |
| | | JSONObject businessComplaint = new JSONObject(); |
| | | businessComplaint.putAll(paramInJson); |
| | | //计算 应收金额 |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessComplaint", businessComplaint); |
| | | return business; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.store.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 IComplaintServiceDao { |
| | | |
| | | /** |
| | | * 保存 投诉建议信息 |
| | | * @param businessComplaintInfo 投诉建议信息 封装 |
| | | * @throws DAOException 操作数据库异常 |
| | | */ |
| | | void saveBusinessComplaintInfo(Map businessComplaintInfo) throws DAOException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询投诉建议信息(business过程) |
| | | * 根据bId 查询投诉建议信息 |
| | | * @param info bId 信息 |
| | | * @return 投诉建议信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | List<Map> getBusinessComplaintInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 保存 投诉建议信息 Business数据到 Instance中 |
| | | * @param info |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void saveComplaintInfoInstance(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询投诉建议信息(instance过程) |
| | | * 根据bId 查询投诉建议信息 |
| | | * @param info bId 信息 |
| | | * @return 投诉建议信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | List<Map> getComplaintInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 修改投诉建议信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void updateComplaintInfoInstance(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 查询投诉建议总数 |
| | | * |
| | | * @param info 投诉建议信息 |
| | | * @return 投诉建议数量 |
| | | */ |
| | | int queryComplaintsCount(Map info); |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.store.dao.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.base.dao.BaseServiceDao; |
| | | import com.java110.store.dao.IComplaintServiceDao; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.exception.DAOException; |
| | | import com.java110.utils.util.DateUtil; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 投诉建议服务 与数据库交互 |
| | | * Created by wuxw on 2017/4/5. |
| | | */ |
| | | @Service("complaintServiceDaoImpl") |
| | | //@Transactional |
| | | public class ComplaintServiceDaoImpl extends BaseServiceDao implements IComplaintServiceDao { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(ComplaintServiceDaoImpl.class); |
| | | |
| | | /** |
| | | * 投诉建议信息封装 |
| | | * |
| | | * @param businessComplaintInfo 投诉建议信息 封装 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void saveBusinessComplaintInfo(Map businessComplaintInfo) throws DAOException { |
| | | businessComplaintInfo.put("month", DateUtil.getCurrentMonth()); |
| | | // 查询business_user 数据是否已经存在 |
| | | logger.debug("保存投诉建议信息 入参 businessComplaintInfo : {}", businessComplaintInfo); |
| | | int saveFlag = sqlSessionTemplate.insert("complaintServiceDaoImpl.saveBusinessComplaintInfo", businessComplaintInfo); |
| | | |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存投诉建议数据失败:" + JSONObject.toJSONString(businessComplaintInfo)); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询投诉建议信息 |
| | | * |
| | | * @param info bId 信息 |
| | | * @return 投诉建议信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public List<Map> getBusinessComplaintInfo(Map info) throws DAOException { |
| | | |
| | | logger.debug("查询投诉建议信息 入参 info : {}", info); |
| | | |
| | | List<Map> businessComplaintInfos = sqlSessionTemplate.selectList("complaintServiceDaoImpl.getBusinessComplaintInfo", info); |
| | | |
| | | return businessComplaintInfos; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 保存投诉建议信息 到 instance |
| | | * |
| | | * @param info bId 信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void saveComplaintInfoInstance(Map info) throws DAOException { |
| | | logger.debug("保存投诉建议信息Instance 入参 info : {}", info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("complaintServiceDaoImpl.saveComplaintInfoInstance", 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> getComplaintInfo(Map info) throws DAOException { |
| | | logger.debug("查询投诉建议信息 入参 info : {}", info); |
| | | |
| | | List<Map> businessComplaintInfos = sqlSessionTemplate.selectList("complaintServiceDaoImpl.getComplaintInfo", info); |
| | | |
| | | return businessComplaintInfos; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改投诉建议信息 |
| | | * |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void updateComplaintInfoInstance(Map info) throws DAOException { |
| | | logger.debug("修改投诉建议信息Instance 入参 info : {}", info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("complaintServiceDaoImpl.updateComplaintInfoInstance", info); |
| | | |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "修改投诉建议信息Instance数据失败:" + JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询投诉建议数量 |
| | | * |
| | | * @param info 投诉建议信息 |
| | | * @return 投诉建议数量 |
| | | */ |
| | | @Override |
| | | public int queryComplaintsCount(Map info) { |
| | | logger.debug("查询投诉建议数据 入参 info : {}", info); |
| | | |
| | | List<Map> businessComplaintInfos = sqlSessionTemplate.selectList("complaintServiceDaoImpl.queryComplaintsCount", info); |
| | | if (businessComplaintInfos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(businessComplaintInfos.get(0).get("count").toString()); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.store.listener.complaint; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.entity.center.Business; |
| | | import com.java110.event.service.AbstractBusinessServiceDataFlowListener; |
| | | import com.java110.store.dao.IComplaintServiceDao; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.constant.StatusConstant; |
| | | import com.java110.utils.exception.ListenerExecuteException; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 投诉建议 服务侦听 父类 |
| | | * Created by wuxw on 2018/7/4. |
| | | */ |
| | | public abstract class AbstractComplaintBusinessServiceDataFlowListener extends AbstractBusinessServiceDataFlowListener { |
| | | private static Logger logger = LoggerFactory.getLogger(AbstractComplaintBusinessServiceDataFlowListener.class); |
| | | |
| | | |
| | | /** |
| | | * 获取 DAO工具类 |
| | | * |
| | | * @return |
| | | */ |
| | | public abstract IComplaintServiceDao getComplaintServiceDaoImpl(); |
| | | |
| | | /** |
| | | * 刷新 businessComplaintInfo 数据 |
| | | * 主要将 数据库 中字段和 接口传递字段建立关系 |
| | | * |
| | | * @param businessComplaintInfo |
| | | */ |
| | | protected void flushBusinessComplaintInfo(Map businessComplaintInfo, String statusCd) { |
| | | businessComplaintInfo.put("newBId", businessComplaintInfo.get("b_id")); |
| | | businessComplaintInfo.put("operate", businessComplaintInfo.get("operate")); |
| | | businessComplaintInfo.put("complaintId", businessComplaintInfo.get("complaint_id")); |
| | | businessComplaintInfo.put("typeCd", businessComplaintInfo.get("type_cd")); |
| | | businessComplaintInfo.put("context", businessComplaintInfo.get("context")); |
| | | businessComplaintInfo.put("complaintName", businessComplaintInfo.get("complaint_name")); |
| | | businessComplaintInfo.put("tel", businessComplaintInfo.get("tel")); |
| | | businessComplaintInfo.put("state", businessComplaintInfo.get("state")); |
| | | businessComplaintInfo.put("storeId", businessComplaintInfo.get("store_id")); |
| | | businessComplaintInfo.put("roomId", businessComplaintInfo.get("room_id")); |
| | | businessComplaintInfo.remove("bId"); |
| | | businessComplaintInfo.put("statusCd", statusCd); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 当修改数据时,查询instance表中的数据 自动保存删除数据到business中 |
| | | * |
| | | * @param businessComplaint 投诉建议信息 |
| | | */ |
| | | protected void autoSaveDelBusinessComplaint(Business business, JSONObject businessComplaint) { |
| | | //自动插入DEL |
| | | Map info = new HashMap(); |
| | | info.put("complaintId", businessComplaint.getString("complaintId")); |
| | | info.put("statusCd", StatusConstant.STATUS_CD_VALID); |
| | | List<Map> currentComplaintInfos = getComplaintServiceDaoImpl().getComplaintInfo(info); |
| | | if (currentComplaintInfos == null || currentComplaintInfos.size() != 1) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR, "未找到需要修改数据信息,入参错误或数据有问题,请检查" + info); |
| | | } |
| | | |
| | | Map currentComplaintInfo = currentComplaintInfos.get(0); |
| | | |
| | | currentComplaintInfo.put("bId", business.getbId()); |
| | | |
| | | currentComplaintInfo.put("operate", currentComplaintInfo.get("operate")); |
| | | currentComplaintInfo.put("complaintId", currentComplaintInfo.get("complaint_id")); |
| | | currentComplaintInfo.put("typeCd", currentComplaintInfo.get("type_cd")); |
| | | currentComplaintInfo.put("context", currentComplaintInfo.get("context")); |
| | | currentComplaintInfo.put("complaintName", currentComplaintInfo.get("complaint_name")); |
| | | currentComplaintInfo.put("tel", currentComplaintInfo.get("tel")); |
| | | currentComplaintInfo.put("state", currentComplaintInfo.get("state")); |
| | | currentComplaintInfo.put("storeId", currentComplaintInfo.get("store_id")); |
| | | currentComplaintInfo.put("roomId", currentComplaintInfo.get("room_id")); |
| | | |
| | | |
| | | currentComplaintInfo.put("operate", StatusConstant.OPERATE_DEL); |
| | | getComplaintServiceDaoImpl().saveBusinessComplaintInfo(currentComplaintInfo); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.store.listener.complaint; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.entity.center.Business; |
| | | import com.java110.store.dao.IComplaintServiceDao; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.constant.StatusConstant; |
| | | import com.java110.utils.exception.ListenerExecuteException; |
| | | import com.java110.utils.util.Assert; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 删除投诉建议信息 侦听 |
| | | * <p> |
| | | * 处理节点 |
| | | * 1、businessComplaint:{} 投诉建议基本信息节点 |
| | | * 2、businessComplaintAttr:[{}] 投诉建议属性信息节点 |
| | | * 3、businessComplaintPhoto:[{}] 投诉建议照片信息节点 |
| | | * 4、businessComplaintCerdentials:[{}] 投诉建议证件信息节点 |
| | | * 协议地址 :https://github.com/java110/MicroCommunity/wiki/%E5%88%A0%E9%99%A4%E5%95%86%E6%88%B7%E4%BF%A1%E6%81%AF-%E5%8D%8F%E8%AE%AE |
| | | * Created by wuxw on 2018/5/18. |
| | | */ |
| | | @Java110Listener("deleteComplaintInfoListener") |
| | | @Transactional |
| | | public class DeleteComplaintInfoListener extends AbstractComplaintBusinessServiceDataFlowListener { |
| | | |
| | | private final static Logger logger = LoggerFactory.getLogger(DeleteComplaintInfoListener.class); |
| | | @Autowired |
| | | IComplaintServiceDao complaintServiceDaoImpl; |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return 3; |
| | | } |
| | | |
| | | @Override |
| | | public String getBusinessTypeCd() { |
| | | return BusinessTypeConstant.BUSINESS_TYPE_DELETE_COMPLAINT; |
| | | } |
| | | |
| | | /** |
| | | * 根据删除信息 查出Instance表中数据 保存至business表 (状态写DEL) 方便撤单时直接更新回去 |
| | | * |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) { |
| | | JSONObject data = business.getDatas(); |
| | | |
| | | Assert.notEmpty(data, "没有datas 节点,或没有子节点需要处理"); |
| | | |
| | | //处理 businessComplaint 节点 |
| | | if (data.containsKey("businessComplaint")) { |
| | | //处理 businessComplaint 节点 |
| | | if (data.containsKey("businessComplaint")) { |
| | | Object _obj = data.get("businessComplaint"); |
| | | JSONArray businessComplaints = null; |
| | | if (_obj instanceof JSONObject) { |
| | | businessComplaints = new JSONArray(); |
| | | businessComplaints.add(_obj); |
| | | } else { |
| | | businessComplaints = (JSONArray) _obj; |
| | | } |
| | | //JSONObject businessComplaint = data.getJSONObject("businessComplaint"); |
| | | for (int _complaintIndex = 0; _complaintIndex < businessComplaints.size(); _complaintIndex++) { |
| | | JSONObject businessComplaint = businessComplaints.getJSONObject(_complaintIndex); |
| | | doBusinessComplaint(business, businessComplaint); |
| | | if (_obj instanceof JSONObject) { |
| | | dataFlowContext.addParamOut("complaintId", businessComplaint.getString("complaintId")); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 删除 instance数据 |
| | | * |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) { |
| | | String bId = business.getbId(); |
| | | //Assert.hasLength(bId,"请求报文中没有包含 bId"); |
| | | |
| | | //投诉建议信息 |
| | | Map info = new HashMap(); |
| | | info.put("bId", business.getbId()); |
| | | info.put("operate", StatusConstant.OPERATE_DEL); |
| | | |
| | | //投诉建议信息 |
| | | List<Map> businessComplaintInfos = complaintServiceDaoImpl.getBusinessComplaintInfo(info); |
| | | if (businessComplaintInfos != null && businessComplaintInfos.size() > 0) { |
| | | for (int _complaintIndex = 0; _complaintIndex < businessComplaintInfos.size(); _complaintIndex++) { |
| | | Map businessComplaintInfo = businessComplaintInfos.get(_complaintIndex); |
| | | flushBusinessComplaintInfo(businessComplaintInfo, StatusConstant.STATUS_CD_INVALID); |
| | | complaintServiceDaoImpl.updateComplaintInfoInstance(businessComplaintInfo); |
| | | dataFlowContext.addParamOut("complaintId", businessComplaintInfo.get("complaint_id")); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 撤单 |
| | | * 从business表中查询到DEL的数据 将instance中的数据更新回来 |
| | | * |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doRecover(DataFlowContext dataFlowContext, Business business) { |
| | | String bId = business.getbId(); |
| | | //Assert.hasLength(bId,"请求报文中没有包含 bId"); |
| | | Map info = new HashMap(); |
| | | info.put("bId", bId); |
| | | info.put("statusCd", StatusConstant.STATUS_CD_INVALID); |
| | | |
| | | Map delInfo = new HashMap(); |
| | | delInfo.put("bId", business.getbId()); |
| | | delInfo.put("operate", StatusConstant.OPERATE_DEL); |
| | | //投诉建议信息 |
| | | List<Map> complaintInfo = complaintServiceDaoImpl.getComplaintInfo(info); |
| | | if (complaintInfo != null && complaintInfo.size() > 0) { |
| | | |
| | | //投诉建议信息 |
| | | List<Map> businessComplaintInfos = complaintServiceDaoImpl.getBusinessComplaintInfo(delInfo); |
| | | //除非程序出错了,这里不会为空 |
| | | if (businessComplaintInfos == null || businessComplaintInfos.size() == 0) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR, "撤单失败(complaint),程序内部异常,请检查! " + delInfo); |
| | | } |
| | | for (int _complaintIndex = 0; _complaintIndex < businessComplaintInfos.size(); _complaintIndex++) { |
| | | Map businessComplaintInfo = businessComplaintInfos.get(_complaintIndex); |
| | | flushBusinessComplaintInfo(businessComplaintInfo, StatusConstant.STATUS_CD_VALID); |
| | | complaintServiceDaoImpl.updateComplaintInfoInstance(businessComplaintInfo); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 处理 businessComplaint 节点 |
| | | * |
| | | * @param business 总的数据节点 |
| | | * @param businessComplaint 投诉建议节点 |
| | | */ |
| | | private void doBusinessComplaint(Business business, JSONObject businessComplaint) { |
| | | |
| | | Assert.jsonObjectHaveKey(businessComplaint, "complaintId", "businessComplaint 节点下没有包含 complaintId 节点"); |
| | | |
| | | if (businessComplaint.getString("complaintId").startsWith("-")) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR, "complaintId 错误,不能自动生成(必须已经存在的complaintId)" + businessComplaint); |
| | | } |
| | | //自动插入DEL |
| | | autoSaveDelBusinessComplaint(business, businessComplaint); |
| | | } |
| | | |
| | | public IComplaintServiceDao getComplaintServiceDaoImpl() { |
| | | return complaintServiceDaoImpl; |
| | | } |
| | | |
| | | public void setComplaintServiceDaoImpl(IComplaintServiceDao complaintServiceDaoImpl) { |
| | | this.complaintServiceDaoImpl = complaintServiceDaoImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.store.listener.complaint; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.entity.center.Business; |
| | | import com.java110.store.dao.IComplaintServiceDao; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.StatusConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 保存 投诉建议信息 侦听 |
| | | * Created by wuxw on 2018/5/18. |
| | | */ |
| | | @Java110Listener("saveComplaintInfoListener") |
| | | @Transactional |
| | | public class SaveComplaintInfoListener extends AbstractComplaintBusinessServiceDataFlowListener { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(SaveComplaintInfoListener.class); |
| | | |
| | | @Autowired |
| | | private IComplaintServiceDao complaintServiceDaoImpl; |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public String getBusinessTypeCd() { |
| | | return BusinessTypeConstant.BUSINESS_TYPE_SAVE_COMPLAINT; |
| | | } |
| | | |
| | | /** |
| | | * 保存投诉建议信息 business 表中 |
| | | * |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) { |
| | | JSONObject data = business.getDatas(); |
| | | Assert.notEmpty(data, "没有datas 节点,或没有子节点需要处理"); |
| | | |
| | | //处理 businessComplaint 节点 |
| | | if (data.containsKey("businessComplaint")) { |
| | | Object bObj = data.get("businessComplaint"); |
| | | JSONArray businessComplaints = null; |
| | | if (bObj instanceof JSONObject) { |
| | | businessComplaints = new JSONArray(); |
| | | businessComplaints.add(bObj); |
| | | } else { |
| | | businessComplaints = (JSONArray) bObj; |
| | | } |
| | | //JSONObject businessComplaint = data.getJSONObject("businessComplaint"); |
| | | for (int bComplaintIndex = 0; bComplaintIndex < businessComplaints.size(); bComplaintIndex++) { |
| | | JSONObject businessComplaint = businessComplaints.getJSONObject(bComplaintIndex); |
| | | doBusinessComplaint(business, businessComplaint); |
| | | if (bObj instanceof JSONObject) { |
| | | dataFlowContext.addParamOut("complaintId", businessComplaint.getString("complaintId")); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * business 数据转移到 instance |
| | | * |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) { |
| | | JSONObject data = business.getDatas(); |
| | | |
| | | Map info = new HashMap(); |
| | | info.put("bId", business.getbId()); |
| | | info.put("operate", StatusConstant.OPERATE_ADD); |
| | | |
| | | //投诉建议信息 |
| | | List<Map> businessComplaintInfo = complaintServiceDaoImpl.getBusinessComplaintInfo(info); |
| | | if (businessComplaintInfo != null && businessComplaintInfo.size() > 0) { |
| | | reFreshShareColumn(info, businessComplaintInfo.get(0)); |
| | | complaintServiceDaoImpl.saveComplaintInfoInstance(info); |
| | | if (businessComplaintInfo.size() == 1) { |
| | | dataFlowContext.addParamOut("complaintId", businessComplaintInfo.get(0).get("complaint_id")); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 刷 分片字段 |
| | | * |
| | | * @param info 查询对象 |
| | | * @param businessInfo 小区ID |
| | | */ |
| | | private void reFreshShareColumn(Map info, Map businessInfo) { |
| | | |
| | | if (info.containsKey("storeId")) { |
| | | return; |
| | | } |
| | | |
| | | if (!businessInfo.containsKey("store_id")) { |
| | | return; |
| | | } |
| | | |
| | | info.put("storeId", businessInfo.get("store_id")); |
| | | } |
| | | |
| | | /** |
| | | * 撤单 |
| | | * |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doRecover(DataFlowContext dataFlowContext, Business business) { |
| | | String bId = business.getbId(); |
| | | //Assert.hasLength(bId,"请求报文中没有包含 bId"); |
| | | Map info = new HashMap(); |
| | | info.put("bId", bId); |
| | | info.put("statusCd", StatusConstant.STATUS_CD_VALID); |
| | | Map paramIn = new HashMap(); |
| | | paramIn.put("bId", bId); |
| | | paramIn.put("statusCd", StatusConstant.STATUS_CD_INVALID); |
| | | //投诉建议信息 |
| | | List<Map> complaintInfo = complaintServiceDaoImpl.getComplaintInfo(info); |
| | | if (complaintInfo != null && complaintInfo.size() > 0) { |
| | | reFreshShareColumn(paramIn, complaintInfo.get(0)); |
| | | complaintServiceDaoImpl.updateComplaintInfoInstance(paramIn); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 处理 businessComplaint 节点 |
| | | * |
| | | * @param business 总的数据节点 |
| | | * @param businessComplaint 投诉建议节点 |
| | | */ |
| | | private void doBusinessComplaint(Business business, JSONObject businessComplaint) { |
| | | |
| | | Assert.jsonObjectHaveKey(businessComplaint, "complaintId", "businessComplaint 节点下没有包含 complaintId 节点"); |
| | | |
| | | if (businessComplaint.getString("complaintId").startsWith("-")) { |
| | | //刷新缓存 |
| | | //flushComplaintId(business.getDatas()); |
| | | |
| | | businessComplaint.put("complaintId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_complaintId)); |
| | | |
| | | } |
| | | |
| | | businessComplaint.put("bId", business.getbId()); |
| | | businessComplaint.put("operate", StatusConstant.OPERATE_ADD); |
| | | //保存投诉建议信息 |
| | | complaintServiceDaoImpl.saveBusinessComplaintInfo(businessComplaint); |
| | | |
| | | } |
| | | |
| | | public IComplaintServiceDao getComplaintServiceDaoImpl() { |
| | | return complaintServiceDaoImpl; |
| | | } |
| | | |
| | | public void setComplaintServiceDaoImpl(IComplaintServiceDao complaintServiceDaoImpl) { |
| | | this.complaintServiceDaoImpl = complaintServiceDaoImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.store.listener.complaint; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.entity.center.Business; |
| | | import com.java110.store.dao.IComplaintServiceDao; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.constant.StatusConstant; |
| | | import com.java110.utils.exception.ListenerExecuteException; |
| | | import com.java110.utils.util.Assert; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 修改投诉建议信息 侦听 |
| | | * <p> |
| | | * 处理节点 |
| | | * 1、businessComplaint:{} 投诉建议基本信息节点 |
| | | * 2、businessComplaintAttr:[{}] 投诉建议属性信息节点 |
| | | * 3、businessComplaintPhoto:[{}] 投诉建议照片信息节点 |
| | | * 4、businessComplaintCerdentials:[{}] 投诉建议证件信息节点 |
| | | * 协议地址 :https://github.com/java110/MicroCommunity/wiki/%E4%BF%AE%E6%94%B9%E5%95%86%E6%88%B7%E4%BF%A1%E6%81%AF-%E5%8D%8F%E8%AE%AE |
| | | * Created by wuxw on 2018/5/18. |
| | | */ |
| | | @Java110Listener("updateComplaintInfoListener") |
| | | @Transactional |
| | | public class UpdateComplaintInfoListener extends AbstractComplaintBusinessServiceDataFlowListener { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(UpdateComplaintInfoListener.class); |
| | | @Autowired |
| | | private IComplaintServiceDao complaintServiceDaoImpl; |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return 2; |
| | | } |
| | | |
| | | @Override |
| | | public String getBusinessTypeCd() { |
| | | return BusinessTypeConstant.BUSINESS_TYPE_UPDATE_COMPLAINT; |
| | | } |
| | | |
| | | /** |
| | | * business过程 |
| | | * |
| | | * @param dataFlowContext 上下文对象 |
| | | * @param business 业务对象 |
| | | */ |
| | | @Override |
| | | protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) { |
| | | |
| | | JSONObject data = business.getDatas(); |
| | | |
| | | Assert.notEmpty(data, "没有datas 节点,或没有子节点需要处理"); |
| | | |
| | | //处理 businessComplaint 节点 |
| | | if (data.containsKey("businessComplaint")) { |
| | | //处理 businessComplaint 节点 |
| | | if (data.containsKey("businessComplaint")) { |
| | | Object _obj = data.get("businessComplaint"); |
| | | JSONArray businessComplaints = null; |
| | | if (_obj instanceof JSONObject) { |
| | | businessComplaints = new JSONArray(); |
| | | businessComplaints.add(_obj); |
| | | } else { |
| | | businessComplaints = (JSONArray) _obj; |
| | | } |
| | | //JSONObject businessComplaint = data.getJSONObject("businessComplaint"); |
| | | for (int _complaintIndex = 0; _complaintIndex < businessComplaints.size(); _complaintIndex++) { |
| | | JSONObject businessComplaint = businessComplaints.getJSONObject(_complaintIndex); |
| | | doBusinessComplaint(business, businessComplaint); |
| | | if (_obj instanceof JSONObject) { |
| | | dataFlowContext.addParamOut("complaintId", businessComplaint.getString("complaintId")); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * business to instance 过程 |
| | | * |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) { |
| | | |
| | | JSONObject data = business.getDatas(); |
| | | |
| | | Map info = new HashMap(); |
| | | info.put("bId", business.getbId()); |
| | | info.put("operate", StatusConstant.OPERATE_ADD); |
| | | |
| | | //投诉建议信息 |
| | | List<Map> businessComplaintInfos = complaintServiceDaoImpl.getBusinessComplaintInfo(info); |
| | | if (businessComplaintInfos != null && businessComplaintInfos.size() > 0) { |
| | | for (int _complaintIndex = 0; _complaintIndex < businessComplaintInfos.size(); _complaintIndex++) { |
| | | Map businessComplaintInfo = businessComplaintInfos.get(_complaintIndex); |
| | | flushBusinessComplaintInfo(businessComplaintInfo, StatusConstant.STATUS_CD_VALID); |
| | | complaintServiceDaoImpl.updateComplaintInfoInstance(businessComplaintInfo); |
| | | if (businessComplaintInfo.size() == 1) { |
| | | dataFlowContext.addParamOut("complaintId", businessComplaintInfo.get("complaint_id")); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 撤单 |
| | | * |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doRecover(DataFlowContext dataFlowContext, Business business) { |
| | | |
| | | String bId = business.getbId(); |
| | | //Assert.hasLength(bId,"请求报文中没有包含 bId"); |
| | | Map info = new HashMap(); |
| | | info.put("bId", bId); |
| | | info.put("statusCd", StatusConstant.STATUS_CD_VALID); |
| | | Map delInfo = new HashMap(); |
| | | delInfo.put("bId", business.getbId()); |
| | | delInfo.put("operate", StatusConstant.OPERATE_DEL); |
| | | //投诉建议信息 |
| | | List<Map> complaintInfo = complaintServiceDaoImpl.getComplaintInfo(info); |
| | | if (complaintInfo != null && complaintInfo.size() > 0) { |
| | | |
| | | //投诉建议信息 |
| | | List<Map> businessComplaintInfos = complaintServiceDaoImpl.getBusinessComplaintInfo(delInfo); |
| | | //除非程序出错了,这里不会为空 |
| | | if (businessComplaintInfos == null || businessComplaintInfos.size() == 0) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR, "撤单失败(complaint),程序内部异常,请检查! " + delInfo); |
| | | } |
| | | for (int _complaintIndex = 0; _complaintIndex < businessComplaintInfos.size(); _complaintIndex++) { |
| | | Map businessComplaintInfo = businessComplaintInfos.get(_complaintIndex); |
| | | flushBusinessComplaintInfo(businessComplaintInfo, StatusConstant.STATUS_CD_VALID); |
| | | complaintServiceDaoImpl.updateComplaintInfoInstance(businessComplaintInfo); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 处理 businessComplaint 节点 |
| | | * |
| | | * @param business 总的数据节点 |
| | | * @param businessComplaint 投诉建议节点 |
| | | */ |
| | | private void doBusinessComplaint(Business business, JSONObject businessComplaint) { |
| | | |
| | | Assert.jsonObjectHaveKey(businessComplaint, "complaintId", "businessComplaint 节点下没有包含 complaintId 节点"); |
| | | |
| | | if (businessComplaint.getString("complaintId").startsWith("-")) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR, "complaintId 错误,不能自动生成(必须已经存在的complaintId)" + businessComplaint); |
| | | } |
| | | //自动保存DEL |
| | | autoSaveDelBusinessComplaint(business, businessComplaint); |
| | | |
| | | businessComplaint.put("bId", business.getbId()); |
| | | businessComplaint.put("operate", StatusConstant.OPERATE_ADD); |
| | | //保存投诉建议信息 |
| | | complaintServiceDaoImpl.saveBusinessComplaintInfo(businessComplaint); |
| | | |
| | | } |
| | | |
| | | |
| | | public IComplaintServiceDao getComplaintServiceDaoImpl() { |
| | | return complaintServiceDaoImpl; |
| | | } |
| | | |
| | | public void setComplaintServiceDaoImpl(IComplaintServiceDao complaintServiceDaoImpl) { |
| | | this.complaintServiceDaoImpl = complaintServiceDaoImpl; |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.store.smo.impl; |
| | | |
| | | |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.core.smo.complaint.IComplaintInnerServiceSMO; |
| | | import com.java110.core.smo.user.IUserInnerServiceSMO; |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.dto.complaint.ComplaintDto; |
| | | import com.java110.store.dao.IComplaintServiceDao; |
| | | 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 ComplaintInnerServiceSMOImpl extends BaseServiceSMO implements IComplaintInnerServiceSMO { |
| | | |
| | | @Autowired |
| | | private IComplaintServiceDao complaintServiceDaoImpl; |
| | | |
| | | @Autowired |
| | | private IUserInnerServiceSMO userInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public List<ComplaintDto> queryComplaints(@RequestBody ComplaintDto complaintDto) { |
| | | |
| | | //校验是否传了 分页信息 |
| | | |
| | | int page = complaintDto.getPage(); |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | complaintDto.setPage((page - 1) * complaintDto.getRow()); |
| | | } |
| | | |
| | | List<ComplaintDto> complaints = BeanConvertUtil.covertBeanList(complaintServiceDaoImpl.getComplaintInfo(BeanConvertUtil.beanCovertMap(complaintDto)), ComplaintDto.class); |
| | | |
| | | return complaints; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int queryComplaintsCount(@RequestBody ComplaintDto complaintDto) { |
| | | return complaintServiceDaoImpl.queryComplaintsCount(BeanConvertUtil.beanCovertMap(complaintDto)); |
| | | } |
| | | |
| | | public IComplaintServiceDao getComplaintServiceDaoImpl() { |
| | | return complaintServiceDaoImpl; |
| | | } |
| | | |
| | | public void setComplaintServiceDaoImpl(IComplaintServiceDao complaintServiceDaoImpl) { |
| | | this.complaintServiceDaoImpl = complaintServiceDaoImpl; |
| | | } |
| | | |
| | | public IUserInnerServiceSMO getUserInnerServiceSMOImpl() { |
| | | return userInnerServiceSMOImpl; |
| | | } |
| | | |
| | | public void setUserInnerServiceSMOImpl(IUserInnerServiceSMO userInnerServiceSMOImpl) { |
| | | this.userInnerServiceSMOImpl = userInnerServiceSMOImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.web.components.complaint; |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.web.smo.complaint.IAddComplaintSMO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * 添加投诉建议组件 |
| | | */ |
| | | @Component("addComplaint") |
| | | public class AddComplaintComponent { |
| | | |
| | | @Autowired |
| | | private IAddComplaintSMO addComplaintSMOImpl; |
| | | |
| | | /** |
| | | * 添加投诉建议数据 |
| | | * @param pd 页面数据封装 |
| | | * @return ResponseEntity 对象 |
| | | */ |
| | | public ResponseEntity<String> save(IPageData pd){ |
| | | return addComplaintSMOImpl.saveComplaint(pd); |
| | | } |
| | | |
| | | public IAddComplaintSMO getAddComplaintSMOImpl() { |
| | | return addComplaintSMOImpl; |
| | | } |
| | | |
| | | public void setAddComplaintSMOImpl(IAddComplaintSMO addComplaintSMOImpl) { |
| | | this.addComplaintSMOImpl = addComplaintSMOImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.web.components.complaint; |
| | | |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.web.smo.complaint.IListComplaintsSMO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | |
| | | /** |
| | | * 应用组件管理类 |
| | | * <p> |
| | | * add by wuxw |
| | | * <p> |
| | | * 2019-06-29 |
| | | */ |
| | | @Component("chooseComplaint") |
| | | public class ChooseComplaintComponent { |
| | | |
| | | @Autowired |
| | | private IListComplaintsSMO listComplaintsSMOImpl; |
| | | |
| | | /** |
| | | * 查询应用列表 |
| | | * |
| | | * @param pd 页面数据封装 |
| | | * @return 返回 ResponseEntity 对象 |
| | | */ |
| | | public ResponseEntity<String> list(IPageData pd) { |
| | | return listComplaintsSMOImpl.listComplaints(pd); |
| | | } |
| | | |
| | | public IListComplaintsSMO getListComplaintsSMOImpl() { |
| | | return listComplaintsSMOImpl; |
| | | } |
| | | |
| | | public void setListComplaintsSMOImpl(IListComplaintsSMO listComplaintsSMOImpl) { |
| | | this.listComplaintsSMOImpl = listComplaintsSMOImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.web.components.complaint; |
| | | |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.web.smo.complaint.IListComplaintsSMO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | |
| | | /** |
| | | * 投诉建议组件管理类 |
| | | * <p> |
| | | * add by wuxw |
| | | * <p> |
| | | * 2019-06-29 |
| | | */ |
| | | @Component("complaintManage") |
| | | public class ComplaintManageComponent { |
| | | |
| | | @Autowired |
| | | private IListComplaintsSMO listComplaintsSMOImpl; |
| | | |
| | | /** |
| | | * 查询投诉建议列表 |
| | | * |
| | | * @param pd 页面数据封装 |
| | | * @return 返回 ResponseEntity 对象 |
| | | */ |
| | | public ResponseEntity<String> list(IPageData pd) { |
| | | return listComplaintsSMOImpl.listComplaints(pd); |
| | | } |
| | | |
| | | public IListComplaintsSMO getListComplaintsSMOImpl() { |
| | | return listComplaintsSMOImpl; |
| | | } |
| | | |
| | | public void setListComplaintsSMOImpl(IListComplaintsSMO listComplaintsSMOImpl) { |
| | | this.listComplaintsSMOImpl = listComplaintsSMOImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.web.components.complaint; |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.web.smo.complaint.IDeleteComplaintSMO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * 添加投诉建议组件 |
| | | */ |
| | | @Component("deleteComplaint") |
| | | public class DeleteComplaintComponent { |
| | | |
| | | @Autowired |
| | | private IDeleteComplaintSMO deleteComplaintSMOImpl; |
| | | |
| | | /** |
| | | * 添加投诉建议数据 |
| | | * @param pd 页面数据封装 |
| | | * @return ResponseEntity 对象 |
| | | */ |
| | | public ResponseEntity<String> delete(IPageData pd){ |
| | | return deleteComplaintSMOImpl.deleteComplaint(pd); |
| | | } |
| | | |
| | | public IDeleteComplaintSMO getDeleteComplaintSMOImpl() { |
| | | return deleteComplaintSMOImpl; |
| | | } |
| | | |
| | | public void setDeleteComplaintSMOImpl(IDeleteComplaintSMO deleteComplaintSMOImpl) { |
| | | this.deleteComplaintSMOImpl = deleteComplaintSMOImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.web.components.complaint; |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.web.smo.complaint.IEditComplaintSMO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * 编辑小区组件 |
| | | */ |
| | | @Component("editComplaint") |
| | | public class EditComplaintComponent { |
| | | |
| | | @Autowired |
| | | private IEditComplaintSMO editComplaintSMOImpl; |
| | | |
| | | /** |
| | | * 添加小区数据 |
| | | * @param pd 页面数据封装 |
| | | * @return ResponseEntity 对象 |
| | | */ |
| | | public ResponseEntity<String> update(IPageData pd){ |
| | | return editComplaintSMOImpl.updateComplaint(pd); |
| | | } |
| | | |
| | | public IEditComplaintSMO getEditComplaintSMOImpl() { |
| | | return editComplaintSMOImpl; |
| | | } |
| | | |
| | | public void setEditComplaintSMOImpl(IEditComplaintSMO editComplaintSMOImpl) { |
| | | this.editComplaintSMOImpl = editComplaintSMOImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.web.smo.complaint; |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | /** |
| | | * 添加投诉建议接口 |
| | | * |
| | | * add by wuxw 2019-06-30 |
| | | */ |
| | | public interface IAddComplaintSMO { |
| | | |
| | | /** |
| | | * 添加投诉建议 |
| | | * @param pd 页面数据封装 |
| | | * @return ResponseEntity 对象 |
| | | */ |
| | | ResponseEntity<String> saveComplaint(IPageData pd); |
| | | } |
| New file |
| | |
| | | package com.java110.web.smo.complaint; |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | /** |
| | | * 添加投诉建议接口 |
| | | * |
| | | * add by wuxw 2019-06-30 |
| | | */ |
| | | public interface IDeleteComplaintSMO { |
| | | |
| | | /** |
| | | * 添加投诉建议 |
| | | * @param pd 页面数据封装 |
| | | * @return ResponseEntity 对象 |
| | | */ |
| | | ResponseEntity<String> deleteComplaint(IPageData pd); |
| | | } |
| New file |
| | |
| | | package com.java110.web.smo.complaint; |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | /** |
| | | * 修改投诉建议接口 |
| | | * |
| | | * add by wuxw 2019-06-30 |
| | | */ |
| | | public interface IEditComplaintSMO { |
| | | |
| | | /** |
| | | * 修改小区 |
| | | * @param pd 页面数据封装 |
| | | * @return ResponseEntity 对象 |
| | | */ |
| | | ResponseEntity<String> updateComplaint(IPageData pd); |
| | | } |
| New file |
| | |
| | | package com.java110.web.smo.complaint; |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.utils.exception.SMOException; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | /** |
| | | * 投诉建议管理服务接口类 |
| | | * <p> |
| | | * add by wuxw 2019-06-29 |
| | | */ |
| | | public interface IListComplaintsSMO { |
| | | |
| | | /** |
| | | * 查询投诉建议信息 |
| | | * |
| | | * @param pd 页面数据封装 |
| | | * @return ResponseEntity 对象数据 |
| | | * @throws SMOException 业务代码层 |
| | | */ |
| | | ResponseEntity<String> listComplaints(IPageData pd) throws SMOException; |
| | | } |
| New file |
| | |
| | | package com.java110.web.smo.complaint.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.component.AbstractComponentSMO; |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.utils.constant.PrivilegeCodeConstant; |
| | | import com.java110.utils.constant.ServiceConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.web.smo.complaint.IAddComplaintSMO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 添加小区服务实现类 |
| | | * add by wuxw 2019-06-30 |
| | | */ |
| | | @Service("addComplaintSMOImpl") |
| | | public class AddComplaintSMOImpl extends AbstractComponentSMO implements IAddComplaintSMO { |
| | | |
| | | @Autowired |
| | | private RestTemplate restTemplate; |
| | | |
| | | @Override |
| | | protected void validate(IPageData pd, JSONObject paramIn) { |
| | | |
| | | //super.validatePageInfo(pd); |
| | | |
| | | //Assert.hasKeyAndValue(paramIn, "xxx", "xxx"); |
| | | Assert.hasKeyAndValue(paramIn, "storeId", "必填,请填写商户ID"); |
| | | Assert.hasKeyAndValue(paramIn, "typeCd", "必填,请选择投诉类型"); |
| | | Assert.hasKeyAndValue(paramIn, "roomId", "必填,请选择房屋编号"); |
| | | Assert.hasKeyAndValue(paramIn, "complaintName", "必填,请填写投诉人"); |
| | | Assert.hasKeyAndValue(paramIn, "tel", "必填,请填写投诉电话"); |
| | | Assert.hasKeyAndValue(paramIn, "state", "必填,请填写投诉状态"); |
| | | Assert.hasKeyAndValue(paramIn, "context", "必填,请填写投诉内容"); |
| | | |
| | | |
| | | super.checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.AGENT_HAS_LIST_COMPLAINT); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | protected ResponseEntity<String> doBusinessProcess(IPageData pd, JSONObject paramIn) { |
| | | ResponseEntity<String> responseEntity = null; |
| | | super.validateStoreStaffCommunityRelationship(pd, restTemplate); |
| | | |
| | | responseEntity = this.callCenterService(restTemplate, pd, paramIn.toJSONString(), |
| | | ServiceConstant.SERVICE_API_URL + "/api/complaint.saveComplaint", |
| | | HttpMethod.POST); |
| | | return responseEntity; |
| | | } |
| | | |
| | | @Override |
| | | public ResponseEntity<String> saveComplaint(IPageData pd) { |
| | | return super.businessProcess(pd); |
| | | } |
| | | |
| | | public RestTemplate getRestTemplate() { |
| | | return restTemplate; |
| | | } |
| | | |
| | | public void setRestTemplate(RestTemplate restTemplate) { |
| | | this.restTemplate = restTemplate; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.web.smo.complaint.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.component.AbstractComponentSMO; |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.utils.constant.PrivilegeCodeConstant; |
| | | import com.java110.utils.constant.ServiceConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.web.smo.complaint.IDeleteComplaintSMO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 添加小区服务实现类 |
| | | * delete by wuxw 2019-06-30 |
| | | */ |
| | | @Service("deleteComplaintSMOImpl") |
| | | public class DeleteComplaintSMOImpl extends AbstractComponentSMO implements IDeleteComplaintSMO { |
| | | |
| | | @Autowired |
| | | private RestTemplate restTemplate; |
| | | |
| | | @Override |
| | | protected void validate(IPageData pd, JSONObject paramIn) { |
| | | |
| | | //super.validatePageInfo(pd); |
| | | |
| | | //Assert.hasKeyAndValue(paramIn, "xxx", "xxx"); |
| | | Assert.hasKeyAndValue(paramIn, "complaintId", "投诉ID不能为空"); |
| | | |
| | | |
| | | super.checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.AGENT_HAS_LIST_COMPLAINT); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | protected ResponseEntity<String> doBusinessProcess(IPageData pd, JSONObject paramIn) { |
| | | ResponseEntity<String> responseEntity = null; |
| | | super.validateStoreStaffCommunityRelationship(pd, restTemplate); |
| | | |
| | | responseEntity = this.callCenterService(restTemplate, pd, paramIn.toJSONString(), |
| | | ServiceConstant.SERVICE_API_URL + "/api/complaint.deleteComplaint", |
| | | HttpMethod.POST); |
| | | return responseEntity; |
| | | } |
| | | |
| | | @Override |
| | | public ResponseEntity<String> deleteComplaint(IPageData pd) { |
| | | return super.businessProcess(pd); |
| | | } |
| | | |
| | | public RestTemplate getRestTemplate() { |
| | | return restTemplate; |
| | | } |
| | | |
| | | public void setRestTemplate(RestTemplate restTemplate) { |
| | | this.restTemplate = restTemplate; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.web.smo.complaint.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.component.AbstractComponentSMO; |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.utils.constant.PrivilegeCodeConstant; |
| | | import com.java110.utils.constant.ServiceConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.web.smo.complaint.IEditComplaintSMO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | /** |
| | | * 添加投诉建议服务实现类 |
| | | * add by wuxw 2019-06-30 |
| | | */ |
| | | @Service("eidtComplaintSMOImpl") |
| | | public class EditComplaintSMOImpl extends AbstractComponentSMO implements IEditComplaintSMO { |
| | | |
| | | @Autowired |
| | | private RestTemplate restTemplate; |
| | | |
| | | @Override |
| | | protected void validate(IPageData pd, JSONObject paramIn) { |
| | | |
| | | //super.validatePageInfo(pd); |
| | | |
| | | Assert.hasKeyAndValue(paramIn, "complaintId", "投诉ID不能为空"); |
| | | Assert.hasKeyAndValue(paramIn, "storeId", "必填,请填写商户ID"); |
| | | Assert.hasKeyAndValue(paramIn, "typeCd", "必填,请选择投诉类型"); |
| | | Assert.hasKeyAndValue(paramIn, "roomId", "必填,请选择房屋编号"); |
| | | Assert.hasKeyAndValue(paramIn, "complaintName", "必填,请填写投诉人"); |
| | | Assert.hasKeyAndValue(paramIn, "tel", "必填,请填写投诉电话"); |
| | | Assert.hasKeyAndValue(paramIn, "state", "必填,请填写投诉状态"); |
| | | Assert.hasKeyAndValue(paramIn, "context", "必填,请填写投诉内容"); |
| | | |
| | | |
| | | super.checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.AGENT_HAS_LIST_COMPLAINT); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | protected ResponseEntity<String> doBusinessProcess(IPageData pd, JSONObject paramIn) { |
| | | ResponseEntity<String> responseEntity = null; |
| | | super.validateStoreStaffCommunityRelationship(pd, restTemplate); |
| | | |
| | | responseEntity = this.callCenterService(restTemplate, pd, paramIn.toJSONString(), |
| | | ServiceConstant.SERVICE_API_URL + "/api/complaint.updateComplaint", |
| | | HttpMethod.POST); |
| | | return responseEntity; |
| | | } |
| | | |
| | | @Override |
| | | public ResponseEntity<String> updateComplaint(IPageData pd) { |
| | | return super.businessProcess(pd); |
| | | } |
| | | |
| | | public RestTemplate getRestTemplate() { |
| | | return restTemplate; |
| | | } |
| | | |
| | | public void setRestTemplate(RestTemplate restTemplate) { |
| | | this.restTemplate = restTemplate; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.web.smo.complaint.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.component.AbstractComponentSMO; |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.entity.component.ComponentValidateResult; |
| | | import com.java110.utils.constant.PrivilegeCodeConstant; |
| | | import com.java110.utils.constant.ServiceConstant; |
| | | import com.java110.utils.exception.SMOException; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.web.smo.complaint.IListComplaintsSMO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 查询complaint服务类 |
| | | */ |
| | | @Service("listComplaintsSMOImpl") |
| | | public class ListComplaintsSMOImpl extends AbstractComponentSMO implements IListComplaintsSMO { |
| | | |
| | | @Autowired |
| | | private RestTemplate restTemplate; |
| | | |
| | | @Override |
| | | public ResponseEntity<String> listComplaints(IPageData pd) throws SMOException { |
| | | return businessProcess(pd); |
| | | } |
| | | |
| | | @Override |
| | | protected void validate(IPageData pd, JSONObject paramIn) { |
| | | |
| | | super.validatePageInfo(pd); |
| | | |
| | | super.checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.AGENT_HAS_LIST_COMPLAINT); |
| | | } |
| | | |
| | | @Override |
| | | protected ResponseEntity<String> doBusinessProcess(IPageData pd, JSONObject paramIn) { |
| | | ComponentValidateResult result = super.validateStoreStaffCommunityRelationship(pd, restTemplate); |
| | | |
| | | Map paramMap = BeanConvertUtil.beanCovertMap(result); |
| | | paramIn.putAll(paramMap); |
| | | |
| | | String apiUrl = ServiceConstant.SERVICE_API_URL + "/api/complaint.listComplaints" + mapToUrlParam(paramIn); |
| | | |
| | | |
| | | ResponseEntity<String> responseEntity = this.callCenterService(restTemplate, pd, "", |
| | | apiUrl, |
| | | HttpMethod.GET); |
| | | |
| | | return responseEntity; |
| | | } |
| | | |
| | | public RestTemplate getRestTemplate() { |
| | | return restTemplate; |
| | | } |
| | | |
| | | public void setRestTemplate(RestTemplate restTemplate) { |
| | | this.restTemplate = restTemplate; |
| | | } |
| | | } |
| New file |
| | |
| | | <div id = "addComplaintModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" > |
| | | <div class="modal-dialog modal-lg"> |
| | | <div class="modal-content"> |
| | | <div class="modal-body"> |
| | | <h3 class="m-t-none m-b ">添加投诉建议</h3> |
| | | <div class="ibox-content"> |
| | | <div> |
| | | <div> |
| | | <!--<div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">楼名称</label> |
| | | <div class="col-sm-10"><input v-model="addFloorInfo.name" type="text" placeholder="必填,请填写名称" class="form-control"></div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">楼编号</label> |
| | | <div class="col-sm-10"><input v-model="addFloorInfo.floorNum" type="email" placeholder="必填,请填写编号" class="form-control"></div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">备注</label> |
| | | <div class="col-sm-10"><input v-model="addFloorInfo.remark" type="tel" placeholder="可填,请填写备注" class="form-control"></div> |
| | | </div>--> |
| | | |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">商户ID</label> |
| | | <div class="col-sm-10"> |
| | | <input v-model="addComplaintInfo.storeId" type="text" placeholder="必填,请填写商户ID" class="form-control"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">投诉类型</label> |
| | | <div class="col-sm-10"> |
| | | <select class="custom-select" v-model="addComplaintInfo.typeCd"> |
| | | <option selected disabled value="">必填,请选择投诉类型</option> |
| | | <option value="809001">投诉</option> |
| | | <option value="809002">建议</option> |
| | | </select> </div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">房屋编号</label> |
| | | <div class="col-sm-10"> |
| | | <input v-model="addComplaintInfo.roomId" type="text" placeholder="必填,请填写房屋编号" class="form-control"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">投诉人</label> |
| | | <div class="col-sm-10"> |
| | | <input v-model="addComplaintInfo.complaintName" type="text" placeholder="必填,请填写投诉人" class="form-control"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">投诉电话</label> |
| | | <div class="col-sm-10"> |
| | | <input v-model="addComplaintInfo.tel" type="text" placeholder="必填,请填写投诉电话" class="form-control"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">投诉状态</label> |
| | | <div class="col-sm-10"> |
| | | <input v-model="addComplaintInfo.state" type="text" placeholder="必填,请填写投诉状态" class="form-control"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">投诉内容</label> |
| | | <div class="col-sm-10"> |
| | | <textarea placeholder="必填,请填写投诉内容" class="form-control" v-model="addComplaintInfo.context"></textarea> </div> |
| | | </div> |
| | | |
| | | <div class="ibox-content"> |
| | | <button class="btn btn-primary float-right" type="button" v-on:click="saveComplaintInfo()" ><i class="fa fa-check"></i> 保存</button> |
| | | <button type="button" class="btn btn-warning float-right" style="margin-right:20px;" data-dismiss="modal">取消</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| New file |
| | |
| | | (function(vc){ |
| | | |
| | | vc.extends({ |
| | | propTypes: { |
| | | callBackListener:vc.propTypes.string, //父组件名称 |
| | | callBackFunction:vc.propTypes.string //父组件监听方法 |
| | | }, |
| | | data:{ |
| | | addComplaintInfo:{ |
| | | complaintId:'', |
| | | storeId:'', |
| | | typeCd:'', |
| | | roomId:'', |
| | | complaintName:'', |
| | | tel:'', |
| | | state:'', |
| | | context:'', |
| | | |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | |
| | | }, |
| | | _initEvent:function(){ |
| | | vc.on('addComplaint','openAddComplaintModal',function(){ |
| | | $('#addComplaintModel').modal('show'); |
| | | }); |
| | | }, |
| | | methods:{ |
| | | addComplaintValidate(){ |
| | | return vc.validate.validate({ |
| | | addComplaintInfo:vc.component.addComplaintInfo |
| | | },{ |
| | | 'addComplaintInfo.storeId':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"商户ID不能为空" |
| | | }, |
| | | { |
| | | limit:"num", |
| | | param:"", |
| | | errInfo:"商户ID必须为数字" |
| | | }, |
| | | ], |
| | | 'addComplaintInfo.typeCd':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"投诉类型不能为空" |
| | | }, |
| | | { |
| | | limit:"num", |
| | | param:"", |
| | | errInfo:"投诉类型格式错误" |
| | | }, |
| | | ], |
| | | 'addComplaintInfo.roomId':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"房屋编号不能为空" |
| | | }, |
| | | { |
| | | limit:"num", |
| | | param:"", |
| | | errInfo:"房屋编号格式错误" |
| | | }, |
| | | ], |
| | | 'addComplaintInfo.complaintName':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"投诉人不能为空" |
| | | }, |
| | | { |
| | | limit:"maxLength", |
| | | param:"200", |
| | | errInfo:"投诉人不能大于200位" |
| | | }, |
| | | ], |
| | | 'addComplaintInfo.tel':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"投诉电话不能为空" |
| | | }, |
| | | { |
| | | limit:"phone", |
| | | param:"", |
| | | errInfo:"投诉电话格式错误" |
| | | }, |
| | | ], |
| | | 'addComplaintInfo.state':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"投诉状态不能为空" |
| | | }, |
| | | { |
| | | limit:"num", |
| | | param:"", |
| | | errInfo:"投诉状态格式错误" |
| | | }, |
| | | ], |
| | | 'addComplaintInfo.context':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"投诉内容不能为空" |
| | | }, |
| | | { |
| | | limit:"maxLength", |
| | | param:"4000", |
| | | errInfo:"投诉状态超过4000位" |
| | | }, |
| | | ], |
| | | |
| | | |
| | | |
| | | |
| | | }); |
| | | }, |
| | | saveComplaintInfo:function(){ |
| | | if(!vc.component.addComplaintValidate()){ |
| | | vc.message(vc.validate.errInfo); |
| | | |
| | | return ; |
| | | } |
| | | |
| | | vc.component.addComplaintInfo.communityId = vc.getCurrentCommunity().communityId; |
| | | //不提交数据将数据 回调给侦听处理 |
| | | if(vc.notNull($props.callBackListener)){ |
| | | vc.emit($props.callBackListener,$props.callBackFunction,vc.component.addComplaintInfo); |
| | | $('#addComplaintModel').modal('hide'); |
| | | return ; |
| | | } |
| | | |
| | | vc.http.post( |
| | | 'addComplaint', |
| | | 'save', |
| | | JSON.stringify(vc.component.addComplaintInfo), |
| | | { |
| | | emulateJSON:true |
| | | }, |
| | | function(json,res){ |
| | | //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); |
| | | if(res.status == 200){ |
| | | //关闭model |
| | | $('#addComplaintModel').modal('hide'); |
| | | vc.component.clearAddComplaintInfo(); |
| | | vc.emit('complaintManage','listComplaint',{}); |
| | | |
| | | return ; |
| | | } |
| | | vc.message(json); |
| | | |
| | | }, |
| | | function(errInfo,error){ |
| | | console.log('请求失败处理'); |
| | | |
| | | vc.message(errInfo); |
| | | |
| | | }); |
| | | }, |
| | | clearAddComplaintInfo:function(){ |
| | | vc.component.addComplaintInfo = { |
| | | storeId:'', |
| | | typeCd:'', |
| | | roomId:'', |
| | | complaintName:'', |
| | | tel:'', |
| | | state:'', |
| | | context:'', |
| | | |
| | | }; |
| | | } |
| | | } |
| | | }); |
| | | |
| | | })(window.vc); |
| New file |
| | |
| | | <div id = "chooseComplaintModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="chooseComplaintModelLabel" aria-hidden="true" > |
| | | <div class="modal-dialog modal-lg"> |
| | | <div class="modal-content"> |
| | | <div class="modal-header"> |
| | | <h3 class="modal-title" id="chooseComplaintModelLabel">选择投诉建议</h3> |
| | | <button type="button" class="close" data-dismiss="modal" aria-label="Close"> |
| | | <span aria-hidden="true">×</span> |
| | | </button> |
| | | </div> |
| | | <div class="modal-body"> |
| | | <div class=" row"> |
| | | <div class="col-lg-12"> |
| | | <div class="ibox "> |
| | | <div class="row"> |
| | | |
| | | <div class="col-sm-7 m-b-xs"> |
| | | </div> |
| | | <div class="col-sm-5"> |
| | | <div class="input-group"> |
| | | <input placeholder="输入投诉建议名称" type="text" v-model="chooseComplaintInfo._currentComplaintName" class="form-control form-control-sm"> |
| | | <span class="input-group-append"> |
| | | <button type="button" class="btn btn-sm btn-primary" v-on:click="queryComplaints()">查询</button> |
| | | </span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="table-responsive" style="margin-top:15px"> |
| | | <table class="table table-striped"> |
| | | <thead> |
| | | <tr> |
| | | <th class="text-center">投诉ID</th> |
| | | <th class="text-center">商户ID</th> |
| | | <th class="text-center">投诉类型</th> |
| | | <th class="text-center">房屋编号</th> |
| | | <th class="text-center">投诉人</th> |
| | | <th class="text-center">投诉电话</th> |
| | | <th class="text-center">投诉状态</th> |
| | | <th class="text-center">投诉内容</th> |
| | | <th class="text-center">操作</th> |
| | | |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tr v-for="complaint in chooseComplaintInfo.complaints"> |
| | | <td class="text-center">{{complaint.complaintId}}</td> |
| | | <td class="text-center">{{complaint.storeId}}</td> |
| | | <td class="text-center">{{complaint.typeCd}}</td> |
| | | <td class="text-center">{{complaint.roomId}}</td> |
| | | <td class="text-center">{{complaint.complaintName}}</td> |
| | | <td class="text-center">{{complaint.tel}}</td> |
| | | <td class="text-center">{{complaint.state}}</td> |
| | | <td class="text-center">{{complaint.context}}</td> |
| | | |
| | | <td> |
| | | <button class="btn btn-primary btn-xs" v-on:click="chooseComplaint(complaint)">选择</button> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| New file |
| | |
| | | (function(vc){ |
| | | vc.extends({ |
| | | propTypes: { |
| | | emitChooseComplaint:vc.propTypes.string, |
| | | emitLoadData:vc.propTypes.string |
| | | }, |
| | | data:{ |
| | | chooseComplaintInfo:{ |
| | | complaints:[], |
| | | _currentComplaintName:'', |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | }, |
| | | _initEvent:function(){ |
| | | vc.on('chooseComplaint','openChooseComplaintModel',function(_param){ |
| | | $('#chooseComplaintModel').modal('show'); |
| | | vc.component._refreshChooseComplaintInfo(); |
| | | vc.component._loadAllComplaintInfo(1,10,''); |
| | | }); |
| | | }, |
| | | methods:{ |
| | | _loadAllComplaintInfo:function(_page,_row,_name){ |
| | | var param = { |
| | | params:{ |
| | | page:_page, |
| | | row:_row, |
| | | communityId:vc.getCurrentCommunity().communityId, |
| | | name:_name |
| | | } |
| | | }; |
| | | |
| | | //发送get请求 |
| | | vc.http.get('chooseComplaint', |
| | | 'list', |
| | | param, |
| | | function(json){ |
| | | var _complaintInfo = JSON.parse(json); |
| | | vc.component.chooseComplaintInfo.complaints = _complaintInfo.complaints; |
| | | },function(){ |
| | | console.log('请求失败处理'); |
| | | } |
| | | ); |
| | | }, |
| | | chooseComplaint:function(_complaint){ |
| | | if(_complaint.hasOwnProperty('name')){ |
| | | _complaint.complaintName = _complaint.name; |
| | | } |
| | | vc.emit($props.emitChooseComplaint,'chooseComplaint',_complaint); |
| | | vc.emit($props.emitLoadData,'listComplaintData',{ |
| | | complaintId:_complaint.complaintId |
| | | }); |
| | | $('#chooseComplaintModel').modal('hide'); |
| | | }, |
| | | queryComplaints:function(){ |
| | | vc.component._loadAllComplaintInfo(1,10,vc.component.chooseComplaintInfo._currentComplaintName); |
| | | }, |
| | | _refreshChooseComplaintInfo:function(){ |
| | | vc.component.chooseComplaintInfo._currentComplaintName = ""; |
| | | } |
| | | } |
| | | |
| | | }); |
| | | })(window.vc); |
| New file |
| | |
| | | <div id="component" class="wrapper wrapper-content animated fadeInRight ecommerce"> |
| | | <div class="row"> |
| | | <div class="col-lg-12"> |
| | | <div class="ibox "> |
| | | <div class="ibox-title"> |
| | | <h5>查询条件</h5> |
| | | <div class="ibox-tools" style="top:10px;"> |
| | | <button type="button" class="btn btn-link btn-sm" style="margin-right:10px;" v-on:click="_moreCondition()">{{complaintManageInfo.moreCondition == true?'隐藏':'更多'}}</button> |
| | | </div> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row"> |
| | | <div class="col-sm-4" > |
| | | <div class="form-group"> |
| | | <input type="text" placeholder="请输入投诉ID" v-model="complaintManageInfo.conditions.complaintId" class=" form-control"> |
| | | </div> </div><div class="col-sm-4" > |
| | | <select class="custom-select" v-model="complaintManageInfo.conditions.typeCd"> |
| | | <option selected value="">请选择投诉类型</option> |
| | | <option value="809001">投诉</option> |
| | | <option value="809002">建议</option> |
| | | </select> </div><div class="col-sm-3" > |
| | | <div class="form-group"> |
| | | <input type="text" placeholder="请输入投诉人" v-model="complaintManageInfo.conditions.complaintName" class=" form-control"> |
| | | </div> </div><div class="col-sm-1"> |
| | | <button type="button" class="btn btn-primary btn-sm" v-on:click="_queryComplaintMethod()"> |
| | | <i class="glyphicon glyphicon-search"></i> 查询 |
| | | </button> |
| | | </div></div> |
| | | <div class="row"> |
| | | <div class="col-sm-4" v-if="complaintManageInfo.moreCondition == true"> |
| | | <div class="form-group"> |
| | | <input type="text" placeholder="请输入联系电话" v-model="complaintManageInfo.conditions.tel" class=" form-control"> |
| | | </div> </div><div class="col-sm-4" v-if="complaintManageInfo.moreCondition == true"> |
| | | <div class="form-group"> |
| | | <input type="text" placeholder="请输入房屋编号" v-model="complaintManageInfo.conditions.roomId" class=" form-control"> |
| | | </div> </div><div class="col-sm-3" v-if="complaintManageInfo.moreCondition == true"> |
| | | <select class="custom-select" v-model="complaintManageInfo.conditions.state"> |
| | | <option selected value="">请选择投诉状态</option> |
| | | <option value="1100">派单</option> |
| | | <option value="1200">结单</option> |
| | | </select> </div><div class="col-sm-1"> |
| | | </div></div> |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | <div class="col-lg-12"> |
| | | <div class="ibox"> |
| | | <div class="ibox-title"> |
| | | <h5>投诉建议信息</h5> |
| | | <div class="ibox-tools" style="top:10px;"> |
| | | <button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddComplaintModal()"> |
| | | <i class="glyphicon glyphicon-plus"></i> |
| | | 添加投诉建议 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | |
| | | <table class="footable table table-stripped toggle-arrow-tiny" |
| | | data-page-size="15" |
| | | > |
| | | <thead> |
| | | <tr> |
| | | <th class="text-center">投诉ID</th> |
| | | <th class="text-center">投诉类型</th> |
| | | <th class="text-center">房屋编号</th> |
| | | <th class="text-center">投诉电话</th> |
| | | <th class="text-center">投诉状态</th> |
| | | <th class="text-center">操作</th> |
| | | |
| | | |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tr v-for="complaint in complaintManageInfo.complaints"> |
| | | <td class="text-center">{{complaint.complaintId}}</td> |
| | | <td class="text-center">{{complaint.typeCd}}</td> |
| | | <td class="text-center">{{complaint.roomId}}</td> |
| | | <td class="text-center">{{complaint.tel}}</td> |
| | | <td class="text-center">{{complaint.state}}</td> |
| | | <td class="text-center"><div class="btn-group"> |
| | | <button class="btn-white btn btn-xs" v-on:click="_openEditComplaintModel(complaint)">修改</button> |
| | | </div> |
| | | <div class="btn-group"> |
| | | <button class="btn-white btn btn-xs" v-on:click="_openDeleteComplaintModel(complaint)">删除</button> |
| | | </div></td> |
| | | |
| | | </tr> |
| | | </tbody> |
| | | <tfoot> |
| | | <tr> |
| | | <td colspan="7"> |
| | | <ul class="pagination float-right"></ul> |
| | | </td> |
| | | </tr> |
| | | </tfoot> |
| | | </table> |
| | | <!-- 分页 --> |
| | | <vc:create name="pagination"></vc:create> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | <vc:create name="addComplaint" |
| | | callBackListener="" |
| | | callBackFunction="" |
| | | ></vc:create> |
| | | <vc:create name="editComplaint"></vc:create> |
| | | <vc:create name="deleteComplaint"></vc:create> |
| | | |
| | | </div> |
| New file |
| | |
| | | /** |
| | | 入驻小区 |
| | | **/ |
| | | (function(vc){ |
| | | var DEFAULT_PAGE = 1; |
| | | var DEFAULT_ROWS = 10; |
| | | vc.extends({ |
| | | data:{ |
| | | complaintManageInfo:{ |
| | | complaints:[], |
| | | total:0, |
| | | records:1, |
| | | moreCondition:false, |
| | | complaintName:'', |
| | | conditions:{ |
| | | complaintId:'', |
| | | typeCd:'', |
| | | complaintName:'', |
| | | tel:'', |
| | | roomId:'', |
| | | state:'', |
| | | |
| | | } |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | vc.component._listComplaints(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | }, |
| | | _initEvent:function(){ |
| | | |
| | | vc.on('complaintManage','listComplaint',function(_param){ |
| | | vc.component._listComplaints(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | }); |
| | | vc.on('pagination','page_event',function(_currentPage){ |
| | | vc.component._listComplaints(_currentPage,DEFAULT_ROWS); |
| | | }); |
| | | }, |
| | | methods:{ |
| | | _listComplaints:function(_page, _rows){ |
| | | |
| | | vc.component.complaintManageInfo.conditions.page = _page; |
| | | vc.component.complaintManageInfo.conditions.row = _rows; |
| | | var param = { |
| | | params:vc.component.complaintManageInfo.conditions |
| | | }; |
| | | |
| | | //发送get请求 |
| | | vc.http.get('complaintManage', |
| | | 'list', |
| | | param, |
| | | function(json,res){ |
| | | var _complaintManageInfo=JSON.parse(json); |
| | | vc.component.complaintManageInfo.total = _complaintManageInfo.total; |
| | | vc.component.complaintManageInfo.records = _complaintManageInfo.records; |
| | | vc.component.complaintManageInfo.complaints = _complaintManageInfo.complaints; |
| | | vc.emit('pagination','init',{ |
| | | total:vc.component.complaintManageInfo.records, |
| | | currentPage:_page |
| | | }); |
| | | },function(errInfo,error){ |
| | | console.log('请求失败处理'); |
| | | } |
| | | ); |
| | | }, |
| | | _openAddComplaintModal:function(){ |
| | | vc.emit('addComplaint','openAddComplaintModal',{}); |
| | | }, |
| | | _openEditComplaintModel:function(_complaint){ |
| | | vc.emit('editComplaint','openEditComplaintModal',_complaint); |
| | | }, |
| | | _openDeleteComplaintModel:function(_complaint){ |
| | | vc.emit('deleteComplaint','openDeleteComplaintModal',_complaint); |
| | | }, |
| | | _queryComplaintMethod:function(){ |
| | | vc.component._listComplaints(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | |
| | | }, |
| | | _moreCondition:function(){ |
| | | if(vc.component.complaintManageInfo.moreCondition){ |
| | | vc.component.complaintManageInfo.moreCondition = false; |
| | | }else{ |
| | | vc.component.complaintManageInfo.moreCondition = true; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | }); |
| | | })(window.vc); |
| New file |
| | |
| | | <div class="modal fade" id="deleteComplaintModel" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> |
| | | <div class="modal-dialog" role="document"> |
| | | <div class="modal-content"> |
| | | <div class="modal-header"> |
| | | <h5 class="modal-title" id="exampleModalLabel">请确认您的操作!</h5> |
| | | <button type="button" class="close" data-dismiss="modal" aria-label="Close"> |
| | | <span aria-hidden="true">×</span> |
| | | </button> |
| | | </div> |
| | | <div class="modal-body"> |
| | | <tr align="center"><th>确定删除投诉建议</th></tr> |
| | | </div> |
| | | <div class="modal-footer"> |
| | | <button type="button" class="btn btn-secondary" data-dismiss="modal" v-on:click="closeDeleteComplaintModel()">点错了</button> |
| | | <button type="button" class="btn btn-primary" v-on:click="deleteComplaint()">确认删除</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| New file |
| | |
| | | (function(vc,vm){ |
| | | |
| | | vc.extends({ |
| | | data:{ |
| | | deleteComplaintInfo:{ |
| | | |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | |
| | | }, |
| | | _initEvent:function(){ |
| | | vc.on('deleteComplaint','openDeleteComplaintModal',function(_params){ |
| | | |
| | | vc.component.deleteComplaintInfo = _params; |
| | | $('#deleteComplaintModel').modal('show'); |
| | | |
| | | }); |
| | | }, |
| | | methods:{ |
| | | deleteComplaint:function(){ |
| | | vc.component.deleteComplaintInfo.communityId=vc.getCurrentCommunity().communityId; |
| | | vc.http.post( |
| | | 'deleteComplaint', |
| | | 'delete', |
| | | JSON.stringify(vc.component.deleteComplaintInfo), |
| | | { |
| | | emulateJSON:true |
| | | }, |
| | | function(json,res){ |
| | | //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); |
| | | if(res.status == 200){ |
| | | //关闭model |
| | | $('#deleteComplaintModel').modal('hide'); |
| | | vc.emit('complaintManage','listComplaint',{}); |
| | | return ; |
| | | } |
| | | vc.message(json); |
| | | }, |
| | | function(errInfo,error){ |
| | | console.log('请求失败处理'); |
| | | vc.message(json); |
| | | |
| | | }); |
| | | }, |
| | | closeDeleteComplaintModel:function(){ |
| | | $('#deleteComplaintModel').modal('hide'); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | })(window.vc,window.vc.component); |
| New file |
| | |
| | | <div id = "editComplaintModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" > |
| | | <div class="modal-dialog modal-lg"> |
| | | <div class="modal-content"> |
| | | <div class="modal-body"> |
| | | <h3 class="m-t-none m-b ">修改投诉建议</h3> |
| | | <div class="ibox-content"> |
| | | <div> |
| | | <div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">商户ID</label> |
| | | <div class="col-sm-10"> |
| | | <input v-model="editComplaintInfo.storeId" type="text" placeholder="必填,请填写商户ID" class="form-control"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">投诉类型</label> |
| | | <div class="col-sm-10"> |
| | | <select class="custom-select" v-model="editComplaintInfo.typeCd"> |
| | | <option selected disabled value="">必填,请选择投诉类型</option> |
| | | <option value="809001">投诉</option> |
| | | <option value="809002">建议</option> |
| | | </select> </div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">房屋编号</label> |
| | | <div class="col-sm-10"> |
| | | <input v-model="editComplaintInfo.roomId" type="text" placeholder="必填,请填写房屋编号" class="form-control"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">投诉人</label> |
| | | <div class="col-sm-10"> |
| | | <input v-model="editComplaintInfo.complaintName" type="text" placeholder="必填,请填写投诉人" class="form-control"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">投诉电话</label> |
| | | <div class="col-sm-10"> |
| | | <input v-model="editComplaintInfo.tel" type="text" placeholder="必填,请填写投诉电话" class="form-control"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">投诉状态</label> |
| | | <div class="col-sm-10"> |
| | | <input v-model="editComplaintInfo.state" type="text" placeholder="必填,请填写投诉状态" class="form-control"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">投诉内容</label> |
| | | <div class="col-sm-10"> |
| | | <textarea placeholder="必填,请填写投诉内容" class="form-control" v-model="editComplaintInfo.context"></textarea> </div> |
| | | </div> |
| | | |
| | | <div class="ibox-content"> |
| | | <button class="btn btn-primary float-right" type="button" v-on:click="editComplaint()" ><i class="fa fa-check"></i> 保存</button> |
| | | <button type="button" class="btn btn-warning float-right" style="margin-right:20px;" data-dismiss="modal">取消</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| New file |
| | |
| | | (function(vc,vm){ |
| | | |
| | | vc.extends({ |
| | | data:{ |
| | | editComplaintInfo:{ |
| | | complaintId:'', |
| | | storeId:'', |
| | | typeCd:'', |
| | | roomId:'', |
| | | complaintName:'', |
| | | tel:'', |
| | | state:'', |
| | | context:'', |
| | | |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | |
| | | }, |
| | | _initEvent:function(){ |
| | | vc.on('editComplaint','openEditComplaintModal',function(_params){ |
| | | vc.component.refreshEditComplaintInfo(); |
| | | $('#editComplaintModel').modal('show'); |
| | | vc.copyObject(_params, vc.component.editComplaintInfo ); |
| | | vc.component.editComplaintInfo.communityId = vc.getCurrentCommunity().communityId; |
| | | }); |
| | | }, |
| | | methods:{ |
| | | editComplaintValidate:function(){ |
| | | return vc.validate.validate({ |
| | | editComplaintInfo:vc.component.editComplaintInfo |
| | | },{ |
| | | 'editComplaintInfo.storeId':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"商户ID不能为空" |
| | | }, |
| | | { |
| | | limit:"num", |
| | | param:"", |
| | | errInfo:"商户ID必须为数字" |
| | | }, |
| | | ], |
| | | 'editComplaintInfo.typeCd':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"投诉类型不能为空" |
| | | }, |
| | | { |
| | | limit:"num", |
| | | param:"", |
| | | errInfo:"投诉类型格式错误" |
| | | }, |
| | | ], |
| | | 'editComplaintInfo.roomId':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"房屋编号不能为空" |
| | | }, |
| | | { |
| | | limit:"num", |
| | | param:"", |
| | | errInfo:"房屋编号格式错误" |
| | | }, |
| | | ], |
| | | 'editComplaintInfo.complaintName':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"投诉人不能为空" |
| | | }, |
| | | { |
| | | limit:"maxLength", |
| | | param:"200", |
| | | errInfo:"投诉人不能大于200位" |
| | | }, |
| | | ], |
| | | 'editComplaintInfo.tel':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"投诉电话不能为空" |
| | | }, |
| | | { |
| | | limit:"phone", |
| | | param:"", |
| | | errInfo:"投诉电话格式错误" |
| | | }, |
| | | ], |
| | | 'editComplaintInfo.state':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"投诉状态不能为空" |
| | | }, |
| | | { |
| | | limit:"num", |
| | | param:"", |
| | | errInfo:"投诉状态格式错误" |
| | | }, |
| | | ], |
| | | 'editComplaintInfo.context':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"投诉内容不能为空" |
| | | }, |
| | | { |
| | | limit:"maxLength", |
| | | param:"4000", |
| | | errInfo:"投诉状态超过4000位" |
| | | }, |
| | | ], |
| | | 'editComplaintInfo.complaintId':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"投诉ID不能为空" |
| | | }] |
| | | |
| | | }); |
| | | }, |
| | | editComplaint:function(){ |
| | | if(!vc.component.editComplaintValidate()){ |
| | | vc.message(vc.validate.errInfo); |
| | | return ; |
| | | } |
| | | |
| | | vc.http.post( |
| | | 'editComplaint', |
| | | 'update', |
| | | JSON.stringify(vc.component.editComplaintInfo), |
| | | { |
| | | emulateJSON:true |
| | | }, |
| | | function(json,res){ |
| | | //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); |
| | | if(res.status == 200){ |
| | | //关闭model |
| | | $('#editComplaintModel').modal('hide'); |
| | | vc.emit('complaintManage','listComplaint',{}); |
| | | return ; |
| | | } |
| | | vc.message(json); |
| | | }, |
| | | function(errInfo,error){ |
| | | console.log('请求失败处理'); |
| | | |
| | | vc.message(errInfo); |
| | | }); |
| | | }, |
| | | refreshEditComplaintInfo:function(){ |
| | | vc.component.editComplaintInfo= { |
| | | complaintId:'', |
| | | storeId:'', |
| | | typeCd:'', |
| | | roomId:'', |
| | | complaintName:'', |
| | | tel:'', |
| | | state:'', |
| | | context:'', |
| | | |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | |
| | | })(window.vc,window.vc.component); |
| New file |
| | |
| | | <div class="row"> |
| | | <div class="col-lg-12"> |
| | | <div class="ibox "> |
| | | <div class="ibox-title"> |
| | | <h5>投诉建议信息</h5> |
| | | <div class="ibox-tools" style="top:10px;"> |
| | | <button type="button" v-if="viewComplaintInfo.index != 2" class="btn btn-primary btn-sm" style="margin-right:10px;" v-on:click="_openSelectComplaintInfoModel()"> |
| | | <i class="glyphicon glyphicon-search"></i> 选择投诉建议</button> |
| | | |
| | | <button type="button" v-if="viewComplaintInfo.index != 2" class="btn btn-primary btn-sm" v-on:click="_openAddComplaintInfoModel()"> |
| | | <i class="glyphicon glyphicon-plus"></i> 添加投诉建议</button> |
| | | </div> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row"> |
| | | <div class="col-sm-4"> |
| | | <div class="form-group"> |
| | | <label class="col-form-label" >商户ID:</label> |
| | | <label class="">{{viewComplaintInfo.storeId}}</label> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-4"> |
| | | <div class="form-group"> |
| | | <label class="col-form-label" >投诉类型:</label> |
| | | <label class="">{{viewComplaintInfo.typeCd}}</label> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-4"> |
| | | <div class="form-group"> |
| | | <label class="col-form-label" >房屋编号:</label> |
| | | <label class="">{{viewComplaintInfo.roomId}}</label> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | <div class="col-sm-4"> |
| | | <div class="form-group"> |
| | | <label class="col-form-label" >投诉人:</label> |
| | | <label class="">{{viewComplaintInfo.complaintName}}</label> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-4"> |
| | | <div class="form-group"> |
| | | <label class="col-form-label" >投诉电话:</label> |
| | | <label class="">{{viewComplaintInfo.tel}}</label> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-4"> |
| | | <div class="form-group"> |
| | | <label class="col-form-label" >投诉状态:</label> |
| | | <label class="">{{viewComplaintInfo.state}}</label> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | <div class="col-sm-4"> |
| | | <div class="form-group"> |
| | | <label class="col-form-label" >投诉内容:</label> |
| | | <label class="">{{viewComplaintInfo.context}}</label> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <vc:create name="addComplaint" |
| | | callBackListener="viewComplaintInfo" |
| | | callBackFunction="chooseComplaint" |
| | | ></vc:create> |
| | | |
| | | |
| | | <vc:create name="chooseComplaint" |
| | | emitChooseComplaint="viewComplaintInfo" |
| | | emitLoadData="viewComplaintInfo" |
| | | ></vc:create> |
| | | </div> |
| New file |
| | |
| | | /** |
| | | 投诉建议 组件 |
| | | **/ |
| | | (function(vc){ |
| | | |
| | | vc.extends({ |
| | | propTypes: { |
| | | callBackListener:vc.propTypes.string, //父组件名称 |
| | | callBackFunction:vc.propTypes.string //父组件监听方法 |
| | | }, |
| | | data:{ |
| | | viewComplaintInfo:{ |
| | | index:0, |
| | | flowComponent:'viewComplaintInfo', |
| | | storeId:'', |
| | | typeCd:'', |
| | | roomId:'', |
| | | complaintName:'', |
| | | tel:'', |
| | | state:'', |
| | | context:'', |
| | | |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | //根据请求参数查询 查询 业主信息 |
| | | vc.component._loadComplaintInfoData(); |
| | | }, |
| | | _initEvent:function(){ |
| | | vc.on('viewComplaintInfo','chooseComplaint',function(_app){ |
| | | vc.copyObject(_app, vc.component.viewComplaintInfo); |
| | | vc.emit($props.callBackListener,$props.callBackFunction,vc.component.viewComplaintInfo); |
| | | }); |
| | | |
| | | vc.on('viewComplaintInfo', 'onIndex', function(_index){ |
| | | vc.component.viewComplaintInfo.index = _index; |
| | | }); |
| | | |
| | | }, |
| | | methods:{ |
| | | |
| | | _openSelectComplaintInfoModel(){ |
| | | vc.emit('chooseComplaint','openChooseComplaintModel',{}); |
| | | }, |
| | | _openAddComplaintInfoModel(){ |
| | | vc.emit('addComplaint','openAddComplaintModal',{}); |
| | | }, |
| | | _loadComplaintInfoData:function(){ |
| | | |
| | | } |
| | | } |
| | | }); |
| | | |
| | | })(window.vc); |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en" |
| | | xmlns="http://www.w3.org/1999/xhtml" |
| | | xmlns:th="http://www.thymeleaf.org" |
| | | xmlns:vc="http://www.thymeleaf.org"> |
| | | <head> |
| | | <meta charset="UTF-8"/> |
| | | <title>投诉建议初始化|java110</title> |
| | | <vc:create name="commonTop"></vc:create> |
| | | </head> |
| | | <body> |
| | | <vc:create name="bodyTop"></vc:create> |
| | | <div id="wrapper"> |
| | | <vc:create name="menu"></vc:create> |
| | | |
| | | |
| | | <div id="page-wrapper" class="gray-bg dashbard-1"> |
| | | <div class="row border-bottom"> |
| | | <vc:create name="nav"></vc:create> |
| | | </div> |
| | | <div class="wrapper wrapper-content" style="padding-bottom: 0px;"> |
| | | <vc:create name="breadcrumb"></vc:create> |
| | | </div> |
| | | <!-- id="component" --> |
| | | <div class="wrapper wrapper-content animated fadeInRight"> |
| | | <vc:create name="complaintManage"></vc:create> |
| | | </div> |
| | | |
| | | <vc:create name="copyright"></vc:create> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <vc:create name="commonBottom"></vc:create> |
| | | </body> |
| | | </html> |
| New file |
| | |
| | | |
| | | |
| | | **1\. 删除投诉建议** |
| | | ###### 接口功能 |
| | | > API服务做删除投诉建议时调用该接口 |
| | | |
| | | ###### URL |
| | | > [http://complaint-service/complaintApi/service](http://complaint-service/complaintApi/service) |
| | | |
| | | ###### 支持格式 |
| | | > JSON |
| | | |
| | | ###### HTTP请求方式 |
| | | > POST |
| | | |
| | | ###### 协议接口 |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-:| |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |-|business|1|Array|-|业务节点|-| |
| | | |
| | | ###### orders |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |orders|appId|1|String|10|系统ID|由中心服务提供| |
| | | |orders|transactionId|1|String|30|交互流水|appId+'00'+YYYYMMDD+10位序列| |
| | | |orders|userId|1|String|30|用户ID|已有用户ID| |
| | | |orders|orderTypeCd|1|String|4|订单类型|查看订单类型说明| |
| | | |orders|requestTime|1|String|14|请求时间|YYYYMMDDhhmmss| |
| | | |orders|remark|1|String|200|备注|备注| |
| | | |orders|sign|?|String|64|签名|查看加密说明| |
| | | |orders|attrs|?|Array|-|订单属性|-| |
| | | |attrs|specCd|1|String|12|规格编码|由中心服务提供| |
| | | |attrs|value|1|String|50|属性值|-| |
| | | |orders|response|1|Object|-|返回结果节点|-| |
| | | |response|code|1|String|4|返回状态|查看状态说明| |
| | | |response|message|1|String|200|返回状态描述|-| |
| | | |
| | | ###### business |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|business|?|Array|-|业务节点|-| |
| | | |business|businessTypeCd|1|String|12|业务类型编码|500100030002| |
| | | |business|datas|1|Object|-|数据节点|不同的服务下的节点不一样| |
| | | |datas|businessComplaintInfo|1|Object|-|小区成员|小区成员| |
| | | |businessComplaintInfo|complaintId|1|String|30|-|-| |
| | | |
| | | |
| | | ###### 返回协议 |
| | | |
| | | 当http返回状态不为200 时请求处理失败 body内容为失败的原因 |
| | | |
| | | 当http返回状态为200时请求处理成功,body内容为返回内容, |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | ###### 举例 |
| | | > 地址:[http://complaint-service/complaintApi/service](http://complaint-service/complaintApi/service) |
| | | |
| | | ``` javascript |
| | | 请求头信息: |
| | | Content-Type:application/json |
| | | |
| | | 请求报文: |
| | | |
| | | { |
| | | "orders": { |
| | | "appId": "外系统ID,分配得到", |
| | | "transactionId": "100000000020180409224736000001", |
| | | "userId": "用户ID", |
| | | "orderTypeCd": "订单类型,查询,受理", |
| | | "requestTime": "20180409224736", |
| | | "remark": "备注", |
| | | "sign": "这个服务是否要求MD5签名", |
| | | "businessType":"I", |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | }, |
| | | "business": { |
| | | "businessTypeCd": "190200050001", |
| | | "bId":"1234567892", |
| | | "remark": "备注", |
| | | "datas": { |
| | | "businessComplaintInfo": { |
| | | "complaintId":"填写存在的值" |
| | | } |
| | | }, |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | } |
| | | } |
| | | |
| | | 返回报文: |
| | | { |
| | | "orderTypeCd": "D", |
| | | "response": { |
| | | "code": "0000", |
| | | "message": "成功" |
| | | }, |
| | | "responseTime": "20190418102004", |
| | | "bId": "202019041810750003", |
| | | "businessType": "B", |
| | | "transactionId": "3a5a411ec65a4c3f895935638aa1d2bc", |
| | | "dataFlowId": "44fde86d39ce46f4b4aab5f6b14f3947" |
| | | } |
| | | |
| | | ``` |
| New file |
| | |
| | | |
| | | |
| | | **1\. 保存投诉建议** |
| | | ###### 接口功能 |
| | | > API服务做保存投诉建议时调用该接口 |
| | | |
| | | ###### URL |
| | | > [http://complaint-service/complaintApi/service](http://complaint-service/complaintApi/service) |
| | | |
| | | ###### 支持格式 |
| | | > JSON |
| | | |
| | | ###### HTTP请求方式 |
| | | > POST |
| | | |
| | | ###### 协议接口 |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-:| |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |-|business|1|Array|-|业务节点|-| |
| | | |
| | | ###### orders |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |orders|appId|1|String|10|系统ID|由中心服务提供| |
| | | |orders|transactionId|1|String|30|交互流水|appId+'00'+YYYYMMDD+10位序列| |
| | | |orders|userId|1|String|30|用户ID|已有用户ID| |
| | | |orders|orderTypeCd|1|String|4|订单类型|查看订单类型说明| |
| | | |orders|requestTime|1|String|14|请求时间|YYYYMMDDhhmmss| |
| | | |orders|remark|1|String|200|备注|备注| |
| | | |orders|sign|?|String|64|签名|查看加密说明| |
| | | |orders|attrs|?|Array|-|订单属性|-| |
| | | |attrs|specCd|1|String|12|规格编码|由中心服务提供| |
| | | |attrs|value|1|String|50|属性值|-| |
| | | |orders|response|1|Object|-|返回结果节点|-| |
| | | |response|code|1|String|4|返回状态|查看状态说明| |
| | | |response|message|1|String|200|返回状态描述|-| |
| | | |
| | | ###### business |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|business|?|Array|-|业务节点|-| |
| | | |business|businessTypeCd|1|String|12|业务类型编码|500100030002| |
| | | |business|datas|1|Object|-|数据节点|不同的服务下的节点不一样| |
| | | |datas|businessComplaintInfo|1|Object|-|小区成员|小区成员| |
| | | |businessComplaintInfo|complaintId|1|String|30|-|-| |
| | | |businessComplaintInfo|typeCd|1|String|30|-|-| |
| | | |businessComplaintInfo|context|1|String|30|-|-| |
| | | |businessComplaintInfo|complaintName|1|String|30|-|-| |
| | | |businessComplaintInfo|tel|1|String|30|-|-| |
| | | |businessComplaintInfo|state|1|String|30|-|-| |
| | | |businessComplaintInfo|storeId|1|String|30|-|-| |
| | | |businessComplaintInfo|roomId|1|String|30|-|-| |
| | | |
| | | |
| | | ###### 返回协议 |
| | | |
| | | 当http返回状态不为200 时请求处理失败 body内容为失败的原因 |
| | | |
| | | 当http返回状态为200时请求处理成功,body内容为返回内容, |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | ###### 举例 |
| | | > 地址:[http://complaint-service/complaintApi/service](http://complaint-service/complaintApi/service) |
| | | |
| | | ``` javascript |
| | | 请求头信息: |
| | | Content-Type:application/json |
| | | |
| | | 请求报文: |
| | | |
| | | { |
| | | "orders": { |
| | | "appId": "外系统ID,分配得到", |
| | | "transactionId": "100000000020180409224736000001", |
| | | "userId": "用户ID", |
| | | "orderTypeCd": "订单类型,查询,受理", |
| | | "requestTime": "20180409224736", |
| | | "remark": "备注", |
| | | "sign": "这个服务是否要求MD5签名", |
| | | "businessType":"I", |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | }, |
| | | "business": { |
| | | "businessTypeCd": "190200030001", |
| | | "bId":"1234567892", |
| | | "remark": "备注", |
| | | "datas": { |
| | | "businessComplaintInfo": { |
| | | "complaintId":"填写具体值", |
| | | "typeCd":"填写具体值", |
| | | "context":"填写具体值", |
| | | "complaintName":"填写具体值", |
| | | "tel":"填写具体值", |
| | | "state":"填写具体值", |
| | | "storeId":"填写具体值", |
| | | "roomId":"填写具体值" |
| | | } |
| | | }, |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | } |
| | | } |
| | | |
| | | 返回报文: |
| | | { |
| | | "orderTypeCd": "D", |
| | | "response": { |
| | | "code": "0000", |
| | | "message": "成功" |
| | | }, |
| | | "responseTime": "20190418102004", |
| | | "bId": "202019041810750003", |
| | | "businessType": "B", |
| | | "transactionId": "3a5a411ec65a4c3f895935638aa1d2bc", |
| | | "dataFlowId": "44fde86d39ce46f4b4aab5f6b14f3947" |
| | | } |
| | | |
| | | ``` |
| New file |
| | |
| | | |
| | | |
| | | **1\. 修改投诉建议** |
| | | ###### 接口功能 |
| | | > API服务做修改投诉建议时调用该接口 |
| | | |
| | | ###### URL |
| | | > [http://complaint-service/complaintApi/service](http://complaint-service/complaintApi/service) |
| | | |
| | | ###### 支持格式 |
| | | > JSON |
| | | |
| | | ###### HTTP请求方式 |
| | | > POST |
| | | |
| | | ###### 协议接口 |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-:| |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |-|business|1|Array|-|业务节点|-| |
| | | |
| | | ###### orders |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |orders|appId|1|String|10|系统ID|由中心服务提供| |
| | | |orders|transactionId|1|String|30|交互流水|appId+'00'+YYYYMMDD+10位序列| |
| | | |orders|userId|1|String|30|用户ID|已有用户ID| |
| | | |orders|orderTypeCd|1|String|4|订单类型|查看订单类型说明| |
| | | |orders|requestTime|1|String|14|请求时间|YYYYMMDDhhmmss| |
| | | |orders|remark|1|String|200|备注|备注| |
| | | |orders|sign|?|String|64|签名|查看加密说明| |
| | | |orders|attrs|?|Array|-|订单属性|-| |
| | | |attrs|specCd|1|String|12|规格编码|由中心服务提供| |
| | | |attrs|value|1|String|50|属性值|-| |
| | | |orders|response|1|Object|-|返回结果节点|-| |
| | | |response|code|1|String|4|返回状态|查看状态说明| |
| | | |response|message|1|String|200|返回状态描述|-| |
| | | |
| | | ###### business |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|business|?|Array|-|业务节点|-| |
| | | |business|businessTypeCd|1|String|12|业务类型编码|500100030002| |
| | | |business|datas|1|Object|-|数据节点|不同的服务下的节点不一样| |
| | | |datas|businessComplaintInfo|1|Object|-|小区成员|小区成员| |
| | | |businessComplaintInfo|complaintId|1|String|30|-|-| |
| | | |businessComplaintInfo|typeCd|1|String|30|-|-| |
| | | |businessComplaintInfo|context|1|String|30|-|-| |
| | | |businessComplaintInfo|complaintName|1|String|30|-|-| |
| | | |businessComplaintInfo|tel|1|String|30|-|-| |
| | | |businessComplaintInfo|state|1|String|30|-|-| |
| | | |businessComplaintInfo|storeId|1|String|30|-|-| |
| | | |businessComplaintInfo|roomId|1|String|30|-|-| |
| | | |
| | | |
| | | ###### 返回协议 |
| | | |
| | | 当http返回状态不为200 时请求处理失败 body内容为失败的原因 |
| | | |
| | | 当http返回状态为200时请求处理成功,body内容为返回内容, |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | ###### 举例 |
| | | > 地址:[http://complaint-service/complaintApi/service](http://complaint-service/complaintApi/service) |
| | | |
| | | ``` javascript |
| | | 请求头信息: |
| | | Content-Type:application/json |
| | | |
| | | 请求报文: |
| | | |
| | | { |
| | | "orders": { |
| | | "appId": "外系统ID,分配得到", |
| | | "transactionId": "100000000020180409224736000001", |
| | | "userId": "用户ID", |
| | | "orderTypeCd": "订单类型,查询,受理", |
| | | "requestTime": "20180409224736", |
| | | "remark": "备注", |
| | | "sign": "这个服务是否要求MD5签名", |
| | | "businessType":"I", |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | }, |
| | | "business": { |
| | | "businessTypeCd": "190200040001", |
| | | "bId":"1234567892", |
| | | "remark": "备注", |
| | | "datas": { |
| | | "businessComplaintInfo": { |
| | | "complaintId":"填写具体值", |
| | | "typeCd":"填写具体值", |
| | | "context":"填写具体值", |
| | | "complaintName":"填写具体值", |
| | | "tel":"填写具体值", |
| | | "state":"填写具体值", |
| | | "storeId":"填写具体值", |
| | | "roomId":"填写具体值" |
| | | } |
| | | }, |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | } |
| | | } |
| | | |
| | | 返回报文: |
| | | { |
| | | "orderTypeCd": "D", |
| | | "response": { |
| | | "code": "0000", |
| | | "message": "成功" |
| | | }, |
| | | "responseTime": "20190418102004", |
| | | "bId": "202019041810750003", |
| | | "businessType": "B", |
| | | "transactionId": "3a5a411ec65a4c3f895935638aa1d2bc", |
| | | "dataFlowId": "44fde86d39ce46f4b4aab5f6b14f3947" |
| | | } |
| | | |
| | | ``` |
| New file |
| | |
| | | package com.java110.dto.complaint; |
| | | |
| | | 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 ComplaintDto extends PageDto implements Serializable { |
| | | |
| | | private String complaintId; |
| | | private String typeCd; |
| | | private String context; |
| | | private String complaintName; |
| | | private String tel; |
| | | private String state; |
| | | private String storeId; |
| | | private String roomId; |
| | | |
| | | |
| | | private Date createTime; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | |
| | | public String getComplaintId() { |
| | | return complaintId; |
| | | } |
| | | |
| | | public void setComplaintId(String complaintId) { |
| | | this.complaintId = complaintId; |
| | | } |
| | | |
| | | public String getTypeCd() { |
| | | return typeCd; |
| | | } |
| | | |
| | | public void setTypeCd(String typeCd) { |
| | | this.typeCd = typeCd; |
| | | } |
| | | |
| | | public String getContext() { |
| | | return context; |
| | | } |
| | | |
| | | public void setContext(String context) { |
| | | this.context = context; |
| | | } |
| | | |
| | | public String getComplaintName() { |
| | | return complaintName; |
| | | } |
| | | |
| | | public void setComplaintName(String complaintName) { |
| | | this.complaintName = complaintName; |
| | | } |
| | | |
| | | public String getTel() { |
| | | return tel; |
| | | } |
| | | |
| | | public void setTel(String tel) { |
| | | this.tel = tel; |
| | | } |
| | | |
| | | public String getState() { |
| | | return state; |
| | | } |
| | | |
| | | public void setState(String state) { |
| | | this.state = state; |
| | | } |
| | | |
| | | 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.vo.api.complaint; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | public class ApiComplaintDataVo implements Serializable { |
| | | |
| | | private String complaintId; |
| | | private String storeId; |
| | | private String typeCd; |
| | | private String roomId; |
| | | private String complaintName; |
| | | private String tel; |
| | | private String state; |
| | | private String context; |
| | | public String getComplaintId() { |
| | | return complaintId; |
| | | } |
| | | public void setComplaintId(String complaintId) { |
| | | this.complaintId = complaintId; |
| | | } |
| | | public String getStoreId() { |
| | | return storeId; |
| | | } |
| | | public void setStoreId(String storeId) { |
| | | this.storeId = storeId; |
| | | } |
| | | public String getTypeCd() { |
| | | return typeCd; |
| | | } |
| | | public void setTypeCd(String typeCd) { |
| | | this.typeCd = typeCd; |
| | | } |
| | | public String getRoomId() { |
| | | return roomId; |
| | | } |
| | | public void setRoomId(String roomId) { |
| | | this.roomId = roomId; |
| | | } |
| | | public String getComplaintName() { |
| | | return complaintName; |
| | | } |
| | | public void setComplaintName(String complaintName) { |
| | | this.complaintName = complaintName; |
| | | } |
| | | public String getTel() { |
| | | return tel; |
| | | } |
| | | public void setTel(String tel) { |
| | | this.tel = tel; |
| | | } |
| | | public String getState() { |
| | | return state; |
| | | } |
| | | public void setState(String state) { |
| | | this.state = state; |
| | | } |
| | | public String getContext() { |
| | | return context; |
| | | } |
| | | public void setContext(String context) { |
| | | this.context = context; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.vo.api.complaint; |
| | | |
| | | import com.java110.vo.MorePageVo; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | public class ApiComplaintVo extends MorePageVo implements Serializable { |
| | | List<ApiComplaintDataVo> complaints; |
| | | |
| | | |
| | | public List<ApiComplaintDataVo> getComplaints() { |
| | | return complaints; |
| | | } |
| | | |
| | | public void setComplaints(List<ApiComplaintDataVo> complaints) { |
| | | this.complaints = complaints; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110; |
| | | |
| | | |
| | | import com.java110.code.*; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * Hello world! |
| | | */ |
| | | public class ComplaintGeneratorApplication { |
| | | |
| | | protected ComplaintGeneratorApplication() { |
| | | // prevents calls from subclass |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | /** |
| | | * 代码生成器 入口方法 |
| | | * 此处生成的mapper文件包含过程表和实例表的sql,所以要求两张表的特殊字段也要写上 |
| | | * BusinessTypeCd |
| | | * @param args 参数 |
| | | */ |
| | | public static void main(String[] args) { |
| | | Data data = new Data(); |
| | | data.setId("complaintId"); |
| | | data.setName("complaint"); |
| | | data.setDesc("投诉建议"); |
| | | data.setShareParam("storeId"); |
| | | data.setShareColumn("store_id"); |
| | | data.setNewBusinessTypeCd("BUSINESS_TYPE_SAVE_COMPLAINT"); |
| | | data.setUpdateBusinessTypeCd("BUSINESS_TYPE_UPDATE_COMPLAINT"); |
| | | data.setDeleteBusinessTypeCd("BUSINESS_TYPE_DELETE_COMPLAINT"); |
| | | data.setNewBusinessTypeCdValue("190200030001"); |
| | | data.setUpdateBusinessTypeCdValue("190200040001"); |
| | | data.setDeleteBusinessTypeCdValue("190200050001"); |
| | | data.setBusinessTableName("business_complaint"); |
| | | data.setTableName("complaint"); |
| | | Map<String, String> param = new HashMap<String, String>(); |
| | | param.put("complaintId", "complaint_id"); //map的key为你自定义的字段名就是驼峰命名法的那个,value为数据库表的字段名 |
| | | param.put("storeId", "store_id"); |
| | | param.put("typeCd", "type_cd"); |
| | | param.put("roomId", "room_id"); |
| | | param.put("complaintName", "complaint_name"); |
| | | param.put("tel", "tel"); |
| | | param.put("context", "context"); |
| | | param.put("state", "state"); |
| | | param.put("statusCd", "status_cd"); |
| | | param.put("operate", "operate"); |
| | | param.put("bId", "b_id"); |
| | | data.setParams(param); |
| | | GeneratorSaveInfoListener generatorSaveInfoListener = new GeneratorSaveInfoListener(); |
| | | generatorSaveInfoListener.generator(data); |
| | | |
| | | GeneratorAbstractBussiness generatorAbstractBussiness = new GeneratorAbstractBussiness(); |
| | | generatorAbstractBussiness.generator(data); |
| | | |
| | | GeneratorIServiceDaoListener generatorIServiceDaoListener = new GeneratorIServiceDaoListener(); |
| | | generatorIServiceDaoListener.generator(data); |
| | | |
| | | GeneratorServiceDaoImplListener generatorServiceDaoImplListener = new GeneratorServiceDaoImplListener(); |
| | | generatorServiceDaoImplListener.generator(data); |
| | | |
| | | GeneratorServiceDaoImplMapperListener generatorServiceDaoImplMapperListener = null; |
| | | generatorServiceDaoImplMapperListener = new GeneratorServiceDaoImplMapperListener(); |
| | | generatorServiceDaoImplMapperListener.generator(data); |
| | | |
| | | GeneratorUpdateInfoListener generatorUpdateInfoListener = new GeneratorUpdateInfoListener(); |
| | | generatorUpdateInfoListener.generator(data); |
| | | |
| | | GeneratorDeleteInfoListener generatorDeleteInfoListener = new GeneratorDeleteInfoListener(); |
| | | generatorDeleteInfoListener.generator(data); |
| | | |
| | | GeneratorInnerServiceSMOImpl generatorInnerServiceSMOImpl = new GeneratorInnerServiceSMOImpl(); |
| | | generatorInnerServiceSMOImpl.generator(data); |
| | | |
| | | GeneratorDtoBean generatorDtoBean = new GeneratorDtoBean(); |
| | | generatorDtoBean.generator(data); |
| | | |
| | | GeneratorIInnerServiceSMO generatorIInnerServiceSMO = new GeneratorIInnerServiceSMO(); |
| | | generatorIInnerServiceSMO.generator(data); |
| | | } |
| | | } |
| | |
| | | { |
| | | "templateName":"审核人员", |
| | | "templateCode":"auditUser", |
| | | "templateKey":"auditUserId", |
| | | "templateKeyName":"审核ID", |
| | | "searchCode": "userName", |
| | | "searchName": "用户名称", |
| | | "templateName":"投诉建议", |
| | | "templateCode":"complaint", |
| | | "templateKey":"complaintId", |
| | | "templateKeyName":"投诉ID", |
| | | "searchCode": "complaintName", |
| | | "searchName": "投诉人名称", |
| | | "conditions": [ |
| | | |
| | | { |
| | | "name": "审核ID", |
| | | "name": "投诉ID", |
| | | "inputType": "input", |
| | | "code": "auditUserId", |
| | | "code": "complaintId", |
| | | "whereCondition": "equal" |
| | | }, |
| | | { |
| | | "name": "审核人员", |
| | | "inputType": "input", |
| | | "code": "userName", |
| | | "whereCondition": "equal" |
| | | }, |
| | | { |
| | | "name": "审核环节", |
| | | "name": "投诉类型", |
| | | "inputType": "select", |
| | | "code": "auditLink", |
| | | "selectValue":"809001,809002,809003", |
| | | "selectValueName":"部门主管,财务主管,采购人员", |
| | | "code": "typeCd", |
| | | "selectValue":"809001,809002", |
| | | "selectValueName":"投诉,建议", |
| | | "whereCondition": "equal" |
| | | }, |
| | | { |
| | | "name": "投诉人", |
| | | "inputType": "input", |
| | | "code": "complaintName", |
| | | "whereCondition": "equal" |
| | | }, |
| | | { |
| | | "name": "联系电话", |
| | | "inputType": "input", |
| | | "code": "tel", |
| | | "whereCondition": "equal" |
| | | }, |
| | | { |
| | | "name": "房屋编号", |
| | | "inputType": "input", |
| | | "code": "roomId", |
| | | "whereCondition": "equal" |
| | | }, |
| | | { |
| | | "name": "投诉状态", |
| | | "inputType": "select", |
| | | "code": "state", |
| | | "selectValue":"1100,1200", |
| | | "selectValueName":"派单,结单", |
| | | "whereCondition": "equal" |
| | | } |
| | | ], |
| | | "columns":[ |
| | | { |
| | | "code":"userId", |
| | | "cnCode":"用户ID", |
| | | "desc":"必填,请填写用户ID", |
| | | "code":"storeId", |
| | | "cnCode":"商户ID", |
| | | "desc":"必填,请填写商户ID", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType":"input", |
| | | "limit":"num", |
| | | "limitParam":"", |
| | | "limitErrInfo":"用户ID必须为数字", |
| | | "limitErrInfo":"商户ID必须为数字", |
| | | "show": false |
| | | }, |
| | | { |
| | | "code": "typeCd", |
| | | "cnCode":"投诉类型", |
| | | "desc":"必填,请选择投诉类型", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType": "select", |
| | | "selectValue":"809001,809002", |
| | | "selectValueName":"投诉,建议", |
| | | "limit":"num", |
| | | "limitParam":"", |
| | | "limitErrInfo":"投诉类型格式错误", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code":"userName", |
| | | "cnCode":"用户名称", |
| | | "desc":"必填,请填写用户名称", |
| | | "code":"roomId", |
| | | "cnCode":"房屋编号", |
| | | "desc":"必填,请选择房屋编号", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType":"input", |
| | | "limit":"maxin", |
| | | "limitParam":"2,50", |
| | | "limitErrInfo":"用户名称必须在2至50字符之间", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code":"auditLink", |
| | | "cnCode":"审核环节", |
| | | "desc":"必填,请选择审核环节", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType":"select", |
| | | "selectValue":"809001,809002,809003", |
| | | "selectValueName":"部门主管,财务主管,采购人员", |
| | | "limit":"num", |
| | | "limitParam":"", |
| | | "limitErrInfo":"审核环节格式错误", |
| | | "limitErrInfo":"房屋编号格式错误", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code":"objCode", |
| | | "cnCode":"流程对象", |
| | | "desc":"必填,请填写流程对象", |
| | | "code":"complaintName", |
| | | "cnCode":"投诉人", |
| | | "desc":"必填,请填写投诉人", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType":"input", |
| | | "limit":"maxLength", |
| | | "limitParam":"64", |
| | | "limitErrInfo":"物品库存不能大于64位", |
| | | "limitParam":"200", |
| | | "limitErrInfo":"投诉人不能大于200位", |
| | | "show": false |
| | | }, |
| | | { |
| | | "code":"tel", |
| | | "cnCode":"投诉电话", |
| | | "desc":"必填,请填写投诉电话", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType":"input", |
| | | "limit":"phone", |
| | | "limitParam":"", |
| | | "limitErrInfo":"投诉电话格式错误", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code":"state", |
| | | "cnCode":"投诉状态", |
| | | "desc":"必填,请填写投诉状态", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType":"input", |
| | | "limit":"num", |
| | | "limitParam":"", |
| | | "limitErrInfo":"投诉状态格式错误", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code":"context", |
| | | "cnCode":"投诉内容", |
| | | "desc":"必填,请填写投诉内容", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType":"textarea", |
| | | "limit":"maxLength", |
| | | "limitParam":"4000", |
| | | "limitErrInfo":"投诉状态超过4000位", |
| | | "show": false |
| | | } |
| | | ] |
| New file |
| | |
| | | { |
| | | "templateName":"审核人员", |
| | | "templateCode":"auditUser", |
| | | "templateKey":"auditUserId", |
| | | "templateKeyName":"审核ID", |
| | | "searchCode": "userName", |
| | | "searchName": "用户名称", |
| | | "conditions": [ |
| | | |
| | | { |
| | | "name": "审核ID", |
| | | "inputType": "input", |
| | | "code": "auditUserId", |
| | | "whereCondition": "equal" |
| | | }, |
| | | { |
| | | "name": "审核人员", |
| | | "inputType": "input", |
| | | "code": "userName", |
| | | "whereCondition": "equal" |
| | | }, |
| | | { |
| | | "name": "审核环节", |
| | | "inputType": "select", |
| | | "code": "auditLink", |
| | | "selectValue":"809001,809002,809003", |
| | | "selectValueName":"部门主管,财务主管,采购人员", |
| | | "whereCondition": "equal" |
| | | } |
| | | ], |
| | | "columns":[ |
| | | { |
| | | "code":"userId", |
| | | "cnCode":"用户ID", |
| | | "desc":"必填,请填写用户ID", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType":"input", |
| | | "limit":"num", |
| | | "limitParam":"", |
| | | "limitErrInfo":"用户ID必须为数字", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code":"userName", |
| | | "cnCode":"用户名称", |
| | | "desc":"必填,请填写用户名称", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType":"input", |
| | | "limit":"maxin", |
| | | "limitParam":"2,50", |
| | | "limitErrInfo":"用户名称必须在2至50字符之间", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code":"auditLink", |
| | | "cnCode":"审核环节", |
| | | "desc":"必填,请选择审核环节", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType":"select", |
| | | "selectValue":"809001,809002,809003", |
| | | "selectValueName":"部门主管,财务主管,采购人员", |
| | | "limit":"num", |
| | | "limitParam":"", |
| | | "limitErrInfo":"审核环节格式错误", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code":"objCode", |
| | | "cnCode":"流程对象", |
| | | "desc":"必填,请填写流程对象", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType":"input", |
| | | "limit":"maxLength", |
| | | "limitParam":"64", |
| | | "limitErrInfo":"物品库存不能大于64位", |
| | | "show": false |
| | | } |
| | | ] |
| | | } |
| | |
| | | public static final String CODE_PREFIX_resId = "85"; |
| | | public static final String CODE_PREFIX_auditUserId = "86"; |
| | | public static final String CODE_PREFIX_auditMessageId = "87"; |
| | | public static final String CODE_PREFIX_complaintId = "88"; |
| | | |
| | | |
| | | |
| New file |
| | |
| | | package com.java110.core.smo.complaint; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.dto.complaint.ComplaintDto; |
| | | 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 IComplaintInnerServiceSMO |
| | | * @Description 投诉建议接口类 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 9:04 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | @FeignClient(name = "store-service", configuration = {FeignConfiguration.class}) |
| | | @RequestMapping("/complaintApi") |
| | | public interface IComplaintInnerServiceSMO { |
| | | |
| | | /** |
| | | * <p>查询小区楼信息</p> |
| | | * |
| | | * @param complaintDto 数据对象分享 |
| | | * @return ComplaintDto 对象数据 |
| | | */ |
| | | @RequestMapping(value = "/queryComplaints", method = RequestMethod.POST) |
| | | List<ComplaintDto> queryComplaints(@RequestBody ComplaintDto complaintDto); |
| | | |
| | | /** |
| | | * 查询<p>小区楼</p>总记录数 |
| | | * |
| | | * @param complaintDto 数据对象分享 |
| | | * @return 小区下的小区楼记录数 |
| | | */ |
| | | @RequestMapping(value = "/queryComplaintsCount", method = RequestMethod.POST) |
| | | int queryComplaintsCount(@RequestBody ComplaintDto complaintDto); |
| | | } |
| New file |
| | |
| | | create table complaint( |
| | | `complaint_id` varchar(30) NOT NULL COMMENT '投诉ID', |
| | | `b_id` varchar(30) NOT NULL COMMENT '业务Id', |
| | | `store_id` varchar(30) NOT NULL COMMENT '商户ID', |
| | | `type_cd` varchar(30) NOT NULL COMMENT '投诉类型,见t_dict表', |
| | | `room_id` varchar(100) NOT NULL COMMENT '房屋ID', |
| | | `complaint_name` varchar(200) NOT NULL COMMENT '投诉人', |
| | | `tel` varchar(11) NOT NULL COMMENT '投诉人联系方式', |
| | | `context` longtext NOT NULL COMMENT '投诉内容', |
| | | state varchar(12) not null comment '投诉处理状态,见 t_dict表', |
| | | `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', |
| | | `status_cd` varchar(2) NOT NULL DEFAULT '0' COMMENT '数据状态,详细参考t_dict表,0, 在用 1失效', |
| | | KEY `idx_complaint_complaint_id` (`complaint_id`) |
| | | ); |
| | | |
| | | CREATE TABLE `business_complaint` ( |
| | | `complaint_id` varchar(30) NOT NULL COMMENT '投诉ID', |
| | | `b_id` varchar(30) NOT NULL COMMENT '业务Id', |
| | | `store_id` varchar(30) NOT NULL COMMENT '商户ID', |
| | | `type_cd` varchar(30) NOT NULL COMMENT '投诉类型,见t_dict表', |
| | | `room_id` varchar(100) NOT NULL COMMENT '房间ID', |
| | | `complaint_name` varchar(200) NOT NULL COMMENT '投诉人', |
| | | `tel` varchar(11) NOT NULL COMMENT '投诉人联系方式', |
| | | `context` longtext NOT NULL COMMENT '投诉内容', |
| | | state varchar(12) not null comment '投诉处理状态,见 t_dict表', |
| | | `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', |
| | | `operate` varchar(4) NOT NULL COMMENT '数据状态,添加ADD,修改MOD 删除DEL', |
| | | KEY `idx_b_complaint_complaint_id` (`complaint_id`) |
| | | ); |
| 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="complaintServiceDaoImpl"> |
| | | |
| | | <!-- 保存投诉建议信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveBusinessComplaintInfo" parameterType="Map"> |
| | | insert into business_complaint( |
| | | operate,complaint_id,type_cd,context,complaint_name,tel,state,store_id,b_id,room_id |
| | | ) values ( |
| | | #{operate},#{complaintId},#{typeCd},#{context},#{complaintName},#{tel},#{state},#{storeId},#{bId},#{roomId} |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询投诉建议信息(Business) add by wuxw 2018-07-03 --> |
| | | <select id="getBusinessComplaintInfo" parameterType="Map" resultType="Map"> |
| | | select t.operate,t.complaint_id,t.complaint_id complaintId,t.type_cd,t.type_cd typeCd,t.context,t.complaint_name,t.complaint_name complaintName,t.tel,t.state,t.store_id,t.store_id storeId,t.b_id,t.b_id bId,t.room_id,t.room_id roomId |
| | | from business_complaint t |
| | | where 1 =1 |
| | | <if test="operate !=null and operate != ''"> |
| | | and t.operate= #{operate} |
| | | </if> |
| | | <if test="complaintId !=null and complaintId != ''"> |
| | | and t.complaint_id= #{complaintId} |
| | | </if> |
| | | <if test="typeCd !=null and typeCd != ''"> |
| | | and t.type_cd= #{typeCd} |
| | | </if> |
| | | <if test="context !=null and context != ''"> |
| | | and t.context= #{context} |
| | | </if> |
| | | <if test="complaintName !=null and complaintName != ''"> |
| | | and t.complaint_name= #{complaintName} |
| | | </if> |
| | | <if test="tel !=null and tel != ''"> |
| | | and t.tel= #{tel} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="roomId !=null and roomId != ''"> |
| | | and t.room_id= #{roomId} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 保存投诉建议信息至 instance表中 add by wuxw 2018-07-03 --> |
| | | <insert id="saveComplaintInfoInstance" parameterType="Map"> |
| | | insert into complaint( |
| | | complaint_id,type_cd,context,complaint_name,tel,status_cd,state,store_id,b_id,room_id |
| | | ) select t.complaint_id,t.type_cd,t.context,t.complaint_name,t.tel,'0',t.state,t.store_id,t.b_id,t.room_id from business_complaint t where 1=1 |
| | | and t.operate= 'ADD' |
| | | <if test="complaintId !=null and complaintId != ''"> |
| | | and t.complaint_id= #{complaintId} |
| | | </if> |
| | | <if test="typeCd !=null and typeCd != ''"> |
| | | and t.type_cd= #{typeCd} |
| | | </if> |
| | | <if test="context !=null and context != ''"> |
| | | and t.context= #{context} |
| | | </if> |
| | | <if test="complaintName !=null and complaintName != ''"> |
| | | and t.complaint_name= #{complaintName} |
| | | </if> |
| | | <if test="tel !=null and tel != ''"> |
| | | and t.tel= #{tel} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="roomId !=null and roomId != ''"> |
| | | and t.room_id= #{roomId} |
| | | </if> |
| | | |
| | | </insert> |
| | | |
| | | |
| | | |
| | | <!-- 查询投诉建议信息 add by wuxw 2018-07-03 --> |
| | | <select id="getComplaintInfo" parameterType="Map" resultType="Map"> |
| | | select t.complaint_id,t.complaint_id complaintId,t.type_cd,t.type_cd typeCd,t.context,t.complaint_name,t.complaint_name complaintName,t.tel,t.status_cd,t.status_cd statusCd,t.state,t.store_id,t.store_id storeId,t.b_id,t.b_id bId,t.room_id,t.room_id roomId |
| | | from complaint t |
| | | where 1 =1 |
| | | <if test="complaintId !=null and complaintId != ''"> |
| | | and t.complaint_id= #{complaintId} |
| | | </if> |
| | | <if test="typeCd !=null and typeCd != ''"> |
| | | and t.type_cd= #{typeCd} |
| | | </if> |
| | | <if test="context !=null and context != ''"> |
| | | and t.context= #{context} |
| | | </if> |
| | | <if test="complaintName !=null and complaintName != ''"> |
| | | and t.complaint_name= #{complaintName} |
| | | </if> |
| | | <if test="tel !=null and tel != ''"> |
| | | and t.tel= #{tel} |
| | | </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="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="roomId !=null and roomId != ''"> |
| | | and t.room_id= #{roomId} |
| | | </if> |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 修改投诉建议信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateComplaintInfoInstance" parameterType="Map"> |
| | | update complaint t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="typeCd !=null and typeCd != ''"> |
| | | , t.type_cd= #{typeCd} |
| | | </if> |
| | | <if test="context !=null and context != ''"> |
| | | , t.context= #{context} |
| | | </if> |
| | | <if test="complaintName !=null and complaintName != ''"> |
| | | , t.complaint_name= #{complaintName} |
| | | </if> |
| | | <if test="tel !=null and tel != ''"> |
| | | , t.tel= #{tel} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | , t.state= #{state} |
| | | </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="complaintId !=null and complaintId != ''"> |
| | | and t.complaint_id= #{complaintId} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询投诉建议数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryComplaintsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from complaint t |
| | | where 1 =1 |
| | | <if test="complaintId !=null and complaintId != ''"> |
| | | and t.complaint_id= #{complaintId} |
| | | </if> |
| | | <if test="typeCd !=null and typeCd != ''"> |
| | | and t.type_cd= #{typeCd} |
| | | </if> |
| | | <if test="context !=null and context != ''"> |
| | | and t.context= #{context} |
| | | </if> |
| | | <if test="complaintName !=null and complaintName != ''"> |
| | | and t.complaint_name= #{complaintName} |
| | | </if> |
| | | <if test="tel !=null and tel != ''"> |
| | | and t.tel= #{tel} |
| | | </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="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="roomId !=null and roomId != ''"> |
| | | and t.room_id= #{roomId} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | public static final String BUSINESS_TYPE_DELETE_AUDIT_MESSAGE ="170200050001"; |
| | | */ |
| | | |
| | | /** |
| | | * 保存 投诉意见 |
| | | * 14开头 3保存 |
| | | */ |
| | | public static final String BUSINESS_TYPE_SAVE_COMPLAINT="190200030001"; |
| | | |
| | | /** |
| | | * 修改 投诉意见 |
| | | */ |
| | | public static final String BUSINESS_TYPE_UPDATE_COMPLAINT="190200040001"; |
| | | /** |
| | | * 删除 投诉意见 |
| | | */ |
| | | public static final String BUSINESS_TYPE_DELETE_COMPLAINT ="190200050001"; |
| | | |
| | | } |
| | |
| | | |
| | | public static final String LIST_PAY_FEE = "502019103056060006"; |
| | | |
| | | //投诉建议 权限编码 |
| | | public static final String AGENT_HAS_LIST_COMPLAINT = "502019103114270018"; |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.utils.constant; |
| | | |
| | | /** |
| | | * 投诉建议常量类 |
| | | * Created by wuxw on 2017/5/20. |
| | | */ |
| | | public class ServiceCodeComplaintConstant { |
| | | |
| | | /** |
| | | * 添加 投诉建议 |
| | | */ |
| | | public static final String ADD_COMPLAINT = "complaint.saveComplaint"; |
| | | |
| | | |
| | | /** |
| | | * 修改 投诉建议 |
| | | */ |
| | | public static final String UPDATE_COMPLAINT = "complaint.updateComplaint"; |
| | | /** |
| | | * 删除 投诉建议 |
| | | */ |
| | | public static final String DELETE_COMPLAINT = "complaint.deleteComplaint"; |
| | | |
| | | |
| | | /** |
| | | * 查询 投诉建议 |
| | | */ |
| | | public static final String LIST_COMPLAINTS = "complaint.listComplaints"; |
| | | |
| | | |
| | | } |