diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/SrzDept.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/SrzDept.java new file mode 100644 index 00000000..def4db34 --- /dev/null +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/SrzDept.java @@ -0,0 +1,484 @@ +package com.zdxt.code.domain; + +import com.zdxt.common.BaseDomain; + +/** + * 市认证对接---组织机构信息对象 srz_dept + * + * @author ruoyi + * @date 2025-08-06 + */ +public class SrzDept extends BaseDomain +{ + private static final long serialVersionUID = 1L; + + /** 机构ID */ + private String organizationId; + + /** 机构名称 */ + private String name; + + /** 机构代码 */ + private String code; + + /** 作用点 */ + private String effectOn; + + /** 任务ID */ + private String taskId; + + /** 机构全路径 */ + private String zzDisplayPath; + + /** 是否叶子节点 */ + private String zzIsLeaf; + + /** 是否删除 */ + private String isDeleted; + + /** 是否禁用 */ + private String isDisabled; + + /** 系统ID */ + private String systemId; + + /** 机构层级 */ + private String zzLevel; + + /** 机构父节点 */ + private String parentId; + + /** 排序 */ + private String sequence; + + /** 创建时间 */ + private String createAt; + + /** 更新时间 */ + private String updateAt; + + /** 下游唯一标识 */ + private String guid; + + /** 是否驻区机构 */ + private String isMappingUnit; + + /** 驻区机构上级机构id */ + private String mappingUnitParentId; + + /** 省认证机构id */ + private String srzUnitId; + + /** 机构简称 */ + private String simpleName; + + /** 是否法定机构 */ + private String isStatutoryOrg; + + /** 是否生效 */ + private String isActive; + + /** 机构状态代码 */ + private String unitStatusCode; + + /** 机构状态 */ + private String unitStatus; + + /** 机构类型 */ + private String unitType; + + /** 行政区划代码 */ + private String xzqhCode; + + /** 行政区划 */ + private String xzqh; + + /** 是否参公管理 */ + private String isCGManager; + + /** 是否局(委)办 */ + private String isBureauOffice; + + /** 机构类型代码 */ + private String unitTypeCode; + + /** 单位性质代码 */ + private String dwxzCode; + + /** 单位性质 */ + private String dwxz; + + /** 系统单位类型编码 */ + private String unitSysTypeCode; + + /** 系统单位类型 */ + private String unitSysType; + + /** 单位系统类别描述 */ + private String dwxtlbms; + + /** 机构规格代码 */ + private String unitLevelCode; + + /** 机构规格 */ + private String unitLevel; + + /** 统一社会信用代码 */ + private String creditcode; + + /** + * 描述 + */ + private String description; + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public void setOrganizationId(String organizationId) + { + this.organizationId = organizationId; + } + + public String getOrganizationId() + { + return organizationId; + } + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return name; + } + public void setCode(String code) + { + this.code = code; + } + + public String getCode() + { + return code; + } + public void setEffectOn(String effectOn) + { + this.effectOn = effectOn; + } + + public String getEffectOn() + { + return effectOn; + } + public void setTaskId(String taskId) + { + this.taskId = taskId; + } + + public String getTaskId() + { + return taskId; + } + public void setZzDisplayPath(String zzDisplayPath) + { + this.zzDisplayPath = zzDisplayPath; + } + + public String getZzDisplayPath() + { + return zzDisplayPath; + } + public void setZzIsLeaf(String zzIsLeaf) + { + this.zzIsLeaf = zzIsLeaf; + } + + public String getZzIsLeaf() + { + return zzIsLeaf; + } + public void setIsDeleted(String isDeleted) + { + this.isDeleted = isDeleted; + } + + public String getIsDeleted() + { + return isDeleted; + } + public void setIsDisabled(String isDisabled) + { + this.isDisabled = isDisabled; + } + + public String getIsDisabled() + { + return isDisabled; + } + public void setSystemId(String systemId) + { + this.systemId = systemId; + } + + public String getSystemId() + { + return systemId; + } + public void setZzLevel(String zzLevel) + { + this.zzLevel = zzLevel; + } + + public String getZzLevel() + { + return zzLevel; + } + public void setParentId(String parentId) + { + this.parentId = parentId; + } + + public String getParentId() + { + return parentId; + } + public void setSequence(String sequence) + { + this.sequence = sequence; + } + + public String getSequence() + { + return sequence; + } + public void setCreateAt(String createAt) + { + this.createAt = createAt; + } + + public String getCreateAt() + { + return createAt; + } + public void setUpdateAt(String updateAt) + { + this.updateAt = updateAt; + } + + public String getUpdateAt() + { + return updateAt; + } + public void setGuid(String guid) + { + this.guid = guid; + } + + public String getGuid() + { + return guid; + } + public void setIsMappingUnit(String isMappingUnit) + { + this.isMappingUnit = isMappingUnit; + } + + public String getIsMappingUnit() + { + return isMappingUnit; + } + public void setMappingUnitParentId(String mappingUnitParentId) + { + this.mappingUnitParentId = mappingUnitParentId; + } + + public String getMappingUnitParentId() + { + return mappingUnitParentId; + } + public void setSrzUnitId(String srzUnitId) + { + this.srzUnitId = srzUnitId; + } + + public String getSrzUnitId() + { + return srzUnitId; + } + public void setSimpleName(String simpleName) + { + this.simpleName = simpleName; + } + + public String getSimpleName() + { + return simpleName; + } + public void setIsStatutoryOrg(String isStatutoryOrg) + { + this.isStatutoryOrg = isStatutoryOrg; + } + + public String getIsStatutoryOrg() + { + return isStatutoryOrg; + } + public void setIsActive(String isActive) + { + this.isActive = isActive; + } + + public String getIsActive() + { + return isActive; + } + public void setUnitStatusCode(String unitStatusCode) + { + this.unitStatusCode = unitStatusCode; + } + + public String getUnitStatusCode() + { + return unitStatusCode; + } + public void setUnitStatus(String unitStatus) + { + this.unitStatus = unitStatus; + } + + public String getUnitStatus() + { + return unitStatus; + } + public void setUnitType(String unitType) + { + this.unitType = unitType; + } + + public String getUnitType() + { + return unitType; + } + public void setXzqhCode(String xzqhCode) + { + this.xzqhCode = xzqhCode; + } + + public String getXzqhCode() + { + return xzqhCode; + } + public void setXzqh(String xzqh) + { + this.xzqh = xzqh; + } + + public String getXzqh() + { + return xzqh; + } + public void setIsCGManager(String isCGManager) + { + this.isCGManager = isCGManager; + } + + public String getIsCGManager() + { + return isCGManager; + } + public void setIsBureauOffice(String isBureauOffice) + { + this.isBureauOffice = isBureauOffice; + } + + public String getIsBureauOffice() + { + return isBureauOffice; + } + public void setUnitTypeCode(String unitTypeCode) + { + this.unitTypeCode = unitTypeCode; + } + + public String getUnitTypeCode() + { + return unitTypeCode; + } + public void setDwxzCode(String dwxzCode) + { + this.dwxzCode = dwxzCode; + } + + public String getDwxzCode() + { + return dwxzCode; + } + public void setDwxz(String dwxz) + { + this.dwxz = dwxz; + } + + public String getDwxz() + { + return dwxz; + } + public void setUnitSysTypeCode(String unitSysTypeCode) + { + this.unitSysTypeCode = unitSysTypeCode; + } + + public String getUnitSysTypeCode() + { + return unitSysTypeCode; + } + public void setUnitSysType(String unitSysType) + { + this.unitSysType = unitSysType; + } + + public String getUnitSysType() + { + return unitSysType; + } + public void setDwxtlbms(String dwxtlbms) + { + this.dwxtlbms = dwxtlbms; + } + + public String getDwxtlbms() + { + return dwxtlbms; + } + public void setUnitLevelCode(String unitLevelCode) + { + this.unitLevelCode = unitLevelCode; + } + + public String getUnitLevelCode() + { + return unitLevelCode; + } + public void setUnitLevel(String unitLevel) + { + this.unitLevel = unitLevel; + } + + public String getUnitLevel() + { + return unitLevel; + } + public void setCreditcode(String creditcode) + { + this.creditcode = creditcode; + } + + public String getCreditcode() + { + return creditcode; + } +} diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/SrzDeptMapper.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/SrzDeptMapper.java new file mode 100644 index 00000000..eb4eb70d --- /dev/null +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/SrzDeptMapper.java @@ -0,0 +1,41 @@ +package com.zdxt.code.mapper; + + +import com.zdxt.code.domain.SrzDept; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * 市认证对接---组织机构信息Mapper接口 + * + * @author ruoyi + * @date 2025-08-06 + */ +@Repository +public interface SrzDeptMapper +{ + /** + * 新增市认证对接---组织机构信息 + * + * @param srzDept 市认证对接---组织机构信息 + * @return 结果 + */ + public int insertSrzDept(SrzDept srzDept); + + /** + * 修改市认证对接---组织机构信息 + * + * @param srzDept 市认证对接---组织机构信息 + * @return 结果 + */ + public int updateSrzDept(SrzDept srzDept); + + /** + * 查询市认证对接---组织机构信息 + * + * @param organizationId 市认证对接---组织机构信息ID + * @return 市认证对接---组织机构信息 + */ + public SrzDept selectSrzDeptById(String organizationId); +} diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/ISrzDeptService.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/ISrzDeptService.java new file mode 100644 index 00000000..f9fa58b0 --- /dev/null +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/ISrzDeptService.java @@ -0,0 +1,36 @@ +package com.zdxt.code.service; + +import com.alibaba.fastjson.JSONArray; +import com.zdxt.code.domain.SrzDept; + +import java.util.Map; + +/** + * 市认证对接---组织机构信息Service接口 + * + * @author ruoyi + * @date 2025-08-06 + */ +public interface ISrzDeptService +{ + + /** + * 新增市认证对接---组织机构信息 + * + * @param srzDept 市认证对接---组织机构信息 + * @return 结果 + */ + public int insertSrzDept(SrzDept srzDept); + + /** + * 修改市认证对接---组织机构信息 + * + * @param srzDept 市认证对接---组织机构信息 + * @return 结果 + */ + public int updateSrzDept(SrzDept srzDept); + + public Map saveSrzDept(JSONArray dataArr, String token); + + +} diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/SrzDeptServiceImpl.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/SrzDeptServiceImpl.java new file mode 100644 index 00000000..7b46f4ba --- /dev/null +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/SrzDeptServiceImpl.java @@ -0,0 +1,168 @@ +package com.zdxt.code.service.impl; + +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.zdxt.auth.common.utils.StringUtils; +import com.zdxt.code.domain.SrzDept; +import com.zdxt.code.mapper.SrzDeptMapper; +import com.zdxt.code.service.ISrzDeptService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections.map.HashedMap; +import org.apache.http.HttpEntity; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.util.EntityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; + +import java.security.MessageDigest; +import java.util.Date; +import java.util.Map; + +/** + * 市认证对接---组织机构信息Service业务层处理 + * + * @author ruoyi + * @date 2025-08-06 + */ +@Service +@Slf4j +public class SrzDeptServiceImpl implements ISrzDeptService +{ + @Autowired + private SrzDeptMapper srzDeptMapper; + + @Value("${srnwg.url}") + private String znwgUrl; + @Value("${srnwg.paasId}") + private String paasId; + @Value("${srnwg.paasToken}") + private String paasToken; + + + /** + * 新增市认证对接---组织机构信息 + * + * @param srzDept 市认证对接---组织机构信息 + * @return 结果 + */ + @Override + public int insertSrzDept(SrzDept srzDept) + { + return srzDeptMapper.insertSrzDept(srzDept); + } + + /** + * 修改市认证对接---组织机构信息 + * + * @param srzDept 市认证对接---组织机构信息 + * @return 结果 + */ + @Override + public int updateSrzDept(SrzDept srzDept) + { + return srzDeptMapper.updateSrzDept(srzDept); + } + + @Override + public Map saveSrzDept(JSONArray dataArr, String token) { + int insertNum = 0; + int updateNum = 0; + for (int i = 0; i < dataArr.size(); i++) { + JSONObject jsonObject = dataArr.getJSONObject(i); + if (StringUtils.isEmpty(jsonObject.getString("organizationId"))) { continue; } + try { + // 返回每条拉取的成功情况 + String taskId = jsonObject.getString("taskId"); + String params = "{\"token\":\"" + token + "\",\"data\":[{\"taskId\":\"" + taskId + "\",\"result\":\"SUCCESS\"}]}"; + String doneStr = connect("/ebus/sfrzhqxglmk/sysDoneTorg", params); + JSONObject doneObj = JSONObject.parseObject(doneStr); + String done = doneObj.getString("success"); + log.info("部门拉取完成结果 ========> :{}", done); + } catch (Exception e) { + log.info("部门数据下拉完成异常,异常任务id:{}",jsonObject.getString("taskId")); + e.printStackTrace(); + } + SrzDept srzDept=JSONObject.parseObject(jsonObject.toString(),SrzDept.class); + if(srzDept==null)continue; + + SrzDept temp = srzDeptMapper.selectSrzDeptById(srzDept.getOrganizationId()); + if (null != temp && temp.getOrganizationId() != null) { + // 跟新数据库 + int rowNum = srzDeptMapper.updateSrzDept(srzDept); + updateNum += rowNum; + } else { + // 插入数据库 + int rowNum = srzDeptMapper.insertSrzDept(srzDept); + insertNum += rowNum; + } + } + Map resMap = new HashedMap(); + resMap.put("insertNum", insertNum); + resMap.put("updateNum", updateNum); + return resMap; + } + + private String connect(String apiPath, String params) { + //各种参数 + + try { + long now = new Date().getTime(); + String timestamp = Long.toString((long) Math.floor(now / 1000)); + String nonce = Long.toHexString(now) + "-" + Long.toHexString((long) Math.floor(Math.random() * 0xFFFFFF)); + String signature = toSHA256(timestamp + paasToken + nonce + timestamp); + + //创建CloseableHttpClient + CloseableHttpClient client = HttpClientBuilder.create().build(); + HttpPost httpPost = new HttpPost(znwgUrl + apiPath); + httpPost.setHeader("x-tif-paasid", paasId); + httpPost.setHeader("x-tif-timestamp", timestamp); + httpPost.setHeader("x-tif-signature", signature); + httpPost.setHeader("x-tif-nonce", nonce); + httpPost.setHeader("Content-Type", "application/json"); + httpPost.setHeader("Cache-Control", "no-cache"); + HttpEntity entity = new StringEntity(params); + + + httpPost.setEntity(entity); + + CloseableHttpResponse response = client.execute(httpPost); + + return EntityUtils.toString(response.getEntity()); + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + private String toSHA256(String str) throws Exception { + MessageDigest messageDigest; + String encodeStr = ""; + try { + messageDigest = MessageDigest.getInstance("SHA-256"); + messageDigest.update(str.getBytes("UTF-8")); + encodeStr = byte2Hex(messageDigest.digest()); + } catch (Exception e) { + throw e; + } + return encodeStr; + } + + // byte转换成16进制 + private String byte2Hex(byte[] bytes) { + StringBuffer stringBuffer = new StringBuffer(); + String temp = null; + for (int i = 0; i < bytes.length; i++) { + temp = Integer.toHexString(bytes[i] & 0xFF); + if (temp.length() == 1) { + stringBuffer.append("0"); + } + stringBuffer.append(temp); + } + return stringBuffer.toString(); + } +} diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/task/SrzDeptOriginalDataTask.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/task/SrzDeptOriginalDataTask.java new file mode 100644 index 00000000..8ff1c7f9 --- /dev/null +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/task/SrzDeptOriginalDataTask.java @@ -0,0 +1,184 @@ +package com.zdxt.code.task; + +import cn.hutool.core.map.MapUtil; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.zdxt.auth.project.system.dept.service.IDeptService; +import com.zdxt.auth.project.system.dict.service.IDictDataService; +import com.zdxt.code.service.ISrzDeptService; +import com.zdxt.domain.auth.DictData; +import org.apache.http.HttpEntity; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.util.EntityUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; + +import java.security.MessageDigest; +import java.util.*; +import java.util.stream.Collectors; + + +/** + * 市认证组织信息表原始数据对接 + */ +@Component("srzDeptOriginalDataTask") +public class SrzDeptOriginalDataTask { + + @Value("${srnwg.systemCode}") + private String systemCode; + @Value("${srnwg.integrationKey}") + private String integrationKey; + @Value("${srnwg.url}") + private String znwgUrl; + @Value("${srnwg.paasId}") + private String paasId; + @Value("${srnwg.paasToken}") + private String paasToken; + + @Autowired private ISrzDeptService srzDeptService; + @Autowired + private IDictDataService iDictDataService; + + public static Map params = new HashMap<>(); + + private static final Logger log = LoggerFactory.getLogger(SrzDeptOriginalDataTask.class); + + + public void run(){ + this.getData(); + } + + /** 同步部门数据 */ + public void getData(){ + List srz_item = iDictDataService.selectDictDataByType("srz_item"); + Map map = srz_item.stream().collect(Collectors.toMap(DictData::getDictLabel,DictData::getDictValue)); + + if(MapUtil.isNotEmpty(map)){ + params = map; + } + String token = ""; + String destroyTken = ""; + try { + // 获取 access_token + String tokenJson = connect("/ebus/sfrzhqxglmk/sysPullLogin?systemCode="+systemCode+"&integrationKey="+integrationKey); + JSONObject tokenObj = JSONObject.parseObject(tokenJson); + System.out.println("====================== access_token ======================"); + System.out.println(tokenObj); + System.out.println("====================== access_token ======================"); + token = tokenObj.getString("data"); + + // 获取 用户信息 + int page = 0; + int pageSize = 500; + List> sumMap = new ArrayList<>(); + + int insertNum = 0; + int updateNum = 0; + page = 0; + // 获取 部门信息 + while (true) { + String deptInfoJson = connect("/ebus/sfrzhqxglmk/sysPullOrg?token="+token+"&page="+page+"&pageSize="+pageSize+"&status=0"); + JSONObject sourceObj = JSONObject.parseObject(deptInfoJson); + JSONObject tmpJsonObj = sourceObj.getJSONObject("data"); + if(null==tmpJsonObj) { + log.info("=====================> tmpJsonObj 为空"); + break; + } + JSONArray dataArr = tmpJsonObj.getJSONArray("data"); + if (null == dataArr || dataArr.size()==0) { break; } + // 插入更新数据库 + log.error("-------------------> 原始组织json: {}", dataArr); + Map resMap = srzDeptService.saveSrzDept(dataArr,""); + sumMap.add(resMap); + page++; + } + + insertNum = 0; + updateNum = 0; + for (Map item : sumMap) { + insertNum += item.get("insertNum"); + updateNum += item.get("updateNum"); + } + log.info("新增部门数量 : {} / 更新部门数量 : {}", insertNum, updateNum); + + // 注销token + destroyTken = connect("/ebus/sfrzhqxglmk/sysPullLogout?token="+token); + System.out.println("====================== destroyTken ======================"); + System.out.println(destroyTken); + System.out.println("====================== destroyTken ======================"); + } catch (Exception e) { + e.printStackTrace(); + } + } + + private String connect(String apiPath) { + //各种参数 + + try { + String params = ""; //请求接⼝的参数 + + long now = new Date().getTime(); + String timestamp = Long.toString((long) Math.floor(now / 1000)); + String nonce = Long.toHexString(now) + "-" + Long.toHexString((long) Math.floor(Math.random() * 0xFFFFFF)); + String signature = toSHA256(timestamp + paasToken + nonce + timestamp); + + + //创建CloseableHttpClient + CloseableHttpClient client = HttpClientBuilder.create().build(); + HttpPost httpPost = new HttpPost(znwgUrl + apiPath); + httpPost.setHeader("x-tif-paasid", paasId); + httpPost.setHeader("x-tif-timestamp", timestamp); + httpPost.setHeader("x-tif-signature", signature); + httpPost.setHeader("x-tif-nonce", nonce); + httpPost.setHeader("Content-Type", "application/json"); + httpPost.setHeader("Cache-Control", "no-cache"); + HttpEntity entity = new StringEntity(params); + + + httpPost.setEntity(entity); + + CloseableHttpResponse response = client.execute(httpPost); + + return EntityUtils.toString(response.getEntity()); + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + + + private String toSHA256(String str) throws Exception { + MessageDigest messageDigest; + String encodeStr = ""; + try { + messageDigest = MessageDigest.getInstance("SHA-256"); + messageDigest.update(str.getBytes("UTF-8")); + encodeStr = byte2Hex(messageDigest.digest()); + } catch (Exception e) { + throw e; + } + return encodeStr; + } + + // byte转换成16进制 + private String byte2Hex(byte[] bytes) { + StringBuffer stringBuffer = new StringBuffer(); + String temp = null; + for (int i = 0; i < bytes.length; i++) { + temp = Integer.toHexString(bytes[i] & 0xFF); + if (temp.length() == 1) { + stringBuffer.append("0"); + } + stringBuffer.append(temp); + } + return stringBuffer.toString(); + } +} diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/SrzDeptMapper.xml b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/SrzDeptMapper.xml new file mode 100644 index 00000000..ba40c975 --- /dev/null +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/SrzDeptMapper.xml @@ -0,0 +1,237 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select organizationId, name, code, effectOn, taskId, zzDisplayPath, zzIsLeaf, isDeleted, isDisabled, systemId, + zzLevel, parentId, sequence, createAt, updateAt, guid, isMappingUnit, mappingUnitParentId, srzUnitId, + simpleName, isStatutoryOrg, isActive, unitStatusCode, unitStatus, unitType, xzqhCode, xzqh, isCGManager, + isBureauOffice, unitTypeCode, dwxzCode, dwxz, unitSysTypeCode, unitSysType, dwxtlbms, unitLevelCode, + unitLevel, creditcode,description + from srz_dept + + + + + + + + insert into srz_dept + + organizationId, + name, + code, + effectOn, + taskId, + zzDisplayPath, + zzIsLeaf, + isDeleted, + isDisabled, + systemId, + zzLevel, + parentId, + sequence, + createAt, + updateAt, + guid, + isMappingUnit, + mappingUnitParentId, + srzUnitId, + simpleName, + isStatutoryOrg, + isActive, + unitStatusCode, + unitStatus, + unitType, + xzqhCode, + xzqh, + isCGManager, + isBureauOffice, + unitTypeCode, + dwxzCode, + dwxz, + unitSysTypeCode, + unitSysType, + dwxtlbms, + unitLevelCode, + unitLevel, + creditcode, + description, + + + #{organizationId}, + #{name}, + #{code}, + #{effectOn}, + #{taskId}, + #{zzDisplayPath}, + #{zzIsLeaf}, + #{isDeleted}, + #{isDisabled}, + #{systemId}, + #{zzLevel}, + #{parentId}, + #{sequence}, + #{createAt}, + #{updateAt}, + #{guid}, + #{isMappingUnit}, + #{mappingUnitParentId}, + #{srzUnitId}, + #{simpleName}, + #{isStatutoryOrg}, + #{isActive}, + #{unitStatusCode}, + #{unitStatus}, + #{unitType}, + #{xzqhCode}, + #{xzqh}, + #{isCGManager}, + #{isBureauOffice}, + #{unitTypeCode}, + #{dwxzCode}, + #{dwxz}, + #{unitSysTypeCode}, + #{unitSysType}, + #{dwxtlbms}, + #{unitLevelCode}, + #{unitLevel}, + #{creditcode}, + #{description}, + + + + + update srz_dept + + name = #{name}, + code = #{code}, + effectOn = #{effectOn}, + taskId = #{taskId}, + zzDisplayPath = #{zzDisplayPath}, + zzIsLeaf = #{zzIsLeaf}, + isDeleted = #{isDeleted}, + isDisabled = #{isDisabled}, + systemId = #{systemId}, + zzLevel = #{zzLevel}, + parentId = #{parentId}, + sequence = #{sequence}, + createAt = #{createAt}, + updateAt = #{updateAt}, + guid = #{guid}, + isMappingUnit = #{isMappingUnit}, + mappingUnitParentId = #{mappingUnitParentId}, + srzUnitId = #{srzUnitId}, + simpleName = #{simpleName}, + isStatutoryOrg = #{isStatutoryOrg}, + isActive = #{isActive}, + unitStatusCode = #{unitStatusCode}, + unitStatus = #{unitStatus}, + unitType = #{unitType}, + xzqhCode = #{xzqhCode}, + xzqh = #{xzqh}, + isCGManager = #{isCGManager}, + isBureauOffice = #{isBureauOffice}, + unitTypeCode = #{unitTypeCode}, + dwxzCode = #{dwxzCode}, + dwxz = #{dwxz}, + unitSysTypeCode = #{unitSysTypeCode}, + unitSysType = #{unitSysType}, + dwxtlbms = #{dwxtlbms}, + unitLevelCode = #{unitLevelCode}, + unitLevel = #{unitLevel}, + creditcode = #{creditcode}, + description=#{description}, + + where organizationId = #{organizationId} + + \ No newline at end of file