(1)特定服务管理UL修改
(2)特定服务管理加入协议号重复验证,有上级配置则上级配置的所有下级配置ID不能重复,无上级配置一级配置ID不能重复 (3)取消jBox的Cookie打印
This commit is contained in:
@@ -250,21 +250,32 @@ public class SpecificServiceCfgController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "isIdRepeat")
|
||||
public boolean isIdRepeat(String specServiceId,String oldId){
|
||||
if(oldId!=null){
|
||||
if(oldId.trim().equals(specServiceId)){
|
||||
return true;
|
||||
@RequestMapping(value = "isCodeNotRepeat")
|
||||
public boolean isIdRepeat(@RequestParam(required=false,value="parentId")Integer parentId,@RequestParam(required=false,value="specServiceId")Integer specServiceId,@RequestParam(required=true,value="specServiceCode")Integer specServiceCode,@RequestParam(required=true,value="cfgType")Integer cfgType){
|
||||
if(parentId!=null&&parentId.intValue()!=0) {
|
||||
Integer parentCode=specificServiceCfgService.getParentCode(parentId);
|
||||
if(parentCode!=null&&parentCode.intValue()==specServiceCode) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(specServiceId!=null){
|
||||
SpecificServiceCfg ss = specificServiceCfgService.getBySpecServiceId(Integer.valueOf(specServiceId));
|
||||
if(ss==null){
|
||||
return true;
|
||||
if(ss!=null){
|
||||
if(ss.getSpecServiceCode().intValue()==specServiceCode.intValue()&&cfgType.intValue()==ss.getCfgType().intValue()) {
|
||||
return true;
|
||||
}else {
|
||||
ss=specificServiceCfgService.getRepeat(specServiceCode, cfgType,parentId);
|
||||
if(ss==null) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}else {
|
||||
SpecificServiceCfg ss=specificServiceCfgService.getRepeat(specServiceCode, cfgType,parentId);
|
||||
if(ss==null) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,5 +48,7 @@ public interface SpecificServiceCfgDao extends CrudDao<SpecificServiceCfg> {
|
||||
|
||||
Integer updateConfigGroupInfobyGroupId(ConfigGroupInfo entity);
|
||||
Integer getParentType(Integer specServiceId);
|
||||
|
||||
Integer getParentCode(Integer specServiceId);
|
||||
SpecificServiceCfg getRepeat(@Param("specServiceCode")Integer code, @Param("cfgType")Integer cfgType,@Param("parentId")Integer parentId);
|
||||
|
||||
}
|
||||
@@ -37,10 +37,21 @@
|
||||
select <include refid="specificServiceCfgColumns" />
|
||||
from specific_service_cfg s where s.spec_service_id = #{specServiceId}
|
||||
</select>
|
||||
<select id="getRepeat" resultType="com.nis.domain.specific.SpecificServiceCfg" >
|
||||
select <include refid="specificServiceCfgColumns" />
|
||||
from specific_service_cfg s where s.spec_service_code = #{specServiceCode} and s.cfg_type=#{cfgType} and s.is_valid=1
|
||||
<if test="parentId != null and parentId !=''">
|
||||
and parent_id= #{parentId}
|
||||
</if>
|
||||
</select>
|
||||
<select id="getParentType" resultType="java.lang.Integer" parameterType="java.lang.Integer">
|
||||
select cfg_type
|
||||
from specific_service_cfg s where s.spec_service_id = #{specServiceId}
|
||||
</select>
|
||||
<select id="getParentCode" resultType="java.lang.Integer" parameterType="java.lang.Integer">
|
||||
select spec_service_code
|
||||
from specific_service_cfg s where s.spec_service_id = #{specServiceId}
|
||||
</select>
|
||||
|
||||
<!-- 查出所有符合条件的顶层数据 -->
|
||||
|
||||
|
||||
@@ -143,5 +143,11 @@ public class SpecificServiceCfgService extends BaseService{
|
||||
public Integer getParentType(Integer specServiceId) {
|
||||
return specificServiceCfgDao.getParentType(specServiceId);
|
||||
}
|
||||
|
||||
public Integer getParentCode(Integer specServiceId) {
|
||||
return specificServiceCfgDao.getParentCode(specServiceId);
|
||||
}
|
||||
public SpecificServiceCfg getRepeat (Integer code,Integer cfgType,Integer parentId) {
|
||||
return specificServiceCfgDao.getRepeat(code,cfgType,parentId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user