Commit 66012e05 by wuchao

新版本

parent aa9594ad
package com.chenyang.nse.bussiness.controller.core;
import com.alibaba.fastjson.JSONObject;
import com.chenyang.nse.bussiness.commmon.json.ErrCode;
import com.chenyang.nse.bussiness.commmon.json.RespHelper;
import com.chenyang.nse.bussiness.commmon.json.Response;
import com.chenyang.nse.bussiness.config.PropertiesLoaderUtils;
import com.chenyang.nse.bussiness.dao.table.core.TCoreComplianceDirectoryDao;
import com.chenyang.nse.bussiness.entity.cache.LoginUser;
import com.chenyang.nse.bussiness.entity.orm.table.core.DgDefineRule;
import com.chenyang.nse.bussiness.entity.orm.table.core.TCoreAttachmentDirectory;
import com.chenyang.nse.bussiness.entity.orm.table.core.TCoreComplianceDirectory;
import com.chenyang.nse.bussiness.entity.vo.datascope.ComplianceDirectoryReqVO;
import com.chenyang.nse.bussiness.entity.vo.datascope.ComplianceDirectoryVO;
import com.chenyang.nse.bussiness.service.console.OperationService;
import com.chenyang.nse.bussiness.service.core.ComplianceDirectoryService;
import com.chenyang.nse.bussiness.service.core.SearchFieldService;
import com.chenyang.nse.bussiness.tools.io.FileTool;
import com.chenyang.nse.bussiness.tools.login.CommonUtils;
import com.chenyang.nse.bussiness.tools.office.ExcelTool;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URLEncoder;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Restrictions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
@Controller
@RequestMapping({"/core/compliancedirectory"})
public class ComplianceDirectoryController {
public static final String Excel_Model_Down = "compliancedirectory.xlsx";
@Autowired
private ComplianceDirectoryService complianceDirectoryService;
@Autowired
private SearchFieldService searchFieldService;
@Autowired
private OperationService operationService;
@Autowired
TCoreComplianceDirectoryDao directoryDao;
@RequestMapping
public String index(HttpServletRequest request, HttpServletResponse response, Model model) {
String id = request.getParameter("id");
model.addAttribute("id", id);
return "core/compliancedirectory/compliancedirbase";
}
@ResponseBody
@RequestMapping({"/saveInfo"})
public Response<String> saveInfo(@RequestParam("file") MultipartFile file, @RequestParam("userName") String userName, @RequestParam("attachment_name") String attachment_name, @RequestParam("attachment_size") String attachment_size, @RequestParam("attachment_form") String attachment_form, @RequestParam("attachment_id") String attachment_id, @RequestParam("file_note") String file_note) {
TCoreAttachmentDirectory dir = new TCoreAttachmentDirectory();
dir.setCreate_user(userName);
dir.setAttachment_name(attachment_name);
dir.setAttachment_form(attachment_form);
dir.setAttachment_size(attachment_size);
dir.setFile_note(file_note);
dir.setAttachment_id(attachment_id);
this.complianceDirectoryService.complianceDirectorySave(file, dir);
return RespHelper.<String>successResp();
}
@ResponseBody
@RequestMapping({"/saveEdit"})
public Response<String> saveEdit(@RequestBody Map<String, String> map) {
String id = (String)map.get("id");
String file_note = (String)map.get("file_note");
String userName = (String)map.get("userName");
TCoreAttachmentDirectory dir = new TCoreAttachmentDirectory();
dir.setId(id);
dir.setFile_note(file_note);
dir.setCreate_user(userName);
this.complianceDirectoryService.complianceDirectorySaveEdit(dir);
return RespHelper.<String>successResp();
}
@ResponseBody
@RequestMapping({"/selectfilelist"})
public Response<List<TCoreAttachmentDirectory>> selectfilelist(@RequestBody TCoreAttachmentDirectory vo) {
List<TCoreAttachmentDirectory> list = this.complianceDirectoryService.getselectfilelist(vo.getId());
return RespHelper.<List<TCoreAttachmentDirectory>>successResp(list);
}
@ResponseBody
@RequestMapping({"/save"})
public Response<String> save(@RequestBody ComplianceDirectoryReqVO vo) {
boolean isRepeat = false;
String id = vo.getComplianceDirectoryVO().getTid();
String fa_tid = vo.getComplianceDirectoryVO().getFa_tid() == null ? "全部" : vo.getComplianceDirectoryVO().getFa_tid();
for(TCoreComplianceDirectory edition : this.directoryDao.queryAll(new Criterion[]{Restrictions.eq("directory_name", vo.getComplianceDirectoryVO().getText()), Restrictions.eq("edition_id", vo.getComplianceDirectoryVO().getEdition_id()), Restrictions.eq("fa_tid", fa_tid)})) {
isRepeat = true;
if (id == null) {
return RespHelper.<String>errResp(ErrCode.DATA_IS_EXIST);
}
if (edition.getId().equals(id)) {
isRepeat = false;
break;
}
}
if (isRepeat) {
return RespHelper.<String>errResp(ErrCode.DATA_IS_EXIST);
} else {
LoginUser loginUser = vo.getLoginUser();
DgDefineRule record = new DgDefineRule();
record.setOperationUser(loginUser.getTsysUser().getUsername());
record.setOperationtime(new Date());
record.setModule("法律法规定义");
record.setFlag("1");
vo.getComplianceDirectoryVO().setCreate_user(loginUser.getTsysUser().getUsername());
this.complianceDirectoryService.save(vo.getComplianceDirectoryVO());
if (vo.getComplianceDirectoryVO().getTid() == null) {
record.setLogmessage("新增法律法规定义");
} else {
record.setLogmessage("编辑法律法规定义");
}
this.operationService.addDefineLog(record);
return RespHelper.<String>successResp();
}
}
@ResponseBody
@RequestMapping({"/getscopetable"})
public Response<List<ComplianceDirectoryVO>> getScopeTable(@RequestBody ComplianceDirectoryVO vo) {
List<ComplianceDirectoryVO> table = this.complianceDirectoryService.getScopeTable(vo);
return RespHelper.<List<ComplianceDirectoryVO>>successResp(table);
}
@ResponseBody
@RequestMapping({"/remove"})
public Response<String> remove(@RequestBody ComplianceDirectoryVO vo) {
this.complianceDirectoryService.remove(vo.getTid());
DgDefineRule record = new DgDefineRule();
record.setOperationUser(CommonUtils.loginUsername());
record.setFlag("1");
record.setOperationtime(new Date());
record.setModule("法律法规定义");
record.setLogmessage("删除法律法规定义");
return RespHelper.<String>successResp();
}
@ResponseBody
@RequestMapping({"/editbyid"})
public Response<ComplianceDirectoryVO> editbyid(@RequestBody ComplianceDirectoryVO vo) {
ComplianceDirectoryVO data = this.complianceDirectoryService.editbyid(vo.getTid());
return RespHelper.<ComplianceDirectoryVO>successResp(data);
}
@RequestMapping({"/downloadfile"})
public String downloadfile(String name, HttpServletRequest request, HttpServletResponse response, Model model) throws Exception {
String userAgent = request.getHeader("User-Agent");
Properties props = new Properties();
try {
props = PropertiesLoaderUtils.loadAllProperties("config.properties");
} catch (IOException e) {
e.printStackTrace();
}
String path = props.getProperty("complianceDir");
path = path + File.separator + name;
try {
if (!userAgent.contains("MSIE") && !userAgent.contains("Trident")) {
name = new String(name.getBytes("UTF-8"), "ISO-8859-1");
} else {
name = URLEncoder.encode(name, "UTF-8");
}
response.setCharacterEncoding("utf-8");
response.setContentType("multipart/form-data");
response.setHeader("Content-Disposition", "attachment;fileName=" + name);
InputStream inputStream = new FileInputStream(new File(path));
OutputStream os = response.getOutputStream();
byte[] b = new byte[2048];
int length;
while((length = inputStream.read(b)) > 0) {
os.write(b, 0, length);
}
os.close();
inputStream.close();
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
@ResponseBody
@RequestMapping({"/editTask"})
public Response<TCoreAttachmentDirectory> editTask(@RequestBody Map<String, String> map) {
TCoreAttachmentDirectory data = this.complianceDirectoryService.editTask((String)map.get("fileid"));
return RespHelper.<TCoreAttachmentDirectory>successResp(data);
}
@ResponseBody
@RequestMapping({"/removeTask"})
public Response<String> removeTask(@RequestBody Map<String, String> map) {
String filename = (String)map.get("filename");
String fileid = (String)map.get("fileid");
Properties props = new Properties();
try {
props = PropertiesLoaderUtils.loadAllProperties("config.properties");
} catch (IOException e) {
e.printStackTrace();
}
String path = props.getProperty("complianceDir");
path = path + filename;
File fileTemp = new File(path);
if (fileTemp.exists()) {
fileTemp.delete();
}
this.complianceDirectoryService.removeTask(fileid);
return RespHelper.<String>successResp();
}
@ResponseBody
@RequestMapping({"/getmaxdatetid"})
public Response<String> getmaxdatetid(@RequestBody ComplianceDirectoryVO vo) {
String id = this.complianceDirectoryService.getmaxdatetid(vo.getEdition_id());
return RespHelper.<String>successResp(id);
}
@ResponseBody
@RequestMapping({"/excelmodeldown"})
public String excelModelDown(HttpServletRequest request, HttpServletResponse response, Model model) {
String userAgent = request.getHeader("User-Agent");
Properties props = new Properties();
try {
props = PropertiesLoaderUtils.loadAllProperties("config.properties");
} catch (IOException e) {
e.printStackTrace();
}
String path = props.getProperty("excelModelDown");
path = path + "/" + "compliancedirectory.xlsx";
try {
String name = "compliancedirectory.xlsx";
if (!userAgent.contains("MSIE") && !userAgent.contains("Trident")) {
name = new String("compliancedirectory.xlsx".getBytes("UTF-8"), "ISO-8859-1");
} else {
name = URLEncoder.encode("compliancedirectory.xlsx", "UTF-8");
}
response.setCharacterEncoding("utf-8");
response.setContentType("multipart/form-data");
response.setHeader("Content-Disposition", "attachment;fileName=" + name);
InputStream inputStream = new FileInputStream(new File(path));
OutputStream os = response.getOutputStream();
byte[] b = new byte[2048];
int length;
while((length = inputStream.read(b)) > 0) {
os.write(b, 0, length);
}
os.close();
inputStream.close();
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
@ResponseBody
@RequestMapping({"/excelmodelup"})
public Response<String> excelModelUp(@RequestParam("file") MultipartFile file, @RequestParam("editionid") String editionid, @RequestParam("userName") String user) {
boolean flag = true;
new Properties();
String filename = file.getOriginalFilename();
new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
Properties props = PropertiesLoaderUtils.loadAllProperties("config.properties");
String path = props.getProperty("excelModelDown");
if (!FileTool.isFileExit(path)) {
FileTool.createFolder(path);
}
File mappletfile = new File(path, filename);
mappletfile.createNewFile();
file.transferTo(mappletfile);
String filepath = path + "/" + filename;
List<List<String>> list = ExcelTool.readExcel(filepath, 0);
this.complianceDirectoryService.removeByEdition(editionid);
this.complianceDirectoryService.saveExcelData(list, user, editionid);
System.out.println(list);
} catch (Exception e) {
flag = false;
e.printStackTrace();
}
return RespHelper.<String>successResp();
}
@ResponseBody
@RequestMapping({"/checkname"})
public String checkName(String directoryname, String projectId) {
String check = this.complianceDirectoryService.checkName(directoryname, projectId);
return check;
}
public List<Object> getChildren(String Id, List<ComplianceDirectoryVO> fileDirectories, List<String> fieldScopeIdList) {
List<Object> list = new ArrayList();
for(ComplianceDirectoryVO f : fileDirectories) {
JSONObject obj = new JSONObject();
obj.put("id", f.getTid());
obj.put("title", f.getText());
obj.put("pid", Id);
obj.put("spread", true);
if (fieldScopeIdList.contains(f.getTid())) {
obj.put("checked", true);
}
if (f.getChildren() != null) {
obj.put("children", this.getChildren(f.getId(), f.getChildren(), fieldScopeIdList));
}
list.add(obj);
}
return list;
}
}
package com.chenyang.nse.bussiness.dao.core;
import com.chenyang.nse.bussiness.config.HibernateConfig;
import com.chenyang.nse.bussiness.dao.BaseDao;
import com.chenyang.nse.bussiness.entity.vo.api.DiscoverApiDirectoryVO;
import com.chenyang.nse.bussiness.entity.vo.datascope.ComplianceDirectoryVO;
import com.chenyang.nse.bussiness.tools.xml.XmlTool;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang.StringUtils;
import org.hibernate.query.NativeQuery;
import org.hibernate.transform.Transformers;
import org.springframework.stereotype.Repository;
@Repository
public class ComplianceDirectoryDao extends BaseDao<Object, String> {
public List<ComplianceDirectoryVO> getDataScopeGroup(ComplianceDirectoryVO vo) {
String sql = StringUtils.isNotEmpty(vo.getSearchVal()) ? XmlTool.getSql("compliancedirectory", "dataScopeGroupByCondition") : XmlTool.getSql("compliancedirectory", "dataScopeGroup");
List<ComplianceDirectoryVO> res = null;
NativeQuery nativeQuery = this.getSession().createNativeQuery(sql).setParameter("edition_id", vo.getEdition_id());
if (StringUtils.isNotEmpty(vo.getSearchVal())) {
nativeQuery.setParameter("condition", vo.getCondition()).setParameter("searchVal", vo.getSearchVal());
}
res = nativeQuery.setResultTransformer(Transformers.aliasToBean(ComplianceDirectoryVO.class)).getResultList();
return res;
}
public List<DiscoverApiDirectoryVO> getComplianceDirectory(String edition_id) {
String sql = XmlTool.getSql("compliancedirectory", "complianceDirectory");
List<DiscoverApiDirectoryVO> vo = this.getSession().createNativeQuery(sql).setParameter("edition_id", edition_id).setResultTransformer(Transformers.aliasToBean(DiscoverApiDirectoryVO.class)).getResultList();
return vo;
}
public int insertAddFa(ComplianceDirectoryVO scope) {
String sql = XmlTool.getSql("compliancedirectory", "addfa");
int i = this.getSession().createNativeQuery(sql).setParameter("text", scope.getText()).setParameter("edition_id", scope.getEdition_id()).setParameter("id", scope.getTid()).setParameter("note", scope.getNote()).setParameter("chinese_name", scope.getChinese_name()).setParameter("foreigh_name", scope.getForeigh_name()).setParameter("abbreviation", scope.getAbbreviation()).setParameter("public_name", scope.getPublic_name()).setParameter("public_date", scope.getPublic_date()).setParameter("implementation_date", scope.getImplementation_date()).setParameter("revised_date", scope.getRevised_date()).setParameter("application_state", scope.getApplication_state()).setParameter("directory_type", scope.getDirectory_type()).setParameter("create_user", scope.getCreate_user()).setParameter("projectid", scope.getProjectId()).executeUpdate();
return i;
}
public List<ComplianceDirectoryVO> ishavebro(ComplianceDirectoryVO scope) {
String sql = XmlTool.getSql("compliancedirectory", "ishavebro");
List<ComplianceDirectoryVO> vo = this.getSession().createNativeQuery(sql).setParameter("fa_tid", scope.getFa_tid()).setResultTransformer(Transformers.aliasToBean(ComplianceDirectoryVO.class)).getResultList();
return vo;
}
public int havebro(ComplianceDirectoryVO scope) {
String sql = XmlTool.getSql("compliancedirectory", "havebro");
int i = this.getSession().createNativeQuery(sql).setParameter("text", scope.getText()).setParameter("id", scope.getTid()).setParameter("edition_id", scope.getEdition_id()).setParameter("fa_tid", scope.getFa_tid()).setParameter("note", scope.getNote()).setParameter("chinese_name", scope.getChinese_name()).setParameter("foreigh_name", scope.getForeigh_name()).setParameter("abbreviation", scope.getAbbreviation()).setParameter("public_name", scope.getPublic_name()).setParameter("public_date", scope.getPublic_date()).setParameter("implementation_date", scope.getImplementation_date()).setParameter("revised_date", scope.getRevised_date()).setParameter("application_state", scope.getApplication_state()).setParameter("directory_type", scope.getDirectory_type()).setParameter("create_user", scope.getCreate_user()).setParameter("projectid", scope.getProjectId()).executeUpdate();
return i;
}
public int nothavebro(ComplianceDirectoryVO scope) {
String sql = XmlTool.getSql("compliancedirectory", "nothavebro");
int i = this.getSession().createNativeQuery(sql).setParameter("text", scope.getText()).setParameter("id", scope.getTid()).setParameter("edition_id", scope.getEdition_id()).setParameter("fa_tid", scope.getFa_tid()).setParameter("note", scope.getNote()).setParameter("chinese_name", scope.getChinese_name()).setParameter("foreigh_name", scope.getForeigh_name()).setParameter("abbreviation", scope.getAbbreviation()).setParameter("public_name", scope.getPublic_name()).setParameter("public_date", scope.getPublic_date()).setParameter("implementation_date", scope.getImplementation_date()).setParameter("revised_date", scope.getRevised_date()).setParameter("application_state", scope.getApplication_state()).setParameter("directory_type", scope.getDirectory_type()).setParameter("create_user", scope.getCreate_user()).setParameter("projectid", scope.getProjectId()).executeUpdate();
return i;
}
public int updateScope(ComplianceDirectoryVO scope) {
String sql = XmlTool.getSql("compliancedirectory", "updatescope");
int i = this.getSession().createNativeQuery(sql).setParameter("text", scope.getText()).setParameter("id", scope.getTid()).setParameter("note", scope.getNote()).setParameter("chinese_name", scope.getChinese_name()).setParameter("foreigh_name", scope.getForeigh_name()).setParameter("abbreviation", scope.getAbbreviation()).setParameter("public_name", scope.getPublic_name()).setParameter("public_date", scope.getPublic_date()).setParameter("implementation_date", scope.getImplementation_date()).setParameter("revised_date", scope.getRevised_date()).setParameter("application_state", scope.getApplication_state()).setParameter("directory_type", scope.getDirectory_type()).setParameter("create_user", scope.getCreate_user()).executeUpdate();
return i;
}
public int delselfandson(String scope_id) {
String sql = XmlTool.getSql("compliancedirectory", "delselfandson");
int i = this.getSession().createNativeQuery(sql).setParameter("directory_id", scope_id).executeUpdate();
return i;
}
public List<ComplianceDirectoryVO> findbroandhisson(String scope_id, String fa_id) {
String sql = XmlTool.getSql("compliancedirectory", "findbroandhisson");
List<ComplianceDirectoryVO> vo = this.getSession().createNativeQuery(sql).setParameter("fa_id", fa_id).setParameter("directory_id", scope_id).setResultTransformer(Transformers.aliasToBean(ComplianceDirectoryVO.class)).getResultList();
return vo;
}
public int updatebro(String id) {
String sql = XmlTool.getSql("compliancedirectory", "updatebro");
int i = this.getSession().createNativeQuery(sql).setParameter("id", id).executeUpdate();
return i;
}
public int updatebroson(String id, String del_id) {
String sql = XmlTool.getSql("compliancedirectory", "updatebroson");
int i = this.getSession().createNativeQuery(sql).setParameter("id", id).setParameter("del_id", del_id).executeUpdate();
return i;
}
public int insertAddZero(ComplianceDirectoryVO scope) {
String sql = XmlTool.getSql("compliancedirectory", "addzero");
int i = this.getSession().createNativeQuery(sql).setParameter("text", scope.getText()).setParameter("id", scope.getTid()).setParameter("note", scope.getNote()).setParameter("chinese_name", scope.getChinese_name()).setParameter("foreigh_name", scope.getForeigh_name()).setParameter("abbreviation", scope.getAbbreviation()).setParameter("public_name", scope.getPublic_name()).setParameter("public_date", scope.getPublic_date()).setParameter("implementation_date", scope.getImplementation_date()).setParameter("revised_date", scope.getRevised_date()).setParameter("application_state", scope.getApplication_state()).setParameter("directory_type", scope.getDirectory_type()).setParameter("create_user", scope.getCreate_user()).setParameter("projectid", scope.getProjectId()).setParameter("edition_id", scope.getEdition_id()).executeUpdate();
return i;
}
public List<ComplianceDirectoryVO> getselfandson(String directory_id) {
String sql = XmlTool.getSql("compliancedirectory", "getselfandson");
return this.getSession().createNativeQuery(sql).setParameter("directory_id", directory_id).setResultTransformer(Transformers.aliasToBean(ComplianceDirectoryVO.class)).getResultList();
}
public List<Map<String, Object>> selectComplianceDirCount(String id) {
String sql = "SELECT COUNT(id) AS s FROM t_core_compliance_directory WHERE projectid = '" + id + "'";
List<Map<String, Object>> vo = this.getSession().createNativeQuery(sql).setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP).getResultList();
return vo;
}
public List<Map<String, Object>> selectComplianceDirCount1(String edition_id) {
String sql = "SELECT COUNT(id) AS s FROM t_core_compliance_directory WHERE edition_id = '" + edition_id + "'";
if (HibernateConfig.PEIZHIKUDBTYPE.equals("3")) {
sql = "SELECT COUNT(id) AS \"s\" FROM t_core_compliance_directory WHERE edition_id = '" + edition_id + "'";
}
List<Map<String, Object>> vo = this.getSession().createNativeQuery(sql).setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP).getResultList();
return vo;
}
}
package com.chenyang.nse.bussiness.engine.infa.basic.xmlbean;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.NormalizedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(
name = "",
propOrder = {"versionnumber", "name", "isdefault", "description", "attribute"}
)
@XmlRootElement(
name = "CONFIG"
)
public class CONFIG {
@XmlAttribute(
name = "NAME",
required = true
)
@XmlJavaTypeAdapter(NormalizedStringAdapter.class)
protected String name;
@XmlAttribute(
name = "DESCRIPTION"
)
@XmlJavaTypeAdapter(NormalizedStringAdapter.class)
protected String description;
@XmlAttribute(
name = "ISDEFAULT"
)
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
protected String isdefault;
@XmlAttribute(
name = "VERSIONNUMBER"
)
@XmlJavaTypeAdapter(NormalizedStringAdapter.class)
protected String versionnumber;
@XmlElement(
name = "ATTRIBUTE"
)
protected List<ATTRIBUTE> attribute;
public String getNAME() {
return this.name;
}
public void setNAME(String value) {
this.name = value;
}
public String getDESCRIPTION() {
return this.description;
}
public void setDESCRIPTION(String value) {
this.description = value;
}
public String getISDEFAULT() {
return this.isdefault;
}
public void setISDEFAULT(String value) {
this.isdefault = value;
}
public String getVERSIONNUMBER() {
return this.versionnumber;
}
public void setVERSIONNUMBER(String value) {
this.versionnumber = value;
}
public List<ATTRIBUTE> getATTRIBUTE() {
if (this.attribute == null) {
this.attribute = new ArrayList();
}
return this.attribute;
}
}
package com.chenyang.nse.bussiness.engine.infa.basic.xmlbean;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.NormalizedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(
name = "",
propOrder = {"type", "refobjectname", "attribute"}
)
@XmlRootElement(
name = "CONFIGREFERENCE"
)
public class CONFIGREFERENCE {
@XmlAttribute(
name = "REFOBJECTNAME",
required = true
)
@XmlJavaTypeAdapter(NormalizedStringAdapter.class)
protected String refobjectname;
@XmlAttribute(
name = "TYPE",
required = true
)
@XmlJavaTypeAdapter(NormalizedStringAdapter.class)
protected String type;
@XmlElement(
name = "ATTRIBUTE"
)
protected List<ATTRIBUTE> attribute;
public String getREFOBJECTNAME() {
return this.refobjectname;
}
public void setREFOBJECTNAME(String value) {
this.refobjectname = value;
}
public String getTYPE() {
return this.type;
}
public void setTYPE(String value) {
this.type = value;
}
public List<ATTRIBUTE> getATTRIBUTE() {
if (this.attribute == null) {
this.attribute = new ArrayList();
}
return this.attribute;
}
}
package com.chenyang.nse.bussiness.engine.infa.powercenter961.createdata;
import com.chenyang.nse.bussiness.engine.infa.basic.xmlbean.ATTRIBUTE;
import com.chenyang.nse.bussiness.engine.infa.basic.xmlbean.CONFIG;
import java.util.ArrayList;
import java.util.List;
public class Configutil {
public CONFIG getConfig() throws Exception {
new CONFIG();
CONFIG config = this.geCONFIGXml();
return config;
}
public CONFIG geCONFIGXml() throws Exception {
CONFIG config = new CONFIG();
config.setDESCRIPTION("Default session configuration object");
config.setISDEFAULT("YES");
config.setNAME("default_session_config");
config.setVERSIONNUMBER("1");
for(ATTRIBUTE attribute : this.geCONFIGATTRIBUTEXml()) {
config.getATTRIBUTE().add(attribute);
}
return config;
}
public List<ATTRIBUTE> geCONFIGATTRIBUTEXml() throws Exception {
List<ATTRIBUTE> attributeList = new ArrayList();
String[] tmpStr = null;
String[] attributeInfo = new String[]{"Advanced_", "Constraint based load ordering_NO", "Cache LOOKUP() function_YES", "Default buffer block size_Auto", "Line Sequential buffer length_1024", "Maximum Memory Allowed For Auto Memory Attributes_512MB", "Maximum Percentage of Total Memory Allowed For Auto Memory Attributes_5", "Additional Concurrent Pipelines for Lookup Cache Creation_Auto", "Custom Properties_", "Pre-build lookup cache_Auto", "Optimization Level_Medium", "DateTime Format String_MM/DD/YYYY HH24:MI:SS.US", "Pre 85 Timestamp Compatibility_NO", "Log Options_0", "Save session log by_Session runs", "Save session log for these runs_0", "Session Log File Max Size_0", "Session Log File Max Time Period_0", "Maximum Partial Session Log Files_1", "Writer Commit Statistics Log Frequency_1", "Writer Commit Statistics Log Interval_0", "Error handling_", "Stop on errors_0", "Override tracing_None", "On Stored Procedure error_Stop", "On Pre-session command task error_Stop", "On Pre-Post SQL error_Stop", "Enable Recovery_NO", "Error Log Type_None", "Error Log Table Name Prefix_", "Error Log File Name_PMError.log", "Log Source Row Data_NO", "Data Column Delimiter_|", "Partitioning Options_", "Dynamic Partitioning_Disabled", "Number of Partitions_1", "Multiplication Factor_Auto", "Session on Grid_", "Is Enabled_NO"};
for(int i = 0; i < attributeInfo.length; ++i) {
ATTRIBUTE attribute = new ATTRIBUTE();
tmpStr = attributeInfo[i].split("_");
attribute.setNAME(tmpStr[0]);
if (tmpStr.length > 1) {
attribute.setVALUE(tmpStr[1]);
} else {
attribute.setVALUE("");
}
attributeList.add(attribute);
}
return attributeList;
}
}
package com.chenyang.nse.bussiness.engine.infa.powercenter961.pubbean;
import java.util.List;
public class CommonBean {
private List<String> keytype;
private List<String> nameList;
private List<String> typeList;
private List<String> lengthList;
private List<String> mappingLengthList;
private List<String> mappingTypeList;
private List<String> mappingPrecisionList;
private List<String> precisionList;
private List<String> scalelist;
private List<String> mappingScalelist;
private List<String> judgelist;
private List<String> dateformatlist;
public List<String> getDateformatlist() {
return this.dateformatlist;
}
public void setDateformatlist(List<String> dateformatlist) {
this.dateformatlist = dateformatlist;
}
public List<String> getJudgelist() {
return this.judgelist;
}
public void setJudgelist(List<String> judgelist) {
this.judgelist = judgelist;
}
public List<String> getMappingScalelist() {
return this.mappingScalelist;
}
public void setMappingScalelist(List<String> mappingScalelist) {
this.mappingScalelist = mappingScalelist;
}
public List<String> getMappingPrecisionList() {
return this.mappingPrecisionList;
}
public void setMappingPrecisionList(List<String> mappingPrecisionList) {
this.mappingPrecisionList = mappingPrecisionList;
}
public List<String> getPrecisionList() {
return this.precisionList;
}
public void setPrecisionList(List<String> precisionList) {
this.precisionList = precisionList;
}
public List<String> getMappingTypeList() {
return this.mappingTypeList;
}
public void setMappingTypeList(List<String> mappingTypeList) {
this.mappingTypeList = mappingTypeList;
}
public List<String> getMappingLengthList() {
return this.mappingLengthList;
}
public void setMappingLengthList(List<String> mappingLengthList) {
this.mappingLengthList = mappingLengthList;
}
public List<String> getKeytype() {
return this.keytype;
}
public void setKeytype(List<String> keytype) {
this.keytype = keytype;
}
public List<String> getNameList() {
return this.nameList;
}
public void setNameList(List<String> nameList) {
this.nameList = nameList;
}
public List<String> getTypeList() {
return this.typeList;
}
public void setTypeList(List<String> typeList) {
this.typeList = typeList;
}
public List<String> getLengthList() {
return this.lengthList;
}
public void setLengthList(List<String> lengthList) {
this.lengthList = lengthList;
}
public List<String> getScalelist() {
return this.scalelist;
}
public void setScalelist(List<String> scalelist) {
this.scalelist = scalelist;
}
}
package com.chenyang.nse.bussiness.entity.orm.table.core.encryption;
import com.chenyang.nse.bussiness.entity.orm.table.TBaseEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
@Entity
@Table(
name = "COLUMN_PRIMARY_KEY_INFO"
)
public class ColumnPrimaryKeyInfo extends TBaseEntity {
private String project_id;
private String datasystem_id;
private String tschema;
private String tname;
private String primary_key_columns;
public String getProject_id() {
return this.project_id;
}
public void setProject_id(String project_id) {
this.project_id = project_id;
}
public String getDatasystem_id() {
return this.datasystem_id;
}
public void setDatasystem_id(String datasystem_id) {
this.datasystem_id = datasystem_id;
}
public String getTschema() {
return this.tschema;
}
public void setTschema(String tschema) {
this.tschema = tschema;
}
public String getTname() {
return this.tname;
}
public void setTname(String tname) {
this.tname = tname;
}
public String getPrimary_key_columns() {
return this.primary_key_columns;
}
public void setPrimary_key_columns(String primary_key_columns) {
this.primary_key_columns = primary_key_columns;
}
}
package com.chenyang.nse.bussiness.entity.vo.datascope;
import com.chenyang.nse.bussiness.entity.cache.LoginUser;
public class ComplianceDirectoryReqVO {
private ComplianceDirectoryVO complianceDirectoryVO;
private LoginUser loginUser;
public ComplianceDirectoryVO getComplianceDirectoryVO() {
return this.complianceDirectoryVO;
}
public LoginUser getLoginUser() {
return this.loginUser;
}
public void setComplianceDirectoryVO(final ComplianceDirectoryVO complianceDirectoryVO) {
this.complianceDirectoryVO = complianceDirectoryVO;
}
public void setLoginUser(final LoginUser loginUser) {
this.loginUser = loginUser;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
} else if (!(o instanceof ComplianceDirectoryReqVO)) {
return false;
} else {
ComplianceDirectoryReqVO other = (ComplianceDirectoryReqVO)o;
if (!other.canEqual(this)) {
return false;
} else {
Object this$complianceDirectoryVO = this.getComplianceDirectoryVO();
Object other$complianceDirectoryVO = other.getComplianceDirectoryVO();
if (this$complianceDirectoryVO == null) {
if (other$complianceDirectoryVO != null) {
return false;
}
} else if (!this$complianceDirectoryVO.equals(other$complianceDirectoryVO)) {
return false;
}
Object this$loginUser = this.getLoginUser();
Object other$loginUser = other.getLoginUser();
if (this$loginUser == null) {
if (other$loginUser != null) {
return false;
}
} else if (!this$loginUser.equals(other$loginUser)) {
return false;
}
return true;
}
}
}
protected boolean canEqual(final Object other) {
return other instanceof ComplianceDirectoryReqVO;
}
public int hashCode() {
int PRIME = 59;
int result = 1;
Object $complianceDirectoryVO = this.getComplianceDirectoryVO();
result = result * 59 + ($complianceDirectoryVO == null ? 43 : $complianceDirectoryVO.hashCode());
Object $loginUser = this.getLoginUser();
result = result * 59 + ($loginUser == null ? 43 : $loginUser.hashCode());
return result;
}
public String toString() {
return "ComplianceDirectoryReqVO(complianceDirectoryVO=" + this.getComplianceDirectoryVO() + ", loginUser=" + this.getLoginUser() + ")";
}
}
package com.chenyang.nse.bussiness.entity.vo.datascope;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ComplianceDirectoryVO {
private String id;
private String edition_id;
private String tid;
private String text;
private String fa_tid;
private String fa_name;
private String chinese_name;
private String foreigh_name;
private String abbreviation;
private String public_name;
private String public_date;
private String implementation_date;
private String revised_date;
private String application_state;
private String directory_type;
private String note;
private String create_user;
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
private Date create_date;
private String attachment_name;
private String attachment_form;
private String attachment_id;
private String projectId;
private String condition;
private String searchVal;
private Map<String, String> columnsGroups = new HashMap();
private List<ComplianceDirectoryVO> children;
private String columncount;
private String columnname1;
private String columnvalue1;
private String columnname2;
private String columnvalue2;
private String columnname3;
private String columnvalue3;
private String columnname4;
private String columnvalue4;
private String columnname5;
private String columnvalue5;
private String columnname6;
private String columnvalue6;
private String columnname7;
private String columnvalue7;
private String columnname8;
private String columnvalue8;
private String columnname9;
private String columnvalue9;
private String columnname10;
private String columnvalue10;
public String getTid() {
return this.id;
}
public void setTid(String id) {
this.id = id;
}
public String getId() {
return this.id;
}
public void setId(String id) {
this.id = id;
}
public String getText() {
return this.text;
}
public void setText(String text) {
this.text = text;
}
public String getFa_tid() {
return this.fa_tid;
}
public void setFa_tid(String fa_tid) {
this.fa_tid = fa_tid;
}
public String getFa_name() {
return this.fa_name;
}
public void setFa_name(String fa_name) {
this.fa_name = fa_name;
}
public String getPublic_date() {
return this.public_date;
}
public void setPublic_date(String public_date) {
this.public_date = public_date;
}
public String getImplementation_date() {
return this.implementation_date;
}
public void setImplementation_date(String implementation_date) {
this.implementation_date = implementation_date;
}
public String getRevised_date() {
return this.revised_date;
}
public void setRevised_date(String revised_date) {
this.revised_date = revised_date;
}
public String getNote() {
return this.note;
}
public void setNote(String note) {
this.note = note;
}
public String getCreate_user() {
return this.create_user;
}
public void setCreate_user(String create_user) {
this.create_user = create_user;
}
public Date getCreate_date() {
return this.create_date;
}
public void setCreate_date(Date create_date) {
this.create_date = create_date;
}
public List<ComplianceDirectoryVO> getChildren() {
return this.children;
}
public void setChildren(List<ComplianceDirectoryVO> children) {
this.children = children;
}
public String getChinese_name() {
return this.chinese_name;
}
public void setChinese_name(String chinese_name) {
this.chinese_name = chinese_name;
}
public String getForeigh_name() {
return this.foreigh_name;
}
public void setForeigh_name(String foreigh_name) {
this.foreigh_name = foreigh_name;
}
public String getAbbreviation() {
return this.abbreviation;
}
public void setAbbreviation(String abbreviation) {
this.abbreviation = abbreviation;
}
public String getPublic_name() {
return this.public_name;
}
public void setPublic_name(String public_name) {
this.public_name = public_name;
}
public String getApplication_state() {
return this.application_state;
}
public void setApplication_state(String application_state) {
this.application_state = application_state;
}
public String getDirectory_type() {
return this.directory_type;
}
public void setDirectory_type(String directory_type) {
this.directory_type = directory_type;
}
public String getAttachment_name() {
return this.attachment_name;
}
public void setAttachment_name(String attachment_name) {
this.attachment_name = attachment_name;
}
public String getAttachment_form() {
return this.attachment_form;
}
public void setAttachment_form(String attachment_form) {
this.attachment_form = attachment_form;
}
public String getAttachment_id() {
return this.attachment_id;
}
public void setAttachment_id(String attachment_id) {
this.attachment_id = attachment_id;
}
public String getColumncount() {
return this.columncount;
}
public void setColumncount(String columncount) {
this.columncount = columncount;
}
public String getColumnname1() {
return this.columnname1;
}
public void setColumnname1(String columnname1) {
this.columnname1 = columnname1;
}
public String getColumnvalue1() {
return this.columnvalue1;
}
public void setColumnvalue1(String columnvalue1) {
this.columnvalue1 = columnvalue1;
}
public String getColumnname2() {
return this.columnname2;
}
public void setColumnname2(String columnname2) {
this.columnname2 = columnname2;
}
public String getColumnvalue2() {
return this.columnvalue2;
}
public void setColumnvalue2(String columnvalue2) {
this.columnvalue2 = columnvalue2;
}
public String getColumnname3() {
return this.columnname3;
}
public void setColumnname3(String columnname3) {
this.columnname3 = columnname3;
}
public String getColumnvalue3() {
return this.columnvalue3;
}
public void setColumnvalue3(String columnvalue3) {
this.columnvalue3 = columnvalue3;
}
public String getColumnname4() {
return this.columnname4;
}
public void setColumnname4(String columnname4) {
this.columnname4 = columnname4;
}
public String getColumnvalue4() {
return this.columnvalue4;
}
public void setColumnvalue4(String columnvalue4) {
this.columnvalue4 = columnvalue4;
}
public String getColumnname5() {
return this.columnname5;
}
public void setColumnname5(String columnname5) {
this.columnname5 = columnname5;
}
public String getColumnvalue5() {
return this.columnvalue5;
}
public void setColumnvalue5(String columnvalue5) {
this.columnvalue5 = columnvalue5;
}
public String getColumnname6() {
return this.columnname6;
}
public void setColumnname6(String columnname6) {
this.columnname6 = columnname6;
}
public String getColumnvalue6() {
return this.columnvalue6;
}
public void setColumnvalue6(String columnvalue6) {
this.columnvalue6 = columnvalue6;
}
public String getColumnname7() {
return this.columnname7;
}
public void setColumnname7(String columnname7) {
this.columnname7 = columnname7;
}
public String getColumnvalue7() {
return this.columnvalue7;
}
public void setColumnvalue7(String columnvalue7) {
this.columnvalue7 = columnvalue7;
}
public String getColumnname8() {
return this.columnname8;
}
public void setColumnname8(String columnname8) {
this.columnname8 = columnname8;
}
public String getColumnvalue8() {
return this.columnvalue8;
}
public void setColumnvalue8(String columnvalue8) {
this.columnvalue8 = columnvalue8;
}
public String getColumnname9() {
return this.columnname9;
}
public void setColumnname9(String columnname9) {
this.columnname9 = columnname9;
}
public String getColumnvalue9() {
return this.columnvalue9;
}
public void setColumnvalue9(String columnvalue9) {
this.columnvalue9 = columnvalue9;
}
public String getColumnname10() {
return this.columnname10;
}
public void setColumnname10(String columnname10) {
this.columnname10 = columnname10;
}
public String getColumnvalue10() {
return this.columnvalue10;
}
public void setColumnvalue10(String columnvalue10) {
this.columnvalue10 = columnvalue10;
}
public String getProjectId() {
return this.projectId;
}
public void setProjectId(String projectId) {
this.projectId = projectId;
}
public String getEdition_id() {
return this.edition_id;
}
public String getCondition() {
return this.condition;
}
public String getSearchVal() {
return this.searchVal;
}
public Map<String, String> getColumnsGroups() {
return this.columnsGroups;
}
public void setEdition_id(final String edition_id) {
this.edition_id = edition_id;
}
public void setCondition(final String condition) {
this.condition = condition;
}
public void setSearchVal(final String searchVal) {
this.searchVal = searchVal;
}
public void setColumnsGroups(final Map<String, String> columnsGroups) {
this.columnsGroups = columnsGroups;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
} else if (!(o instanceof ComplianceDirectoryVO)) {
return false;
} else {
ComplianceDirectoryVO other = (ComplianceDirectoryVO)o;
if (!other.canEqual(this)) {
return false;
} else {
Object this$id = this.getId();
Object other$id = other.getId();
if (this$id == null) {
if (other$id != null) {
return false;
}
} else if (!this$id.equals(other$id)) {
return false;
}
Object this$edition_id = this.getEdition_id();
Object other$edition_id = other.getEdition_id();
if (this$edition_id == null) {
if (other$edition_id != null) {
return false;
}
} else if (!this$edition_id.equals(other$edition_id)) {
return false;
}
Object this$tid = this.getTid();
Object other$tid = other.getTid();
if (this$tid == null) {
if (other$tid != null) {
return false;
}
} else if (!this$tid.equals(other$tid)) {
return false;
}
Object this$text = this.getText();
Object other$text = other.getText();
if (this$text == null) {
if (other$text != null) {
return false;
}
} else if (!this$text.equals(other$text)) {
return false;
}
Object this$fa_tid = this.getFa_tid();
Object other$fa_tid = other.getFa_tid();
if (this$fa_tid == null) {
if (other$fa_tid != null) {
return false;
}
} else if (!this$fa_tid.equals(other$fa_tid)) {
return false;
}
Object this$fa_name = this.getFa_name();
Object other$fa_name = other.getFa_name();
if (this$fa_name == null) {
if (other$fa_name != null) {
return false;
}
} else if (!this$fa_name.equals(other$fa_name)) {
return false;
}
Object this$chinese_name = this.getChinese_name();
Object other$chinese_name = other.getChinese_name();
if (this$chinese_name == null) {
if (other$chinese_name != null) {
return false;
}
} else if (!this$chinese_name.equals(other$chinese_name)) {
return false;
}
Object this$foreigh_name = this.getForeigh_name();
Object other$foreigh_name = other.getForeigh_name();
if (this$foreigh_name == null) {
if (other$foreigh_name != null) {
return false;
}
} else if (!this$foreigh_name.equals(other$foreigh_name)) {
return false;
}
Object this$abbreviation = this.getAbbreviation();
Object other$abbreviation = other.getAbbreviation();
if (this$abbreviation == null) {
if (other$abbreviation != null) {
return false;
}
} else if (!this$abbreviation.equals(other$abbreviation)) {
return false;
}
Object this$public_name = this.getPublic_name();
Object other$public_name = other.getPublic_name();
if (this$public_name == null) {
if (other$public_name != null) {
return false;
}
} else if (!this$public_name.equals(other$public_name)) {
return false;
}
Object this$public_date = this.getPublic_date();
Object other$public_date = other.getPublic_date();
if (this$public_date == null) {
if (other$public_date != null) {
return false;
}
} else if (!this$public_date.equals(other$public_date)) {
return false;
}
Object this$implementation_date = this.getImplementation_date();
Object other$implementation_date = other.getImplementation_date();
if (this$implementation_date == null) {
if (other$implementation_date != null) {
return false;
}
} else if (!this$implementation_date.equals(other$implementation_date)) {
return false;
}
Object this$revised_date = this.getRevised_date();
Object other$revised_date = other.getRevised_date();
if (this$revised_date == null) {
if (other$revised_date != null) {
return false;
}
} else if (!this$revised_date.equals(other$revised_date)) {
return false;
}
Object this$application_state = this.getApplication_state();
Object other$application_state = other.getApplication_state();
if (this$application_state == null) {
if (other$application_state != null) {
return false;
}
} else if (!this$application_state.equals(other$application_state)) {
return false;
}
Object this$directory_type = this.getDirectory_type();
Object other$directory_type = other.getDirectory_type();
if (this$directory_type == null) {
if (other$directory_type != null) {
return false;
}
} else if (!this$directory_type.equals(other$directory_type)) {
return false;
}
Object this$note = this.getNote();
Object other$note = other.getNote();
if (this$note == null) {
if (other$note != null) {
return false;
}
} else if (!this$note.equals(other$note)) {
return false;
}
Object this$create_user = this.getCreate_user();
Object other$create_user = other.getCreate_user();
if (this$create_user == null) {
if (other$create_user != null) {
return false;
}
} else if (!this$create_user.equals(other$create_user)) {
return false;
}
Object this$create_date = this.getCreate_date();
Object other$create_date = other.getCreate_date();
if (this$create_date == null) {
if (other$create_date != null) {
return false;
}
} else if (!this$create_date.equals(other$create_date)) {
return false;
}
Object this$attachment_name = this.getAttachment_name();
Object other$attachment_name = other.getAttachment_name();
if (this$attachment_name == null) {
if (other$attachment_name != null) {
return false;
}
} else if (!this$attachment_name.equals(other$attachment_name)) {
return false;
}
Object this$attachment_form = this.getAttachment_form();
Object other$attachment_form = other.getAttachment_form();
if (this$attachment_form == null) {
if (other$attachment_form != null) {
return false;
}
} else if (!this$attachment_form.equals(other$attachment_form)) {
return false;
}
Object this$attachment_id = this.getAttachment_id();
Object other$attachment_id = other.getAttachment_id();
if (this$attachment_id == null) {
if (other$attachment_id != null) {
return false;
}
} else if (!this$attachment_id.equals(other$attachment_id)) {
return false;
}
Object this$projectId = this.getProjectId();
Object other$projectId = other.getProjectId();
if (this$projectId == null) {
if (other$projectId != null) {
return false;
}
} else if (!this$projectId.equals(other$projectId)) {
return false;
}
Object this$condition = this.getCondition();
Object other$condition = other.getCondition();
if (this$condition == null) {
if (other$condition != null) {
return false;
}
} else if (!this$condition.equals(other$condition)) {
return false;
}
Object this$searchVal = this.getSearchVal();
Object other$searchVal = other.getSearchVal();
if (this$searchVal == null) {
if (other$searchVal != null) {
return false;
}
} else if (!this$searchVal.equals(other$searchVal)) {
return false;
}
Object this$columnsGroups = this.getColumnsGroups();
Object other$columnsGroups = other.getColumnsGroups();
if (this$columnsGroups == null) {
if (other$columnsGroups != null) {
return false;
}
} else if (!this$columnsGroups.equals(other$columnsGroups)) {
return false;
}
Object this$children = this.getChildren();
Object other$children = other.getChildren();
if (this$children == null) {
if (other$children != null) {
return false;
}
} else if (!this$children.equals(other$children)) {
return false;
}
Object this$columncount = this.getColumncount();
Object other$columncount = other.getColumncount();
if (this$columncount == null) {
if (other$columncount != null) {
return false;
}
} else if (!this$columncount.equals(other$columncount)) {
return false;
}
Object this$columnname1 = this.getColumnname1();
Object other$columnname1 = other.getColumnname1();
if (this$columnname1 == null) {
if (other$columnname1 != null) {
return false;
}
} else if (!this$columnname1.equals(other$columnname1)) {
return false;
}
Object this$columnvalue1 = this.getColumnvalue1();
Object other$columnvalue1 = other.getColumnvalue1();
if (this$columnvalue1 == null) {
if (other$columnvalue1 != null) {
return false;
}
} else if (!this$columnvalue1.equals(other$columnvalue1)) {
return false;
}
Object this$columnname2 = this.getColumnname2();
Object other$columnname2 = other.getColumnname2();
if (this$columnname2 == null) {
if (other$columnname2 != null) {
return false;
}
} else if (!this$columnname2.equals(other$columnname2)) {
return false;
}
Object this$columnvalue2 = this.getColumnvalue2();
Object other$columnvalue2 = other.getColumnvalue2();
if (this$columnvalue2 == null) {
if (other$columnvalue2 != null) {
return false;
}
} else if (!this$columnvalue2.equals(other$columnvalue2)) {
return false;
}
Object this$columnname3 = this.getColumnname3();
Object other$columnname3 = other.getColumnname3();
if (this$columnname3 == null) {
if (other$columnname3 != null) {
return false;
}
} else if (!this$columnname3.equals(other$columnname3)) {
return false;
}
Object this$columnvalue3 = this.getColumnvalue3();
Object other$columnvalue3 = other.getColumnvalue3();
if (this$columnvalue3 == null) {
if (other$columnvalue3 != null) {
return false;
}
} else if (!this$columnvalue3.equals(other$columnvalue3)) {
return false;
}
Object this$columnname4 = this.getColumnname4();
Object other$columnname4 = other.getColumnname4();
if (this$columnname4 == null) {
if (other$columnname4 != null) {
return false;
}
} else if (!this$columnname4.equals(other$columnname4)) {
return false;
}
Object this$columnvalue4 = this.getColumnvalue4();
Object other$columnvalue4 = other.getColumnvalue4();
if (this$columnvalue4 == null) {
if (other$columnvalue4 != null) {
return false;
}
} else if (!this$columnvalue4.equals(other$columnvalue4)) {
return false;
}
Object this$columnname5 = this.getColumnname5();
Object other$columnname5 = other.getColumnname5();
if (this$columnname5 == null) {
if (other$columnname5 != null) {
return false;
}
} else if (!this$columnname5.equals(other$columnname5)) {
return false;
}
Object this$columnvalue5 = this.getColumnvalue5();
Object other$columnvalue5 = other.getColumnvalue5();
if (this$columnvalue5 == null) {
if (other$columnvalue5 != null) {
return false;
}
} else if (!this$columnvalue5.equals(other$columnvalue5)) {
return false;
}
Object this$columnname6 = this.getColumnname6();
Object other$columnname6 = other.getColumnname6();
if (this$columnname6 == null) {
if (other$columnname6 != null) {
return false;
}
} else if (!this$columnname6.equals(other$columnname6)) {
return false;
}
Object this$columnvalue6 = this.getColumnvalue6();
Object other$columnvalue6 = other.getColumnvalue6();
if (this$columnvalue6 == null) {
if (other$columnvalue6 != null) {
return false;
}
} else if (!this$columnvalue6.equals(other$columnvalue6)) {
return false;
}
Object this$columnname7 = this.getColumnname7();
Object other$columnname7 = other.getColumnname7();
if (this$columnname7 == null) {
if (other$columnname7 != null) {
return false;
}
} else if (!this$columnname7.equals(other$columnname7)) {
return false;
}
Object this$columnvalue7 = this.getColumnvalue7();
Object other$columnvalue7 = other.getColumnvalue7();
if (this$columnvalue7 == null) {
if (other$columnvalue7 != null) {
return false;
}
} else if (!this$columnvalue7.equals(other$columnvalue7)) {
return false;
}
Object this$columnname8 = this.getColumnname8();
Object other$columnname8 = other.getColumnname8();
if (this$columnname8 == null) {
if (other$columnname8 != null) {
return false;
}
} else if (!this$columnname8.equals(other$columnname8)) {
return false;
}
Object this$columnvalue8 = this.getColumnvalue8();
Object other$columnvalue8 = other.getColumnvalue8();
if (this$columnvalue8 == null) {
if (other$columnvalue8 != null) {
return false;
}
} else if (!this$columnvalue8.equals(other$columnvalue8)) {
return false;
}
Object this$columnname9 = this.getColumnname9();
Object other$columnname9 = other.getColumnname9();
if (this$columnname9 == null) {
if (other$columnname9 != null) {
return false;
}
} else if (!this$columnname9.equals(other$columnname9)) {
return false;
}
Object this$columnvalue9 = this.getColumnvalue9();
Object other$columnvalue9 = other.getColumnvalue9();
if (this$columnvalue9 == null) {
if (other$columnvalue9 != null) {
return false;
}
} else if (!this$columnvalue9.equals(other$columnvalue9)) {
return false;
}
Object this$columnname10 = this.getColumnname10();
Object other$columnname10 = other.getColumnname10();
if (this$columnname10 == null) {
if (other$columnname10 != null) {
return false;
}
} else if (!this$columnname10.equals(other$columnname10)) {
return false;
}
Object this$columnvalue10 = this.getColumnvalue10();
Object other$columnvalue10 = other.getColumnvalue10();
if (this$columnvalue10 == null) {
if (other$columnvalue10 != null) {
return false;
}
} else if (!this$columnvalue10.equals(other$columnvalue10)) {
return false;
}
return true;
}
}
}
protected boolean canEqual(final Object other) {
return other instanceof ComplianceDirectoryVO;
}
public int hashCode() {
int PRIME = 59;
int result = 1;
Object $id = this.getId();
result = result * 59 + ($id == null ? 43 : $id.hashCode());
Object $edition_id = this.getEdition_id();
result = result * 59 + ($edition_id == null ? 43 : $edition_id.hashCode());
Object $tid = this.getTid();
result = result * 59 + ($tid == null ? 43 : $tid.hashCode());
Object $text = this.getText();
result = result * 59 + ($text == null ? 43 : $text.hashCode());
Object $fa_tid = this.getFa_tid();
result = result * 59 + ($fa_tid == null ? 43 : $fa_tid.hashCode());
Object $fa_name = this.getFa_name();
result = result * 59 + ($fa_name == null ? 43 : $fa_name.hashCode());
Object $chinese_name = this.getChinese_name();
result = result * 59 + ($chinese_name == null ? 43 : $chinese_name.hashCode());
Object $foreigh_name = this.getForeigh_name();
result = result * 59 + ($foreigh_name == null ? 43 : $foreigh_name.hashCode());
Object $abbreviation = this.getAbbreviation();
result = result * 59 + ($abbreviation == null ? 43 : $abbreviation.hashCode());
Object $public_name = this.getPublic_name();
result = result * 59 + ($public_name == null ? 43 : $public_name.hashCode());
Object $public_date = this.getPublic_date();
result = result * 59 + ($public_date == null ? 43 : $public_date.hashCode());
Object $implementation_date = this.getImplementation_date();
result = result * 59 + ($implementation_date == null ? 43 : $implementation_date.hashCode());
Object $revised_date = this.getRevised_date();
result = result * 59 + ($revised_date == null ? 43 : $revised_date.hashCode());
Object $application_state = this.getApplication_state();
result = result * 59 + ($application_state == null ? 43 : $application_state.hashCode());
Object $directory_type = this.getDirectory_type();
result = result * 59 + ($directory_type == null ? 43 : $directory_type.hashCode());
Object $note = this.getNote();
result = result * 59 + ($note == null ? 43 : $note.hashCode());
Object $create_user = this.getCreate_user();
result = result * 59 + ($create_user == null ? 43 : $create_user.hashCode());
Object $create_date = this.getCreate_date();
result = result * 59 + ($create_date == null ? 43 : $create_date.hashCode());
Object $attachment_name = this.getAttachment_name();
result = result * 59 + ($attachment_name == null ? 43 : $attachment_name.hashCode());
Object $attachment_form = this.getAttachment_form();
result = result * 59 + ($attachment_form == null ? 43 : $attachment_form.hashCode());
Object $attachment_id = this.getAttachment_id();
result = result * 59 + ($attachment_id == null ? 43 : $attachment_id.hashCode());
Object $projectId = this.getProjectId();
result = result * 59 + ($projectId == null ? 43 : $projectId.hashCode());
Object $condition = this.getCondition();
result = result * 59 + ($condition == null ? 43 : $condition.hashCode());
Object $searchVal = this.getSearchVal();
result = result * 59 + ($searchVal == null ? 43 : $searchVal.hashCode());
Object $columnsGroups = this.getColumnsGroups();
result = result * 59 + ($columnsGroups == null ? 43 : $columnsGroups.hashCode());
Object $children = this.getChildren();
result = result * 59 + ($children == null ? 43 : $children.hashCode());
Object $columncount = this.getColumncount();
result = result * 59 + ($columncount == null ? 43 : $columncount.hashCode());
Object $columnname1 = this.getColumnname1();
result = result * 59 + ($columnname1 == null ? 43 : $columnname1.hashCode());
Object $columnvalue1 = this.getColumnvalue1();
result = result * 59 + ($columnvalue1 == null ? 43 : $columnvalue1.hashCode());
Object $columnname2 = this.getColumnname2();
result = result * 59 + ($columnname2 == null ? 43 : $columnname2.hashCode());
Object $columnvalue2 = this.getColumnvalue2();
result = result * 59 + ($columnvalue2 == null ? 43 : $columnvalue2.hashCode());
Object $columnname3 = this.getColumnname3();
result = result * 59 + ($columnname3 == null ? 43 : $columnname3.hashCode());
Object $columnvalue3 = this.getColumnvalue3();
result = result * 59 + ($columnvalue3 == null ? 43 : $columnvalue3.hashCode());
Object $columnname4 = this.getColumnname4();
result = result * 59 + ($columnname4 == null ? 43 : $columnname4.hashCode());
Object $columnvalue4 = this.getColumnvalue4();
result = result * 59 + ($columnvalue4 == null ? 43 : $columnvalue4.hashCode());
Object $columnname5 = this.getColumnname5();
result = result * 59 + ($columnname5 == null ? 43 : $columnname5.hashCode());
Object $columnvalue5 = this.getColumnvalue5();
result = result * 59 + ($columnvalue5 == null ? 43 : $columnvalue5.hashCode());
Object $columnname6 = this.getColumnname6();
result = result * 59 + ($columnname6 == null ? 43 : $columnname6.hashCode());
Object $columnvalue6 = this.getColumnvalue6();
result = result * 59 + ($columnvalue6 == null ? 43 : $columnvalue6.hashCode());
Object $columnname7 = this.getColumnname7();
result = result * 59 + ($columnname7 == null ? 43 : $columnname7.hashCode());
Object $columnvalue7 = this.getColumnvalue7();
result = result * 59 + ($columnvalue7 == null ? 43 : $columnvalue7.hashCode());
Object $columnname8 = this.getColumnname8();
result = result * 59 + ($columnname8 == null ? 43 : $columnname8.hashCode());
Object $columnvalue8 = this.getColumnvalue8();
result = result * 59 + ($columnvalue8 == null ? 43 : $columnvalue8.hashCode());
Object $columnname9 = this.getColumnname9();
result = result * 59 + ($columnname9 == null ? 43 : $columnname9.hashCode());
Object $columnvalue9 = this.getColumnvalue9();
result = result * 59 + ($columnvalue9 == null ? 43 : $columnvalue9.hashCode());
Object $columnname10 = this.getColumnname10();
result = result * 59 + ($columnname10 == null ? 43 : $columnname10.hashCode());
Object $columnvalue10 = this.getColumnvalue10();
result = result * 59 + ($columnvalue10 == null ? 43 : $columnvalue10.hashCode());
return result;
}
public String toString() {
return "ComplianceDirectoryVO(id=" + this.getId() + ", edition_id=" + this.getEdition_id() + ", tid=" + this.getTid() + ", text=" + this.getText() + ", fa_tid=" + this.getFa_tid() + ", fa_name=" + this.getFa_name() + ", chinese_name=" + this.getChinese_name() + ", foreigh_name=" + this.getForeigh_name() + ", abbreviation=" + this.getAbbreviation() + ", public_name=" + this.getPublic_name() + ", public_date=" + this.getPublic_date() + ", implementation_date=" + this.getImplementation_date() + ", revised_date=" + this.getRevised_date() + ", application_state=" + this.getApplication_state() + ", directory_type=" + this.getDirectory_type() + ", note=" + this.getNote() + ", create_user=" + this.getCreate_user() + ", create_date=" + this.getCreate_date() + ", attachment_name=" + this.getAttachment_name() + ", attachment_form=" + this.getAttachment_form() + ", attachment_id=" + this.getAttachment_id() + ", projectId=" + this.getProjectId() + ", condition=" + this.getCondition() + ", searchVal=" + this.getSearchVal() + ", columnsGroups=" + this.getColumnsGroups() + ", children=" + this.getChildren() + ", columncount=" + this.getColumncount() + ", columnname1=" + this.getColumnname1() + ", columnvalue1=" + this.getColumnvalue1() + ", columnname2=" + this.getColumnname2() + ", columnvalue2=" + this.getColumnvalue2() + ", columnname3=" + this.getColumnname3() + ", columnvalue3=" + this.getColumnvalue3() + ", columnname4=" + this.getColumnname4() + ", columnvalue4=" + this.getColumnvalue4() + ", columnname5=" + this.getColumnname5() + ", columnvalue5=" + this.getColumnvalue5() + ", columnname6=" + this.getColumnname6() + ", columnvalue6=" + this.getColumnvalue6() + ", columnname7=" + this.getColumnname7() + ", columnvalue7=" + this.getColumnvalue7() + ", columnname8=" + this.getColumnname8() + ", columnvalue8=" + this.getColumnvalue8() + ", columnname9=" + this.getColumnname9() + ", columnvalue9=" + this.getColumnvalue9() + ", columnname10=" + this.getColumnname10() + ", columnvalue10=" + this.getColumnvalue10() + ")";
}
}
package com.chenyang.nse.bussiness.entity.vo.maskingtask;
public class CompareInfoVO {
private Object columnname;
private Object maskingrulename;
private Object sourcedata;
private Object targetdata;
private Object diffMark;
private long curPage;
private long total;
public long getTotal() {
return this.total;
}
public void setTotal(long total) {
this.total = total;
}
public long getCurPage() {
return this.curPage;
}
public void setCurPage(long curPage) {
this.curPage = curPage;
}
public Object getColumnname() {
return this.columnname;
}
public void setColumnname(Object columnname) {
this.columnname = columnname;
}
public Object getMaskingrulename() {
return this.maskingrulename;
}
public void setMaskingrulename(Object maskingrulename) {
this.maskingrulename = maskingrulename;
}
public Object getSourcedata() {
return this.sourcedata;
}
public void setSourcedata(Object sourcedata) {
this.sourcedata = sourcedata;
}
public Object getTargetdata() {
return this.targetdata;
}
public void setTargetdata(Object targetdata) {
this.targetdata = targetdata;
}
public Object getDiffMark() {
return this.diffMark;
}
public void setDiffMark(Object diffMark) {
this.diffMark = diffMark;
}
}
package com.chenyang.nse.bussiness.odbc.po;
public class CommandType {
public static final byte PARSE_SQL_STRUCTURE = 1;
public static final byte REPLACE_SQL_STRUCTURE = 2;
public static final byte SM4_ENC_DEC = 3;
public static final byte SYNC_RULES = 4;
public static final byte SYNC_MASKS = 5;
}
package com.chenyang.nse.bussiness.performance_monitor.exception;
public class CommonException extends RuntimeException {
private static final long serialVersionUID = 1L;
private String errorCode;
public CommonException(String errorCode, String errorMessage) {
super(errorMessage);
this.errorCode = errorCode;
}
public String getErrorCode() {
return this.errorCode;
}
}
package com.chenyang.nse.bussiness.service.core;
import com.chenyang.nse.bussiness.entity.orm.table.core.TCoreAttachmentDirectory;
import com.chenyang.nse.bussiness.entity.vo.datascope.ComplianceDirectoryVO;
import java.util.List;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
@Service
@Transactional
public interface ComplianceDirectoryService {
void complianceDirectorySave(MultipartFile file, TCoreAttachmentDirectory dir);
void save(ComplianceDirectoryVO scope);
ComplianceDirectoryVO editbyid(String id);
void remove(String id);
List<ComplianceDirectoryVO> getScopeTable(ComplianceDirectoryVO vo);
List<TCoreAttachmentDirectory> getselectfilelist(String id);
void removeTask(String fileid);
TCoreAttachmentDirectory editTask(String fileid);
void complianceDirectorySaveEdit(TCoreAttachmentDirectory dir);
String getmaxdatetid(String projectId);
void removeByEdition(String editionid);
void saveExcelData(List<List<String>> list, String user, String projectId) throws Exception;
String checkName(String directoryname, String projectId);
}
package com.chenyang.nse.bussiness.service.core;
import com.chenyang.nse.bussiness.entity.orm.table.core.TCoreConfig;
import java.util.List;
public interface ConfigService {
TCoreConfig queryBydbtype(String dbtype);
List<String> queryBysystemid(String id);
void removeBysysid(String id);
}
package com.chenyang.nse.bussiness.service.core.impl;
import com.chenyang.nse.bussiness.config.PropertiesLoaderUtils;
import com.chenyang.nse.bussiness.dao.core.ComplianceDirectoryDao;
import com.chenyang.nse.bussiness.dao.table.core.TCoreAttachmentDirectoryDao;
import com.chenyang.nse.bussiness.dao.table.core.TCoreComplianceDirectoryDao;
import com.chenyang.nse.bussiness.dao.table.core.fieldscope.TCoreFieldDirectoryDao;
import com.chenyang.nse.bussiness.dao.table.core.scopeproject.TProAttributeGroupDao;
import com.chenyang.nse.bussiness.entity.orm.table.core.TCoreAttachmentDirectory;
import com.chenyang.nse.bussiness.entity.orm.table.core.TCoreComplianceDirectory;
import com.chenyang.nse.bussiness.entity.orm.table.core.scopeproject.TProAttributeGroup;
import com.chenyang.nse.bussiness.entity.vo.datascope.ComplianceDirectoryVO;
import com.chenyang.nse.bussiness.service.core.ComplianceDirectoryService;
import com.chenyang.nse.bussiness.tools.io.FileTool;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.UUID;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
@Service
@Transactional
public class ComplianceDirectoryServiceImpl implements ComplianceDirectoryService {
@Autowired
private TCoreComplianceDirectoryDao tCoreComplianceDirectoryDao;
@Autowired
private ComplianceDirectoryDao complianceDirectoryDao;
@Autowired
private TProAttributeGroupDao tProAttributeGroupDao;
@Autowired
private TCoreAttachmentDirectoryDao tCoreAttachmentDirectoryDao;
@Autowired
private TCoreFieldDirectoryDao tCoreFieldDirectoryDao;
public void complianceDirectorySave(MultipartFile file, TCoreAttachmentDirectory comdir) {
String filename = file.getOriginalFilename();
List<TCoreAttachmentDirectory> filelike = this.tCoreAttachmentDirectoryDao.getFileLike(comdir);
if (!filelike.isEmpty()) {
List<String> filelikename = new ArrayList();
for(TCoreAttachmentDirectory name : filelike) {
filelikename.add(name.getAttachment_name());
}
if (filelikename.contains(comdir.getAttachment_name())) {
for(int i = 1; i < 1000; ++i) {
if (!filelikename.contains(comdir.getAttachment_name() + " (" + i + ")")) {
filename = comdir.getAttachment_name() + " (" + i + ")." + comdir.getAttachment_form();
comdir.setAttachment_name(comdir.getAttachment_name() + " (" + i + ")");
break;
}
}
} else {
filename = file.getOriginalFilename();
}
}
Properties props = new Properties();
try {
props = PropertiesLoaderUtils.loadAllProperties("config.properties");
} catch (IOException e) {
e.printStackTrace();
}
String path = props.getProperty("complianceDir");
if (!FileTool.isFileExit(path)) {
FileTool.createFolder(path);
}
File mappletfile = new File(path, filename);
try {
mappletfile.createNewFile();
file.transferTo(mappletfile);
} catch (Exception e) {
System.out.println(e.toString());
e.printStackTrace();
}
comdir.setCreate_date(new Date());
this.tCoreAttachmentDirectoryDao.save(comdir);
}
public void complianceDirectorySaveEdit(TCoreAttachmentDirectory dir) {
this.tCoreAttachmentDirectoryDao.updateAttachmentDirectory(dir);
}
public List<TCoreAttachmentDirectory> getselectfilelist(String id) {
List<TCoreAttachmentDirectory> list = this.tCoreAttachmentDirectoryDao.queryAll(Order.desc("create_date"), new Criterion[]{Restrictions.eq("attachment_id", id)});
return list;
}
public void save(ComplianceDirectoryVO scope) {
if (scope.getTid() != null && !"".equals(scope.getTid())) {
this.complianceDirectoryDao.updateScope(scope);
} else if (scope.getFa_tid() == null) {
scope.setTid(UUID.randomUUID().toString().replace("-", ""));
List<TCoreComplianceDirectory> ll = this.tCoreComplianceDirectoryDao.queryAll();
if (ll.size() > 0) {
this.complianceDirectoryDao.insertAddFa(scope);
} else {
this.complianceDirectoryDao.insertAddZero(scope);
}
} else if (this.complianceDirectoryDao.ishavebro(scope).size() > 0) {
scope.setTid(UUID.randomUUID().toString().replace("-", ""));
this.complianceDirectoryDao.havebro(scope);
} else {
scope.setTid(UUID.randomUUID().toString().replace("-", ""));
this.complianceDirectoryDao.nothavebro(scope);
}
String idPro = scope.getTid();
this.saveColumn(scope, idPro);
}
public List<ComplianceDirectoryVO> getScopeTable(ComplianceDirectoryVO vo) {
List<ComplianceDirectoryVO> list = this.complianceDirectoryDao.getDataScopeGroup(vo);
list.forEach((l) -> {
List<TProAttributeGroup> listGroup = this.tProAttributeGroupDao.queryAll(new Criterion[]{Restrictions.eq("group_id", l.getTid())});
Map<String, String> map = new HashMap();
listGroup.forEach((lg) -> map.put(lg.getColumnname(), lg.getColumnvalue()));
l.setColumnsGroups(map);
});
List<ComplianceDirectoryVO> trees = this.buildTree(list, "全部");
return trees;
}
private List<ComplianceDirectoryVO> buildTree(List<ComplianceDirectoryVO> list, String parentId) {
List<ComplianceDirectoryVO> trees = new ArrayList();
if (list.size() > 0) {
for(ComplianceDirectoryVO entity : list) {
String menuId = entity.getTid();
String pid = entity.getFa_tid();
if (parentId.equals(pid)) {
List<ComplianceDirectoryVO> menuLists = this.buildTree(list, menuId);
entity.setChildren(menuLists);
trees.add(entity);
}
}
}
return trees;
}
public ComplianceDirectoryVO editbyid(String id) {
TCoreComplianceDirectory o = (TCoreComplianceDirectory)this.tCoreComplianceDirectoryDao.queryAll(new Criterion[]{Restrictions.eq("id", id)}).get(0);
String fatid = o.getFa_tid();
ComplianceDirectoryVO vo = new ComplianceDirectoryVO();
if ("全部".equals(fatid)) {
vo.setFa_name("全部");
} else {
String faid = ((TCoreComplianceDirectory)this.tCoreComplianceDirectoryDao.queryAll(new Criterion[]{Restrictions.eq("id", id)}).get(0)).getFa_tid();
vo.setFa_name(((TCoreComplianceDirectory)this.tCoreComplianceDirectoryDao.queryAll(new Criterion[]{Restrictions.eq("id", faid)}).get(0)).getDirectory_name());
}
vo.setTid(o.getId());
vo.setEdition_id(o.getEdition_id());
vo.setText(o.getDirectory_name());
vo.setId(o.getDirectory_id());
vo.setFa_tid(o.getFa_tid());
vo.setNote(o.getNote());
vo.setChinese_name(o.getChinese_name());
vo.setForeigh_name(o.getForeigh_name());
vo.setAbbreviation(o.getAbbreviation());
vo.setPublic_name(o.getPublic_name());
vo.setPublic_date(o.getPublic_date());
vo.setImplementation_date(o.getImplementation_date());
vo.setRevised_date(o.getRevised_date());
vo.setApplication_state(o.getApplication_state());
vo.setDirectory_type(o.getDirectory_type());
vo.setCreate_user(o.getCreate_user());
vo.setCreate_date(o.getCreate_date());
vo.setProjectId(o.getProjectid());
List<TProAttributeGroup> list = this.tProAttributeGroupDao.queryAll(new Criterion[]{Restrictions.eq("group_id", id)});
Map<String, String> map = new HashMap();
list.forEach((l) -> map.put(l.getColumnname(), l.getColumnvalue()));
vo.setColumnsGroups(map);
return vo;
}
private void saveColumn(ComplianceDirectoryVO obj, String idPro) {
try {
Class clazz = obj.getClass();
if (idPro != null && !"".equals(idPro)) {
this.tProAttributeGroupDao.remove(new Criterion[]{Restrictions.eq("group_id", idPro)});
}
obj.getColumnsGroups().entrySet().forEach((map) -> {
TProAttributeGroup tag = new TProAttributeGroup();
tag.setId(UUID.randomUUID().toString().replace("-", ""));
tag.setGroup_id(idPro);
tag.setColumnname((String)map.getKey());
tag.setColumnvalue((String)map.getValue());
this.tProAttributeGroupDao.save(tag);
});
} catch (Exception e) {
e.printStackTrace();
}
}
public void remove(String id) {
TCoreComplianceDirectory ds = (TCoreComplianceDirectory)this.tCoreComplianceDirectoryDao.queryUnique(new Criterion[]{Restrictions.eq("id", id)});
List<Map<String, Object>> relatedList = this.tCoreComplianceDirectoryDao.relatedfandson(ds.getDirectory_id());
List<String> listname = new ArrayList();
for(Map<String, Object> a : relatedList) {
listname.add((String)a.get("id"));
}
this.tCoreFieldDirectoryDao.remove(new Criterion[]{Restrictions.in("scope_id", listname)});
for(ComplianceDirectoryVO t : this.complianceDirectoryDao.getselfandson(ds.getDirectory_id())) {
String strF = t.getAttachment_name() + "." + t.getAttachment_form();
Properties props = new Properties();
try {
props = PropertiesLoaderUtils.loadAllProperties("config.properties");
} catch (IOException e) {
e.printStackTrace();
}
String path = props.getProperty("complianceDir");
path = path + strF;
File fileTemp = new File(path);
if (fileTemp.exists()) {
fileTemp.delete();
}
this.tCoreAttachmentDirectoryDao.remove(new Criterion[]{Restrictions.eq("id", t.getTid())});
}
this.complianceDirectoryDao.delselfandson(ds.getDirectory_id());
for(ComplianceDirectoryVO complianceDirectoryVO : this.complianceDirectoryDao.findbroandhisson(ds.getDirectory_id(), ds.getFa_tid())) {
if (ds.getFa_tid().equals(complianceDirectoryVO.getFa_tid())) {
this.complianceDirectoryDao.updatebro(complianceDirectoryVO.getTid());
} else {
this.complianceDirectoryDao.updatebroson(complianceDirectoryVO.getTid(), ds.getDirectory_id());
}
}
}
public void removeTask(String fileid) {
this.tCoreAttachmentDirectoryDao.remove(new Criterion[]{Restrictions.eq("id", fileid)});
}
public TCoreAttachmentDirectory editTask(String fileid) {
TCoreAttachmentDirectory data = (TCoreAttachmentDirectory)this.tCoreAttachmentDirectoryDao.queryUnique(new Criterion[]{Restrictions.eq("id", fileid)});
return data;
}
public String getmaxdatetid(String edition_id) {
String id = "";
List<Map<String, Object>> tmax = this.tCoreComplianceDirectoryDao.getmaxdatetid(edition_id);
if (!tmax.isEmpty()) {
id = (String)((Map)tmax.get(0)).get("id");
}
return id;
}
public void removeByEdition(String editionid) {
this.tCoreFieldDirectoryDao.remove(new Criterion[]{Restrictions.eq("edition_id", editionid)});
this.tProAttributeGroupDao.removeAssCompliance(editionid);
this.tCoreAttachmentDirectoryDao.removeAttaCompliance(editionid);
this.tCoreComplianceDirectoryDao.remove(new Criterion[]{Restrictions.eq("edition_id", editionid)});
}
private void saveScopeData(TCoreComplianceDirectory data) {
this.tCoreComplianceDirectoryDao.save(data);
String fid = data.getId();
data.getGroups().forEach((g) -> {
g.setGroup_id(fid);
this.tProAttributeGroupDao.save(g);
});
if (data.getChildrens().size() > 0) {
data.getChildrens().forEach((c) -> {
c.setFa_tid(fid);
this.saveScopeData(c);
});
}
}
private void saveScopeDataMap(Map<String, TCoreComplianceDirectory> map) {
TCoreComplianceDirectory all = (TCoreComplianceDirectory)map.get("全部");
List<TCoreComplianceDirectory> fathers = all.getChildrens();
fathers.forEach((f) -> this.saveScopeData(f));
}
public void saveExcelData(List<List<String>> list, String user, String editionid) throws Exception {
Map<String, TCoreComplianceDirectory> map = new HashMap();
map.put("全部", new TCoreComplianceDirectory());
list.stream().forEach((row) -> {
String uuid = UUID.randomUUID().toString().replace("-", "");
TCoreComplianceDirectory tds = new TCoreComplianceDirectory();
for(int j = 12; j < row.size() && j % 2 == 0 && null != row.get(j); ++j) {
TProAttributeGroup attr = new TProAttributeGroup();
attr.setColumnname((String)row.get(j));
attr.setColumnvalue((String)row.get(j + 1));
attr.setColumnnum(String.valueOf((j - 1) / 2));
tds.getGroups().add(attr);
++j;
}
tds.setDirectory_id((String)row.get(0));
tds.setDirectory_name((String)row.get(1));
tds.setNote((String)row.get(2));
tds.setFa_tid((String)row.get(0));
tds.setChinese_name((String)row.get(3));
tds.setForeigh_name((String)row.get(4));
tds.setAbbreviation((String)row.get(5));
tds.setPublic_name((String)row.get(6));
tds.setPublic_date((String)row.get(7));
tds.setRevised_date((String)row.get(8));
tds.setImplementation_date((String)row.get(9));
tds.setApplication_state((String)row.get(10));
tds.setDirectory_type((String)row.get(11));
tds.setCreate_user(user);
tds.setEdition_id(editionid);
tds.setCreate_date(new Date());
map.put(row.get(0), tds);
});
map.entrySet().forEach((row) -> {
if (((String)row.getKey()).length() > 3) {
String fscope = ((TCoreComplianceDirectory)row.getValue()).getDirectory_id().substring(0, ((TCoreComplianceDirectory)row.getValue()).getDirectory_id().length() - 3);
TCoreComplianceDirectory fdata = (TCoreComplianceDirectory)map.get(fscope);
List<TCoreComplianceDirectory> childrens = fdata.getChildrens();
childrens.add(row.getValue());
} else if (((String)row.getKey()).length() == 3) {
((TCoreComplianceDirectory)row.getValue()).setFa_tid("全部");
((TCoreComplianceDirectory)map.get("全部")).getChildrens().add(row.getValue());
}
});
this.saveScopeDataMap(map);
}
public String checkName(String directoryname, String projectId) {
List<TCoreComplianceDirectory> list = this.tCoreComplianceDirectoryDao.queryAll(new Criterion[]{Restrictions.eq("directory_name", directoryname), Restrictions.eq("projectid", projectId)});
return list.isEmpty() ? "yes" : "no";
}
}
package com.chenyang.nse.bussiness.service.core.impl;
import com.chenyang.nse.bussiness.dao.table.core.TCoreConfigDao;
import com.chenyang.nse.bussiness.dao.table.core.TCoreDatasystemDao;
import com.chenyang.nse.bussiness.entity.orm.table.core.TCoreConfig;
import com.chenyang.nse.bussiness.service.core.ConfigService;
import com.chenyang.nse.bussiness.tools.string.StringTool;
import com.chenyang.nse.bussiness.tools.xml.XmlTool;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service
public class ConfigServiceImpl implements ConfigService {
@Autowired
private TCoreConfigDao tCoreConfigDao;
@Autowired
private TCoreDatasystemDao tCoreDatasystemDao;
public TCoreConfig queryBydbtype(String dbtype) {
TCoreConfig tCoreConfig = new TCoreConfig();
String sourcedelimiter = "";
String sourcequoteCharacter = "";
String targetquoteCharacter = "";
String targetdelimiter = "";
String fileDir = "";
String suffix = "";
String dabtype = "";
if (dbtype.equals("MYSQL")) {
dabtype = "MYSQL";
sourcedelimiter = XmlTool.getFileValue(dbtype + "/db-sourcedelimiter");
sourcequoteCharacter = XmlTool.getFileValue(dbtype + "/db-sourcequoteCharacter");
targetdelimiter = XmlTool.getFileValue(dbtype + "/db-targetdelimiter");
targetquoteCharacter = XmlTool.getFileValue(dbtype + "/db-targetquoteCharacter");
suffix = XmlTool.getFileValue(dbtype + "/db-suffix");
fileDir = XmlTool.getFileValue(dbtype + "/db-fileDir");
} else if (dbtype.equals("HANA")) {
dabtype = "HANA";
sourcedelimiter = XmlTool.getFileValue(dbtype + "/db-sourcedelimiter");
sourcequoteCharacter = XmlTool.getFileValue(dbtype + "/db-sourcequoteCharacter");
targetdelimiter = XmlTool.getFileValue(dbtype + "/db-targetdelimiter");
targetquoteCharacter = XmlTool.getFileValue(dbtype + "/db-targetquoteCharacter");
suffix = XmlTool.getFileValue(dbtype + "/db-suffix");
fileDir = XmlTool.getFileValue(dbtype + "/db-fileDir");
} else if (dbtype.equals("TERADATA")) {
dabtype = "TERADATA";
sourcedelimiter = XmlTool.getFileValue(dbtype + "/db-sourcedelimiter");
sourcequoteCharacter = XmlTool.getFileValue(dbtype + "/db-sourcequoteCharacter");
targetdelimiter = XmlTool.getFileValue(dbtype + "/db-targetdelimiter");
targetquoteCharacter = XmlTool.getFileValue(dbtype + "/db-targetquoteCharacter");
suffix = XmlTool.getFileValue(dbtype + "/db-suffix");
fileDir = XmlTool.getFileValue(dbtype + "/db-fileDir");
} else if (dbtype.equals("HIVE")) {
dabtype = "HIVE";
sourcedelimiter = XmlTool.getFileValue(dbtype + "/db-sourcedelimiter");
sourcequoteCharacter = XmlTool.getFileValue(dbtype + "/db-sourcequoteCharacter");
targetdelimiter = XmlTool.getFileValue(dbtype + "/db-targetdelimiter");
targetquoteCharacter = XmlTool.getFileValue(dbtype + "/db-targetquoteCharacter");
suffix = XmlTool.getFileValue(dbtype + "/db-suffix");
fileDir = XmlTool.getFileValue(dbtype + "/db-fileDir");
} else if (dbtype.equals("MSSQLSERVER")) {
dabtype = "MSSQLSERVER";
sourcedelimiter = XmlTool.getFileValue(dbtype + "/db-sourcedelimiter");
sourcequoteCharacter = XmlTool.getFileValue(dbtype + "/db-sourcequoteCharacter");
targetdelimiter = XmlTool.getFileValue(dbtype + "/db-targetdelimiter");
targetquoteCharacter = XmlTool.getFileValue(dbtype + "/db-targetquoteCharacter");
suffix = XmlTool.getFileValue(dbtype + "/db-suffix");
fileDir = XmlTool.getFileValue(dbtype + "/db-fileDir");
} else if (dbtype.equals("SYBASE")) {
dabtype = "SYBASE";
sourcedelimiter = XmlTool.getFileValue(dbtype + "/db-sourcedelimiter");
sourcequoteCharacter = XmlTool.getFileValue(dbtype + "/db-sourcequoteCharacter");
targetdelimiter = XmlTool.getFileValue(dbtype + "/db-targetdelimiter");
targetquoteCharacter = XmlTool.getFileValue(dbtype + "/db-targetquoteCharacter");
suffix = XmlTool.getFileValue(dbtype + "/db-suffix");
fileDir = XmlTool.getFileValue(dbtype + "/db-fileDir");
} else if (dbtype.equals("SYBASE_IQ")) {
dabtype = "SYBASE_IQ";
sourcedelimiter = XmlTool.getFileValue(dbtype + "/db-sourcedelimiter");
sourcequoteCharacter = XmlTool.getFileValue(dbtype + "/db-sourcequoteCharacter");
targetdelimiter = XmlTool.getFileValue(dbtype + "/db-targetdelimiter");
targetquoteCharacter = XmlTool.getFileValue(dbtype + "/db-targetquoteCharacter");
suffix = XmlTool.getFileValue(dbtype + "/db-suffix");
fileDir = XmlTool.getFileValue(dbtype + "/db-fileDir");
} else if (dbtype.equals("DB2")) {
dabtype = "DB2";
sourcedelimiter = XmlTool.getFileValue(dbtype + "/db-sourcedelimiter");
sourcequoteCharacter = XmlTool.getFileValue(dbtype + "/db-sourcequoteCharacter");
targetdelimiter = XmlTool.getFileValue(dbtype + "/db-targetdelimiter");
targetquoteCharacter = XmlTool.getFileValue(dbtype + "/db-targetquoteCharacter");
suffix = XmlTool.getFileValue(dbtype + "/db-suffix");
fileDir = XmlTool.getFileValue(dbtype + "/db-fileDir");
} else if (dbtype.equals("ORACLE")) {
dabtype = "ORACLE";
sourcedelimiter = XmlTool.getFileValue(dbtype + "/db-sourcedelimiter");
sourcequoteCharacter = XmlTool.getFileValue(dbtype + "/db-sourcequoteCharacter");
targetdelimiter = XmlTool.getFileValue(dbtype + "/db-targetdelimiter");
targetquoteCharacter = XmlTool.getFileValue(dbtype + "/db-targetquoteCharacter");
suffix = XmlTool.getFileValue(dbtype + "/db-suffix");
fileDir = XmlTool.getFileValue(dbtype + "/db-fileDir");
} else if (dbtype.equals("INFORMIX")) {
dabtype = "INFORMIX";
sourcedelimiter = XmlTool.getFileValue(dbtype + "/db-sourcedelimiter");
sourcequoteCharacter = XmlTool.getFileValue(dbtype + "/db-sourcequoteCharacter");
targetdelimiter = XmlTool.getFileValue(dbtype + "/db-targetdelimiter");
targetquoteCharacter = XmlTool.getFileValue(dbtype + "/db-targetquoteCharacter");
suffix = XmlTool.getFileValue(dbtype + "/db-suffix");
fileDir = XmlTool.getFileValue(dbtype + "/db-fileDir");
} else if (dbtype.equals("MARIADB")) {
dabtype = "MARIADB";
sourcedelimiter = XmlTool.getFileValue(dbtype + "/db-sourcedelimiter");
sourcequoteCharacter = XmlTool.getFileValue(dbtype + "/db-sourcequoteCharacter");
targetdelimiter = XmlTool.getFileValue(dbtype + "/db-targetdelimiter");
targetquoteCharacter = XmlTool.getFileValue(dbtype + "/db-targetquoteCharacter");
suffix = XmlTool.getFileValue(dbtype + "/db-suffix");
fileDir = XmlTool.getFileValue(dbtype + "/db-fileDir");
} else if (dbtype.equals("GREENPLUM")) {
dabtype = "GREENPLUM";
sourcedelimiter = XmlTool.getFileValue(dbtype + "/db-sourcedelimiter");
sourcequoteCharacter = XmlTool.getFileValue(dbtype + "/db-sourcequoteCharacter");
targetdelimiter = XmlTool.getFileValue(dbtype + "/db-targetdelimiter");
targetquoteCharacter = XmlTool.getFileValue(dbtype + "/db-targetquoteCharacter");
suffix = XmlTool.getFileValue(dbtype + "/db-suffix");
fileDir = XmlTool.getFileValue(dbtype + "/db-fileDir");
}
List<String> tCoreConfig1 = this.tCoreConfigDao.queryBydbtype(dbtype);
if (tCoreConfig1 != null && tCoreConfig1.size() > 0) {
tCoreConfig.setId((String)tCoreConfig1.get(0));
tCoreConfig.setSourcedelimiter(sourcedelimiter);
tCoreConfig.setSourcequoteCharacter(sourcequoteCharacter);
tCoreConfig.setTargetdelimiter(targetdelimiter);
tCoreConfig.setTargetquoteCharacter(targetquoteCharacter);
tCoreConfig.setDbtype(dbtype);
tCoreConfig.setSuffix(suffix);
tCoreConfig.setFileDir(fileDir);
return tCoreConfig;
} else {
tCoreConfig.setId(StringTool.getTablePrimaryKey());
tCoreConfig.setSourcedelimiter(sourcedelimiter);
tCoreConfig.setSourcequoteCharacter(sourcequoteCharacter);
tCoreConfig.setTargetdelimiter(targetdelimiter);
tCoreConfig.setTargetquoteCharacter(targetquoteCharacter);
tCoreConfig.setDbtype(dbtype);
tCoreConfig.setSuffix(suffix);
tCoreConfig.setFileDir(fileDir);
return tCoreConfig;
}
}
public List<String> queryBysystemid(String id) {
List<String> list = this.tCoreConfigDao.queryBysystemid(id);
return list;
}
@Transactional
public void removeBysysid(String id) {
this.tCoreConfigDao.removeBysysid(id);
}
}
package com.chenyang.nse.bussiness.service.info.db;
import com.chenyang.nse.bussiness.commmon.SpringContext;
import com.chenyang.nse.bussiness.dao.table.console.TConsoleFastManageDao;
import com.chenyang.nse.bussiness.entity.redis.TCoreMaskingTaskTableInfo;
import com.chenyang.nse.bussiness.tools.string.StringTool;
import com.power.xml.entity.ColumnInfo;
import com.power.xml.entity.Config;
import com.power.xml.entity.FlatFile;
import com.power.xml.entity.Info;
import com.power.xml.entity.SourceInfo;
import com.power.xml.entity.TargetInfo;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class CommonMethod {
public static final String exportname = "normal";
public static final String importname = "normal";
public static final String exportmark = "正常导出";
public static final String importmark = "正常导入";
public static final String checkstateon = "selected";
public static final String checkstateoff = "";
public TConsoleFastManageDao tConsoleFastManageDao = (TConsoleFastManageDao)SpringContext.getContext().getBean("TConsoleFastManageDao");
public String sourceradio() {
return "<option value={0} {2}>{1}</option>";
}
public String targetradio() {
return "<option value={0} {2}>{1}</option>";
}
public String isassignspace() {
return "</br><label style='cursor:pointer'><input style='cursor:pointer' style='cursor:pointer' type='checkbox' name='isassignspace' id='isassignspace' value='isassignspace' />同步表空间</label>";
}
public String isrebuild() {
return "<label style='cursor:pointer'><input style='cursor:pointer' style='cursor:pointer' type='checkbox' name='isrebuild' id='isrebuild' value='isrebuild' />删除并重建表</label>";
}
public String isindex() {
return "<label style='cursor:pointer'><input style='cursor:pointer' name='isindex' type='checkbox' name='isindex' id='isindex' value='isindex' />同步索引 </label>";
}
public String isprimary() {
return "<label style='cursor:pointer'><input style='cursor:pointer' name='isprimary' type='checkbox' name='isprimary' id='isprimary' value='isprimary' />同步主键 </label>";
}
public String isemptytable() {
return "<label style='cursor:pointer'><input style='cursor:pointer' name='isclear' type='checkbox' name='isclear' id='isclear' value='isclear' checked />清空表</label>";
}
public String isfunction() {
return "<label style='cursor:pointer' id='isfunction_label'><input style='cursor:pointer' name='isfunction' type='checkbox' name='isfunction' id='isfunction' value='isfunction' />同步存储过程和函数</label>";
}
public String isview() {
return "<label style='cursor:pointer'><input style='cursor:pointer' name='isview' type='checkbox' name='isview' id='isview' value='isview' />同步视图 </label>";
}
public String ispartition() {
return "<label style='cursor:pointer'><input style='cursor:pointer' name='ispartition' type='checkbox' name='ispartition' id='ispartition' value='ispartition' />同步表分区 </label>";
}
public String isconstraint() {
return "<label style='cursor:pointer'><input style='cursor:pointer' name='isconstraint' type='checkbox' name='isconstraint' id='isconstraint' value='isconstraint' />同步约束 </label>";
}
public String istrigger() {
return "<label style='cursor:pointer' style='cursor:pointer' id='istrigger_label'><input name='istrigger' type='checkbox' name='istrigger' id='istrigger' value='istrigger' />同步触发器</label>";
}
public String delete() {
return "<label style='cursor:pointer'><input style='cursor:pointer' name='inserttype' type='radio' value='delete' />删除</label>";
}
public String insert() {
return "<label style='cursor:pointer'><input style='cursor:pointer' name='inserttype' type='radio' value='insert' checked />插入 </label>";
}
public String insertorupdate() {
return "<label style='cursor:pointer'><input style='cursor:pointer' name='inserttype' type='radio' value='insertorupdate' />插入或更新 </label>";
}
public String update() {
return "<label style='cursor:pointer'><input style='cursor:pointer' name='inserttype' type='radio' value='update' />更新 </label>";
}
public Map<String, String> TargetParameter_fnormal() {
Map<String, String> map = new HashMap();
map.put("targetParameter", this.isrebuild() + this.isindex() + this.isprimary());
map.put("targetParameter_empty", this.isemptytable());
map.put("targetParameter_insert_type", this.insert() + this.delete() + this.insertorupdate() + this.update());
return map;
}
public Map<String, String> TargetParameter_fnotnormal() {
Map<String, String> map = new HashMap();
map.put("targetParameter", this.isrebuild() + this.isindex() + this.isprimary());
map.put("targetParameter_empty", this.isemptytable());
map.put("targetParameter_insert_type", "");
return map;
}
public void s(Map<String, Object> map) {
Info info = new Info();
SourceInfo sourceInfo = new SourceInfo();
List<ColumnInfo> sourcecolumnInfoList = new ArrayList();
List<ColumnInfo> targetcolumnInfoList = new ArrayList();
ColumnInfo columnInfo = new ColumnInfo();
columnInfo.setColumnName("");
columnInfo.setDataType("");
columnInfo.setDateTimeFormat("");
columnInfo.setKeyType(1);
columnInfo.setMaskingRule("");
columnInfo.setNullable(1);
columnInfo.setPrecision("");
columnInfo.setQualifierType("");
columnInfo.setScale("");
sourceInfo.setColumnInfoList(sourcecolumnInfoList);
sourceInfo.setConnectName("");
sourceInfo.setDataBaseType("");
FlatFile sourceflatFile = new FlatFile();
sourceflatFile.setCodePage("");
sourceflatFile.setCommand("");
sourceflatFile.setDelimiter("");
sourceflatFile.setFilename("");
sourceflatFile.setFileType(1);
sourceflatFile.setQuoteCharacter(1);
sourceflatFile.setSkipRows(1);
sourceInfo.setFlatFile(sourceflatFile);
sourceInfo.setName("");
sourceInfo.setSchema("");
sourceInfo.setSqlFilter("");
sourceInfo.setSqlQuery("");
TargetInfo targetInfo = new TargetInfo();
targetInfo.setColumnInfoList(targetcolumnInfoList);
targetInfo.setConnectName("");
targetInfo.setDataBaseType("");
FlatFile targetflatFile = new FlatFile();
targetflatFile.setCodePage("");
targetflatFile.setCommand("");
targetflatFile.setDelimiter("");
targetflatFile.setFilename("");
targetflatFile.setFileType(1);
targetflatFile.setQuoteCharacter(1);
targetflatFile.setSkipRows(1);
targetInfo.setFlatFile(targetflatFile);
targetInfo.setIsTruncate(1);
targetInfo.setName("");
targetInfo.setSchema("");
targetInfo.setWriteType(1);
Config config = new Config();
config.setDomainName("");
config.setFolderName("");
config.setMappletDir("");
config.setReadMode(1);
config.setRepositoryName("");
config.setServerName("");
config.setSessionLogCount(1);
config.setWriteMode(1);
config.setXmlLocation("");
info.setSourceInfo(sourceInfo);
info.setTargetInfo(targetInfo);
info.setTaskname("t_");
new ArrayList();
}
public ColumnInfo getPwc_columnInfo_target_all_base(Map map) {
ColumnInfo pwc_columnInfo_target = new ColumnInfo();
TCoreMaskingTaskTableInfo tCoreMaskingTaskTableInfo = (TCoreMaskingTaskTableInfo)map.get("tCoreMaskingTaskTableInfo");
int type = (Integer)map.get("type");
Map<String, String> data_by_source = (Map)map.get("data_by_source");
Boolean issomedb = (Boolean)map.get("issomedb");
Map<String, Map<String, String>> data_target_length = (Map)map.get("data_target_length");
Map<String, Map<String, String>> data_target = (Map)map.get("data_target");
Map<String, Map<String, String>> data_t_x_length = (Map)map.get("data_t_x_length");
Map<String, String> data_rule = (Map)map.get("data_rule");
String qualifierType = (String)map.get("qualifierType");
Config pwc_config = (Config)map.get("pwc_config");
String source = StringTool.delparentheses(tCoreMaskingTaskTableInfo.getSourceType().toLowerCase());
String pwc_type = (String)data_by_source.get(source);
String targetype = "";
String targetlength = "";
String targetscancale = "";
String targetpwcsqlength = "";
String targetpwcsqscale = "";
String targetpwcdateformat = "";
if (type == 0) {
if (issomedb) {
targetype = source;
targetlength = (String)((Map)data_target_length.get(source)).get("sourcelength");
targetscancale = (String)((Map)data_target_length.get(source)).get("sourcescancale");
targetpwcsqlength = (String)((Map)data_target_length.get(source)).get("pwcsqlength");
targetpwcsqscale = (String)((Map)data_target_length.get(source)).get("pwcsqscale");
targetpwcdateformat = (String)((Map)data_target_length.get(source)).get("pwcdateformat");
} else {
targetype = ((String)((Map)data_target.get(pwc_type)).get("sourcefieldname")).toLowerCase();
targetlength = (String)((Map)data_target_length.get(targetype)).get("sourcelength");
targetscancale = (String)((Map)data_target_length.get(targetype)).get("sourcescancale");
targetpwcsqlength = (String)((Map)data_target_length.get(targetype)).get("pwcsqlength");
targetpwcsqscale = (String)((Map)data_target_length.get(targetype)).get("pwcsqscale");
targetpwcdateformat = (String)((Map)data_target_length.get(targetype)).get("pwcdateformat");
}
} else {
targetype = StringTool.delparentheses(tCoreMaskingTaskTableInfo.getTargetType().toLowerCase());
targetlength = (String)((Map)data_t_x_length.get(targetype + pwc_type)).get("sourcelength");
targetscancale = (String)((Map)data_t_x_length.get(targetype + pwc_type)).get("sourcescancale");
targetpwcsqlength = (String)((Map)data_t_x_length.get(targetype + pwc_type)).get("pwcsqlength");
targetpwcsqscale = (String)((Map)data_t_x_length.get(targetype + pwc_type)).get("pwcsqscale");
targetpwcdateformat = (String)((Map)data_t_x_length.get(targetype + pwc_type)).get("pwcdateformat");
}
pwc_columnInfo_target.setColumnName(tCoreMaskingTaskTableInfo.getColumnName());
if ("SYSDATE".equalsIgnoreCase(pwc_columnInfo_target.getColumnName())) {
pwc_columnInfo_target.setColumnName(tCoreMaskingTaskTableInfo.getColumnName() + "1");
}
pwc_columnInfo_target.setDataType(StringTool.delparentheses(targetype.toUpperCase()));
pwc_columnInfo_target.setKeyType(tCoreMaskingTaskTableInfo.getIsPrimaryKey().equals("1") ? 1 : (tCoreMaskingTaskTableInfo.getIsForeignKey() != null ? (tCoreMaskingTaskTableInfo.getIsForeignKey().equals("1") ? 2 : 0) : 0));
pwc_columnInfo_target.setMaskingRule((String)data_rule.get(tCoreMaskingTaskTableInfo.getRegexRuleId()));
pwc_columnInfo_target.setNullable(pwc_columnInfo_target.getKeyType() != 0 ? 1 : 0);
pwc_columnInfo_target.setQualifierType(qualifierType.toLowerCase());
pwc_columnInfo_target.setScale(targetscancale != null && !targetscancale.equals("") ? targetscancale : tCoreMaskingTaskTableInfo.getColumnPrecision());
pwc_columnInfo_target.setPrecision(targetlength != null && !targetlength.equals("") ? targetlength : tCoreMaskingTaskTableInfo.getColumnLength());
if (pwc_columnInfo_target.getPrecision() == null || "".equals(pwc_columnInfo_target.getPrecision())) {
pwc_columnInfo_target.setPrecision(tCoreMaskingTaskTableInfo.getColumnLength());
}
if (targetpwcsqlength != null && !targetpwcsqlength.equals("")) {
pwc_columnInfo_target.setSqprecision(targetpwcsqlength);
pwc_columnInfo_target.setSqscale(targetpwcsqscale);
}
if (targetpwcdateformat != null && !targetpwcdateformat.equals("") && pwc_config.getWriteMode() == 1) {
pwc_columnInfo_target.setDateTimeFormat(targetpwcdateformat);
}
return pwc_columnInfo_target;
}
public ColumnInfo getPwc_columnInfo_source_all_base(Map map) {
ColumnInfo pwc_columnInfo_source = new ColumnInfo();
TCoreMaskingTaskTableInfo tCoreMaskingTaskTableInfo = (TCoreMaskingTaskTableInfo)map.get("tCoreMaskingTaskTableInfo");
pwc_columnInfo_source.setParameterlist(tCoreMaskingTaskTableInfo.getParameterlist());
Map<String, Map<String, String>> data_source_length = (Map)map.get("data_source_length");
Map<String, String> data_rule = (Map)map.get("data_rule");
String qualifierType = (String)map.get("qualifierType");
Config pwc_config = (Config)map.get("pwc_config");
String sourcetype = StringTool.delparentheses(tCoreMaskingTaskTableInfo.getSourceType().toUpperCase());
String source = StringTool.delparentheses(tCoreMaskingTaskTableInfo.getSourceType().toLowerCase());
pwc_columnInfo_source.setColumnName(tCoreMaskingTaskTableInfo.getColumnName());
if ("SYSDATE".equalsIgnoreCase(pwc_columnInfo_source.getColumnName())) {
pwc_columnInfo_source.setColumnName(tCoreMaskingTaskTableInfo.getColumnName() + "1");
}
pwc_columnInfo_source.setDataType(sourcetype);
if (tCoreMaskingTaskTableInfo.getIsPrimaryKey() == null) {
tCoreMaskingTaskTableInfo.setIsPrimaryKey("");
}
pwc_columnInfo_source.setKeyType(tCoreMaskingTaskTableInfo.getIsPrimaryKey().equals("1") ? 1 : (tCoreMaskingTaskTableInfo.getIsForeignKey() != null ? (tCoreMaskingTaskTableInfo.getIsForeignKey().equals("1") ? 2 : 0) : 0));
pwc_columnInfo_source.setMaskingRule((String)data_rule.get(tCoreMaskingTaskTableInfo.getRegexRuleId()));
pwc_columnInfo_source.setNullable(pwc_columnInfo_source.getKeyType() != 0 ? 1 : 0);
pwc_columnInfo_source.setQualifierType(qualifierType.toLowerCase());
String sourcelength = (String)((Map)data_source_length.get(source)).get("sourcelength");
String sourcescancale = (String)((Map)data_source_length.get(source)).get("sourcescancale");
String pwcsqlength = (String)((Map)data_source_length.get(source)).get("pwcsqlength");
String pwcsqscale = (String)((Map)data_source_length.get(source)).get("pwcsqscale");
String pwcdateformat = (String)((Map)data_source_length.get(source)).get("pwcdateformat");
pwc_columnInfo_source.setScale(sourcescancale != null && !sourcescancale.equals("") ? sourcescancale : tCoreMaskingTaskTableInfo.getColumnPrecision());
pwc_columnInfo_source.setPrecision(sourcelength != null && !sourcelength.equals("") ? sourcelength : tCoreMaskingTaskTableInfo.getColumnLength());
if (pwcsqlength != null && !pwcsqlength.equals("")) {
pwc_columnInfo_source.setSqprecision(pwcsqlength);
pwc_columnInfo_source.setSqscale(pwcsqscale);
}
if (pwcdateformat != null && !pwcdateformat.equals("") && pwc_config.getReadMode() == 1) {
pwc_columnInfo_source.setDateTimeFormat(pwcdateformat);
} else if (tCoreMaskingTaskTableInfo.getColumnformat() != null && !tCoreMaskingTaskTableInfo.getColumnformat().equals("")) {
pwc_columnInfo_source.setDateTimeFormat(tCoreMaskingTaskTableInfo.getColumnformat());
}
return pwc_columnInfo_source;
}
}
package com.chenyang.nse.bussiness.tools.login;
import com.chenyang.nse.bussiness.entity.cache.LoginUser;
import com.chenyang.nse.bussiness.entity.orm.table.base.TBaseUser;
import com.chenyang.nse.bussiness.tools.msg.PropertiesClassLoader;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.net.UnknownHostException;
import javax.servlet.http.HttpServletRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
public class CommonUtils {
private static final Logger log = LoggerFactory.getLogger(CommonUtils.class);
private static Logger logger = LoggerFactory.getLogger(PropertiesClassLoader.class);
public static String getIpAddr(HttpServletRequest request) {
String ip = request.getHeader("x-forwarded-for");
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("Proxy-Client-IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("WL-Proxy-Client-IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getRemoteAddr();
}
if (ip.equals("0:0:0:0:0:0:0:1")) {
ip = "本地";
}
return ip;
}
public static String getLocalMac(String ipAddress) throws SocketException, UnknownHostException {
String str = "";
String macAddress = "";
String LOOPBACK_ADDRESS = "127.0.0.1";
if ("127.0.0.1".equals(ipAddress)) {
InetAddress inetAddress = InetAddress.getLocalHost();
byte[] mac = NetworkInterface.getByInetAddress(inetAddress).getHardwareAddress();
StringBuilder sb = new StringBuilder();
for(int i = 0; i < mac.length; ++i) {
if (i != 0) {
sb.append("-");
}
String s = Integer.toHexString(mac[i] & 255);
sb.append(s.length() == 1 ? 0 + s : s);
}
macAddress = sb.toString().trim().toUpperCase();
} else {
Process p = null;
InputStreamReader ir = null;
BufferedReader br = null;
try {
System.out.println(ipAddress);
p = Runtime.getRuntime().exec("nbtstat -A " + ipAddress);
System.out.println("===process==" + p);
ir = new InputStreamReader(p.getInputStream());
br = new BufferedReader(ir);
while((str = br.readLine()) != null) {
if (str.indexOf("MAC") > 1) {
String var20 = str.substring(str.indexOf("MAC") + 9, str.length());
macAddress = var20.trim();
System.out.println("macAddress:" + macAddress);
break;
}
}
} catch (IOException var17) {
} finally {
try {
if (p != null) {
p.destroy();
}
if (br != null) {
br.close();
}
if (ir != null) {
ir.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
return macAddress;
}
public static TBaseUser loginUser() {
TBaseUser user = new TBaseUser();
user.setId("1");
try {
HttpServletRequest request = ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getRequest();
Object userObj = request.getSession().getAttribute("loginUser");
if (userObj != null && userObj instanceof LoginUser) {
user = ((LoginUser)userObj).getTsysUser();
}
} catch (Exception e) {
logger.info("登录用户获取失败", e.getMessage());
}
return user;
}
public static String loginUsername() {
String username = null;
try {
HttpServletRequest request = ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getRequest();
Object userObj = request.getSession().getAttribute("loginUser");
if (userObj != null && userObj instanceof LoginUser) {
username = ((LoginUser)userObj).getTsysUser().getUsername();
} else {
username = "admin";
}
} catch (Exception e) {
logger.info("登录用户获取失败", e.getMessage());
}
return username;
}
}
package com.chenyang.nse.bussiness.tools.systemenvironment;
import ch.ethz.ssh2.Connection;
import ch.ethz.ssh2.Session;
import ch.ethz.ssh2.StreamGobbler;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.commons.lang.StringUtils;
public class CpuAndMemory {
private static String DEFAULTCHART = "UTF-8";
private static Connection conn;
private String ip;
private String userName;
private String userPwd;
public CpuAndMemory() {
}
public CpuAndMemory(String ip, String userName, String userPwd) {
this.ip = ip;
this.userName = userName;
this.userPwd = userPwd;
}
public Boolean login() {
boolean flg = false;
try {
conn = new Connection(this.ip);
conn.connect();
flg = conn.authenticateWithPassword(this.userName, this.userPwd);
if (flg) {
System.out.println("认证成功!");
}
} catch (IOException e) {
e.printStackTrace();
}
return flg;
}
public String execute(String cmd) {
String result = "";
try {
if (this.login()) {
Session session = conn.openSession();
session.execCommand(cmd);
result = processStdout(session.getStdout(), DEFAULTCHART);
if (StringUtils.isBlank(result)) {
result = processStdout(session.getStderr(), DEFAULTCHART);
}
conn.close();
session.close();
}
} catch (IOException e) {
e.printStackTrace();
}
return result;
}
public String executeSuccess(String cmd) {
String result = "";
try {
if (this.login()) {
Session session = conn.openSession();
session.execCommand(cmd);
result = processStdout(session.getStdout(), DEFAULTCHART);
conn.close();
session.close();
}
} catch (IOException e) {
e.printStackTrace();
}
return result;
}
public static String processStdout(InputStream in, String charset) {
InputStream stdout = new StreamGobbler(in);
StringBuffer buffer = new StringBuffer();
try {
BufferedReader br = new BufferedReader(new InputStreamReader(stdout, charset));
String line = null;
while((line = br.readLine()) != null) {
buffer.append(line + "\n");
}
br.close();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return buffer.toString();
}
public static List<String[]> command(String ip, String username) {
CpuAndMemory rec = new CpuAndMemory(ip, "root", "root");
List<String[]> cpuAndMemory = new ArrayList();
try {
if (rec.login()) {
Session session = conn.openSession();
session.execCommand("ps -aux | grep " + username);
String result = processStdout(session.getStdout(), DEFAULTCHART);
if (StringUtils.isBlank(result)) {
System.out.println("脚本出错");
result = processStdout(session.getStderr(), DEFAULTCHART);
}
String regex = "\\S+\\s+[0-9]+\\s+[0-9]+.[0-9]\\s+[0-9]+.[0-9]";
Pattern p = Pattern.compile(regex);
Matcher m = p.matcher(result);
while(m.find()) {
cpuAndMemory.add(m.group().split("\\s+"));
}
session.close();
conn.close();
}
} catch (IOException e) {
e.printStackTrace();
}
return cpuAndMemory;
}
public static void main(String[] args) {
new ArrayList();
Double cpu = (double)0.0F;
Double memory = (double)0.0F;
for(String[] strings : command("192.168.2.221", "gpadmin")) {
cpu = cpu + (double)Float.parseFloat(strings[2]);
}
System.out.println(cpu);
}
}
<?xml version="1.0" encoding="UTF-8"?>
<sqls>
<!-- ***************** 新增部分**************** -->
<!-- 根节点添加 -->
<select id="addzero">
INSERT INTO t_core_compliance_directory (
id,
edition_id,
fa_tid,
directory_id,
directory_name,
chinese_name,
foreigh_name,
abbreviation,
public_name,
public_date,
implementation_date,
revised_date,
application_state,
directory_type,
create_user,
create_date,
note,
projectid
)
VALUES
(
:id,
:edition_id,
'全部',
'001',
:text,
:chinese_name,
:foreigh_name,
:abbreviation,
:public_name,
:public_date,
:implementation_date,
:revised_date,
:application_state,
:directory_type,
:create_user,
current_timestamp(),
:note,
:projectid
)
</select>
<select id="addfa">
INSERT INTO t_core_compliance_directory (
id,
edition_id,
fa_tid,
directory_id,
directory_name,
chinese_name,
foreigh_name,
abbreviation,
public_name,
public_date,
implementation_date,
revised_date,
application_state,
directory_type,
create_user,
create_date,
note,
projectid
)
VALUES
(
:id,
:edition_id,
'全部',
(
SELECT
LPAD(MAX(directory_id) + 1, 3, 0)
FROM
t_core_compliance_directory a
WHERE
fa_tid = '全部'
),
:text,
:chinese_name,
:foreigh_name,
:abbreviation,
:public_name,
:public_date,
:implementation_date,
:revised_date,
:application_state,
:directory_type,
:create_user,
current_timestamp(),
:note,
:projectid
)
</select>
<!-- 判断有没有兄弟 -->
<select id="ishavebro">
SELECT
id
FROM
t_core_compliance_directory
WHERE
fa_tid = :fa_tid
</select>
<!-- 添加 有兄弟,父id+获取兄弟id最大值,取最后三位+1-->
<select id="havebro">
INSERT INTO t_core_compliance_directory (
id,
edition_id,
fa_tid,
directory_id,
directory_name,
chinese_name,
foreigh_name,
abbreviation,
public_name,
public_date,
implementation_date,
revised_date,
application_state,
directory_type,
create_user,
create_date,
note,
projectid
)
VALUES
(
:id,
:edition_id,
:fa_tid,
( SELECT MAX(b.num)FROM (SELECT
LPAD( MAX(directory_id) + 1,CHARACTER_LENGTH(directory_id),0) as num
FROM
t_core_compliance_directory a
WHERE
fa_tid = :fa_tid
AND
edition_id = :edition_id
GROUP BY a.directory_id) b
),
:text,
:chinese_name,
:foreigh_name,
:abbreviation,
:public_name,
:public_date,
:implementation_date,
:revised_date,
:application_state,
:directory_type,
:create_user,
current_timestamp(),
:note,
:projectid
)
</select>
<!-- 添加 无兄弟 父id+001 本身id-->
<select id="nothavebro">
INSERT INTO t_core_compliance_directory (
id,
edition_id,
fa_tid,
directory_id,
directory_name,
chinese_name,
foreigh_name,
abbreviation,
public_name,
public_date,
implementation_date,
revised_date,
application_state,
directory_type,
create_user,
create_date,
note,
projectid
)
VALUES
(
:id,
:edition_id,
:fa_tid,
(
SELECT
CONCAT(directory_id, '001')
FROM
t_core_compliance_directory a
WHERE
tid = :fa_tid
),
:text,
:chinese_name,
:foreigh_name,
:abbreviation,
:public_name,
:public_date,
:implementation_date,
:revised_date,
:application_state,
:directory_type,
:create_user,
current_timestamp(),
:note,
:projectid
)
</select>
<!-- ***************** 删除部分**************** -->
<!-- 删除本身及子-->
<select id="delselfandson">
DELETE
FROM
t_core_compliance_directory
WHERE
directory_id LIKE (CONCAT(:directory_id, '%'))
</select>
<!-- 查询本身及子-->
<select id="getselfandson">
SELECT
ad.id as id,
cd.id as attachment_id,
ad.attachment_name as attachment_name,
ad.attachment_form as attachment_form
FROM
t_core_compliance_directory cd,t_core_attachment_directory ad
WHERE
cd.id = ad.attachment_id
and
cd.directory_id LIKE (CONCAT(:directory_id, '%'))
</select>
<!-- 查找所有大于自己的兄弟及其子-->
<select id="findbroandhisson">
SELECT
id,
fa_tid,
directory_id as id,
directory_name as text
FROM
t_core_compliance_directory
WHERE
directory_id LIKE (CONCAT(:fa_id, '%'))
AND substring(
directory_id,
1,
CHARACTER_LENGTH(:directory_id)
) > :directory_id
</select>
<!-- 如果父id与其相同 更新-->
<select id="updatebro">
UPDATE t_core_compliance_directory
SET directory_id = LPAD(
(directory_id - 1),
CHARACTER_LENGTH(directory_id),
0
)
WHERE
id = :id
</select>
<!-- 如果父id与其不相同 更新-->
<select id="updatebroson">
UPDATE t_core_compliance_directory
SET directory_id = LPAD(
CONCAT(
(
substring(
directory_id,
1,
CHARACTER_LENGTH(:del_id)
) - 1
),
substring(
directory_id,
CHARACTER_LENGTH(:del_id) + 1,
CHARACTER_LENGTH(directory_id)
)
),
CHARACTER_LENGTH(directory_id),
0
),
fa_tid = LPAD(
CONCAT(
(
substring(
fa_tid,
1,
CHARACTER_LENGTH(:del_id)
) - 1
),
substring(
fa_tid,
CHARACTER_LENGTH(:del_id) + 1,
CHARACTER_LENGTH(fa_tid)
)
),
CHARACTER_LENGTH(fa_tid),
0
)
WHERE
id= :id
</select>
<!-- 分页查询powercenter数据生成规则 -->
<select id="dataScopeGroup">
SELECT
id,
directory_id as id,
directory_name as text,
fa_tid,
chinese_name,
foreigh_name,
abbreviation,
public_name,
public_date,
implementation_date,
revised_date,
application_state,
directory_type,
create_user,
create_date,
note
FROM
t_core_compliance_directory
WHERE
edition_id = :edition_id
ORDER BY directory_id
</select>
<select id="dataScopeGroupByCondition">
SELECT
id,
directory_id as id,
directory_name as text,
fa_tid,
chinese_name,
foreigh_name,
abbreviation,
public_name,
public_date,
implementation_date,
revised_date,
application_state,
directory_type,
create_user,
create_date,
note
FROM
t_core_compliance_directory
WHERE
edition_id = :edition_id
and
:condition like (CONCAT(%,:searchVal, '%'))
ORDER BY directory_id
</select>
<!-- zhladd api用 -->
<select id="complianceDirectory">
SELECT
id as id,
directory_id as tid,
directory_name as text,
fa_tid,
edition_id as edition_id,
'5' as type
FROM
t_core_compliance_directory
WHERE
edition_id = :edition_id
ORDER BY directory_id
</select>
<!-- 更新操作 -->
<select id="updatescope">
UPDATE t_core_compliance_directory
SET directory_name = :text,
chinese_name =:chinese_name,
foreigh_name=:foreigh_name,
abbreviation=:abbreviation,
public_name=:public_name,
public_date=:public_date,
implementation_date=:implementation_date,
revised_date=:revised_date,
application_state=:application_state,
directory_type=:directory_type,
create_user = :create_user,
create_date = current_timestamp(),
note = :note
WHERE
id = :id
</select>
<!-- 合规目录下拉列表 -->
<select id="queryComplianceDirectoryList">
select a.id as id, a.directory_name as name from t_core_compliance_directory a
</select>
<!-- 敏感等级下拉列表 -->
<select id="getTCoreSensitiveLevelList">
select a.id as id, a.sensitive_name as name from t_core_sensitive_level a
</select>
<!-- 数据分类下拉列表 -->
<select id="getCoreDataScopeList">
select a.id as id, a.directory_name as name from t_core_compliance_directory a
</select>
<!-- 字段法律法规列表 -->
<select id="getFieldDetail">
select * from(
SELECT a.id,a.fields,a.`names`,a.tschemas,c.directory_name as rulename,'分类分级' as type
from t_core_table_field a,t_core_scope_field b,t_core_compliance_directory c
where a.id=b.tablefield_id and b.directory_id=c.id
UNION
select d.id,d.fields,d.`names`,d.tschemas,f.directory_name as rulename,'合规目录' as type
from t_core_table_field d,t_core_field_directory e,t_core_compliance_directory f
where d.id=e.tablefield_id and e.directory_id=f.id
UNION
select g.id,g.fields,g.`names`,g.tschemas,i.sensitive_name as rulename,'敏感等级' as type
from t_core_table_field g,t_core_field_sensitive h,t_core_sensitive_level i
where g.id=h.tablefield_id and h.sensitive_id=i.id
) x
where x.id=:columnid
</select>
<!-- 更新操作 -->
<select id="updateattachmentdirectory">
UPDATE t_core_attachment_directory
SET
create_user = :create_user,
create_date = current_timestamp(),
file_note = :file_note
WHERE
id = :id
</select>
</sqls>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论