Merge remote-tracking branch 'origin/uat' into uat-examination

This commit is contained in:
fuqingji
2022-05-20 15:49:22 +08:00

View File

@ -9,20 +9,23 @@ import com.chinaunicom.mall.ebtp.project.projectentrust.entity.ebpentity.PurpImp
import com.chinaunicom.mall.ebtp.project.projectrecord.entity.ProjectRecord; import com.chinaunicom.mall.ebtp.project.projectrecord.entity.ProjectRecord;
import com.chinaunicom.mall.ebtp.project.projectsection.entity.ProjectSection; import com.chinaunicom.mall.ebtp.project.projectsection.entity.ProjectSection;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@Slf4j @Slf4j
@Service
public class CheckUtil { public class CheckUtil {
@Value("${check.porject.value}")
private static String checkValue[] = {"\t","\n","\r","<",">","|","\\","?",":","*","\""};//"/", private static String checkValue[];//"= {"\t","\n","\r","<",">","|","\\","?",":","*","\""}
@Value("${check.porject.length}") // = 200;
private static int checkBdNameLengh = 200; private static int checkLengh;
//zhqbin 20220428 update 增加对委托项目名称\t\r\n字符校验 //zhqbin 20220428 update 增加对委托项目名称\t\r\n字符校验
public static void checkEntrust(PurpImplementSendVO implementSendVO) { public static void checkEntrust(PurpImplementSendVO implementSendVO) {
log.error("------------------------校验非法字符----------------------------"); log.error("---------"+checkValue+"..等---------------校验非法字符----------------------------");
if(implementSendVO.getPurpImplementName()!=null){ if(implementSendVO.getPurpImplementName()!=null){
log.error("------------------------校验非法字符----------------------------项目名称:"+implementSendVO.getPurpImplementName()); log.error("------------------------校验非法字符----------------------------项目名称:"+implementSendVO.getPurpImplementName());
check(implementSendVO.getPurpImplementName()); check(implementSendVO.getPurpImplementName());
@ -72,8 +75,9 @@ public class CheckUtil {
} }
public static void checkBdNameLengh(String name,String value) { public static void checkBdNameLengh(String name,String value) {
log.info("-----长度限制"+checkLengh+"-----对"+name+"进行校验--------");
CommonExceptionEnum.FRAME_EXCEPTION_COMMON_DATA_OTHER_ERROR.customValidName("该委托,"+name+"长度过长", CommonExceptionEnum.FRAME_EXCEPTION_COMMON_DATA_OTHER_ERROR.customValidName("该委托,"+name+"长度过长",
getLength(value)>checkBdNameLengh) ; getLength(value)>checkLengh) ;
} }
/** /**