优化删除的逻辑,
This commit is contained in:
parent
d7ac39affc
commit
748ab2822e
|
|
@ -75,8 +75,9 @@ public class OwnerController {
|
||||||
|
|
||||||
// 输入验证:过滤掉可能的恶意字符
|
// 输入验证:过滤掉可能的恶意字符
|
||||||
String keyWord = (String) request.getParams().get("keyWord");
|
String keyWord = (String) request.getParams().get("keyWord");
|
||||||
if (keyWord != null && !keyWord.matches("[a-zA-Z0-9\\s]*")) { // 只允许字母、数字和空格
|
// 允许字母、数字、中文、空格、连字符、下划线、点(常用于型号或关键词)
|
||||||
throw new IllegalArgumentException("Invalid characters in keyWord.");
|
if (keyWord != null && !keyWord.matches("[a-zA-Z0-9\\u4e00-\\u9fa5\\s\\-_.]*")) {
|
||||||
|
throw new IllegalArgumentException("关键词包含非法字符,仅支持中英文、数字、空格及 - _ .");
|
||||||
}
|
}
|
||||||
|
|
||||||
return new PageTableHandler(new PageTableHandler.CountHandler() {
|
return new PageTableHandler(new PageTableHandler.CountHandler() {
|
||||||
|
|
|
||||||
|
|
@ -45,9 +45,10 @@ public class WorkPlanAllController {
|
||||||
public PageTableResponse listProjects(PageTableRequest request) {
|
public PageTableResponse listProjects(PageTableRequest request) {
|
||||||
// 输入验证:过滤掉可能的恶意字符
|
// 输入验证:过滤掉可能的恶意字符
|
||||||
String proName = (String) request.getParams().get("proName");
|
String proName = (String) request.getParams().get("proName");
|
||||||
if (proName != null && !proName.matches("[a-zA-Z0-9\\s]*")) { // 只允许字母、数字和空格
|
if (proName != null && !proName.matches("[a-zA-Z0-9\\u4e00-\\u9fa5\\s\\-_.]*")) { // 只允许字母、数字和空格
|
||||||
throw new IllegalArgumentException("Invalid characters in proName.");
|
throw new IllegalArgumentException("关键词包含非法字符,仅支持中英文、数字、空格及 - _ .");
|
||||||
}
|
}
|
||||||
|
|
||||||
return new PageTableHandler(new PageTableHandler.CountHandler() {
|
return new PageTableHandler(new PageTableHandler.CountHandler() {
|
||||||
@Override
|
@Override
|
||||||
public int count(PageTableRequest request) {
|
public int count(PageTableRequest request) {
|
||||||
|
|
|
||||||
|
|
@ -20,4 +20,9 @@ public class OrgBean {
|
||||||
|
|
||||||
private String companyIds;
|
private String companyIds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否可以删除,0可以删除,1不能删除
|
||||||
|
*/
|
||||||
|
private String isDel;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,4 +23,9 @@ public class OwnerBean {
|
||||||
|
|
||||||
private String isActive;
|
private String isActive;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否可以删除,0可以删除,1不能删除
|
||||||
|
*/
|
||||||
|
private String isDel;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,11 @@ public class ZNode {
|
||||||
|
|
||||||
private String icon;
|
private String icon;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否可以删除,0可以删除,1不能删除
|
||||||
|
*/
|
||||||
|
private String isDel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "ZNode{" +
|
return "ZNode{" +
|
||||||
|
|
@ -160,4 +165,12 @@ public class ZNode {
|
||||||
public void setForeignId(String foreignId) {
|
public void setForeignId(String foreignId) {
|
||||||
this.foreignId = foreignId;
|
this.foreignId = foreignId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getIsDel() {
|
||||||
|
return isDel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsDel(String isDel) {
|
||||||
|
this.isDel = isDel;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,8 +45,9 @@ public class WorkPayController {
|
||||||
|
|
||||||
// 输入验证:过滤掉可能的恶意字符
|
// 输入验证:过滤掉可能的恶意字符
|
||||||
String keyWord = (String) request.getParams().get("keyWord");
|
String keyWord = (String) request.getParams().get("keyWord");
|
||||||
if (keyWord != null && !keyWord.matches("[a-zA-Z0-9\\s]*")) { // 只允许字母、数字和空格
|
// 允许字母、数字、中文、空格、连字符、下划线、点(常用于型号或关键词)
|
||||||
throw new IllegalArgumentException("Invalid characters in keyWord.");
|
if (keyWord != null && !keyWord.matches("[a-zA-Z0-9\\u4e00-\\u9fa5\\s\\-_.]*")) {
|
||||||
|
throw new IllegalArgumentException("关键词包含非法字符,仅支持中英文、数字、空格及 - _ .");
|
||||||
}
|
}
|
||||||
|
|
||||||
String roleLevel = SecurityUtils.getLoginUser().getSysUser().getRoleLevel();
|
String roleLevel = SecurityUtils.getLoginUser().getSysUser().getRoleLevel();
|
||||||
|
|
|
||||||
|
|
@ -134,9 +134,11 @@ public class PlanAndRealNameController {
|
||||||
public PageTableResponse getFbListByCacheList(PageTableRequest request) {
|
public PageTableResponse getFbListByCacheList(PageTableRequest request) {
|
||||||
// 输入验证:过滤掉可能的恶意字符
|
// 输入验证:过滤掉可能的恶意字符
|
||||||
String keyWord = (String) request.getParams().get("keyWord");
|
String keyWord = (String) request.getParams().get("keyWord");
|
||||||
if (keyWord != null && !keyWord.matches("[a-zA-Z0-9\\s]*")) { // 只允许字母、数字和空格
|
// 允许字母、数字、中文、空格、连字符、下划线、点(常用于型号或关键词)
|
||||||
throw new IllegalArgumentException("Invalid characters in keyWord.");
|
if (keyWord != null && !keyWord.matches("[a-zA-Z0-9\\u4e00-\\u9fa5\\s\\-_.]*")) {
|
||||||
|
throw new IllegalArgumentException("关键词包含非法字符,仅支持中英文、数字、空格及 - _ .");
|
||||||
}
|
}
|
||||||
|
|
||||||
return new PageTableHandler(new PageTableHandler.CountHandler() {
|
return new PageTableHandler(new PageTableHandler.CountHandler() {
|
||||||
@Override
|
@Override
|
||||||
public int count(PageTableRequest request) {
|
public int count(PageTableRequest request) {
|
||||||
|
|
|
||||||
|
|
@ -44,8 +44,9 @@ public class SubContractController {
|
||||||
|
|
||||||
// 输入验证:过滤掉可能的恶意字符
|
// 输入验证:过滤掉可能的恶意字符
|
||||||
String keyWord = (String) request.getParams().get("keyWord");
|
String keyWord = (String) request.getParams().get("keyWord");
|
||||||
if (keyWord != null && !keyWord.matches("[a-zA-Z0-9\\s]*")) { // 只允许字母、数字和空格
|
// 允许字母、数字、中文、空格、连字符、下划线、点(常用于型号或关键词)
|
||||||
throw new IllegalArgumentException("Invalid characters in keyWord.");
|
if (keyWord != null && !keyWord.matches("[a-zA-Z0-9\\u4e00-\\u9fa5\\s\\-_.]*")) {
|
||||||
|
throw new IllegalArgumentException("关键词包含非法字符,仅支持中英文、数字、空格及 - _ .");
|
||||||
}
|
}
|
||||||
|
|
||||||
SelfPermissionSettingUtils.getSelfPermission(request);
|
SelfPermissionSettingUtils.getSelfPermission(request);
|
||||||
|
|
|
||||||
|
|
@ -41,13 +41,13 @@ public class SubContractorController {
|
||||||
public PageTableResponse listProjects(PageTableRequest request) {
|
public PageTableResponse listProjects(PageTableRequest request) {
|
||||||
// 输入验证:过滤掉可能的恶意字符
|
// 输入验证:过滤掉可能的恶意字符
|
||||||
String subName = (String) request.getParams().get("subName");
|
String subName = (String) request.getParams().get("subName");
|
||||||
if (subName != null && !subName.matches("[a-zA-Z0-9\\s]*")) { // 只允许字母、数字和空格
|
if (subName != null && !subName.matches("[a-zA-Z0-9\\u4e00-\\u9fa5\\s\\-_.]*")) { // 关键词包含非法字符,仅支持中英文、数字、空格及 - _ .
|
||||||
throw new IllegalArgumentException("Invalid characters in subName.");
|
throw new IllegalArgumentException("关键词包含非法字符,仅支持中英文、数字、空格及 - _ .");
|
||||||
}
|
}
|
||||||
|
|
||||||
String legalName = (String) request.getParams().get("legalName");
|
String legalName = (String) request.getParams().get("legalName");
|
||||||
if (legalName != null && !legalName.matches("[a-zA-Z0-9\\s]*")) { // 只允许字母、数字和空格
|
if (legalName != null && !legalName.matches("[a-zA-Z0-9\\u4e00-\\u9fa5\\s\\-_.]*")) { // 关键词包含非法字符,仅支持中英文、数字、空格及 - _ .
|
||||||
throw new IllegalArgumentException("Invalid characters in legalName.");
|
throw new IllegalArgumentException("关键词包含非法字符,仅支持中英文、数字、空格及 - _ .");
|
||||||
}
|
}
|
||||||
|
|
||||||
SelfPermissionSettingUtils.getSelfPermission(request);
|
SelfPermissionSettingUtils.getSelfPermission(request);
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,9 @@ public class SubContractorBean {
|
||||||
private int workingWorker;//在场 施工人员
|
private int workingWorker;//在场 施工人员
|
||||||
private int allWorker;//全部 施工人员
|
private int allWorker;//全部 施工人员
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否可以删除,0可以删除,1不能删除
|
||||||
|
*/
|
||||||
|
private String isDel;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -43,8 +43,9 @@ public class SubBlackController {
|
||||||
|
|
||||||
// 输入验证:过滤掉可能的恶意字符
|
// 输入验证:过滤掉可能的恶意字符
|
||||||
String keyWord = (String) request.getParams().get("keyWord");
|
String keyWord = (String) request.getParams().get("keyWord");
|
||||||
if (keyWord != null && !keyWord.matches("[a-zA-Z0-9\\s]*")) { // 只允许字母、数字和空格
|
// 允许字母、数字、中文、空格、连字符、下划线、点(常用于型号或关键词)
|
||||||
throw new IllegalArgumentException("Invalid characters in keyWord.");
|
if (keyWord != null && !keyWord.matches("[a-zA-Z0-9\\u4e00-\\u9fa5\\s\\-_.]*")) {
|
||||||
|
throw new IllegalArgumentException("关键词包含非法字符,仅支持中英文、数字、空格及 - _ .");
|
||||||
}
|
}
|
||||||
|
|
||||||
return new PageTableHandler(new PageTableHandler.CountHandler() {
|
return new PageTableHandler(new PageTableHandler.CountHandler() {
|
||||||
|
|
|
||||||
|
|
@ -28,9 +28,12 @@ public class SubCertificateTypeController {
|
||||||
public PageTableResponse getList(PageTableRequest request) {
|
public PageTableResponse getList(PageTableRequest request) {
|
||||||
// 输入验证:过滤掉可能的恶意字符
|
// 输入验证:过滤掉可能的恶意字符
|
||||||
String keyWord = (String) request.getParams().get("keyWord");
|
String keyWord = (String) request.getParams().get("keyWord");
|
||||||
if (keyWord != null && !keyWord.matches("[a-zA-Z0-9\\s]*")) { // 只允许字母、数字和空格
|
|
||||||
throw new IllegalArgumentException("Invalid characters in keyWord.");
|
// 允许字母、数字、中文、空格、连字符、下划线、点(常用于型号或关键词)
|
||||||
|
if (keyWord != null && !keyWord.matches("[a-zA-Z0-9\\u4e00-\\u9fa5\\s\\-_.]*")) {
|
||||||
|
throw new IllegalArgumentException("关键词包含非法字符,仅支持中英文、数字、空格及 - _ .");
|
||||||
}
|
}
|
||||||
|
|
||||||
int i = 0 ;
|
int i = 0 ;
|
||||||
return new PageTableHandler(new PageTableHandler.CountHandler() {
|
return new PageTableHandler(new PageTableHandler.CountHandler() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@ package com.bonus.bmw.subcontract.entity;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author fl
|
||||||
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class SubCertificateTypeBean {
|
public class SubCertificateTypeBean {
|
||||||
private String id; //
|
private String id; //
|
||||||
|
|
@ -10,4 +13,9 @@ public class SubCertificateTypeBean {
|
||||||
private String isDelete; //是否可以删除
|
private String isDelete; //是否可以删除
|
||||||
private String createTime; //创建时间
|
private String createTime; //创建时间
|
||||||
private String updateTime; //修改时间
|
private String updateTime; //修改时间
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否可以删除,0可以删除,1不能删除
|
||||||
|
*/
|
||||||
|
private String isDel;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,9 +37,10 @@ public class SubCompareController {
|
||||||
public PageTableResponse listSubCompany(PageTableRequest request) {
|
public PageTableResponse listSubCompany(PageTableRequest request) {
|
||||||
// 输入验证:过滤掉可能的恶意字符
|
// 输入验证:过滤掉可能的恶意字符
|
||||||
String subName = (String) request.getParams().get("subName");
|
String subName = (String) request.getParams().get("subName");
|
||||||
if (subName != null && !subName.matches("[a-zA-Z0-9\\s]*")) { // 只允许字母、数字和空格
|
if (subName != null && !subName.matches("[a-zA-Z0-9\\u4e00-\\u9fa5\\s\\-_.]*")) { // 关键词包含非法字符,仅支持中英文、数字、空格及 - _ .
|
||||||
throw new IllegalArgumentException("Invalid characters in subName.");
|
throw new IllegalArgumentException("关键词包含非法字符,仅支持中英文、数字、空格及 - _ .");
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, Object> params = request.getParams();
|
Map<String, Object> params = request.getParams();
|
||||||
String reasonSelect = (String) params.get("reasonSelect");
|
String reasonSelect = (String) params.get("reasonSelect");
|
||||||
if(StringUtils.isEmpty(reasonSelect)){
|
if(StringUtils.isEmpty(reasonSelect)){
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,8 @@ public class SubEndyearController {
|
||||||
|
|
||||||
// 输入验证:过滤掉可能的恶意字符
|
// 输入验证:过滤掉可能的恶意字符
|
||||||
String subName = (String) request.getParams().get("subName");
|
String subName = (String) request.getParams().get("subName");
|
||||||
if (subName != null && !subName.matches("[a-zA-Z0-9\\s]*")) { // 只允许字母、数字和空格
|
if (subName != null && !subName.matches("[a-zA-Z0-9\\u4e00-\\u9fa5\\s\\-_.]*")) { // 只允许字母、数字和空格
|
||||||
throw new IllegalArgumentException("Invalid characters in subName.");
|
throw new IllegalArgumentException("关键词包含非法字符,仅支持中英文、数字、空格及 - _ .");
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, Object> params = request.getParams();
|
Map<String, Object> params = request.getParams();
|
||||||
|
|
|
||||||
|
|
@ -173,8 +173,8 @@ public class SubProjectController {
|
||||||
public PageTableResponse getList(PageTableRequest request) {
|
public PageTableResponse getList(PageTableRequest request) {
|
||||||
|
|
||||||
String subName = (String) request.getParams().get("subName");
|
String subName = (String) request.getParams().get("subName");
|
||||||
if (subName != null && !subName.matches("[a-zA-Z0-9\\s]*")) { // 只允许字母、数字和空格
|
if (subName != null && !subName.matches("[a-zA-Z0-9\\u4e00-\\u9fa5\\s\\-_.]*")) { // 只允许字母、数字和空格
|
||||||
throw new IllegalArgumentException("Invalid characters in subName.");
|
throw new IllegalArgumentException("关键词包含非法字符,仅支持中英文、数字、空格及 - _ .");
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, Object> params = request.getParams();
|
Map<String, Object> params = request.getParams();
|
||||||
|
|
|
||||||
|
|
@ -71,8 +71,9 @@ public class JobPointSettingController {
|
||||||
|
|
||||||
// 输入验证:过滤掉可能的恶意字符
|
// 输入验证:过滤掉可能的恶意字符
|
||||||
String keyWord = (String) request.getParams().get("keyWord");
|
String keyWord = (String) request.getParams().get("keyWord");
|
||||||
if (keyWord != null && !keyWord.matches("[a-zA-Z0-9\\s]*")) { // 只允许字母、数字和空格
|
// 允许字母、数字、中文、空格、连字符、下划线、点(常用于型号或关键词)
|
||||||
throw new IllegalArgumentException("Invalid characters in keyWord.");
|
if (keyWord != null && !keyWord.matches("[a-zA-Z0-9\\u4e00-\\u9fa5\\s\\-_.]*")) {
|
||||||
|
throw new IllegalArgumentException("关键词包含非法字符,仅支持中英文、数字、空格及 - _ .");
|
||||||
}
|
}
|
||||||
|
|
||||||
return new PageTableHandler(new PageTableHandler.CountHandler() {
|
return new PageTableHandler(new PageTableHandler.CountHandler() {
|
||||||
|
|
|
||||||
|
|
@ -55,8 +55,9 @@ public class NoSignalTeamAttendController {
|
||||||
public PageTableResponse listProjects(PageTableRequest request) {
|
public PageTableResponse listProjects(PageTableRequest request) {
|
||||||
// 输入验证:过滤掉可能的恶意字符
|
// 输入验证:过滤掉可能的恶意字符
|
||||||
String keyWord = (String) request.getParams().get("keyWord");
|
String keyWord = (String) request.getParams().get("keyWord");
|
||||||
if (keyWord != null && !keyWord.matches("[a-zA-Z0-9\\s]*")) { // 只允许字母、数字和空格
|
// 允许字母、数字、中文、空格、连字符、下划线、点(常用于型号或关键词)
|
||||||
throw new IllegalArgumentException("Invalid characters in keyWord.");
|
if (keyWord != null && !keyWord.matches("[a-zA-Z0-9\\u4e00-\\u9fa5\\s\\-_.]*")) {
|
||||||
|
throw new IllegalArgumentException("关键词包含非法字符,仅支持中英文、数字、空格及 - _ .");
|
||||||
}
|
}
|
||||||
|
|
||||||
String roleLevel = SecurityUtils.getLoginUser().getSysUser().getRoleLevel();
|
String roleLevel = SecurityUtils.getLoginUser().getSysUser().getRoleLevel();
|
||||||
|
|
|
||||||
|
|
@ -36,8 +36,9 @@ public class NoSignalTeamSetUpController {
|
||||||
|
|
||||||
// 输入验证:过滤掉可能的恶意字符
|
// 输入验证:过滤掉可能的恶意字符
|
||||||
String keyWord = (String) request.getParams().get("keyWord");
|
String keyWord = (String) request.getParams().get("keyWord");
|
||||||
if (keyWord != null && !keyWord.matches("[a-zA-Z0-9\\s]*")) { // 只允许字母、数字和空格
|
// 允许字母、数字、中文、空格、连字符、下划线、点(常用于型号或关键词)
|
||||||
throw new IllegalArgumentException("Invalid characters in keyWord.");
|
if (keyWord != null && !keyWord.matches("[a-zA-Z0-9\\u4e00-\\u9fa5\\s\\-_.]*")) {
|
||||||
|
throw new IllegalArgumentException("关键词包含非法字符,仅支持中英文、数字、空格及 - _ .");
|
||||||
}
|
}
|
||||||
|
|
||||||
String roleLevel = SecurityUtils.getLoginUser().getSysUser().getRoleLevel();
|
String roleLevel = SecurityUtils.getLoginUser().getSysUser().getRoleLevel();
|
||||||
|
|
|
||||||
|
|
@ -56,29 +56,29 @@ public class SupplyChainBlackListController {
|
||||||
public PageTableResponse getBlackList(PageTableRequest request) {
|
public PageTableResponse getBlackList(PageTableRequest request) {
|
||||||
// 输入验证:过滤掉可能的恶意字符
|
// 输入验证:过滤掉可能的恶意字符
|
||||||
String event = (String) request.getParams().get("event");
|
String event = (String) request.getParams().get("event");
|
||||||
if (event != null && !event.matches("[a-zA-Z0-9\\s]*")) { // 只允许字母、数字和空格
|
if (event != null && !event.matches("[a-zA-Z0-9\\u4e00-\\u9fa5\\s\\-_.]*")) { // 关键词包含非法字符,仅支持中英文、数字、空格及 - _ .
|
||||||
throw new IllegalArgumentException("Invalid characters in event.");
|
throw new IllegalArgumentException("关键词包含非法字符,仅支持中英文、数字、空格及 - _ .");
|
||||||
}
|
}
|
||||||
|
|
||||||
String idNumber = (String) request.getParams().get("idNumber");
|
String idNumber = (String) request.getParams().get("idNumber");
|
||||||
if (idNumber != null && !idNumber.matches("[a-zA-Z0-9\\s]*")) { // 只允许字母、数字和空格
|
if (idNumber != null && !idNumber.matches("[a-zA-Z0-9\\u4e00-\\u9fa5\\s\\-_.]*")) { // 关键词包含非法字符,仅支持中英文、数字、空格及 - _ .
|
||||||
throw new IllegalArgumentException("Invalid characters in idNumber.");
|
throw new IllegalArgumentException("关键词包含非法字符,仅支持中英文、数字、空格及 - _ .");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
String name = (String) request.getParams().get("name");
|
String name = (String) request.getParams().get("name");
|
||||||
if (name != null && !name.matches("[a-zA-Z0-9\\s]*")) { // 只允许字母、数字和空格
|
if (name != null && !name.matches("[a-zA-Z0-9\\u4e00-\\u9fa5\\s\\-_.]*")) { // 关键词包含非法字符,仅支持中英文、数字、空格及 - _ .
|
||||||
throw new IllegalArgumentException("Invalid characters in name.");
|
throw new IllegalArgumentException("关键词包含非法字符,仅支持中英文、数字、空格及 - _ .");
|
||||||
}
|
}
|
||||||
|
|
||||||
String proName = (String) request.getParams().get("proName");
|
String proName = (String) request.getParams().get("proName");
|
||||||
if (proName != null && !proName.matches("[a-zA-Z0-9\\s]*")) { // 只允许字母、数字和空格
|
if (proName != null && !proName.matches("[a-zA-Z0-9\\u4e00-\\u9fa5\\s\\-_.]*")) { // 关键词包含非法字符,仅支持中英文、数字、空格及 - _ .
|
||||||
throw new IllegalArgumentException("Invalid characters in proName.");
|
throw new IllegalArgumentException("关键词包含非法字符,仅支持中英文、数字、空格及 - _ .");
|
||||||
}
|
}
|
||||||
|
|
||||||
String subName = (String) request.getParams().get("subName");
|
String subName = (String) request.getParams().get("subName");
|
||||||
if (subName != null && !subName.matches("[a-zA-Z0-9\\s]*")) { // 只允许字母、数字和空格
|
if (subName != null && !subName.matches("[a-zA-Z0-9\\u4e00-\\u9fa5\\s\\-_.]*")) { // 关键词包含非法字符,仅支持中英文、数字、空格及 - _ .
|
||||||
throw new IllegalArgumentException("Invalid characters in subName.");
|
throw new IllegalArgumentException("关键词包含非法字符,仅支持中英文、数字、空格及 - _ .");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,29 +55,29 @@ public class ViolationBlackListController {
|
||||||
|
|
||||||
// 输入验证:过滤掉可能的恶意字符
|
// 输入验证:过滤掉可能的恶意字符
|
||||||
String event = (String) request.getParams().get("event");
|
String event = (String) request.getParams().get("event");
|
||||||
if (event != null && !event.matches("[a-zA-Z0-9\\s]*")) { // 只允许字母、数字和空格
|
if (event != null && !event.matches("[a-zA-Z0-9\\u4e00-\\u9fa5\\s\\-_.]*")) { // 关键词包含非法字符,仅支持中英文、数字、空格及 - _ .
|
||||||
throw new IllegalArgumentException("Invalid characters in event.");
|
throw new IllegalArgumentException("关键词包含非法字符,仅支持中英文、数字、空格及 - _ .");
|
||||||
}
|
}
|
||||||
|
|
||||||
String idNumber = (String) request.getParams().get("idNumber");
|
String idNumber = (String) request.getParams().get("idNumber");
|
||||||
if (idNumber != null && !idNumber.matches("[a-zA-Z0-9\\s]*")) { // 只允许字母、数字和空格
|
if (idNumber != null && !idNumber.matches("[a-zA-Z0-9\\u4e00-\\u9fa5\\s\\-_.]*")) { // 关键词包含非法字符,仅支持中英文、数字、空格及 - _ .
|
||||||
throw new IllegalArgumentException("Invalid characters in idNumber.");
|
throw new IllegalArgumentException("关键词包含非法字符,仅支持中英文、数字、空格及 - _ .");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
String name = (String) request.getParams().get("name");
|
String name = (String) request.getParams().get("name");
|
||||||
if (name != null && !name.matches("[a-zA-Z0-9\\s]*")) { // 只允许字母、数字和空格
|
if (name != null && !name.matches("[a-zA-Z0-9\\u4e00-\\u9fa5\\s\\-_.]*")) { // 关键词包含非法字符,仅支持中英文、数字、空格及 - _ .
|
||||||
throw new IllegalArgumentException("Invalid characters in name.");
|
throw new IllegalArgumentException("关键词包含非法字符,仅支持中英文、数字、空格及 - _ .");
|
||||||
}
|
}
|
||||||
|
|
||||||
String proName = (String) request.getParams().get("proName");
|
String proName = (String) request.getParams().get("proName");
|
||||||
if (proName != null && !proName.matches("[a-zA-Z0-9\\s]*")) { // 只允许字母、数字和空格
|
if (proName != null && !proName.matches("[a-zA-Z0-9\\u4e00-\\u9fa5\\s\\-_.]*")) { // 关键词包含非法字符,仅支持中英文、数字、空格及 - _ .
|
||||||
throw new IllegalArgumentException("Invalid characters in proName.");
|
throw new IllegalArgumentException("关键词包含非法字符,仅支持中英文、数字、空格及 - _ .");
|
||||||
}
|
}
|
||||||
|
|
||||||
String subName = (String) request.getParams().get("subName");
|
String subName = (String) request.getParams().get("subName");
|
||||||
if (subName != null && !subName.matches("[a-zA-Z0-9\\s]*")) { // 只允许字母、数字和空格
|
if (subName != null && !subName.matches("[a-zA-Z0-9\\u4e00-\\u9fa5\\s\\-_.]*")) { // 关键词包含非法字符,仅支持中英文、数字、空格及 - _ .
|
||||||
throw new IllegalArgumentException("Invalid characters in subName.");
|
throw new IllegalArgumentException("关键词包含非法字符,仅支持中英文、数字、空格及 - _ .");
|
||||||
}
|
}
|
||||||
|
|
||||||
return new PageTableHandler(new PageTableHandler.CountHandler() {
|
return new PageTableHandler(new PageTableHandler.CountHandler() {
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,8 @@
|
||||||
bs.back_idcard_path as backIdcardPath,
|
bs.back_idcard_path as backIdcardPath,
|
||||||
bs.seal_path as sealPath,
|
bs.seal_path as sealPath,
|
||||||
bs.sign_path as signPath,
|
bs.sign_path as signPath,
|
||||||
count(DISTINCT bsc.sub_id) as subContractNum
|
count(DISTINCT bsc.sub_id) as subContractNum,
|
||||||
|
IF(bsc.sub_id IS NOT NULL, 1, 0) AS isDel
|
||||||
from
|
from
|
||||||
bm_subcontractor bs
|
bm_subcontractor bs
|
||||||
LEFT JOIN pm_organization po ON po.id = bs.org_id and po.IS_ACTIVE = '1'
|
LEFT JOIN pm_organization po ON po.id = bs.org_id and po.IS_ACTIVE = '1'
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,12 @@
|
||||||
po.PARENT_ID AS pId ,
|
po.PARENT_ID AS pId ,
|
||||||
po.COMPANY_ID as companyId,
|
po.COMPANY_ID as companyId,
|
||||||
po.`NAME` as name,
|
po.`NAME` as name,
|
||||||
po.foreign_id as foreignId
|
po.foreign_id as foreignId,
|
||||||
|
IF(bp.id IS NOT NULL, 1, 0) AS isDel
|
||||||
FROM
|
FROM
|
||||||
pm_organization po
|
pm_organization po
|
||||||
LEFT JOIN pm_company pc on po.COMPANY_ID = pc.ID
|
LEFT JOIN pm_company pc on po.COMPANY_ID = pc.ID
|
||||||
|
LEFT JOIN bm_project bp ON bp.company_id = po.id AND bp.is_active = '1'
|
||||||
WHERE
|
WHERE
|
||||||
po.is_active = '1'
|
po.is_active = '1'
|
||||||
<if test="companyId!=null and companyId!='' ">
|
<if test="companyId!=null and companyId!='' ">
|
||||||
|
|
@ -23,7 +25,7 @@
|
||||||
<if test="childList!=null and childList!='' ">
|
<if test="childList!=null and childList!='' ">
|
||||||
and po.ID in (${childList})
|
and po.ID in (${childList})
|
||||||
</if>
|
</if>
|
||||||
|
GROUP BY po.ID
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getAllRl" parameterType="com.bonus.bmw.basic.entity.OrgBean" resultMap="ZNode">
|
<select id="getAllRl" parameterType="com.bonus.bmw.basic.entity.OrgBean" resultMap="ZNode">
|
||||||
|
|
|
||||||
|
|
@ -3,14 +3,14 @@
|
||||||
<mapper namespace="com.bonus.bmw.basic.dao.OwnerDao">
|
<mapper namespace="com.bonus.bmw.basic.dao.OwnerDao">
|
||||||
|
|
||||||
<insert id="addOwner">
|
<insert id="addOwner">
|
||||||
INSERT INTO `bm_owner`( `name` ,`owner_name`, `owner_phone`,`create_time`, `update_time`, `is_active`)
|
INSERT INTO `bm_owner`(`name`, `owner_name`, `owner_phone`, `create_time`, `update_time`, `is_active`)
|
||||||
VALUES (#{name},#{ownerName}, #{ownerPhone}, now(), now(), '1');
|
VALUES (#{name}, #{ownerName}, #{ownerPhone}, now(), now(), '1');
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<insert id="importData">
|
<insert id="importData">
|
||||||
INSERT INTO `bm_owner`( `name` ,`owner_name`, `owner_phone`,`create_time`, `update_time`, `is_active`)
|
INSERT INTO `bm_owner`( `name` ,`owner_name`, `owner_phone`,`create_time`, `update_time`, `is_active`)
|
||||||
VALUES
|
VALUES
|
||||||
<foreach item="item" collection="list" separator="," index="index" >
|
<foreach item="item" collection="list" separator="," index="index">
|
||||||
(
|
(
|
||||||
#{item.name},
|
#{item.name},
|
||||||
#{item.ownerName},
|
#{item.ownerName},
|
||||||
|
|
@ -23,55 +23,78 @@
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<select id="addOwnerIsPd" resultType="java.lang.Integer">
|
<select id="addOwnerIsPd" resultType="java.lang.Integer">
|
||||||
select count(*) from bm_owner where `name` = #{name} and owner_name = #{ownerName}
|
select count(*)
|
||||||
|
from bm_owner
|
||||||
|
where `name` = #{name}
|
||||||
|
and owner_name = #{ownerName}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="updateOwner">
|
<update id="updateOwner">
|
||||||
update bm_owner
|
update bm_owner
|
||||||
set `name` = #{name},
|
set `name` = #{name},
|
||||||
owner_name = #{ownerName},
|
owner_name = #{ownerName},
|
||||||
owner_phone = #{ownerPhone},
|
owner_phone = #{ownerPhone},
|
||||||
update_time = now()
|
update_time = now()
|
||||||
where ID = #{id}
|
where ID = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<delete id="deleteOwner">
|
<delete id="deleteOwner">
|
||||||
update bm_owner set is_active = '0' where id = #{id}
|
update bm_owner
|
||||||
|
set is_active = '0'
|
||||||
|
where id = #{id}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<select id="getOwnerList" resultType="com.bonus.bmw.basic.entity.OwnerBean">
|
<select id="getOwnerList" resultType="com.bonus.bmw.basic.entity.OwnerBean">
|
||||||
SELECT id,`name`,owner_name as ownerName,owner_phone as ownerPhone FROM bm_owner
|
SELECT bo.id,
|
||||||
where is_active = '1'
|
bo.`name`,
|
||||||
|
bo.owner_name AS ownerName,
|
||||||
|
bo.owner_phone AS ownerPhone,
|
||||||
|
bp.id ,
|
||||||
|
IF(bp.id IS NOT NULL, 1, 0) AS isDel
|
||||||
|
FROM bm_owner bo
|
||||||
|
LEFT JOIN bm_project bp ON bp.owner_id = bo.id AND bp.is_active ='1'
|
||||||
|
where bo.is_active = '1'
|
||||||
<if test="params.keyWord != null and params.keyWord != ''">
|
<if test="params.keyWord != null and params.keyWord != ''">
|
||||||
and (
|
and (
|
||||||
owner_name like concat('%', #{params.keyWord}, '%') or
|
bo.owner_name like concat('%', #{params.keyWord}, '%') or
|
||||||
owner_phone like concat('%', #{params.keyWord}, '%') or
|
bo.owner_phone like concat('%', #{params.keyWord}, '%') or
|
||||||
`name` like concat('%', #{params.keyWord}, '%'))
|
bo.`name` like concat('%', #{params.keyWord}, '%'))
|
||||||
</if>
|
</if>
|
||||||
GROUP BY update_time desc
|
GROUP BY bo.id
|
||||||
|
ORDER BY bo.update_time desc
|
||||||
limit #{offset},#{limit}
|
limit #{offset},#{limit}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getOwnerCount" resultType="java.lang.Integer">
|
<select id="getOwnerCount" resultType="java.lang.Integer">
|
||||||
SELECT count(id) FROM bm_owner where is_active = '1'
|
SELECT count(*) FROM(
|
||||||
|
SELECT bo.id,
|
||||||
|
bo.`name`,
|
||||||
|
bo.owner_name AS ownerName,
|
||||||
|
bo.owner_phone AS ownerPhone
|
||||||
|
FROM bm_owner bo
|
||||||
|
where bo.is_active = '1'
|
||||||
<if test="params.keyWord != null and params.keyWord != ''">
|
<if test="params.keyWord != null and params.keyWord != ''">
|
||||||
and (
|
and (
|
||||||
owner_name like concat('%', #{params.keyWord}, '%') or
|
bo.owner_name like concat('%', #{params.keyWord}, '%') or
|
||||||
owner_phone like concat('%', #{params.keyWord}, '%') or
|
bo.owner_phone like concat('%', #{params.keyWord}, '%') or
|
||||||
`name` like concat('%', #{params.keyWord}, '%'))
|
bo.`name` like concat('%', #{params.keyWord}, '%'))
|
||||||
</if>
|
</if>
|
||||||
|
)a
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getOwnerById" resultType="com.bonus.bmw.basic.entity.OwnerBean">
|
<select id="getOwnerById" resultType="com.bonus.bmw.basic.entity.OwnerBean">
|
||||||
SELECT id,name,owner_name as ownerName,owner_phone as ownerPhone FROM bm_owner
|
SELECT id, name, owner_name as ownerName, owner_phone as ownerPhone
|
||||||
where is_active = '1' and id = #{id}
|
FROM bm_owner
|
||||||
|
where is_active = '1'
|
||||||
|
and id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getOwnerByName" resultType="java.lang.Integer">
|
<select id="getOwnerByName" resultType="java.lang.Integer">
|
||||||
SELECT count(*) FROM bm_owner
|
SELECT count(*)
|
||||||
|
FROM bm_owner
|
||||||
where is_active = '1'
|
where is_active = '1'
|
||||||
and `name` = #{name}
|
and `name` = #{name}
|
||||||
and owner_name = #{ownerName}
|
and owner_name = #{ownerName}
|
||||||
and owner_phone = #{ownerPhone}
|
and owner_phone = #{ownerPhone}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -26,8 +26,10 @@
|
||||||
bsct.remake AS remake,
|
bsct.remake AS remake,
|
||||||
bsct.is_delete AS isDelete,
|
bsct.is_delete AS isDelete,
|
||||||
bsct.create_time AS createTime,
|
bsct.create_time AS createTime,
|
||||||
bsct.update_time AS updateTime
|
bsct.update_time AS updateTime,
|
||||||
|
IF(bsc.id IS NOT NULL, 1, 0) AS isDel
|
||||||
FROM bm_subcontractor_certificate_type bsct
|
FROM bm_subcontractor_certificate_type bsct
|
||||||
|
LEFT JOIN bm_subcontractor_certificate bsc ON bsct.id = bsc.certificate_id and bsc.is_active='1'
|
||||||
WHERE bsct.is_active = '1'
|
WHERE bsct.is_active = '1'
|
||||||
<if test="params.keyWord != null and params.keyWord != ''">
|
<if test="params.keyWord != null and params.keyWord != ''">
|
||||||
and (
|
and (
|
||||||
|
|
@ -36,6 +38,7 @@
|
||||||
bsct.update_time like concat('%', #{params.keyWord}, '%')
|
bsct.update_time like concat('%', #{params.keyWord}, '%')
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
|
GROUP BY bsct.id
|
||||||
limit #{offset},#{limit}
|
limit #{offset},#{limit}
|
||||||
</select>
|
</select>
|
||||||
<select id="getListCount" resultType="java.lang.Integer">
|
<select id="getListCount" resultType="java.lang.Integer">
|
||||||
|
|
|
||||||
|
|
@ -102,9 +102,12 @@ function init() {
|
||||||
"orderable": false,
|
"orderable": false,
|
||||||
"render": function (data, type, row) {
|
"render": function (data, type, row) {
|
||||||
var id = row['id'];
|
var id = row['id'];
|
||||||
|
var isDel = row['isDel'];
|
||||||
var html = '';
|
var html = '';
|
||||||
html += buttonEdits(id, "sys:owner:add", pers);
|
html += buttonEdits(id, "sys:owner:add", pers);
|
||||||
html += buttonDel(id, "sys:owner:del", pers);
|
if(isDel == 0 || isDel == '0'){
|
||||||
|
html += buttonDel(id, "sys:owner:del", pers);
|
||||||
|
}
|
||||||
html += buttonView(id, "sys:owner:query", pers);
|
html += buttonView(id, "sys:owner:query", pers);
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -63,16 +63,23 @@ function beforeRename(treeId, treeNode, newName) {
|
||||||
|
|
||||||
//确认是否删除+删除处理
|
//确认是否删除+删除处理
|
||||||
function beforeRemove(treeId, treeNode) {
|
function beforeRemove(treeId, treeNode) {
|
||||||
|
console.log("项目部(组织管理)",treeNode)
|
||||||
if(treeNode.id==1){
|
if(treeNode.id==1){
|
||||||
layer.alert("根节点不能删除",{
|
layer.alert("根节点不能删除",{
|
||||||
icon: 2,
|
icon: 2,
|
||||||
time: 2000
|
time: 3000
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}else if(treeNode.foreignId != null){
|
}else if(treeNode.isDel =="1" || treeNode.isDel ==1){
|
||||||
|
layer.alert("此节点在“专业录入”功能中使用不能删除!",{
|
||||||
|
icon: 2,
|
||||||
|
time: 3000
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
} else if(treeNode.foreignId != null){
|
||||||
layer.alert("模块公司节点在此不能删除!",{
|
layer.alert("模块公司节点在此不能删除!",{
|
||||||
icon: 2,
|
icon: 2,
|
||||||
time: 2000
|
time: 3000
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -151,9 +151,12 @@ function init() {
|
||||||
"render": function (data, type, row) {
|
"render": function (data, type, row) {
|
||||||
var id = row['id'];
|
var id = row['id'];
|
||||||
var subContractNum = row['subContractNum'];
|
var subContractNum = row['subContractNum'];
|
||||||
|
var isDel = row['isDel'];
|
||||||
var html = '';
|
var html = '';
|
||||||
html += buttonEdits(id, "sys:subContractor:update", pers);
|
html += buttonEdits(id, "sys:subContractor:update", pers);
|
||||||
html += buttonDel(id,subContractNum, "sys:subContractor:del", pers);
|
if(isDel == 0 || isDel == '0'){
|
||||||
|
html += buttonDel(id,subContractNum, "sys:subContractor:del", pers);
|
||||||
|
}
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -102,10 +102,13 @@ function init() {
|
||||||
"render": function (data, type, row) {
|
"render": function (data, type, row) {
|
||||||
var id = row['id']
|
var id = row['id']
|
||||||
var isDelete = row['isDelete']
|
var isDelete = row['isDelete']
|
||||||
|
var isDel = row['isDel']
|
||||||
var html = ''
|
var html = ''
|
||||||
if(isDelete == '0'){
|
if(isDelete == '0'){
|
||||||
html += buttonUpd(id, "sys:subCertificateType:update", pers);
|
html += buttonUpd(id, "sys:subCertificateType:update", pers);
|
||||||
html += buttonDel(id, "sys:subCertificateType:del", pers);
|
if(isDel == '0' || isDel == 0){
|
||||||
|
html += buttonDel(id, "sys:subCertificateType:del", pers);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -294,6 +294,7 @@
|
||||||
bsct.id,
|
bsct.id,
|
||||||
bsct.`name`
|
bsct.`name`
|
||||||
FROM bm_subcontractor_certificate_type bsct
|
FROM bm_subcontractor_certificate_type bsct
|
||||||
|
WHERE is_active = '1'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getCertificateSub" resultType="com.bonus.system.api.domain.SelectBean">
|
<select id="getCertificateSub" resultType="com.bonus.system.api.domain.SelectBean">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue