Merge branch 'develop' of http://10.0.6.99/gwall/gwall.git into develop

This commit is contained in:
zhangshilin
2018-03-17 17:09:33 +08:00
22 changed files with 168 additions and 101 deletions

View File

@@ -58,22 +58,22 @@ public class TaskInfoController extends BaseController{
// 保存用户信息
logger.info(taskInfo.getId()+"修改成功");
taskInfoService.saveOrUpdate(taskInfo);
addMessage(redirectAttributes, "success");
addMessage(redirectAttributes, "save_success");
}else{
if (!"true".equals(checkTaskName(taskInfo.getTaskName()))){
logger.info(taskInfo.getTaskName()+"重复数据");
addMessage(model, "error");
addMessage(model, "save_failed");
return form(taskInfo, model);
}
// 保存用户信息
taskInfoService.saveOrUpdate(taskInfo);
addMessage(redirectAttributes, "success");
addMessage(redirectAttributes, "save_success");
logger.info(taskInfo.getId()+"保存成功");
}
} catch (Exception e) {
logger.error(e.getMessage());
e.printStackTrace();
addMessage(model, "error");
addMessage(model, "save_failed");
}
return "redirect:" + adminPath + "/basics/taskInfo/list?repage";
}
@@ -100,7 +100,7 @@ public class TaskInfoController extends BaseController{
public String taskExamine(String ids, Model model,RedirectAttributes redirectAttributes){
String[] exId = ids.split(",");
taskInfoService.taskExamine(exId);
addMessage(redirectAttributes, "success");
addMessage(redirectAttributes, "save_success");
return "redirect:" + adminPath + "/basics/taskInfo/list?repage";
}
@@ -114,7 +114,7 @@ public class TaskInfoController extends BaseController{
public String taskExamineNo(String ids, Model model,RedirectAttributes redirectAttributes){
String[] noId = ids.split(",");
taskInfoService.taskExamineNo(noId);
addMessage(redirectAttributes, "success");
addMessage(redirectAttributes, "save_success");
return "redirect:" + adminPath + "/basics/taskInfo/list?repage";
}
@@ -128,7 +128,7 @@ public class TaskInfoController extends BaseController{
public String taskCancelExamine(String ids, Model model,RedirectAttributes redirectAttributes){
String[] canclelId = ids.split(",");
taskInfoService.taskCancelExamine(canclelId);
addMessage(redirectAttributes, "success");
addMessage(redirectAttributes, "save_success");
return "redirect:" + adminPath + "/basics/taskInfo/list?repage";
}
@@ -142,7 +142,7 @@ public class TaskInfoController extends BaseController{
public String delete(String ids, Model model,RedirectAttributes redirectAttributes){
String[] delId = ids.split(",");
taskInfoService.delete(delId);
addMessage(redirectAttributes, "success");
addMessage(redirectAttributes, "delete_success");
return "redirect:" + adminPath + "/basics/taskInfo/list?repage";
}

View File

@@ -186,8 +186,8 @@ public class ComplexStringCfgController extends BaseController{
}else if(!StringUtils.isBlank(cfg.getTableName())){
int serviceId=cfg.getServiceId();
long compileId=getCompileId(cfg);
cfg.setCreatorId(cfg.getCurrentUser().getId());
cfg.setCreateTime(new Date());
// cfg.setCreatorId(cfg.getCurrentUser().getId());
// cfg.setCreateTime(new Date());
cfg.setIsValid(Constants.VALID_NO);
cfg.setIsAudit(Constants.AUDIT_NOT_YET);
cfg.setCompileId(compileId);
@@ -211,8 +211,8 @@ public class ComplexStringCfgController extends BaseController{
if(!StringUtils.isBlank(tableName)){
long compileId=getCompileId(cfg);
cfg.setTableName(tableName);
cfg.setCreatorId(cfg.getCurrentUser().getId());
cfg.setCreateTime(new Date());
// cfg.setCreatorId(cfg.getCurrentUser().getId());
// cfg.setCreateTime(new Date());
cfg.setIsValid(Constants.VALID_NO);
cfg.setIsAudit(Constants.AUDIT_NOT_YET);
cfg.setCompileId(compileId);

View File

@@ -262,8 +262,8 @@ public class IpCfgController extends BaseController{
if(!StringUtils.isBlank(tableName)){
long compileId=getCompileId();
ipCfg.setTableName(tableName);
ipCfg.setCreatorId(ipCfg.getCurrentUser().getId());
ipCfg.setCreateTime(new Date());
// ipCfg.setCreatorId(ipCfg.getCurrentUser().getId());
// ipCfg.setCreateTime(new Date());
ipCfg.setIsValid(Constants.VALID_NO);
ipCfg.setIsAudit(Constants.AUDIT_NOT_YET);
ipCfg.setCompileId(compileId);

View File

@@ -144,8 +144,8 @@ public class NumCfgController extends BaseController{
ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId);
if(serviceConfigInfo!=null){
long compileId=getCompileId(cfg);
cfg.setCreatorId(cfg.getCurrentUser().getId());
cfg.setCreateTime(new Date());
// cfg.setCreatorId(cfg.getCurrentUser().getId());
// cfg.setCreateTime(new Date());
cfg.setIsValid(Constants.VALID_NO);
cfg.setIsAudit(Constants.AUDIT_NOT_YET);
cfg.setCompileId(compileId);

View File

@@ -62,22 +62,22 @@ public class RequestInfoController extends BaseController{
// 保存用户信息
logger.info(requestInfo.getId()+"修改成功");
requestInfoService.saveOrUpdate(requestInfo);
addMessage(redirectAttributes, "success");
addMessage(redirectAttributes, "save_success");
}else{
if (!"true".equals(checkRequestNumber(requestInfo.getRequestNumber()))){
logger.info(requestInfo.getRequestNumber()+"重复数据");
addMessage(model, "error");
addMessage(model, "save_failed");
return form(requestInfo, model);
}
// 保存用户信息
requestInfoService.saveOrUpdate(requestInfo);
addMessage(redirectAttributes, "success");
addMessage(redirectAttributes, "save_success");
logger.info(requestInfo.getId()+"保存成功");
}
} catch (Exception e) {
logger.error(e.getMessage());
e.printStackTrace();
addMessage(model, "error");
addMessage(model, "save_failed");
}
return "redirect:" + adminPath + "/cfg/request/list?repage";
}
@@ -104,7 +104,7 @@ public class RequestInfoController extends BaseController{
public String requestExamine(String ids, Model model,RedirectAttributes redirectAttributes){
String[] exId = ids.split(",");
requestInfoService.requestExamine(exId);
addMessage(redirectAttributes, "success");
addMessage(redirectAttributes, "save_success");
return "redirect:" + adminPath + "/cfg/request/list?repage";
}
@@ -118,7 +118,7 @@ public class RequestInfoController extends BaseController{
public String requestExamineNo(String ids, Model model,RedirectAttributes redirectAttributes){
String[] noId = ids.split(",");
requestInfoService.requestExamineNo(noId);
addMessage(redirectAttributes, "success");
addMessage(redirectAttributes, "save_success");
return "redirect:" + adminPath + "/cfg/request/list?repage";
}
@@ -132,7 +132,7 @@ public class RequestInfoController extends BaseController{
public String requestCancelExamine(String ids, Model model,RedirectAttributes redirectAttributes){
String[] canclelId = ids.split(",");
requestInfoService.requestCancelExamine(canclelId);
addMessage(redirectAttributes, "success");
addMessage(redirectAttributes, "save_success");
return "redirect:" + adminPath + "/cfg/request/list?repage";
}
@@ -146,7 +146,7 @@ public class RequestInfoController extends BaseController{
public String delete(String ids, Model model,RedirectAttributes redirectAttributes){
String[] delId = ids.split(",");
requestInfoService.delete(delId);
addMessage(redirectAttributes, "success");
addMessage(redirectAttributes, "delete_success");
return "redirect:" + adminPath + "/cfg/request/list?repage";
}

View File

@@ -186,8 +186,8 @@ public class StringCfgController extends BaseController{
}else if(!StringUtils.isBlank(stringCfg.getTableName())){
int serviceId=stringCfg.getServiceId();
long compileId=getCompileId(stringCfg);
stringCfg.setCreatorId(stringCfg.getCurrentUser().getId());
stringCfg.setCreateTime(new Date());
// stringCfg.setCreatorId(stringCfg.getCurrentUser().getId());
// stringCfg.setCreateTime(new Date());
stringCfg.setIsValid(Constants.VALID_NO);
stringCfg.setIsAudit(Constants.AUDIT_NOT_YET);
stringCfg.setCompileId(compileId);
@@ -211,8 +211,8 @@ public class StringCfgController extends BaseController{
if(!StringUtils.isBlank(tableName)){
long compileId=getCompileId(stringCfg);
stringCfg.setTableName(tableName);
stringCfg.setCreatorId(stringCfg.getCurrentUser().getId());
stringCfg.setCreateTime(new Date());
// stringCfg.setCreatorId(stringCfg.getCurrentUser().getId());
// stringCfg.setCreateTime(new Date());
stringCfg.setIsValid(Constants.VALID_NO);
stringCfg.setIsAudit(Constants.AUDIT_NOT_YET);
stringCfg.setCompileId(compileId);

View File

@@ -22,7 +22,7 @@
<result column="classify" property="classify" jdbcType="VARCHAR" />
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
<result column="lable" property="lable" jdbcType="VARCHAR" />
<result column="expr_type " property="exprType" jdbcType="INTEGER" />
<result column="expr_type" property="exprType" jdbcType="INTEGER" />
<result column="match_method" property="matchMethod" jdbcType="INTEGER" />
<result column="is_hexbin" property="isHexbin" jdbcType="INTEGER" />
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />

View File

@@ -39,6 +39,7 @@
u.name AS editorName,
r.edit_time AS editTime,
e.name AS currentName,
e.name AS auditorName,
r.audit_time AS auditTime,
t.task_name AS taskName
from request_info r
@@ -65,8 +66,8 @@
AND r.request_time between #{beginDate} and #{endDate}
</if>
<if test="dobeginDate!=null and dobeginDate!='' and doendDate!=null and doendDate!=''">
AND (r.create_time between #{dobeginDate} and #{doendDate}) or (r.audit_time between #{dobeginDate} and #{doendDate})
</if>
AND r.edit_time between #{dobeginDate} and #{doendDate}
</if>
order by r.request_time desc
</select>
<!-- 根据来函号查询 -->
@@ -78,10 +79,31 @@
</select>
<!-- 根据来id查询 -->
<select id="getRequestInfoById" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from request_info
where id = #{id,jdbcType=BIGINT}
select
r.id AS id,
r.task_id AS taskId,
r.request_number AS requestNumber,
r.request_org AS requestOrg,
r.request_time AS requestTime,
r.request_title AS requestTitle,
r.request_content AS requestContent,
r.is_valid AS isValid,
r.is_audit AS isAudit,
s.name AS creatorName,
r.create_time AS createTime,
u.name AS editorName,
r.edit_time AS editTime,
e.name AS currentName,
e.name AS auditorName,
r.audit_time AS auditTime,
t.task_name AS taskName
from request_info r
left join sys_user s on r.creator_id=s.id
left join sys_user u on r.editor_id=u.id
left join sys_user e on r.auditor_id=e.id
left join task_info t on r.task_id=t.id
where r.is_valid=1 and r.is_audit !=3
and r.id = #{id,jdbcType=BIGINT}
</select>
<!-- 新增 -->
<insert id="insert" parameterType="com.nis.domain.configuration.RequestInfo">
@@ -98,31 +120,32 @@
editor_id,
edit_time,
auditor_id,
audit_time
audit_time,
task_id
)
values (#{requestNumber,jdbcType=VARCHAR}, #{requestOrg,jdbcType=VARCHAR},
#{requestTime,jdbcType=DATE}, #{requestTitle,jdbcType=VARCHAR}, #{requestContent,jdbcType=VARCHAR},
#{isValid,jdbcType=INTEGER}, #{isAudit,jdbcType=INTEGER}, #{creatorId,jdbcType=INTEGER},
#{createTime,jdbcType=DATE}, #{editorId,jdbcType=INTEGER}, #{editTime,jdbcType=DATE},
#{auditorId,jdbcType=INTEGER}, #{auditTime,jdbcType=DATE})
#{auditorId,jdbcType=INTEGER}, #{auditTime,jdbcType=DATE}, #{taskId,jdbcType=BIGINT})
</insert>
<!--修改 -->
<update id="update" parameterType="com.nis.domain.configuration.RequestInfo">
update request_info
<set>
<if test="requestNumber != null">
<if test="requestNumber != null and requestNumber!=''" >
request_number = #{requestNumber,jdbcType=VARCHAR},
</if>
<if test="requestOrg != null">
<if test="requestOrg != null and requestOrg!=''">
request_org = #{requestOrg,jdbcType=VARCHAR},
</if>
<if test="requestTime != null">
request_time = #{requestTime,jdbcType=DATE},
</if>
<if test="requestTitle != null">
<if test="requestTitle != null and requestTitle!=''">
request_title = #{requestTitle,jdbcType=VARCHAR},
</if>
<if test="requestContent != null">
<if test="requestContent != null and requestContent!=''">
request_content = #{requestContent,jdbcType=VARCHAR},
</if>
<if test="isValid != null">
@@ -149,6 +172,9 @@
<if test="auditTime != null">
audit_time = #{auditTime,jdbcType=DATE},
</if>
<if test="taskId != null">
task_id = #{taskId},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>

View File

@@ -22,7 +22,7 @@
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
<result column="lable" property="lable" jdbcType="VARCHAR" />
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
<result column="expr_type " property="exprType" jdbcType="INTEGER" />
<result column="expr_type" property="exprType" jdbcType="INTEGER" />
<result column="match_method" property="matchMethod" jdbcType="INTEGER" />
<result column="is_hexbin" property="isHexbin" jdbcType="INTEGER" />
</resultMap>
@@ -47,7 +47,7 @@
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
<result column="lable" property="lable" jdbcType="VARCHAR" />
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
<result column="expr_type " property="exprType" jdbcType="INTEGER" />
<result column="expr_type" property="exprType" jdbcType="INTEGER" />
<result column="match_method" property="matchMethod" jdbcType="INTEGER" />
<result column="is_hexbin" property="isHexbin" jdbcType="INTEGER" />
<result column="creator_name" property="creatorName" jdbcType="VARCHAR" />

View File

@@ -24,9 +24,10 @@
<select id="findList" parameterType="com.nis.domain.configuration.TaskInfo" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from task_info
from task_info t
where is_valid=1 and is_audit !=3
<if test="id!=null">
where id = #{id,jdbcType=BIGINT}
AND id = #{id,jdbcType=BIGINT}
</if>
</select>
@@ -43,7 +44,7 @@
r.create_time AS createTime,
u.name AS editorName,
r.edit_time AS editTime,
e.name AS currentName,
e.name AS auditorName,
r.audit_time AS auditTime
from task_info r
left join sys_user s on r.creator_id=s.id
@@ -61,7 +62,7 @@
AND r.task_time between #{beginDate} and #{endDate}
</if>
<if test="dobeginDate!=null and dobeginDate!='' and doendDate!=null and doendDate!=''">
AND (r.create_time between #{dobeginDate} and #{doendDate}) or (r.audit_time between #{dobeginDate} and #{doendDate})
AND r.edit_time between #{dobeginDate} and #{doendDate}
</if>
order by r.task_time desc
</select>

View File

@@ -1,5 +1,7 @@
package com.nis.web.dao.systemService;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.nis.domain.ServiceConfigInfo;
@@ -8,4 +10,5 @@ import com.nis.web.dao.MyBatisDao;
@MyBatisDao
public interface ServiceConfigInfoDao extends CrudDao<ServiceConfigInfo>{
public ServiceConfigInfo findSysServiceConfigInfo(@Param("service_id")int serviceId);
public List<ServiceConfigInfo> findList(@Param("service_id")int serviceId);
}

View File

@@ -26,6 +26,20 @@
where
service_id=#{service_id} and is_valid=1
</select>
<select id="findList" resultMap="serviceConfigInfo">
select
id,
table_name,
table_desc,
table_type,
maat_table,
service_id,
is_valid
from
service_config_info
where
service_id=#{service_id} and is_valid=1
</select>
<insert id="insert">
insert into service_config_info (

View File

@@ -63,6 +63,7 @@ public class TaskInfoService extends BaseService{
for (int i = 0; i < exId.length; i++) {
taskInfo.setId(Long.valueOf(exId[i]));
taskInfo.setIsAudit(1);//审核通过
taskInfo.setIsValid(1);//审核通过
taskInfo.setAuditTime(new Date());
taskInfo.setAuditorId((UserUtils.getUser().getId()).intValue());//审核人员
taskInfoDao.update(taskInfo);
@@ -85,6 +86,7 @@ public class TaskInfoService extends BaseService{
for (int i = 0; i < cancelId.length; i++) {
taskInfo.setId(Long.valueOf(cancelId[i]));
taskInfo.setIsAudit(3);//取消审核通过
taskInfo.setIsValid(0);
taskInfo.setAuditTime(new Date());
taskInfo.setAuditorId((UserUtils.getUser().getId()).intValue());//审核人员
taskInfoDao.update(taskInfo);

View File

@@ -67,6 +67,7 @@ public class RequestInfoService extends BaseService{
for (int i = 0; i < exId.length; i++) {
requestInfo.setId(Long.valueOf(exId[i]));
requestInfo.setIsAudit(1);//审核通过
requestInfo.setIsValid(1);//审核通过有效
requestInfo.setAuditTime(new Date());
requestInfo.setAuditorId((UserUtils.getUser().getId()).intValue());//审核人员
requestInfoDao.update(requestInfo);
@@ -89,6 +90,7 @@ public class RequestInfoService extends BaseService{
for (int i = 0; i < cancelId.length; i++) {
requestInfo.setId(Long.valueOf(cancelId[i]));
requestInfo.setIsAudit(3);//取消审核通过
requestInfo.setIsValid(0);//取消审核通过无效
requestInfo.setAuditTime(new Date());
requestInfo.setAuditorId((UserUtils.getUser().getId()).intValue());//审核人员
requestInfoDao.update(requestInfo);

View File

@@ -1,5 +1,7 @@
package com.nis.web.service.systemService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -13,4 +15,7 @@ public class ServiceConfigInfoService {
public ServiceConfigInfo findSysServiceConfigInfo(int serviceId){
return serviceConfigInfoDao.findSysServiceConfigInfo(serviceId);
}
public List<ServiceConfigInfo> findList(int serviceId){
return serviceConfigInfoDao.findList(serviceId);
}
}