IP地址取消来函增加取消来函信息添加,展示
This commit is contained in:
@@ -139,6 +139,10 @@ public class BaseCfg<T> extends BaseEntity<T> implements Cloneable{
|
||||
* 来函id
|
||||
*/
|
||||
protected Integer requestId;
|
||||
/**
|
||||
* 取消审核来函id
|
||||
*/
|
||||
protected Integer cancelRequestId;
|
||||
/**
|
||||
* 来函
|
||||
*/
|
||||
@@ -884,5 +888,11 @@ public class BaseCfg<T> extends BaseEntity<T> implements Cloneable{
|
||||
public void setUserRegion5(String userRegion5) {
|
||||
this.userRegion5 = userRegion5;
|
||||
}
|
||||
public Integer getCancelRequestId() {
|
||||
return cancelRequestId;
|
||||
}
|
||||
public void setCancelRequestId(Integer cancelRequestId) {
|
||||
this.cancelRequestId = cancelRequestId;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ public class CfgIndexInfo extends BaseCfg<CfgIndexInfo> {
|
||||
*/
|
||||
private static final long serialVersionUID = 2796500715438264119L;
|
||||
private static final String tableName="cfg_index_info";
|
||||
private String indexTable="cfg_index_info";
|
||||
private List<AvVoipAccountCfg> voipAccounts;//Add表单使用
|
||||
private List<AsnIpCfg> asnIpCfgs;//Add表单使用
|
||||
private List<AvVoipIpCfg> voipIps; //Add表单使用
|
||||
@@ -308,4 +309,11 @@ public class CfgIndexInfo extends BaseCfg<CfgIndexInfo> {
|
||||
public static String getTablename() {
|
||||
return tableName;
|
||||
}
|
||||
public String getIndexTable() {
|
||||
return indexTable;
|
||||
}
|
||||
public void setIndexTable(String indexTable) {
|
||||
this.indexTable = indexTable;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.nis.web.controller.basics;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -15,7 +17,9 @@ import org.apache.zookeeper.ZooDefs.Ids;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
@@ -24,6 +28,8 @@ import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.basics.ServiceDictInfo;
|
||||
import com.nis.domain.configuration.RequestInfo;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigDictUtils;
|
||||
import com.nis.util.Configurations;
|
||||
import com.nis.util.StringUtil;
|
||||
@@ -46,6 +52,63 @@ public class ServiceDictInfoController extends BaseController {
|
||||
|
||||
}
|
||||
|
||||
@RequestMapping(value="requestSelectInfo")
|
||||
public String requestSelectInfo(Model model){
|
||||
List<RequestInfo> requestInfos=requestInfoService.getValidRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
return "/basics/requestSelectInfo";
|
||||
}
|
||||
@ResponseBody
|
||||
@RequestMapping(value="requestCancleInfoAjax", method = RequestMethod.POST)
|
||||
public String requestCancleInfoAjax(Integer cancelRequestId,String ids,String indexTable){
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
try {
|
||||
serviceDictInfoService.auditCancleRequestInfo(cancelRequestId,indexTable,id);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("审核添加取消来函信息失败",e);
|
||||
return "false";
|
||||
}
|
||||
}
|
||||
}
|
||||
return "true";
|
||||
}
|
||||
/**
|
||||
*
|
||||
* 根据id获取取消审核时的来函号信息
|
||||
* @param ids
|
||||
* @param indexTable
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(value="requestCancleInfoNumber")
|
||||
public Map requestCancleInfoNumber(String ids,String indexTable){
|
||||
List list = new ArrayList();
|
||||
String requestTitle="";
|
||||
Map map=new HashMap();
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
String[] idArray = ids.split(",");
|
||||
// for(String id :idArray){
|
||||
try {
|
||||
Integer cancelRequestId= serviceDictInfoService.requestCancleInfoNumber(indexTable.trim(),Long.parseLong(ids));
|
||||
if(cancelRequestId!=null) {
|
||||
requestTitle = requestInfoService.getRequestTitleById(cancelRequestId.longValue());
|
||||
if(StringUtils.isBlank(requestTitle)) {
|
||||
return map;
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("查询取消审核来函信息失败",e);
|
||||
return map;
|
||||
}
|
||||
// }
|
||||
}
|
||||
map.put("requestTitle", requestTitle);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询业务辅助表-业务字典信息列表(无条件分页查询)
|
||||
|
||||
@@ -76,6 +76,9 @@ public interface ServiceDictInfoDao extends CrudDao<ServiceDictInfo> {
|
||||
List<ServiceDictInfo> findItemDict(@Param("itemType")int itemType,@Param("isValid")int isValid,@Param("isLeaf")Integer isLeaf);
|
||||
List<ServiceDictInfo> findAllItemDictByItemType(@Param("itemType")int itemType,@Param("isLeaf")Integer isLeaf);
|
||||
|
||||
void auditCancleRequestInfo(@Param("cancelRequestId")Integer cancelRequestId, @Param("indexTable")String indexTable,@Param("id") String id);
|
||||
Integer requestCancleInfoNumber(@Param("indexTable")String indexTable,@Param("id")Long id);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -306,9 +306,12 @@
|
||||
<sql id="menuJoins">
|
||||
LEFT JOIN service_dict_info p ON p.service_dict_id = s.parent_id
|
||||
</sql>
|
||||
|
||||
|
||||
|
||||
|
||||
<update id="auditCancleRequestInfo">
|
||||
UPDATE ${indexTable} SET cancel_request_id = #{cancelRequestId} WHERE cfg_id = #{id}
|
||||
</update>
|
||||
<select id="requestCancleInfoNumber" resultType="Integer">
|
||||
select cancel_request_id cancelRequestId from ${indexTable} where cfg_id = #{id}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -24,6 +24,8 @@ public interface RequestInfoDao extends CrudDao {
|
||||
List<TaskInfo> showTask(TaskInfo taskInfo);
|
||||
|
||||
void delete(@Param("id") Long id);
|
||||
|
||||
String getRequestTitleById(@Param("id")Long id);
|
||||
|
||||
|
||||
}
|
||||
@@ -217,4 +217,8 @@
|
||||
<include refid="Base_Column_List" />
|
||||
from request_info
|
||||
</select>
|
||||
|
||||
<select id="getRequestTitleById" resultType="string">
|
||||
select request_title requestTitle from request_info where id=#{id}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -300,6 +300,23 @@ public class ServiceDictInfoService extends BaseService{
|
||||
public List<ServiceDictInfo> findAllLableDict() {
|
||||
return serviceDictInfoDao.findAllItemDictByItemType(Constants.ITEM_TYPE_LABEL,null);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* 取消审核的时候增加取消来函
|
||||
* @param cancelRequestId
|
||||
* @param indexTable
|
||||
* @param id
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void auditCancleRequestInfo(Integer cancelRequestId, String indexTable, String id) {
|
||||
serviceDictInfoDao.auditCancleRequestInfo(cancelRequestId, indexTable, id);
|
||||
}
|
||||
public Integer requestCancleInfoNumber(String indexTable, Long id) {
|
||||
Integer cancleRequestId = serviceDictInfoDao.requestCancleInfoNumber( indexTable, id);
|
||||
return cancleRequestId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -118,4 +118,9 @@ public class RequestInfoService extends BaseService{
|
||||
public List<TaskInfo> showTask(TaskInfo taskInfo) {
|
||||
return taskInfoDao.findList(taskInfo);
|
||||
}
|
||||
|
||||
public String getRequestTitleById(Long id) {
|
||||
return requestInfoDao.getRequestTitleById(id);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user